From cacdeaca207e43ed9ad8bfc7d938d6121b4cb8c8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 7 Oct 2023 11:35:13 +0200 Subject: [PATCH] all --- .../client/workers/graphql.worker.bundle.js | 43424 ++++++++ .../server/workers/graphql.worker.bundle.js | 43424 ++++++++ frontend/package-lock.json | 463 +- frontend/package.json | 21 +- frontend/src/lib/components/DiffEditor.svelte | 44 +- frontend/src/lib/components/Editor.svelte | 126 +- .../lib/components/icons/FunkwhaleIcon.svelte | 20 +- frontend/static/workers/cssWorker-es.js | 7767 +- frontend/static/workers/cssWorker-iife.js | 69 +- frontend/static/workers/editorWorker-es.js | 5404 +- frontend/static/workers/editorWorker-iife.js | 13 +- frontend/static/workers/htmlWorker-es.js | 5811 +- frontend/static/workers/htmlWorker-iife.js | 87 +- frontend/static/workers/jsonWorker-es.js | 11613 +- frontend/static/workers/jsonWorker-iife.js | 53 +- frontend/static/workers/tsWorker-es.js | 91710 ++++++++-------- frontend/static/workers/tsWorker-iife.js | 319 +- frontend/vite.config.js | 4 +- 18 files changed, 149407 insertions(+), 60965 deletions(-) create mode 100644 frontend/git/windmill/frontend/.svelte-kit/output/client/workers/graphql.worker.bundle.js create mode 100644 frontend/git/windmill/frontend/.svelte-kit/output/server/workers/graphql.worker.bundle.js diff --git a/frontend/git/windmill/frontend/.svelte-kit/output/client/workers/graphql.worker.bundle.js b/frontend/git/windmill/frontend/.svelte-kit/output/client/workers/graphql.worker.bundle.js new file mode 100644 index 0000000000..fbb4fd7a96 --- /dev/null +++ b/frontend/git/windmill/frontend/.svelte-kit/output/client/workers/graphql.worker.bundle.js @@ -0,0 +1,43424 @@ +(() => { + 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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + 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( + // 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 + )); + + // node_modules/graphql/jsutils/inspect.js + var require_inspect = __commonJS({ + "node_modules/graphql/jsutils/inspect.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.inspect = inspect2; + var MAX_ARRAY_LENGTH2 = 10; + var MAX_RECURSIVE_DEPTH2 = 2; + function inspect2(value) { + return formatValue2(value, []); + } + function formatValue2(value, seenValues) { + switch (typeof value) { + case "string": + return JSON.stringify(value); + case "function": + return value.name ? `[function ${value.name}]` : "[function]"; + case "object": + return formatObjectValue2(value, seenValues); + default: + return String(value); + } + } + function formatObjectValue2(value, previouslySeenValues) { + if (value === null) { + return "null"; + } + if (previouslySeenValues.includes(value)) { + return "[Circular]"; + } + const seenValues = [...previouslySeenValues, value]; + if (isJSONable2(value)) { + const jsonValue = value.toJSON(); + if (jsonValue !== value) { + return typeof jsonValue === "string" ? jsonValue : formatValue2(jsonValue, seenValues); + } + } else if (Array.isArray(value)) { + return formatArray2(value, seenValues); + } + return formatObject2(value, seenValues); + } + function isJSONable2(value) { + return typeof value.toJSON === "function"; + } + function formatObject2(object, seenValues) { + const entries = Object.entries(object); + if (entries.length === 0) { + return "{}"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH2) { + return "[" + getObjectTag2(object) + "]"; + } + const properties = entries.map( + ([key, value]) => key + ": " + formatValue2(value, seenValues) + ); + return "{ " + properties.join(", ") + " }"; + } + function formatArray2(array, seenValues) { + if (array.length === 0) { + return "[]"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH2) { + return "[Array]"; + } + const len = Math.min(MAX_ARRAY_LENGTH2, array.length); + const remaining = array.length - len; + const items = []; + for (let i = 0; i < len; ++i) { + items.push(formatValue2(array[i], seenValues)); + } + if (remaining === 1) { + items.push("... 1 more item"); + } else if (remaining > 1) { + items.push(`... ${remaining} more items`); + } + return "[" + items.join(", ") + "]"; + } + function getObjectTag2(object) { + const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, ""); + if (tag === "Object" && typeof object.constructor === "function") { + const name2 = object.constructor.name; + if (typeof name2 === "string" && name2 !== "") { + return name2; + } + } + return tag; + } + } + }); + + // node_modules/graphql/jsutils/invariant.js + var require_invariant = __commonJS({ + "node_modules/graphql/jsutils/invariant.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.invariant = invariant3; + function invariant3(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error( + message != null ? message : "Unexpected invariant triggered." + ); + } + } + } + }); + + // node_modules/graphql/language/directiveLocation.js + var require_directiveLocation = __commonJS({ + "node_modules/graphql/language/directiveLocation.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.DirectiveLocation = void 0; + var DirectiveLocation2; + exports.DirectiveLocation = DirectiveLocation2; + (function(DirectiveLocation3) { + DirectiveLocation3["QUERY"] = "QUERY"; + DirectiveLocation3["MUTATION"] = "MUTATION"; + DirectiveLocation3["SUBSCRIPTION"] = "SUBSCRIPTION"; + DirectiveLocation3["FIELD"] = "FIELD"; + DirectiveLocation3["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION"; + DirectiveLocation3["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD"; + DirectiveLocation3["INLINE_FRAGMENT"] = "INLINE_FRAGMENT"; + DirectiveLocation3["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION"; + DirectiveLocation3["SCHEMA"] = "SCHEMA"; + DirectiveLocation3["SCALAR"] = "SCALAR"; + DirectiveLocation3["OBJECT"] = "OBJECT"; + DirectiveLocation3["FIELD_DEFINITION"] = "FIELD_DEFINITION"; + DirectiveLocation3["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION"; + DirectiveLocation3["INTERFACE"] = "INTERFACE"; + DirectiveLocation3["UNION"] = "UNION"; + DirectiveLocation3["ENUM"] = "ENUM"; + DirectiveLocation3["ENUM_VALUE"] = "ENUM_VALUE"; + DirectiveLocation3["INPUT_OBJECT"] = "INPUT_OBJECT"; + DirectiveLocation3["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION"; + })(DirectiveLocation2 || (exports.DirectiveLocation = DirectiveLocation2 = {})); + } + }); + + // node_modules/graphql/language/characterClasses.js + var require_characterClasses = __commonJS({ + "node_modules/graphql/language/characterClasses.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isDigit = isDigit3; + exports.isLetter = isLetter2; + exports.isNameContinue = isNameContinue2; + exports.isNameStart = isNameStart2; + exports.isWhiteSpace = isWhiteSpace2; + function isWhiteSpace2(code) { + return code === 9 || code === 32; + } + function isDigit3(code) { + return code >= 48 && code <= 57; + } + function isLetter2(code) { + return code >= 97 && code <= 122 || // A-Z + code >= 65 && code <= 90; + } + function isNameStart2(code) { + return isLetter2(code) || code === 95; + } + function isNameContinue2(code) { + return isLetter2(code) || isDigit3(code) || code === 95; + } + } + }); + + // node_modules/graphql/language/blockString.js + var require_blockString = __commonJS({ + "node_modules/graphql/language/blockString.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.dedentBlockStringLines = dedentBlockStringLines2; + exports.isPrintableAsBlockString = isPrintableAsBlockString; + exports.printBlockString = printBlockString2; + var _characterClasses = require_characterClasses(); + function dedentBlockStringLines2(lines) { + var _firstNonEmptyLine2; + let commonIndent = Number.MAX_SAFE_INTEGER; + let firstNonEmptyLine = null; + let lastNonEmptyLine = -1; + for (let i = 0; i < lines.length; ++i) { + var _firstNonEmptyLine; + const line = lines[i]; + const indent2 = leadingWhitespace2(line); + if (indent2 === line.length) { + continue; + } + firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; + lastNonEmptyLine = i; + if (i !== 0 && indent2 < commonIndent) { + commonIndent = indent2; + } + } + return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice( + (_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, + lastNonEmptyLine + 1 + ); + } + function leadingWhitespace2(str) { + let i = 0; + while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) { + ++i; + } + return i; + } + function isPrintableAsBlockString(value) { + if (value === "") { + return true; + } + let isEmptyLine = true; + let hasIndent = false; + let hasCommonIndent = true; + let seenNonEmptyLine = false; + for (let i = 0; i < value.length; ++i) { + switch (value.codePointAt(i)) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 11: + case 12: + case 14: + case 15: + return false; + case 13: + return false; + case 10: + if (isEmptyLine && !seenNonEmptyLine) { + return false; + } + seenNonEmptyLine = true; + isEmptyLine = true; + hasIndent = false; + break; + case 9: + case 32: + hasIndent || (hasIndent = isEmptyLine); + break; + default: + hasCommonIndent && (hasCommonIndent = hasIndent); + isEmptyLine = false; + } + } + if (isEmptyLine) { + return false; + } + if (hasCommonIndent && seenNonEmptyLine) { + return false; + } + return true; + } + function printBlockString2(value, options) { + const escapedValue = value.replace(/"""/g, '\\"""'); + const lines = escapedValue.split(/\r\n|[\n\r]/g); + const isSingleLine = lines.length === 1; + const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every( + (line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)) + ); + const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); + const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; + const hasTrailingSlash = value.endsWith("\\"); + const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; + const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability + (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); + let result = ""; + const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0)); + if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { + result += "\n"; + } + result += escapedValue; + if (printAsMultipleLines || forceTrailingNewline) { + result += "\n"; + } + return '"""' + result + '"""'; + } + } + }); + + // node_modules/graphql/language/printString.js + var require_printString = __commonJS({ + "node_modules/graphql/language/printString.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.printString = printString2; + function printString2(str) { + return `"${str.replace(escapedRegExp2, escapedReplacer2)}"`; + } + var escapedRegExp2 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; + function escapedReplacer2(str) { + return escapeSequences2[str.charCodeAt(0)]; + } + var escapeSequences2 = [ + "\\u0000", + "\\u0001", + "\\u0002", + "\\u0003", + "\\u0004", + "\\u0005", + "\\u0006", + "\\u0007", + "\\b", + "\\t", + "\\n", + "\\u000B", + "\\f", + "\\r", + "\\u000E", + "\\u000F", + "\\u0010", + "\\u0011", + "\\u0012", + "\\u0013", + "\\u0014", + "\\u0015", + "\\u0016", + "\\u0017", + "\\u0018", + "\\u0019", + "\\u001A", + "\\u001B", + "\\u001C", + "\\u001D", + "\\u001E", + "\\u001F", + "", + "", + '\\"', + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 2F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 3F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 4F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\\\", + "", + "", + "", + // 5F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 6F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\u007F", + "\\u0080", + "\\u0081", + "\\u0082", + "\\u0083", + "\\u0084", + "\\u0085", + "\\u0086", + "\\u0087", + "\\u0088", + "\\u0089", + "\\u008A", + "\\u008B", + "\\u008C", + "\\u008D", + "\\u008E", + "\\u008F", + "\\u0090", + "\\u0091", + "\\u0092", + "\\u0093", + "\\u0094", + "\\u0095", + "\\u0096", + "\\u0097", + "\\u0098", + "\\u0099", + "\\u009A", + "\\u009B", + "\\u009C", + "\\u009D", + "\\u009E", + "\\u009F" + ]; + } + }); + + // node_modules/graphql/jsutils/devAssert.js + var require_devAssert = __commonJS({ + "node_modules/graphql/jsutils/devAssert.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.devAssert = devAssert2; + function devAssert2(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message); + } + } + } + }); + + // node_modules/graphql/language/ast.js + var require_ast = __commonJS({ + "node_modules/graphql/language/ast.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0; + exports.isNode = isNode2; + var Location3 = class { + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The Token at which this Node begins. + */ + /** + * The Token at which this Node ends. + */ + /** + * The Source document the AST represents. + */ + constructor(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + get [Symbol.toStringTag]() { + return "Location"; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } + }; + exports.Location = Location3; + var Token3 = class { + /** + * The kind of Token. + */ + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The 1-indexed line number on which this Token appears. + */ + /** + * The 1-indexed column number at which this Token begins. + */ + /** + * For non-punctuation tokens, represents the interpreted value of the token. + * + * Note: is undefined for punctuation tokens, but typed as string for + * convenience in the parser. + */ + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + constructor(kind, start, end, line, column, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; + this.value = value; + this.prev = null; + this.next = null; + } + get [Symbol.toStringTag]() { + return "Token"; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } + }; + exports.Token = Token3; + var QueryDocumentKeys2 = { + Name: [], + Document: ["definitions"], + OperationDefinition: [ + "name", + "variableDefinitions", + "directives", + "selectionSet" + ], + VariableDefinition: ["variable", "type", "defaultValue", "directives"], + Variable: ["name"], + SelectionSet: ["selections"], + Field: ["alias", "name", "arguments", "directives", "selectionSet"], + Argument: ["name", "value"], + FragmentSpread: ["name", "directives"], + InlineFragment: ["typeCondition", "directives", "selectionSet"], + FragmentDefinition: [ + "name", + // Note: fragment variable definitions are deprecated and will removed in v17.0.0 + "variableDefinitions", + "typeCondition", + "directives", + "selectionSet" + ], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ["values"], + ObjectValue: ["fields"], + ObjectField: ["name", "value"], + Directive: ["name", "arguments"], + NamedType: ["name"], + ListType: ["type"], + NonNullType: ["type"], + SchemaDefinition: ["description", "directives", "operationTypes"], + OperationTypeDefinition: ["type"], + ScalarTypeDefinition: ["description", "name", "directives"], + ObjectTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + FieldDefinition: ["description", "name", "arguments", "type", "directives"], + InputValueDefinition: [ + "description", + "name", + "type", + "defaultValue", + "directives" + ], + InterfaceTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeDefinition: ["description", "name", "directives", "types"], + EnumTypeDefinition: ["description", "name", "directives", "values"], + EnumValueDefinition: ["description", "name", "directives"], + InputObjectTypeDefinition: ["description", "name", "directives", "fields"], + DirectiveDefinition: ["description", "name", "arguments", "locations"], + SchemaExtension: ["directives", "operationTypes"], + ScalarTypeExtension: ["name", "directives"], + ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], + InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], + UnionTypeExtension: ["name", "directives", "types"], + EnumTypeExtension: ["name", "directives", "values"], + InputObjectTypeExtension: ["name", "directives", "fields"] + }; + exports.QueryDocumentKeys = QueryDocumentKeys2; + var kindValues2 = new Set(Object.keys(QueryDocumentKeys2)); + function isNode2(maybeNode) { + const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; + return typeof maybeKind === "string" && kindValues2.has(maybeKind); + } + var OperationTypeNode2; + exports.OperationTypeNode = OperationTypeNode2; + (function(OperationTypeNode3) { + OperationTypeNode3["QUERY"] = "query"; + OperationTypeNode3["MUTATION"] = "mutation"; + OperationTypeNode3["SUBSCRIPTION"] = "subscription"; + })(OperationTypeNode2 || (exports.OperationTypeNode = OperationTypeNode2 = {})); + } + }); + + // node_modules/graphql/language/kinds.js + var require_kinds = __commonJS({ + "node_modules/graphql/language/kinds.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.Kind = void 0; + var Kind2; + exports.Kind = Kind2; + (function(Kind3) { + Kind3["NAME"] = "Name"; + Kind3["DOCUMENT"] = "Document"; + Kind3["OPERATION_DEFINITION"] = "OperationDefinition"; + Kind3["VARIABLE_DEFINITION"] = "VariableDefinition"; + Kind3["SELECTION_SET"] = "SelectionSet"; + Kind3["FIELD"] = "Field"; + Kind3["ARGUMENT"] = "Argument"; + Kind3["FRAGMENT_SPREAD"] = "FragmentSpread"; + Kind3["INLINE_FRAGMENT"] = "InlineFragment"; + Kind3["FRAGMENT_DEFINITION"] = "FragmentDefinition"; + Kind3["VARIABLE"] = "Variable"; + Kind3["INT"] = "IntValue"; + Kind3["FLOAT"] = "FloatValue"; + Kind3["STRING"] = "StringValue"; + Kind3["BOOLEAN"] = "BooleanValue"; + Kind3["NULL"] = "NullValue"; + Kind3["ENUM"] = "EnumValue"; + Kind3["LIST"] = "ListValue"; + Kind3["OBJECT"] = "ObjectValue"; + Kind3["OBJECT_FIELD"] = "ObjectField"; + Kind3["DIRECTIVE"] = "Directive"; + Kind3["NAMED_TYPE"] = "NamedType"; + Kind3["LIST_TYPE"] = "ListType"; + Kind3["NON_NULL_TYPE"] = "NonNullType"; + Kind3["SCHEMA_DEFINITION"] = "SchemaDefinition"; + Kind3["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition"; + Kind3["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition"; + Kind3["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition"; + Kind3["FIELD_DEFINITION"] = "FieldDefinition"; + Kind3["INPUT_VALUE_DEFINITION"] = "InputValueDefinition"; + Kind3["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition"; + Kind3["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition"; + Kind3["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition"; + Kind3["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition"; + Kind3["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition"; + Kind3["DIRECTIVE_DEFINITION"] = "DirectiveDefinition"; + Kind3["SCHEMA_EXTENSION"] = "SchemaExtension"; + Kind3["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension"; + Kind3["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension"; + Kind3["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension"; + Kind3["UNION_TYPE_EXTENSION"] = "UnionTypeExtension"; + Kind3["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension"; + Kind3["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension"; + })(Kind2 || (exports.Kind = Kind2 = {})); + } + }); + + // node_modules/graphql/language/visitor.js + var require_visitor = __commonJS({ + "node_modules/graphql/language/visitor.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.BREAK = void 0; + exports.getEnterLeaveForKind = getEnterLeaveForKind2; + exports.getVisitFn = getVisitFn2; + exports.visit = visit2; + exports.visitInParallel = visitInParallel2; + var _devAssert = require_devAssert(); + var _inspect = require_inspect(); + var _ast = require_ast(); + var _kinds = require_kinds(); + var BREAK2 = Object.freeze({}); + exports.BREAK = BREAK2; + function visit2(root, visitor, visitorKeys = _ast.QueryDocumentKeys) { + const enterLeaveMap = /* @__PURE__ */ new Map(); + for (const kind of Object.values(_kinds.Kind)) { + enterLeaveMap.set(kind, getEnterLeaveForKind2(visitor, kind)); + } + let stack = void 0; + let inArray = Array.isArray(root); + let keys = [root]; + let index = -1; + let edits = []; + let node = root; + let key = void 0; + let parent = void 0; + const path = []; + const ancestors = []; + do { + index++; + const isLeaving = index === keys.length; + const isEdited = isLeaving && edits.length !== 0; + if (isLeaving) { + key = ancestors.length === 0 ? void 0 : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + if (isEdited) { + if (inArray) { + node = node.slice(); + let editOffset = 0; + for (const [editKey, editValue] of edits) { + const arrayKey = editKey - editOffset; + if (editValue === null) { + node.splice(arrayKey, 1); + editOffset++; + } else { + node[arrayKey] = editValue; + } + } + } else { + node = Object.defineProperties( + {}, + Object.getOwnPropertyDescriptors(node) + ); + for (const [editKey, editValue] of edits) { + node[editKey] = editValue; + } + } + } + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else if (parent) { + key = inArray ? index : keys[index]; + node = parent[key]; + if (node === null || node === void 0) { + continue; + } + path.push(key); + } + let result; + if (!Array.isArray(node)) { + var _enterLeaveMap$get, _enterLeaveMap$get2; + (0, _ast.isNode)(node) || (0, _devAssert.devAssert)( + false, + `Invalid AST Node: ${(0, _inspect.inspect)(node)}.` + ); + const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; + result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); + if (result === BREAK2) { + break; + } + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== void 0) { + edits.push([key, result]); + if (!isLeaving) { + if ((0, _ast.isNode)(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + if (result === void 0 && isEdited) { + edits.push([key, node]); + } + if (isLeaving) { + path.pop(); + } else { + var _node$kind; + stack = { + inArray, + index, + keys, + edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; + index = -1; + edits = []; + if (parent) { + ancestors.push(parent); + } + parent = node; + } + } while (stack !== void 0); + if (edits.length !== 0) { + return edits[edits.length - 1][1]; + } + return root; + } + function visitInParallel2(visitors) { + const skipping = new Array(visitors.length).fill(null); + const mergedVisitor = /* @__PURE__ */ Object.create(null); + for (const kind of Object.values(_kinds.Kind)) { + let hasVisitor = false; + const enterList = new Array(visitors.length).fill(void 0); + const leaveList = new Array(visitors.length).fill(void 0); + for (let i = 0; i < visitors.length; ++i) { + const { enter, leave } = getEnterLeaveForKind2(visitors[i], kind); + hasVisitor || (hasVisitor = enter != null || leave != null); + enterList[i] = enter; + leaveList[i] = leave; + } + if (!hasVisitor) { + continue; + } + const mergedEnterLeave = { + enter(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _enterList$i; + const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); + if (result === false) { + skipping[i] = node; + } else if (result === BREAK2) { + skipping[i] = BREAK2; + } else if (result !== void 0) { + return result; + } + } + } + }, + leave(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _leaveList$i; + const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); + if (result === BREAK2) { + skipping[i] = BREAK2; + } else if (result !== void 0 && result !== false) { + return result; + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; + mergedVisitor[kind] = mergedEnterLeave; + } + return mergedVisitor; + } + function getEnterLeaveForKind2(visitor, kind) { + const kindVisitor = visitor[kind]; + if (typeof kindVisitor === "object") { + return kindVisitor; + } else if (typeof kindVisitor === "function") { + return { + enter: kindVisitor, + leave: void 0 + }; + } + return { + enter: visitor.enter, + leave: visitor.leave + }; + } + function getVisitFn2(visitor, kind, isLeaving) { + const { enter, leave } = getEnterLeaveForKind2(visitor, kind); + return isLeaving ? leave : enter; + } + } + }); + + // node_modules/graphql/language/printer.js + var require_printer = __commonJS({ + "node_modules/graphql/language/printer.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.print = print2; + var _blockString = require_blockString(); + var _printString = require_printString(); + var _visitor = require_visitor(); + function print2(ast) { + return (0, _visitor.visit)(ast, printDocASTReducer2); + } + var MAX_LINE_LENGTH2 = 80; + var printDocASTReducer2 = { + Name: { + leave: (node) => node.value + }, + Variable: { + leave: (node) => "$" + node.name + }, + // Document + Document: { + leave: (node) => join3(node.definitions, "\n\n") + }, + OperationDefinition: { + leave(node) { + const varDefs = wrap2("(", join3(node.variableDefinitions, ", "), ")"); + const prefix = join3( + [ + node.operation, + join3([node.name, varDefs]), + join3(node.directives, " ") + ], + " " + ); + return (prefix === "query" ? "" : prefix + " ") + node.selectionSet; + } + }, + VariableDefinition: { + leave: ({ variable, type: type2, defaultValue, directives }) => variable + ": " + type2 + wrap2(" = ", defaultValue) + wrap2(" ", join3(directives, " ")) + }, + SelectionSet: { + leave: ({ selections }) => block2(selections) + }, + Field: { + leave({ alias, name: name2, arguments: args, directives, selectionSet }) { + const prefix = wrap2("", alias, ": ") + name2; + let argsLine = prefix + wrap2("(", join3(args, ", "), ")"); + if (argsLine.length > MAX_LINE_LENGTH2) { + argsLine = prefix + wrap2("(\n", indent2(join3(args, "\n")), "\n)"); + } + return join3([argsLine, join3(directives, " "), selectionSet], " "); + } + }, + Argument: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Fragments + FragmentSpread: { + leave: ({ name: name2, directives }) => "..." + name2 + wrap2(" ", join3(directives, " ")) + }, + InlineFragment: { + leave: ({ typeCondition, directives, selectionSet }) => join3( + [ + "...", + wrap2("on ", typeCondition), + join3(directives, " "), + selectionSet + ], + " " + ) + }, + FragmentDefinition: { + leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => ( + // or removed in the future. + `fragment ${name2}${wrap2("(", join3(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join3(directives, " "), " ")}` + selectionSet + ) + }, + // Value + IntValue: { + leave: ({ value }) => value + }, + FloatValue: { + leave: ({ value }) => value + }, + StringValue: { + leave: ({ value, block: isBlockString }) => isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value) + }, + BooleanValue: { + leave: ({ value }) => value ? "true" : "false" + }, + NullValue: { + leave: () => "null" + }, + EnumValue: { + leave: ({ value }) => value + }, + ListValue: { + leave: ({ values }) => "[" + join3(values, ", ") + "]" + }, + ObjectValue: { + leave: ({ fields }) => "{" + join3(fields, ", ") + "}" + }, + ObjectField: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Directive + Directive: { + leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap2("(", join3(args, ", "), ")") + }, + // Type + NamedType: { + leave: ({ name: name2 }) => name2 + }, + ListType: { + leave: ({ type: type2 }) => "[" + type2 + "]" + }, + NonNullType: { + leave: ({ type: type2 }) => type2 + "!" + }, + // Type System Definitions + SchemaDefinition: { + leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") + join3(["schema", join3(directives, " "), block2(operationTypes)], " ") + }, + OperationTypeDefinition: { + leave: ({ operation, type: type2 }) => operation + ": " + type2 + }, + ScalarTypeDefinition: { + leave: ({ description, name: name2, directives }) => wrap2("", description, "\n") + join3(["scalar", name2, join3(directives, " ")], " ") + }, + ObjectTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap2("", description, "\n") + join3( + [ + "type", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + FieldDefinition: { + leave: ({ description, name: name2, arguments: args, type: type2, directives }) => wrap2("", description, "\n") + name2 + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join3(args, "\n")), "\n)") : wrap2("(", join3(args, ", "), ")")) + ": " + type2 + wrap2(" ", join3(directives, " ")) + }, + InputValueDefinition: { + leave: ({ description, name: name2, type: type2, defaultValue, directives }) => wrap2("", description, "\n") + join3( + [name2 + ": " + type2, wrap2("= ", defaultValue), join3(directives, " ")], + " " + ) + }, + InterfaceTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap2("", description, "\n") + join3( + [ + "interface", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + UnionTypeDefinition: { + leave: ({ description, name: name2, directives, types }) => wrap2("", description, "\n") + join3( + ["union", name2, join3(directives, " "), wrap2("= ", join3(types, " | "))], + " " + ) + }, + EnumTypeDefinition: { + leave: ({ description, name: name2, directives, values }) => wrap2("", description, "\n") + join3(["enum", name2, join3(directives, " "), block2(values)], " ") + }, + EnumValueDefinition: { + leave: ({ description, name: name2, directives }) => wrap2("", description, "\n") + join3([name2, join3(directives, " ")], " ") + }, + InputObjectTypeDefinition: { + leave: ({ description, name: name2, directives, fields }) => wrap2("", description, "\n") + join3(["input", name2, join3(directives, " "), block2(fields)], " ") + }, + DirectiveDefinition: { + leave: ({ description, name: name2, arguments: args, repeatable, locations }) => wrap2("", description, "\n") + "directive @" + name2 + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join3(args, "\n")), "\n)") : wrap2("(", join3(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join3(locations, " | ") + }, + SchemaExtension: { + leave: ({ directives, operationTypes }) => join3( + ["extend schema", join3(directives, " "), block2(operationTypes)], + " " + ) + }, + ScalarTypeExtension: { + leave: ({ name: name2, directives }) => join3(["extend scalar", name2, join3(directives, " ")], " ") + }, + ObjectTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join3( + [ + "extend type", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + InterfaceTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join3( + [ + "extend interface", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + UnionTypeExtension: { + leave: ({ name: name2, directives, types }) => join3( + [ + "extend union", + name2, + join3(directives, " "), + wrap2("= ", join3(types, " | ")) + ], + " " + ) + }, + EnumTypeExtension: { + leave: ({ name: name2, directives, values }) => join3(["extend enum", name2, join3(directives, " "), block2(values)], " ") + }, + InputObjectTypeExtension: { + leave: ({ name: name2, directives, fields }) => join3(["extend input", name2, join3(directives, " "), block2(fields)], " ") + } + }; + function join3(maybeArray, separator = "") { + var _maybeArray$filter$jo; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ""; + } + function block2(array) { + return wrap2("{\n", indent2(join3(array, "\n")), "\n}"); + } + function wrap2(start, maybeString, end = "") { + return maybeString != null && maybeString !== "" ? start + maybeString + end : ""; + } + function indent2(str) { + return wrap2(" ", str.replace(/\n/g, "\n ")); + } + function hasMultilineItems2(maybeArray) { + var _maybeArray$some; + return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; + } + } + }); + + // node_modules/graphql/jsutils/isIterableObject.js + var require_isIterableObject = __commonJS({ + "node_modules/graphql/jsutils/isIterableObject.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isIterableObject = isIterableObject2; + function isIterableObject2(maybeIterable) { + return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === "function"; + } + } + }); + + // node_modules/graphql/jsutils/isObjectLike.js + var require_isObjectLike = __commonJS({ + "node_modules/graphql/jsutils/isObjectLike.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isObjectLike = isObjectLike2; + function isObjectLike2(value) { + return typeof value == "object" && value !== null; + } + } + }); + + // node_modules/graphql/jsutils/didYouMean.js + var require_didYouMean = __commonJS({ + "node_modules/graphql/jsutils/didYouMean.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.didYouMean = didYouMean2; + var MAX_SUGGESTIONS2 = 5; + function didYouMean2(firstArg, secondArg) { + const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg]; + let message = " Did you mean "; + if (subMessage) { + message += subMessage + " "; + } + const suggestions = suggestionsArg.map((x) => `"${x}"`); + switch (suggestions.length) { + case 0: + return ""; + case 1: + return message + suggestions[0] + "?"; + case 2: + return message + suggestions[0] + " or " + suggestions[1] + "?"; + } + const selected = suggestions.slice(0, MAX_SUGGESTIONS2); + const lastItem = selected.pop(); + return message + selected.join(", ") + ", or " + lastItem + "?"; + } + } + }); + + // node_modules/graphql/jsutils/identityFunc.js + var require_identityFunc = __commonJS({ + "node_modules/graphql/jsutils/identityFunc.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.identityFunc = identityFunc2; + function identityFunc2(x) { + return x; + } + } + }); + + // node_modules/graphql/jsutils/instanceOf.js + var require_instanceOf = __commonJS({ + "node_modules/graphql/jsutils/instanceOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.instanceOf = void 0; + var _inspect = require_inspect(); + var instanceOf4 = ( + /* c8 ignore next 6 */ + // FIXME: https://github.com/graphql/graphql-js/issues/2317 + globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf5(value, constructor) { + return value instanceof constructor; + } : function instanceOf5(value, constructor) { + if (value instanceof constructor) { + return true; + } + if (typeof value === "object" && value !== null) { + var _value$constructor; + const className = constructor.prototype[Symbol.toStringTag]; + const valueClassName = ( + // We still need to support constructor's name to detect conflicts with older versions of this library. + Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name + ); + if (className === valueClassName) { + const stringifiedValue = (0, _inspect.inspect)(value); + throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); + } + } + return false; + } + ); + exports.instanceOf = instanceOf4; + } + }); + + // node_modules/graphql/jsutils/keyMap.js + var require_keyMap = __commonJS({ + "node_modules/graphql/jsutils/keyMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.keyMap = keyMap2; + function keyMap2(list2, keyFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = item; + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/keyValMap.js + var require_keyValMap = __commonJS({ + "node_modules/graphql/jsutils/keyValMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.keyValMap = keyValMap2; + function keyValMap2(list2, keyFn, valFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = valFn(item); + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/mapValue.js + var require_mapValue = __commonJS({ + "node_modules/graphql/jsutils/mapValue.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.mapValue = mapValue2; + function mapValue2(map, fn) { + const result = /* @__PURE__ */ Object.create(null); + for (const key of Object.keys(map)) { + result[key] = fn(map[key], key); + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/naturalCompare.js + var require_naturalCompare = __commonJS({ + "node_modules/graphql/jsutils/naturalCompare.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.naturalCompare = naturalCompare2; + function naturalCompare2(aStr, bStr) { + let aIndex = 0; + let bIndex = 0; + while (aIndex < aStr.length && bIndex < bStr.length) { + let aChar = aStr.charCodeAt(aIndex); + let bChar = bStr.charCodeAt(bIndex); + if (isDigit3(aChar) && isDigit3(bChar)) { + let aNum = 0; + do { + ++aIndex; + aNum = aNum * 10 + aChar - DIGIT_02; + aChar = aStr.charCodeAt(aIndex); + } while (isDigit3(aChar) && aNum > 0); + let bNum = 0; + do { + ++bIndex; + bNum = bNum * 10 + bChar - DIGIT_02; + bChar = bStr.charCodeAt(bIndex); + } while (isDigit3(bChar) && bNum > 0); + if (aNum < bNum) { + return -1; + } + if (aNum > bNum) { + return 1; + } + } else { + if (aChar < bChar) { + return -1; + } + if (aChar > bChar) { + return 1; + } + ++aIndex; + ++bIndex; + } + } + return aStr.length - bStr.length; + } + var DIGIT_02 = 48; + var DIGIT_92 = 57; + function isDigit3(code) { + return !isNaN(code) && DIGIT_02 <= code && code <= DIGIT_92; + } + } + }); + + // node_modules/graphql/jsutils/suggestionList.js + var require_suggestionList = __commonJS({ + "node_modules/graphql/jsutils/suggestionList.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.suggestionList = suggestionList2; + var _naturalCompare = require_naturalCompare(); + function suggestionList2(input, options) { + const optionsByDistance = /* @__PURE__ */ Object.create(null); + const lexicalDistance2 = new LexicalDistance2(input); + const threshold = Math.floor(input.length * 0.4) + 1; + for (const option of options) { + const distance = lexicalDistance2.measure(option, threshold); + if (distance !== void 0) { + optionsByDistance[option] = distance; + } + } + return Object.keys(optionsByDistance).sort((a, b) => { + const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b); + }); + } + var LexicalDistance2 = class { + constructor(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray2(this._inputLowerCase); + this._rows = [ + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0) + ]; + } + measure(option, threshold) { + if (this._input === option) { + return 0; + } + const optionLowerCase = option.toLowerCase(); + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + let a = stringToArray2(optionLowerCase); + let b = this._inputArray; + if (a.length < b.length) { + const tmp = a; + a = b; + b = tmp; + } + const aLength = a.length; + const bLength = b.length; + if (aLength - bLength > threshold) { + return void 0; + } + const rows = this._rows; + for (let j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + for (let i = 1; i <= aLength; i++) { + const upRow = rows[(i - 1) % 3]; + const currentRow = rows[i % 3]; + let smallestCell = currentRow[0] = i; + for (let j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + let currentCell = Math.min( + upRow[j] + 1, + // delete + currentRow[j - 1] + 1, + // insert + upRow[j - 1] + cost + // substitute + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + currentRow[j] = currentCell; + } + if (smallestCell > threshold) { + return void 0; + } + } + const distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : void 0; + } + }; + function stringToArray2(str) { + const strLength = str.length; + const array = new Array(strLength); + for (let i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + return array; + } + } + }); + + // node_modules/graphql/jsutils/toObjMap.js + var require_toObjMap = __commonJS({ + "node_modules/graphql/jsutils/toObjMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.toObjMap = toObjMap2; + function toObjMap2(obj) { + if (obj == null) { + return /* @__PURE__ */ Object.create(null); + } + if (Object.getPrototypeOf(obj) === null) { + return obj; + } + const map = /* @__PURE__ */ Object.create(null); + for (const [key, value] of Object.entries(obj)) { + map[key] = value; + } + return map; + } + } + }); + + // node_modules/graphql/language/location.js + var require_location = __commonJS({ + "node_modules/graphql/language/location.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.getLocation = getLocation3; + var _invariant = require_invariant(); + var LineRegExp2 = /\r\n|[\n\r]/g; + function getLocation3(source, position) { + let lastLineStart = 0; + let line = 1; + for (const match of source.body.matchAll(LineRegExp2)) { + typeof match.index === "number" || (0, _invariant.invariant)(false); + if (match.index >= position) { + break; + } + lastLineStart = match.index + match[0].length; + line += 1; + } + return { + line, + column: position + 1 - lastLineStart + }; + } + } + }); + + // node_modules/graphql/language/printLocation.js + var require_printLocation = __commonJS({ + "node_modules/graphql/language/printLocation.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.printLocation = printLocation2; + exports.printSourceLocation = printSourceLocation2; + var _location = require_location(); + function printLocation2(location) { + return printSourceLocation2( + location.source, + (0, _location.getLocation)(location.source, location.start) + ); + } + function printSourceLocation2(source, sourceLocation) { + const firstLineColumnOffset = source.locationOffset.column - 1; + const body = "".padStart(firstLineColumnOffset) + source.body; + const lineIndex = sourceLocation.line - 1; + const lineOffset = source.locationOffset.line - 1; + const lineNum = sourceLocation.line + lineOffset; + const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + const columnNum = sourceLocation.column + columnOffset; + const locationStr = `${source.name}:${lineNum}:${columnNum} +`; + const lines = body.split(/\r\n|[\n\r]/g); + const locationLine = lines[lineIndex]; + if (locationLine.length > 120) { + const subLineIndex = Math.floor(columnNum / 80); + const subLineColumnNum = columnNum % 80; + const subLines = []; + for (let i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); + } + return locationStr + printPrefixedLines2([ + [`${lineNum} |`, subLines[0]], + ...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]), + ["|", "^".padStart(subLineColumnNum)], + ["|", subLines[subLineIndex + 1]] + ]); + } + return locationStr + printPrefixedLines2([ + // Lines specified like this: ["prefix", "string"], + [`${lineNum - 1} |`, lines[lineIndex - 1]], + [`${lineNum} |`, locationLine], + ["|", "^".padStart(columnNum)], + [`${lineNum + 1} |`, lines[lineIndex + 1]] + ]); + } + function printPrefixedLines2(lines) { + const existingLines = lines.filter(([_, line]) => line !== void 0); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n"); + } + } + }); + + // node_modules/graphql/error/GraphQLError.js + var require_GraphQLError = __commonJS({ + "node_modules/graphql/error/GraphQLError.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLError = void 0; + exports.formatError = formatError2; + exports.printError = printError2; + var _isObjectLike = require_isObjectLike(); + var _location = require_location(); + var _printLocation = require_printLocation(); + function toNormalizedOptions2(args) { + const firstArg = args[0]; + if (firstArg == null || "kind" in firstArg || "length" in firstArg) { + return { + nodes: firstArg, + source: args[1], + positions: args[2], + path: args[3], + originalError: args[4], + extensions: args[5] + }; + } + return firstArg; + } + var GraphQLError2 = class _GraphQLError extends Error { + /** + * An array of `{ line, column }` locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + /** + * The original error thrown from a field resolver during execution. + */ + /** + * Extension fields to add to the formatted error. + */ + /** + * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. + */ + constructor(message, ...rawArgs) { + var _this$nodes, _nodeLocations$, _ref; + const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions2(rawArgs); + super(message); + this.name = "GraphQLError"; + this.path = path !== null && path !== void 0 ? path : void 0; + this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0; + this.nodes = undefinedIfEmpty2( + Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0 + ); + const nodeLocations = undefinedIfEmpty2( + (_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null) + ); + this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; + this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start); + this.locations = positions && source ? positions.map((pos) => (0, _location.getLocation)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map( + (loc) => (0, _location.getLocation)(loc.source, loc.start) + ); + const originalExtensions = (0, _isObjectLike.isObjectLike)( + originalError === null || originalError === void 0 ? void 0 : originalError.extensions + ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0; + this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null); + Object.defineProperties(this, { + message: { + writable: true, + enumerable: true + }, + name: { + enumerable: false + }, + nodes: { + enumerable: false + }, + source: { + enumerable: false + }, + positions: { + enumerable: false + }, + originalError: { + enumerable: false + } + }); + if (originalError !== null && originalError !== void 0 && originalError.stack) { + Object.defineProperty(this, "stack", { + value: originalError.stack, + writable: true, + configurable: true + }); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, _GraphQLError); + } else { + Object.defineProperty(this, "stack", { + value: Error().stack, + writable: true, + configurable: true + }); + } + } + get [Symbol.toStringTag]() { + return "GraphQLError"; + } + toString() { + let output = this.message; + if (this.nodes) { + for (const node of this.nodes) { + if (node.loc) { + output += "\n\n" + (0, _printLocation.printLocation)(node.loc); + } + } + } else if (this.source && this.locations) { + for (const location of this.locations) { + output += "\n\n" + (0, _printLocation.printSourceLocation)(this.source, location); + } + } + return output; + } + toJSON() { + const formattedError = { + message: this.message + }; + if (this.locations != null) { + formattedError.locations = this.locations; + } + if (this.path != null) { + formattedError.path = this.path; + } + if (this.extensions != null && Object.keys(this.extensions).length > 0) { + formattedError.extensions = this.extensions; + } + return formattedError; + } + }; + exports.GraphQLError = GraphQLError2; + function undefinedIfEmpty2(array) { + return array === void 0 || array.length === 0 ? void 0 : array; + } + function printError2(error) { + return error.toString(); + } + function formatError2(error) { + return error.toJSON(); + } + } + }); + + // node_modules/graphql/utilities/valueFromASTUntyped.js + var require_valueFromASTUntyped = __commonJS({ + "node_modules/graphql/utilities/valueFromASTUntyped.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.valueFromASTUntyped = valueFromASTUntyped2; + var _keyValMap = require_keyValMap(); + var _kinds = require_kinds(); + function valueFromASTUntyped2(valueNode, variables) { + switch (valueNode.kind) { + case _kinds.Kind.NULL: + return null; + case _kinds.Kind.INT: + return parseInt(valueNode.value, 10); + case _kinds.Kind.FLOAT: + return parseFloat(valueNode.value); + case _kinds.Kind.STRING: + case _kinds.Kind.ENUM: + case _kinds.Kind.BOOLEAN: + return valueNode.value; + case _kinds.Kind.LIST: + return valueNode.values.map( + (node) => valueFromASTUntyped2(node, variables) + ); + case _kinds.Kind.OBJECT: + return (0, _keyValMap.keyValMap)( + valueNode.fields, + (field) => field.name.value, + (field) => valueFromASTUntyped2(field.value, variables) + ); + case _kinds.Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; + } + } + } + }); + + // node_modules/graphql/type/assertName.js + var require_assertName = __commonJS({ + "node_modules/graphql/type/assertName.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.assertEnumValueName = assertEnumValueName2; + exports.assertName = assertName2; + var _devAssert = require_devAssert(); + var _GraphQLError = require_GraphQLError(); + var _characterClasses = require_characterClasses(); + function assertName2(name2) { + name2 != null || (0, _devAssert.devAssert)(false, "Must provide name."); + typeof name2 === "string" || (0, _devAssert.devAssert)(false, "Expected name to be a string."); + if (name2.length === 0) { + throw new _GraphQLError.GraphQLError( + "Expected name to be a non-empty string." + ); + } + for (let i = 1; i < name2.length; ++i) { + if (!(0, _characterClasses.isNameContinue)(name2.charCodeAt(i))) { + throw new _GraphQLError.GraphQLError( + `Names must only contain [_a-zA-Z0-9] but "${name2}" does not.` + ); + } + } + if (!(0, _characterClasses.isNameStart)(name2.charCodeAt(0))) { + throw new _GraphQLError.GraphQLError( + `Names must start with [_a-zA-Z] but "${name2}" does not.` + ); + } + return name2; + } + function assertEnumValueName2(name2) { + if (name2 === "true" || name2 === "false" || name2 === "null") { + throw new _GraphQLError.GraphQLError( + `Enum values cannot be named: ${name2}` + ); + } + return assertName2(name2); + } + } + }); + + // node_modules/graphql/type/definition.js + var require_definition = __commonJS({ + "node_modules/graphql/type/definition.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0; + exports.argsToArgsConfig = argsToArgsConfig2; + exports.assertAbstractType = assertAbstractType2; + exports.assertCompositeType = assertCompositeType2; + exports.assertEnumType = assertEnumType2; + exports.assertInputObjectType = assertInputObjectType2; + exports.assertInputType = assertInputType2; + exports.assertInterfaceType = assertInterfaceType2; + exports.assertLeafType = assertLeafType2; + exports.assertListType = assertListType2; + exports.assertNamedType = assertNamedType2; + exports.assertNonNullType = assertNonNullType2; + exports.assertNullableType = assertNullableType2; + exports.assertObjectType = assertObjectType2; + exports.assertOutputType = assertOutputType2; + exports.assertScalarType = assertScalarType2; + exports.assertType = assertType2; + exports.assertUnionType = assertUnionType2; + exports.assertWrappingType = assertWrappingType2; + exports.defineArguments = defineArguments2; + exports.getNamedType = getNamedType2; + exports.getNullableType = getNullableType2; + exports.isAbstractType = isAbstractType2; + exports.isCompositeType = isCompositeType2; + exports.isEnumType = isEnumType2; + exports.isInputObjectType = isInputObjectType2; + exports.isInputType = isInputType2; + exports.isInterfaceType = isInterfaceType2; + exports.isLeafType = isLeafType2; + exports.isListType = isListType2; + exports.isNamedType = isNamedType2; + exports.isNonNullType = isNonNullType2; + exports.isNullableType = isNullableType2; + exports.isObjectType = isObjectType2; + exports.isOutputType = isOutputType2; + exports.isRequiredArgument = isRequiredArgument2; + exports.isRequiredInputField = isRequiredInputField2; + exports.isScalarType = isScalarType2; + exports.isType = isType2; + exports.isUnionType = isUnionType2; + exports.isWrappingType = isWrappingType2; + exports.resolveObjMapThunk = resolveObjMapThunk2; + exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk2; + var _devAssert = require_devAssert(); + var _didYouMean = require_didYouMean(); + var _identityFunc = require_identityFunc(); + var _inspect = require_inspect(); + var _instanceOf = require_instanceOf(); + var _isObjectLike = require_isObjectLike(); + var _keyMap = require_keyMap(); + var _keyValMap = require_keyValMap(); + var _mapValue = require_mapValue(); + var _suggestionList = require_suggestionList(); + var _toObjMap = require_toObjMap(); + var _GraphQLError = require_GraphQLError(); + var _kinds = require_kinds(); + var _printer = require_printer(); + var _valueFromASTUntyped = require_valueFromASTUntyped(); + var _assertName = require_assertName(); + function isType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isInputObjectType2(type2) || isListType2(type2) || isNonNullType2(type2); + } + function assertType2(type2) { + if (!isType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL type.` + ); + } + return type2; + } + function isScalarType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLScalarType2); + } + function assertScalarType2(type2) { + if (!isScalarType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Scalar type.` + ); + } + return type2; + } + function isObjectType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLObjectType2); + } + function assertObjectType2(type2) { + if (!isObjectType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Object type.` + ); + } + return type2; + } + function isInterfaceType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLInterfaceType2); + } + function assertInterfaceType2(type2) { + if (!isInterfaceType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Interface type.` + ); + } + return type2; + } + function isUnionType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLUnionType2); + } + function assertUnionType2(type2) { + if (!isUnionType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Union type.` + ); + } + return type2; + } + function isEnumType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLEnumType2); + } + function assertEnumType2(type2) { + if (!isEnumType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Enum type.` + ); + } + return type2; + } + function isInputObjectType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLInputObjectType2); + } + function assertInputObjectType2(type2) { + if (!isInputObjectType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)( + type2 + )} to be a GraphQL Input Object type.` + ); + } + return type2; + } + function isListType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLList2); + } + function assertListType2(type2) { + if (!isListType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL List type.` + ); + } + return type2; + } + function isNonNullType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLNonNull2); + } + function assertNonNullType2(type2) { + if (!isNonNullType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Non-Null type.` + ); + } + return type2; + } + function isInputType2(type2) { + return isScalarType2(type2) || isEnumType2(type2) || isInputObjectType2(type2) || isWrappingType2(type2) && isInputType2(type2.ofType); + } + function assertInputType2(type2) { + if (!isInputType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL input type.` + ); + } + return type2; + } + function isOutputType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isWrappingType2(type2) && isOutputType2(type2.ofType); + } + function assertOutputType2(type2) { + if (!isOutputType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL output type.` + ); + } + return type2; + } + function isLeafType2(type2) { + return isScalarType2(type2) || isEnumType2(type2); + } + function assertLeafType2(type2) { + if (!isLeafType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL leaf type.` + ); + } + return type2; + } + function isCompositeType2(type2) { + return isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2); + } + function assertCompositeType2(type2) { + if (!isCompositeType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL composite type.` + ); + } + return type2; + } + function isAbstractType2(type2) { + return isInterfaceType2(type2) || isUnionType2(type2); + } + function assertAbstractType2(type2) { + if (!isAbstractType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL abstract type.` + ); + } + return type2; + } + var GraphQLList2 = class { + constructor(ofType) { + isType2(ofType) || (0, _devAssert.devAssert)( + false, + `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLList"; + } + toString() { + return "[" + String(this.ofType) + "]"; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLList = GraphQLList2; + var GraphQLNonNull2 = class { + constructor(ofType) { + isNullableType2(ofType) || (0, _devAssert.devAssert)( + false, + `Expected ${(0, _inspect.inspect)( + ofType + )} to be a GraphQL nullable type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLNonNull"; + } + toString() { + return String(this.ofType) + "!"; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLNonNull = GraphQLNonNull2; + function isWrappingType2(type2) { + return isListType2(type2) || isNonNullType2(type2); + } + function assertWrappingType2(type2) { + if (!isWrappingType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL wrapping type.` + ); + } + return type2; + } + function isNullableType2(type2) { + return isType2(type2) && !isNonNullType2(type2); + } + function assertNullableType2(type2) { + if (!isNullableType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL nullable type.` + ); + } + return type2; + } + function getNullableType2(type2) { + if (type2) { + return isNonNullType2(type2) ? type2.ofType : type2; + } + } + function isNamedType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isInputObjectType2(type2); + } + function assertNamedType2(type2) { + if (!isNamedType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL named type.` + ); + } + return type2; + } + function getNamedType2(type2) { + if (type2) { + let unwrappedType = type2; + while (isWrappingType2(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + return unwrappedType; + } + } + function resolveReadonlyArrayThunk2(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + function resolveObjMapThunk2(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + var GraphQLScalarType2 = class { + constructor(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; + const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.specifiedByURL = config.specifiedByURL; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc; + this.parseValue = parseValue2; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue2( + (0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables) + ); + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + config.specifiedByURL == null || typeof config.specifiedByURL === "string" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "specifiedByURL" as a string, but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.` + ); + config.serialize == null || typeof config.serialize === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.` + ); + if (config.parseLiteral) { + typeof config.parseValue === "function" && typeof config.parseLiteral === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide both "parseValue" and "parseLiteral" functions.` + ); + } + } + get [Symbol.toStringTag]() { + return "GraphQLScalarType"; + } + toConfig() { + return { + name: this.name, + description: this.description, + specifiedByURL: this.specifiedByURL, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLScalarType = GraphQLScalarType2; + var GraphQLObjectType2 = class { + constructor(config) { + var _config$extensionASTN2; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; + this._fields = () => defineFieldMap2(config); + this._interfaces = () => defineInterfaces2(config); + config.isTypeOf == null || typeof config.isTypeOf === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "isTypeOf" as a function, but got: ${(0, _inspect.inspect)(config.isTypeOf)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig2(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLObjectType = GraphQLObjectType2; + function defineInterfaces2(config) { + var _config$interfaces; + const interfaces = resolveReadonlyArrayThunk2( + (_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : [] + ); + Array.isArray(interfaces) || (0, _devAssert.devAssert)( + false, + `${config.name} interfaces must be an Array or a function which returns an Array.` + ); + return interfaces; + } + function defineFieldMap2(config) { + const fieldMap = resolveObjMapThunk2(config.fields); + isPlainObj2(fieldMap) || (0, _devAssert.devAssert)( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + var _fieldConfig$args; + isPlainObj2(fieldConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field config must be an object.` + ); + fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field resolver must be a function if provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.` + ); + const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj2(argsConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} args must be an object with argument names as keys.` + ); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + args: defineArguments2(argsConfig), + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function defineArguments2(config) { + return Object.entries(config).map(([argName, argConfig]) => ({ + name: (0, _assertName.assertName)(argName), + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(argConfig.extensions), + astNode: argConfig.astNode + })); + } + function isPlainObj2(obj) { + return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj); + } + function fieldsToFieldsConfig2(fields) { + return (0, _mapValue.mapValue)(fields, (field) => ({ + description: field.description, + type: field.type, + args: argsToArgsConfig2(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + } + function argsToArgsConfig2(args) { + return (0, _keyValMap.keyValMap)( + args, + (arg) => arg.name, + (arg) => ({ + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + }) + ); + } + function isRequiredArgument2(arg) { + return isNonNullType2(arg.type) && arg.defaultValue === void 0; + } + var GraphQLInterfaceType2 = class { + constructor(config) { + var _config$extensionASTN3; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; + this._fields = defineFieldMap2.bind(void 0, config); + this._interfaces = defineInterfaces2.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "resolveType" as a function, but got: ${(0, _inspect.inspect)(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLInterfaceType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig2(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLInterfaceType = GraphQLInterfaceType2; + var GraphQLUnionType2 = class { + constructor(config) { + var _config$extensionASTN4; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; + this._types = defineTypes2.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "resolveType" as a function, but got: ${(0, _inspect.inspect)(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLUnionType"; + } + getTypes() { + if (typeof this._types === "function") { + this._types = this._types(); + } + return this._types; + } + toConfig() { + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLUnionType = GraphQLUnionType2; + function defineTypes2(config) { + const types = resolveReadonlyArrayThunk2(config.types); + Array.isArray(types) || (0, _devAssert.devAssert)( + false, + `Must provide Array of types or a function which returns such an array for Union ${config.name}.` + ); + return types; + } + var GraphQLEnumType2 = class { + /* */ + constructor(config) { + var _config$extensionASTN5; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; + this._values = defineEnumValues2(this.name, config.values); + this._valueLookup = new Map( + this._values.map((enumValue) => [enumValue.value, enumValue]) + ); + this._nameLookup = (0, _keyMap.keyMap)(this._values, (value) => value.name); + } + get [Symbol.toStringTag]() { + return "GraphQLEnumType"; + } + getValues() { + return this._values; + } + getValue(name2) { + return this._nameLookup[name2]; + } + serialize(outputValue) { + const enumValue = this._valueLookup.get(outputValue); + if (enumValue === void 0) { + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)( + outputValue + )}` + ); + } + return enumValue.name; + } + parseValue(inputValue) { + if (typeof inputValue !== "string") { + const valueStr = (0, _inspect.inspect)(inputValue); + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue2(this, valueStr) + ); + } + const enumValue = this.getValue(inputValue); + if (enumValue == null) { + throw new _GraphQLError.GraphQLError( + `Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue2(this, inputValue) + ); + } + return enumValue.value; + } + parseLiteral(valueNode, _variables) { + if (valueNode.kind !== _kinds.Kind.ENUM) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue2(this, valueStr), + { + nodes: valueNode + } + ); + } + const enumValue = this.getValue(valueNode.value); + if (enumValue == null) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError( + `Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue2(this, valueStr), + { + nodes: valueNode + } + ); + } + return enumValue.value; + } + toConfig() { + const values = (0, _keyValMap.keyValMap)( + this.getValues(), + (value) => value.name, + (value) => ({ + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + }) + ); + return { + name: this.name, + description: this.description, + values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLEnumType = GraphQLEnumType2; + function didYouMeanEnumValue2(enumType, unknownValueStr) { + const allNames = enumType.getValues().map((value) => value.name); + const suggestedValues = (0, _suggestionList.suggestionList)( + unknownValueStr, + allNames + ); + return (0, _didYouMean.didYouMean)("the enum value", suggestedValues); + } + function defineEnumValues2(typeName, valueMap) { + isPlainObj2(valueMap) || (0, _devAssert.devAssert)( + false, + `${typeName} values must be an object with value names as keys.` + ); + return Object.entries(valueMap).map(([valueName, valueConfig]) => { + isPlainObj2(valueConfig) || (0, _devAssert.devAssert)( + false, + `${typeName}.${valueName} must refer to an object with a "value" key representing an internal value but got: ${(0, _inspect.inspect)( + valueConfig + )}.` + ); + return { + name: (0, _assertName.assertEnumValueName)(valueName), + description: valueConfig.description, + value: valueConfig.value !== void 0 ? valueConfig.value : valueName, + deprecationReason: valueConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); + } + var GraphQLInputObjectType2 = class { + constructor(config) { + var _config$extensionASTN6; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; + this._fields = defineInputFieldMap2.bind(void 0, config); + } + get [Symbol.toStringTag]() { + return "GraphQLInputObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + toConfig() { + const fields = (0, _mapValue.mapValue)(this.getFields(), (field) => ({ + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + return { + name: this.name, + description: this.description, + fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLInputObjectType = GraphQLInputObjectType2; + function defineInputFieldMap2(config) { + const fieldMap = resolveObjMapThunk2(config.fields); + isPlainObj2(fieldMap) || (0, _devAssert.devAssert)( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + !("resolve" in fieldConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.` + ); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function isRequiredInputField2(field) { + return isNonNullType2(field.type) && field.defaultValue === void 0; + } + } + }); + + // node_modules/graphql/type/scalars.js + var require_scalars = __commonJS({ + "node_modules/graphql/type/scalars.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0; + exports.isSpecifiedScalarType = isSpecifiedScalarType2; + exports.specifiedScalarTypes = void 0; + var _inspect = require_inspect(); + var _isObjectLike = require_isObjectLike(); + var _GraphQLError = require_GraphQLError(); + var _kinds = require_kinds(); + var _printer = require_printer(); + var _definition = require_definition(); + var GRAPHQL_MAX_INT2 = 2147483647; + exports.GRAPHQL_MAX_INT = GRAPHQL_MAX_INT2; + var GRAPHQL_MIN_INT2 = -2147483648; + exports.GRAPHQL_MIN_INT = GRAPHQL_MIN_INT2; + var GraphQLInt2 = new _definition.GraphQLScalarType({ + name: "Int", + description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isInteger(num)) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + } + if (num > GRAPHQL_MAX_INT2 || num < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + "Int cannot represent non 32-bit signed integer value: " + (0, _inspect.inspect)(coercedValue) + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + if (inputValue > GRAPHQL_MAX_INT2 || inputValue < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${inputValue}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + const num = parseInt(valueNode.value, 10); + if (num > GRAPHQL_MAX_INT2 || num < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, + { + nodes: valueNode + } + ); + } + return num; + } + }); + exports.GraphQLInt = GraphQLInt2; + var GraphQLFloat2 = new _definition.GraphQLScalarType({ + name: "Float", + description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isFinite(num)) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _printer.print)( + valueNode + )}`, + valueNode + ); + } + return parseFloat(valueNode.value); + } + }); + exports.GraphQLFloat = GraphQLFloat2; + var GraphQLString2 = new _definition.GraphQLScalarType({ + name: "String", + description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (typeof coercedValue === "boolean") { + return coercedValue ? "true" : "false"; + } + if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) { + return coercedValue.toString(); + } + throw new _GraphQLError.GraphQLError( + `String cannot represent value: ${(0, _inspect.inspect)(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "string") { + throw new _GraphQLError.GraphQLError( + `String cannot represent a non string value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING) { + throw new _GraphQLError.GraphQLError( + `String cannot represent a non string value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLString = GraphQLString2; + var GraphQLBoolean2 = new _definition.GraphQLScalarType({ + name: "Boolean", + description: "The `Boolean` scalar type represents `true` or `false`.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue; + } + if (Number.isFinite(coercedValue)) { + return coercedValue !== 0; + } + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "boolean") { + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.BOOLEAN) { + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLBoolean = GraphQLBoolean2; + var GraphQLID2 = new _definition.GraphQLScalarType({ + name: "ID", + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (Number.isInteger(coercedValue)) { + return String(coercedValue); + } + throw new _GraphQLError.GraphQLError( + `ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue === "string") { + return inputValue; + } + if (typeof inputValue === "number" && Number.isInteger(inputValue)) { + return inputValue.toString(); + } + throw new _GraphQLError.GraphQLError( + `ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}` + ); + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + "ID cannot represent a non-string and non-integer value: " + (0, _printer.print)(valueNode), + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLID = GraphQLID2; + var specifiedScalarTypes2 = Object.freeze([ + GraphQLString2, + GraphQLInt2, + GraphQLFloat2, + GraphQLBoolean2, + GraphQLID2 + ]); + exports.specifiedScalarTypes = specifiedScalarTypes2; + function isSpecifiedScalarType2(type2) { + return specifiedScalarTypes2.some(({ name: name2 }) => type2.name === name2); + } + function serializeObject2(outputValue) { + if ((0, _isObjectLike.isObjectLike)(outputValue)) { + if (typeof outputValue.valueOf === "function") { + const valueOfResult = outputValue.valueOf(); + if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) { + return valueOfResult; + } + } + if (typeof outputValue.toJSON === "function") { + return outputValue.toJSON(); + } + } + return outputValue; + } + } + }); + + // node_modules/graphql/utilities/astFromValue.js + var require_astFromValue = __commonJS({ + "node_modules/graphql/utilities/astFromValue.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.astFromValue = astFromValue2; + var _inspect = require_inspect(); + var _invariant = require_invariant(); + var _isIterableObject = require_isIterableObject(); + var _isObjectLike = require_isObjectLike(); + var _kinds = require_kinds(); + var _definition = require_definition(); + var _scalars = require_scalars(); + function astFromValue2(value, type2) { + if ((0, _definition.isNonNullType)(type2)) { + const astValue = astFromValue2(value, type2.ofType); + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) { + return null; + } + return astValue; + } + if (value === null) { + return { + kind: _kinds.Kind.NULL + }; + } + if (value === void 0) { + return null; + } + if ((0, _definition.isListType)(type2)) { + const itemType = type2.ofType; + if ((0, _isIterableObject.isIterableObject)(value)) { + const valuesNodes = []; + for (const item of value) { + const itemNode = astFromValue2(item, itemType); + if (itemNode != null) { + valuesNodes.push(itemNode); + } + } + return { + kind: _kinds.Kind.LIST, + values: valuesNodes + }; + } + return astFromValue2(value, itemType); + } + if ((0, _definition.isInputObjectType)(type2)) { + if (!(0, _isObjectLike.isObjectLike)(value)) { + return null; + } + const fieldNodes = []; + for (const field of Object.values(type2.getFields())) { + const fieldValue = astFromValue2(value[field.name], field.type); + if (fieldValue) { + fieldNodes.push({ + kind: _kinds.Kind.OBJECT_FIELD, + name: { + kind: _kinds.Kind.NAME, + value: field.name + }, + value: fieldValue + }); + } + } + return { + kind: _kinds.Kind.OBJECT, + fields: fieldNodes + }; + } + if ((0, _definition.isLeafType)(type2)) { + const serialized = type2.serialize(value); + if (serialized == null) { + return null; + } + if (typeof serialized === "boolean") { + return { + kind: _kinds.Kind.BOOLEAN, + value: serialized + }; + } + if (typeof serialized === "number" && Number.isFinite(serialized)) { + const stringNum = String(serialized); + return integerStringRegExp2.test(stringNum) ? { + kind: _kinds.Kind.INT, + value: stringNum + } : { + kind: _kinds.Kind.FLOAT, + value: stringNum + }; + } + if (typeof serialized === "string") { + if ((0, _definition.isEnumType)(type2)) { + return { + kind: _kinds.Kind.ENUM, + value: serialized + }; + } + if (type2 === _scalars.GraphQLID && integerStringRegExp2.test(serialized)) { + return { + kind: _kinds.Kind.INT, + value: serialized + }; + } + return { + kind: _kinds.Kind.STRING, + value: serialized + }; + } + throw new TypeError( + `Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.` + ); + } + (0, _invariant.invariant)( + false, + "Unexpected input type: " + (0, _inspect.inspect)(type2) + ); + } + var integerStringRegExp2 = /^-?(?:0|[1-9][0-9]*)$/; + } + }); + + // node_modules/graphql/type/introspection.js + var require_introspection = __commonJS({ + "node_modules/graphql/type/introspection.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0; + exports.isIntrospectionType = isIntrospectionType2; + var _inspect = require_inspect(); + var _invariant = require_invariant(); + var _directiveLocation = require_directiveLocation(); + var _printer = require_printer(); + var _astFromValue = require_astFromValue(); + var _definition = require_definition(); + var _scalars = require_scalars(); + var __Schema2 = new _definition.GraphQLObjectType({ + name: "__Schema", + description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + fields: () => ({ + description: { + type: _scalars.GraphQLString, + resolve: (schema) => schema.description + }, + types: { + description: "A list of all types supported by this server.", + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)) + ), + resolve(schema) { + return Object.values(schema.getTypeMap()); + } + }, + queryType: { + description: "The type that query operations will be rooted at.", + type: new _definition.GraphQLNonNull(__Type2), + resolve: (schema) => schema.getQueryType() + }, + mutationType: { + description: "If this server supports mutation, the type that mutation operations will be rooted at.", + type: __Type2, + resolve: (schema) => schema.getMutationType() + }, + subscriptionType: { + description: "If this server support subscription, the type that subscription operations will be rooted at.", + type: __Type2, + resolve: (schema) => schema.getSubscriptionType() + }, + directives: { + description: "A list of all directives supported by this server.", + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__Directive2) + ) + ), + resolve: (schema) => schema.getDirectives() + } + }) + }); + exports.__Schema = __Schema2; + var __Directive2 = new _definition.GraphQLObjectType({ + name: "__Directive", + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (directive) => directive.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (directive) => directive.description + }, + isRepeatable: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (directive) => directive.isRepeatable + }, + locations: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__DirectiveLocation2) + ) + ), + resolve: (directive) => directive.locations + }, + args: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + } + }) + }); + exports.__Directive = __Directive2; + var __DirectiveLocation2 = new _definition.GraphQLEnumType({ + name: "__DirectiveLocation", + description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + values: { + QUERY: { + value: _directiveLocation.DirectiveLocation.QUERY, + description: "Location adjacent to a query operation." + }, + MUTATION: { + value: _directiveLocation.DirectiveLocation.MUTATION, + description: "Location adjacent to a mutation operation." + }, + SUBSCRIPTION: { + value: _directiveLocation.DirectiveLocation.SUBSCRIPTION, + description: "Location adjacent to a subscription operation." + }, + FIELD: { + value: _directiveLocation.DirectiveLocation.FIELD, + description: "Location adjacent to a field." + }, + FRAGMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION, + description: "Location adjacent to a fragment definition." + }, + FRAGMENT_SPREAD: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, + description: "Location adjacent to a fragment spread." + }, + INLINE_FRAGMENT: { + value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT, + description: "Location adjacent to an inline fragment." + }, + VARIABLE_DEFINITION: { + value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION, + description: "Location adjacent to a variable definition." + }, + SCHEMA: { + value: _directiveLocation.DirectiveLocation.SCHEMA, + description: "Location adjacent to a schema definition." + }, + SCALAR: { + value: _directiveLocation.DirectiveLocation.SCALAR, + description: "Location adjacent to a scalar definition." + }, + OBJECT: { + value: _directiveLocation.DirectiveLocation.OBJECT, + description: "Location adjacent to an object type definition." + }, + FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION, + description: "Location adjacent to a field definition." + }, + ARGUMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, + description: "Location adjacent to an argument definition." + }, + INTERFACE: { + value: _directiveLocation.DirectiveLocation.INTERFACE, + description: "Location adjacent to an interface definition." + }, + UNION: { + value: _directiveLocation.DirectiveLocation.UNION, + description: "Location adjacent to a union definition." + }, + ENUM: { + value: _directiveLocation.DirectiveLocation.ENUM, + description: "Location adjacent to an enum definition." + }, + ENUM_VALUE: { + value: _directiveLocation.DirectiveLocation.ENUM_VALUE, + description: "Location adjacent to an enum value definition." + }, + INPUT_OBJECT: { + value: _directiveLocation.DirectiveLocation.INPUT_OBJECT, + description: "Location adjacent to an input object type definition." + }, + INPUT_FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, + description: "Location adjacent to an input object field definition." + } + } + }); + exports.__DirectiveLocation = __DirectiveLocation2; + var __Type2 = new _definition.GraphQLObjectType({ + name: "__Type", + description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + fields: () => ({ + kind: { + type: new _definition.GraphQLNonNull(__TypeKind2), + resolve(type2) { + if ((0, _definition.isScalarType)(type2)) { + return TypeKind2.SCALAR; + } + if ((0, _definition.isObjectType)(type2)) { + return TypeKind2.OBJECT; + } + if ((0, _definition.isInterfaceType)(type2)) { + return TypeKind2.INTERFACE; + } + if ((0, _definition.isUnionType)(type2)) { + return TypeKind2.UNION; + } + if ((0, _definition.isEnumType)(type2)) { + return TypeKind2.ENUM; + } + if ((0, _definition.isInputObjectType)(type2)) { + return TypeKind2.INPUT_OBJECT; + } + if ((0, _definition.isListType)(type2)) { + return TypeKind2.LIST; + } + if ((0, _definition.isNonNullType)(type2)) { + return TypeKind2.NON_NULL; + } + (0, _invariant.invariant)( + false, + `Unexpected type: "${(0, _inspect.inspect)(type2)}".` + ); + } + }, + name: { + type: _scalars.GraphQLString, + resolve: (type2) => "name" in type2 ? type2.name : void 0 + }, + description: { + type: _scalars.GraphQLString, + resolve: (type2) => ( + /* c8 ignore next */ + "description" in type2 ? type2.description : void 0 + ) + }, + specifiedByURL: { + type: _scalars.GraphQLString, + resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL : void 0 + }, + fields: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__Field2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isObjectType)(type2) || (0, _definition.isInterfaceType)(type2)) { + const fields = Object.values(type2.getFields()); + return includeDeprecated ? fields : fields.filter((field) => field.deprecationReason == null); + } + } + }, + interfaces: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)), + resolve(type2) { + if ((0, _definition.isObjectType)(type2) || (0, _definition.isInterfaceType)(type2)) { + return type2.getInterfaces(); + } + } + }, + possibleTypes: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)), + resolve(type2, _args, _context, { schema }) { + if ((0, _definition.isAbstractType)(type2)) { + return schema.getPossibleTypes(type2); + } + } + }, + enumValues: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__EnumValue2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isEnumType)(type2)) { + const values = type2.getValues(); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + inputFields: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isInputObjectType)(type2)) { + const values = Object.values(type2.getFields()); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + ofType: { + type: __Type2, + resolve: (type2) => "ofType" in type2 ? type2.ofType : void 0 + } + }) + }); + exports.__Type = __Type2; + var __Field2 = new _definition.GraphQLObjectType({ + name: "__Field", + description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (field) => field.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (field) => field.description + }, + args: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + }, + type: { + type: new _definition.GraphQLNonNull(__Type2), + resolve: (field) => field.type + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (field) => field.deprecationReason + } + }) + }); + exports.__Field = __Field2; + var __InputValue2 = new _definition.GraphQLObjectType({ + name: "__InputValue", + description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (inputValue) => inputValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (inputValue) => inputValue.description + }, + type: { + type: new _definition.GraphQLNonNull(__Type2), + resolve: (inputValue) => inputValue.type + }, + defaultValue: { + type: _scalars.GraphQLString, + description: "A GraphQL-formatted string representing the default value for this input value.", + resolve(inputValue) { + const { type: type2, defaultValue } = inputValue; + const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type2); + return valueAST ? (0, _printer.print)(valueAST) : null; + } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (obj) => obj.deprecationReason + } + }) + }); + exports.__InputValue = __InputValue2; + var __EnumValue2 = new _definition.GraphQLObjectType({ + name: "__EnumValue", + description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (enumValue) => enumValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (enumValue) => enumValue.description + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (enumValue) => enumValue.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (enumValue) => enumValue.deprecationReason + } + }) + }); + exports.__EnumValue = __EnumValue2; + var TypeKind2; + exports.TypeKind = TypeKind2; + (function(TypeKind3) { + TypeKind3["SCALAR"] = "SCALAR"; + TypeKind3["OBJECT"] = "OBJECT"; + TypeKind3["INTERFACE"] = "INTERFACE"; + TypeKind3["UNION"] = "UNION"; + TypeKind3["ENUM"] = "ENUM"; + TypeKind3["INPUT_OBJECT"] = "INPUT_OBJECT"; + TypeKind3["LIST"] = "LIST"; + TypeKind3["NON_NULL"] = "NON_NULL"; + })(TypeKind2 || (exports.TypeKind = TypeKind2 = {})); + var __TypeKind2 = new _definition.GraphQLEnumType({ + name: "__TypeKind", + description: "An enum describing what kind of type a given `__Type` is.", + values: { + SCALAR: { + value: TypeKind2.SCALAR, + description: "Indicates this type is a scalar." + }, + OBJECT: { + value: TypeKind2.OBJECT, + description: "Indicates this type is an object. `fields` and `interfaces` are valid fields." + }, + INTERFACE: { + value: TypeKind2.INTERFACE, + description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields." + }, + UNION: { + value: TypeKind2.UNION, + description: "Indicates this type is a union. `possibleTypes` is a valid field." + }, + ENUM: { + value: TypeKind2.ENUM, + description: "Indicates this type is an enum. `enumValues` is a valid field." + }, + INPUT_OBJECT: { + value: TypeKind2.INPUT_OBJECT, + description: "Indicates this type is an input object. `inputFields` is a valid field." + }, + LIST: { + value: TypeKind2.LIST, + description: "Indicates this type is a list. `ofType` is a valid field." + }, + NON_NULL: { + value: TypeKind2.NON_NULL, + description: "Indicates this type is a non-null. `ofType` is a valid field." + } + } + }); + exports.__TypeKind = __TypeKind2; + var SchemaMetaFieldDef3 = { + name: "__schema", + type: new _definition.GraphQLNonNull(__Schema2), + description: "Access the current type schema of this server.", + args: [], + resolve: (_source, _args, _context, { schema }) => schema, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.SchemaMetaFieldDef = SchemaMetaFieldDef3; + var TypeMetaFieldDef3 = { + name: "__type", + type: __Type2, + description: "Request the type information of a single type.", + args: [ + { + name: "name", + description: void 0, + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + defaultValue: void 0, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + } + ], + resolve: (_source, { name: name2 }, _context, { schema }) => schema.getType(name2), + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.TypeMetaFieldDef = TypeMetaFieldDef3; + var TypeNameMetaFieldDef3 = { + name: "__typename", + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: "The name of the current Object type at runtime.", + args: [], + resolve: (_source, _args, _context, { parentType }) => parentType.name, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef3; + var introspectionTypes2 = Object.freeze([ + __Schema2, + __Directive2, + __DirectiveLocation2, + __Type2, + __Field2, + __InputValue2, + __EnumValue2, + __TypeKind2 + ]); + exports.introspectionTypes = introspectionTypes2; + function isIntrospectionType2(type2) { + return introspectionTypes2.some(({ name: name2 }) => type2.name === name2); + } + } + }); + + // node_modules/nullthrows/nullthrows.js + var require_nullthrows = __commonJS({ + "node_modules/nullthrows/nullthrows.js"(exports, module) { + "use strict"; + function nullthrows2(x, message) { + if (x != null) { + return x; + } + var error = new Error(message !== void 0 ? message : "Got unexpected " + x); + error.framesToPop = 1; + throw error; + } + module.exports = nullthrows2; + module.exports.default = nullthrows2; + Object.defineProperty(module.exports, "__esModule", { value: true }); + } + }); + + // node_modules/picomatch-browser/lib/constants.js + var require_constants = __commonJS({ + "node_modules/picomatch-browser/lib/constants.js"(exports, module) { + "use strict"; + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DOT_LITERAL = "\\."; + var PLUS_LITERAL = "\\+"; + var QMARK_LITERAL = "\\?"; + var SLASH_LITERAL = "\\/"; + var ONE_CHAR = "(?=.)"; + var QMARK = "[^/]"; + var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + var NO_DOT = `(?!${DOT_LITERAL})`; + var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + var STAR = `${QMARK}*?`; + var SEP = "/"; + var POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR, + SEP + }; + var WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)`, + SEP: "\\" + }; + var POSIX_REGEX_SOURCE = { + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }; + module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + // Digits + CHAR_0: 48, + /* 0 */ + CHAR_9: 57, + /* 9 */ + // Alphabet chars. + CHAR_UPPERCASE_A: 65, + /* A */ + CHAR_LOWERCASE_A: 97, + /* a */ + CHAR_UPPERCASE_Z: 90, + /* Z */ + CHAR_LOWERCASE_Z: 122, + /* z */ + CHAR_LEFT_PARENTHESES: 40, + /* ( */ + CHAR_RIGHT_PARENTHESES: 41, + /* ) */ + CHAR_ASTERISK: 42, + /* * */ + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, + /* & */ + CHAR_AT: 64, + /* @ */ + CHAR_BACKWARD_SLASH: 92, + /* \ */ + CHAR_CARRIAGE_RETURN: 13, + /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, + /* ^ */ + CHAR_COLON: 58, + /* : */ + CHAR_COMMA: 44, + /* , */ + CHAR_DOT: 46, + /* . */ + CHAR_DOUBLE_QUOTE: 34, + /* " */ + CHAR_EQUAL: 61, + /* = */ + CHAR_EXCLAMATION_MARK: 33, + /* ! */ + CHAR_FORM_FEED: 12, + /* \f */ + CHAR_FORWARD_SLASH: 47, + /* / */ + CHAR_GRAVE_ACCENT: 96, + /* ` */ + CHAR_HASH: 35, + /* # */ + CHAR_HYPHEN_MINUS: 45, + /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, + /* < */ + CHAR_LEFT_CURLY_BRACE: 123, + /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, + /* [ */ + CHAR_LINE_FEED: 10, + /* \n */ + CHAR_NO_BREAK_SPACE: 160, + /* \u00A0 */ + CHAR_PERCENT: 37, + /* % */ + CHAR_PLUS: 43, + /* + */ + CHAR_QUESTION_MARK: 63, + /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, + /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, + /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, + /* ] */ + CHAR_SEMICOLON: 59, + /* ; */ + CHAR_SINGLE_QUOTE: 39, + /* ' */ + CHAR_SPACE: 32, + /* */ + CHAR_TAB: 9, + /* \t */ + CHAR_UNDERSCORE: 95, + /* _ */ + CHAR_VERTICAL_LINE: 124, + /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + /* \uFEFF */ + /** + * Create EXTGLOB_CHARS + */ + extglobChars(chars) { + return { + "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, + "?": { type: "qmark", open: "(?:", close: ")?" }, + "+": { type: "plus", open: "(?:", close: ")+" }, + "*": { type: "star", open: "(?:", close: ")*" }, + "@": { type: "at", open: "(?:", close: ")" } + }; + }, + /** + * Create GLOB_CHARS + */ + globChars(win322) { + return win322 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + } + }); + + // node_modules/picomatch-browser/lib/utils.js + var require_utils = __commonJS({ + "node_modules/picomatch-browser/lib/utils.js"(exports) { + "use strict"; + var { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = require_constants(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { + return true; + } + return false; + }; + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) + return input; + if (input[idx - 1] === "\\") + return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? "" : "^"; + const append = options.contains ? "" : "$"; + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + exports.basename = (path, { windows } = {}) => { + if (windows) { + return path.replace(/[\\/]$/, "").replace(/.*[\\/]/, ""); + } else { + return path.replace(/\/$/, "").replace(/.*\//, ""); + } + }; + } + }); + + // node_modules/picomatch-browser/lib/scan.js + var require_scan = __commonJS({ + "node_modules/picomatch-browser/lib/scan.js"(exports, module) { + "use strict"; + var utils = require_utils(); + var { + CHAR_ASTERISK, + /* * */ + CHAR_AT, + /* @ */ + CHAR_BACKWARD_SLASH: CHAR_BACKWARD_SLASH2, + /* \ */ + CHAR_COMMA, + /* , */ + CHAR_DOT: CHAR_DOT2, + /* . */ + CHAR_EXCLAMATION_MARK, + /* ! */ + CHAR_FORWARD_SLASH: CHAR_FORWARD_SLASH2, + /* / */ + CHAR_LEFT_CURLY_BRACE, + /* { */ + CHAR_LEFT_PARENTHESES, + /* ( */ + CHAR_LEFT_SQUARE_BRACKET, + /* [ */ + CHAR_PLUS, + /* + */ + CHAR_QUESTION_MARK: CHAR_QUESTION_MARK2, + /* ? */ + CHAR_RIGHT_CURLY_BRACE, + /* } */ + CHAR_RIGHT_PARENTHESES, + /* ) */ + CHAR_RIGHT_SQUARE_BRACKET + /* ] */ + } = require_constants(); + var isPathSeparator2 = (code) => { + return code === CHAR_FORWARD_SLASH2 || code === CHAR_BACKWARD_SLASH2; + }; + var depth = (token) => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + var scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: "", depth: 0, isGlob: false }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT2 && (code = advance()) === CHAR_DOT2) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_FORWARD_SLASH2) { + slashes.push(index); + tokens.push(token); + token = { value: "", depth: 0, isGlob: false }; + if (finished === true) + continue; + if (prev === CHAR_DOT2 && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK2 || code === CHAR_EXCLAMATION_MARK; + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) + isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_QUESTION_MARK2) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else { + base = str; + } + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator2(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + if (opts.unescape === true) { + if (glob) + glob = utils.removeBackslashes(glob); + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator2(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") { + parts.push(value); + } + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module.exports = scan; + } + }); + + // node_modules/picomatch-browser/lib/parse.js + var require_parse = __commonJS({ + "node_modules/picomatch-browser/lib/parse.js"(exports, module) { + "use strict"; + var constants = require_constants(); + var utils = require_utils(); + var { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + var expandRange = (args, options) => { + if (typeof options.expandRange === "function") { + return options.expandRange(...args, options); + } + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + var syntaxError2 = (type2, char) => { + return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var parse3 = (input, options) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + const bos = { type: "bos", value: "", output: opts.prepend || "" }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const PLATFORM_CHARS = constants.globChars(opts.windows); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + const globstar = (opts2) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) { + star = `(${star})`; + } + if (typeof opts.noext === "boolean") { + opts.noextglob = opts.noext; + } + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index]; + const remaining = () => input.slice(state.index + 1); + const consume = (value2 = "", num = 0) => { + state.consumed += value2; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) { + return false; + } + state.negated = true; + state.start++; + return true; + }; + const increment = (type2) => { + state[type2]++; + stack.push(type2); + }; + const decrement = (type2) => { + state[type2]--; + stack.pop(); + }; + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren" && !EXTGLOB_CHARS[tok.value]) { + extglobs[extglobs.length - 1].inner += tok.value; + } + if (tok.value || tok.output) + append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type2, value2) => { + const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); + push({ type: "paren", extglob: true, value: advance(), output }); + extglobs.push(token); + }; + const extglobClose = (token) => { + let output = token.close + (opts.capture ? ")" : ""); + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { + extglobStar = globstar(opts); + } + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + if (token.prev.type === "bos" && eos()) { + state.negatedExtglob = true; + } + } + push({ type: "paren", extglob: true, value, output }); + decrement("parens"); + }; + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + } + return QMARK.repeat(chars.length); + } + if (first === ".") { + return DOT_LITERAL.repeat(chars.length); + } + if (first === "*") { + if (esc) { + return esc + first + (rest ? star : ""); + } + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ""); + } else { + output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + } + } + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") { + continue; + } + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) { + continue; + } + if (next === "." || next === ";") { + continue; + } + if (!next) { + value += "\\"; + push({ type: "text", value }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += "\\"; + } + } + if (opts.unescape === true) { + value = advance() || ""; + } else { + value += advance() || ""; + } + if (state.brackets === 0) { + push({ type: "text", value }); + continue; + } + } + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const rest2 = prev.value.slice(idx + 2); + const posix2 = POSIX_REGEX_SOURCE[rest2]; + if (posix2) { + prev.value = pre + posix2; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { + value = `\\${value}`; + } + if (value === "]" && (prev.value === "[" || prev.value === "[^")) { + value = `\\${value}`; + } + if (opts.posix === true && value === "!" && prev.value === "[") { + value = "^"; + } + prev.value += value; + append({ value }); + continue; + } + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: "text", value }); + } + continue; + } + if (value === "(") { + increment("parens"); + push({ type: "paren", value }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("opening", "(")); + } + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); + decrement("parens"); + continue; + } + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("closing", "]")); + } + value = `\\${value}`; + } else { + increment("brackets"); + } + push({ type: "bracket", value }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ type: "text", value, output: `\\${value}` }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("opening", "[")); + } + push({ type: "text", value, output: `\\${value}` }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { + value = `/${value}`; + } + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ type: "text", value, output: value }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") { + break; + } + if (arr[i].type !== "dots") { + range.unshift(arr[i].value); + } + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t2 of toks) { + state.output += t2.output || t2.value; + } + } + push({ type: "brace", value, output }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: "text", value }); + continue; + } + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ type: "comma", value, output }); + continue; + } + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ type: "slash", value, output: SLASH_LITERAL }); + continue; + } + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") + prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ type: "text", value, output: DOT_LITERAL }); + continue; + } + push({ type: "dot", value, output: DOT_LITERAL }); + continue; + } + if (value === "?") { + const isGroup = prev && prev.value === "("; + if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) { + throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + } + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { + output = `\\${value}`; + } + push({ type: "text", value, output }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ type: "qmark", value, output: QMARK_NO_DOT }); + continue; + } + push({ type: "qmark", value, output: QMARK }); + continue; + } + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ type: "plus", value, output: PLUS_LITERAL }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ type: "plus", value }); + continue; + } + push({ type: "plus", value: PLUS_LITERAL }); + continue; + } + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ type: "at", extglob: true, value, output: "" }); + continue; + } + push({ type: "text", value }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") { + value = `\\${value}`; + } + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ type: "text", value }); + continue; + } + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ type: "star", value, output: "" }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ type: "star", value, output: "" }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") { + break; + } + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { type: "star", value, output: star }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") { + token.output = nodot + token.output; + } + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { + push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); + } + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) { + state.output += token.suffix; + } + } + } + return state; + }; + parse3.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + input = REPLACEMENTS[input] || input; + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(opts.windows); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { negated: false, prefix: "" }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) { + star = `(${star})`; + } + const globstar = (opts2) => { + if (opts2.noglobstar === true) + return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": + return `${nodot}${ONE_CHAR}${star}`; + case ".*": + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": + return nodot + globstar(opts); + case "**/*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) + return; + const source2 = create(match[1]); + if (!source2) + return; + return source2 + DOT_LITERAL + match[2]; + } + } + }; + const output = utils.removePrefix(input, state); + let source = create(output); + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + return source; + }; + module.exports = parse3; + } + }); + + // node_modules/picomatch-browser/lib/picomatch.js + var require_picomatch = __commonJS({ + "node_modules/picomatch-browser/lib/picomatch.js"(exports, module) { + "use strict"; + var scan = require_scan(); + var parse3 = require_parse(); + var utils = require_utils(); + var constants = require_constants(); + var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch2 = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch2(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state2 = isMatch(str); + if (state2) + return state2; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject2(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) { + throw new TypeError("Expected pattern to be a non-empty string"); + } + const opts = options || {}; + const posix2 = opts.windows; + const regex = isState ? picomatch2.compileRe(glob, options) : picomatch2.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored2 = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored2 = picomatch2(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch2.test(input, regex, options, { glob, posix: posix2 }); + const result = { glob, state, regex, posix: posix2, input, output, match, isMatch }; + if (typeof opts.onResult === "function") { + opts.onResult(result); + } + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored2(input)) { + if (typeof opts.onIgnore === "function") { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + if (returnState) { + matcher.state = state; + } + return matcher; + }; + picomatch2.test = (input, regex, options, { glob, posix: posix2 } = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected input to be a string"); + } + if (input === "") { + return { isMatch: false, output: "" }; + } + const opts = options || {}; + const format2 = opts.format || (posix2 ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format2 ? format2(input) : input; + if (match === false) { + output = format2 ? format2(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch2.matchBase(input, regex, options, posix2); + } else { + match = regex.exec(output); + } + } + return { isMatch: Boolean(match), match, output }; + }; + picomatch2.matchBase = (input, glob, options) => { + const regex = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options); + return regex.test(utils.basename(input)); + }; + picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str); + picomatch2.parse = (pattern, options) => { + if (Array.isArray(pattern)) + return pattern.map((p2) => picomatch2.parse(p2, options)); + return parse3(pattern, { ...options, fastpaths: false }); + }; + picomatch2.scan = (input, options) => scan(input, options); + picomatch2.compileRe = (parsed, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return parsed.output; + } + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${parsed.output})${append}`; + if (parsed && parsed.negated === true) { + source = `^(?!${source}).*$`; + } + const regex = picomatch2.toRegex(source, options); + if (returnState === true) { + regex.state = parsed; + } + return regex; + }; + picomatch2.makeRe = (input, options, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") { + throw new TypeError("Expected a non-empty string"); + } + const opts = options || {}; + let parsed = { negated: false, fastpaths: true }; + let prefix = ""; + let output; + if (input.startsWith("./")) { + input = input.slice(2); + prefix = parsed.prefix = "./"; + } + if (opts.fastpaths !== false && (input[0] === "." || input[0] === "*")) { + output = parse3.fastpaths(input, options); + } + if (output === void 0) { + parsed = parse3(input, options); + parsed.prefix = prefix + (parsed.prefix || ""); + } else { + parsed.output = output; + } + return picomatch2.compileRe(parsed, options, returnOutput, returnState); + }; + picomatch2.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) + throw err; + return /$^/; + } + }; + picomatch2.constants = constants; + module.exports = picomatch2; + } + }); + + // node_modules/picomatch-browser/index.js + var require_picomatch_browser = __commonJS({ + "node_modules/picomatch-browser/index.js"(exports, module) { + "use strict"; + module.exports = require_picomatch(); + } + }); + + // node_modules/prettier/standalone.js + var require_standalone = __commonJS({ + "node_modules/prettier/standalone.js"(exports, module) { + (function(e) { + if (typeof exports == "object" && typeof module == "object") + module.exports = e(); + else if (typeof define == "function" && define.amd) + define(e); + else { + var f = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : this || {}; + f.prettier = e(); + } + })(function() { + "use strict"; + var xe = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports); + var pt = xe((r0, pu) => { + var ir = function(e) { + return e && e.Math == Math && e; + }; + pu.exports = ir(typeof globalThis == "object" && globalThis) || ir(typeof window == "object" && window) || ir(typeof self == "object" && self) || ir(typeof global == "object" && global) || function() { + return this; + }() || Function("return this")(); + }); + var Dt = xe((n0, fu) => { + fu.exports = function(e) { + try { + return !!e(); + } catch { + return true; + } + }; + }); + var yt = xe((u0, Du) => { + var Mo = Dt(); + Du.exports = !Mo(function() { + return Object.defineProperty({}, 1, { get: function() { + return 7; + } })[1] != 7; + }); + }); + var ar = xe((s0, mu) => { + var Ro = Dt(); + mu.exports = !Ro(function() { + var e = function() { + }.bind(); + return typeof e != "function" || e.hasOwnProperty("prototype"); + }); + }); + var At = xe((i0, du) => { + var $o = ar(), or = Function.prototype.call; + du.exports = $o ? or.bind(or) : function() { + return or.apply(or, arguments); + }; + }); + var vu = xe((hu) => { + "use strict"; + var gu = {}.propertyIsEnumerable, yu = Object.getOwnPropertyDescriptor, Vo = yu && !gu.call({ 1: 2 }, 1); + hu.f = Vo ? function(r) { + var t2 = yu(this, r); + return !!t2 && t2.enumerable; + } : gu; + }); + var lr = xe((o0, Cu) => { + Cu.exports = function(e, r) { + return { enumerable: !(e & 1), configurable: !(e & 2), writable: !(e & 4), value: r }; + }; + }); + var mt = xe((l0, Au) => { + var Eu = ar(), Fu = Function.prototype, Wr = Fu.call, Wo = Eu && Fu.bind.bind(Wr, Wr); + Au.exports = Eu ? Wo : function(e) { + return function() { + return Wr.apply(e, arguments); + }; + }; + }); + var Vt = xe((c0, xu) => { + var Su = mt(), Ho = Su({}.toString), Go = Su("".slice); + xu.exports = function(e) { + return Go(Ho(e), 8, -1); + }; + }); + var Tu = xe((p0, bu) => { + var Uo = mt(), Jo = Dt(), zo = Vt(), Hr = Object, Xo = Uo("".split); + bu.exports = Jo(function() { + return !Hr("z").propertyIsEnumerable(0); + }) ? function(e) { + return zo(e) == "String" ? Xo(e, "") : Hr(e); + } : Hr; + }); + var cr = xe((f0, Bu) => { + Bu.exports = function(e) { + return e == null; + }; + }); + var Gr = xe((D0, Nu) => { + var Ko = cr(), Yo = TypeError; + Nu.exports = function(e) { + if (Ko(e)) + throw Yo("Can't call method on " + e); + return e; + }; + }); + var pr = xe((m0, wu) => { + var Qo = Tu(), Zo = Gr(); + wu.exports = function(e) { + return Qo(Zo(e)); + }; + }); + var Jr = xe((d0, _u) => { + var Ur = typeof document == "object" && document.all, el = typeof Ur > "u" && Ur !== void 0; + _u.exports = { all: Ur, IS_HTMLDDA: el }; + }); + var ot = xe((g0, Iu) => { + var Pu = Jr(), tl = Pu.all; + Iu.exports = Pu.IS_HTMLDDA ? function(e) { + return typeof e == "function" || e === tl; + } : function(e) { + return typeof e == "function"; + }; + }); + var St = xe((y0, Ou) => { + var ku = ot(), Lu = Jr(), rl = Lu.all; + Ou.exports = Lu.IS_HTMLDDA ? function(e) { + return typeof e == "object" ? e !== null : ku(e) || e === rl; + } : function(e) { + return typeof e == "object" ? e !== null : ku(e); + }; + }); + var Wt = xe((h0, ju) => { + var zr = pt(), nl = ot(), ul = function(e) { + return nl(e) ? e : void 0; + }; + ju.exports = function(e, r) { + return arguments.length < 2 ? ul(zr[e]) : zr[e] && zr[e][r]; + }; + }); + var Xr = xe((v0, qu) => { + var sl = mt(); + qu.exports = sl({}.isPrototypeOf); + }); + var Ru = xe((C0, Mu) => { + var il = Wt(); + Mu.exports = il("navigator", "userAgent") || ""; + }); + var Ju = xe((E0, Uu) => { + var Gu = pt(), Kr = Ru(), $u = Gu.process, Vu = Gu.Deno, Wu = $u && $u.versions || Vu && Vu.version, Hu = Wu && Wu.v8, dt, fr; + Hu && (dt = Hu.split("."), fr = dt[0] > 0 && dt[0] < 4 ? 1 : +(dt[0] + dt[1])); + !fr && Kr && (dt = Kr.match(/Edge\/(\d+)/), (!dt || dt[1] >= 74) && (dt = Kr.match(/Chrome\/(\d+)/), dt && (fr = +dt[1]))); + Uu.exports = fr; + }); + var Yr = xe((F0, Xu) => { + var zu = Ju(), al = Dt(); + Xu.exports = !!Object.getOwnPropertySymbols && !al(function() { + var e = Symbol(); + return !String(e) || !(Object(e) instanceof Symbol) || !Symbol.sham && zu && zu < 41; + }); + }); + var Qr = xe((A0, Ku) => { + var ol = Yr(); + Ku.exports = ol && !Symbol.sham && typeof Symbol.iterator == "symbol"; + }); + var Zr = xe((S0, Yu) => { + var ll = Wt(), cl = ot(), pl = Xr(), fl = Qr(), Dl = Object; + Yu.exports = fl ? function(e) { + return typeof e == "symbol"; + } : function(e) { + var r = ll("Symbol"); + return cl(r) && pl(r.prototype, Dl(e)); + }; + }); + var Dr = xe((x0, Qu) => { + var ml = String; + Qu.exports = function(e) { + try { + return ml(e); + } catch { + return "Object"; + } + }; + }); + var Ht = xe((b0, Zu) => { + var dl = ot(), gl = Dr(), yl = TypeError; + Zu.exports = function(e) { + if (dl(e)) + return e; + throw yl(gl(e) + " is not a function"); + }; + }); + var mr = xe((T0, es) => { + var hl = Ht(), vl = cr(); + es.exports = function(e, r) { + var t2 = e[r]; + return vl(t2) ? void 0 : hl(t2); + }; + }); + var rs = xe((B0, ts) => { + var en = At(), tn = ot(), rn = St(), Cl = TypeError; + ts.exports = function(e, r) { + var t2, s; + if (r === "string" && tn(t2 = e.toString) && !rn(s = en(t2, e)) || tn(t2 = e.valueOf) && !rn(s = en(t2, e)) || r !== "string" && tn(t2 = e.toString) && !rn(s = en(t2, e))) + return s; + throw Cl("Can't convert object to primitive value"); + }; + }); + var us = xe((N0, ns) => { + ns.exports = false; + }); + var dr = xe((w0, is) => { + var ss = pt(), El = Object.defineProperty; + is.exports = function(e, r) { + try { + El(ss, e, { value: r, configurable: true, writable: true }); + } catch { + ss[e] = r; + } + return r; + }; + }); + var gr = xe((_0, os) => { + var Fl = pt(), Al = dr(), as = "__core-js_shared__", Sl = Fl[as] || Al(as, {}); + os.exports = Sl; + }); + var nn = xe((P0, cs) => { + var xl = us(), ls = gr(); + (cs.exports = function(e, r) { + return ls[e] || (ls[e] = r !== void 0 ? r : {}); + })("versions", []).push({ version: "3.26.1", mode: xl ? "pure" : "global", copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE", source: "https://github.com/zloirock/core-js" }); + }); + var yr = xe((I0, ps) => { + var bl = Gr(), Tl = Object; + ps.exports = function(e) { + return Tl(bl(e)); + }; + }); + var Ct = xe((k0, fs) => { + var Bl = mt(), Nl = yr(), wl = Bl({}.hasOwnProperty); + fs.exports = Object.hasOwn || function(r, t2) { + return wl(Nl(r), t2); + }; + }); + var un = xe((L0, Ds) => { + var _l = mt(), Pl = 0, Il = Math.random(), kl = _l(1 .toString); + Ds.exports = function(e) { + return "Symbol(" + (e === void 0 ? "" : e) + ")_" + kl(++Pl + Il, 36); + }; + }); + var bt = xe((O0, hs) => { + var Ll = pt(), Ol = nn(), ms = Ct(), jl = un(), ds = Yr(), ys = Qr(), It = Ol("wks"), xt = Ll.Symbol, gs = xt && xt.for, ql = ys ? xt : xt && xt.withoutSetter || jl; + hs.exports = function(e) { + if (!ms(It, e) || !(ds || typeof It[e] == "string")) { + var r = "Symbol." + e; + ds && ms(xt, e) ? It[e] = xt[e] : ys && gs ? It[e] = gs(r) : It[e] = ql(r); + } + return It[e]; + }; + }); + var Fs = xe((j0, Es) => { + var Ml = At(), vs = St(), Cs = Zr(), Rl = mr(), $l = rs(), Vl = bt(), Wl = TypeError, Hl = Vl("toPrimitive"); + Es.exports = function(e, r) { + if (!vs(e) || Cs(e)) + return e; + var t2 = Rl(e, Hl), s; + if (t2) { + if (r === void 0 && (r = "default"), s = Ml(t2, e, r), !vs(s) || Cs(s)) + return s; + throw Wl("Can't convert object to primitive value"); + } + return r === void 0 && (r = "number"), $l(e, r); + }; + }); + var hr = xe((q0, As) => { + var Gl = Fs(), Ul = Zr(); + As.exports = function(e) { + var r = Gl(e, "string"); + return Ul(r) ? r : r + ""; + }; + }); + var bs = xe((M0, xs) => { + var Jl = pt(), Ss = St(), sn = Jl.document, zl = Ss(sn) && Ss(sn.createElement); + xs.exports = function(e) { + return zl ? sn.createElement(e) : {}; + }; + }); + var an = xe((R0, Ts) => { + var Xl = yt(), Kl = Dt(), Yl = bs(); + Ts.exports = !Xl && !Kl(function() { + return Object.defineProperty(Yl("div"), "a", { get: function() { + return 7; + } }).a != 7; + }); + }); + var on = xe((Ns) => { + var Ql = yt(), Zl = At(), ec = vu(), tc = lr(), rc = pr(), nc = hr(), uc = Ct(), sc = an(), Bs = Object.getOwnPropertyDescriptor; + Ns.f = Ql ? Bs : function(r, t2) { + if (r = rc(r), t2 = nc(t2), sc) + try { + return Bs(r, t2); + } catch { + } + if (uc(r, t2)) + return tc(!Zl(ec.f, r, t2), r[t2]); + }; + }); + var _s = xe((V0, ws) => { + var ic = yt(), ac = Dt(); + ws.exports = ic && ac(function() { + return Object.defineProperty(function() { + }, "prototype", { value: 42, writable: false }).prototype != 42; + }); + }); + var Tt = xe((W0, Ps) => { + var oc = St(), lc = String, cc = TypeError; + Ps.exports = function(e) { + if (oc(e)) + return e; + throw cc(lc(e) + " is not an object"); + }; + }); + var kt = xe((ks) => { + var pc = yt(), fc = an(), Dc = _s(), vr = Tt(), Is2 = hr(), mc = TypeError, ln = Object.defineProperty, dc = Object.getOwnPropertyDescriptor, cn = "enumerable", pn = "configurable", fn = "writable"; + ks.f = pc ? Dc ? function(r, t2, s) { + if (vr(r), t2 = Is2(t2), vr(s), typeof r == "function" && t2 === "prototype" && "value" in s && fn in s && !s[fn]) { + var a = dc(r, t2); + a && a[fn] && (r[t2] = s.value, s = { configurable: pn in s ? s[pn] : a[pn], enumerable: cn in s ? s[cn] : a[cn], writable: false }); + } + return ln(r, t2, s); + } : ln : function(r, t2, s) { + if (vr(r), t2 = Is2(t2), vr(s), fc) + try { + return ln(r, t2, s); + } catch { + } + if ("get" in s || "set" in s) + throw mc("Accessors not supported"); + return "value" in s && (r[t2] = s.value), r; + }; + }); + var Dn = xe((G0, Ls) => { + var gc = yt(), yc = kt(), hc = lr(); + Ls.exports = gc ? function(e, r, t2) { + return yc.f(e, r, hc(1, t2)); + } : function(e, r, t2) { + return e[r] = t2, e; + }; + }); + var qs = xe((U0, js) => { + var mn = yt(), vc = Ct(), Os = Function.prototype, Cc = mn && Object.getOwnPropertyDescriptor, dn = vc(Os, "name"), Ec = dn && function() { + }.name === "something", Fc = dn && (!mn || mn && Cc(Os, "name").configurable); + js.exports = { EXISTS: dn, PROPER: Ec, CONFIGURABLE: Fc }; + }); + var yn = xe((J0, Ms) => { + var Ac = mt(), Sc = ot(), gn = gr(), xc = Ac(Function.toString); + Sc(gn.inspectSource) || (gn.inspectSource = function(e) { + return xc(e); + }); + Ms.exports = gn.inspectSource; + }); + var Vs = xe((z0, $s) => { + var bc = pt(), Tc = ot(), Rs = bc.WeakMap; + $s.exports = Tc(Rs) && /native code/.test(String(Rs)); + }); + var Gs = xe((X0, Hs) => { + var Bc = nn(), Nc = un(), Ws = Bc("keys"); + Hs.exports = function(e) { + return Ws[e] || (Ws[e] = Nc(e)); + }; + }); + var hn = xe((K0, Us) => { + Us.exports = {}; + }); + var Ks = xe((Y0, Xs) => { + var wc = Vs(), zs = pt(), _c = St(), Pc = Dn(), vn = Ct(), Cn = gr(), Ic = Gs(), kc = hn(), Js = "Object already initialized", En = zs.TypeError, Lc = zs.WeakMap, Cr, Gt, Er, Oc = function(e) { + return Er(e) ? Gt(e) : Cr(e, {}); + }, jc = function(e) { + return function(r) { + var t2; + if (!_c(r) || (t2 = Gt(r)).type !== e) + throw En("Incompatible receiver, " + e + " required"); + return t2; + }; + }; + wc || Cn.state ? (gt = Cn.state || (Cn.state = new Lc()), gt.get = gt.get, gt.has = gt.has, gt.set = gt.set, Cr = function(e, r) { + if (gt.has(e)) + throw En(Js); + return r.facade = e, gt.set(e, r), r; + }, Gt = function(e) { + return gt.get(e) || {}; + }, Er = function(e) { + return gt.has(e); + }) : (Bt = Ic("state"), kc[Bt] = true, Cr = function(e, r) { + if (vn(e, Bt)) + throw En(Js); + return r.facade = e, Pc(e, Bt, r), r; + }, Gt = function(e) { + return vn(e, Bt) ? e[Bt] : {}; + }, Er = function(e) { + return vn(e, Bt); + }); + var gt, Bt; + Xs.exports = { set: Cr, get: Gt, has: Er, enforce: Oc, getterFor: jc }; + }); + var An = xe((Q0, Qs) => { + var qc = Dt(), Mc = ot(), Fr = Ct(), Fn = yt(), Rc = qs().CONFIGURABLE, $c = yn(), Ys = Ks(), Vc = Ys.enforce, Wc = Ys.get, Ar = Object.defineProperty, Hc = Fn && !qc(function() { + return Ar(function() { + }, "length", { value: 8 }).length !== 8; + }), Gc = String(String).split("String"), Uc = Qs.exports = function(e, r, t2) { + String(r).slice(0, 7) === "Symbol(" && (r = "[" + String(r).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), t2 && t2.getter && (r = "get " + r), t2 && t2.setter && (r = "set " + r), (!Fr(e, "name") || Rc && e.name !== r) && (Fn ? Ar(e, "name", { value: r, configurable: true }) : e.name = r), Hc && t2 && Fr(t2, "arity") && e.length !== t2.arity && Ar(e, "length", { value: t2.arity }); + try { + t2 && Fr(t2, "constructor") && t2.constructor ? Fn && Ar(e, "prototype", { writable: false }) : e.prototype && (e.prototype = void 0); + } catch { + } + var s = Vc(e); + return Fr(s, "source") || (s.source = Gc.join(typeof r == "string" ? r : "")), e; + }; + Function.prototype.toString = Uc(function() { + return Mc(this) && Wc(this).source || $c(this); + }, "toString"); + }); + var ei = xe((Z0, Zs) => { + var Jc = ot(), zc = kt(), Xc = An(), Kc = dr(); + Zs.exports = function(e, r, t2, s) { + s || (s = {}); + var a = s.enumerable, n = s.name !== void 0 ? s.name : r; + if (Jc(t2) && Xc(t2, n, s), s.global) + a ? e[r] = t2 : Kc(r, t2); + else { + try { + s.unsafe ? e[r] && (a = true) : delete e[r]; + } catch { + } + a ? e[r] = t2 : zc.f(e, r, { value: t2, enumerable: false, configurable: !s.nonConfigurable, writable: !s.nonWritable }); + } + return e; + }; + }); + var ri = xe((ey, ti) => { + var Yc = Math.ceil, Qc = Math.floor; + ti.exports = Math.trunc || function(r) { + var t2 = +r; + return (t2 > 0 ? Qc : Yc)(t2); + }; + }); + var Sr = xe((ty, ni) => { + var Zc = ri(); + ni.exports = function(e) { + var r = +e; + return r !== r || r === 0 ? 0 : Zc(r); + }; + }); + var si = xe((ry, ui) => { + var ep = Sr(), tp = Math.max, rp = Math.min; + ui.exports = function(e, r) { + var t2 = ep(e); + return t2 < 0 ? tp(t2 + r, 0) : rp(t2, r); + }; + }); + var ai = xe((ny, ii) => { + var np = Sr(), up = Math.min; + ii.exports = function(e) { + return e > 0 ? up(np(e), 9007199254740991) : 0; + }; + }); + var Lt = xe((uy, oi) => { + var sp = ai(); + oi.exports = function(e) { + return sp(e.length); + }; + }); + var pi = xe((sy, ci) => { + var ip = pr(), ap = si(), op = Lt(), li = function(e) { + return function(r, t2, s) { + var a = ip(r), n = op(a), u = ap(s, n), i; + if (e && t2 != t2) { + for (; n > u; ) + if (i = a[u++], i != i) + return true; + } else + for (; n > u; u++) + if ((e || u in a) && a[u] === t2) + return e || u || 0; + return !e && -1; + }; + }; + ci.exports = { includes: li(true), indexOf: li(false) }; + }); + var mi = xe((iy, Di) => { + var lp = mt(), Sn = Ct(), cp = pr(), pp = pi().indexOf, fp = hn(), fi = lp([].push); + Di.exports = function(e, r) { + var t2 = cp(e), s = 0, a = [], n; + for (n in t2) + !Sn(fp, n) && Sn(t2, n) && fi(a, n); + for (; r.length > s; ) + Sn(t2, n = r[s++]) && (~pp(a, n) || fi(a, n)); + return a; + }; + }); + var gi = xe((ay, di) => { + di.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; + }); + var hi = xe((yi) => { + var Dp = mi(), mp = gi(), dp = mp.concat("length", "prototype"); + yi.f = Object.getOwnPropertyNames || function(r) { + return Dp(r, dp); + }; + }); + var Ci = xe((vi) => { + vi.f = Object.getOwnPropertySymbols; + }); + var Fi = xe((cy, Ei) => { + var gp = Wt(), yp = mt(), hp = hi(), vp = Ci(), Cp = Tt(), Ep = yp([].concat); + Ei.exports = gp("Reflect", "ownKeys") || function(r) { + var t2 = hp.f(Cp(r)), s = vp.f; + return s ? Ep(t2, s(r)) : t2; + }; + }); + var xi = xe((py, Si) => { + var Ai = Ct(), Fp = Fi(), Ap = on(), Sp = kt(); + Si.exports = function(e, r, t2) { + for (var s = Fp(r), a = Sp.f, n = Ap.f, u = 0; u < s.length; u++) { + var i = s[u]; + !Ai(e, i) && !(t2 && Ai(t2, i)) && a(e, i, n(r, i)); + } + }; + }); + var Ti = xe((fy, bi) => { + var xp = Dt(), bp = ot(), Tp = /#|\.prototype\./, Ut = function(e, r) { + var t2 = Np[Bp(e)]; + return t2 == _p ? true : t2 == wp ? false : bp(r) ? xp(r) : !!r; + }, Bp = Ut.normalize = function(e) { + return String(e).replace(Tp, ".").toLowerCase(); + }, Np = Ut.data = {}, wp = Ut.NATIVE = "N", _p = Ut.POLYFILL = "P"; + bi.exports = Ut; + }); + var Jt = xe((Dy, Bi) => { + var xn = pt(), Pp = on().f, Ip = Dn(), kp = ei(), Lp = dr(), Op = xi(), jp = Ti(); + Bi.exports = function(e, r) { + var t2 = e.target, s = e.global, a = e.stat, n, u, i, l, p2, y; + if (s ? u = xn : a ? u = xn[t2] || Lp(t2, {}) : u = (xn[t2] || {}).prototype, u) + for (i in r) { + if (p2 = r[i], e.dontCallGetSet ? (y = Pp(u, i), l = y && y.value) : l = u[i], n = jp(s ? i : t2 + (a ? "." : "#") + i, e.forced), !n && l !== void 0) { + if (typeof p2 == typeof l) + continue; + Op(p2, l); + } + (e.sham || l && l.sham) && Ip(p2, "sham", true), kp(u, i, p2, e); + } + }; + }); + var bn = xe((my, Ni) => { + var qp = Vt(); + Ni.exports = Array.isArray || function(r) { + return qp(r) == "Array"; + }; + }); + var _i = xe((dy, wi) => { + var Mp = TypeError, Rp = 9007199254740991; + wi.exports = function(e) { + if (e > Rp) + throw Mp("Maximum allowed index exceeded"); + return e; + }; + }); + var Ii = xe((gy, Pi) => { + var $p = Vt(), Vp = mt(); + Pi.exports = function(e) { + if ($p(e) === "Function") + return Vp(e); + }; + }); + var Tn = xe((yy, Li) => { + var ki = Ii(), Wp = Ht(), Hp = ar(), Gp = ki(ki.bind); + Li.exports = function(e, r) { + return Wp(e), r === void 0 ? e : Hp ? Gp(e, r) : function() { + return e.apply(r, arguments); + }; + }; + }); + var Bn = xe((hy, ji) => { + "use strict"; + var Up = bn(), Jp = Lt(), zp = _i(), Xp = Tn(), Oi = function(e, r, t2, s, a, n, u, i) { + for (var l = a, p2 = 0, y = u ? Xp(u, i) : false, h, g; p2 < s; ) + p2 in t2 && (h = y ? y(t2[p2], p2, r) : t2[p2], n > 0 && Up(h) ? (g = Jp(h), l = Oi(e, r, h, g, l, n - 1) - 1) : (zp(l + 1), e[l] = h), l++), p2++; + return l; + }; + ji.exports = Oi; + }); + var Ri = xe((vy, Mi) => { + var Kp = bt(), Yp = Kp("toStringTag"), qi = {}; + qi[Yp] = "z"; + Mi.exports = String(qi) === "[object z]"; + }); + var Nn = xe((Cy, $i) => { + var Qp = Ri(), Zp = ot(), xr = Vt(), ef = bt(), tf = ef("toStringTag"), rf = Object, nf = xr(function() { + return arguments; + }()) == "Arguments", uf = function(e, r) { + try { + return e[r]; + } catch { + } + }; + $i.exports = Qp ? xr : function(e) { + var r, t2, s; + return e === void 0 ? "Undefined" : e === null ? "Null" : typeof (t2 = uf(r = rf(e), tf)) == "string" ? t2 : nf ? xr(r) : (s = xr(r)) == "Object" && Zp(r.callee) ? "Arguments" : s; + }; + }); + var Ji = xe((Ey, Ui) => { + var sf = mt(), af = Dt(), Vi = ot(), of = Nn(), lf = Wt(), cf = yn(), Wi = function() { + }, pf = [], Hi = lf("Reflect", "construct"), wn = /^\s*(?:class|function)\b/, ff = sf(wn.exec), Df = !wn.exec(Wi), zt = function(r) { + if (!Vi(r)) + return false; + try { + return Hi(Wi, pf, r), true; + } catch { + return false; + } + }, Gi = function(r) { + if (!Vi(r)) + return false; + switch (of(r)) { + case "AsyncFunction": + case "GeneratorFunction": + case "AsyncGeneratorFunction": + return false; + } + try { + return Df || !!ff(wn, cf(r)); + } catch { + return true; + } + }; + Gi.sham = true; + Ui.exports = !Hi || af(function() { + var e; + return zt(zt.call) || !zt(Object) || !zt(function() { + e = true; + }) || e; + }) ? Gi : zt; + }); + var Yi = xe((Fy, Ki) => { + var zi = bn(), mf = Ji(), df = St(), gf = bt(), yf = gf("species"), Xi = Array; + Ki.exports = function(e) { + var r; + return zi(e) && (r = e.constructor, mf(r) && (r === Xi || zi(r.prototype)) ? r = void 0 : df(r) && (r = r[yf], r === null && (r = void 0))), r === void 0 ? Xi : r; + }; + }); + var _n = xe((Ay, Qi) => { + var hf = Yi(); + Qi.exports = function(e, r) { + return new (hf(e))(r === 0 ? 0 : r); + }; + }); + var Zi = xe(() => { + "use strict"; + var vf = Jt(), Cf = Bn(), Ef = Ht(), Ff = yr(), Af = Lt(), Sf = _n(); + vf({ target: "Array", proto: true }, { flatMap: function(r) { + var t2 = Ff(this), s = Af(t2), a; + return Ef(r), a = Sf(t2, 0), a.length = Cf(a, t2, t2, s, 0, 1, r, arguments.length > 1 ? arguments[1] : void 0), a; + } }); + }); + var Pn = xe((by, ea) => { + ea.exports = {}; + }); + var ra = xe((Ty, ta) => { + var xf = bt(), bf = Pn(), Tf = xf("iterator"), Bf = Array.prototype; + ta.exports = function(e) { + return e !== void 0 && (bf.Array === e || Bf[Tf] === e); + }; + }); + var In = xe((By, ua) => { + var Nf = Nn(), na = mr(), wf = cr(), _f = Pn(), Pf = bt(), If = Pf("iterator"); + ua.exports = function(e) { + if (!wf(e)) + return na(e, If) || na(e, "@@iterator") || _f[Nf(e)]; + }; + }); + var ia = xe((Ny, sa) => { + var kf = At(), Lf = Ht(), Of = Tt(), jf = Dr(), qf = In(), Mf = TypeError; + sa.exports = function(e, r) { + var t2 = arguments.length < 2 ? qf(e) : r; + if (Lf(t2)) + return Of(kf(t2, e)); + throw Mf(jf(e) + " is not iterable"); + }; + }); + var la = xe((wy, oa) => { + var Rf = At(), aa = Tt(), $f = mr(); + oa.exports = function(e, r, t2) { + var s, a; + aa(e); + try { + if (s = $f(e, "return"), !s) { + if (r === "throw") + throw t2; + return t2; + } + s = Rf(s, e); + } catch (n) { + a = true, s = n; + } + if (r === "throw") + throw t2; + if (a) + throw s; + return aa(s), t2; + }; + }); + var ma = xe((_y, Da) => { + var Vf = Tn(), Wf = At(), Hf = Tt(), Gf = Dr(), Uf = ra(), Jf = Lt(), ca = Xr(), zf = ia(), Xf = In(), pa = la(), Kf = TypeError, br = function(e, r) { + this.stopped = e, this.result = r; + }, fa = br.prototype; + Da.exports = function(e, r, t2) { + var s = t2 && t2.that, a = !!(t2 && t2.AS_ENTRIES), n = !!(t2 && t2.IS_RECORD), u = !!(t2 && t2.IS_ITERATOR), i = !!(t2 && t2.INTERRUPTED), l = Vf(r, s), p2, y, h, g, c, f, F, _ = function(E) { + return p2 && pa(p2, "normal", E), new br(true, E); + }, w = function(E) { + return a ? (Hf(E), i ? l(E[0], E[1], _) : l(E[0], E[1])) : i ? l(E, _) : l(E); + }; + if (n) + p2 = e.iterator; + else if (u) + p2 = e; + else { + if (y = Xf(e), !y) + throw Kf(Gf(e) + " is not iterable"); + if (Uf(y)) { + for (h = 0, g = Jf(e); g > h; h++) + if (c = w(e[h]), c && ca(fa, c)) + return c; + return new br(false); + } + p2 = zf(e, y); + } + for (f = n ? e.next : p2.next; !(F = Wf(f, p2)).done; ) { + try { + c = w(F.value); + } catch (E) { + pa(p2, "throw", E); + } + if (typeof c == "object" && c && ca(fa, c)) + return c; + } + return new br(false); + }; + }); + var ga = xe((Py, da) => { + "use strict"; + var Yf = hr(), Qf = kt(), Zf = lr(); + da.exports = function(e, r, t2) { + var s = Yf(r); + s in e ? Qf.f(e, s, Zf(0, t2)) : e[s] = t2; + }; + }); + var ya = xe(() => { + var eD = Jt(), tD = ma(), rD = ga(); + eD({ target: "Object", stat: true }, { fromEntries: function(r) { + var t2 = {}; + return tD(r, function(s, a) { + rD(t2, s, a); + }, { AS_ENTRIES: true }), t2; + } }); + }); + var Ca = xe((Ly, va) => { + var ha = An(), nD = kt(); + va.exports = function(e, r, t2) { + return t2.get && ha(t2.get, r, { getter: true }), t2.set && ha(t2.set, r, { setter: true }), nD.f(e, r, t2); + }; + }); + var Fa = xe((Oy, Ea) => { + "use strict"; + var uD = Tt(); + Ea.exports = function() { + var e = uD(this), r = ""; + return e.hasIndices && (r += "d"), e.global && (r += "g"), e.ignoreCase && (r += "i"), e.multiline && (r += "m"), e.dotAll && (r += "s"), e.unicode && (r += "u"), e.unicodeSets && (r += "v"), e.sticky && (r += "y"), r; + }; + }); + var xa = xe(() => { + var sD = pt(), iD = yt(), aD = Ca(), oD = Fa(), lD = Dt(), Aa = sD.RegExp, Sa = Aa.prototype, cD = iD && lD(function() { + var e = true; + try { + Aa(".", "d"); + } catch { + e = false; + } + var r = {}, t2 = "", s = e ? "dgimsy" : "gimsy", a = function(l, p2) { + Object.defineProperty(r, l, { get: function() { + return t2 += p2, true; + } }); + }, n = { dotAll: "s", global: "g", ignoreCase: "i", multiline: "m", sticky: "y" }; + e && (n.hasIndices = "d"); + for (var u in n) + a(u, n[u]); + var i = Object.getOwnPropertyDescriptor(Sa, "flags").get.call(r); + return i !== s || t2 !== s; + }); + cD && aD(Sa, "flags", { configurable: true, get: oD }); + }); + var ba = xe(() => { + var pD = Jt(), kn = pt(); + pD({ global: true, forced: kn.globalThis !== kn }, { globalThis: kn }); + }); + var Ta = xe(() => { + ba(); + }); + var Ba = xe(() => { + "use strict"; + var fD = Jt(), DD = Bn(), mD = yr(), dD = Lt(), gD = Sr(), yD = _n(); + fD({ target: "Array", proto: true }, { flat: function() { + var r = arguments.length ? arguments[0] : void 0, t2 = mD(this), s = dD(t2), a = yD(t2, 0); + return a.length = DD(a, t2, t2, s, 0, r === void 0 ? 1 : gD(r)), a; + } }); + }); + var e0 = xe((Uy, jo) => { + var hD = ["cliName", "cliCategory", "cliDescription"], vD = ["_"], CD = ["languageId"]; + function Hn(e, r) { + if (e == null) + return {}; + var t2 = ED(e, r), s, a; + if (Object.getOwnPropertySymbols) { + var n = Object.getOwnPropertySymbols(e); + for (a = 0; a < n.length; a++) + s = n[a], !(r.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(e, s) && (t2[s] = e[s]); + } + return t2; + } + function ED(e, r) { + if (e == null) + return {}; + var t2 = {}, s = Object.keys(e), a, n; + for (n = 0; n < s.length; n++) + a = s[n], !(r.indexOf(a) >= 0) && (t2[a] = e[a]); + return t2; + } + Zi(); + ya(); + xa(); + Ta(); + Ba(); + var FD = Object.create, _r = Object.defineProperty, AD = Object.getOwnPropertyDescriptor, Gn = Object.getOwnPropertyNames, SD = Object.getPrototypeOf, xD = Object.prototype.hasOwnProperty, ht = (e, r) => function() { + return e && (r = (0, e[Gn(e)[0]])(e = 0)), r; + }, te = (e, r) => function() { + return r || (0, e[Gn(e)[0]])((r = { exports: {} }).exports, r), r.exports; + }, Kt = (e, r) => { + for (var t2 in r) + _r(e, t2, { get: r[t2], enumerable: true }); + }, Pa = (e, r, t2, s) => { + if (r && typeof r == "object" || typeof r == "function") + for (let a of Gn(r)) + !xD.call(e, a) && a !== t2 && _r(e, a, { get: () => r[a], enumerable: !(s = AD(r, a)) || s.enumerable }); + return e; + }, bD = (e, r, t2) => (t2 = e != null ? FD(SD(e)) : {}, Pa(r || !e || !e.__esModule ? _r(t2, "default", { value: e, enumerable: true }) : t2, e)), ft = (e) => Pa(_r({}, "__esModule", { value: true }), e), wt, ne = ht({ ""() { + wt = { env: {}, argv: [] }; + } }), Ia = te({ "package.json"(e, r) { + r.exports = { version: "2.8.8" }; + } }), TD = te({ "node_modules/diff/lib/diff/base.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.default = r; + function r() { + } + r.prototype = { diff: function(n, u) { + var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = i.callback; + typeof i == "function" && (l = i, i = {}), this.options = i; + var p2 = this; + function y(N) { + return l ? (setTimeout(function() { + l(void 0, N); + }, 0), true) : N; + } + n = this.castInput(n), u = this.castInput(u), n = this.removeEmpty(this.tokenize(n)), u = this.removeEmpty(this.tokenize(u)); + var h = u.length, g = n.length, c = 1, f = h + g, F = [{ newPos: -1, components: [] }], _ = this.extractCommon(F[0], u, n, 0); + if (F[0].newPos + 1 >= h && _ + 1 >= g) + return y([{ value: this.join(u), count: u.length }]); + function w() { + for (var N = -1 * c; N <= c; N += 2) { + var x = void 0, I = F[N - 1], P = F[N + 1], $ = (P ? P.newPos : 0) - N; + I && (F[N - 1] = void 0); + var D = I && I.newPos + 1 < h, T = P && 0 <= $ && $ < g; + if (!D && !T) { + F[N] = void 0; + continue; + } + if (!D || T && I.newPos < P.newPos ? (x = s(P), p2.pushComponent(x.components, void 0, true)) : (x = I, x.newPos++, p2.pushComponent(x.components, true, void 0)), $ = p2.extractCommon(x, u, n, N), x.newPos + 1 >= h && $ + 1 >= g) + return y(t2(p2, x.components, u, n, p2.useLongestToken)); + F[N] = x; + } + c++; + } + if (l) + (function N() { + setTimeout(function() { + if (c > f) + return l(); + w() || N(); + }, 0); + })(); + else + for (; c <= f; ) { + var E = w(); + if (E) + return E; + } + }, pushComponent: function(n, u, i) { + var l = n[n.length - 1]; + l && l.added === u && l.removed === i ? n[n.length - 1] = { count: l.count + 1, added: u, removed: i } : n.push({ count: 1, added: u, removed: i }); + }, extractCommon: function(n, u, i, l) { + for (var p2 = u.length, y = i.length, h = n.newPos, g = h - l, c = 0; h + 1 < p2 && g + 1 < y && this.equals(u[h + 1], i[g + 1]); ) + h++, g++, c++; + return c && n.components.push({ count: c }), n.newPos = h, g; + }, equals: function(n, u) { + return this.options.comparator ? this.options.comparator(n, u) : n === u || this.options.ignoreCase && n.toLowerCase() === u.toLowerCase(); + }, removeEmpty: function(n) { + for (var u = [], i = 0; i < n.length; i++) + n[i] && u.push(n[i]); + return u; + }, castInput: function(n) { + return n; + }, tokenize: function(n) { + return n.split(""); + }, join: function(n) { + return n.join(""); + } }; + function t2(a, n, u, i, l) { + for (var p2 = 0, y = n.length, h = 0, g = 0; p2 < y; p2++) { + var c = n[p2]; + if (c.removed) { + if (c.value = a.join(i.slice(g, g + c.count)), g += c.count, p2 && n[p2 - 1].added) { + var F = n[p2 - 1]; + n[p2 - 1] = n[p2], n[p2] = F; + } + } else { + if (!c.added && l) { + var f = u.slice(h, h + c.count); + f = f.map(function(w, E) { + var N = i[g + E]; + return N.length > w.length ? N : w; + }), c.value = a.join(f); + } else + c.value = a.join(u.slice(h, h + c.count)); + h += c.count, c.added || (g += c.count); + } + } + var _ = n[y - 1]; + return y > 1 && typeof _.value == "string" && (_.added || _.removed) && a.equals("", _.value) && (n[y - 2].value += _.value, n.pop()), n; + } + function s(a) { + return { newPos: a.newPos, components: a.components.slice(0) }; + } + } }), BD = te({ "node_modules/diff/lib/diff/array.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.diffArrays = a, e.arrayDiff = void 0; + var r = t2(TD()); + function t2(n) { + return n && n.__esModule ? n : { default: n }; + } + var s = new r.default(); + e.arrayDiff = s, s.tokenize = function(n) { + return n.slice(); + }, s.join = s.removeEmpty = function(n) { + return n; + }; + function a(n, u, i) { + return s.diff(n, u, i); + } + } }), Un = te({ "src/document/doc-builders.js"(e, r) { + "use strict"; + ne(); + function t2(C) { + return { type: "concat", parts: C }; + } + function s(C) { + return { type: "indent", contents: C }; + } + function a(C, o) { + return { type: "align", contents: o, n: C }; + } + function n(C) { + let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + return { type: "group", id: o.id, contents: C, break: Boolean(o.shouldBreak), expandedStates: o.expandedStates }; + } + function u(C) { + return a(Number.NEGATIVE_INFINITY, C); + } + function i(C) { + return a({ type: "root" }, C); + } + function l(C) { + return a(-1, C); + } + function p2(C, o) { + return n(C[0], Object.assign(Object.assign({}, o), {}, { expandedStates: C })); + } + function y(C) { + return { type: "fill", parts: C }; + } + function h(C, o) { + let d = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + return { type: "if-break", breakContents: C, flatContents: o, groupId: d.groupId }; + } + function g(C, o) { + return { type: "indent-if-break", contents: C, groupId: o.groupId, negate: o.negate }; + } + function c(C) { + return { type: "line-suffix", contents: C }; + } + var f = { type: "line-suffix-boundary" }, F = { type: "break-parent" }, _ = { type: "trim" }, w = { type: "line", hard: true }, E = { type: "line", hard: true, literal: true }, N = { type: "line" }, x = { type: "line", soft: true }, I = t2([w, F]), P = t2([E, F]), $ = { type: "cursor", placeholder: Symbol("cursor") }; + function D(C, o) { + let d = []; + for (let v = 0; v < o.length; v++) + v !== 0 && d.push(C), d.push(o[v]); + return t2(d); + } + function T(C, o, d) { + let v = C; + if (o > 0) { + for (let S = 0; S < Math.floor(o / d); ++S) + v = s(v); + v = a(o % d, v), v = a(Number.NEGATIVE_INFINITY, v); + } + return v; + } + function m(C, o) { + return { type: "label", label: C, contents: o }; + } + r.exports = { concat: t2, join: D, line: N, softline: x, hardline: I, literalline: P, group: n, conditionalGroup: p2, fill: y, lineSuffix: c, lineSuffixBoundary: f, cursor: $, breakParent: F, ifBreak: h, trim: _, indent: s, indentIfBreak: g, align: a, addAlignmentToDoc: T, markAsRoot: i, dedentToRoot: u, dedent: l, hardlineWithoutBreakParent: w, literallineWithoutBreakParent: E, label: m }; + } }), Jn = te({ "src/common/end-of-line.js"(e, r) { + "use strict"; + ne(); + function t2(u) { + let i = u.indexOf("\r"); + return i >= 0 ? u.charAt(i + 1) === ` +` ? "crlf" : "cr" : "lf"; + } + function s(u) { + switch (u) { + case "cr": + return "\r"; + case "crlf": + return `\r +`; + default: + return ` +`; + } + } + function a(u, i) { + let l; + switch (i) { + case ` +`: + l = /\n/g; + break; + case "\r": + l = /\r/g; + break; + case `\r +`: + l = /\r\n/g; + break; + default: + throw new Error(`Unexpected "eol" ${JSON.stringify(i)}.`); + } + let p2 = u.match(l); + return p2 ? p2.length : 0; + } + function n(u) { + return u.replace(/\r\n?/g, ` +`); + } + r.exports = { guessEndOfLine: t2, convertEndOfLineToChars: s, countEndOfLineChars: a, normalizeEndOfLine: n }; + } }), lt = te({ "src/utils/get-last.js"(e, r) { + "use strict"; + ne(); + var t2 = (s) => s[s.length - 1]; + r.exports = t2; + } }); + function ND() { + let { onlyFirst: e = false } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); + return new RegExp(r, e ? void 0 : "g"); + } + var wD = ht({ "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() { + ne(); + } }); + function _D(e) { + if (typeof e != "string") + throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``); + return e.replace(ND(), ""); + } + var PD = ht({ "node_modules/strip-ansi/index.js"() { + ne(), wD(); + } }); + function ID(e) { + return Number.isInteger(e) ? e >= 4352 && (e <= 4447 || e === 9001 || e === 9002 || 11904 <= e && e <= 12871 && e !== 12351 || 12880 <= e && e <= 19903 || 19968 <= e && e <= 42182 || 43360 <= e && e <= 43388 || 44032 <= e && e <= 55203 || 63744 <= e && e <= 64255 || 65040 <= e && e <= 65049 || 65072 <= e && e <= 65131 || 65281 <= e && e <= 65376 || 65504 <= e && e <= 65510 || 110592 <= e && e <= 110593 || 127488 <= e && e <= 127569 || 131072 <= e && e <= 262141) : false; + } + var kD = ht({ "node_modules/is-fullwidth-code-point/index.js"() { + ne(); + } }), LD = te({ "node_modules/emoji-regex/index.js"(e, r) { + "use strict"; + ne(), r.exports = function() { + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; + }; + } }), ka = {}; + Kt(ka, { default: () => OD }); + function OD(e) { + if (typeof e != "string" || e.length === 0 || (e = _D(e), e.length === 0)) + return 0; + e = e.replace((0, La.default)(), " "); + let r = 0; + for (let t2 = 0; t2 < e.length; t2++) { + let s = e.codePointAt(t2); + s <= 31 || s >= 127 && s <= 159 || s >= 768 && s <= 879 || (s > 65535 && t2++, r += ID(s) ? 2 : 1); + } + return r; + } + var La, jD = ht({ "node_modules/string-width/index.js"() { + ne(), PD(), kD(), La = bD(LD()); + } }), Oa = te({ "src/utils/get-string-width.js"(e, r) { + "use strict"; + ne(); + var t2 = (jD(), ft(ka)).default, s = /[^\x20-\x7F]/; + function a(n) { + return n ? s.test(n) ? t2(n) : n.length : 0; + } + r.exports = a; + } }), Yt = te({ "src/document/doc-utils.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { literalline: s, join: a } = Un(), n = (o) => Array.isArray(o) || o && o.type === "concat", u = (o) => { + if (Array.isArray(o)) + return o; + if (o.type !== "concat" && o.type !== "fill") + throw new Error("Expect doc type to be `concat` or `fill`."); + return o.parts; + }, i = {}; + function l(o, d, v, S) { + let b = [o]; + for (; b.length > 0; ) { + let B = b.pop(); + if (B === i) { + v(b.pop()); + continue; + } + if (v && b.push(B, i), !d || d(B) !== false) + if (n(B) || B.type === "fill") { + let k = u(B); + for (let M = k.length, R = M - 1; R >= 0; --R) + b.push(k[R]); + } else if (B.type === "if-break") + B.flatContents && b.push(B.flatContents), B.breakContents && b.push(B.breakContents); + else if (B.type === "group" && B.expandedStates) + if (S) + for (let k = B.expandedStates.length, M = k - 1; M >= 0; --M) + b.push(B.expandedStates[M]); + else + b.push(B.contents); + else + B.contents && b.push(B.contents); + } + } + function p2(o, d) { + let v = /* @__PURE__ */ new Map(); + return S(o); + function S(B) { + if (v.has(B)) + return v.get(B); + let k = b(B); + return v.set(B, k), k; + } + function b(B) { + if (Array.isArray(B)) + return d(B.map(S)); + if (B.type === "concat" || B.type === "fill") { + let k = B.parts.map(S); + return d(Object.assign(Object.assign({}, B), {}, { parts: k })); + } + if (B.type === "if-break") { + let k = B.breakContents && S(B.breakContents), M = B.flatContents && S(B.flatContents); + return d(Object.assign(Object.assign({}, B), {}, { breakContents: k, flatContents: M })); + } + if (B.type === "group" && B.expandedStates) { + let k = B.expandedStates.map(S), M = k[0]; + return d(Object.assign(Object.assign({}, B), {}, { contents: M, expandedStates: k })); + } + if (B.contents) { + let k = S(B.contents); + return d(Object.assign(Object.assign({}, B), {}, { contents: k })); + } + return d(B); + } + } + function y(o, d, v) { + let S = v, b = false; + function B(k) { + let M = d(k); + if (M !== void 0 && (b = true, S = M), b) + return false; + } + return l(o, B), S; + } + function h(o) { + if (o.type === "group" && o.break || o.type === "line" && o.hard || o.type === "break-parent") + return true; + } + function g(o) { + return y(o, h, false); + } + function c(o) { + if (o.length > 0) { + let d = t2(o); + !d.expandedStates && !d.break && (d.break = "propagated"); + } + return null; + } + function f(o) { + let d = /* @__PURE__ */ new Set(), v = []; + function S(B) { + if (B.type === "break-parent" && c(v), B.type === "group") { + if (v.push(B), d.has(B)) + return false; + d.add(B); + } + } + function b(B) { + B.type === "group" && v.pop().break && c(v); + } + l(o, S, b, true); + } + function F(o) { + return o.type === "line" && !o.hard ? o.soft ? "" : " " : o.type === "if-break" ? o.flatContents || "" : o; + } + function _(o) { + return p2(o, F); + } + var w = (o, d) => o && o.type === "line" && o.hard && d && d.type === "break-parent"; + function E(o) { + if (!o) + return o; + if (n(o) || o.type === "fill") { + let d = u(o); + for (; d.length > 1 && w(...d.slice(-2)); ) + d.length -= 2; + if (d.length > 0) { + let v = E(t2(d)); + d[d.length - 1] = v; + } + return Array.isArray(o) ? d : Object.assign(Object.assign({}, o), {}, { parts: d }); + } + switch (o.type) { + case "align": + case "indent": + case "indent-if-break": + case "group": + case "line-suffix": + case "label": { + let d = E(o.contents); + return Object.assign(Object.assign({}, o), {}, { contents: d }); + } + case "if-break": { + let d = E(o.breakContents), v = E(o.flatContents); + return Object.assign(Object.assign({}, o), {}, { breakContents: d, flatContents: v }); + } + } + return o; + } + function N(o) { + return E(I(o)); + } + function x(o) { + switch (o.type) { + case "fill": + if (o.parts.every((v) => v === "")) + return ""; + break; + case "group": + if (!o.contents && !o.id && !o.break && !o.expandedStates) + return ""; + if (o.contents.type === "group" && o.contents.id === o.id && o.contents.break === o.break && o.contents.expandedStates === o.expandedStates) + return o.contents; + break; + case "align": + case "indent": + case "indent-if-break": + case "line-suffix": + if (!o.contents) + return ""; + break; + case "if-break": + if (!o.flatContents && !o.breakContents) + return ""; + break; + } + if (!n(o)) + return o; + let d = []; + for (let v of u(o)) { + if (!v) + continue; + let [S, ...b] = n(v) ? u(v) : [v]; + typeof S == "string" && typeof t2(d) == "string" ? d[d.length - 1] += S : d.push(S), d.push(...b); + } + return d.length === 0 ? "" : d.length === 1 ? d[0] : Array.isArray(o) ? d : Object.assign(Object.assign({}, o), {}, { parts: d }); + } + function I(o) { + return p2(o, (d) => x(d)); + } + function P(o) { + let d = [], v = o.filter(Boolean); + for (; v.length > 0; ) { + let S = v.shift(); + if (S) { + if (n(S)) { + v.unshift(...u(S)); + continue; + } + if (d.length > 0 && typeof t2(d) == "string" && typeof S == "string") { + d[d.length - 1] += S; + continue; + } + d.push(S); + } + } + return d; + } + function $(o) { + return p2(o, (d) => Array.isArray(d) ? P(d) : d.parts ? Object.assign(Object.assign({}, d), {}, { parts: P(d.parts) }) : d); + } + function D(o) { + return p2(o, (d) => typeof d == "string" && d.includes(` +`) ? T(d) : d); + } + function T(o) { + let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : s; + return a(d, o.split(` +`)).parts; + } + function m(o) { + if (o.type === "line") + return true; + } + function C(o) { + return y(o, m, false); + } + r.exports = { isConcat: n, getDocParts: u, willBreak: g, traverseDoc: l, findInDoc: y, mapDoc: p2, propagateBreaks: f, removeLines: _, stripTrailingHardline: N, normalizeParts: P, normalizeDoc: $, cleanDoc: I, replaceTextEndOfLine: T, replaceEndOfLine: D, canBreak: C }; + } }), qD = te({ "src/document/doc-printer.js"(e, r) { + "use strict"; + ne(); + var { convertEndOfLineToChars: t2 } = Jn(), s = lt(), a = Oa(), { fill: n, cursor: u, indent: i } = Un(), { isConcat: l, getDocParts: p2 } = Yt(), y, h = 1, g = 2; + function c() { + return { value: "", length: 0, queue: [] }; + } + function f(x, I) { + return _(x, { type: "indent" }, I); + } + function F(x, I, P) { + return I === Number.NEGATIVE_INFINITY ? x.root || c() : I < 0 ? _(x, { type: "dedent" }, P) : I ? I.type === "root" ? Object.assign(Object.assign({}, x), {}, { root: x }) : _(x, { type: typeof I == "string" ? "stringAlign" : "numberAlign", n: I }, P) : x; + } + function _(x, I, P) { + let $ = I.type === "dedent" ? x.queue.slice(0, -1) : [...x.queue, I], D = "", T = 0, m = 0, C = 0; + for (let k of $) + switch (k.type) { + case "indent": + v(), P.useTabs ? o(1) : d(P.tabWidth); + break; + case "stringAlign": + v(), D += k.n, T += k.n.length; + break; + case "numberAlign": + m += 1, C += k.n; + break; + default: + throw new Error(`Unexpected type '${k.type}'`); + } + return b(), Object.assign(Object.assign({}, x), {}, { value: D, length: T, queue: $ }); + function o(k) { + D += " ".repeat(k), T += P.tabWidth * k; + } + function d(k) { + D += " ".repeat(k), T += k; + } + function v() { + P.useTabs ? S() : b(); + } + function S() { + m > 0 && o(m), B(); + } + function b() { + C > 0 && d(C), B(); + } + function B() { + m = 0, C = 0; + } + } + function w(x) { + if (x.length === 0) + return 0; + let I = 0; + for (; x.length > 0 && typeof s(x) == "string" && /^[\t ]*$/.test(s(x)); ) + I += x.pop().length; + if (x.length > 0 && typeof s(x) == "string") { + let P = s(x).replace(/[\t ]*$/, ""); + I += s(x).length - P.length, x[x.length - 1] = P; + } + return I; + } + function E(x, I, P, $, D) { + let T = I.length, m = [x], C = []; + for (; P >= 0; ) { + if (m.length === 0) { + if (T === 0) + return true; + m.push(I[--T]); + continue; + } + let { mode: o, doc: d } = m.pop(); + if (typeof d == "string") + C.push(d), P -= a(d); + else if (l(d) || d.type === "fill") { + let v = p2(d); + for (let S = v.length - 1; S >= 0; S--) + m.push({ mode: o, doc: v[S] }); + } else + switch (d.type) { + case "indent": + case "align": + case "indent-if-break": + case "label": + m.push({ mode: o, doc: d.contents }); + break; + case "trim": + P += w(C); + break; + case "group": { + if (D && d.break) + return false; + let v = d.break ? h : o, S = d.expandedStates && v === h ? s(d.expandedStates) : d.contents; + m.push({ mode: v, doc: S }); + break; + } + case "if-break": { + let S = (d.groupId ? y[d.groupId] || g : o) === h ? d.breakContents : d.flatContents; + S && m.push({ mode: o, doc: S }); + break; + } + case "line": + if (o === h || d.hard) + return true; + d.soft || (C.push(" "), P--); + break; + case "line-suffix": + $ = true; + break; + case "line-suffix-boundary": + if ($) + return false; + break; + } + } + return false; + } + function N(x, I) { + y = {}; + let P = I.printWidth, $ = t2(I.endOfLine), D = 0, T = [{ ind: c(), mode: h, doc: x }], m = [], C = false, o = []; + for (; T.length > 0; ) { + let { ind: v, mode: S, doc: b } = T.pop(); + if (typeof b == "string") { + let B = $ !== ` +` ? b.replace(/\n/g, $) : b; + m.push(B), D += a(B); + } else if (l(b)) { + let B = p2(b); + for (let k = B.length - 1; k >= 0; k--) + T.push({ ind: v, mode: S, doc: B[k] }); + } else + switch (b.type) { + case "cursor": + m.push(u.placeholder); + break; + case "indent": + T.push({ ind: f(v, I), mode: S, doc: b.contents }); + break; + case "align": + T.push({ ind: F(v, b.n, I), mode: S, doc: b.contents }); + break; + case "trim": + D -= w(m); + break; + case "group": + switch (S) { + case g: + if (!C) { + T.push({ ind: v, mode: b.break ? h : g, doc: b.contents }); + break; + } + case h: { + C = false; + let B = { ind: v, mode: g, doc: b.contents }, k = P - D, M = o.length > 0; + if (!b.break && E(B, T, k, M)) + T.push(B); + else if (b.expandedStates) { + let R = s(b.expandedStates); + if (b.break) { + T.push({ ind: v, mode: h, doc: R }); + break; + } else + for (let q = 1; q < b.expandedStates.length + 1; q++) + if (q >= b.expandedStates.length) { + T.push({ ind: v, mode: h, doc: R }); + break; + } else { + let J = b.expandedStates[q], L = { ind: v, mode: g, doc: J }; + if (E(L, T, k, M)) { + T.push(L); + break; + } + } + } else + T.push({ ind: v, mode: h, doc: b.contents }); + break; + } + } + b.id && (y[b.id] = s(T).mode); + break; + case "fill": { + let B = P - D, { parts: k } = b; + if (k.length === 0) + break; + let [M, R] = k, q = { ind: v, mode: g, doc: M }, J = { ind: v, mode: h, doc: M }, L = E(q, [], B, o.length > 0, true); + if (k.length === 1) { + L ? T.push(q) : T.push(J); + break; + } + let Q = { ind: v, mode: g, doc: R }, V = { ind: v, mode: h, doc: R }; + if (k.length === 2) { + L ? T.push(Q, q) : T.push(V, J); + break; + } + k.splice(0, 2); + let j = { ind: v, mode: S, doc: n(k) }, Y = k[0]; + E({ ind: v, mode: g, doc: [M, R, Y] }, [], B, o.length > 0, true) ? T.push(j, Q, q) : L ? T.push(j, V, q) : T.push(j, V, J); + break; + } + case "if-break": + case "indent-if-break": { + let B = b.groupId ? y[b.groupId] : S; + if (B === h) { + let k = b.type === "if-break" ? b.breakContents : b.negate ? b.contents : i(b.contents); + k && T.push({ ind: v, mode: S, doc: k }); + } + if (B === g) { + let k = b.type === "if-break" ? b.flatContents : b.negate ? i(b.contents) : b.contents; + k && T.push({ ind: v, mode: S, doc: k }); + } + break; + } + case "line-suffix": + o.push({ ind: v, mode: S, doc: b.contents }); + break; + case "line-suffix-boundary": + o.length > 0 && T.push({ ind: v, mode: S, doc: { type: "line", hard: true } }); + break; + case "line": + switch (S) { + case g: + if (b.hard) + C = true; + else { + b.soft || (m.push(" "), D += 1); + break; + } + case h: + if (o.length > 0) { + T.push({ ind: v, mode: S, doc: b }, ...o.reverse()), o.length = 0; + break; + } + b.literal ? v.root ? (m.push($, v.root.value), D = v.root.length) : (m.push($), D = 0) : (D -= w(m), m.push($ + v.value), D = v.length); + break; + } + break; + case "label": + T.push({ ind: v, mode: S, doc: b.contents }); + break; + default: + } + T.length === 0 && o.length > 0 && (T.push(...o.reverse()), o.length = 0); + } + let d = m.indexOf(u.placeholder); + if (d !== -1) { + let v = m.indexOf(u.placeholder, d + 1), S = m.slice(0, d).join(""), b = m.slice(d + 1, v).join(""), B = m.slice(v + 1).join(""); + return { formatted: S + b + B, cursorNodeStart: S.length, cursorNodeText: b }; + } + return { formatted: m.join("") }; + } + r.exports = { printDocToString: N }; + } }), MD = te({ "src/document/doc-debug.js"(e, r) { + "use strict"; + ne(); + var { isConcat: t2, getDocParts: s } = Yt(); + function a(u) { + if (!u) + return ""; + if (t2(u)) { + let i = []; + for (let l of s(u)) + if (t2(l)) + i.push(...a(l).parts); + else { + let p2 = a(l); + p2 !== "" && i.push(p2); + } + return { type: "concat", parts: i }; + } + return u.type === "if-break" ? Object.assign(Object.assign({}, u), {}, { breakContents: a(u.breakContents), flatContents: a(u.flatContents) }) : u.type === "group" ? Object.assign(Object.assign({}, u), {}, { contents: a(u.contents), expandedStates: u.expandedStates && u.expandedStates.map(a) }) : u.type === "fill" ? { type: "fill", parts: u.parts.map(a) } : u.contents ? Object.assign(Object.assign({}, u), {}, { contents: a(u.contents) }) : u; + } + function n(u) { + let i = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ new Set(); + return p2(a(u)); + function p2(h, g, c) { + if (typeof h == "string") + return JSON.stringify(h); + if (t2(h)) { + let f = s(h).map(p2).filter(Boolean); + return f.length === 1 ? f[0] : `[${f.join(", ")}]`; + } + if (h.type === "line") { + let f = Array.isArray(c) && c[g + 1] && c[g + 1].type === "break-parent"; + return h.literal ? f ? "literalline" : "literallineWithoutBreakParent" : h.hard ? f ? "hardline" : "hardlineWithoutBreakParent" : h.soft ? "softline" : "line"; + } + if (h.type === "break-parent") + return Array.isArray(c) && c[g - 1] && c[g - 1].type === "line" && c[g - 1].hard ? void 0 : "breakParent"; + if (h.type === "trim") + return "trim"; + if (h.type === "indent") + return "indent(" + p2(h.contents) + ")"; + if (h.type === "align") + return h.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + p2(h.contents) + ")" : h.n < 0 ? "dedent(" + p2(h.contents) + ")" : h.n.type === "root" ? "markAsRoot(" + p2(h.contents) + ")" : "align(" + JSON.stringify(h.n) + ", " + p2(h.contents) + ")"; + if (h.type === "if-break") + return "ifBreak(" + p2(h.breakContents) + (h.flatContents ? ", " + p2(h.flatContents) : "") + (h.groupId ? (h.flatContents ? "" : ', ""') + `, { groupId: ${y(h.groupId)} }` : "") + ")"; + if (h.type === "indent-if-break") { + let f = []; + h.negate && f.push("negate: true"), h.groupId && f.push(`groupId: ${y(h.groupId)}`); + let F = f.length > 0 ? `, { ${f.join(", ")} }` : ""; + return `indentIfBreak(${p2(h.contents)}${F})`; + } + if (h.type === "group") { + let f = []; + h.break && h.break !== "propagated" && f.push("shouldBreak: true"), h.id && f.push(`id: ${y(h.id)}`); + let F = f.length > 0 ? `, { ${f.join(", ")} }` : ""; + return h.expandedStates ? `conditionalGroup([${h.expandedStates.map((_) => p2(_)).join(",")}]${F})` : `group(${p2(h.contents)}${F})`; + } + if (h.type === "fill") + return `fill([${h.parts.map((f) => p2(f)).join(", ")}])`; + if (h.type === "line-suffix") + return "lineSuffix(" + p2(h.contents) + ")"; + if (h.type === "line-suffix-boundary") + return "lineSuffixBoundary"; + if (h.type === "label") + return `label(${JSON.stringify(h.label)}, ${p2(h.contents)})`; + throw new Error("Unknown doc type " + h.type); + } + function y(h) { + if (typeof h != "symbol") + return JSON.stringify(String(h)); + if (h in i) + return i[h]; + let g = String(h).slice(7, -1) || "symbol"; + for (let c = 0; ; c++) { + let f = g + (c > 0 ? ` #${c}` : ""); + if (!l.has(f)) + return l.add(f), i[h] = `Symbol.for(${JSON.stringify(f)})`; + } + } + } + r.exports = { printDocToDebug: n }; + } }), qe = te({ "src/document/index.js"(e, r) { + "use strict"; + ne(), r.exports = { builders: Un(), printer: qD(), utils: Yt(), debug: MD() }; + } }), ja = {}; + Kt(ja, { default: () => RD }); + function RD(e) { + if (typeof e != "string") + throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + var $D = ht({ "node_modules/escape-string-regexp/index.js"() { + ne(); + } }), qa = te({ "node_modules/semver/internal/debug.js"(e, r) { + ne(); + var t2 = typeof wt == "object" && wt.env && wt.env.NODE_DEBUG && /\bsemver\b/i.test(wt.env.NODE_DEBUG) ? function() { + for (var s = arguments.length, a = new Array(s), n = 0; n < s; n++) + a[n] = arguments[n]; + return console.error("SEMVER", ...a); + } : () => { + }; + r.exports = t2; + } }), Ma = te({ "node_modules/semver/internal/constants.js"(e, r) { + ne(); + var t2 = "2.0.0", s = 256, a = Number.MAX_SAFE_INTEGER || 9007199254740991, n = 16; + r.exports = { SEMVER_SPEC_VERSION: t2, MAX_LENGTH: s, MAX_SAFE_INTEGER: a, MAX_SAFE_COMPONENT_LENGTH: n }; + } }), VD = te({ "node_modules/semver/internal/re.js"(e, r) { + ne(); + var { MAX_SAFE_COMPONENT_LENGTH: t2 } = Ma(), s = qa(); + e = r.exports = {}; + var a = e.re = [], n = e.src = [], u = e.t = {}, i = 0, l = (p2, y, h) => { + let g = i++; + s(p2, g, y), u[p2] = g, n[g] = y, a[g] = new RegExp(y, h ? "g" : void 0); + }; + l("NUMERICIDENTIFIER", "0|[1-9]\\d*"), l("NUMERICIDENTIFIERLOOSE", "[0-9]+"), l("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"), l("MAINVERSION", `(${n[u.NUMERICIDENTIFIER]})\\.(${n[u.NUMERICIDENTIFIER]})\\.(${n[u.NUMERICIDENTIFIER]})`), l("MAINVERSIONLOOSE", `(${n[u.NUMERICIDENTIFIERLOOSE]})\\.(${n[u.NUMERICIDENTIFIERLOOSE]})\\.(${n[u.NUMERICIDENTIFIERLOOSE]})`), l("PRERELEASEIDENTIFIER", `(?:${n[u.NUMERICIDENTIFIER]}|${n[u.NONNUMERICIDENTIFIER]})`), l("PRERELEASEIDENTIFIERLOOSE", `(?:${n[u.NUMERICIDENTIFIERLOOSE]}|${n[u.NONNUMERICIDENTIFIER]})`), l("PRERELEASE", `(?:-(${n[u.PRERELEASEIDENTIFIER]}(?:\\.${n[u.PRERELEASEIDENTIFIER]})*))`), l("PRERELEASELOOSE", `(?:-?(${n[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[u.PRERELEASEIDENTIFIERLOOSE]})*))`), l("BUILDIDENTIFIER", "[0-9A-Za-z-]+"), l("BUILD", `(?:\\+(${n[u.BUILDIDENTIFIER]}(?:\\.${n[u.BUILDIDENTIFIER]})*))`), l("FULLPLAIN", `v?${n[u.MAINVERSION]}${n[u.PRERELEASE]}?${n[u.BUILD]}?`), l("FULL", `^${n[u.FULLPLAIN]}$`), l("LOOSEPLAIN", `[v=\\s]*${n[u.MAINVERSIONLOOSE]}${n[u.PRERELEASELOOSE]}?${n[u.BUILD]}?`), l("LOOSE", `^${n[u.LOOSEPLAIN]}$`), l("GTLT", "((?:<|>)?=?)"), l("XRANGEIDENTIFIERLOOSE", `${n[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), l("XRANGEIDENTIFIER", `${n[u.NUMERICIDENTIFIER]}|x|X|\\*`), l("XRANGEPLAIN", `[v=\\s]*(${n[u.XRANGEIDENTIFIER]})(?:\\.(${n[u.XRANGEIDENTIFIER]})(?:\\.(${n[u.XRANGEIDENTIFIER]})(?:${n[u.PRERELEASE]})?${n[u.BUILD]}?)?)?`), l("XRANGEPLAINLOOSE", `[v=\\s]*(${n[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[u.XRANGEIDENTIFIERLOOSE]})(?:${n[u.PRERELEASELOOSE]})?${n[u.BUILD]}?)?)?`), l("XRANGE", `^${n[u.GTLT]}\\s*${n[u.XRANGEPLAIN]}$`), l("XRANGELOOSE", `^${n[u.GTLT]}\\s*${n[u.XRANGEPLAINLOOSE]}$`), l("COERCE", `(^|[^\\d])(\\d{1,${t2}})(?:\\.(\\d{1,${t2}}))?(?:\\.(\\d{1,${t2}}))?(?:$|[^\\d])`), l("COERCERTL", n[u.COERCE], true), l("LONETILDE", "(?:~>?)"), l("TILDETRIM", `(\\s*)${n[u.LONETILDE]}\\s+`, true), e.tildeTrimReplace = "$1~", l("TILDE", `^${n[u.LONETILDE]}${n[u.XRANGEPLAIN]}$`), l("TILDELOOSE", `^${n[u.LONETILDE]}${n[u.XRANGEPLAINLOOSE]}$`), l("LONECARET", "(?:\\^)"), l("CARETTRIM", `(\\s*)${n[u.LONECARET]}\\s+`, true), e.caretTrimReplace = "$1^", l("CARET", `^${n[u.LONECARET]}${n[u.XRANGEPLAIN]}$`), l("CARETLOOSE", `^${n[u.LONECARET]}${n[u.XRANGEPLAINLOOSE]}$`), l("COMPARATORLOOSE", `^${n[u.GTLT]}\\s*(${n[u.LOOSEPLAIN]})$|^$`), l("COMPARATOR", `^${n[u.GTLT]}\\s*(${n[u.FULLPLAIN]})$|^$`), l("COMPARATORTRIM", `(\\s*)${n[u.GTLT]}\\s*(${n[u.LOOSEPLAIN]}|${n[u.XRANGEPLAIN]})`, true), e.comparatorTrimReplace = "$1$2$3", l("HYPHENRANGE", `^\\s*(${n[u.XRANGEPLAIN]})\\s+-\\s+(${n[u.XRANGEPLAIN]})\\s*$`), l("HYPHENRANGELOOSE", `^\\s*(${n[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[u.XRANGEPLAINLOOSE]})\\s*$`), l("STAR", "(<|>)?=?\\s*\\*"), l("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), l("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } }), WD = te({ "node_modules/semver/internal/parse-options.js"(e, r) { + ne(); + var t2 = ["includePrerelease", "loose", "rtl"], s = (a) => a ? typeof a != "object" ? { loose: true } : t2.filter((n) => a[n]).reduce((n, u) => (n[u] = true, n), {}) : {}; + r.exports = s; + } }), HD = te({ "node_modules/semver/internal/identifiers.js"(e, r) { + ne(); + var t2 = /^[0-9]+$/, s = (n, u) => { + let i = t2.test(n), l = t2.test(u); + return i && l && (n = +n, u = +u), n === u ? 0 : i && !l ? -1 : l && !i ? 1 : n < u ? -1 : 1; + }, a = (n, u) => s(u, n); + r.exports = { compareIdentifiers: s, rcompareIdentifiers: a }; + } }), GD = te({ "node_modules/semver/classes/semver.js"(e, r) { + ne(); + var t2 = qa(), { MAX_LENGTH: s, MAX_SAFE_INTEGER: a } = Ma(), { re: n, t: u } = VD(), i = WD(), { compareIdentifiers: l } = HD(), p2 = class { + constructor(y, h) { + if (h = i(h), y instanceof p2) { + if (y.loose === !!h.loose && y.includePrerelease === !!h.includePrerelease) + return y; + y = y.version; + } else if (typeof y != "string") + throw new TypeError(`Invalid Version: ${y}`); + if (y.length > s) + throw new TypeError(`version is longer than ${s} characters`); + t2("SemVer", y, h), this.options = h, this.loose = !!h.loose, this.includePrerelease = !!h.includePrerelease; + let g = y.trim().match(h.loose ? n[u.LOOSE] : n[u.FULL]); + if (!g) + throw new TypeError(`Invalid Version: ${y}`); + if (this.raw = y, this.major = +g[1], this.minor = +g[2], this.patch = +g[3], this.major > a || this.major < 0) + throw new TypeError("Invalid major version"); + if (this.minor > a || this.minor < 0) + throw new TypeError("Invalid minor version"); + if (this.patch > a || this.patch < 0) + throw new TypeError("Invalid patch version"); + g[4] ? this.prerelease = g[4].split(".").map((c) => { + if (/^[0-9]+$/.test(c)) { + let f = +c; + if (f >= 0 && f < a) + return f; + } + return c; + }) : this.prerelease = [], this.build = g[5] ? g[5].split(".") : [], this.format(); + } + format() { + return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version; + } + toString() { + return this.version; + } + compare(y) { + if (t2("SemVer.compare", this.version, this.options, y), !(y instanceof p2)) { + if (typeof y == "string" && y === this.version) + return 0; + y = new p2(y, this.options); + } + return y.version === this.version ? 0 : this.compareMain(y) || this.comparePre(y); + } + compareMain(y) { + return y instanceof p2 || (y = new p2(y, this.options)), l(this.major, y.major) || l(this.minor, y.minor) || l(this.patch, y.patch); + } + comparePre(y) { + if (y instanceof p2 || (y = new p2(y, this.options)), this.prerelease.length && !y.prerelease.length) + return -1; + if (!this.prerelease.length && y.prerelease.length) + return 1; + if (!this.prerelease.length && !y.prerelease.length) + return 0; + let h = 0; + do { + let g = this.prerelease[h], c = y.prerelease[h]; + if (t2("prerelease compare", h, g, c), g === void 0 && c === void 0) + return 0; + if (c === void 0) + return 1; + if (g === void 0) + return -1; + if (g === c) + continue; + return l(g, c); + } while (++h); + } + compareBuild(y) { + y instanceof p2 || (y = new p2(y, this.options)); + let h = 0; + do { + let g = this.build[h], c = y.build[h]; + if (t2("prerelease compare", h, g, c), g === void 0 && c === void 0) + return 0; + if (c === void 0) + return 1; + if (g === void 0) + return -1; + if (g === c) + continue; + return l(g, c); + } while (++h); + } + inc(y, h) { + switch (y) { + case "premajor": + this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", h); + break; + case "preminor": + this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", h); + break; + case "prepatch": + this.prerelease.length = 0, this.inc("patch", h), this.inc("pre", h); + break; + case "prerelease": + this.prerelease.length === 0 && this.inc("patch", h), this.inc("pre", h); + break; + case "major": + (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = []; + break; + case "minor": + (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = []; + break; + case "patch": + this.prerelease.length === 0 && this.patch++, this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + let g = this.prerelease.length; + for (; --g >= 0; ) + typeof this.prerelease[g] == "number" && (this.prerelease[g]++, g = -2); + g === -1 && this.prerelease.push(0); + } + h && (l(this.prerelease[0], h) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = [h, 0]) : this.prerelease = [h, 0]); + break; + default: + throw new Error(`invalid increment argument: ${y}`); + } + return this.format(), this.raw = this.version, this; + } + }; + r.exports = p2; + } }), zn = te({ "node_modules/semver/functions/compare.js"(e, r) { + ne(); + var t2 = GD(), s = (a, n, u) => new t2(a, u).compare(new t2(n, u)); + r.exports = s; + } }), UD = te({ "node_modules/semver/functions/lt.js"(e, r) { + ne(); + var t2 = zn(), s = (a, n, u) => t2(a, n, u) < 0; + r.exports = s; + } }), JD = te({ "node_modules/semver/functions/gte.js"(e, r) { + ne(); + var t2 = zn(), s = (a, n, u) => t2(a, n, u) >= 0; + r.exports = s; + } }), zD = te({ "src/utils/arrayify.js"(e, r) { + "use strict"; + ne(), r.exports = (t2, s) => Object.entries(t2).map((a) => { + let [n, u] = a; + return Object.assign({ [s]: n }, u); + }); + } }), XD = te({ "node_modules/outdent/lib/index.js"(e, r) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.outdent = void 0; + function t2() { + for (var E = [], N = 0; N < arguments.length; N++) + E[N] = arguments[N]; + } + function s() { + return typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : a(); + } + function a() { + return { add: t2, delete: t2, get: t2, set: t2, has: function(E) { + return false; + } }; + } + var n = Object.prototype.hasOwnProperty, u = function(E, N) { + return n.call(E, N); + }; + function i(E, N) { + for (var x in N) + u(N, x) && (E[x] = N[x]); + return E; + } + var l = /^[ \t]*(?:\r\n|\r|\n)/, p2 = /(?:\r\n|\r|\n)[ \t]*$/, y = /^(?:[\r\n]|$)/, h = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/, g = /^[ \t]*[\r\n][ \t\r\n]*$/; + function c(E, N, x) { + var I = 0, P = E[0].match(h); + P && (I = P[1].length); + var $ = "(\\r\\n|\\r|\\n).{0," + I + "}", D = new RegExp($, "g"); + N && (E = E.slice(1)); + var T = x.newline, m = x.trimLeadingNewline, C = x.trimTrailingNewline, o = typeof T == "string", d = E.length, v = E.map(function(S, b) { + return S = S.replace(D, "$1"), b === 0 && m && (S = S.replace(l, "")), b === d - 1 && C && (S = S.replace(p2, "")), o && (S = S.replace(/\r\n|\n|\r/g, function(B) { + return T; + })), S; + }); + return v; + } + function f(E, N) { + for (var x = "", I = 0, P = E.length; I < P; I++) + x += E[I], I < P - 1 && (x += N[I]); + return x; + } + function F(E) { + return u(E, "raw") && u(E, "length"); + } + function _(E) { + var N = s(), x = s(); + function I($) { + for (var D = [], T = 1; T < arguments.length; T++) + D[T - 1] = arguments[T]; + if (F($)) { + var m = $, C = (D[0] === I || D[0] === w) && g.test(m[0]) && y.test(m[1]), o = C ? x : N, d = o.get(m); + if (d || (d = c(m, C, E), o.set(m, d)), D.length === 0) + return d[0]; + var v = f(d, C ? D.slice(1) : D); + return v; + } else + return _(i(i({}, E), $ || {})); + } + var P = i(I, { string: function($) { + return c([$], false, E)[0]; + } }); + return P; + } + var w = _({ trimLeadingNewline: true, trimTrailingNewline: true }); + if (e.outdent = w, e.default = w, typeof r < "u") + try { + r.exports = w, Object.defineProperty(w, "__esModule", { value: true }), w.default = w, w.outdent = w; + } catch { + } + } }), KD = te({ "src/main/core-options.js"(e, r) { + "use strict"; + ne(); + var { outdent: t2 } = XD(), s = "Config", a = "Editor", n = "Format", u = "Other", i = "Output", l = "Global", p2 = "Special", y = { cursorOffset: { since: "1.4.0", category: p2, type: "int", default: -1, range: { start: -1, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Print (to stderr) where a cursor at the given position would move to after formatting. + This option cannot be used with --range-start and --range-end. + `, cliCategory: a }, endOfLine: { since: "1.15.0", category: l, type: "choice", default: [{ since: "1.15.0", value: "auto" }, { since: "2.0.0", value: "lf" }], description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: t2` + Maintain existing + (mixed values within one file are normalised by looking at what's used after the first line) + ` }] }, filepath: { since: "1.4.0", category: p2, type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: u, cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { since: "1.8.0", category: p2, type: "boolean", default: false, description: "Insert @format pragma into file's first docblock comment.", cliCategory: u }, parser: { since: "0.0.10", category: l, type: "choice", default: [{ since: "0.0.10", value: "babylon" }, { since: "1.13.0", value: void 0 }], description: "Which parser to use.", exception: (h) => typeof h == "string" || typeof h == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", since: "1.16.0", description: "JavaScript" }, { value: "babel-flow", since: "1.16.0", description: "Flow" }, { value: "babel-ts", since: "2.0.0", description: "TypeScript" }, { value: "typescript", since: "1.4.0", description: "TypeScript" }, { value: "acorn", since: "2.6.0", description: "JavaScript" }, { value: "espree", since: "2.2.0", description: "JavaScript" }, { value: "meriyah", since: "2.2.0", description: "JavaScript" }, { value: "css", since: "1.7.1", description: "CSS" }, { value: "less", since: "1.7.1", description: "Less" }, { value: "scss", since: "1.7.1", description: "SCSS" }, { value: "json", since: "1.5.0", description: "JSON" }, { value: "json5", since: "1.13.0", description: "JSON5" }, { value: "json-stringify", since: "1.13.0", description: "JSON.stringify" }, { value: "graphql", since: "1.5.0", description: "GraphQL" }, { value: "markdown", since: "1.8.0", description: "Markdown" }, { value: "mdx", since: "1.15.0", description: "MDX" }, { value: "vue", since: "1.10.0", description: "Vue" }, { value: "yaml", since: "1.14.0", description: "YAML" }, { value: "glimmer", since: "2.3.0", description: "Ember / Handlebars" }, { value: "html", since: "1.15.0", description: "HTML" }, { value: "angular", since: "1.15.0", description: "Angular" }, { value: "lwc", since: "1.17.0", description: "Lightning Web Components" }] }, plugins: { since: "1.10.0", type: "path", array: true, default: [{ value: [] }], category: l, description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (h) => typeof h == "string" || typeof h == "object", cliName: "plugin", cliCategory: s }, pluginSearchDirs: { since: "1.13.0", type: "path", array: true, default: [{ value: [] }], category: l, description: t2` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `, exception: (h) => typeof h == "string" || typeof h == "object", cliName: "plugin-search-dir", cliCategory: s }, printWidth: { since: "0.0.0", category: l, type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 } }, rangeEnd: { since: "1.4.0", category: p2, type: "int", default: Number.POSITIVE_INFINITY, range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `, cliCategory: a }, rangeStart: { since: "1.4.0", category: p2, type: "int", default: 0, range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `, cliCategory: a }, requirePragma: { since: "1.7.0", category: p2, type: "boolean", default: false, description: t2` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `, cliCategory: u }, tabWidth: { type: "int", category: l, default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 } }, useTabs: { since: "1.0.0", category: l, type: "boolean", default: false, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { since: "2.1.0", category: l, type: "choice", default: [{ since: "2.1.0", value: "auto" }], description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } }; + r.exports = { CATEGORY_CONFIG: s, CATEGORY_EDITOR: a, CATEGORY_FORMAT: n, CATEGORY_OTHER: u, CATEGORY_OUTPUT: i, CATEGORY_GLOBAL: l, CATEGORY_SPECIAL: p2, options: y }; + } }), Xn = te({ "src/main/support.js"(e, r) { + "use strict"; + ne(); + var t2 = { compare: zn(), lt: UD(), gte: JD() }, s = zD(), a = Ia().version, n = KD().options; + function u() { + let { plugins: l = [], showUnreleased: p2 = false, showDeprecated: y = false, showInternal: h = false } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, g = a.split("-", 1)[0], c = l.flatMap((E) => E.languages || []).filter(F), f = s(Object.assign({}, ...l.map((E) => { + let { options: N } = E; + return N; + }), n), "name").filter((E) => F(E) && _(E)).sort((E, N) => E.name === N.name ? 0 : E.name < N.name ? -1 : 1).map(w).map((E) => { + E = Object.assign({}, E), Array.isArray(E.default) && (E.default = E.default.length === 1 ? E.default[0].value : E.default.filter(F).sort((x, I) => t2.compare(I.since, x.since))[0].value), Array.isArray(E.choices) && (E.choices = E.choices.filter((x) => F(x) && _(x)), E.name === "parser" && i(E, c, l)); + let N = Object.fromEntries(l.filter((x) => x.defaultOptions && x.defaultOptions[E.name] !== void 0).map((x) => [x.name, x.defaultOptions[E.name]])); + return Object.assign(Object.assign({}, E), {}, { pluginDefaults: N }); + }); + return { languages: c, options: f }; + function F(E) { + return p2 || !("since" in E) || E.since && t2.gte(g, E.since); + } + function _(E) { + return y || !("deprecated" in E) || E.deprecated && t2.lt(g, E.deprecated); + } + function w(E) { + if (h) + return E; + let { cliName: N, cliCategory: x, cliDescription: I } = E; + return Hn(E, hD); + } + } + function i(l, p2, y) { + let h = new Set(l.choices.map((g) => g.value)); + for (let g of p2) + if (g.parsers) { + for (let c of g.parsers) + if (!h.has(c)) { + h.add(c); + let f = y.find((_) => _.parsers && _.parsers[c]), F = g.name; + f && f.name && (F += ` (plugin: ${f.name})`), l.choices.push({ value: c, description: F }); + } + } + } + r.exports = { getSupportInfo: u }; + } }), Kn = te({ "src/utils/is-non-empty-array.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return Array.isArray(s) && s.length > 0; + } + r.exports = t2; + } }), Pr = te({ "src/utils/text/skip.js"(e, r) { + "use strict"; + ne(); + function t2(i) { + return (l, p2, y) => { + let h = y && y.backwards; + if (p2 === false) + return false; + let { length: g } = l, c = p2; + for (; c >= 0 && c < g; ) { + let f = l.charAt(c); + if (i instanceof RegExp) { + if (!i.test(f)) + return c; + } else if (!i.includes(f)) + return c; + h ? c-- : c++; + } + return c === -1 || c === g ? c : false; + }; + } + var s = t2(/\s/), a = t2(" "), n = t2(",; "), u = t2(/[^\n\r]/); + r.exports = { skipWhitespace: s, skipSpaces: a, skipToLineEnd: n, skipEverythingButNewLine: u }; + } }), Ra = te({ "src/utils/text/skip-inline-comment.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + if (a === false) + return false; + if (s.charAt(a) === "/" && s.charAt(a + 1) === "*") { + for (let n = a + 2; n < s.length; ++n) + if (s.charAt(n) === "*" && s.charAt(n + 1) === "/") + return n + 2; + } + return a; + } + r.exports = t2; + } }), $a = te({ "src/utils/text/skip-trailing-comment.js"(e, r) { + "use strict"; + ne(); + var { skipEverythingButNewLine: t2 } = Pr(); + function s(a, n) { + return n === false ? false : a.charAt(n) === "/" && a.charAt(n + 1) === "/" ? t2(a, n) : n; + } + r.exports = s; + } }), Va = te({ "src/utils/text/skip-newline.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n) { + let u = n && n.backwards; + if (a === false) + return false; + let i = s.charAt(a); + if (u) { + if (s.charAt(a - 1) === "\r" && i === ` +`) + return a - 2; + if (i === ` +` || i === "\r" || i === "\u2028" || i === "\u2029") + return a - 1; + } else { + if (i === "\r" && s.charAt(a + 1) === ` +`) + return a + 2; + if (i === ` +` || i === "\r" || i === "\u2028" || i === "\u2029") + return a + 1; + } + return a; + } + r.exports = t2; + } }), YD = te({ "src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(e, r) { + "use strict"; + ne(); + var t2 = Ra(), s = Va(), a = $a(), { skipSpaces: n } = Pr(); + function u(i, l) { + let p2 = null, y = l; + for (; y !== p2; ) + p2 = y, y = n(i, y), y = t2(i, y), y = a(i, y), y = s(i, y); + return y; + } + r.exports = u; + } }), Ue = te({ "src/common/util.js"(e, r) { + "use strict"; + ne(); + var { default: t2 } = ($D(), ft(ja)), s = lt(), { getSupportInfo: a } = Xn(), n = Kn(), u = Oa(), { skipWhitespace: i, skipSpaces: l, skipToLineEnd: p2, skipEverythingButNewLine: y } = Pr(), h = Ra(), g = $a(), c = Va(), f = YD(), F = (V) => V[V.length - 2]; + function _(V) { + return (j, Y, ie) => { + let ee = ie && ie.backwards; + if (Y === false) + return false; + let { length: ce } = j, W = Y; + for (; W >= 0 && W < ce; ) { + let K = j.charAt(W); + if (V instanceof RegExp) { + if (!V.test(K)) + return W; + } else if (!V.includes(K)) + return W; + ee ? W-- : W++; + } + return W === -1 || W === ce ? W : false; + }; + } + function w(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, ie = l(V, Y.backwards ? j - 1 : j, Y), ee = c(V, ie, Y); + return ie !== ee; + } + function E(V, j, Y) { + for (let ie = j; ie < Y; ++ie) + if (V.charAt(ie) === ` +`) + return true; + return false; + } + function N(V, j, Y) { + let ie = Y(j) - 1; + ie = l(V, ie, { backwards: true }), ie = c(V, ie, { backwards: true }), ie = l(V, ie, { backwards: true }); + let ee = c(V, ie, { backwards: true }); + return ie !== ee; + } + function x(V, j) { + let Y = null, ie = j; + for (; ie !== Y; ) + Y = ie, ie = p2(V, ie), ie = h(V, ie), ie = l(V, ie); + return ie = g(V, ie), ie = c(V, ie), ie !== false && w(V, ie); + } + function I(V, j, Y) { + return x(V, Y(j)); + } + function P(V, j, Y) { + return f(V, Y(j)); + } + function $(V, j, Y) { + return V.charAt(P(V, j, Y)); + } + function D(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + return l(V, Y.backwards ? j - 1 : j, Y) !== j; + } + function T(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, ie = 0; + for (let ee = Y; ee < V.length; ++ee) + V[ee] === " " ? ie = ie + j - ie % j : ie++; + return ie; + } + function m(V, j) { + let Y = V.lastIndexOf(` +`); + return Y === -1 ? 0 : T(V.slice(Y + 1).match(/^[\t ]*/)[0], j); + } + function C(V, j) { + let Y = { quote: '"', regex: /"/g, escaped: """ }, ie = { quote: "'", regex: /'/g, escaped: "'" }, ee = j === "'" ? ie : Y, ce = ee === ie ? Y : ie, W = ee; + if (V.includes(ee.quote) || V.includes(ce.quote)) { + let K = (V.match(ee.regex) || []).length, de = (V.match(ce.regex) || []).length; + W = K > de ? ce : ee; + } + return W; + } + function o(V, j) { + let Y = V.slice(1, -1), ie = j.parser === "json" || j.parser === "json5" && j.quoteProps === "preserve" && !j.singleQuote ? '"' : j.__isInHtmlAttribute ? "'" : C(Y, j.singleQuote ? "'" : '"').quote; + return d(Y, ie, !(j.parser === "css" || j.parser === "less" || j.parser === "scss" || j.__embeddedInHtml)); + } + function d(V, j, Y) { + let ie = j === '"' ? "'" : '"', ee = /\\(.)|(["'])/gs, ce = V.replace(ee, (W, K, de) => K === ie ? K : de === j ? "\\" + de : de || (Y && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(K) ? K : "\\" + K)); + return j + ce + j; + } + function v(V) { + return V.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1").replace(/^([+-])?\./, "$10.").replace(/(\.\d+?)0+(?=e|$)/, "$1").replace(/\.(?=e|$)/, ""); + } + function S(V, j) { + let Y = V.match(new RegExp(`(${t2(j)})+`, "g")); + return Y === null ? 0 : Y.reduce((ie, ee) => Math.max(ie, ee.length / j.length), 0); + } + function b(V, j) { + let Y = V.match(new RegExp(`(${t2(j)})+`, "g")); + if (Y === null) + return 0; + let ie = /* @__PURE__ */ new Map(), ee = 0; + for (let ce of Y) { + let W = ce.length / j.length; + ie.set(W, true), W > ee && (ee = W); + } + for (let ce = 1; ce < ee; ce++) + if (!ie.get(ce)) + return ce; + return ee + 1; + } + function B(V, j) { + (V.comments || (V.comments = [])).push(j), j.printed = false, j.nodeDescription = Q(V); + } + function k(V, j) { + j.leading = true, j.trailing = false, B(V, j); + } + function M(V, j, Y) { + j.leading = false, j.trailing = false, Y && (j.marker = Y), B(V, j); + } + function R(V, j) { + j.leading = false, j.trailing = true, B(V, j); + } + function q(V, j) { + let { languages: Y } = a({ plugins: j.plugins }), ie = Y.find((ee) => { + let { name: ce } = ee; + return ce.toLowerCase() === V; + }) || Y.find((ee) => { + let { aliases: ce } = ee; + return Array.isArray(ce) && ce.includes(V); + }) || Y.find((ee) => { + let { extensions: ce } = ee; + return Array.isArray(ce) && ce.includes(`.${V}`); + }); + return ie && ie.parsers[0]; + } + function J(V) { + return V && V.type === "front-matter"; + } + function L(V) { + let j = /* @__PURE__ */ new WeakMap(); + return function(Y) { + return j.has(Y) || j.set(Y, Symbol(V)), j.get(Y); + }; + } + function Q(V) { + let j = V.type || V.kind || "(unknown type)", Y = String(V.name || V.id && (typeof V.id == "object" ? V.id.name : V.id) || V.key && (typeof V.key == "object" ? V.key.name : V.key) || V.value && (typeof V.value == "object" ? "" : String(V.value)) || V.operator || ""); + return Y.length > 20 && (Y = Y.slice(0, 19) + "\u2026"), j + (Y ? " " + Y : ""); + } + r.exports = { inferParserByLanguage: q, getStringWidth: u, getMaxContinuousCount: S, getMinNotPresentContinuousCount: b, getPenultimate: F, getLast: s, getNextNonSpaceNonCommentCharacterIndexWithStartIndex: f, getNextNonSpaceNonCommentCharacterIndex: P, getNextNonSpaceNonCommentCharacter: $, skip: _, skipWhitespace: i, skipSpaces: l, skipToLineEnd: p2, skipEverythingButNewLine: y, skipInlineComment: h, skipTrailingComment: g, skipNewline: c, isNextLineEmptyAfterIndex: x, isNextLineEmpty: I, isPreviousLineEmpty: N, hasNewline: w, hasNewlineInRange: E, hasSpaces: D, getAlignmentSize: T, getIndentSize: m, getPreferredQuote: C, printString: o, printNumber: v, makeString: d, addLeadingComment: k, addDanglingComment: M, addTrailingComment: R, isFrontMatterNode: J, isNonEmptyArray: n, createGroupIdMapper: L }; + } }), Wa = {}; + Kt(Wa, { basename: () => za, default: () => Ka, delimiter: () => Mn, dirname: () => Ja, extname: () => Xa, isAbsolute: () => Qn, join: () => Ga, normalize: () => Yn, relative: () => Ua, resolve: () => wr, sep: () => qn }); + function Ha(e, r) { + for (var t2 = 0, s = e.length - 1; s >= 0; s--) { + var a = e[s]; + a === "." ? e.splice(s, 1) : a === ".." ? (e.splice(s, 1), t2++) : t2 && (e.splice(s, 1), t2--); + } + if (r) + for (; t2--; t2) + e.unshift(".."); + return e; + } + function wr() { + for (var e = "", r = false, t2 = arguments.length - 1; t2 >= -1 && !r; t2--) { + var s = t2 >= 0 ? arguments[t2] : "/"; + if (typeof s != "string") + throw new TypeError("Arguments to path.resolve must be strings"); + if (!s) + continue; + e = s + "/" + e, r = s.charAt(0) === "/"; + } + return e = Ha(Zn(e.split("/"), function(a) { + return !!a; + }), !r).join("/"), (r ? "/" : "") + e || "."; + } + function Yn(e) { + var r = Qn(e), t2 = Ya(e, -1) === "/"; + return e = Ha(Zn(e.split("/"), function(s) { + return !!s; + }), !r).join("/"), !e && !r && (e = "."), e && t2 && (e += "/"), (r ? "/" : "") + e; + } + function Qn(e) { + return e.charAt(0) === "/"; + } + function Ga() { + var e = Array.prototype.slice.call(arguments, 0); + return Yn(Zn(e, function(r, t2) { + if (typeof r != "string") + throw new TypeError("Arguments to path.join must be strings"); + return r; + }).join("/")); + } + function Ua(e, r) { + e = wr(e).substr(1), r = wr(r).substr(1); + function t2(p2) { + for (var y = 0; y < p2.length && p2[y] === ""; y++) + ; + for (var h = p2.length - 1; h >= 0 && p2[h] === ""; h--) + ; + return y > h ? [] : p2.slice(y, h - y + 1); + } + for (var s = t2(e.split("/")), a = t2(r.split("/")), n = Math.min(s.length, a.length), u = n, i = 0; i < n; i++) + if (s[i] !== a[i]) { + u = i; + break; + } + for (var l = [], i = u; i < s.length; i++) + l.push(".."); + return l = l.concat(a.slice(u)), l.join("/"); + } + function Ja(e) { + var r = Ir(e), t2 = r[0], s = r[1]; + return !t2 && !s ? "." : (s && (s = s.substr(0, s.length - 1)), t2 + s); + } + function za(e, r) { + var t2 = Ir(e)[2]; + return r && t2.substr(-1 * r.length) === r && (t2 = t2.substr(0, t2.length - r.length)), t2; + } + function Xa(e) { + return Ir(e)[3]; + } + function Zn(e, r) { + if (e.filter) + return e.filter(r); + for (var t2 = [], s = 0; s < e.length; s++) + r(e[s], s, e) && t2.push(e[s]); + return t2; + } + var Na, Ir, qn, Mn, Ka, Ya, QD = ht({ "node-modules-polyfills:path"() { + ne(), Na = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, Ir = function(e) { + return Na.exec(e).slice(1); + }, qn = "/", Mn = ":", Ka = { extname: Xa, basename: za, dirname: Ja, sep: qn, delimiter: Mn, relative: Ua, join: Ga, isAbsolute: Qn, normalize: Yn, resolve: wr }, Ya = "ab".substr(-1) === "b" ? function(e, r, t2) { + return e.substr(r, t2); + } : function(e, r, t2) { + return r < 0 && (r = e.length + r), e.substr(r, t2); + }; + } }), ZD = te({ "node-modules-polyfills-commonjs:path"(e, r) { + ne(); + var t2 = (QD(), ft(Wa)); + if (t2 && t2.default) { + r.exports = t2.default; + for (let s in t2) + r.exports[s] = t2[s]; + } else + t2 && (r.exports = t2); + } }), Qt = te({ "src/common/errors.js"(e, r) { + "use strict"; + ne(); + var t2 = class extends Error { + }, s = class extends Error { + }, a = class extends Error { + }, n = class extends Error { + }; + r.exports = { ConfigError: t2, DebugError: s, UndefinedParserError: a, ArgExpansionBailout: n }; + } }), vt = {}; + Kt(vt, { __assign: () => Nr, __asyncDelegator: () => fm, __asyncGenerator: () => pm, __asyncValues: () => Dm, __await: () => Xt, __awaiter: () => sm, __classPrivateFieldGet: () => ym, __classPrivateFieldSet: () => hm, __createBinding: () => am, __decorate: () => rm, __exportStar: () => om, __extends: () => em, __generator: () => im, __importDefault: () => gm, __importStar: () => dm, __makeTemplateObject: () => mm, __metadata: () => um, __param: () => nm, __read: () => Qa, __rest: () => tm, __spread: () => lm, __spreadArrays: () => cm, __values: () => Rn }); + function em(e, r) { + Br(e, r); + function t2() { + this.constructor = e; + } + e.prototype = r === null ? Object.create(r) : (t2.prototype = r.prototype, new t2()); + } + function tm(e, r) { + var t2 = {}; + for (var s in e) + Object.prototype.hasOwnProperty.call(e, s) && r.indexOf(s) < 0 && (t2[s] = e[s]); + if (e != null && typeof Object.getOwnPropertySymbols == "function") + for (var a = 0, s = Object.getOwnPropertySymbols(e); a < s.length; a++) + r.indexOf(s[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, s[a]) && (t2[s[a]] = e[s[a]]); + return t2; + } + function rm(e, r, t2, s) { + var a = arguments.length, n = a < 3 ? r : s === null ? s = Object.getOwnPropertyDescriptor(r, t2) : s, u; + if (typeof Reflect == "object" && typeof Reflect.decorate == "function") + n = Reflect.decorate(e, r, t2, s); + else + for (var i = e.length - 1; i >= 0; i--) + (u = e[i]) && (n = (a < 3 ? u(n) : a > 3 ? u(r, t2, n) : u(r, t2)) || n); + return a > 3 && n && Object.defineProperty(r, t2, n), n; + } + function nm(e, r) { + return function(t2, s) { + r(t2, s, e); + }; + } + function um(e, r) { + if (typeof Reflect == "object" && typeof Reflect.metadata == "function") + return Reflect.metadata(e, r); + } + function sm(e, r, t2, s) { + function a(n) { + return n instanceof t2 ? n : new t2(function(u) { + u(n); + }); + } + return new (t2 || (t2 = Promise))(function(n, u) { + function i(y) { + try { + p2(s.next(y)); + } catch (h) { + u(h); + } + } + function l(y) { + try { + p2(s.throw(y)); + } catch (h) { + u(h); + } + } + function p2(y) { + y.done ? n(y.value) : a(y.value).then(i, l); + } + p2((s = s.apply(e, r || [])).next()); + }); + } + function im(e, r) { + var t2 = { label: 0, sent: function() { + if (n[0] & 1) + throw n[1]; + return n[1]; + }, trys: [], ops: [] }, s, a, n, u; + return u = { next: i(0), throw: i(1), return: i(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() { + return this; + }), u; + function i(p2) { + return function(y) { + return l([p2, y]); + }; + } + function l(p2) { + if (s) + throw new TypeError("Generator is already executing."); + for (; t2; ) + try { + if (s = 1, a && (n = p2[0] & 2 ? a.return : p2[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, p2[1])).done) + return n; + switch (a = 0, n && (p2 = [p2[0] & 2, n.value]), p2[0]) { + case 0: + case 1: + n = p2; + break; + case 4: + return t2.label++, { value: p2[1], done: false }; + case 5: + t2.label++, a = p2[1], p2 = [0]; + continue; + case 7: + p2 = t2.ops.pop(), t2.trys.pop(); + continue; + default: + if (n = t2.trys, !(n = n.length > 0 && n[n.length - 1]) && (p2[0] === 6 || p2[0] === 2)) { + t2 = 0; + continue; + } + if (p2[0] === 3 && (!n || p2[1] > n[0] && p2[1] < n[3])) { + t2.label = p2[1]; + break; + } + if (p2[0] === 6 && t2.label < n[1]) { + t2.label = n[1], n = p2; + break; + } + if (n && t2.label < n[2]) { + t2.label = n[2], t2.ops.push(p2); + break; + } + n[2] && t2.ops.pop(), t2.trys.pop(); + continue; + } + p2 = r.call(e, t2); + } catch (y) { + p2 = [6, y], a = 0; + } finally { + s = n = 0; + } + if (p2[0] & 5) + throw p2[1]; + return { value: p2[0] ? p2[1] : void 0, done: true }; + } + } + function am(e, r, t2, s) { + s === void 0 && (s = t2), e[s] = r[t2]; + } + function om(e, r) { + for (var t2 in e) + t2 !== "default" && !r.hasOwnProperty(t2) && (r[t2] = e[t2]); + } + function Rn(e) { + var r = typeof Symbol == "function" && Symbol.iterator, t2 = r && e[r], s = 0; + if (t2) + return t2.call(e); + if (e && typeof e.length == "number") + return { next: function() { + return e && s >= e.length && (e = void 0), { value: e && e[s++], done: !e }; + } }; + throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + function Qa(e, r) { + var t2 = typeof Symbol == "function" && e[Symbol.iterator]; + if (!t2) + return e; + var s = t2.call(e), a, n = [], u; + try { + for (; (r === void 0 || r-- > 0) && !(a = s.next()).done; ) + n.push(a.value); + } catch (i) { + u = { error: i }; + } finally { + try { + a && !a.done && (t2 = s.return) && t2.call(s); + } finally { + if (u) + throw u.error; + } + } + return n; + } + function lm() { + for (var e = [], r = 0; r < arguments.length; r++) + e = e.concat(Qa(arguments[r])); + return e; + } + function cm() { + for (var e = 0, r = 0, t2 = arguments.length; r < t2; r++) + e += arguments[r].length; + for (var s = Array(e), a = 0, r = 0; r < t2; r++) + for (var n = arguments[r], u = 0, i = n.length; u < i; u++, a++) + s[a] = n[u]; + return s; + } + function Xt(e) { + return this instanceof Xt ? (this.v = e, this) : new Xt(e); + } + function pm(e, r, t2) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var s = t2.apply(e, r || []), a, n = []; + return a = {}, u("next"), u("throw"), u("return"), a[Symbol.asyncIterator] = function() { + return this; + }, a; + function u(g) { + s[g] && (a[g] = function(c) { + return new Promise(function(f, F) { + n.push([g, c, f, F]) > 1 || i(g, c); + }); + }); + } + function i(g, c) { + try { + l(s[g](c)); + } catch (f) { + h(n[0][3], f); + } + } + function l(g) { + g.value instanceof Xt ? Promise.resolve(g.value.v).then(p2, y) : h(n[0][2], g); + } + function p2(g) { + i("next", g); + } + function y(g) { + i("throw", g); + } + function h(g, c) { + g(c), n.shift(), n.length && i(n[0][0], n[0][1]); + } + } + function fm(e) { + var r, t2; + return r = {}, s("next"), s("throw", function(a) { + throw a; + }), s("return"), r[Symbol.iterator] = function() { + return this; + }, r; + function s(a, n) { + r[a] = e[a] ? function(u) { + return (t2 = !t2) ? { value: Xt(e[a](u)), done: a === "return" } : n ? n(u) : u; + } : n; + } + } + function Dm(e) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var r = e[Symbol.asyncIterator], t2; + return r ? r.call(e) : (e = typeof Rn == "function" ? Rn(e) : e[Symbol.iterator](), t2 = {}, s("next"), s("throw"), s("return"), t2[Symbol.asyncIterator] = function() { + return this; + }, t2); + function s(n) { + t2[n] = e[n] && function(u) { + return new Promise(function(i, l) { + u = e[n](u), a(i, l, u.done, u.value); + }); + }; + } + function a(n, u, i, l) { + Promise.resolve(l).then(function(p2) { + n({ value: p2, done: i }); + }, u); + } + } + function mm(e, r) { + return Object.defineProperty ? Object.defineProperty(e, "raw", { value: r }) : e.raw = r, e; + } + function dm(e) { + if (e && e.__esModule) + return e; + var r = {}; + if (e != null) + for (var t2 in e) + Object.hasOwnProperty.call(e, t2) && (r[t2] = e[t2]); + return r.default = e, r; + } + function gm(e) { + return e && e.__esModule ? e : { default: e }; + } + function ym(e, r) { + if (!r.has(e)) + throw new TypeError("attempted to get private field on non-instance"); + return r.get(e); + } + function hm(e, r, t2) { + if (!r.has(e)) + throw new TypeError("attempted to set private field on non-instance"); + return r.set(e, t2), t2; + } + var Br, Nr, Et = ht({ "node_modules/tslib/tslib.es6.js"() { + ne(), Br = function(e, r) { + return Br = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t2, s) { + t2.__proto__ = s; + } || function(t2, s) { + for (var a in s) + s.hasOwnProperty(a) && (t2[a] = s[a]); + }, Br(e, r); + }, Nr = function() { + return Nr = Object.assign || function(r) { + for (var t2, s = 1, a = arguments.length; s < a; s++) { + t2 = arguments[s]; + for (var n in t2) + Object.prototype.hasOwnProperty.call(t2, n) && (r[n] = t2[n]); + } + return r; + }, Nr.apply(this, arguments); + }; + } }), Za = te({ "node_modules/vnopts/lib/descriptors/api.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.apiDescriptor = { key: (r) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(r) ? r : JSON.stringify(r), value(r) { + if (r === null || typeof r != "object") + return JSON.stringify(r); + if (Array.isArray(r)) + return `[${r.map((s) => e.apiDescriptor.value(s)).join(", ")}]`; + let t2 = Object.keys(r); + return t2.length === 0 ? "{}" : `{ ${t2.map((s) => `${e.apiDescriptor.key(s)}: ${e.apiDescriptor.value(r[s])}`).join(", ")} }`; + }, pair: (r) => { + let { key: t2, value: s } = r; + return e.apiDescriptor.value({ [t2]: s }); + } }; + } }), vm = te({ "node_modules/vnopts/lib/descriptors/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Za(), e); + } }), kr = te({ "scripts/build/shims/chalk.cjs"(e, r) { + "use strict"; + ne(); + var t2 = (s) => s; + t2.grey = t2, t2.red = t2, t2.bold = t2, t2.yellow = t2, t2.blue = t2, t2.default = t2, r.exports = t2; + } }), eo = te({ "node_modules/vnopts/lib/handlers/deprecated/common.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(); + e.commonDeprecatedHandler = (t2, s, a) => { + let { descriptor: n } = a, u = [`${r.default.yellow(typeof t2 == "string" ? n.key(t2) : n.pair(t2))} is deprecated`]; + return s && u.push(`we now treat it as ${r.default.blue(typeof s == "string" ? n.key(s) : n.pair(s))}`), u.join("; ") + "."; + }; + } }), Cm = te({ "node_modules/vnopts/lib/handlers/deprecated/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(eo(), e); + } }), Em = te({ "node_modules/vnopts/lib/handlers/invalid/common.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(); + e.commonInvalidHandler = (t2, s, a) => [`Invalid ${r.default.red(a.descriptor.key(t2))} value.`, `Expected ${r.default.blue(a.schemas[t2].expected(a))},`, `but received ${r.default.red(a.descriptor.value(s))}.`].join(" "); + } }), to = te({ "node_modules/vnopts/lib/handlers/invalid/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Em(), e); + } }), Fm = te({ "node_modules/vnopts/node_modules/leven/index.js"(e, r) { + "use strict"; + ne(); + var t2 = [], s = []; + r.exports = function(a, n) { + if (a === n) + return 0; + var u = a; + a.length > n.length && (a = n, n = u); + var i = a.length, l = n.length; + if (i === 0) + return l; + if (l === 0) + return i; + for (; i > 0 && a.charCodeAt(~-i) === n.charCodeAt(~-l); ) + i--, l--; + if (i === 0) + return l; + for (var p2 = 0; p2 < i && a.charCodeAt(p2) === n.charCodeAt(p2); ) + p2++; + if (i -= p2, l -= p2, i === 0) + return l; + for (var y, h, g, c, f = 0, F = 0; f < i; ) + s[p2 + f] = a.charCodeAt(p2 + f), t2[f] = ++f; + for (; F < l; ) + for (y = n.charCodeAt(p2 + F), g = F++, h = F, f = 0; f < i; f++) + c = y === s[p2 + f] ? g : g + 1, g = t2[f], h = t2[f] = g > h ? c > h ? h + 1 : c : c > g ? g + 1 : c; + return h; + }; + } }), ro = te({ "node_modules/vnopts/lib/handlers/unknown/leven.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(), t2 = Fm(); + e.levenUnknownHandler = (s, a, n) => { + let { descriptor: u, logger: i, schemas: l } = n, p2 = [`Ignored unknown option ${r.default.yellow(u.pair({ key: s, value: a }))}.`], y = Object.keys(l).sort().find((h) => t2(s, h) < 3); + y && p2.push(`Did you mean ${r.default.blue(u.key(y))}?`), i.warn(p2.join(" ")); + }; + } }), Am = te({ "node_modules/vnopts/lib/handlers/unknown/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(ro(), e); + } }), Sm = te({ "node_modules/vnopts/lib/handlers/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Cm(), e), r.__exportStar(to(), e), r.__exportStar(Am(), e); + } }), Ft = te({ "node_modules/vnopts/lib/schema.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"]; + function t2(n, u) { + let i = new n(u), l = Object.create(i); + for (let p2 of r) + p2 in u && (l[p2] = a(u[p2], i, s.prototype[p2].length)); + return l; + } + e.createSchema = t2; + var s = class { + constructor(n) { + this.name = n.name; + } + static create(n) { + return t2(this, n); + } + default(n) { + } + expected(n) { + return "nothing"; + } + validate(n, u) { + return false; + } + deprecated(n, u) { + return false; + } + forward(n, u) { + } + redirect(n, u) { + } + overlap(n, u, i) { + return n; + } + preprocess(n, u) { + return n; + } + postprocess(n, u) { + return n; + } + }; + e.Schema = s; + function a(n, u, i) { + return typeof n == "function" ? function() { + for (var l = arguments.length, p2 = new Array(l), y = 0; y < l; y++) + p2[y] = arguments[y]; + return n(...p2.slice(0, i - 1), u, ...p2.slice(i - 1)); + } : () => n; + } + } }), xm = te({ "node_modules/vnopts/lib/schemas/alias.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + constructor(s) { + super(s), this._sourceName = s.sourceName; + } + expected(s) { + return s.schemas[this._sourceName].expected(s); + } + validate(s, a) { + return a.schemas[this._sourceName].validate(s, a); + } + redirect(s, a) { + return this._sourceName; + } + }; + e.AliasSchema = t2; + } }), bm = te({ "node_modules/vnopts/lib/schemas/any.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "anything"; + } + validate() { + return true; + } + }; + e.AnySchema = t2; + } }), Tm = te({ "node_modules/vnopts/lib/schemas/array.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)), t2 = Ft(), s = class extends t2.Schema { + constructor(n) { + var { valueSchema: u, name: i = u.name } = n, l = r.__rest(n, ["valueSchema", "name"]); + super(Object.assign({}, l, { name: i })), this._valueSchema = u; + } + expected(n) { + return `an array of ${this._valueSchema.expected(n)}`; + } + validate(n, u) { + if (!Array.isArray(n)) + return false; + let i = []; + for (let l of n) { + let p2 = u.normalizeValidateResult(this._valueSchema.validate(l, u), l); + p2 !== true && i.push(p2.value); + } + return i.length === 0 ? true : { value: i }; + } + deprecated(n, u) { + let i = []; + for (let l of n) { + let p2 = u.normalizeDeprecatedResult(this._valueSchema.deprecated(l, u), l); + p2 !== false && i.push(...p2.map((y) => { + let { value: h } = y; + return { value: [h] }; + })); + } + return i; + } + forward(n, u) { + let i = []; + for (let l of n) { + let p2 = u.normalizeForwardResult(this._valueSchema.forward(l, u), l); + i.push(...p2.map(a)); + } + return i; + } + redirect(n, u) { + let i = [], l = []; + for (let p2 of n) { + let y = u.normalizeRedirectResult(this._valueSchema.redirect(p2, u), p2); + "remain" in y && i.push(y.remain), l.push(...y.redirect.map(a)); + } + return i.length === 0 ? { redirect: l } : { redirect: l, remain: i }; + } + overlap(n, u) { + return n.concat(u); + } + }; + e.ArraySchema = s; + function a(n) { + let { from: u, to: i } = n; + return { from: [u], to: i }; + } + } }), Bm = te({ "node_modules/vnopts/lib/schemas/boolean.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "true or false"; + } + validate(s) { + return typeof s == "boolean"; + } + }; + e.BooleanSchema = t2; + } }), eu = te({ "node_modules/vnopts/lib/utils.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + function r(c, f) { + let F = /* @__PURE__ */ Object.create(null); + for (let _ of c) { + let w = _[f]; + if (F[w]) + throw new Error(`Duplicate ${f} ${JSON.stringify(w)}`); + F[w] = _; + } + return F; + } + e.recordFromArray = r; + function t2(c, f) { + let F = /* @__PURE__ */ new Map(); + for (let _ of c) { + let w = _[f]; + if (F.has(w)) + throw new Error(`Duplicate ${f} ${JSON.stringify(w)}`); + F.set(w, _); + } + return F; + } + e.mapFromArray = t2; + function s() { + let c = /* @__PURE__ */ Object.create(null); + return (f) => { + let F = JSON.stringify(f); + return c[F] ? true : (c[F] = true, false); + }; + } + e.createAutoChecklist = s; + function a(c, f) { + let F = [], _ = []; + for (let w of c) + f(w) ? F.push(w) : _.push(w); + return [F, _]; + } + e.partition = a; + function n(c) { + return c === Math.floor(c); + } + e.isInt = n; + function u(c, f) { + if (c === f) + return 0; + let F = typeof c, _ = typeof f, w = ["undefined", "object", "boolean", "number", "string"]; + return F !== _ ? w.indexOf(F) - w.indexOf(_) : F !== "string" ? Number(c) - Number(f) : c.localeCompare(f); + } + e.comparePrimitive = u; + function i(c) { + return c === void 0 ? {} : c; + } + e.normalizeDefaultResult = i; + function l(c, f) { + return c === true ? true : c === false ? { value: f } : c; + } + e.normalizeValidateResult = l; + function p2(c, f) { + let F = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + return c === false ? false : c === true ? F ? true : [{ value: f }] : "value" in c ? [c] : c.length === 0 ? false : c; + } + e.normalizeDeprecatedResult = p2; + function y(c, f) { + return typeof c == "string" || "key" in c ? { from: f, to: c } : "from" in c ? { from: c.from, to: c.to } : { from: f, to: c.to }; + } + e.normalizeTransferResult = y; + function h(c, f) { + return c === void 0 ? [] : Array.isArray(c) ? c.map((F) => y(F, f)) : [y(c, f)]; + } + e.normalizeForwardResult = h; + function g(c, f) { + let F = h(typeof c == "object" && "redirect" in c ? c.redirect : c, f); + return F.length === 0 ? { remain: f, redirect: F } : typeof c == "object" && "remain" in c ? { remain: c.remain, redirect: F } : { redirect: F }; + } + e.normalizeRedirectResult = g; + } }), Nm = te({ "node_modules/vnopts/lib/schemas/choice.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = eu(), s = class extends r.Schema { + constructor(a) { + super(a), this._choices = t2.mapFromArray(a.choices.map((n) => n && typeof n == "object" ? n : { value: n }), "value"); + } + expected(a) { + let { descriptor: n } = a, u = Array.from(this._choices.keys()).map((p2) => this._choices.get(p2)).filter((p2) => !p2.deprecated).map((p2) => p2.value).sort(t2.comparePrimitive).map(n.value), i = u.slice(0, -2), l = u.slice(-2); + return i.concat(l.join(" or ")).join(", "); + } + validate(a) { + return this._choices.has(a); + } + deprecated(a) { + let n = this._choices.get(a); + return n && n.deprecated ? { value: a } : false; + } + forward(a) { + let n = this._choices.get(a); + return n ? n.forward : void 0; + } + redirect(a) { + let n = this._choices.get(a); + return n ? n.redirect : void 0; + } + }; + e.ChoiceSchema = s; + } }), no = te({ "node_modules/vnopts/lib/schemas/number.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "a number"; + } + validate(s, a) { + return typeof s == "number"; + } + }; + e.NumberSchema = t2; + } }), wm = te({ "node_modules/vnopts/lib/schemas/integer.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = eu(), t2 = no(), s = class extends t2.NumberSchema { + expected() { + return "an integer"; + } + validate(a, n) { + return n.normalizeValidateResult(super.validate(a, n), a) === true && r.isInt(a); + } + }; + e.IntegerSchema = s; + } }), _m = te({ "node_modules/vnopts/lib/schemas/string.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "a string"; + } + validate(s) { + return typeof s == "string"; + } + }; + e.StringSchema = t2; + } }), Pm = te({ "node_modules/vnopts/lib/schemas/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(xm(), e), r.__exportStar(bm(), e), r.__exportStar(Tm(), e), r.__exportStar(Bm(), e), r.__exportStar(Nm(), e), r.__exportStar(wm(), e), r.__exportStar(no(), e), r.__exportStar(_m(), e); + } }), Im = te({ "node_modules/vnopts/lib/defaults.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Za(), t2 = eo(), s = to(), a = ro(); + e.defaultDescriptor = r.apiDescriptor, e.defaultUnknownHandler = a.levenUnknownHandler, e.defaultInvalidHandler = s.commonInvalidHandler, e.defaultDeprecatedHandler = t2.commonDeprecatedHandler; + } }), km = te({ "node_modules/vnopts/lib/normalize.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Im(), t2 = eu(); + e.normalize = (a, n, u) => new s(n, u).normalize(a); + var s = class { + constructor(a, n) { + let { logger: u = console, descriptor: i = r.defaultDescriptor, unknown: l = r.defaultUnknownHandler, invalid: p2 = r.defaultInvalidHandler, deprecated: y = r.defaultDeprecatedHandler } = n || {}; + this._utils = { descriptor: i, logger: u || { warn: () => { + } }, schemas: t2.recordFromArray(a, "name"), normalizeDefaultResult: t2.normalizeDefaultResult, normalizeDeprecatedResult: t2.normalizeDeprecatedResult, normalizeForwardResult: t2.normalizeForwardResult, normalizeRedirectResult: t2.normalizeRedirectResult, normalizeValidateResult: t2.normalizeValidateResult }, this._unknownHandler = l, this._invalidHandler = p2, this._deprecatedHandler = y, this.cleanHistory(); + } + cleanHistory() { + this._hasDeprecationWarned = t2.createAutoChecklist(); + } + normalize(a) { + let n = {}, u = [a], i = () => { + for (; u.length !== 0; ) { + let l = u.shift(), p2 = this._applyNormalization(l, n); + u.push(...p2); + } + }; + i(); + for (let l of Object.keys(this._utils.schemas)) { + let p2 = this._utils.schemas[l]; + if (!(l in n)) { + let y = t2.normalizeDefaultResult(p2.default(this._utils)); + "value" in y && u.push({ [l]: y.value }); + } + } + i(); + for (let l of Object.keys(this._utils.schemas)) { + let p2 = this._utils.schemas[l]; + l in n && (n[l] = p2.postprocess(n[l], this._utils)); + } + return n; + } + _applyNormalization(a, n) { + let u = [], [i, l] = t2.partition(Object.keys(a), (p2) => p2 in this._utils.schemas); + for (let p2 of i) { + let y = this._utils.schemas[p2], h = y.preprocess(a[p2], this._utils), g = t2.normalizeValidateResult(y.validate(h, this._utils), h); + if (g !== true) { + let { value: w } = g, E = this._invalidHandler(p2, w, this._utils); + throw typeof E == "string" ? new Error(E) : E; + } + let c = (w) => { + let { from: E, to: N } = w; + u.push(typeof N == "string" ? { [N]: E } : { [N.key]: N.value }); + }, f = (w) => { + let { value: E, redirectTo: N } = w, x = t2.normalizeDeprecatedResult(y.deprecated(E, this._utils), h, true); + if (x !== false) + if (x === true) + this._hasDeprecationWarned(p2) || this._utils.logger.warn(this._deprecatedHandler(p2, N, this._utils)); + else + for (let { value: I } of x) { + let P = { key: p2, value: I }; + if (!this._hasDeprecationWarned(P)) { + let $ = typeof N == "string" ? { key: N, value: I } : N; + this._utils.logger.warn(this._deprecatedHandler(P, $, this._utils)); + } + } + }; + t2.normalizeForwardResult(y.forward(h, this._utils), h).forEach(c); + let _ = t2.normalizeRedirectResult(y.redirect(h, this._utils), h); + if (_.redirect.forEach(c), "remain" in _) { + let w = _.remain; + n[p2] = p2 in n ? y.overlap(n[p2], w, this._utils) : w, f({ value: w }); + } + for (let { from: w, to: E } of _.redirect) + f({ value: w, redirectTo: E }); + } + for (let p2 of l) { + let y = a[p2], h = this._unknownHandler(p2, y, this._utils); + if (h) + for (let g of Object.keys(h)) { + let c = { [g]: h[g] }; + g in this._utils.schemas ? u.push(c) : Object.assign(n, c); + } + } + return u; + } + }; + e.Normalizer = s; + } }), Lm = te({ "node_modules/vnopts/lib/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(vm(), e), r.__exportStar(Sm(), e), r.__exportStar(Pm(), e), r.__exportStar(km(), e), r.__exportStar(Ft(), e); + } }), Om = te({ "src/main/options-normalizer.js"(e, r) { + "use strict"; + ne(); + var t2 = Lm(), s = lt(), a = { key: (g) => g.length === 1 ? `-${g}` : `--${g}`, value: (g) => t2.apiDescriptor.value(g), pair: (g) => { + let { key: c, value: f } = g; + return f === false ? `--no-${c}` : f === true ? a.key(c) : f === "" ? `${a.key(c)} without an argument` : `${a.key(c)}=${f}`; + } }, n = (g) => { + let { colorsModule: c, levenshteinDistance: f } = g; + return class extends t2.ChoiceSchema { + constructor(_) { + let { name: w, flags: E } = _; + super({ name: w, choices: E }), this._flags = [...E].sort(); + } + preprocess(_, w) { + if (typeof _ == "string" && _.length > 0 && !this._flags.includes(_)) { + let E = this._flags.find((N) => f(N, _) < 3); + if (E) + return w.logger.warn([`Unknown flag ${c.yellow(w.descriptor.value(_))},`, `did you mean ${c.blue(w.descriptor.value(E))}?`].join(" ")), E; + } + return _; + } + expected() { + return "a flag"; + } + }; + }, u; + function i(g, c) { + let { logger: f = false, isCLI: F = false, passThrough: _ = false, colorsModule: w = null, levenshteinDistance: E = null } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, N = _ ? Array.isArray(_) ? (T, m) => _.includes(T) ? { [T]: m } : void 0 : (T, m) => ({ [T]: m }) : (T, m, C) => { + let o = C.schemas, { _: d } = o, v = Hn(o, vD); + return t2.levenUnknownHandler(T, m, Object.assign(Object.assign({}, C), {}, { schemas: v })); + }, x = F ? a : t2.apiDescriptor, I = l(c, { isCLI: F, colorsModule: w, levenshteinDistance: E }), P = new t2.Normalizer(I, { logger: f, unknown: N, descriptor: x }), $ = f !== false; + $ && u && (P._hasDeprecationWarned = u); + let D = P.normalize(g); + return $ && (u = P._hasDeprecationWarned), F && D["plugin-search"] === false && (D["plugin-search-dir"] = false), D; + } + function l(g, c) { + let { isCLI: f, colorsModule: F, levenshteinDistance: _ } = c, w = []; + f && w.push(t2.AnySchema.create({ name: "_" })); + for (let E of g) + w.push(p2(E, { isCLI: f, optionInfos: g, colorsModule: F, levenshteinDistance: _ })), E.alias && f && w.push(t2.AliasSchema.create({ name: E.alias, sourceName: E.name })); + return w; + } + function p2(g, c) { + let { isCLI: f, optionInfos: F, colorsModule: _, levenshteinDistance: w } = c, { name: E } = g; + if (E === "plugin-search-dir" || E === "pluginSearchDirs") + return t2.AnySchema.create({ name: E, preprocess(P) { + return P === false || (P = Array.isArray(P) ? P : [P]), P; + }, validate(P) { + return P === false ? true : P.every(($) => typeof $ == "string"); + }, expected() { + return "false or paths to plugin search dir"; + } }); + let N = { name: E }, x, I = {}; + switch (g.type) { + case "int": + x = t2.IntegerSchema, f && (N.preprocess = Number); + break; + case "string": + x = t2.StringSchema; + break; + case "choice": + x = t2.ChoiceSchema, N.choices = g.choices.map((P) => typeof P == "object" && P.redirect ? Object.assign(Object.assign({}, P), {}, { redirect: { to: { key: g.name, value: P.redirect } } }) : P); + break; + case "boolean": + x = t2.BooleanSchema; + break; + case "flag": + x = n({ colorsModule: _, levenshteinDistance: w }), N.flags = F.flatMap((P) => [P.alias, P.description && P.name, P.oppositeDescription && `no-${P.name}`].filter(Boolean)); + break; + case "path": + x = t2.StringSchema; + break; + default: + throw new Error(`Unexpected type ${g.type}`); + } + if (g.exception ? N.validate = (P, $, D) => g.exception(P) || $.validate(P, D) : N.validate = (P, $, D) => P === void 0 || $.validate(P, D), g.redirect && (I.redirect = (P) => P ? { to: { key: g.redirect.option, value: g.redirect.value } } : void 0), g.deprecated && (I.deprecated = true), f && !g.array) { + let P = N.preprocess || (($) => $); + N.preprocess = ($, D, T) => D.preprocess(P(Array.isArray($) ? s($) : $), T); + } + return g.array ? t2.ArraySchema.create(Object.assign(Object.assign(Object.assign({}, f ? { preprocess: (P) => Array.isArray(P) ? P : [P] } : {}), I), {}, { valueSchema: x.create(N) })) : x.create(Object.assign(Object.assign({}, N), I)); + } + function y(g, c, f) { + return i(g, c, f); + } + function h(g, c, f) { + return i(g, c, Object.assign({ isCLI: true }, f)); + } + r.exports = { normalizeApiOptions: y, normalizeCliOptions: h }; + } }), ut = te({ "src/language-js/loc.js"(e, r) { + "use strict"; + ne(); + var t2 = Kn(); + function s(l) { + var p2, y; + let h = l.range ? l.range[0] : l.start, g = (p2 = (y = l.declaration) === null || y === void 0 ? void 0 : y.decorators) !== null && p2 !== void 0 ? p2 : l.decorators; + return t2(g) ? Math.min(s(g[0]), h) : h; + } + function a(l) { + return l.range ? l.range[1] : l.end; + } + function n(l, p2) { + let y = s(l); + return Number.isInteger(y) && y === s(p2); + } + function u(l, p2) { + let y = a(l); + return Number.isInteger(y) && y === a(p2); + } + function i(l, p2) { + return n(l, p2) && u(l, p2); + } + r.exports = { locStart: s, locEnd: a, hasSameLocStart: n, hasSameLoc: i }; + } }), jm = te({ "src/main/load-parser.js"(e, r) { + ne(), r.exports = () => { + }; + } }), qm = te({ "scripts/build/shims/babel-highlight.cjs"(e, r) { + "use strict"; + ne(); + var t2 = kr(), s = { shouldHighlight: () => false, getChalk: () => t2 }; + r.exports = s; + } }), Mm = te({ "node_modules/@babel/code-frame/lib/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.codeFrameColumns = u, e.default = i; + var r = qm(), t2 = false; + function s(l) { + return { gutter: l.grey, marker: l.red.bold, message: l.red.bold }; + } + var a = /\r\n|[\n\r\u2028\u2029]/; + function n(l, p2, y) { + let h = Object.assign({ column: 0, line: -1 }, l.start), g = Object.assign({}, h, l.end), { linesAbove: c = 2, linesBelow: f = 3 } = y || {}, F = h.line, _ = h.column, w = g.line, E = g.column, N = Math.max(F - (c + 1), 0), x = Math.min(p2.length, w + f); + F === -1 && (N = 0), w === -1 && (x = p2.length); + let I = w - F, P = {}; + if (I) + for (let $ = 0; $ <= I; $++) { + let D = $ + F; + if (!_) + P[D] = true; + else if ($ === 0) { + let T = p2[D - 1].length; + P[D] = [_, T - _ + 1]; + } else if ($ === I) + P[D] = [0, E]; + else { + let T = p2[D - $].length; + P[D] = [0, T]; + } + } + else + _ === E ? _ ? P[F] = [_, 0] : P[F] = true : P[F] = [_, E - _]; + return { start: N, end: x, markerLines: P }; + } + function u(l, p2) { + let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = (y.highlightCode || y.forceColor) && (0, r.shouldHighlight)(y), g = (0, r.getChalk)(y), c = s(g), f = ($, D) => h ? $(D) : D, F = l.split(a), { start: _, end: w, markerLines: E } = n(p2, F, y), N = p2.start && typeof p2.start.column == "number", x = String(w).length, P = (h ? (0, r.default)(l, y) : l).split(a, w).slice(_, w).map(($, D) => { + let T = _ + 1 + D, C = ` ${` ${T}`.slice(-x)} |`, o = E[T], d = !E[T + 1]; + if (o) { + let v = ""; + if (Array.isArray(o)) { + let S = $.slice(0, Math.max(o[0] - 1, 0)).replace(/[^\t]/g, " "), b = o[1] || 1; + v = [` + `, f(c.gutter, C.replace(/\d/g, " ")), " ", S, f(c.marker, "^").repeat(b)].join(""), d && y.message && (v += " " + f(c.message, y.message)); + } + return [f(c.marker, ">"), f(c.gutter, C), $.length > 0 ? ` ${$}` : "", v].join(""); + } else + return ` ${f(c.gutter, C)}${$.length > 0 ? ` ${$}` : ""}`; + }).join(` +`); + return y.message && !N && (P = `${" ".repeat(x + 1)}${y.message} +${P}`), h ? g.reset(P) : P; + } + function i(l, p2, y) { + let h = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; + if (!t2) { + t2 = true; + let c = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (wt.emitWarning) + wt.emitWarning(c, "DeprecationWarning"); + else { + let f = new Error(c); + f.name = "DeprecationWarning", console.warn(new Error(c)); + } + } + return y = Math.max(y, 0), u(l, { start: { column: y, line: p2 } }, h); + } + } }), tu = te({ "src/main/parser.js"(e, r) { + "use strict"; + ne(); + var { ConfigError: t2 } = Qt(), s = ut(), a = jm(), { locStart: n, locEnd: u } = s, i = Object.getOwnPropertyNames, l = Object.getOwnPropertyDescriptor; + function p2(g) { + let c = {}; + for (let f of g.plugins) + if (f.parsers) + for (let F of i(f.parsers)) + Object.defineProperty(c, F, l(f.parsers, F)); + return c; + } + function y(g) { + let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : p2(g); + if (typeof g.parser == "function") + return { parse: g.parser, astFormat: "estree", locStart: n, locEnd: u }; + if (typeof g.parser == "string") { + if (Object.prototype.hasOwnProperty.call(c, g.parser)) + return c[g.parser]; + throw new t2(`Couldn't resolve parser "${g.parser}". Parsers must be explicitly added to the standalone bundle.`); + } + } + function h(g, c) { + let f = p2(c), F = Object.defineProperties({}, Object.fromEntries(Object.keys(f).map((w) => [w, { enumerable: true, get() { + return f[w].parse; + } }]))), _ = y(c, f); + try { + return _.preprocess && (g = _.preprocess(g, c)), { text: g, ast: _.parse(g, F, c) }; + } catch (w) { + let { loc: E } = w; + if (E) { + let { codeFrameColumns: N } = Mm(); + throw w.codeFrame = N(g, E, { highlightCode: true }), w.message += ` +` + w.codeFrame, w; + } + throw w; + } + } + r.exports = { parse: h, resolveParser: y }; + } }), uo = te({ "src/main/options.js"(e, r) { + "use strict"; + ne(); + var t2 = ZD(), { UndefinedParserError: s } = Qt(), { getSupportInfo: a } = Xn(), n = Om(), { resolveParser: u } = tu(), i = { astFormat: "estree", printer: {}, originalText: void 0, locStart: null, locEnd: null }; + function l(h) { + let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = Object.assign({}, h), f = a({ plugins: h.plugins, showUnreleased: true, showDeprecated: true }).options, F = Object.assign(Object.assign({}, i), Object.fromEntries(f.filter((x) => x.default !== void 0).map((x) => [x.name, x.default]))); + if (!c.parser) { + if (!c.filepath) + (g.logger || console).warn("No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred."), c.parser = "babel"; + else if (c.parser = y(c.filepath, c.plugins), !c.parser) + throw new s(`No parser could be inferred for file: ${c.filepath}`); + } + let _ = u(n.normalizeApiOptions(c, [f.find((x) => x.name === "parser")], { passThrough: true, logger: false })); + c.astFormat = _.astFormat, c.locEnd = _.locEnd, c.locStart = _.locStart; + let w = p2(c); + c.printer = w.printers[c.astFormat]; + let E = Object.fromEntries(f.filter((x) => x.pluginDefaults && x.pluginDefaults[w.name] !== void 0).map((x) => [x.name, x.pluginDefaults[w.name]])), N = Object.assign(Object.assign({}, F), E); + for (let [x, I] of Object.entries(N)) + (c[x] === null || c[x] === void 0) && (c[x] = I); + return c.parser === "json" && (c.trailingComma = "none"), n.normalizeApiOptions(c, f, Object.assign({ passThrough: Object.keys(i) }, g)); + } + function p2(h) { + let { astFormat: g } = h; + if (!g) + throw new Error("getPlugin() requires astFormat to be set"); + let c = h.plugins.find((f) => f.printers && f.printers[g]); + if (!c) + throw new Error(`Couldn't find plugin for AST format "${g}"`); + return c; + } + function y(h, g) { + let c = t2.basename(h).toLowerCase(), F = a({ plugins: g }).languages.filter((_) => _.since !== null).find((_) => _.extensions && _.extensions.some((w) => c.endsWith(w)) || _.filenames && _.filenames.some((w) => w.toLowerCase() === c)); + return F && F.parsers[0]; + } + r.exports = { normalize: l, hiddenDefaults: i, inferParser: y }; + } }), Rm = te({ "src/main/massage-ast.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n) { + if (Array.isArray(s)) + return s.map((p2) => t2(p2, a, n)).filter(Boolean); + if (!s || typeof s != "object") + return s; + let u = a.printer.massageAstNode, i; + u && u.ignoredProperties ? i = u.ignoredProperties : i = /* @__PURE__ */ new Set(); + let l = {}; + for (let [p2, y] of Object.entries(s)) + !i.has(p2) && typeof y != "function" && (l[p2] = t2(y, a, s)); + if (u) { + let p2 = u(s, l, n); + if (p2 === null) + return; + if (p2) + return p2; + } + return l; + } + r.exports = t2; + } }), Zt = te({ "scripts/build/shims/assert.cjs"(e, r) { + "use strict"; + ne(); + var t2 = () => { + }; + t2.ok = t2, t2.strictEqual = t2, r.exports = t2; + } }), et = te({ "src/main/comments.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { builders: { line: s, hardline: a, breakParent: n, indent: u, lineSuffix: i, join: l, cursor: p2 } } = qe(), { hasNewline: y, skipNewline: h, skipSpaces: g, isPreviousLineEmpty: c, addLeadingComment: f, addDanglingComment: F, addTrailingComment: _ } = Ue(), w = /* @__PURE__ */ new WeakMap(); + function E(k, M, R) { + if (!k) + return; + let { printer: q, locStart: J, locEnd: L } = M; + if (R) { + if (q.canAttachComment && q.canAttachComment(k)) { + let V; + for (V = R.length - 1; V >= 0 && !(J(R[V]) <= J(k) && L(R[V]) <= L(k)); --V) + ; + R.splice(V + 1, 0, k); + return; + } + } else if (w.has(k)) + return w.get(k); + let Q = q.getCommentChildNodes && q.getCommentChildNodes(k, M) || typeof k == "object" && Object.entries(k).filter((V) => { + let [j] = V; + return j !== "enclosingNode" && j !== "precedingNode" && j !== "followingNode" && j !== "tokens" && j !== "comments" && j !== "parent"; + }).map((V) => { + let [, j] = V; + return j; + }); + if (Q) { + R || (R = [], w.set(k, R)); + for (let V of Q) + E(V, M, R); + return R; + } + } + function N(k, M, R, q) { + let { locStart: J, locEnd: L } = R, Q = J(M), V = L(M), j = E(k, R), Y, ie, ee = 0, ce = j.length; + for (; ee < ce; ) { + let W = ee + ce >> 1, K = j[W], de = J(K), ue = L(K); + if (de <= Q && V <= ue) + return N(K, M, R, K); + if (ue <= Q) { + Y = K, ee = W + 1; + continue; + } + if (V <= de) { + ie = K, ce = W; + continue; + } + throw new Error("Comment location overlaps with node location"); + } + if (q && q.type === "TemplateLiteral") { + let { quasis: W } = q, K = C(W, M, R); + Y && C(W, Y, R) !== K && (Y = null), ie && C(W, ie, R) !== K && (ie = null); + } + return { enclosingNode: q, precedingNode: Y, followingNode: ie }; + } + var x = () => false; + function I(k, M, R, q) { + if (!Array.isArray(k)) + return; + let J = [], { locStart: L, locEnd: Q, printer: { handleComments: V = {} } } = q, { avoidAstMutation: j, ownLine: Y = x, endOfLine: ie = x, remaining: ee = x } = V, ce = k.map((W, K) => Object.assign(Object.assign({}, N(M, W, q)), {}, { comment: W, text: R, options: q, ast: M, isLastComment: k.length - 1 === K })); + for (let [W, K] of ce.entries()) { + let { comment: de, precedingNode: ue, enclosingNode: Fe, followingNode: z, text: U, options: Z, ast: se, isLastComment: fe } = K; + if (Z.parser === "json" || Z.parser === "json5" || Z.parser === "__js_expression" || Z.parser === "__vue_expression" || Z.parser === "__vue_ts_expression") { + if (L(de) - L(se) <= 0) { + f(se, de); + continue; + } + if (Q(de) - Q(se) >= 0) { + _(se, de); + continue; + } + } + let ge; + if (j ? ge = [K] : (de.enclosingNode = Fe, de.precedingNode = ue, de.followingNode = z, ge = [de, U, Z, se, fe]), $(U, Z, ce, W)) + de.placement = "ownLine", Y(...ge) || (z ? f(z, de) : ue ? _(ue, de) : F(Fe || se, de)); + else if (D(U, Z, ce, W)) + de.placement = "endOfLine", ie(...ge) || (ue ? _(ue, de) : z ? f(z, de) : F(Fe || se, de)); + else if (de.placement = "remaining", !ee(...ge)) + if (ue && z) { + let he = J.length; + he > 0 && J[he - 1].followingNode !== z && T(J, U, Z), J.push(K); + } else + ue ? _(ue, de) : z ? f(z, de) : F(Fe || se, de); + } + if (T(J, R, q), !j) + for (let W of k) + delete W.precedingNode, delete W.enclosingNode, delete W.followingNode; + } + var P = (k) => !/[\S\n\u2028\u2029]/.test(k); + function $(k, M, R, q) { + let { comment: J, precedingNode: L } = R[q], { locStart: Q, locEnd: V } = M, j = Q(J); + if (L) + for (let Y = q - 1; Y >= 0; Y--) { + let { comment: ie, precedingNode: ee } = R[Y]; + if (ee !== L || !P(k.slice(V(ie), j))) + break; + j = Q(ie); + } + return y(k, j, { backwards: true }); + } + function D(k, M, R, q) { + let { comment: J, followingNode: L } = R[q], { locStart: Q, locEnd: V } = M, j = V(J); + if (L) + for (let Y = q + 1; Y < R.length; Y++) { + let { comment: ie, followingNode: ee } = R[Y]; + if (ee !== L || !P(k.slice(j, Q(ie)))) + break; + j = V(ie); + } + return y(k, j); + } + function T(k, M, R) { + let q = k.length; + if (q === 0) + return; + let { precedingNode: J, followingNode: L, enclosingNode: Q } = k[0], V = R.printer.getGapRegex && R.printer.getGapRegex(Q) || /^[\s(]*$/, j = R.locStart(L), Y; + for (Y = q; Y > 0; --Y) { + let { comment: ie, precedingNode: ee, followingNode: ce } = k[Y - 1]; + t2.strictEqual(ee, J), t2.strictEqual(ce, L); + let W = M.slice(R.locEnd(ie), j); + if (V.test(W)) + j = R.locStart(ie); + else + break; + } + for (let [ie, { comment: ee }] of k.entries()) + ie < Y ? _(J, ee) : f(L, ee); + for (let ie of [J, L]) + ie.comments && ie.comments.length > 1 && ie.comments.sort((ee, ce) => R.locStart(ee) - R.locStart(ce)); + k.length = 0; + } + function m(k, M) { + let R = k.getValue(); + return R.printed = true, M.printer.printComment(k, M); + } + function C(k, M, R) { + let q = R.locStart(M) - 1; + for (let J = 1; J < k.length; ++J) + if (q < R.locStart(k[J])) + return J - 1; + return 0; + } + function o(k, M) { + let R = k.getValue(), q = [m(k, M)], { printer: J, originalText: L, locStart: Q, locEnd: V } = M; + if (J.isBlockComment && J.isBlockComment(R)) { + let ie = y(L, V(R)) ? y(L, Q(R), { backwards: true }) ? a : s : " "; + q.push(ie); + } else + q.push(a); + let Y = h(L, g(L, V(R))); + return Y !== false && y(L, Y) && q.push(a), q; + } + function d(k, M) { + let R = k.getValue(), q = m(k, M), { printer: J, originalText: L, locStart: Q } = M, V = J.isBlockComment && J.isBlockComment(R); + if (y(L, Q(R), { backwards: true })) { + let Y = c(L, R, Q); + return i([a, Y ? a : "", q]); + } + let j = [" ", q]; + return V || (j = [i(j), n]), j; + } + function v(k, M, R, q) { + let J = [], L = k.getValue(); + return !L || !L.comments || (k.each(() => { + let Q = k.getValue(); + !Q.leading && !Q.trailing && (!q || q(Q)) && J.push(m(k, M)); + }, "comments"), J.length === 0) ? "" : R ? l(a, J) : u([a, l(a, J)]); + } + function S(k, M, R) { + let q = k.getValue(); + if (!q) + return {}; + let J = q.comments || []; + R && (J = J.filter((j) => !R.has(j))); + let L = q === M.cursorNode; + if (J.length === 0) { + let j = L ? p2 : ""; + return { leading: j, trailing: j }; + } + let Q = [], V = []; + return k.each(() => { + let j = k.getValue(); + if (R && R.has(j)) + return; + let { leading: Y, trailing: ie } = j; + Y ? Q.push(o(k, M)) : ie && V.push(d(k, M)); + }, "comments"), L && (Q.unshift(p2), V.push(p2)), { leading: Q, trailing: V }; + } + function b(k, M, R, q) { + let { leading: J, trailing: L } = S(k, R, q); + return !J && !L ? M : [J, M, L]; + } + function B(k) { + if (k) + for (let M of k) { + if (!M.printed) + throw new Error('Comment "' + M.value.trim() + '" was not printed. Please report this error!'); + delete M.printed; + } + } + r.exports = { attach: I, printComments: b, printCommentsSeparately: S, printDanglingComments: v, getSortedChildNodes: E, ensureAllCommentsPrinted: B }; + } }), $m = te({ "src/common/ast-path.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(); + function s(u, i) { + let l = a(u.stack, i); + return l === -1 ? null : u.stack[l]; + } + function a(u, i) { + for (let l = u.length - 1; l >= 0; l -= 2) { + let p2 = u[l]; + if (p2 && !Array.isArray(p2) && --i < 0) + return l; + } + return -1; + } + var n = class { + constructor(u) { + this.stack = [u]; + } + getName() { + let { stack: u } = this, { length: i } = u; + return i > 1 ? u[i - 2] : null; + } + getValue() { + return t2(this.stack); + } + getNode() { + let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return s(this, u); + } + getParentNode() { + let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return s(this, u + 1); + } + call(u) { + let { stack: i } = this, { length: l } = i, p2 = t2(i); + for (var y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), g = 1; g < y; g++) + h[g - 1] = arguments[g]; + for (let f of h) + p2 = p2[f], i.push(f, p2); + let c = u(this); + return i.length = l, c; + } + callParent(u) { + let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, l = a(this.stack, i + 1), p2 = this.stack.splice(l + 1), y = u(this); + return this.stack.push(...p2), y; + } + each(u) { + let { stack: i } = this, { length: l } = i, p2 = t2(i); + for (var y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), g = 1; g < y; g++) + h[g - 1] = arguments[g]; + for (let c of h) + p2 = p2[c], i.push(c, p2); + for (let c = 0; c < p2.length; ++c) + i.push(c, p2[c]), u(this, c, p2), i.length -= 2; + i.length = l; + } + map(u) { + let i = []; + for (var l = arguments.length, p2 = new Array(l > 1 ? l - 1 : 0), y = 1; y < l; y++) + p2[y - 1] = arguments[y]; + return this.each((h, g, c) => { + i[g] = u(h, g, c); + }, ...p2), i; + } + try(u) { + let { stack: i } = this, l = [...i]; + try { + return u(); + } finally { + i.length = 0, i.push(...l); + } + } + match() { + let u = this.stack.length - 1, i = null, l = this.stack[u--]; + for (var p2 = arguments.length, y = new Array(p2), h = 0; h < p2; h++) + y[h] = arguments[h]; + for (let g of y) { + if (l === void 0) + return false; + let c = null; + if (typeof i == "number" && (c = i, i = this.stack[u--], l = this.stack[u--]), g && !g(l, i, c)) + return false; + i = this.stack[u--], l = this.stack[u--]; + } + return true; + } + findAncestor(u) { + let i = this.stack.length - 1, l = null, p2 = this.stack[i--]; + for (; p2; ) { + let y = null; + if (typeof l == "number" && (y = l, l = this.stack[i--], p2 = this.stack[i--]), l !== null && u(p2, l, y)) + return p2; + l = this.stack[i--], p2 = this.stack[i--]; + } + } + }; + r.exports = n; + } }), Vm = te({ "src/main/multiparser.js"(e, r) { + "use strict"; + ne(); + var { utils: { stripTrailingHardline: t2 } } = qe(), { normalize: s } = uo(), a = et(); + function n(i, l, p2, y) { + if (p2.printer.embed && p2.embeddedLanguageFormatting === "auto") + return p2.printer.embed(i, l, (h, g, c) => u(h, g, p2, y, c), p2); + } + function u(i, l, p2, y) { + let { stripTrailingHardline: h = false } = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, g = s(Object.assign(Object.assign(Object.assign({}, p2), l), {}, { parentParser: p2.parser, originalText: i }), { passThrough: true }), c = tu().parse(i, g), { ast: f } = c; + i = c.text; + let F = f.comments; + delete f.comments, a.attach(F, f, i, g), g[Symbol.for("comments")] = F || [], g[Symbol.for("tokens")] = f.tokens || []; + let _ = y(f, g); + return a.ensureAllCommentsPrinted(F), h ? typeof _ == "string" ? _.replace(/(?:\r?\n)*$/, "") : t2(_) : _; + } + r.exports = { printSubtree: n }; + } }), Wm = te({ "src/main/ast-to-doc.js"(e, r) { + "use strict"; + ne(); + var t2 = $m(), { builders: { hardline: s, addAlignmentToDoc: a }, utils: { propagateBreaks: n } } = qe(), { printComments: u } = et(), i = Vm(); + function l(h, g) { + let c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, { printer: f } = g; + f.preprocess && (h = f.preprocess(h, g)); + let F = /* @__PURE__ */ new Map(), _ = new t2(h), w = E(); + return c > 0 && (w = a([s, w], c, g.tabWidth)), n(w), w; + function E(x, I) { + return x === void 0 || x === _ ? N(I) : Array.isArray(x) ? _.call(() => N(I), ...x) : _.call(() => N(I), x); + } + function N(x) { + let I = _.getValue(), P = I && typeof I == "object" && x === void 0; + if (P && F.has(I)) + return F.get(I); + let $ = y(_, g, E, x); + return P && F.set(I, $), $; + } + } + function p2(h, g) { + let { originalText: c, [Symbol.for("comments")]: f, locStart: F, locEnd: _ } = g, w = F(h), E = _(h), N = /* @__PURE__ */ new Set(); + for (let x of f) + F(x) >= w && _(x) <= E && (x.printed = true, N.add(x)); + return { doc: c.slice(w, E), printedComments: N }; + } + function y(h, g, c, f) { + let F = h.getValue(), { printer: _ } = g, w, E; + if (_.hasPrettierIgnore && _.hasPrettierIgnore(h)) + ({ doc: w, printedComments: E } = p2(F, g)); + else { + if (F) + try { + w = i.printSubtree(h, c, g, l); + } catch (N) { + if (globalThis.PRETTIER_DEBUG) + throw N; + } + w || (w = _.print(h, g, c, f)); + } + return (!_.willPrintOwnComments || !_.willPrintOwnComments(h, g)) && (w = u(h, w, g, E)), w; + } + r.exports = l; + } }), Hm = te({ "src/main/range-util.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), s = et(), a = (f) => { + let { parser: F } = f; + return F === "json" || F === "json5" || F === "json-stringify"; + }; + function n(f, F) { + let _ = [f.node, ...f.parentNodes], w = /* @__PURE__ */ new Set([F.node, ...F.parentNodes]); + return _.find((E) => y.has(E.type) && w.has(E)); + } + function u(f) { + let F = f.length - 1; + for (; ; ) { + let _ = f[F]; + if (_ && (_.type === "Program" || _.type === "File")) + F--; + else + break; + } + return f.slice(0, F + 1); + } + function i(f, F, _) { + let { locStart: w, locEnd: E } = _, N = f.node, x = F.node; + if (N === x) + return { startNode: N, endNode: x }; + let I = w(f.node); + for (let $ of u(F.parentNodes)) + if (w($) >= I) + x = $; + else + break; + let P = E(F.node); + for (let $ of u(f.parentNodes)) { + if (E($) <= P) + N = $; + else + break; + if (N === x) + break; + } + return { startNode: N, endNode: x }; + } + function l(f, F, _, w) { + let E = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [], N = arguments.length > 5 ? arguments[5] : void 0, { locStart: x, locEnd: I } = _, P = x(f), $ = I(f); + if (!(F > $ || F < P || N === "rangeEnd" && F === P || N === "rangeStart" && F === $)) { + for (let D of s.getSortedChildNodes(f, _)) { + let T = l(D, F, _, w, [f, ...E], N); + if (T) + return T; + } + if (!w || w(f, E[0])) + return { node: f, parentNodes: E }; + } + } + function p2(f, F) { + return F !== "DeclareExportDeclaration" && f !== "TypeParameterDeclaration" && (f === "Directive" || f === "TypeAlias" || f === "TSExportAssignment" || f.startsWith("Declare") || f.startsWith("TSDeclare") || f.endsWith("Statement") || f.endsWith("Declaration")); + } + var y = /* @__PURE__ */ new Set(["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]), h = /* @__PURE__ */ new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]); + function g(f, F, _) { + if (!F) + return false; + switch (f.parser) { + case "flow": + case "babel": + case "babel-flow": + case "babel-ts": + case "typescript": + case "acorn": + case "espree": + case "meriyah": + case "__babel_estree": + return p2(F.type, _ && _.type); + case "json": + case "json5": + case "json-stringify": + return y.has(F.type); + case "graphql": + return h.has(F.kind); + case "vue": + return F.tag !== "root"; + } + return false; + } + function c(f, F, _) { + let { rangeStart: w, rangeEnd: E, locStart: N, locEnd: x } = F; + t2.ok(E > w); + let I = f.slice(w, E).search(/\S/), P = I === -1; + if (!P) + for (w += I; E > w && !/\S/.test(f[E - 1]); --E) + ; + let $ = l(_, w, F, (C, o) => g(F, C, o), [], "rangeStart"), D = P ? $ : l(_, E, F, (C) => g(F, C), [], "rangeEnd"); + if (!$ || !D) + return { rangeStart: 0, rangeEnd: 0 }; + let T, m; + if (a(F)) { + let C = n($, D); + T = C, m = C; + } else + ({ startNode: T, endNode: m } = i($, D, F)); + return { rangeStart: Math.min(N(T), N(m)), rangeEnd: Math.max(x(T), x(m)) }; + } + r.exports = { calculateRange: c, findNodeAtOffset: l }; + } }), Gm = te({ "src/main/core.js"(e, r) { + "use strict"; + ne(); + var { diffArrays: t2 } = BD(), { printer: { printDocToString: s }, debug: { printDocToDebug: a } } = qe(), { getAlignmentSize: n } = Ue(), { guessEndOfLine: u, convertEndOfLineToChars: i, countEndOfLineChars: l, normalizeEndOfLine: p2 } = Jn(), y = uo().normalize, h = Rm(), g = et(), c = tu(), f = Wm(), F = Hm(), _ = "\uFEFF", w = Symbol("cursor"); + function E(m, C, o) { + let d = C.comments; + return d && (delete C.comments, g.attach(d, C, m, o)), o[Symbol.for("comments")] = d || [], o[Symbol.for("tokens")] = C.tokens || [], o.originalText = m, d; + } + function N(m, C) { + let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + if (!m || m.trim().length === 0) + return { formatted: "", cursorOffset: -1, comments: [] }; + let { ast: d, text: v } = c.parse(m, C); + if (C.cursorOffset >= 0) { + let k = F.findNodeAtOffset(d, C.cursorOffset, C); + k && k.node && (C.cursorNode = k.node); + } + let S = E(v, d, C), b = f(d, C, o), B = s(b, C); + if (g.ensureAllCommentsPrinted(S), o > 0) { + let k = B.formatted.trim(); + B.cursorNodeStart !== void 0 && (B.cursorNodeStart -= B.formatted.indexOf(k)), B.formatted = k + i(C.endOfLine); + } + if (C.cursorOffset >= 0) { + let k, M, R, q, J; + if (C.cursorNode && B.cursorNodeText ? (k = C.locStart(C.cursorNode), M = v.slice(k, C.locEnd(C.cursorNode)), R = C.cursorOffset - k, q = B.cursorNodeStart, J = B.cursorNodeText) : (k = 0, M = v, R = C.cursorOffset, q = 0, J = B.formatted), M === J) + return { formatted: B.formatted, cursorOffset: q + R, comments: S }; + let L = [...M]; + L.splice(R, 0, w); + let Q = [...J], V = t2(L, Q), j = q; + for (let Y of V) + if (Y.removed) { + if (Y.value.includes(w)) + break; + } else + j += Y.count; + return { formatted: B.formatted, cursorOffset: j, comments: S }; + } + return { formatted: B.formatted, cursorOffset: -1, comments: S }; + } + function x(m, C) { + let { ast: o, text: d } = c.parse(m, C), { rangeStart: v, rangeEnd: S } = F.calculateRange(d, C, o), b = d.slice(v, S), B = Math.min(v, d.lastIndexOf(` +`, v) + 1), k = d.slice(B, v).match(/^\s*/)[0], M = n(k, C.tabWidth), R = N(b, Object.assign(Object.assign({}, C), {}, { rangeStart: 0, rangeEnd: Number.POSITIVE_INFINITY, cursorOffset: C.cursorOffset > v && C.cursorOffset <= S ? C.cursorOffset - v : -1, endOfLine: "lf" }), M), q = R.formatted.trimEnd(), { cursorOffset: J } = C; + J > S ? J += q.length - b.length : R.cursorOffset >= 0 && (J = R.cursorOffset + v); + let L = d.slice(0, v) + q + d.slice(S); + if (C.endOfLine !== "lf") { + let Q = i(C.endOfLine); + J >= 0 && Q === `\r +` && (J += l(L.slice(0, J), ` +`)), L = L.replace(/\n/g, Q); + } + return { formatted: L, cursorOffset: J, comments: R.comments }; + } + function I(m, C, o) { + return typeof C != "number" || Number.isNaN(C) || C < 0 || C > m.length ? o : C; + } + function P(m, C) { + let { cursorOffset: o, rangeStart: d, rangeEnd: v } = C; + return o = I(m, o, -1), d = I(m, d, 0), v = I(m, v, m.length), Object.assign(Object.assign({}, C), {}, { cursorOffset: o, rangeStart: d, rangeEnd: v }); + } + function $(m, C) { + let { cursorOffset: o, rangeStart: d, rangeEnd: v, endOfLine: S } = P(m, C), b = m.charAt(0) === _; + if (b && (m = m.slice(1), o--, d--, v--), S === "auto" && (S = u(m)), m.includes("\r")) { + let B = (k) => l(m.slice(0, Math.max(k, 0)), `\r +`); + o -= B(o), d -= B(d), v -= B(v), m = p2(m); + } + return { hasBOM: b, text: m, options: P(m, Object.assign(Object.assign({}, C), {}, { cursorOffset: o, rangeStart: d, rangeEnd: v, endOfLine: S })) }; + } + function D(m, C) { + let o = c.resolveParser(C); + return !o.hasPragma || o.hasPragma(m); + } + function T(m, C) { + let { hasBOM: o, text: d, options: v } = $(m, y(C)); + if (v.rangeStart >= v.rangeEnd && d !== "" || v.requirePragma && !D(d, v)) + return { formatted: m, cursorOffset: C.cursorOffset, comments: [] }; + let S; + return v.rangeStart > 0 || v.rangeEnd < d.length ? S = x(d, v) : (!v.requirePragma && v.insertPragma && v.printer.insertPragma && !D(d, v) && (d = v.printer.insertPragma(d)), S = N(d, v)), o && (S.formatted = _ + S.formatted, S.cursorOffset >= 0 && S.cursorOffset++), S; + } + r.exports = { formatWithCursor: T, parse(m, C, o) { + let { text: d, options: v } = $(m, y(C)), S = c.parse(d, v); + return o && (S.ast = h(S.ast, v)), S; + }, formatAST(m, C) { + C = y(C); + let o = f(m, C); + return s(o, C); + }, formatDoc(m, C) { + return T(a(m), Object.assign(Object.assign({}, C), {}, { parser: "__js_expression" })).formatted; + }, printToDoc(m, C) { + C = y(C); + let { ast: o, text: d } = c.parse(m, C); + return E(d, o, C), f(o, C); + }, printDocToString(m, C) { + return s(m, y(C)); + } }; + } }), Um = te({ "src/common/util-shared.js"(e, r) { + "use strict"; + ne(); + var { getMaxContinuousCount: t2, getStringWidth: s, getAlignmentSize: a, getIndentSize: n, skip: u, skipWhitespace: i, skipSpaces: l, skipNewline: p2, skipToLineEnd: y, skipEverythingButNewLine: h, skipInlineComment: g, skipTrailingComment: c, hasNewline: f, hasNewlineInRange: F, hasSpaces: _, isNextLineEmpty: w, isNextLineEmptyAfterIndex: E, isPreviousLineEmpty: N, getNextNonSpaceNonCommentCharacterIndex: x, makeString: I, addLeadingComment: P, addDanglingComment: $, addTrailingComment: D } = Ue(); + r.exports = { getMaxContinuousCount: t2, getStringWidth: s, getAlignmentSize: a, getIndentSize: n, skip: u, skipWhitespace: i, skipSpaces: l, skipNewline: p2, skipToLineEnd: y, skipEverythingButNewLine: h, skipInlineComment: g, skipTrailingComment: c, hasNewline: f, hasNewlineInRange: F, hasSpaces: _, isNextLineEmpty: w, isNextLineEmptyAfterIndex: E, isPreviousLineEmpty: N, getNextNonSpaceNonCommentCharacterIndex: x, makeString: I, addLeadingComment: P, addDanglingComment: $, addTrailingComment: D }; + } }), _t = te({ "src/utils/create-language.js"(e, r) { + "use strict"; + ne(), r.exports = function(t2, s) { + let { languageId: a } = t2, n = Hn(t2, CD); + return Object.assign(Object.assign({ linguistLanguageId: a }, n), s(t2)); + }; + } }), Jm = te({ "node_modules/esutils/lib/ast.js"(e, r) { + ne(), function() { + "use strict"; + function t2(l) { + if (l == null) + return false; + switch (l.type) { + case "ArrayExpression": + case "AssignmentExpression": + case "BinaryExpression": + case "CallExpression": + case "ConditionalExpression": + case "FunctionExpression": + case "Identifier": + case "Literal": + case "LogicalExpression": + case "MemberExpression": + case "NewExpression": + case "ObjectExpression": + case "SequenceExpression": + case "ThisExpression": + case "UnaryExpression": + case "UpdateExpression": + return true; + } + return false; + } + function s(l) { + if (l == null) + return false; + switch (l.type) { + case "DoWhileStatement": + case "ForInStatement": + case "ForStatement": + case "WhileStatement": + return true; + } + return false; + } + function a(l) { + if (l == null) + return false; + switch (l.type) { + case "BlockStatement": + case "BreakStatement": + case "ContinueStatement": + case "DebuggerStatement": + case "DoWhileStatement": + case "EmptyStatement": + case "ExpressionStatement": + case "ForInStatement": + case "ForStatement": + case "IfStatement": + case "LabeledStatement": + case "ReturnStatement": + case "SwitchStatement": + case "ThrowStatement": + case "TryStatement": + case "VariableDeclaration": + case "WhileStatement": + case "WithStatement": + return true; + } + return false; + } + function n(l) { + return a(l) || l != null && l.type === "FunctionDeclaration"; + } + function u(l) { + switch (l.type) { + case "IfStatement": + return l.alternate != null ? l.alternate : l.consequent; + case "LabeledStatement": + case "ForStatement": + case "ForInStatement": + case "WhileStatement": + case "WithStatement": + return l.body; + } + return null; + } + function i(l) { + var p2; + if (l.type !== "IfStatement" || l.alternate == null) + return false; + p2 = l.consequent; + do { + if (p2.type === "IfStatement" && p2.alternate == null) + return true; + p2 = u(p2); + } while (p2); + return false; + } + r.exports = { isExpression: t2, isStatement: a, isIterationStatement: s, isSourceElement: n, isProblematicIfStatement: i, trailingStatement: u }; + }(); + } }), so = te({ "node_modules/esutils/lib/code.js"(e, r) { + ne(), function() { + "use strict"; + var t2, s, a, n, u, i; + s = { NonAsciiIdentifierStart: /[\xAA\xB5\xBA\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\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\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\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-\uAB65\uAB70-\uABE2\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ }, t2 = { NonAsciiIdentifierStart: /[\xAA\xB5\xBA\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\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\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\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-\uAB65\uAB70-\uABE2\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\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\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\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]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\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\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\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]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ }; + function l(E) { + return 48 <= E && E <= 57; + } + function p2(E) { + return 48 <= E && E <= 57 || 97 <= E && E <= 102 || 65 <= E && E <= 70; + } + function y(E) { + return E >= 48 && E <= 55; + } + a = [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279]; + function h(E) { + return E === 32 || E === 9 || E === 11 || E === 12 || E === 160 || E >= 5760 && a.indexOf(E) >= 0; + } + function g(E) { + return E === 10 || E === 13 || E === 8232 || E === 8233; + } + function c(E) { + if (E <= 65535) + return String.fromCharCode(E); + var N = String.fromCharCode(Math.floor((E - 65536) / 1024) + 55296), x = String.fromCharCode((E - 65536) % 1024 + 56320); + return N + x; + } + for (n = new Array(128), i = 0; i < 128; ++i) + n[i] = i >= 97 && i <= 122 || i >= 65 && i <= 90 || i === 36 || i === 95; + for (u = new Array(128), i = 0; i < 128; ++i) + u[i] = i >= 97 && i <= 122 || i >= 65 && i <= 90 || i >= 48 && i <= 57 || i === 36 || i === 95; + function f(E) { + return E < 128 ? n[E] : s.NonAsciiIdentifierStart.test(c(E)); + } + function F(E) { + return E < 128 ? u[E] : s.NonAsciiIdentifierPart.test(c(E)); + } + function _(E) { + return E < 128 ? n[E] : t2.NonAsciiIdentifierStart.test(c(E)); + } + function w(E) { + return E < 128 ? u[E] : t2.NonAsciiIdentifierPart.test(c(E)); + } + r.exports = { isDecimalDigit: l, isHexDigit: p2, isOctalDigit: y, isWhiteSpace: h, isLineTerminator: g, isIdentifierStartES5: f, isIdentifierPartES5: F, isIdentifierStartES6: _, isIdentifierPartES6: w }; + }(); + } }), zm = te({ "node_modules/esutils/lib/keyword.js"(e, r) { + ne(), function() { + "use strict"; + var t2 = so(); + function s(f) { + switch (f) { + case "implements": + case "interface": + case "package": + case "private": + case "protected": + case "public": + case "static": + case "let": + return true; + default: + return false; + } + } + function a(f, F) { + return !F && f === "yield" ? false : n(f, F); + } + function n(f, F) { + if (F && s(f)) + return true; + switch (f.length) { + case 2: + return f === "if" || f === "in" || f === "do"; + case 3: + return f === "var" || f === "for" || f === "new" || f === "try"; + case 4: + return f === "this" || f === "else" || f === "case" || f === "void" || f === "with" || f === "enum"; + case 5: + return f === "while" || f === "break" || f === "catch" || f === "throw" || f === "const" || f === "yield" || f === "class" || f === "super"; + case 6: + return f === "return" || f === "typeof" || f === "delete" || f === "switch" || f === "export" || f === "import"; + case 7: + return f === "default" || f === "finally" || f === "extends"; + case 8: + return f === "function" || f === "continue" || f === "debugger"; + case 10: + return f === "instanceof"; + default: + return false; + } + } + function u(f, F) { + return f === "null" || f === "true" || f === "false" || a(f, F); + } + function i(f, F) { + return f === "null" || f === "true" || f === "false" || n(f, F); + } + function l(f) { + return f === "eval" || f === "arguments"; + } + function p2(f) { + var F, _, w; + if (f.length === 0 || (w = f.charCodeAt(0), !t2.isIdentifierStartES5(w))) + return false; + for (F = 1, _ = f.length; F < _; ++F) + if (w = f.charCodeAt(F), !t2.isIdentifierPartES5(w)) + return false; + return true; + } + function y(f, F) { + return (f - 55296) * 1024 + (F - 56320) + 65536; + } + function h(f) { + var F, _, w, E, N; + if (f.length === 0) + return false; + for (N = t2.isIdentifierStartES6, F = 0, _ = f.length; F < _; ++F) { + if (w = f.charCodeAt(F), 55296 <= w && w <= 56319) { + if (++F, F >= _ || (E = f.charCodeAt(F), !(56320 <= E && E <= 57343))) + return false; + w = y(w, E); + } + if (!N(w)) + return false; + N = t2.isIdentifierPartES6; + } + return true; + } + function g(f, F) { + return p2(f) && !u(f, F); + } + function c(f, F) { + return h(f) && !i(f, F); + } + r.exports = { isKeywordES5: a, isKeywordES6: n, isReservedWordES5: u, isReservedWordES6: i, isRestrictedWord: l, isIdentifierNameES5: p2, isIdentifierNameES6: h, isIdentifierES5: g, isIdentifierES6: c }; + }(); + } }), Xm = te({ "node_modules/esutils/lib/utils.js"(e) { + ne(), function() { + "use strict"; + e.ast = Jm(), e.code = so(), e.keyword = zm(); + }(); + } }), Pt = te({ "src/language-js/utils/is-block-comment.js"(e, r) { + "use strict"; + ne(); + var t2 = /* @__PURE__ */ new Set(["Block", "CommentBlock", "MultiLine"]), s = (a) => t2.has(a == null ? void 0 : a.type); + r.exports = s; + } }), Km = te({ "src/language-js/utils/is-node-matches.js"(e, r) { + "use strict"; + ne(); + function t2(a, n) { + let u = n.split("."); + for (let i = u.length - 1; i >= 0; i--) { + let l = u[i]; + if (i === 0) + return a.type === "Identifier" && a.name === l; + if (a.type !== "MemberExpression" || a.optional || a.computed || a.property.type !== "Identifier" || a.property.name !== l) + return false; + a = a.object; + } + } + function s(a, n) { + return n.some((u) => t2(a, u)); + } + r.exports = s; + } }), Ke = te({ "src/language-js/utils/index.js"(e, r) { + "use strict"; + ne(); + var t2 = Xm().keyword.isIdentifierNameES5, { getLast: s, hasNewline: a, skipWhitespace: n, isNonEmptyArray: u, isNextLineEmptyAfterIndex: i, getStringWidth: l } = Ue(), { locStart: p2, locEnd: y, hasSameLocStart: h } = ut(), g = Pt(), c = Km(), f = "(?:(?=.)\\s)", F = new RegExp(`^${f}*:`), _ = new RegExp(`^${f}*::`); + function w(O) { + var me, _e; + return ((me = O.extra) === null || me === void 0 ? void 0 : me.parenthesized) && g((_e = O.trailingComments) === null || _e === void 0 ? void 0 : _e[0]) && F.test(O.trailingComments[0].value); + } + function E(O) { + let me = O == null ? void 0 : O[0]; + return g(me) && _.test(me.value); + } + function N(O, me) { + if (!O || typeof O != "object") + return false; + if (Array.isArray(O)) + return O.some((He) => N(He, me)); + let _e = me(O); + return typeof _e == "boolean" ? _e : Object.values(O).some((He) => N(He, me)); + } + function x(O) { + return O.type === "AssignmentExpression" || O.type === "BinaryExpression" || O.type === "LogicalExpression" || O.type === "NGPipeExpression" || O.type === "ConditionalExpression" || de(O) || ue(O) || O.type === "SequenceExpression" || O.type === "TaggedTemplateExpression" || O.type === "BindExpression" || O.type === "UpdateExpression" && !O.prefix || st(O) || O.type === "TSNonNullExpression"; + } + function I(O) { + var me, _e, He, Ge, it, Qe; + return O.expressions ? O.expressions[0] : (me = (_e = (He = (Ge = (it = (Qe = O.left) !== null && Qe !== void 0 ? Qe : O.test) !== null && it !== void 0 ? it : O.callee) !== null && Ge !== void 0 ? Ge : O.object) !== null && He !== void 0 ? He : O.tag) !== null && _e !== void 0 ? _e : O.argument) !== null && me !== void 0 ? me : O.expression; + } + function P(O, me) { + if (me.expressions) + return ["expressions", 0]; + if (me.left) + return ["left"]; + if (me.test) + return ["test"]; + if (me.object) + return ["object"]; + if (me.callee) + return ["callee"]; + if (me.tag) + return ["tag"]; + if (me.argument) + return ["argument"]; + if (me.expression) + return ["expression"]; + throw new Error("Unexpected node has no left side."); + } + function $(O) { + return O = new Set(O), (me) => O.has(me == null ? void 0 : me.type); + } + var D = $(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose"]), T = $(["ExportDefaultDeclaration", "ExportDefaultSpecifier", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration"]); + function m(O) { + let me = O.getParentNode(); + return O.getName() === "declaration" && T(me) ? me : null; + } + var C = $(["BooleanLiteral", "DirectiveLiteral", "Literal", "NullLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "RegExpLiteral", "StringLiteral", "TemplateLiteral", "TSTypeLiteral", "JSXText"]); + function o(O) { + return O.type === "NumericLiteral" || O.type === "Literal" && typeof O.value == "number"; + } + function d(O) { + return O.type === "UnaryExpression" && (O.operator === "+" || O.operator === "-") && o(O.argument); + } + function v(O) { + return O.type === "StringLiteral" || O.type === "Literal" && typeof O.value == "string"; + } + var S = $(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]), b = $(["FunctionExpression", "ArrowFunctionExpression"]); + function B(O) { + return O.type === "FunctionExpression" || O.type === "ArrowFunctionExpression" && O.body.type === "BlockStatement"; + } + function k(O) { + return de(O) && O.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(O.callee.name); + } + var M = $(["JSXElement", "JSXFragment"]); + function R(O, me) { + if (O.parentParser !== "markdown" && O.parentParser !== "mdx") + return false; + let _e = me.getNode(); + if (!_e.expression || !M(_e.expression)) + return false; + let He = me.getParentNode(); + return He.type === "Program" && He.body.length === 1; + } + function q(O) { + return O.kind === "get" || O.kind === "set"; + } + function J(O) { + return q(O) || h(O, O.value); + } + function L(O) { + return (O.type === "ObjectTypeProperty" || O.type === "ObjectTypeInternalSlot") && O.value.type === "FunctionTypeAnnotation" && !O.static && !J(O); + } + function Q(O) { + return (O.type === "TypeAnnotation" || O.type === "TSTypeAnnotation") && O.typeAnnotation.type === "FunctionTypeAnnotation" && !O.static && !h(O, O.typeAnnotation); + } + var V = $(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]); + function j(O) { + return ue(O) || O.type === "BindExpression" && Boolean(O.object); + } + var Y = /* @__PURE__ */ new Set(["AnyTypeAnnotation", "TSAnyKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword", "ThisTypeAnnotation", "TSThisType", "NumberTypeAnnotation", "TSNumberKeyword", "VoidTypeAnnotation", "TSVoidKeyword", "BooleanTypeAnnotation", "TSBooleanKeyword", "BigIntTypeAnnotation", "TSBigIntKeyword", "SymbolTypeAnnotation", "TSSymbolKeyword", "StringTypeAnnotation", "TSStringKeyword", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType", "EmptyTypeAnnotation", "MixedTypeAnnotation", "TSNeverKeyword", "TSObjectKeyword", "TSUndefinedKeyword", "TSUnknownKeyword"]); + function ie(O) { + return O ? !!((O.type === "GenericTypeAnnotation" || O.type === "TSTypeReference") && !O.typeParameters || Y.has(O.type)) : false; + } + function ee(O) { + let me = /^(?:before|after)(?:Each|All)$/; + return O.callee.type === "Identifier" && me.test(O.callee.name) && O.arguments.length === 1; + } + var ce = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.step", "test.describe", "test.describe.only", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"]; + function W(O) { + return c(O, ce); + } + function K(O, me) { + if (O.type !== "CallExpression") + return false; + if (O.arguments.length === 1) { + if (k(O) && me && K(me)) + return b(O.arguments[0]); + if (ee(O)) + return k(O.arguments[0]); + } else if ((O.arguments.length === 2 || O.arguments.length === 3) && (O.arguments[0].type === "TemplateLiteral" || v(O.arguments[0])) && W(O.callee)) + return O.arguments[2] && !o(O.arguments[2]) ? false : (O.arguments.length === 2 ? b(O.arguments[1]) : B(O.arguments[1]) && ve(O.arguments[1]).length <= 1) || k(O.arguments[1]); + return false; + } + var de = $(["CallExpression", "OptionalCallExpression"]), ue = $(["MemberExpression", "OptionalMemberExpression"]); + function Fe(O) { + let me = "expressions"; + O.type === "TSTemplateLiteralType" && (me = "types"); + let _e = O[me]; + return _e.length === 0 ? false : _e.every((He) => { + if (Me(He)) + return false; + if (He.type === "Identifier" || He.type === "ThisExpression") + return true; + if (ue(He)) { + let Ge = He; + for (; ue(Ge); ) + if (Ge.property.type !== "Identifier" && Ge.property.type !== "Literal" && Ge.property.type !== "StringLiteral" && Ge.property.type !== "NumericLiteral" || (Ge = Ge.object, Me(Ge))) + return false; + return Ge.type === "Identifier" || Ge.type === "ThisExpression"; + } + return false; + }); + } + function z(O, me) { + return O === "+" || O === "-" ? O + me : me; + } + function U(O, me) { + let _e = p2(me), He = n(O, y(me)); + return He !== false && O.slice(_e, _e + 2) === "/*" && O.slice(He, He + 2) === "*/"; + } + function Z(O, me) { + return M(me) ? Oe(me) : Me(me, Te.Leading, (_e) => a(O, y(_e))); + } + function se(O, me) { + return me.parser !== "json" && v(O.key) && oe(O.key).slice(1, -1) === O.key.value && (t2(O.key.value) && !(me.parser === "babel-ts" && O.type === "ClassProperty" || me.parser === "typescript" && O.type === "PropertyDefinition") || fe(O.key.value) && String(Number(O.key.value)) === O.key.value && (me.parser === "babel" || me.parser === "acorn" || me.parser === "espree" || me.parser === "meriyah" || me.parser === "__babel_estree")); + } + function fe(O) { + return /^(?:\d+|\d+\.\d+)$/.test(O); + } + function ge(O, me) { + let _e = /^[fx]?(?:describe|it|test)$/; + return me.type === "TaggedTemplateExpression" && me.quasi === O && me.tag.type === "MemberExpression" && me.tag.property.type === "Identifier" && me.tag.property.name === "each" && (me.tag.object.type === "Identifier" && _e.test(me.tag.object.name) || me.tag.object.type === "MemberExpression" && me.tag.object.property.type === "Identifier" && (me.tag.object.property.name === "only" || me.tag.object.property.name === "skip") && me.tag.object.object.type === "Identifier" && _e.test(me.tag.object.object.name)); + } + function he(O) { + return O.quasis.some((me) => me.value.raw.includes(` +`)); + } + function we(O, me) { + return (O.type === "TemplateLiteral" && he(O) || O.type === "TaggedTemplateExpression" && he(O.quasi)) && !a(me, p2(O), { backwards: true }); + } + function ke(O) { + if (!Me(O)) + return false; + let me = s(ae(O, Te.Dangling)); + return me && !g(me); + } + function Re(O) { + if (O.length <= 1) + return false; + let me = 0; + for (let _e of O) + if (b(_e)) { + if (me += 1, me > 1) + return true; + } else if (de(_e)) { + for (let He of _e.arguments) + if (b(He)) + return true; + } + return false; + } + function Ne(O) { + let me = O.getValue(), _e = O.getParentNode(); + return de(me) && de(_e) && _e.callee === me && me.arguments.length > _e.arguments.length && _e.arguments.length > 0; + } + function Pe(O, me) { + if (me >= 2) + return false; + let _e = (Qe) => Pe(Qe, me + 1), He = O.type === "Literal" && "regex" in O && O.regex.pattern || O.type === "RegExpLiteral" && O.pattern; + if (He && l(He) > 5) + return false; + if (O.type === "Literal" || O.type === "BigIntLiteral" || O.type === "DecimalLiteral" || O.type === "BooleanLiteral" || O.type === "NullLiteral" || O.type === "NumericLiteral" || O.type === "RegExpLiteral" || O.type === "StringLiteral" || O.type === "Identifier" || O.type === "ThisExpression" || O.type === "Super" || O.type === "PrivateName" || O.type === "PrivateIdentifier" || O.type === "ArgumentPlaceholder" || O.type === "Import") + return true; + if (O.type === "TemplateLiteral") + return O.quasis.every((Qe) => !Qe.value.raw.includes(` +`)) && O.expressions.every(_e); + if (O.type === "ObjectExpression") + return O.properties.every((Qe) => !Qe.computed && (Qe.shorthand || Qe.value && _e(Qe.value))); + if (O.type === "ArrayExpression") + return O.elements.every((Qe) => Qe === null || _e(Qe)); + if (tt(O)) + return (O.type === "ImportExpression" || Pe(O.callee, me)) && Ye(O).every(_e); + if (ue(O)) + return Pe(O.object, me) && Pe(O.property, me); + let Ge = { "!": true, "-": true, "+": true, "~": true }; + if (O.type === "UnaryExpression" && Ge[O.operator]) + return Pe(O.argument, me); + let it = { "++": true, "--": true }; + return O.type === "UpdateExpression" && it[O.operator] ? Pe(O.argument, me) : O.type === "TSNonNullExpression" ? Pe(O.expression, me) : false; + } + function oe(O) { + var me, _e; + return (me = (_e = O.extra) === null || _e === void 0 ? void 0 : _e.raw) !== null && me !== void 0 ? me : O.raw; + } + function H(O) { + return O; + } + function pe(O) { + return O.filepath && /\.tsx$/i.test(O.filepath); + } + function X(O) { + let me = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "es5"; + return O.trailingComma === "es5" && me === "es5" || O.trailingComma === "all" && (me === "all" || me === "es5"); + } + function le(O, me) { + switch (O.type) { + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + case "NGPipeExpression": + return le(O.left, me); + case "MemberExpression": + case "OptionalMemberExpression": + return le(O.object, me); + case "TaggedTemplateExpression": + return O.tag.type === "FunctionExpression" ? false : le(O.tag, me); + case "CallExpression": + case "OptionalCallExpression": + return O.callee.type === "FunctionExpression" ? false : le(O.callee, me); + case "ConditionalExpression": + return le(O.test, me); + case "UpdateExpression": + return !O.prefix && le(O.argument, me); + case "BindExpression": + return O.object && le(O.object, me); + case "SequenceExpression": + return le(O.expressions[0], me); + case "TSSatisfiesExpression": + case "TSAsExpression": + case "TSNonNullExpression": + return le(O.expression, me); + default: + return me(O); + } + } + var Ae = { "==": true, "!=": true, "===": true, "!==": true }, Ee = { "*": true, "/": true, "%": true }, De = { ">>": true, ">>>": true, "<<": true }; + function A(O, me) { + return !(re(me) !== re(O) || O === "**" || Ae[O] && Ae[me] || me === "%" && Ee[O] || O === "%" && Ee[me] || me !== O && Ee[me] && Ee[O] || De[O] && De[me]); + } + var G = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((O, me) => O.map((_e) => [_e, me]))); + function re(O) { + return G.get(O); + } + function ye(O) { + return Boolean(De[O]) || O === "|" || O === "^" || O === "&"; + } + function Ce(O) { + var me; + if (O.rest) + return true; + let _e = ve(O); + return ((me = s(_e)) === null || me === void 0 ? void 0 : me.type) === "RestElement"; + } + var Be = /* @__PURE__ */ new WeakMap(); + function ve(O) { + if (Be.has(O)) + return Be.get(O); + let me = []; + return O.this && me.push(O.this), Array.isArray(O.parameters) ? me.push(...O.parameters) : Array.isArray(O.params) && me.push(...O.params), O.rest && me.push(O.rest), Be.set(O, me), me; + } + function ze(O, me) { + let _e = O.getValue(), He = 0, Ge = (it) => me(it, He++); + _e.this && O.call(Ge, "this"), Array.isArray(_e.parameters) ? O.each(Ge, "parameters") : Array.isArray(_e.params) && O.each(Ge, "params"), _e.rest && O.call(Ge, "rest"); + } + var be = /* @__PURE__ */ new WeakMap(); + function Ye(O) { + if (be.has(O)) + return be.get(O); + let me = O.arguments; + return O.type === "ImportExpression" && (me = [O.source], O.attributes && me.push(O.attributes)), be.set(O, me), me; + } + function Se(O, me) { + let _e = O.getValue(); + _e.type === "ImportExpression" ? (O.call((He) => me(He, 0), "source"), _e.attributes && O.call((He) => me(He, 1), "attributes")) : O.each(me, "arguments"); + } + function Ie(O) { + return O.value.trim() === "prettier-ignore" && !O.unignore; + } + function Oe(O) { + return O && (O.prettierIgnore || Me(O, Te.PrettierIgnore)); + } + function Je(O) { + let me = O.getValue(); + return Oe(me); + } + var Te = { Leading: 1 << 1, Trailing: 1 << 2, Dangling: 1 << 3, Block: 1 << 4, Line: 1 << 5, PrettierIgnore: 1 << 6, First: 1 << 7, Last: 1 << 8 }, je = (O, me) => { + if (typeof O == "function" && (me = O, O = 0), O || me) + return (_e, He, Ge) => !(O & Te.Leading && !_e.leading || O & Te.Trailing && !_e.trailing || O & Te.Dangling && (_e.leading || _e.trailing) || O & Te.Block && !g(_e) || O & Te.Line && !D(_e) || O & Te.First && He !== 0 || O & Te.Last && He !== Ge.length - 1 || O & Te.PrettierIgnore && !Ie(_e) || me && !me(_e)); + }; + function Me(O, me, _e) { + if (!u(O == null ? void 0 : O.comments)) + return false; + let He = je(me, _e); + return He ? O.comments.some(He) : true; + } + function ae(O, me, _e) { + if (!Array.isArray(O == null ? void 0 : O.comments)) + return []; + let He = je(me, _e); + return He ? O.comments.filter(He) : O.comments; + } + var nt = (O, me) => { + let { originalText: _e } = me; + return i(_e, y(O)); + }; + function tt(O) { + return de(O) || O.type === "NewExpression" || O.type === "ImportExpression"; + } + function Ve(O) { + return O && (O.type === "ObjectProperty" || O.type === "Property" && !O.method && O.kind === "init"); + } + function We(O) { + return Boolean(O.__isUsingHackPipeline); + } + var Xe = Symbol("ifWithoutBlockAndSameLineComment"); + function st(O) { + return O.type === "TSAsExpression" || O.type === "TSSatisfiesExpression"; + } + r.exports = { getFunctionParameters: ve, iterateFunctionParametersPath: ze, getCallArguments: Ye, iterateCallArgumentsPath: Se, hasRestParameter: Ce, getLeftSide: I, getLeftSidePathName: P, getParentExportDeclaration: m, getTypeScriptMappedTypeModifier: z, hasFlowAnnotationComment: E, hasFlowShorthandAnnotationComment: w, hasLeadingOwnLineComment: Z, hasNakedLeftSide: x, hasNode: N, hasIgnoreComment: Je, hasNodeIgnoreComment: Oe, identity: H, isBinaryish: V, isCallLikeExpression: tt, isEnabledHackPipeline: We, isLineComment: D, isPrettierIgnoreComment: Ie, isCallExpression: de, isMemberExpression: ue, isExportDeclaration: T, isFlowAnnotationComment: U, isFunctionCompositionArgs: Re, isFunctionNotation: J, isFunctionOrArrowExpression: b, isGetterOrSetter: q, isJestEachTemplateLiteral: ge, isJsxNode: M, isLiteral: C, isLongCurriedCallExpression: Ne, isSimpleCallArgument: Pe, isMemberish: j, isNumericLiteral: o, isSignedNumericLiteral: d, isObjectProperty: Ve, isObjectType: S, isObjectTypePropertyAFunction: L, isSimpleType: ie, isSimpleNumber: fe, isSimpleTemplateLiteral: Fe, isStringLiteral: v, isStringPropSafeToUnquote: se, isTemplateOnItsOwnLine: we, isTestCall: K, isTheOnlyJsxElementInMarkdown: R, isTSXFile: pe, isTypeAnnotationAFunction: Q, isNextLineEmpty: nt, needsHardlineAfterDanglingComment: ke, rawText: oe, shouldPrintComma: X, isBitwiseOperator: ye, shouldFlatten: A, startsWithNoLookaheadToken: le, getPrecedence: re, hasComment: Me, getComments: ae, CommentCheckFlags: Te, markerForIfWithoutBlockAndSameLineComment: Xe, isTSTypeExpression: st }; + } }), jt = te({ "src/language-js/print/template-literal.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { getStringWidth: s, getIndentSize: a } = Ue(), { builders: { join: n, hardline: u, softline: i, group: l, indent: p2, align: y, lineSuffixBoundary: h, addAlignmentToDoc: g }, printer: { printDocToString: c }, utils: { mapDoc: f } } = qe(), { isBinaryish: F, isJestEachTemplateLiteral: _, isSimpleTemplateLiteral: w, hasComment: E, isMemberExpression: N, isTSTypeExpression: x } = Ke(); + function I(C, o, d) { + let v = C.getValue(); + if (v.type === "TemplateLiteral" && _(v, C.getParentNode())) { + let R = P(C, d, o); + if (R) + return R; + } + let b = "expressions"; + v.type === "TSTemplateLiteralType" && (b = "types"); + let B = [], k = C.map(o, b), M = w(v); + return M && (k = k.map((R) => c(R, Object.assign(Object.assign({}, d), {}, { printWidth: Number.POSITIVE_INFINITY })).formatted)), B.push(h, "`"), C.each((R) => { + let q = R.getName(); + if (B.push(o()), q < k.length) { + let { tabWidth: J } = d, L = R.getValue(), Q = a(L.value.raw, J), V = k[q]; + if (!M) { + let Y = v[b][q]; + (E(Y) || N(Y) || Y.type === "ConditionalExpression" || Y.type === "SequenceExpression" || x(Y) || F(Y)) && (V = [p2([i, V]), i]); + } + let j = Q === 0 && L.value.raw.endsWith(` +`) ? y(Number.NEGATIVE_INFINITY, V) : g(V, Q, J); + B.push(l(["${", j, h, "}"])); + } + }, "quasis"), B.push("`"), B; + } + function P(C, o, d) { + let v = C.getNode(), S = v.quasis[0].value.raw.trim().split(/\s*\|\s*/); + if (S.length > 1 || S.some((b) => b.length > 0)) { + o.__inJestEach = true; + let b = C.map(d, "expressions"); + o.__inJestEach = false; + let B = [], k = b.map((L) => "${" + c(L, Object.assign(Object.assign({}, o), {}, { printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" })).formatted + "}"), M = [{ hasLineBreak: false, cells: [] }]; + for (let L = 1; L < v.quasis.length; L++) { + let Q = t2(M), V = k[L - 1]; + Q.cells.push(V), V.includes(` +`) && (Q.hasLineBreak = true), v.quasis[L].value.raw.includes(` +`) && M.push({ hasLineBreak: false, cells: [] }); + } + let R = Math.max(S.length, ...M.map((L) => L.cells.length)), q = Array.from({ length: R }).fill(0), J = [{ cells: S }, ...M.filter((L) => L.cells.length > 0)]; + for (let { cells: L } of J.filter((Q) => !Q.hasLineBreak)) + for (let [Q, V] of L.entries()) + q[Q] = Math.max(q[Q], s(V)); + return B.push(h, "`", p2([u, n(u, J.map((L) => n(" | ", L.cells.map((Q, V) => L.hasLineBreak ? Q : Q + " ".repeat(q[V] - s(Q))))))]), u, "`"), B; + } + } + function $(C, o) { + let d = C.getValue(), v = o(); + return E(d) && (v = l([p2([i, v]), i])), ["${", v, h, "}"]; + } + function D(C, o) { + return C.map((d) => $(d, o), "expressions"); + } + function T(C, o) { + return f(C, (d) => typeof d == "string" ? o ? d.replace(/(\\*)`/g, "$1$1\\`") : m(d) : d); + } + function m(C) { + return C.replace(/([\\`]|\${)/g, "\\$1"); + } + r.exports = { printTemplateLiteral: I, printTemplateExpressions: D, escapeTemplateCharacters: T, uncookTemplateElementValue: m }; + } }), Ym = te({ "src/language-js/embed/markdown.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, softline: s, literalline: a, dedentToRoot: n } } = qe(), { escapeTemplateCharacters: u } = jt(); + function i(p2, y, h) { + let c = p2.getValue().quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, (w, E) => "\\".repeat(E.length / 2) + "`"), f = l(c), F = f !== ""; + F && (c = c.replace(new RegExp(`^${f}`, "gm"), "")); + let _ = u(h(c, { parser: "markdown", __inJsTemplate: true }, { stripTrailingHardline: true }), true); + return ["`", F ? t2([s, _]) : [a, n(_)], s, "`"]; + } + function l(p2) { + let y = p2.match(/^([^\S\n]*)\S/m); + return y === null ? "" : y[1]; + } + r.exports = i; + } }), Qm = te({ "src/language-js/embed/css.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { indent: s, hardline: a, softline: n }, utils: { mapDoc: u, replaceEndOfLine: i, cleanDoc: l } } = qe(), { printTemplateExpressions: p2 } = jt(); + function y(c, f, F) { + let _ = c.getValue(), w = _.quasis.map((P) => P.value.raw), E = 0, N = w.reduce((P, $, D) => D === 0 ? $ : P + "@prettier-placeholder-" + E++ + "-id" + $, ""), x = F(N, { parser: "scss" }, { stripTrailingHardline: true }), I = p2(c, f); + return h(x, _, I); + } + function h(c, f, F) { + if (f.quasis.length === 1 && !f.quasis[0].value.raw.trim()) + return "``"; + let w = g(c, F); + if (!w) + throw new Error("Couldn't insert all the expressions"); + return ["`", s([a, w]), n, "`"]; + } + function g(c, f) { + if (!t2(f)) + return c; + let F = 0, _ = u(l(c), (w) => typeof w != "string" || !w.includes("@prettier-placeholder") ? w : w.split(/@prettier-placeholder-(\d+)-id/).map((E, N) => N % 2 === 0 ? i(E) : (F++, f[E]))); + return f.length === F ? _ : null; + } + r.exports = y; + } }), Zm = te({ "src/language-js/embed/graphql.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, join: s, hardline: a } } = qe(), { escapeTemplateCharacters: n, printTemplateExpressions: u } = jt(); + function i(p2, y, h) { + let g = p2.getValue(), c = g.quasis.length; + if (c === 1 && g.quasis[0].value.raw.trim() === "") + return "``"; + let f = u(p2, y), F = []; + for (let _ = 0; _ < c; _++) { + let w = g.quasis[_], E = _ === 0, N = _ === c - 1, x = w.value.cooked, I = x.split(` +`), P = I.length, $ = f[_], D = P > 2 && I[0].trim() === "" && I[1].trim() === "", T = P > 2 && I[P - 1].trim() === "" && I[P - 2].trim() === "", m = I.every((o) => /^\s*(?:#[^\n\r]*)?$/.test(o)); + if (!N && /#[^\n\r]*$/.test(I[P - 1])) + return null; + let C = null; + m ? C = l(I) : C = h(x, { parser: "graphql" }, { stripTrailingHardline: true }), C ? (C = n(C, false), !E && D && F.push(""), F.push(C), !N && T && F.push("")) : !E && !N && D && F.push(""), $ && F.push($); + } + return ["`", t2([a, s(a, F)]), a, "`"]; + } + function l(p2) { + let y = [], h = false, g = p2.map((c) => c.trim()); + for (let [c, f] of g.entries()) + f !== "" && (g[c - 1] === "" && h ? y.push([a, f]) : y.push(f), h = true); + return y.length === 0 ? null : s(a, y); + } + r.exports = i; + } }), ed = te({ "src/language-js/embed/html.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, line: s, hardline: a, group: n }, utils: { mapDoc: u } } = qe(), { printTemplateExpressions: i, uncookTemplateElementValue: l } = jt(), p2 = 0; + function y(h, g, c, f, F) { + let { parser: _ } = F, w = h.getValue(), E = p2; + p2 = p2 + 1 >>> 0; + let N = (d) => `PRETTIER_HTML_PLACEHOLDER_${d}_${E}_IN_JS`, x = w.quasis.map((d, v, S) => v === S.length - 1 ? d.value.cooked : d.value.cooked + N(v)).join(""), I = i(h, g); + if (I.length === 0 && x.trim().length === 0) + return "``"; + let P = new RegExp(N("(\\d+)"), "g"), $ = 0, D = c(x, { parser: _, __onHtmlRoot(d) { + $ = d.children.length; + } }, { stripTrailingHardline: true }), T = u(D, (d) => { + if (typeof d != "string") + return d; + let v = [], S = d.split(P); + for (let b = 0; b < S.length; b++) { + let B = S[b]; + if (b % 2 === 0) { + B && (B = l(B), f.__embeddedInHtml && (B = B.replace(/<\/(script)\b/gi, "<\\/$1")), v.push(B)); + continue; + } + let k = Number(B); + v.push(I[k]); + } + return v; + }), m = /^\s/.test(x) ? " " : "", C = /\s$/.test(x) ? " " : "", o = f.htmlWhitespaceSensitivity === "ignore" ? a : m && C ? s : null; + return n(o ? ["`", t2([o, n(T)]), o, "`"] : ["`", m, $ > 1 ? t2(n(T)) : n(T), C, "`"]); + } + r.exports = y; + } }), td = te({ "src/language-js/embed.js"(e, r) { + "use strict"; + ne(); + var { hasComment: t2, CommentCheckFlags: s, isObjectProperty: a } = Ke(), n = Ym(), u = Qm(), i = Zm(), l = ed(); + function p2(D) { + if (g(D) || _(D) || w(D) || c(D)) + return "css"; + if (x(D)) + return "graphql"; + if (P(D)) + return "html"; + if (f(D)) + return "angular"; + if (h(D)) + return "markdown"; + } + function y(D, T, m, C) { + let o = D.getValue(); + if (o.type !== "TemplateLiteral" || $(o)) + return; + let d = p2(D); + if (d) { + if (d === "markdown") + return n(D, T, m); + if (d === "css") + return u(D, T, m); + if (d === "graphql") + return i(D, T, m); + if (d === "html" || d === "angular") + return l(D, T, m, C, { parser: d }); + } + } + function h(D) { + let T = D.getValue(), m = D.getParentNode(); + return m && m.type === "TaggedTemplateExpression" && T.quasis.length === 1 && m.tag.type === "Identifier" && (m.tag.name === "md" || m.tag.name === "markdown"); + } + function g(D) { + let T = D.getValue(), m = D.getParentNode(), C = D.getParentNode(1); + return C && T.quasis && m.type === "JSXExpressionContainer" && C.type === "JSXElement" && C.openingElement.name.name === "style" && C.openingElement.attributes.some((o) => o.name.name === "jsx") || m && m.type === "TaggedTemplateExpression" && m.tag.type === "Identifier" && m.tag.name === "css" || m && m.type === "TaggedTemplateExpression" && m.tag.type === "MemberExpression" && m.tag.object.name === "css" && (m.tag.property.name === "global" || m.tag.property.name === "resolve"); + } + function c(D) { + return D.match((T) => T.type === "TemplateLiteral", (T, m) => T.type === "ArrayExpression" && m === "elements", (T, m) => a(T) && T.key.type === "Identifier" && T.key.name === "styles" && m === "value", ...F); + } + function f(D) { + return D.match((T) => T.type === "TemplateLiteral", (T, m) => a(T) && T.key.type === "Identifier" && T.key.name === "template" && m === "value", ...F); + } + var F = [(D, T) => D.type === "ObjectExpression" && T === "properties", (D, T) => D.type === "CallExpression" && D.callee.type === "Identifier" && D.callee.name === "Component" && T === "arguments", (D, T) => D.type === "Decorator" && T === "expression"]; + function _(D) { + let T = D.getParentNode(); + if (!T || T.type !== "TaggedTemplateExpression") + return false; + let m = T.tag.type === "ParenthesizedExpression" ? T.tag.expression : T.tag; + switch (m.type) { + case "MemberExpression": + return E(m.object) || N(m); + case "CallExpression": + return E(m.callee) || m.callee.type === "MemberExpression" && (m.callee.object.type === "MemberExpression" && (E(m.callee.object.object) || N(m.callee.object)) || m.callee.object.type === "CallExpression" && E(m.callee.object.callee)); + case "Identifier": + return m.name === "css"; + default: + return false; + } + } + function w(D) { + let T = D.getParentNode(), m = D.getParentNode(1); + return m && T.type === "JSXExpressionContainer" && m.type === "JSXAttribute" && m.name.type === "JSXIdentifier" && m.name.name === "css"; + } + function E(D) { + return D.type === "Identifier" && D.name === "styled"; + } + function N(D) { + return /^[A-Z]/.test(D.object.name) && D.property.name === "extend"; + } + function x(D) { + let T = D.getValue(), m = D.getParentNode(); + return I(T, "GraphQL") || m && (m.type === "TaggedTemplateExpression" && (m.tag.type === "MemberExpression" && m.tag.object.name === "graphql" && m.tag.property.name === "experimental" || m.tag.type === "Identifier" && (m.tag.name === "gql" || m.tag.name === "graphql")) || m.type === "CallExpression" && m.callee.type === "Identifier" && m.callee.name === "graphql"); + } + function I(D, T) { + return t2(D, s.Block | s.Leading, (m) => { + let { value: C } = m; + return C === ` ${T} `; + }); + } + function P(D) { + return I(D.getValue(), "HTML") || D.match((T) => T.type === "TemplateLiteral", (T, m) => T.type === "TaggedTemplateExpression" && T.tag.type === "Identifier" && T.tag.name === "html" && m === "quasi"); + } + function $(D) { + let { quasis: T } = D; + return T.some((m) => { + let { value: { cooked: C } } = m; + return C === null; + }); + } + r.exports = y; + } }), rd = te({ "src/language-js/clean.js"(e, r) { + "use strict"; + ne(); + var t2 = Pt(), s = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]), a = (u) => { + for (let i of u.quasis) + delete i.value; + }; + function n(u, i, l) { + if (u.type === "Program" && delete i.sourceType, (u.type === "BigIntLiteral" || u.type === "BigIntLiteralTypeAnnotation") && i.value && (i.value = i.value.toLowerCase()), (u.type === "BigIntLiteral" || u.type === "Literal") && i.bigint && (i.bigint = i.bigint.toLowerCase()), u.type === "DecimalLiteral" && (i.value = Number(i.value)), u.type === "Literal" && i.decimal && (i.decimal = Number(i.decimal)), u.type === "EmptyStatement" || u.type === "JSXText" || u.type === "JSXExpressionContainer" && (u.expression.type === "Literal" || u.expression.type === "StringLiteral") && u.expression.value === " ") + return null; + if ((u.type === "Property" || u.type === "ObjectProperty" || u.type === "MethodDefinition" || u.type === "ClassProperty" || u.type === "ClassMethod" || u.type === "PropertyDefinition" || u.type === "TSDeclareMethod" || u.type === "TSPropertySignature" || u.type === "ObjectTypeProperty") && typeof u.key == "object" && u.key && (u.key.type === "Literal" || u.key.type === "NumericLiteral" || u.key.type === "StringLiteral" || u.key.type === "Identifier") && delete i.key, u.type === "JSXElement" && u.openingElement.name.name === "style" && u.openingElement.attributes.some((h) => h.name.name === "jsx")) + for (let { type: h, expression: g } of i.children) + h === "JSXExpressionContainer" && g.type === "TemplateLiteral" && a(g); + u.type === "JSXAttribute" && u.name.name === "css" && u.value.type === "JSXExpressionContainer" && u.value.expression.type === "TemplateLiteral" && a(i.value.expression), u.type === "JSXAttribute" && u.value && u.value.type === "Literal" && /["']|"|'/.test(u.value.value) && (i.value.value = i.value.value.replace(/["']|"|'/g, '"')); + let p2 = u.expression || u.callee; + if (u.type === "Decorator" && p2.type === "CallExpression" && p2.callee.name === "Component" && p2.arguments.length === 1) { + let h = u.expression.arguments[0].properties; + for (let [g, c] of i.expression.arguments[0].properties.entries()) + switch (h[g].key.name) { + case "styles": + c.value.type === "ArrayExpression" && a(c.value.elements[0]); + break; + case "template": + c.value.type === "TemplateLiteral" && a(c.value); + break; + } + } + if (u.type === "TaggedTemplateExpression" && (u.tag.type === "MemberExpression" || u.tag.type === "Identifier" && (u.tag.name === "gql" || u.tag.name === "graphql" || u.tag.name === "css" || u.tag.name === "md" || u.tag.name === "markdown" || u.tag.name === "html") || u.tag.type === "CallExpression") && a(i.quasi), u.type === "TemplateLiteral") { + var y; + (((y = u.leadingComments) === null || y === void 0 ? void 0 : y.some((g) => t2(g) && ["GraphQL", "HTML"].some((c) => g.value === ` ${c} `))) || l.type === "CallExpression" && l.callee.name === "graphql" || !u.leadingComments) && a(i); + } + if (u.type === "InterpreterDirective" && (i.value = i.value.trimEnd()), (u.type === "TSIntersectionType" || u.type === "TSUnionType") && u.types.length === 1) + return i.types[0]; + } + n.ignoredProperties = s, r.exports = n; + } }), io = {}; + Kt(io, { EOL: () => Wn, arch: () => nd, cpus: () => Do, default: () => vo, endianness: () => ao, freemem: () => po, getNetworkInterfaces: () => ho, hostname: () => oo, loadavg: () => lo, networkInterfaces: () => yo, platform: () => ud, release: () => go, tmpDir: () => $n, tmpdir: () => Vn, totalmem: () => fo, type: () => mo, uptime: () => co }); + function ao() { + if (typeof Tr > "u") { + var e = new ArrayBuffer(2), r = new Uint8Array(e), t2 = new Uint16Array(e); + if (r[0] = 1, r[1] = 2, t2[0] === 258) + Tr = "BE"; + else if (t2[0] === 513) + Tr = "LE"; + else + throw new Error("unable to figure out endianess"); + } + return Tr; + } + function oo() { + return typeof globalThis.location < "u" ? globalThis.location.hostname : ""; + } + function lo() { + return []; + } + function co() { + return 0; + } + function po() { + return Number.MAX_VALUE; + } + function fo() { + return Number.MAX_VALUE; + } + function Do() { + return []; + } + function mo() { + return "Browser"; + } + function go() { + return typeof globalThis.navigator < "u" ? globalThis.navigator.appVersion : ""; + } + function yo() { + } + function ho() { + } + function nd() { + return "javascript"; + } + function ud() { + return "browser"; + } + function $n() { + return "/tmp"; + } + var Tr, Vn, Wn, vo, sd = ht({ "node-modules-polyfills:os"() { + ne(), Vn = $n, Wn = ` +`, vo = { EOL: Wn, tmpdir: Vn, tmpDir: $n, networkInterfaces: yo, getNetworkInterfaces: ho, release: go, type: mo, cpus: Do, totalmem: fo, freemem: po, uptime: co, loadavg: lo, hostname: oo, endianness: ao }; + } }), id2 = te({ "node-modules-polyfills-commonjs:os"(e, r) { + ne(); + var t2 = (sd(), ft(io)); + if (t2 && t2.default) { + r.exports = t2.default; + for (let s in t2) + r.exports[s] = t2[s]; + } else + t2 && (r.exports = t2); + } }), ad = te({ "node_modules/detect-newline/index.js"(e, r) { + "use strict"; + ne(); + var t2 = (s) => { + if (typeof s != "string") + throw new TypeError("Expected a string"); + let a = s.match(/(?:\r?\n)/g) || []; + if (a.length === 0) + return; + let n = a.filter((i) => i === `\r +`).length, u = a.length - n; + return n > u ? `\r +` : ` +`; + }; + r.exports = t2, r.exports.graceful = (s) => typeof s == "string" && t2(s) || ` +`; + } }), od = te({ "node_modules/jest-docblock/build/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.extract = c, e.parse = F, e.parseWithComments = _, e.print = w, e.strip = f; + function r() { + let N = id2(); + return r = function() { + return N; + }, N; + } + function t2() { + let N = s(ad()); + return t2 = function() { + return N; + }, N; + } + function s(N) { + return N && N.__esModule ? N : { default: N }; + } + var a = /\*\/$/, n = /^\/\*\*?/, u = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, i = /(^|\s+)\/\/([^\r\n]*)/g, l = /^(\r?\n)+/, p2 = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g, y = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g, h = /(\r?\n|^) *\* ?/g, g = []; + function c(N) { + let x = N.match(u); + return x ? x[0].trimLeft() : ""; + } + function f(N) { + let x = N.match(u); + return x && x[0] ? N.substring(x[0].length) : N; + } + function F(N) { + return _(N).pragmas; + } + function _(N) { + let x = (0, t2().default)(N) || r().EOL; + N = N.replace(n, "").replace(a, "").replace(h, "$1"); + let I = ""; + for (; I !== N; ) + I = N, N = N.replace(p2, `${x}$1 $2${x}`); + N = N.replace(l, "").trimRight(); + let P = /* @__PURE__ */ Object.create(null), $ = N.replace(y, "").replace(l, "").trimRight(), D; + for (; D = y.exec(N); ) { + let T = D[2].replace(i, ""); + typeof P[D[1]] == "string" || Array.isArray(P[D[1]]) ? P[D[1]] = g.concat(P[D[1]], T) : P[D[1]] = T; + } + return { comments: $, pragmas: P }; + } + function w(N) { + let { comments: x = "", pragmas: I = {} } = N, P = (0, t2().default)(x) || r().EOL, $ = "/**", D = " *", T = " */", m = Object.keys(I), C = m.map((d) => E(d, I[d])).reduce((d, v) => d.concat(v), []).map((d) => `${D} ${d}${P}`).join(""); + if (!x) { + if (m.length === 0) + return ""; + if (m.length === 1 && !Array.isArray(I[m[0]])) { + let d = I[m[0]]; + return `${$} ${E(m[0], d)[0]}${T}`; + } + } + let o = x.split(P).map((d) => `${D} ${d}`).join(P) + P; + return $ + P + (x ? o : "") + (x && m.length ? D + P : "") + C + T; + } + function E(N, x) { + return g.concat(x).map((I) => `@${N} ${I}`.trim()); + } + } }), ld = te({ "src/language-js/utils/get-shebang.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + if (!s.startsWith("#!")) + return ""; + let a = s.indexOf(` +`); + return a === -1 ? s : s.slice(0, a); + } + r.exports = t2; + } }), Co = te({ "src/language-js/pragma.js"(e, r) { + "use strict"; + ne(); + var { parseWithComments: t2, strip: s, extract: a, print: n } = od(), { normalizeEndOfLine: u } = Jn(), i = ld(); + function l(h) { + let g = i(h); + g && (h = h.slice(g.length + 1)); + let c = a(h), { pragmas: f, comments: F } = t2(c); + return { shebang: g, text: h, pragmas: f, comments: F }; + } + function p2(h) { + let g = Object.keys(l(h).pragmas); + return g.includes("prettier") || g.includes("format"); + } + function y(h) { + let { shebang: g, text: c, pragmas: f, comments: F } = l(h), _ = s(c), w = n({ pragmas: Object.assign({ format: "" }, f), comments: F.trimStart() }); + return (g ? `${g} +` : "") + u(w) + (_.startsWith(` +`) ? ` +` : ` + +`) + _; + } + r.exports = { hasPragma: p2, insertPragma: y }; + } }), cd = te({ "src/language-js/utils/is-type-cast-comment.js"(e, r) { + "use strict"; + ne(); + var t2 = Pt(); + function s(a) { + return t2(a) && a.value[0] === "*" && /@(?:type|satisfies)\b/.test(a.value); + } + r.exports = s; + } }), Eo = te({ "src/language-js/comments.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2, hasNewline: s, getNextNonSpaceNonCommentCharacterIndexWithStartIndex: a, getNextNonSpaceNonCommentCharacter: n, hasNewlineInRange: u, addLeadingComment: i, addTrailingComment: l, addDanglingComment: p2, getNextNonSpaceNonCommentCharacterIndex: y, isNonEmptyArray: h } = Ue(), { getFunctionParameters: g, isPrettierIgnoreComment: c, isJsxNode: f, hasFlowShorthandAnnotationComment: F, hasFlowAnnotationComment: _, hasIgnoreComment: w, isCallLikeExpression: E, getCallArguments: N, isCallExpression: x, isMemberExpression: I, isObjectProperty: P, isLineComment: $, getComments: D, CommentCheckFlags: T, markerForIfWithoutBlockAndSameLineComment: m } = Ke(), { locStart: C, locEnd: o } = ut(), d = Pt(), v = cd(); + function S(De) { + return [H, Fe, Q, q, J, L, ie, he, se, ge, we, ke, ce, z, U].some((A) => A(De)); + } + function b(De) { + return [R, Fe, V, we, q, J, L, ie, z, Z, fe, ge, Pe, U, X].some((A) => A(De)); + } + function B(De) { + return [H, q, J, j, ue, ce, ge, de, K, pe, U, oe].some((A) => A(De)); + } + function k(De, A) { + let G = (De.body || De.properties).find((re) => { + let { type: ye } = re; + return ye !== "EmptyStatement"; + }); + G ? i(G, A) : p2(De, A); + } + function M(De, A) { + De.type === "BlockStatement" ? k(De, A) : i(De, A); + } + function R(De) { + let { comment: A, followingNode: G } = De; + return G && v(A) ? (i(G, A), true) : false; + } + function q(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + if ((re == null ? void 0 : re.type) !== "IfStatement" || !ye) + return false; + if (n(Ce, A, o) === ")") + return l(G, A), true; + if (G === re.consequent && ye === re.alternate) { + if (G.type === "BlockStatement") + l(G, A); + else { + let ve = A.type === "SingleLine" || A.loc.start.line === A.loc.end.line, ze = A.loc.start.line === G.loc.start.line; + ve && ze ? p2(G, A, m) : p2(re, A); + } + return true; + } + return ye.type === "BlockStatement" ? (k(ye, A), true) : ye.type === "IfStatement" ? (M(ye.consequent, A), true) : re.consequent === ye ? (i(ye, A), true) : false; + } + function J(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + return (re == null ? void 0 : re.type) !== "WhileStatement" || !ye ? false : n(Ce, A, o) === ")" ? (l(G, A), true) : ye.type === "BlockStatement" ? (k(ye, A), true) : re.body === ye ? (i(ye, A), true) : false; + } + function L(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) !== "TryStatement" && (re == null ? void 0 : re.type) !== "CatchClause" || !ye ? false : re.type === "CatchClause" && G ? (l(G, A), true) : ye.type === "BlockStatement" ? (k(ye, A), true) : ye.type === "TryStatement" ? (M(ye.finalizer, A), true) : ye.type === "CatchClause" ? (M(ye.body, A), true) : false; + } + function Q(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return I(G) && (re == null ? void 0 : re.type) === "Identifier" ? (i(G, A), true) : false; + } + function V(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De, Be = G && !u(Ce, o(G), C(A)); + return (!G || !Be) && ((re == null ? void 0 : re.type) === "ConditionalExpression" || (re == null ? void 0 : re.type) === "TSConditionalType") && ye ? (i(ye, A), true) : false; + } + function j(De) { + let { comment: A, precedingNode: G, enclosingNode: re } = De; + return P(re) && re.shorthand && re.key === G && re.value.type === "AssignmentPattern" ? (l(re.value.left, A), true) : false; + } + var Y = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]); + function ie(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + if (Y.has(re == null ? void 0 : re.type)) { + if (h(re.decorators) && !(ye && ye.type === "Decorator")) + return l(t2(re.decorators), A), true; + if (re.body && ye === re.body) + return k(re.body, A), true; + if (ye) { + if (re.superClass && ye === re.superClass && G && (G === re.id || G === re.typeParameters)) + return l(G, A), true; + for (let Ce of ["implements", "extends", "mixins"]) + if (re[Ce] && ye === re[Ce][0]) + return G && (G === re.id || G === re.typeParameters || G === re.superClass) ? l(G, A) : p2(re, A, Ce), true; + } + } + return false; + } + var ee = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty"]); + function ce(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + return re && G && n(ye, A, o) === "(" && (re.type === "Property" || re.type === "TSDeclareMethod" || re.type === "TSAbstractMethodDefinition") && G.type === "Identifier" && re.key === G && n(ye, G, o) !== ":" || (G == null ? void 0 : G.type) === "Decorator" && ee.has(re == null ? void 0 : re.type) ? (l(G, A), true) : false; + } + var W = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]); + function K(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + return n(ye, A, o) !== "(" ? false : G && W.has(re == null ? void 0 : re.type) ? (l(G, A), true) : false; + } + function de(De) { + let { comment: A, enclosingNode: G, text: re } = De; + if ((G == null ? void 0 : G.type) !== "ArrowFunctionExpression") + return false; + let ye = y(re, A, o); + return ye !== false && re.slice(ye, ye + 2) === "=>" ? (p2(G, A), true) : false; + } + function ue(De) { + let { comment: A, enclosingNode: G, text: re } = De; + return n(re, A, o) !== ")" ? false : G && (le(G) && g(G).length === 0 || E(G) && N(G).length === 0) ? (p2(G, A), true) : ((G == null ? void 0 : G.type) === "MethodDefinition" || (G == null ? void 0 : G.type) === "TSAbstractMethodDefinition") && g(G.value).length === 0 ? (p2(G.value, A), true) : false; + } + function Fe(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + if ((G == null ? void 0 : G.type) === "FunctionTypeParam" && (re == null ? void 0 : re.type) === "FunctionTypeAnnotation" && (ye == null ? void 0 : ye.type) !== "FunctionTypeParam" || ((G == null ? void 0 : G.type) === "Identifier" || (G == null ? void 0 : G.type) === "AssignmentPattern") && re && le(re) && n(Ce, A, o) === ")") + return l(G, A), true; + if ((re == null ? void 0 : re.type) === "FunctionDeclaration" && (ye == null ? void 0 : ye.type) === "BlockStatement") { + let Be = (() => { + let ve = g(re); + if (ve.length > 0) + return a(Ce, o(t2(ve))); + let ze = a(Ce, o(re.id)); + return ze !== false && a(Ce, ze + 1); + })(); + if (C(A) > Be) + return k(ye, A), true; + } + return false; + } + function z(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "LabeledStatement" ? (i(G, A), true) : false; + } + function U(De) { + let { comment: A, enclosingNode: G } = De; + return ((G == null ? void 0 : G.type) === "ContinueStatement" || (G == null ? void 0 : G.type) === "BreakStatement") && !G.label ? (l(G, A), true) : false; + } + function Z(De) { + let { comment: A, precedingNode: G, enclosingNode: re } = De; + return x(re) && G && re.callee === G && re.arguments.length > 0 ? (i(re.arguments[0], A), true) : false; + } + function se(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) === "UnionTypeAnnotation" || (re == null ? void 0 : re.type) === "TSUnionType" ? (c(A) && (ye.prettierIgnore = true, A.unignore = true), G ? (l(G, A), true) : false) : (((ye == null ? void 0 : ye.type) === "UnionTypeAnnotation" || (ye == null ? void 0 : ye.type) === "TSUnionType") && c(A) && (ye.types[0].prettierIgnore = true, A.unignore = true), false); + } + function fe(De) { + let { comment: A, enclosingNode: G } = De; + return P(G) ? (i(G, A), true) : false; + } + function ge(De) { + let { comment: A, enclosingNode: G, followingNode: re, ast: ye, isLastComment: Ce } = De; + return ye && ye.body && ye.body.length === 0 ? (Ce ? p2(ye, A) : i(ye, A), true) : (G == null ? void 0 : G.type) === "Program" && (G == null ? void 0 : G.body.length) === 0 && !h(G.directives) ? (Ce ? p2(G, A) : i(G, A), true) : (re == null ? void 0 : re.type) === "Program" && (re == null ? void 0 : re.body.length) === 0 && (G == null ? void 0 : G.type) === "ModuleExpression" ? (p2(re, A), true) : false; + } + function he(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "ForInStatement" || (G == null ? void 0 : G.type) === "ForOfStatement" ? (i(G, A), true) : false; + } + function we(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + if ((re == null ? void 0 : re.type) === "ImportSpecifier" || (re == null ? void 0 : re.type) === "ExportSpecifier") + return i(re, A), true; + let Ce = (G == null ? void 0 : G.type) === "ImportSpecifier" && (re == null ? void 0 : re.type) === "ImportDeclaration", Be = (G == null ? void 0 : G.type) === "ExportSpecifier" && (re == null ? void 0 : re.type) === "ExportNamedDeclaration"; + return (Ce || Be) && s(ye, o(A)) ? (l(G, A), true) : false; + } + function ke(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "AssignmentPattern" ? (i(G, A), true) : false; + } + var Re = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]), Ne = /* @__PURE__ */ new Set(["ObjectExpression", "ArrayExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]); + function Pe(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return Re.has(G == null ? void 0 : G.type) && re && (Ne.has(re.type) || d(A)) ? (i(re, A), true) : false; + } + function oe(De) { + let { comment: A, enclosingNode: G, followingNode: re, text: ye } = De; + return !re && ((G == null ? void 0 : G.type) === "TSMethodSignature" || (G == null ? void 0 : G.type) === "TSDeclareFunction" || (G == null ? void 0 : G.type) === "TSAbstractMethodDefinition") && n(ye, A, o) === ";" ? (l(G, A), true) : false; + } + function H(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + if (c(A) && (G == null ? void 0 : G.type) === "TSMappedType" && (re == null ? void 0 : re.type) === "TSTypeParameter" && re.constraint) + return G.prettierIgnore = true, A.unignore = true, true; + } + function pe(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) !== "TSMappedType" ? false : (ye == null ? void 0 : ye.type) === "TSTypeParameter" && ye.name ? (i(ye.name, A), true) : (G == null ? void 0 : G.type) === "TSTypeParameter" && G.constraint ? (l(G.constraint, A), true) : false; + } + function X(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return !G || G.type !== "SwitchCase" || G.test || !re || re !== G.consequent[0] ? false : (re.type === "BlockStatement" && $(A) ? k(re, A) : p2(G, A), true); + } + function le(De) { + return De.type === "ArrowFunctionExpression" || De.type === "FunctionExpression" || De.type === "FunctionDeclaration" || De.type === "ObjectMethod" || De.type === "ClassMethod" || De.type === "TSDeclareFunction" || De.type === "TSCallSignatureDeclaration" || De.type === "TSConstructSignatureDeclaration" || De.type === "TSMethodSignature" || De.type === "TSConstructorType" || De.type === "TSFunctionType" || De.type === "TSDeclareMethod"; + } + function Ae(De, A) { + if ((A.parser === "typescript" || A.parser === "flow" || A.parser === "acorn" || A.parser === "espree" || A.parser === "meriyah" || A.parser === "__babel_estree") && De.type === "MethodDefinition" && De.value && De.value.type === "FunctionExpression" && g(De.value).length === 0 && !De.value.returnType && !h(De.value.typeParameters) && De.value.body) + return [...De.decorators || [], De.key, De.value.body]; + } + function Ee(De) { + let A = De.getValue(), G = De.getParentNode(), re = (ye) => _(D(ye, T.Leading)) || _(D(ye, T.Trailing)); + return (A && (f(A) || F(A) || x(G) && re(A)) || G && (G.type === "JSXSpreadAttribute" || G.type === "JSXSpreadChild" || G.type === "UnionTypeAnnotation" || G.type === "TSUnionType" || (G.type === "ClassDeclaration" || G.type === "ClassExpression") && G.superClass === A)) && (!w(De) || G.type === "UnionTypeAnnotation" || G.type === "TSUnionType"); + } + r.exports = { handleOwnLineComment: S, handleEndOfLineComment: b, handleRemainingComment: B, getCommentChildNodes: Ae, willPrintOwnComments: Ee }; + } }), qt = te({ "src/language-js/needs-parens.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), s = Kn(), { getFunctionParameters: a, getLeftSidePathName: n, hasFlowShorthandAnnotationComment: u, hasNakedLeftSide: i, hasNode: l, isBitwiseOperator: p2, startsWithNoLookaheadToken: y, shouldFlatten: h, getPrecedence: g, isCallExpression: c, isMemberExpression: f, isObjectProperty: F, isTSTypeExpression: _ } = Ke(); + function w(D, T) { + let m = D.getParentNode(); + if (!m) + return false; + let C = D.getName(), o = D.getNode(); + if (T.__isInHtmlInterpolation && !T.bracketSpacing && I(o) && P(D)) + return true; + if (E(o)) + return false; + if (T.parser !== "flow" && u(D.getValue())) + return true; + if (o.type === "Identifier") { + if (o.extra && o.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(o.name) || C === "left" && (o.name === "async" && !m.await || o.name === "let") && m.type === "ForOfStatement") + return true; + if (o.name === "let") { + var d; + let S = (d = D.findAncestor((b) => b.type === "ForOfStatement")) === null || d === void 0 ? void 0 : d.left; + if (S && y(S, (b) => b === o)) + return true; + } + if (C === "object" && o.name === "let" && m.type === "MemberExpression" && m.computed && !m.optional) { + let S = D.findAncestor((B) => B.type === "ExpressionStatement" || B.type === "ForStatement" || B.type === "ForInStatement"), b = S ? S.type === "ExpressionStatement" ? S.expression : S.type === "ForStatement" ? S.init : S.left : void 0; + if (b && y(b, (B) => B === o)) + return true; + } + return false; + } + if (o.type === "ObjectExpression" || o.type === "FunctionExpression" || o.type === "ClassExpression" || o.type === "DoExpression") { + var v; + let S = (v = D.findAncestor((b) => b.type === "ExpressionStatement")) === null || v === void 0 ? void 0 : v.expression; + if (S && y(S, (b) => b === o)) + return true; + } + switch (m.type) { + case "ParenthesizedExpression": + return false; + case "ClassDeclaration": + case "ClassExpression": { + if (C === "superClass" && (o.type === "ArrowFunctionExpression" || o.type === "AssignmentExpression" || o.type === "AwaitExpression" || o.type === "BinaryExpression" || o.type === "ConditionalExpression" || o.type === "LogicalExpression" || o.type === "NewExpression" || o.type === "ObjectExpression" || o.type === "SequenceExpression" || o.type === "TaggedTemplateExpression" || o.type === "UnaryExpression" || o.type === "UpdateExpression" || o.type === "YieldExpression" || o.type === "TSNonNullExpression")) + return true; + break; + } + case "ExportDefaultDeclaration": + return $(D, T) || o.type === "SequenceExpression"; + case "Decorator": { + if (C === "expression") { + if (f(o) && o.computed) + return true; + let S = false, b = false, B = o; + for (; B; ) + switch (B.type) { + case "MemberExpression": + b = true, B = B.object; + break; + case "CallExpression": + if (b || S) + return T.parser !== "typescript"; + S = true, B = B.callee; + break; + case "Identifier": + return false; + case "TaggedTemplateExpression": + return T.parser !== "typescript"; + default: + return true; + } + return true; + } + break; + } + case "ArrowFunctionExpression": { + if (C === "body" && o.type !== "SequenceExpression" && y(o, (S) => S.type === "ObjectExpression")) + return true; + break; + } + } + switch (o.type) { + case "UpdateExpression": + if (m.type === "UnaryExpression") + return o.prefix && (o.operator === "++" && m.operator === "+" || o.operator === "--" && m.operator === "-"); + case "UnaryExpression": + switch (m.type) { + case "UnaryExpression": + return o.operator === m.operator && (o.operator === "+" || o.operator === "-"); + case "BindExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "TaggedTemplateExpression": + return true; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "BinaryExpression": + return C === "left" && m.operator === "**"; + case "TSNonNullExpression": + return true; + default: + return false; + } + case "BinaryExpression": { + if (m.type === "UpdateExpression" || o.operator === "in" && N(D)) + return true; + if (o.operator === "|>" && o.extra && o.extra.parenthesized) { + let S = D.getParentNode(1); + if (S.type === "BinaryExpression" && S.operator === "|>") + return true; + } + } + case "TSTypeAssertion": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "LogicalExpression": + switch (m.type) { + case "TSSatisfiesExpression": + case "TSAsExpression": + return !_(o); + case "ConditionalExpression": + return _(o); + case "CallExpression": + case "NewExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ClassExpression": + case "ClassDeclaration": + return C === "superClass"; + case "TSTypeAssertion": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "JSXSpreadAttribute": + case "SpreadElement": + case "SpreadProperty": + case "BindExpression": + case "AwaitExpression": + case "TSNonNullExpression": + case "UpdateExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "AssignmentExpression": + case "AssignmentPattern": + return C === "left" && (o.type === "TSTypeAssertion" || _(o)); + case "LogicalExpression": + if (o.type === "LogicalExpression") + return m.operator !== o.operator; + case "BinaryExpression": { + let { operator: S, type: b } = o; + if (!S && b !== "TSTypeAssertion") + return true; + let B = g(S), k = m.operator, M = g(k); + return M > B || C === "right" && M === B || M === B && !h(k, S) ? true : M < B && S === "%" ? k === "+" || k === "-" : !!p2(k); + } + default: + return false; + } + case "SequenceExpression": + switch (m.type) { + case "ReturnStatement": + return false; + case "ForStatement": + return false; + case "ExpressionStatement": + return C !== "expression"; + case "ArrowFunctionExpression": + return C !== "body"; + default: + return true; + } + case "YieldExpression": + if (m.type === "UnaryExpression" || m.type === "AwaitExpression" || _(m) || m.type === "TSNonNullExpression") + return true; + case "AwaitExpression": + switch (m.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "SpreadProperty": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "BindExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ConditionalExpression": + return C === "test"; + case "BinaryExpression": + return !(!o.argument && m.operator === "|>"); + default: + return false; + } + case "TSConditionalType": + case "TSFunctionType": + case "TSConstructorType": + if (C === "extendsType" && m.type === "TSConditionalType") { + if (o.type === "TSConditionalType") + return true; + let { typeAnnotation: S } = o.returnType || o.typeAnnotation; + if (S.type === "TSTypePredicate" && S.typeAnnotation && (S = S.typeAnnotation.typeAnnotation), S.type === "TSInferType" && S.typeParameter.constraint) + return true; + } + if (C === "checkType" && m.type === "TSConditionalType") + return true; + case "TSUnionType": + case "TSIntersectionType": + if ((m.type === "TSUnionType" || m.type === "TSIntersectionType") && m.types.length > 1 && (!o.types || o.types.length > 1)) + return true; + case "TSInferType": + if (o.type === "TSInferType" && m.type === "TSRestType") + return false; + case "TSTypeOperator": + return m.type === "TSArrayType" || m.type === "TSOptionalType" || m.type === "TSRestType" || C === "objectType" && m.type === "TSIndexedAccessType" || m.type === "TSTypeOperator" || m.type === "TSTypeAnnotation" && D.getParentNode(1).type.startsWith("TSJSDoc"); + case "TSTypeQuery": + return C === "objectType" && m.type === "TSIndexedAccessType" || C === "elementType" && m.type === "TSArrayType"; + case "TypeofTypeAnnotation": + return C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType") || C === "elementType" && m.type === "ArrayTypeAnnotation"; + case "ArrayTypeAnnotation": + return m.type === "NullableTypeAnnotation"; + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": + return m.type === "ArrayTypeAnnotation" || m.type === "NullableTypeAnnotation" || m.type === "IntersectionTypeAnnotation" || m.type === "UnionTypeAnnotation" || C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType"); + case "NullableTypeAnnotation": + return m.type === "ArrayTypeAnnotation" || C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType"); + case "FunctionTypeAnnotation": { + let S = m.type === "NullableTypeAnnotation" ? D.getParentNode(1) : m; + return S.type === "UnionTypeAnnotation" || S.type === "IntersectionTypeAnnotation" || S.type === "ArrayTypeAnnotation" || C === "objectType" && (S.type === "IndexedAccessType" || S.type === "OptionalIndexedAccessType") || S.type === "NullableTypeAnnotation" || m.type === "FunctionTypeParam" && m.name === null && a(o).some((b) => b.typeAnnotation && b.typeAnnotation.type === "NullableTypeAnnotation"); + } + case "OptionalIndexedAccessType": + return C === "objectType" && m.type === "IndexedAccessType"; + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof o.value == "string" && m.type === "ExpressionStatement" && !m.directive) { + let S = D.getParentNode(1); + return S.type === "Program" || S.type === "BlockStatement"; + } + return C === "object" && m.type === "MemberExpression" && typeof o.value == "number"; + case "AssignmentExpression": { + let S = D.getParentNode(1); + return C === "body" && m.type === "ArrowFunctionExpression" ? true : C === "key" && (m.type === "ClassProperty" || m.type === "PropertyDefinition") && m.computed || (C === "init" || C === "update") && m.type === "ForStatement" ? false : m.type === "ExpressionStatement" ? o.left.type === "ObjectPattern" : !(C === "key" && m.type === "TSPropertySignature" || m.type === "AssignmentExpression" || m.type === "SequenceExpression" && S && S.type === "ForStatement" && (S.init === m || S.update === m) || C === "value" && m.type === "Property" && S && S.type === "ObjectPattern" && S.properties.includes(m) || m.type === "NGChainedExpression"); + } + case "ConditionalExpression": + switch (m.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertion": + case "TypeCastExpression": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + return true; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ConditionalExpression": + return C === "test"; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + default: + return false; + } + case "FunctionExpression": + switch (m.type) { + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "TaggedTemplateExpression": + return true; + default: + return false; + } + case "ArrowFunctionExpression": + switch (m.type) { + case "BinaryExpression": + return m.operator !== "|>" || o.extra && o.extra.parenthesized; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "AwaitExpression": + case "TSTypeAssertion": + return true; + case "ConditionalExpression": + return C === "test"; + default: + return false; + } + case "ClassExpression": + if (s(o.decorators)) + return true; + switch (m.type) { + case "NewExpression": + return C === "callee"; + default: + return false; + } + case "OptionalMemberExpression": + case "OptionalCallExpression": { + let S = D.getParentNode(1); + if (C === "object" && m.type === "MemberExpression" || C === "callee" && (m.type === "CallExpression" || m.type === "NewExpression") || m.type === "TSNonNullExpression" && S.type === "MemberExpression" && S.object === m) + return true; + } + case "CallExpression": + case "MemberExpression": + case "TaggedTemplateExpression": + case "TSNonNullExpression": + if (C === "callee" && (m.type === "BindExpression" || m.type === "NewExpression")) { + let S = o; + for (; S; ) + switch (S.type) { + case "CallExpression": + case "OptionalCallExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + case "BindExpression": + S = S.object; + break; + case "TaggedTemplateExpression": + S = S.tag; + break; + case "TSNonNullExpression": + S = S.expression; + break; + default: + return false; + } + } + return false; + case "BindExpression": + return C === "callee" && (m.type === "BindExpression" || m.type === "NewExpression") || C === "object" && f(m); + case "NGPipeExpression": + return !(m.type === "NGRoot" || m.type === "NGMicrosyntaxExpression" || m.type === "ObjectProperty" && !(o.extra && o.extra.parenthesized) || m.type === "ArrayExpression" || c(m) && m.arguments[C] === o || C === "right" && m.type === "NGPipeExpression" || C === "property" && m.type === "MemberExpression" || m.type === "AssignmentExpression"); + case "JSXFragment": + case "JSXElement": + return C === "callee" || C === "left" && m.type === "BinaryExpression" && m.operator === "<" || m.type !== "ArrayExpression" && m.type !== "ArrowFunctionExpression" && m.type !== "AssignmentExpression" && m.type !== "AssignmentPattern" && m.type !== "BinaryExpression" && m.type !== "NewExpression" && m.type !== "ConditionalExpression" && m.type !== "ExpressionStatement" && m.type !== "JsExpressionRoot" && m.type !== "JSXAttribute" && m.type !== "JSXElement" && m.type !== "JSXExpressionContainer" && m.type !== "JSXFragment" && m.type !== "LogicalExpression" && !c(m) && !F(m) && m.type !== "ReturnStatement" && m.type !== "ThrowStatement" && m.type !== "TypeCastExpression" && m.type !== "VariableDeclarator" && m.type !== "YieldExpression"; + case "TypeAnnotation": + return C === "returnType" && m.type === "ArrowFunctionExpression" && x(o); + } + return false; + } + function E(D) { + return D.type === "BlockStatement" || D.type === "BreakStatement" || D.type === "ClassBody" || D.type === "ClassDeclaration" || D.type === "ClassMethod" || D.type === "ClassProperty" || D.type === "PropertyDefinition" || D.type === "ClassPrivateProperty" || D.type === "ContinueStatement" || D.type === "DebuggerStatement" || D.type === "DeclareClass" || D.type === "DeclareExportAllDeclaration" || D.type === "DeclareExportDeclaration" || D.type === "DeclareFunction" || D.type === "DeclareInterface" || D.type === "DeclareModule" || D.type === "DeclareModuleExports" || D.type === "DeclareVariable" || D.type === "DoWhileStatement" || D.type === "EnumDeclaration" || D.type === "ExportAllDeclaration" || D.type === "ExportDefaultDeclaration" || D.type === "ExportNamedDeclaration" || D.type === "ExpressionStatement" || D.type === "ForInStatement" || D.type === "ForOfStatement" || D.type === "ForStatement" || D.type === "FunctionDeclaration" || D.type === "IfStatement" || D.type === "ImportDeclaration" || D.type === "InterfaceDeclaration" || D.type === "LabeledStatement" || D.type === "MethodDefinition" || D.type === "ReturnStatement" || D.type === "SwitchStatement" || D.type === "ThrowStatement" || D.type === "TryStatement" || D.type === "TSDeclareFunction" || D.type === "TSEnumDeclaration" || D.type === "TSImportEqualsDeclaration" || D.type === "TSInterfaceDeclaration" || D.type === "TSModuleDeclaration" || D.type === "TSNamespaceExportDeclaration" || D.type === "TypeAlias" || D.type === "VariableDeclaration" || D.type === "WhileStatement" || D.type === "WithStatement"; + } + function N(D) { + let T = 0, m = D.getValue(); + for (; m; ) { + let C = D.getParentNode(T++); + if (C && C.type === "ForStatement" && C.init === m) + return true; + m = C; + } + return false; + } + function x(D) { + return l(D, (T) => T.type === "ObjectTypeAnnotation" && l(T, (m) => m.type === "FunctionTypeAnnotation" || void 0) || void 0); + } + function I(D) { + switch (D.type) { + case "ObjectExpression": + return true; + default: + return false; + } + } + function P(D) { + let T = D.getValue(), m = D.getParentNode(), C = D.getName(); + switch (m.type) { + case "NGPipeExpression": + if (typeof C == "number" && m.arguments[C] === T && m.arguments.length - 1 === C) + return D.callParent(P); + break; + case "ObjectProperty": + if (C === "value") { + let o = D.getParentNode(1); + return t2(o.properties) === m; + } + break; + case "BinaryExpression": + case "LogicalExpression": + if (C === "right") + return D.callParent(P); + break; + case "ConditionalExpression": + if (C === "alternate") + return D.callParent(P); + break; + case "UnaryExpression": + if (m.prefix) + return D.callParent(P); + break; + } + return false; + } + function $(D, T) { + let m = D.getValue(), C = D.getParentNode(); + return m.type === "FunctionExpression" || m.type === "ClassExpression" ? C.type === "ExportDefaultDeclaration" || !w(D, T) : !i(m) || C.type !== "ExportDefaultDeclaration" && w(D, T) ? false : D.call((o) => $(o, T), ...n(D, m)); + } + r.exports = w; + } }), Fo = te({ "src/language-js/print-preprocess.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + switch (a.parser) { + case "json": + case "json5": + case "json-stringify": + case "__js_expression": + case "__vue_expression": + case "__vue_ts_expression": + return Object.assign(Object.assign({}, s), {}, { type: a.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", node: s, comments: [], rootMarker: a.rootMarker }); + default: + return s; + } + } + r.exports = t2; + } }), pd = te({ "src/language-js/print/html-binding.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, line: s, group: a, softline: n, indent: u } } = qe(); + function i(p2, y, h) { + let g = p2.getValue(); + if (y.__onHtmlBindingRoot && p2.getName() === null && y.__onHtmlBindingRoot(g, y), g.type === "File") { + if (y.__isVueForBindingLeft) + return p2.call((c) => { + let f = t2([",", s], c.map(h, "params")), { params: F } = c.getValue(); + return F.length === 1 ? f : ["(", u([n, a(f)]), n, ")"]; + }, "program", "body", 0); + if (y.__isVueBindings) + return p2.call((c) => t2([",", s], c.map(h, "params")), "program", "body", 0); + } + } + function l(p2) { + switch (p2.type) { + case "MemberExpression": + switch (p2.property.type) { + case "Identifier": + case "NumericLiteral": + case "StringLiteral": + return l(p2.object); + } + return false; + case "Identifier": + return true; + default: + return false; + } + } + r.exports = { isVueEventBindingExpression: l, printHtmlBinding: i }; + } }), ru = te({ "src/language-js/print/binaryish.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { getLast: s } = Ue(), { builders: { join: a, line: n, softline: u, group: i, indent: l, align: p2, indentIfBreak: y }, utils: { cleanDoc: h, getDocParts: g, isConcat: c } } = qe(), { hasLeadingOwnLineComment: f, isBinaryish: F, isJsxNode: _, shouldFlatten: w, hasComment: E, CommentCheckFlags: N, isCallExpression: x, isMemberExpression: I, isObjectProperty: P, isEnabledHackPipeline: $ } = Ke(), D = 0; + function T(o, d, v) { + let S = o.getValue(), b = o.getParentNode(), B = o.getParentNode(1), k = S !== b.body && (b.type === "IfStatement" || b.type === "WhileStatement" || b.type === "SwitchStatement" || b.type === "DoWhileStatement"), M = $(d) && S.operator === "|>", R = m(o, v, d, false, k); + if (k) + return R; + if (M) + return i(R); + if (x(b) && b.callee === S || b.type === "UnaryExpression" || I(b) && !b.computed) + return i([l([u, ...R]), u]); + let q = b.type === "ReturnStatement" || b.type === "ThrowStatement" || b.type === "JSXExpressionContainer" && B.type === "JSXAttribute" || S.operator !== "|" && b.type === "JsExpressionRoot" || S.type !== "NGPipeExpression" && (b.type === "NGRoot" && d.parser === "__ng_binding" || b.type === "NGMicrosyntaxExpression" && B.type === "NGMicrosyntax" && B.body.length === 1) || S === b.body && b.type === "ArrowFunctionExpression" || S !== b.body && b.type === "ForStatement" || b.type === "ConditionalExpression" && B.type !== "ReturnStatement" && B.type !== "ThrowStatement" && !x(B) || b.type === "TemplateLiteral", J = b.type === "AssignmentExpression" || b.type === "VariableDeclarator" || b.type === "ClassProperty" || b.type === "PropertyDefinition" || b.type === "TSAbstractPropertyDefinition" || b.type === "ClassPrivateProperty" || P(b), L = F(S.left) && w(S.operator, S.left.operator); + if (q || C(S) && !L || !C(S) && J) + return i(R); + if (R.length === 0) + return ""; + let Q = _(S.right), V = R.findIndex((W) => typeof W != "string" && !Array.isArray(W) && W.type === "group"), j = R.slice(0, V === -1 ? 1 : V + 1), Y = R.slice(j.length, Q ? -1 : void 0), ie = Symbol("logicalChain-" + ++D), ee = i([...j, l(Y)], { id: ie }); + if (!Q) + return ee; + let ce = s(R); + return i([ee, y(ce, { groupId: ie })]); + } + function m(o, d, v, S, b) { + let B = o.getValue(); + if (!F(B)) + return [i(d())]; + let k = []; + w(B.operator, B.left.operator) ? k = o.call((Y) => m(Y, d, v, true, b), "left") : k.push(i(d("left"))); + let M = C(B), R = (B.operator === "|>" || B.type === "NGPipeExpression" || B.operator === "|" && v.parser === "__vue_expression") && !f(v.originalText, B.right), q = B.type === "NGPipeExpression" ? "|" : B.operator, J = B.type === "NGPipeExpression" && B.arguments.length > 0 ? i(l([n, ": ", a([n, ": "], o.map(d, "arguments").map((Y) => p2(2, i(Y))))])) : "", L; + if (M) + L = [q, " ", d("right"), J]; + else { + let ie = $(v) && q === "|>" ? o.call((ee) => m(ee, d, v, true, b), "right") : d("right"); + L = [R ? n : "", q, R ? " " : n, ie, J]; + } + let Q = o.getParentNode(), V = E(B.left, N.Trailing | N.Line), j = V || !(b && B.type === "LogicalExpression") && Q.type !== B.type && B.left.type !== B.type && B.right.type !== B.type; + if (k.push(R ? "" : " ", j ? i(L, { shouldBreak: V }) : L), S && E(B)) { + let Y = h(t2(o, k, v)); + return c(Y) || Y.type === "fill" ? g(Y) : [Y]; + } + return k; + } + function C(o) { + return o.type !== "LogicalExpression" ? false : !!(o.right.type === "ObjectExpression" && o.right.properties.length > 0 || o.right.type === "ArrayExpression" && o.right.elements.length > 0 || _(o.right)); + } + r.exports = { printBinaryishExpression: T, shouldInlineLogicalExpression: C }; + } }), fd = te({ "src/language-js/print/angular.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, line: s, group: a } } = qe(), { hasNode: n, hasComment: u, getComments: i } = Ke(), { printBinaryishExpression: l } = ru(); + function p2(g, c, f) { + let F = g.getValue(); + if (F.type.startsWith("NG")) + switch (F.type) { + case "NGRoot": + return [f("node"), u(F.node) ? " //" + i(F.node)[0].value.trimEnd() : ""]; + case "NGPipeExpression": + return l(g, c, f); + case "NGChainedExpression": + return a(t2([";", s], g.map((_) => h(_) ? f() : ["(", f(), ")"], "expressions"))); + case "NGEmptyExpression": + return ""; + case "NGQuotedExpression": + return [F.prefix, ": ", F.value.trim()]; + case "NGMicrosyntax": + return g.map((_, w) => [w === 0 ? "" : y(_.getValue(), w, F) ? " " : [";", s], f()], "body"); + case "NGMicrosyntaxKey": + return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(F.name) ? F.name : JSON.stringify(F.name); + case "NGMicrosyntaxExpression": + return [f("expression"), F.alias === null ? "" : [" as ", f("alias")]]; + case "NGMicrosyntaxKeyedExpression": { + let _ = g.getName(), w = g.getParentNode(), E = y(F, _, w) || (_ === 1 && (F.key.name === "then" || F.key.name === "else") || _ === 2 && F.key.name === "else" && w.body[_ - 1].type === "NGMicrosyntaxKeyedExpression" && w.body[_ - 1].key.name === "then") && w.body[0].type === "NGMicrosyntaxExpression"; + return [f("key"), E ? " " : ": ", f("expression")]; + } + case "NGMicrosyntaxLet": + return ["let ", f("key"), F.value === null ? "" : [" = ", f("value")]]; + case "NGMicrosyntaxAs": + return [f("key"), " as ", f("alias")]; + default: + throw new Error(`Unknown Angular node type: ${JSON.stringify(F.type)}.`); + } + } + function y(g, c, f) { + return g.type === "NGMicrosyntaxKeyedExpression" && g.key.name === "of" && c === 1 && f.body[0].type === "NGMicrosyntaxLet" && f.body[0].value === null; + } + function h(g) { + return n(g.getValue(), (c) => { + switch (c.type) { + case void 0: + return false; + case "CallExpression": + case "OptionalCallExpression": + case "AssignmentExpression": + return true; + } + }); + } + r.exports = { printAngular: p2 }; + } }), Dd = te({ "src/language-js/print/jsx.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2, printDanglingComments: s, printCommentsSeparately: a } = et(), { builders: { line: n, hardline: u, softline: i, group: l, indent: p2, conditionalGroup: y, fill: h, ifBreak: g, lineSuffixBoundary: c, join: f }, utils: { willBreak: F } } = qe(), { getLast: _, getPreferredQuote: w } = Ue(), { isJsxNode: E, rawText: N, isCallExpression: x, isStringLiteral: I, isBinaryish: P, hasComment: $, CommentCheckFlags: D, hasNodeIgnoreComment: T } = Ke(), m = qt(), { willPrintOwnComments: C } = Eo(), o = (U) => U === "" || U === n || U === u || U === i; + function d(U, Z, se) { + let fe = U.getValue(); + if (fe.type === "JSXElement" && de(fe)) + return [se("openingElement"), se("closingElement")]; + let ge = fe.type === "JSXElement" ? se("openingElement") : se("openingFragment"), he = fe.type === "JSXElement" ? se("closingElement") : se("closingFragment"); + if (fe.children.length === 1 && fe.children[0].type === "JSXExpressionContainer" && (fe.children[0].expression.type === "TemplateLiteral" || fe.children[0].expression.type === "TaggedTemplateExpression")) + return [ge, ...U.map(se, "children"), he]; + fe.children = fe.children.map((A) => Fe(A) ? { type: "JSXText", value: " ", raw: " " } : A); + let we = fe.children.some(E), ke = fe.children.filter((A) => A.type === "JSXExpressionContainer").length > 1, Re = fe.type === "JSXElement" && fe.openingElement.attributes.length > 1, Ne = F(ge) || we || Re || ke, Pe = U.getParentNode().rootMarker === "mdx", oe = Z.singleQuote ? "{' '}" : '{" "}', H = Pe ? " " : g([oe, i], " "), pe = fe.openingElement && fe.openingElement.name && fe.openingElement.name.name === "fbt", X = v(U, Z, se, H, pe), le = fe.children.some((A) => ue(A)); + for (let A = X.length - 2; A >= 0; A--) { + let G = X[A] === "" && X[A + 1] === "", re = X[A] === u && X[A + 1] === "" && X[A + 2] === u, ye = (X[A] === i || X[A] === u) && X[A + 1] === "" && X[A + 2] === H, Ce = X[A] === H && X[A + 1] === "" && (X[A + 2] === i || X[A + 2] === u), Be = X[A] === H && X[A + 1] === "" && X[A + 2] === H, ve = X[A] === i && X[A + 1] === "" && X[A + 2] === u || X[A] === u && X[A + 1] === "" && X[A + 2] === i; + re && le || G || ye || Be || ve ? X.splice(A, 2) : Ce && X.splice(A + 1, 2); + } + for (; X.length > 0 && o(_(X)); ) + X.pop(); + for (; X.length > 1 && o(X[0]) && o(X[1]); ) + X.shift(), X.shift(); + let Ae = []; + for (let [A, G] of X.entries()) { + if (G === H) { + if (A === 1 && X[A - 1] === "") { + if (X.length === 2) { + Ae.push(oe); + continue; + } + Ae.push([oe, u]); + continue; + } else if (A === X.length - 1) { + Ae.push(oe); + continue; + } else if (X[A - 1] === "" && X[A - 2] === u) { + Ae.push(oe); + continue; + } + } + Ae.push(G), F(G) && (Ne = true); + } + let Ee = le ? h(Ae) : l(Ae, { shouldBreak: true }); + if (Pe) + return Ee; + let De = l([ge, p2([u, Ee]), u, he]); + return Ne ? De : y([l([ge, ...X, he]), De]); + } + function v(U, Z, se, fe, ge) { + let he = []; + return U.each((we, ke, Re) => { + let Ne = we.getValue(); + if (Ne.type === "JSXText") { + let Pe = N(Ne); + if (ue(Ne)) { + let oe = Pe.split(ce); + if (oe[0] === "") { + if (he.push(""), oe.shift(), /\n/.test(oe[0])) { + let pe = Re[ke + 1]; + he.push(b(ge, oe[1], Ne, pe)); + } else + he.push(fe); + oe.shift(); + } + let H; + if (_(oe) === "" && (oe.pop(), H = oe.pop()), oe.length === 0) + return; + for (let [pe, X] of oe.entries()) + pe % 2 === 1 ? he.push(n) : he.push(X); + if (H !== void 0) + if (/\n/.test(H)) { + let pe = Re[ke + 1]; + he.push(b(ge, _(he), Ne, pe)); + } else + he.push(fe); + else { + let pe = Re[ke + 1]; + he.push(S(ge, _(he), Ne, pe)); + } + } else + /\n/.test(Pe) ? Pe.match(/\n/g).length > 1 && he.push("", u) : he.push("", fe); + } else { + let Pe = se(); + he.push(Pe); + let oe = Re[ke + 1]; + if (oe && ue(oe)) { + let pe = K(N(oe)).split(ce)[0]; + he.push(S(ge, pe, Ne, oe)); + } else + he.push(u); + } + }, "children"), he; + } + function S(U, Z, se, fe) { + return U ? "" : se.type === "JSXElement" && !se.closingElement || fe && fe.type === "JSXElement" && !fe.closingElement ? Z.length === 1 ? i : u : i; + } + function b(U, Z, se, fe) { + return U ? u : Z.length === 1 ? se.type === "JSXElement" && !se.closingElement || fe && fe.type === "JSXElement" && !fe.closingElement ? u : i : u; + } + function B(U, Z, se) { + let fe = U.getParentNode(); + if (!fe || { ArrayExpression: true, JSXAttribute: true, JSXElement: true, JSXExpressionContainer: true, JSXFragment: true, ExpressionStatement: true, CallExpression: true, OptionalCallExpression: true, ConditionalExpression: true, JsExpressionRoot: true }[fe.type]) + return Z; + let he = U.match(void 0, (ke) => ke.type === "ArrowFunctionExpression", x, (ke) => ke.type === "JSXExpressionContainer"), we = m(U, se); + return l([we ? "" : g("("), p2([i, Z]), i, we ? "" : g(")")], { shouldBreak: he }); + } + function k(U, Z, se) { + let fe = U.getValue(), ge = []; + if (ge.push(se("name")), fe.value) { + let he; + if (I(fe.value)) { + let ke = N(fe.value).slice(1, -1).replace(/'/g, "'").replace(/"/g, '"'), { escaped: Re, quote: Ne, regex: Pe } = w(ke, Z.jsxSingleQuote ? "'" : '"'); + ke = ke.replace(Pe, Re); + let { leading: oe, trailing: H } = U.call(() => a(U, Z), "value"); + he = [oe, Ne, ke, Ne, H]; + } else + he = se("value"); + ge.push("=", he); + } + return ge; + } + function M(U, Z, se) { + let fe = U.getValue(), ge = (he, we) => he.type === "JSXEmptyExpression" || !$(he) && (he.type === "ArrayExpression" || he.type === "ObjectExpression" || he.type === "ArrowFunctionExpression" || he.type === "AwaitExpression" && (ge(he.argument, he) || he.argument.type === "JSXElement") || x(he) || he.type === "FunctionExpression" || he.type === "TemplateLiteral" || he.type === "TaggedTemplateExpression" || he.type === "DoExpression" || E(we) && (he.type === "ConditionalExpression" || P(he))); + return ge(fe.expression, U.getParentNode(0)) ? l(["{", se("expression"), c, "}"]) : l(["{", p2([i, se("expression")]), i, c, "}"]); + } + function R(U, Z, se) { + let fe = U.getValue(), ge = fe.name && $(fe.name) || fe.typeParameters && $(fe.typeParameters); + if (fe.selfClosing && fe.attributes.length === 0 && !ge) + return ["<", se("name"), se("typeParameters"), " />"]; + if (fe.attributes && fe.attributes.length === 1 && fe.attributes[0].value && I(fe.attributes[0].value) && !fe.attributes[0].value.value.includes(` +`) && !ge && !$(fe.attributes[0])) + return l(["<", se("name"), se("typeParameters"), " ", ...U.map(se, "attributes"), fe.selfClosing ? " />" : ">"]); + let he = fe.attributes && fe.attributes.some((ke) => ke.value && I(ke.value) && ke.value.value.includes(` +`)), we = Z.singleAttributePerLine && fe.attributes.length > 1 ? u : n; + return l(["<", se("name"), se("typeParameters"), p2(U.map(() => [we, se()], "attributes")), ...q(fe, Z, ge)], { shouldBreak: he }); + } + function q(U, Z, se) { + return U.selfClosing ? [n, "/>"] : J(U, Z, se) ? [">"] : [i, ">"]; + } + function J(U, Z, se) { + let fe = U.attributes.length > 0 && $(_(U.attributes), D.Trailing); + return U.attributes.length === 0 && !se || (Z.bracketSameLine || Z.jsxBracketSameLine) && (!se || U.attributes.length > 0) && !fe; + } + function L(U, Z, se) { + let fe = U.getValue(), ge = []; + ge.push(""), ge; + } + function Q(U, Z) { + let se = U.getValue(), fe = $(se), ge = $(se, D.Line), he = se.type === "JSXOpeningFragment"; + return [he ? "<" : ""]; + } + function V(U, Z, se) { + let fe = t2(U, d(U, Z, se), Z); + return B(U, fe, Z); + } + function j(U, Z) { + let se = U.getValue(), fe = $(se, D.Line); + return [s(U, Z, !fe), fe ? u : ""]; + } + function Y(U, Z, se) { + let fe = U.getValue(); + return ["{", U.call((ge) => { + let he = ["...", se()], we = ge.getValue(); + return !$(we) || !C(ge) ? he : [p2([i, t2(ge, he, Z)]), i]; + }, fe.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]; + } + function ie(U, Z, se) { + let fe = U.getValue(); + if (fe.type.startsWith("JSX")) + switch (fe.type) { + case "JSXAttribute": + return k(U, Z, se); + case "JSXIdentifier": + return String(fe.name); + case "JSXNamespacedName": + return f(":", [se("namespace"), se("name")]); + case "JSXMemberExpression": + return f(".", [se("object"), se("property")]); + case "JSXSpreadAttribute": + return Y(U, Z, se); + case "JSXSpreadChild": + return Y(U, Z, se); + case "JSXExpressionContainer": + return M(U, Z, se); + case "JSXFragment": + case "JSXElement": + return V(U, Z, se); + case "JSXOpeningElement": + return R(U, Z, se); + case "JSXClosingElement": + return L(U, Z, se); + case "JSXOpeningFragment": + case "JSXClosingFragment": + return Q(U, Z); + case "JSXEmptyExpression": + return j(U, Z); + case "JSXText": + throw new Error("JSXText should be handled by JSXElement"); + default: + throw new Error(`Unknown JSX node type: ${JSON.stringify(fe.type)}.`); + } + } + var ee = ` +\r `, ce = new RegExp("([" + ee + "]+)"), W = new RegExp("[^" + ee + "]"), K = (U) => U.replace(new RegExp("(?:^" + ce.source + "|" + ce.source + "$)"), ""); + function de(U) { + if (U.children.length === 0) + return true; + if (U.children.length > 1) + return false; + let Z = U.children[0]; + return Z.type === "JSXText" && !ue(Z); + } + function ue(U) { + return U.type === "JSXText" && (W.test(N(U)) || !/\n/.test(N(U))); + } + function Fe(U) { + return U.type === "JSXExpressionContainer" && I(U.expression) && U.expression.value === " " && !$(U.expression); + } + function z(U) { + let Z = U.getValue(), se = U.getParentNode(); + if (!se || !Z || !E(Z) || !E(se)) + return false; + let fe = se.children.indexOf(Z), ge = null; + for (let he = fe; he > 0; he--) { + let we = se.children[he - 1]; + if (!(we.type === "JSXText" && !ue(we))) { + ge = we; + break; + } + } + return ge && ge.type === "JSXExpressionContainer" && ge.expression.type === "JSXEmptyExpression" && T(ge.expression); + } + r.exports = { hasJsxIgnoreComment: z, printJsx: ie }; + } }), ct = te({ "src/language-js/print/misc.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { indent: s, join: a, line: n } } = qe(), { isFlowAnnotationComment: u } = Ke(); + function i(_) { + let w = _.getValue(); + return !w.optional || w.type === "Identifier" && w === _.getParentNode().key ? "" : w.type === "OptionalCallExpression" || w.type === "OptionalMemberExpression" && w.computed ? "?." : "?"; + } + function l(_) { + return _.getValue().definite || _.match(void 0, (w, E) => E === "id" && w.type === "VariableDeclarator" && w.definite) ? "!" : ""; + } + function p2(_, w, E) { + let N = _.getValue(); + return N.typeArguments ? E("typeArguments") : N.typeParameters ? E("typeParameters") : ""; + } + function y(_, w, E) { + let N = _.getValue(); + if (!N.typeAnnotation) + return ""; + let x = _.getParentNode(), I = x.type === "DeclareFunction" && x.id === N; + return u(w.originalText, N.typeAnnotation) ? [" /*: ", E("typeAnnotation"), " */"] : [I ? "" : ": ", E("typeAnnotation")]; + } + function h(_, w, E) { + return ["::", E("callee")]; + } + function g(_, w, E) { + let N = _.getValue(); + return t2(N.modifiers) ? [a(" ", _.map(E, "modifiers")), " "] : ""; + } + function c(_, w, E) { + return _.type === "EmptyStatement" ? ";" : _.type === "BlockStatement" || E ? [" ", w] : s([n, w]); + } + function f(_, w, E) { + return ["...", E("argument"), y(_, w, E)]; + } + function F(_, w) { + let E = _.slice(1, -1); + if (E.includes('"') || E.includes("'")) + return _; + let N = w.singleQuote ? "'" : '"'; + return N + E + N; + } + r.exports = { printOptionalToken: i, printDefiniteToken: l, printFunctionTypeParameters: p2, printBindExpressionCallee: h, printTypeScriptModifiers: g, printTypeAnnotation: y, printRestSpread: f, adjustClause: c, printDirective: F }; + } }), er = te({ "src/language-js/print/array.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { line: s, softline: a, hardline: n, group: u, indent: i, ifBreak: l, fill: p2 } } = qe(), { getLast: y, hasNewline: h } = Ue(), { shouldPrintComma: g, hasComment: c, CommentCheckFlags: f, isNextLineEmpty: F, isNumericLiteral: _, isSignedNumericLiteral: w } = Ke(), { locStart: E } = ut(), { printOptionalToken: N, printTypeAnnotation: x } = ct(); + function I(T, m, C) { + let o = T.getValue(), d = [], v = o.type === "TupleExpression" ? "#[" : "[", S = "]"; + if (o.elements.length === 0) + c(o, f.Dangling) ? d.push(u([v, t2(T, m), a, S])) : d.push(v, S); + else { + let b = y(o.elements), B = !(b && b.type === "RestElement"), k = b === null, M = Symbol("array"), R = !m.__inJestEach && o.elements.length > 1 && o.elements.every((L, Q, V) => { + let j = L && L.type; + if (j !== "ArrayExpression" && j !== "ObjectExpression") + return false; + let Y = V[Q + 1]; + if (Y && j !== Y.type) + return false; + let ie = j === "ArrayExpression" ? "elements" : "properties"; + return L[ie] && L[ie].length > 1; + }), q = P(o, m), J = B ? k ? "," : g(m) ? q ? l(",", "", { groupId: M }) : l(",") : "" : ""; + d.push(u([v, i([a, q ? D(T, m, C, J) : [$(T, m, "elements", C), J], t2(T, m, true)]), a, S], { shouldBreak: R, id: M })); + } + return d.push(N(T), x(T, m, C)), d; + } + function P(T, m) { + return T.elements.length > 1 && T.elements.every((C) => C && (_(C) || w(C) && !c(C.argument)) && !c(C, f.Trailing | f.Line, (o) => !h(m.originalText, E(o), { backwards: true }))); + } + function $(T, m, C, o) { + let d = [], v = []; + return T.each((S) => { + d.push(v, u(o())), v = [",", s], S.getValue() && F(S.getValue(), m) && v.push(a); + }, C), d; + } + function D(T, m, C, o) { + let d = []; + return T.each((v, S, b) => { + let B = S === b.length - 1; + d.push([C(), B ? o : ","]), B || d.push(F(v.getValue(), m) ? [n, n] : c(b[S + 1], f.Leading | f.Line) ? n : s); + }, "elements"), p2(d); + } + r.exports = { printArray: I, printArrayItems: $, isConciselyPrintedArray: P }; + } }), Ao = te({ "src/language-js/print/call-arguments.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { getLast: s, getPenultimate: a } = Ue(), { getFunctionParameters: n, hasComment: u, CommentCheckFlags: i, isFunctionCompositionArgs: l, isJsxNode: p2, isLongCurriedCallExpression: y, shouldPrintComma: h, getCallArguments: g, iterateCallArgumentsPath: c, isNextLineEmpty: f, isCallExpression: F, isStringLiteral: _, isObjectProperty: w, isTSTypeExpression: E } = Ke(), { builders: { line: N, hardline: x, softline: I, group: P, indent: $, conditionalGroup: D, ifBreak: T, breakParent: m }, utils: { willBreak: C } } = qe(), { ArgExpansionBailout: o } = Qt(), { isConciselyPrintedArray: d } = er(); + function v(q, J, L) { + let Q = q.getValue(), V = Q.type === "ImportExpression", j = g(Q); + if (j.length === 0) + return ["(", t2(q, J, true), ")"]; + if (k(j)) + return ["(", L(["arguments", 0]), ", ", L(["arguments", 1]), ")"]; + let Y = false, ie = false, ee = j.length - 1, ce = []; + c(q, (z, U) => { + let Z = z.getNode(), se = [L()]; + U === ee || (f(Z, J) ? (U === 0 && (ie = true), Y = true, se.push(",", x, x)) : se.push(",", N)), ce.push(se); + }); + let W = !(V || Q.callee && Q.callee.type === "Import") && h(J, "all") ? "," : ""; + function K() { + return P(["(", $([N, ...ce]), W, N, ")"], { shouldBreak: true }); + } + if (Y || q.getParentNode().type !== "Decorator" && l(j)) + return K(); + let de = B(j), ue = b(j, J); + if (de || ue) { + if (de ? ce.slice(1).some(C) : ce.slice(0, -1).some(C)) + return K(); + let z = []; + try { + q.try(() => { + c(q, (U, Z) => { + de && Z === 0 && (z = [[L([], { expandFirstArg: true }), ce.length > 1 ? "," : "", ie ? x : N, ie ? x : ""], ...ce.slice(1)]), ue && Z === ee && (z = [...ce.slice(0, -1), L([], { expandLastArg: true })]); + }); + }); + } catch (U) { + if (U instanceof o) + return K(); + throw U; + } + return [ce.some(C) ? m : "", D([["(", ...z, ")"], de ? ["(", P(z[0], { shouldBreak: true }), ...z.slice(1), ")"] : ["(", ...ce.slice(0, -1), P(s(z), { shouldBreak: true }), ")"], K()])]; + } + let Fe = ["(", $([I, ...ce]), T(W), I, ")"]; + return y(q) ? Fe : P(Fe, { shouldBreak: ce.some(C) || Y }); + } + function S(q) { + let J = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + return q.type === "ObjectExpression" && (q.properties.length > 0 || u(q)) || q.type === "ArrayExpression" && (q.elements.length > 0 || u(q)) || q.type === "TSTypeAssertion" && S(q.expression) || E(q) && S(q.expression) || q.type === "FunctionExpression" || q.type === "ArrowFunctionExpression" && (!q.returnType || !q.returnType.typeAnnotation || q.returnType.typeAnnotation.type !== "TSTypeReference" || M(q.body)) && (q.body.type === "BlockStatement" || q.body.type === "ArrowFunctionExpression" && S(q.body, true) || q.body.type === "ObjectExpression" || q.body.type === "ArrayExpression" || !J && (F(q.body) || q.body.type === "ConditionalExpression") || p2(q.body)) || q.type === "DoExpression" || q.type === "ModuleExpression"; + } + function b(q, J) { + let L = s(q), Q = a(q); + return !u(L, i.Leading) && !u(L, i.Trailing) && S(L) && (!Q || Q.type !== L.type) && (q.length !== 2 || Q.type !== "ArrowFunctionExpression" || L.type !== "ArrayExpression") && !(q.length > 1 && L.type === "ArrayExpression" && d(L, J)); + } + function B(q) { + if (q.length !== 2) + return false; + let [J, L] = q; + return J.type === "ModuleExpression" && R(L) ? true : !u(J) && (J.type === "FunctionExpression" || J.type === "ArrowFunctionExpression" && J.body.type === "BlockStatement") && L.type !== "FunctionExpression" && L.type !== "ArrowFunctionExpression" && L.type !== "ConditionalExpression" && !S(L); + } + function k(q) { + return q.length === 2 && q[0].type === "ArrowFunctionExpression" && n(q[0]).length === 0 && q[0].body.type === "BlockStatement" && q[1].type === "ArrayExpression" && !q.some((J) => u(J)); + } + function M(q) { + return q.type === "BlockStatement" && (q.body.some((J) => J.type !== "EmptyStatement") || u(q, i.Dangling)); + } + function R(q) { + return q.type === "ObjectExpression" && q.properties.length === 1 && w(q.properties[0]) && q.properties[0].key.type === "Identifier" && q.properties[0].key.name === "type" && _(q.properties[0].value) && q.properties[0].value.value === "module"; + } + r.exports = v; + } }), So = te({ "src/language-js/print/member.js"(e, r) { + "use strict"; + ne(); + var { builders: { softline: t2, group: s, indent: a, label: n } } = qe(), { isNumericLiteral: u, isMemberExpression: i, isCallExpression: l } = Ke(), { printOptionalToken: p2 } = ct(); + function y(g, c, f) { + let F = g.getValue(), _ = g.getParentNode(), w, E = 0; + do + w = g.getParentNode(E), E++; + while (w && (i(w) || w.type === "TSNonNullExpression")); + let N = f("object"), x = h(g, c, f), I = w && (w.type === "NewExpression" || w.type === "BindExpression" || w.type === "AssignmentExpression" && w.left.type !== "Identifier") || F.computed || F.object.type === "Identifier" && F.property.type === "Identifier" && !i(_) || (_.type === "AssignmentExpression" || _.type === "VariableDeclarator") && (l(F.object) && F.object.arguments.length > 0 || F.object.type === "TSNonNullExpression" && l(F.object.expression) && F.object.expression.arguments.length > 0 || N.label === "member-chain"); + return n(N.label === "member-chain" ? "member-chain" : "member", [N, I ? x : s(a([t2, x]))]); + } + function h(g, c, f) { + let F = f("property"), _ = g.getValue(), w = p2(g); + return _.computed ? !_.property || u(_.property) ? [w, "[", F, "]"] : s([w, "[", a([t2, F]), t2, "]"]) : [w, ".", F]; + } + r.exports = { printMemberExpression: y, printMemberLookup: h }; + } }), md = te({ "src/language-js/print/member-chain.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { getLast: s, isNextLineEmptyAfterIndex: a, getNextNonSpaceNonCommentCharacterIndex: n } = Ue(), u = qt(), { isCallExpression: i, isMemberExpression: l, isFunctionOrArrowExpression: p2, isLongCurriedCallExpression: y, isMemberish: h, isNumericLiteral: g, isSimpleCallArgument: c, hasComment: f, CommentCheckFlags: F, isNextLineEmpty: _ } = Ke(), { locEnd: w } = ut(), { builders: { join: E, hardline: N, group: x, indent: I, conditionalGroup: P, breakParent: $, label: D }, utils: { willBreak: T } } = qe(), m = Ao(), { printMemberLookup: C } = So(), { printOptionalToken: o, printFunctionTypeParameters: d, printBindExpressionCallee: v } = ct(); + function S(b, B, k) { + let M = b.getParentNode(), R = !M || M.type === "ExpressionStatement", q = []; + function J(Ne) { + let { originalText: Pe } = B, oe = n(Pe, Ne, w); + return Pe.charAt(oe) === ")" ? oe !== false && a(Pe, oe + 1) : _(Ne, B); + } + function L(Ne) { + let Pe = Ne.getValue(); + i(Pe) && (h(Pe.callee) || i(Pe.callee)) ? (q.unshift({ node: Pe, printed: [t2(Ne, [o(Ne), d(Ne, B, k), m(Ne, B, k)], B), J(Pe) ? N : ""] }), Ne.call((oe) => L(oe), "callee")) : h(Pe) ? (q.unshift({ node: Pe, needsParens: u(Ne, B), printed: t2(Ne, l(Pe) ? C(Ne, B, k) : v(Ne, B, k), B) }), Ne.call((oe) => L(oe), "object")) : Pe.type === "TSNonNullExpression" ? (q.unshift({ node: Pe, printed: t2(Ne, "!", B) }), Ne.call((oe) => L(oe), "expression")) : q.unshift({ node: Pe, printed: k() }); + } + let Q = b.getValue(); + q.unshift({ node: Q, printed: [o(b), d(b, B, k), m(b, B, k)] }), Q.callee && b.call((Ne) => L(Ne), "callee"); + let V = [], j = [q[0]], Y = 1; + for (; Y < q.length && (q[Y].node.type === "TSNonNullExpression" || i(q[Y].node) || l(q[Y].node) && q[Y].node.computed && g(q[Y].node.property)); ++Y) + j.push(q[Y]); + if (!i(q[0].node)) + for (; Y + 1 < q.length && (h(q[Y].node) && h(q[Y + 1].node)); ++Y) + j.push(q[Y]); + V.push(j), j = []; + let ie = false; + for (; Y < q.length; ++Y) { + if (ie && h(q[Y].node)) { + if (q[Y].node.computed && g(q[Y].node.property)) { + j.push(q[Y]); + continue; + } + V.push(j), j = [], ie = false; + } + (i(q[Y].node) || q[Y].node.type === "ImportExpression") && (ie = true), j.push(q[Y]), f(q[Y].node, F.Trailing) && (V.push(j), j = [], ie = false); + } + j.length > 0 && V.push(j); + function ee(Ne) { + return /^[A-Z]|^[$_]+$/.test(Ne); + } + function ce(Ne) { + return Ne.length <= B.tabWidth; + } + function W(Ne) { + let Pe = Ne[1].length > 0 && Ne[1][0].node.computed; + if (Ne[0].length === 1) { + let H = Ne[0][0].node; + return H.type === "ThisExpression" || H.type === "Identifier" && (ee(H.name) || R && ce(H.name) || Pe); + } + let oe = s(Ne[0]).node; + return l(oe) && oe.property.type === "Identifier" && (ee(oe.property.name) || Pe); + } + let K = V.length >= 2 && !f(V[1][0].node) && W(V); + function de(Ne) { + let Pe = Ne.map((oe) => oe.printed); + return Ne.length > 0 && s(Ne).needsParens ? ["(", ...Pe, ")"] : Pe; + } + function ue(Ne) { + return Ne.length === 0 ? "" : I(x([N, E(N, Ne.map(de))])); + } + let Fe = V.map(de), z = Fe, U = K ? 3 : 2, Z = V.flat(), se = Z.slice(1, -1).some((Ne) => f(Ne.node, F.Leading)) || Z.slice(0, -1).some((Ne) => f(Ne.node, F.Trailing)) || V[U] && f(V[U][0].node, F.Leading); + if (V.length <= U && !se) + return y(b) ? z : x(z); + let fe = s(V[K ? 1 : 0]).node, ge = !i(fe) && J(fe), he = [de(V[0]), K ? V.slice(1, 2).map(de) : "", ge ? N : "", ue(V.slice(K ? 2 : 1))], we = q.map((Ne) => { + let { node: Pe } = Ne; + return Pe; + }).filter(i); + function ke() { + let Ne = s(s(V)).node, Pe = s(Fe); + return i(Ne) && T(Pe) && we.slice(0, -1).some((oe) => oe.arguments.some(p2)); + } + let Re; + return se || we.length > 2 && we.some((Ne) => !Ne.arguments.every((Pe) => c(Pe, 0))) || Fe.slice(0, -1).some(T) || ke() ? Re = x(he) : Re = [T(z) || ge ? $ : "", P([z, he])], D("member-chain", Re); + } + r.exports = S; + } }), xo = te({ "src/language-js/print/call-expression.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, group: s } } = qe(), a = qt(), { getCallArguments: n, hasFlowAnnotationComment: u, isCallExpression: i, isMemberish: l, isStringLiteral: p2, isTemplateOnItsOwnLine: y, isTestCall: h, iterateCallArgumentsPath: g } = Ke(), c = md(), f = Ao(), { printOptionalToken: F, printFunctionTypeParameters: _ } = ct(); + function w(N, x, I) { + let P = N.getValue(), $ = N.getParentNode(), D = P.type === "NewExpression", T = P.type === "ImportExpression", m = F(N), C = n(P); + if (C.length > 0 && (!T && !D && E(P, $) || C.length === 1 && y(C[0], x.originalText) || !D && h(P, $))) { + let v = []; + return g(N, () => { + v.push(I()); + }), [D ? "new " : "", I("callee"), m, _(N, x, I), "(", t2(", ", v), ")"]; + } + let o = (x.parser === "babel" || x.parser === "babel-flow") && P.callee && P.callee.type === "Identifier" && u(P.callee.trailingComments); + if (o && (P.callee.trailingComments[0].printed = true), !T && !D && l(P.callee) && !N.call((v) => a(v, x), "callee")) + return c(N, x, I); + let d = [D ? "new " : "", T ? "import" : I("callee"), m, o ? `/*:: ${P.callee.trailingComments[0].value.slice(2).trim()} */` : "", _(N, x, I), f(N, x, I)]; + return T || i(P.callee) ? s(d) : d; + } + function E(N, x) { + if (N.callee.type !== "Identifier") + return false; + if (N.callee.name === "require") + return true; + if (N.callee.name === "define") { + let I = n(N); + return x.type === "ExpressionStatement" && (I.length === 1 || I.length === 2 && I[0].type === "ArrayExpression" || I.length === 3 && p2(I[0]) && I[1].type === "ArrayExpression"); + } + return false; + } + r.exports = { printCallExpression: w }; + } }), tr = te({ "src/language-js/print/assignment.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, getStringWidth: s } = Ue(), { builders: { line: a, group: n, indent: u, indentIfBreak: i, lineSuffixBoundary: l }, utils: { cleanDoc: p2, willBreak: y, canBreak: h } } = qe(), { hasLeadingOwnLineComment: g, isBinaryish: c, isStringLiteral: f, isLiteral: F, isNumericLiteral: _, isCallExpression: w, isMemberExpression: E, getCallArguments: N, rawText: x, hasComment: I, isSignedNumericLiteral: P, isObjectProperty: $ } = Ke(), { shouldInlineLogicalExpression: D } = ru(), { printCallExpression: T } = xo(); + function m(W, K, de, ue, Fe, z) { + let U = d(W, K, de, ue, z), Z = de(z, { assignmentLayout: U }); + switch (U) { + case "break-after-operator": + return n([n(ue), Fe, n(u([a, Z]))]); + case "never-break-after-operator": + return n([n(ue), Fe, " ", Z]); + case "fluid": { + let se = Symbol("assignment"); + return n([n(ue), Fe, n(u(a), { id: se }), l, i(Z, { groupId: se })]); + } + case "break-lhs": + return n([ue, Fe, " ", n(Z)]); + case "chain": + return [n(ue), Fe, a, Z]; + case "chain-tail": + return [n(ue), Fe, u([a, Z])]; + case "chain-tail-arrow-chain": + return [n(ue), Fe, Z]; + case "only-left": + return ue; + } + } + function C(W, K, de) { + let ue = W.getValue(); + return m(W, K, de, de("left"), [" ", ue.operator], "right"); + } + function o(W, K, de) { + return m(W, K, de, de("id"), " =", "init"); + } + function d(W, K, de, ue, Fe) { + let z = W.getValue(), U = z[Fe]; + if (!U) + return "only-left"; + let Z = !b(U); + if (W.match(b, B, (he) => !Z || he.type !== "ExpressionStatement" && he.type !== "VariableDeclaration")) + return Z ? U.type === "ArrowFunctionExpression" && U.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain"; + if (!Z && b(U.right) || g(K.originalText, U)) + return "break-after-operator"; + if (U.type === "CallExpression" && U.callee.name === "require" || K.parser === "json5" || K.parser === "json") + return "never-break-after-operator"; + if (S(z) || k(z) || q(z) || J(z) && h(ue)) + return "break-lhs"; + let ge = ie(z, ue, K); + return W.call(() => v(W, K, de, ge), Fe) ? "break-after-operator" : ge || U.type === "TemplateLiteral" || U.type === "TaggedTemplateExpression" || U.type === "BooleanLiteral" || _(U) || U.type === "ClassExpression" ? "never-break-after-operator" : "fluid"; + } + function v(W, K, de, ue) { + let Fe = W.getValue(); + if (c(Fe) && !D(Fe)) + return true; + switch (Fe.type) { + case "StringLiteralTypeAnnotation": + case "SequenceExpression": + return true; + case "ConditionalExpression": { + let { test: Z } = Fe; + return c(Z) && !D(Z); + } + case "ClassExpression": + return t2(Fe.decorators); + } + if (ue) + return false; + let z = Fe, U = []; + for (; ; ) + if (z.type === "UnaryExpression") + z = z.argument, U.push("argument"); + else if (z.type === "TSNonNullExpression") + z = z.expression, U.push("expression"); + else + break; + return !!(f(z) || W.call(() => V(W, K, de), ...U)); + } + function S(W) { + if (B(W)) { + let K = W.left || W.id; + return K.type === "ObjectPattern" && K.properties.length > 2 && K.properties.some((de) => $(de) && (!de.shorthand || de.value && de.value.type === "AssignmentPattern")); + } + return false; + } + function b(W) { + return W.type === "AssignmentExpression"; + } + function B(W) { + return b(W) || W.type === "VariableDeclarator"; + } + function k(W) { + let K = M(W); + if (t2(K)) { + let de = W.type === "TSTypeAliasDeclaration" ? "constraint" : "bound"; + if (K.length > 1 && K.some((ue) => ue[de] || ue.default)) + return true; + } + return false; + } + function M(W) { + return R(W) && W.typeParameters && W.typeParameters.params ? W.typeParameters.params : null; + } + function R(W) { + return W.type === "TSTypeAliasDeclaration" || W.type === "TypeAlias"; + } + function q(W) { + if (W.type !== "VariableDeclarator") + return false; + let { typeAnnotation: K } = W.id; + if (!K || !K.typeAnnotation) + return false; + let de = L(K.typeAnnotation); + return t2(de) && de.length > 1 && de.some((ue) => t2(L(ue)) || ue.type === "TSConditionalType"); + } + function J(W) { + return W.type === "VariableDeclarator" && W.init && W.init.type === "ArrowFunctionExpression"; + } + function L(W) { + return Q(W) && W.typeParameters && W.typeParameters.params ? W.typeParameters.params : null; + } + function Q(W) { + return W.type === "TSTypeReference" || W.type === "GenericTypeAnnotation"; + } + function V(W, K, de) { + let ue = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, Fe = W.getValue(), z = () => V(W, K, de, true); + if (Fe.type === "TSNonNullExpression") + return W.call(z, "expression"); + if (w(Fe)) { + if (T(W, K, de).label === "member-chain") + return false; + let Z = N(Fe); + return !(Z.length === 0 || Z.length === 1 && Y(Z[0], K)) || ee(Fe, de) ? false : W.call(z, "callee"); + } + return E(Fe) ? W.call(z, "object") : ue && (Fe.type === "Identifier" || Fe.type === "ThisExpression"); + } + var j = 0.25; + function Y(W, K) { + let { printWidth: de } = K; + if (I(W)) + return false; + let ue = de * j; + if (W.type === "ThisExpression" || W.type === "Identifier" && W.name.length <= ue || P(W) && !I(W.argument)) + return true; + let Fe = W.type === "Literal" && "regex" in W && W.regex.pattern || W.type === "RegExpLiteral" && W.pattern; + return Fe ? Fe.length <= ue : f(W) ? x(W).length <= ue : W.type === "TemplateLiteral" ? W.expressions.length === 0 && W.quasis[0].value.raw.length <= ue && !W.quasis[0].value.raw.includes(` +`) : F(W); + } + function ie(W, K, de) { + if (!$(W)) + return false; + K = p2(K); + let ue = 3; + return typeof K == "string" && s(K) < de.tabWidth + ue; + } + function ee(W, K) { + let de = ce(W); + if (t2(de)) { + if (de.length > 1) + return true; + if (de.length === 1) { + let Fe = de[0]; + if (Fe.type === "TSUnionType" || Fe.type === "UnionTypeAnnotation" || Fe.type === "TSIntersectionType" || Fe.type === "IntersectionTypeAnnotation" || Fe.type === "TSTypeLiteral" || Fe.type === "ObjectTypeAnnotation") + return true; + } + let ue = W.typeParameters ? "typeParameters" : "typeArguments"; + if (y(K(ue))) + return true; + } + return false; + } + function ce(W) { + return W.typeParameters && W.typeParameters.params || W.typeArguments && W.typeArguments.params; + } + r.exports = { printVariableDeclarator: o, printAssignmentExpression: C, printAssignment: m, isArrowFunctionVariableDeclarator: J }; + } }), Lr = te({ "src/language-js/print/function-parameters.js"(e, r) { + "use strict"; + ne(); + var { getNextNonSpaceNonCommentCharacter: t2 } = Ue(), { printDanglingComments: s } = et(), { builders: { line: a, hardline: n, softline: u, group: i, indent: l, ifBreak: p2 }, utils: { removeLines: y, willBreak: h } } = qe(), { getFunctionParameters: g, iterateFunctionParametersPath: c, isSimpleType: f, isTestCall: F, isTypeAnnotationAFunction: _, isObjectType: w, isObjectTypePropertyAFunction: E, hasRestParameter: N, shouldPrintComma: x, hasComment: I, isNextLineEmpty: P } = Ke(), { locEnd: $ } = ut(), { ArgExpansionBailout: D } = Qt(), { printFunctionTypeParameters: T } = ct(); + function m(v, S, b, B, k) { + let M = v.getValue(), R = g(M), q = k ? T(v, b, S) : ""; + if (R.length === 0) + return [q, "(", s(v, b, true, (ie) => t2(b.originalText, ie, $) === ")"), ")"]; + let J = v.getParentNode(), L = F(J), Q = C(M), V = []; + if (c(v, (ie, ee) => { + let ce = ee === R.length - 1; + ce && M.rest && V.push("..."), V.push(S()), !ce && (V.push(","), L || Q ? V.push(" ") : P(R[ee], b) ? V.push(n, n) : V.push(a)); + }), B) { + if (h(q) || h(V)) + throw new D(); + return i([y(q), "(", y(V), ")"]); + } + let j = R.every((ie) => !ie.decorators); + return Q && j ? [q, "(", ...V, ")"] : L ? [q, "(", ...V, ")"] : (E(J) || _(J) || J.type === "TypeAlias" || J.type === "UnionTypeAnnotation" || J.type === "TSUnionType" || J.type === "IntersectionTypeAnnotation" || J.type === "FunctionTypeAnnotation" && J.returnType === M) && R.length === 1 && R[0].name === null && M.this !== R[0] && R[0].typeAnnotation && M.typeParameters === null && f(R[0].typeAnnotation) && !M.rest ? b.arrowParens === "always" ? ["(", ...V, ")"] : V : [q, "(", l([u, ...V]), p2(!N(M) && x(b, "all") ? "," : ""), u, ")"]; + } + function C(v) { + if (!v) + return false; + let S = g(v); + if (S.length !== 1) + return false; + let [b] = S; + return !I(b) && (b.type === "ObjectPattern" || b.type === "ArrayPattern" || b.type === "Identifier" && b.typeAnnotation && (b.typeAnnotation.type === "TypeAnnotation" || b.typeAnnotation.type === "TSTypeAnnotation") && w(b.typeAnnotation.typeAnnotation) || b.type === "FunctionTypeParam" && w(b.typeAnnotation) || b.type === "AssignmentPattern" && (b.left.type === "ObjectPattern" || b.left.type === "ArrayPattern") && (b.right.type === "Identifier" || b.right.type === "ObjectExpression" && b.right.properties.length === 0 || b.right.type === "ArrayExpression" && b.right.elements.length === 0)); + } + function o(v) { + let S; + return v.returnType ? (S = v.returnType, S.typeAnnotation && (S = S.typeAnnotation)) : v.typeAnnotation && (S = v.typeAnnotation), S; + } + function d(v, S) { + let b = o(v); + if (!b) + return false; + let B = v.typeParameters && v.typeParameters.params; + if (B) { + if (B.length > 1) + return false; + if (B.length === 1) { + let k = B[0]; + if (k.constraint || k.default) + return false; + } + } + return g(v).length === 1 && (w(b) || h(S)); + } + r.exports = { printFunctionParameters: m, shouldHugFunctionParameters: C, shouldGroupFunctionParameters: d }; + } }), Or = te({ "src/language-js/print/type-annotation.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2, printDanglingComments: s } = et(), { isNonEmptyArray: a } = Ue(), { builders: { group: n, join: u, line: i, softline: l, indent: p2, align: y, ifBreak: h } } = qe(), g = qt(), { locStart: c } = ut(), { isSimpleType: f, isObjectType: F, hasLeadingOwnLineComment: _, isObjectTypePropertyAFunction: w, shouldPrintComma: E } = Ke(), { printAssignment: N } = tr(), { printFunctionParameters: x, shouldGroupFunctionParameters: I } = Lr(), { printArrayItems: P } = er(); + function $(b) { + if (f(b) || F(b)) + return true; + if (b.type === "UnionTypeAnnotation" || b.type === "TSUnionType") { + let B = b.types.filter((M) => M.type === "VoidTypeAnnotation" || M.type === "TSVoidKeyword" || M.type === "NullLiteralTypeAnnotation" || M.type === "TSNullKeyword").length, k = b.types.some((M) => M.type === "ObjectTypeAnnotation" || M.type === "TSTypeLiteral" || M.type === "GenericTypeAnnotation" || M.type === "TSTypeReference"); + if (b.types.length - 1 === B && k) + return true; + } + return false; + } + function D(b, B, k) { + let M = B.semi ? ";" : "", R = b.getValue(), q = []; + return q.push("opaque type ", k("id"), k("typeParameters")), R.supertype && q.push(": ", k("supertype")), R.impltype && q.push(" = ", k("impltype")), q.push(M), q; + } + function T(b, B, k) { + let M = B.semi ? ";" : "", R = b.getValue(), q = []; + R.declare && q.push("declare "), q.push("type ", k("id"), k("typeParameters")); + let J = R.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right"; + return [N(b, B, k, q, " =", J), M]; + } + function m(b, B, k) { + let M = b.getValue(), R = b.map(k, "types"), q = [], J = false; + for (let L = 0; L < R.length; ++L) + L === 0 ? q.push(R[L]) : F(M.types[L - 1]) && F(M.types[L]) ? q.push([" & ", J ? p2(R[L]) : R[L]]) : !F(M.types[L - 1]) && !F(M.types[L]) ? q.push(p2([" &", i, R[L]])) : (L > 1 && (J = true), q.push(" & ", L > 1 ? p2(R[L]) : R[L])); + return n(q); + } + function C(b, B, k) { + let M = b.getValue(), R = b.getParentNode(), q = R.type !== "TypeParameterInstantiation" && R.type !== "TSTypeParameterInstantiation" && R.type !== "GenericTypeAnnotation" && R.type !== "TSTypeReference" && R.type !== "TSTypeAssertion" && R.type !== "TupleTypeAnnotation" && R.type !== "TSTupleType" && !(R.type === "FunctionTypeParam" && !R.name && b.getParentNode(1).this !== R) && !((R.type === "TypeAlias" || R.type === "VariableDeclarator" || R.type === "TSTypeAliasDeclaration") && _(B.originalText, M)), J = $(M), L = b.map((j) => { + let Y = k(); + return J || (Y = y(2, Y)), t2(j, Y, B); + }, "types"); + if (J) + return u(" | ", L); + let Q = q && !_(B.originalText, M), V = [h([Q ? i : "", "| "]), u([i, "| "], L)]; + return g(b, B) ? n([p2(V), l]) : R.type === "TupleTypeAnnotation" && R.types.length > 1 || R.type === "TSTupleType" && R.elementTypes.length > 1 ? n([p2([h(["(", l]), V]), l, h(")")]) : n(q ? p2(V) : V); + } + function o(b, B, k) { + let M = b.getValue(), R = [], q = b.getParentNode(0), J = b.getParentNode(1), L = b.getParentNode(2), Q = M.type === "TSFunctionType" || !((q.type === "ObjectTypeProperty" || q.type === "ObjectTypeInternalSlot") && !q.variance && !q.optional && c(q) === c(M) || q.type === "ObjectTypeCallProperty" || L && L.type === "DeclareFunction"), V = Q && (q.type === "TypeAnnotation" || q.type === "TSTypeAnnotation"), j = V && Q && (q.type === "TypeAnnotation" || q.type === "TSTypeAnnotation") && J.type === "ArrowFunctionExpression"; + w(q) && (Q = true, V = true), j && R.push("("); + let Y = x(b, k, B, false, true), ie = M.returnType || M.predicate || M.typeAnnotation ? [Q ? " => " : ": ", k("returnType"), k("predicate"), k("typeAnnotation")] : "", ee = I(M, ie); + return R.push(ee ? n(Y) : Y), ie && R.push(ie), j && R.push(")"), n(R); + } + function d(b, B, k) { + let M = b.getValue(), R = M.type === "TSTupleType" ? "elementTypes" : "types", q = M[R], J = a(q), L = J ? l : ""; + return n(["[", p2([L, P(b, B, R, k)]), h(J && E(B, "all") ? "," : ""), s(b, B, true), L, "]"]); + } + function v(b, B, k) { + let M = b.getValue(), R = M.type === "OptionalIndexedAccessType" && M.optional ? "?.[" : "["; + return [k("objectType"), R, k("indexType"), "]"]; + } + function S(b, B, k) { + let M = b.getValue(); + return [M.postfix ? "" : k, B("typeAnnotation"), M.postfix ? k : ""]; + } + r.exports = { printOpaqueType: D, printTypeAlias: T, printIntersectionType: m, printUnionType: C, printFunctionType: o, printTupleType: d, printIndexedAccessType: v, shouldHugType: $, printJSDocType: S }; + } }), jr = te({ "src/language-js/print/type-parameters.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { join: s, line: a, hardline: n, softline: u, group: i, indent: l, ifBreak: p2 } } = qe(), { isTestCall: y, hasComment: h, CommentCheckFlags: g, isTSXFile: c, shouldPrintComma: f, getFunctionParameters: F, isObjectType: _, getTypeScriptMappedTypeModifier: w } = Ke(), { createGroupIdMapper: E } = Ue(), { shouldHugType: N } = Or(), { isArrowFunctionVariableDeclarator: x } = tr(), I = E("typeParameters"); + function P(T, m, C, o) { + let d = T.getValue(); + if (!d[o]) + return ""; + if (!Array.isArray(d[o])) + return C(o); + let v = T.getNode(2), S = v && y(v), b = T.match((M) => !(M[o].length === 1 && _(M[o][0])), void 0, (M, R) => R === "typeAnnotation", (M) => M.type === "Identifier", x); + if (d[o].length === 0 || !b && (S || d[o].length === 1 && (d[o][0].type === "NullableTypeAnnotation" || N(d[o][0])))) + return ["<", s(", ", T.map(C, o)), $(T, m), ">"]; + let k = d.type === "TSTypeParameterInstantiation" ? "" : F(d).length === 1 && c(m) && !d[o][0].constraint && T.getParentNode().type === "ArrowFunctionExpression" ? "," : f(m, "all") ? p2(",") : ""; + return i(["<", l([u, s([",", a], T.map(C, o))]), k, u, ">"], { id: I(d) }); + } + function $(T, m) { + let C = T.getValue(); + if (!h(C, g.Dangling)) + return ""; + let o = !h(C, g.Line), d = t2(T, m, o); + return o ? d : [d, n]; + } + function D(T, m, C) { + let o = T.getValue(), d = [o.type === "TSTypeParameter" && o.const ? "const " : ""], v = T.getParentNode(); + return v.type === "TSMappedType" ? (v.readonly && d.push(w(v.readonly, "readonly"), " "), d.push("[", C("name")), o.constraint && d.push(" in ", C("constraint")), v.nameType && d.push(" as ", T.callParent(() => C("nameType"))), d.push("]"), d) : (o.variance && d.push(C("variance")), o.in && d.push("in "), o.out && d.push("out "), d.push(C("name")), o.bound && d.push(": ", C("bound")), o.constraint && d.push(" extends ", C("constraint")), o.default && d.push(" = ", C("default")), d); + } + r.exports = { printTypeParameter: D, printTypeParameters: P, getTypeParametersGroupId: I }; + } }), rr = te({ "src/language-js/print/property.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { printString: s, printNumber: a } = Ue(), { isNumericLiteral: n, isSimpleNumber: u, isStringLiteral: i, isStringPropSafeToUnquote: l, rawText: p2 } = Ke(), { printAssignment: y } = tr(), h = /* @__PURE__ */ new WeakMap(); + function g(f, F, _) { + let w = f.getNode(); + if (w.computed) + return ["[", _("key"), "]"]; + let E = f.getParentNode(), { key: N } = w; + if (F.quoteProps === "consistent" && !h.has(E)) { + let x = (E.properties || E.body || E.members).some((I) => !I.computed && I.key && i(I.key) && !l(I, F)); + h.set(E, x); + } + if ((N.type === "Identifier" || n(N) && u(a(p2(N))) && String(N.value) === a(p2(N)) && !(F.parser === "typescript" || F.parser === "babel-ts")) && (F.parser === "json" || F.quoteProps === "consistent" && h.get(E))) { + let x = s(JSON.stringify(N.type === "Identifier" ? N.name : N.value.toString()), F); + return f.call((I) => t2(I, x, F), "key"); + } + return l(w, F) && (F.quoteProps === "as-needed" || F.quoteProps === "consistent" && !h.get(E)) ? f.call((x) => t2(x, /^\d/.test(N.value) ? a(N.value) : N.value, F), "key") : _("key"); + } + function c(f, F, _) { + return f.getValue().shorthand ? _("value") : y(f, F, _, g(f, F, _), ":", "value"); + } + r.exports = { printProperty: c, printPropertyKey: g }; + } }), qr = te({ "src/language-js/print/function.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { printDanglingComments: s, printCommentsSeparately: a } = et(), n = lt(), { getNextNonSpaceNonCommentCharacterIndex: u } = Ue(), { builders: { line: i, softline: l, group: p2, indent: y, ifBreak: h, hardline: g, join: c, indentIfBreak: f }, utils: { removeLines: F, willBreak: _ } } = qe(), { ArgExpansionBailout: w } = Qt(), { getFunctionParameters: E, hasLeadingOwnLineComment: N, isFlowAnnotationComment: x, isJsxNode: I, isTemplateOnItsOwnLine: P, shouldPrintComma: $, startsWithNoLookaheadToken: D, isBinaryish: T, isLineComment: m, hasComment: C, getComments: o, CommentCheckFlags: d, isCallLikeExpression: v, isCallExpression: S, getCallArguments: b, hasNakedLeftSide: B, getLeftSide: k } = Ke(), { locEnd: M } = ut(), { printFunctionParameters: R, shouldGroupFunctionParameters: q } = Lr(), { printPropertyKey: J } = rr(), { printFunctionTypeParameters: L } = ct(); + function Q(U, Z, se, fe) { + let ge = U.getValue(), he = false; + if ((ge.type === "FunctionDeclaration" || ge.type === "FunctionExpression") && fe && fe.expandLastArg) { + let Pe = U.getParentNode(); + S(Pe) && b(Pe).length > 1 && (he = true); + } + let we = []; + ge.type === "TSDeclareFunction" && ge.declare && we.push("declare "), ge.async && we.push("async "), ge.generator ? we.push("function* ") : we.push("function "), ge.id && we.push(Z("id")); + let ke = R(U, Z, se, he), Re = K(U, Z, se), Ne = q(ge, Re); + return we.push(L(U, se, Z), p2([Ne ? p2(ke) : ke, Re]), ge.body ? " " : "", Z("body")), se.semi && (ge.declare || !ge.body) && we.push(";"), we; + } + function V(U, Z, se) { + let fe = U.getNode(), { kind: ge } = fe, he = fe.value || fe, we = []; + return !ge || ge === "init" || ge === "method" || ge === "constructor" ? he.async && we.push("async ") : (t2.ok(ge === "get" || ge === "set"), we.push(ge, " ")), he.generator && we.push("*"), we.push(J(U, Z, se), fe.optional || fe.key.optional ? "?" : ""), fe === he ? we.push(j(U, Z, se)) : he.type === "FunctionExpression" ? we.push(U.call((ke) => j(ke, Z, se), "value")) : we.push(se("value")), we; + } + function j(U, Z, se) { + let fe = U.getNode(), ge = R(U, se, Z), he = K(U, se, Z), we = q(fe, he), ke = [L(U, Z, se), p2([we ? p2(ge) : ge, he])]; + return fe.body ? ke.push(" ", se("body")) : ke.push(Z.semi ? ";" : ""), ke; + } + function Y(U, Z, se, fe) { + let ge = U.getValue(), he = []; + if (ge.async && he.push("async "), W(U, Z)) + he.push(se(["params", 0])); + else { + let ke = fe && (fe.expandLastArg || fe.expandFirstArg), Re = K(U, se, Z); + if (ke) { + if (_(Re)) + throw new w(); + Re = p2(F(Re)); + } + he.push(p2([R(U, se, Z, ke, true), Re])); + } + let we = s(U, Z, true, (ke) => { + let Re = u(Z.originalText, ke, M); + return Re !== false && Z.originalText.slice(Re, Re + 2) === "=>"; + }); + return we && he.push(" ", we), he; + } + function ie(U, Z, se, fe, ge, he) { + let we = U.getName(), ke = U.getParentNode(), Re = v(ke) && we === "callee", Ne = Boolean(Z && Z.assignmentLayout), Pe = he.body.type !== "BlockStatement" && he.body.type !== "ObjectExpression" && he.body.type !== "SequenceExpression", oe = Re && Pe || Z && Z.assignmentLayout === "chain-tail-arrow-chain", H = Symbol("arrow-chain"); + return he.body.type === "SequenceExpression" && (ge = p2(["(", y([l, ge]), l, ")"])), p2([p2(y([Re || Ne ? l : "", p2(c([" =>", i], se), { shouldBreak: fe })]), { id: H, shouldBreak: oe }), " =>", f(Pe ? y([i, ge]) : [" ", ge], { groupId: H }), Re ? h(l, "", { groupId: H }) : ""]); + } + function ee(U, Z, se, fe) { + let ge = U.getValue(), he = [], we = [], ke = false; + if (function H() { + let pe = Y(U, Z, se, fe); + if (he.length === 0) + he.push(pe); + else { + let { leading: X, trailing: le } = a(U, Z); + he.push([X, pe]), we.unshift(le); + } + ke = ke || ge.returnType && E(ge).length > 0 || ge.typeParameters || E(ge).some((X) => X.type !== "Identifier"), ge.body.type !== "ArrowFunctionExpression" || fe && fe.expandLastArg ? we.unshift(se("body", fe)) : (ge = ge.body, U.call(H, "body")); + }(), he.length > 1) + return ie(U, fe, he, ke, we, ge); + let Re = he; + if (Re.push(" =>"), !N(Z.originalText, ge.body) && (ge.body.type === "ArrayExpression" || ge.body.type === "ObjectExpression" || ge.body.type === "BlockStatement" || I(ge.body) || P(ge.body, Z.originalText) || ge.body.type === "ArrowFunctionExpression" || ge.body.type === "DoExpression")) + return p2([...Re, " ", we]); + if (ge.body.type === "SequenceExpression") + return p2([...Re, p2([" (", y([l, we]), l, ")"])]); + let Ne = (fe && fe.expandLastArg || U.getParentNode().type === "JSXExpressionContainer") && !C(ge), Pe = fe && fe.expandLastArg && $(Z, "all"), oe = ge.body.type === "ConditionalExpression" && !D(ge.body, (H) => H.type === "ObjectExpression"); + return p2([...Re, p2([y([i, oe ? h("", "(") : "", we, oe ? h("", ")") : ""]), Ne ? [h(Pe ? "," : ""), l] : ""])]); + } + function ce(U) { + let Z = E(U); + return Z.length === 1 && !U.typeParameters && !C(U, d.Dangling) && Z[0].type === "Identifier" && !Z[0].typeAnnotation && !C(Z[0]) && !Z[0].optional && !U.predicate && !U.returnType; + } + function W(U, Z) { + if (Z.arrowParens === "always") + return false; + if (Z.arrowParens === "avoid") { + let se = U.getValue(); + return ce(se); + } + return false; + } + function K(U, Z, se) { + let fe = U.getValue(), ge = Z("returnType"); + if (fe.returnType && x(se.originalText, fe.returnType)) + return [" /*: ", ge, " */"]; + let he = [ge]; + return fe.returnType && fe.returnType.typeAnnotation && he.unshift(": "), fe.predicate && he.push(fe.returnType ? " " : ": ", Z("predicate")), he; + } + function de(U, Z, se) { + let fe = U.getValue(), ge = Z.semi ? ";" : "", he = []; + fe.argument && (z(Z, fe.argument) ? he.push([" (", y([g, se("argument")]), g, ")"]) : T(fe.argument) || fe.argument.type === "SequenceExpression" ? he.push(p2([h(" (", " "), y([l, se("argument")]), l, h(")")])) : he.push(" ", se("argument"))); + let we = o(fe), ke = n(we), Re = ke && m(ke); + return Re && he.push(ge), C(fe, d.Dangling) && he.push(" ", s(U, Z, true)), Re || he.push(ge), he; + } + function ue(U, Z, se) { + return ["return", de(U, Z, se)]; + } + function Fe(U, Z, se) { + return ["throw", de(U, Z, se)]; + } + function z(U, Z) { + if (N(U.originalText, Z)) + return true; + if (B(Z)) { + let se = Z, fe; + for (; fe = k(se); ) + if (se = fe, N(U.originalText, se)) + return true; + } + return false; + } + r.exports = { printFunction: Q, printArrowFunction: ee, printMethod: V, printReturnStatement: ue, printThrowStatement: Fe, printMethodInternal: j, shouldPrintParamsWithoutParens: W }; + } }), nu = te({ "src/language-js/print/decorators.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, hasNewline: s } = Ue(), { builders: { line: a, hardline: n, join: u, breakParent: i, group: l } } = qe(), { locStart: p2, locEnd: y } = ut(), { getParentExportDeclaration: h } = Ke(); + function g(w, E, N) { + let x = w.getValue(); + return l([u(a, w.map(N, "decorators")), F(x, E) ? n : a]); + } + function c(w, E, N) { + return [u(n, w.map(N, "declaration", "decorators")), n]; + } + function f(w, E, N) { + let x = w.getValue(), { decorators: I } = x; + if (!t2(I) || _(w.getParentNode())) + return; + let P = x.type === "ClassExpression" || x.type === "ClassDeclaration" || F(x, E); + return [h(w) ? n : P ? i : "", u(a, w.map(N, "decorators")), a]; + } + function F(w, E) { + return w.decorators.some((N) => s(E.originalText, y(N))); + } + function _(w) { + if (w.type !== "ExportDefaultDeclaration" && w.type !== "ExportNamedDeclaration" && w.type !== "DeclareExportDeclaration") + return false; + let E = w.declaration && w.declaration.decorators; + return t2(E) && p2(w) === p2(E[0]); + } + r.exports = { printDecorators: f, printClassMemberDecorators: g, printDecoratorsBeforeExport: c, hasDecoratorsBeforeExport: _ }; + } }), nr = te({ "src/language-js/print/class.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, createGroupIdMapper: s } = Ue(), { printComments: a, printDanglingComments: n } = et(), { builders: { join: u, line: i, hardline: l, softline: p2, group: y, indent: h, ifBreak: g } } = qe(), { hasComment: c, CommentCheckFlags: f } = Ke(), { getTypeParametersGroupId: F } = jr(), { printMethod: _ } = qr(), { printOptionalToken: w, printTypeAnnotation: E, printDefiniteToken: N } = ct(), { printPropertyKey: x } = rr(), { printAssignment: I } = tr(), { printClassMemberDecorators: P } = nu(); + function $(b, B, k) { + let M = b.getValue(), R = []; + M.declare && R.push("declare "), M.abstract && R.push("abstract "), R.push("class"); + let q = M.id && c(M.id, f.Trailing) || M.typeParameters && c(M.typeParameters, f.Trailing) || M.superClass && c(M.superClass) || t2(M.extends) || t2(M.mixins) || t2(M.implements), J = [], L = []; + if (M.id && J.push(" ", k("id")), J.push(k("typeParameters")), M.superClass) { + let Q = [d(b, B, k), k("superTypeParameters")], V = b.call((j) => ["extends ", a(j, Q, B)], "superClass"); + q ? L.push(i, y(V)) : L.push(" ", V); + } else + L.push(o(b, B, k, "extends")); + if (L.push(o(b, B, k, "mixins"), o(b, B, k, "implements")), q) { + let Q; + C(M) ? Q = [...J, h(L)] : Q = h([...J, L]), R.push(y(Q, { id: D(M) })); + } else + R.push(...J, ...L); + return R.push(" ", k("body")), R; + } + var D = s("heritageGroup"); + function T(b) { + return g(l, "", { groupId: D(b) }); + } + function m(b) { + return ["superClass", "extends", "mixins", "implements"].filter((B) => Boolean(b[B])).length > 1; + } + function C(b) { + return b.typeParameters && !c(b.typeParameters, f.Trailing | f.Line) && !m(b); + } + function o(b, B, k, M) { + let R = b.getValue(); + if (!t2(R[M])) + return ""; + let q = n(b, B, true, (J) => { + let { marker: L } = J; + return L === M; + }); + return [C(R) ? g(" ", i, { groupId: F(R.typeParameters) }) : i, q, q && l, M, y(h([i, u([",", i], b.map(k, M))]))]; + } + function d(b, B, k) { + let M = k("superClass"); + return b.getParentNode().type === "AssignmentExpression" ? y(g(["(", h([p2, M]), p2, ")"], M)) : M; + } + function v(b, B, k) { + let M = b.getValue(), R = []; + return t2(M.decorators) && R.push(P(b, B, k)), M.accessibility && R.push(M.accessibility + " "), M.readonly && R.push("readonly "), M.declare && R.push("declare "), M.static && R.push("static "), (M.type === "TSAbstractMethodDefinition" || M.abstract) && R.push("abstract "), M.override && R.push("override "), R.push(_(b, B, k)), R; + } + function S(b, B, k) { + let M = b.getValue(), R = [], q = B.semi ? ";" : ""; + return t2(M.decorators) && R.push(P(b, B, k)), M.accessibility && R.push(M.accessibility + " "), M.declare && R.push("declare "), M.static && R.push("static "), (M.type === "TSAbstractPropertyDefinition" || M.type === "TSAbstractAccessorProperty" || M.abstract) && R.push("abstract "), M.override && R.push("override "), M.readonly && R.push("readonly "), M.variance && R.push(k("variance")), (M.type === "ClassAccessorProperty" || M.type === "AccessorProperty" || M.type === "TSAbstractAccessorProperty") && R.push("accessor "), R.push(x(b, B, k), w(b), N(b), E(b, B, k)), [I(b, B, k, R, " =", "value"), q]; + } + r.exports = { printClass: $, printClassMethod: v, printClassProperty: S, printHardlineAfterHeritage: T }; + } }), bo = te({ "src/language-js/print/interface.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { join: s, line: a, group: n, indent: u, ifBreak: i } } = qe(), { hasComment: l, identity: p2, CommentCheckFlags: y } = Ke(), { getTypeParametersGroupId: h } = jr(), { printTypeScriptModifiers: g } = ct(); + function c(f, F, _) { + let w = f.getValue(), E = []; + w.declare && E.push("declare "), w.type === "TSInterfaceDeclaration" && E.push(w.abstract ? "abstract " : "", g(f, F, _)), E.push("interface"); + let N = [], x = []; + w.type !== "InterfaceTypeAnnotation" && N.push(" ", _("id"), _("typeParameters")); + let I = w.typeParameters && !l(w.typeParameters, y.Trailing | y.Line); + return t2(w.extends) && x.push(I ? i(" ", a, { groupId: h(w.typeParameters) }) : a, "extends ", (w.extends.length === 1 ? p2 : u)(s([",", a], f.map(_, "extends")))), w.id && l(w.id, y.Trailing) || t2(w.extends) ? I ? E.push(n([...N, u(x)])) : E.push(n(u([...N, ...x]))) : E.push(...N, ...x), E.push(" ", _("body")), n(E); + } + r.exports = { printInterface: c }; + } }), To = te({ "src/language-js/print/module.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { softline: s, group: a, indent: n, join: u, line: i, ifBreak: l, hardline: p2 } } = qe(), { printDanglingComments: y } = et(), { hasComment: h, CommentCheckFlags: g, shouldPrintComma: c, needsHardlineAfterDanglingComment: f, isStringLiteral: F, rawText: _ } = Ke(), { locStart: w, hasSameLoc: E } = ut(), { hasDecoratorsBeforeExport: N, printDecoratorsBeforeExport: x } = nu(); + function I(S, b, B) { + let k = S.getValue(), M = b.semi ? ";" : "", R = [], { importKind: q } = k; + return R.push("import"), q && q !== "value" && R.push(" ", q), R.push(m(S, b, B), T(S, b, B), o(S, b, B), M), R; + } + function P(S, b, B) { + let k = S.getValue(), M = []; + N(k) && M.push(x(S, b, B)); + let { type: R, exportKind: q, declaration: J } = k; + return M.push("export"), (k.default || R === "ExportDefaultDeclaration") && M.push(" default"), h(k, g.Dangling) && (M.push(" ", y(S, b, true)), f(k) && M.push(p2)), J ? M.push(" ", B("declaration")) : M.push(q === "type" ? " type" : "", m(S, b, B), T(S, b, B), o(S, b, B)), D(k, b) && M.push(";"), M; + } + function $(S, b, B) { + let k = S.getValue(), M = b.semi ? ";" : "", R = [], { exportKind: q, exported: J } = k; + return R.push("export"), q === "type" && R.push(" type"), R.push(" *"), J && R.push(" as ", B("exported")), R.push(T(S, b, B), o(S, b, B), M), R; + } + function D(S, b) { + if (!b.semi) + return false; + let { type: B, declaration: k } = S, M = S.default || B === "ExportDefaultDeclaration"; + if (!k) + return true; + let { type: R } = k; + return !!(M && R !== "ClassDeclaration" && R !== "FunctionDeclaration" && R !== "TSInterfaceDeclaration" && R !== "DeclareClass" && R !== "DeclareFunction" && R !== "TSDeclareFunction" && R !== "EnumDeclaration"); + } + function T(S, b, B) { + let k = S.getValue(); + if (!k.source) + return ""; + let M = []; + return C(k, b) || M.push(" from"), M.push(" ", B("source")), M; + } + function m(S, b, B) { + let k = S.getValue(); + if (C(k, b)) + return ""; + let M = [" "]; + if (t2(k.specifiers)) { + let R = [], q = []; + S.each(() => { + let J = S.getValue().type; + if (J === "ExportNamespaceSpecifier" || J === "ExportDefaultSpecifier" || J === "ImportNamespaceSpecifier" || J === "ImportDefaultSpecifier") + R.push(B()); + else if (J === "ExportSpecifier" || J === "ImportSpecifier") + q.push(B()); + else + throw new Error(`Unknown specifier type ${JSON.stringify(J)}`); + }, "specifiers"), M.push(u(", ", R)), q.length > 0 && (R.length > 0 && M.push(", "), q.length > 1 || R.length > 0 || k.specifiers.some((L) => h(L)) ? M.push(a(["{", n([b.bracketSpacing ? i : s, u([",", i], q)]), l(c(b) ? "," : ""), b.bracketSpacing ? i : s, "}"])) : M.push(["{", b.bracketSpacing ? " " : "", ...q, b.bracketSpacing ? " " : "", "}"])); + } else + M.push("{}"); + return M; + } + function C(S, b) { + let { type: B, importKind: k, source: M, specifiers: R } = S; + return B !== "ImportDeclaration" || t2(R) || k === "type" ? false : !/{\s*}/.test(b.originalText.slice(w(S), w(M))); + } + function o(S, b, B) { + let k = S.getNode(); + return t2(k.assertions) ? [" assert {", b.bracketSpacing ? " " : "", u(", ", S.map(B, "assertions")), b.bracketSpacing ? " " : "", "}"] : ""; + } + function d(S, b, B) { + let k = S.getNode(), { type: M } = k, R = [], q = M === "ImportSpecifier" ? k.importKind : k.exportKind; + q && q !== "value" && R.push(q, " "); + let J = M.startsWith("Import"), L = J ? "imported" : "local", Q = J ? "local" : "exported", V = k[L], j = k[Q], Y = "", ie = ""; + return M === "ExportNamespaceSpecifier" || M === "ImportNamespaceSpecifier" ? Y = "*" : V && (Y = B(L)), j && !v(k) && (ie = B(Q)), R.push(Y, Y && ie ? " as " : "", ie), R; + } + function v(S) { + if (S.type !== "ImportSpecifier" && S.type !== "ExportSpecifier") + return false; + let { local: b, [S.type === "ImportSpecifier" ? "imported" : "exported"]: B } = S; + if (b.type !== B.type || !E(b, B)) + return false; + if (F(b)) + return b.value === B.value && _(b) === _(B); + switch (b.type) { + case "Identifier": + return b.name === B.name; + default: + return false; + } + } + r.exports = { printImportDeclaration: I, printExportDeclaration: P, printExportAllDeclaration: $, printModuleSpecifier: d }; + } }), uu = te({ "src/language-js/print/object.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { line: s, softline: a, group: n, indent: u, ifBreak: i, hardline: l } } = qe(), { getLast: p2, hasNewlineInRange: y, hasNewline: h, isNonEmptyArray: g } = Ue(), { shouldPrintComma: c, hasComment: f, getComments: F, CommentCheckFlags: _, isNextLineEmpty: w } = Ke(), { locStart: E, locEnd: N } = ut(), { printOptionalToken: x, printTypeAnnotation: I } = ct(), { shouldHugFunctionParameters: P } = Lr(), { shouldHugType: $ } = Or(), { printHardlineAfterHeritage: D } = nr(); + function T(m, C, o) { + let d = C.semi ? ";" : "", v = m.getValue(), S; + v.type === "TSTypeLiteral" ? S = "members" : v.type === "TSInterfaceBody" ? S = "body" : S = "properties"; + let b = v.type === "ObjectTypeAnnotation", B = [S]; + b && B.push("indexers", "callProperties", "internalSlots"); + let k = B.map((W) => v[W][0]).sort((W, K) => E(W) - E(K))[0], M = m.getParentNode(0), R = b && M && (M.type === "InterfaceDeclaration" || M.type === "DeclareInterface" || M.type === "DeclareClass") && m.getName() === "body", q = v.type === "TSInterfaceBody" || R || v.type === "ObjectPattern" && M.type !== "FunctionDeclaration" && M.type !== "FunctionExpression" && M.type !== "ArrowFunctionExpression" && M.type !== "ObjectMethod" && M.type !== "ClassMethod" && M.type !== "ClassPrivateMethod" && M.type !== "AssignmentPattern" && M.type !== "CatchClause" && v.properties.some((W) => W.value && (W.value.type === "ObjectPattern" || W.value.type === "ArrayPattern")) || v.type !== "ObjectPattern" && k && y(C.originalText, E(v), E(k)), J = R ? ";" : v.type === "TSInterfaceBody" || v.type === "TSTypeLiteral" ? i(d, ";") : ",", L = v.type === "RecordExpression" ? "#{" : v.exact ? "{|" : "{", Q = v.exact ? "|}" : "}", V = []; + for (let W of B) + m.each((K) => { + let de = K.getValue(); + V.push({ node: de, printed: o(), loc: E(de) }); + }, W); + B.length > 1 && V.sort((W, K) => W.loc - K.loc); + let j = [], Y = V.map((W) => { + let K = [...j, n(W.printed)]; + return j = [J, s], (W.node.type === "TSPropertySignature" || W.node.type === "TSMethodSignature" || W.node.type === "TSConstructSignatureDeclaration") && f(W.node, _.PrettierIgnore) && j.shift(), w(W.node, C) && j.push(l), K; + }); + if (v.inexact) { + let W; + if (f(v, _.Dangling)) { + let K = f(v, _.Line); + W = [t2(m, C, true), K || h(C.originalText, N(p2(F(v)))) ? l : s, "..."]; + } else + W = ["..."]; + Y.push([...j, ...W]); + } + let ie = p2(v[S]), ee = !(v.inexact || ie && ie.type === "RestElement" || ie && (ie.type === "TSPropertySignature" || ie.type === "TSCallSignatureDeclaration" || ie.type === "TSMethodSignature" || ie.type === "TSConstructSignatureDeclaration") && f(ie, _.PrettierIgnore)), ce; + if (Y.length === 0) { + if (!f(v, _.Dangling)) + return [L, Q, I(m, C, o)]; + ce = n([L, t2(m, C), a, Q, x(m), I(m, C, o)]); + } else + ce = [R && g(v.properties) ? D(M) : "", L, u([C.bracketSpacing ? s : a, ...Y]), i(ee && (J !== "," || c(C)) ? J : ""), C.bracketSpacing ? s : a, Q, x(m), I(m, C, o)]; + return m.match((W) => W.type === "ObjectPattern" && !W.decorators, (W, K, de) => P(W) && (K === "params" || K === "parameters" || K === "this" || K === "rest") && de === 0) || m.match($, (W, K) => K === "typeAnnotation", (W, K) => K === "typeAnnotation", (W, K, de) => P(W) && (K === "params" || K === "parameters" || K === "this" || K === "rest") && de === 0) || !q && m.match((W) => W.type === "ObjectPattern", (W) => W.type === "AssignmentExpression" || W.type === "VariableDeclarator") ? ce : n(ce, { shouldBreak: q }); + } + r.exports = { printObject: T }; + } }), dd = te({ "src/language-js/print/flow.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { printDanglingComments: s } = et(), { printString: a, printNumber: n } = Ue(), { builders: { hardline: u, softline: i, group: l, indent: p2 } } = qe(), { getParentExportDeclaration: y, isFunctionNotation: h, isGetterOrSetter: g, rawText: c, shouldPrintComma: f } = Ke(), { locStart: F, locEnd: _ } = ut(), { replaceTextEndOfLine: w } = Yt(), { printClass: E } = nr(), { printOpaqueType: N, printTypeAlias: x, printIntersectionType: I, printUnionType: P, printFunctionType: $, printTupleType: D, printIndexedAccessType: T } = Or(), { printInterface: m } = bo(), { printTypeParameter: C, printTypeParameters: o } = jr(), { printExportDeclaration: d, printExportAllDeclaration: v } = To(), { printArrayItems: S } = er(), { printObject: b } = uu(), { printPropertyKey: B } = rr(), { printOptionalToken: k, printTypeAnnotation: M, printRestSpread: R } = ct(); + function q(L, Q, V) { + let j = L.getValue(), Y = Q.semi ? ";" : "", ie = []; + switch (j.type) { + case "DeclareClass": + return J(L, E(L, Q, V)); + case "DeclareFunction": + return J(L, ["function ", V("id"), j.predicate ? " " : "", V("predicate"), Y]); + case "DeclareModule": + return J(L, ["module ", V("id"), " ", V("body")]); + case "DeclareModuleExports": + return J(L, ["module.exports", ": ", V("typeAnnotation"), Y]); + case "DeclareVariable": + return J(L, ["var ", V("id"), Y]); + case "DeclareOpaqueType": + return J(L, N(L, Q, V)); + case "DeclareInterface": + return J(L, m(L, Q, V)); + case "DeclareTypeAlias": + return J(L, x(L, Q, V)); + case "DeclareExportDeclaration": + return J(L, d(L, Q, V)); + case "DeclareExportAllDeclaration": + return J(L, v(L, Q, V)); + case "OpaqueType": + return N(L, Q, V); + case "TypeAlias": + return x(L, Q, V); + case "IntersectionTypeAnnotation": + return I(L, Q, V); + case "UnionTypeAnnotation": + return P(L, Q, V); + case "FunctionTypeAnnotation": + return $(L, Q, V); + case "TupleTypeAnnotation": + return D(L, Q, V); + case "GenericTypeAnnotation": + return [V("id"), o(L, Q, V, "typeParameters")]; + case "IndexedAccessType": + case "OptionalIndexedAccessType": + return T(L, Q, V); + case "TypeAnnotation": + return V("typeAnnotation"); + case "TypeParameter": + return C(L, Q, V); + case "TypeofTypeAnnotation": + return ["typeof ", V("argument")]; + case "ExistsTypeAnnotation": + return "*"; + case "EmptyTypeAnnotation": + return "empty"; + case "MixedTypeAnnotation": + return "mixed"; + case "ArrayTypeAnnotation": + return [V("elementType"), "[]"]; + case "BooleanLiteralTypeAnnotation": + return String(j.value); + case "EnumDeclaration": + return ["enum ", V("id"), " ", V("body")]; + case "EnumBooleanBody": + case "EnumNumberBody": + case "EnumStringBody": + case "EnumSymbolBody": { + if (j.type === "EnumSymbolBody" || j.explicitType) { + let ee = null; + switch (j.type) { + case "EnumBooleanBody": + ee = "boolean"; + break; + case "EnumNumberBody": + ee = "number"; + break; + case "EnumStringBody": + ee = "string"; + break; + case "EnumSymbolBody": + ee = "symbol"; + break; + } + ie.push("of ", ee, " "); + } + if (j.members.length === 0 && !j.hasUnknownMembers) + ie.push(l(["{", s(L, Q), i, "}"])); + else { + let ee = j.members.length > 0 ? [u, S(L, Q, "members", V), j.hasUnknownMembers || f(Q) ? "," : ""] : []; + ie.push(l(["{", p2([...ee, ...j.hasUnknownMembers ? [u, "..."] : []]), s(L, Q, true), u, "}"])); + } + return ie; + } + case "EnumBooleanMember": + case "EnumNumberMember": + case "EnumStringMember": + return [V("id"), " = ", typeof j.init == "object" ? V("init") : String(j.init)]; + case "EnumDefaultedMember": + return V("id"); + case "FunctionTypeParam": { + let ee = j.name ? V("name") : L.getParentNode().this === j ? "this" : ""; + return [ee, k(L), ee ? ": " : "", V("typeAnnotation")]; + } + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": + return m(L, Q, V); + case "ClassImplements": + case "InterfaceExtends": + return [V("id"), V("typeParameters")]; + case "NullableTypeAnnotation": + return ["?", V("typeAnnotation")]; + case "Variance": { + let { kind: ee } = j; + return t2.ok(ee === "plus" || ee === "minus"), ee === "plus" ? "+" : "-"; + } + case "ObjectTypeCallProperty": + return j.static && ie.push("static "), ie.push(V("value")), ie; + case "ObjectTypeIndexer": + return [j.static ? "static " : "", j.variance ? V("variance") : "", "[", V("id"), j.id ? ": " : "", V("key"), "]: ", V("value")]; + case "ObjectTypeProperty": { + let ee = ""; + return j.proto ? ee = "proto " : j.static && (ee = "static "), [ee, g(j) ? j.kind + " " : "", j.variance ? V("variance") : "", B(L, Q, V), k(L), h(j) ? "" : ": ", V("value")]; + } + case "ObjectTypeAnnotation": + return b(L, Q, V); + case "ObjectTypeInternalSlot": + return [j.static ? "static " : "", "[[", V("id"), "]]", k(L), j.method ? "" : ": ", V("value")]; + case "ObjectTypeSpreadProperty": + return R(L, Q, V); + case "QualifiedTypeofIdentifier": + case "QualifiedTypeIdentifier": + return [V("qualification"), ".", V("id")]; + case "StringLiteralTypeAnnotation": + return w(a(c(j), Q)); + case "NumberLiteralTypeAnnotation": + t2.strictEqual(typeof j.value, "number"); + case "BigIntLiteralTypeAnnotation": + return j.extra ? n(j.extra.raw) : n(j.raw); + case "TypeCastExpression": + return ["(", V("expression"), M(L, Q, V), ")"]; + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": { + let ee = o(L, Q, V, "params"); + if (Q.parser === "flow") { + let ce = F(j), W = _(j), K = Q.originalText.lastIndexOf("/*", ce), de = Q.originalText.indexOf("*/", W); + if (K !== -1 && de !== -1) { + let ue = Q.originalText.slice(K + 2, de).trim(); + if (ue.startsWith("::") && !ue.includes("/*") && !ue.includes("*/")) + return ["/*:: ", ee, " */"]; + } + } + return ee; + } + case "InferredPredicate": + return "%checks"; + case "DeclaredPredicate": + return ["%checks(", V("value"), ")"]; + case "AnyTypeAnnotation": + return "any"; + case "BooleanTypeAnnotation": + return "boolean"; + case "BigIntTypeAnnotation": + return "bigint"; + case "NullLiteralTypeAnnotation": + return "null"; + case "NumberTypeAnnotation": + return "number"; + case "SymbolTypeAnnotation": + return "symbol"; + case "StringTypeAnnotation": + return "string"; + case "VoidTypeAnnotation": + return "void"; + case "ThisTypeAnnotation": + return "this"; + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": + case "MemberTypeAnnotation": + case "Type": + throw new Error("unprintable type: " + JSON.stringify(j.type)); + } + } + function J(L, Q) { + let V = y(L); + return V ? (t2.strictEqual(V.type, "DeclareExportDeclaration"), Q) : ["declare ", Q]; + } + r.exports = { printFlow: q }; + } }), gd = te({ "src/language-js/utils/is-ts-keyword-type.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + let { type: a } = s; + return a.startsWith("TS") && a.endsWith("Keyword"); + } + r.exports = t2; + } }), Bo = te({ "src/language-js/print/ternary.js"(e, r) { + "use strict"; + ne(); + var { hasNewlineInRange: t2 } = Ue(), { isJsxNode: s, getComments: a, isCallExpression: n, isMemberExpression: u, isTSTypeExpression: i } = Ke(), { locStart: l, locEnd: p2 } = ut(), y = Pt(), { builders: { line: h, softline: g, group: c, indent: f, align: F, ifBreak: _, dedent: w, breakParent: E } } = qe(); + function N(D) { + let T = [D]; + for (let m = 0; m < T.length; m++) { + let C = T[m]; + for (let o of ["test", "consequent", "alternate"]) { + let d = C[o]; + if (s(d)) + return true; + d.type === "ConditionalExpression" && T.push(d); + } + } + return false; + } + function x(D, T, m) { + let C = D.getValue(), o = C.type === "ConditionalExpression", d = o ? "alternate" : "falseType", v = D.getParentNode(), S = o ? m("test") : [m("checkType"), " ", "extends", " ", m("extendsType")]; + return v.type === C.type && v[d] === C ? F(2, S) : S; + } + var I = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"]]); + function P(D) { + let T = D.getValue(); + if (T.type !== "ConditionalExpression") + return false; + let m, C = T; + for (let o = 0; !m; o++) { + let d = D.getParentNode(o); + if (n(d) && d.callee === C || u(d) && d.object === C || d.type === "TSNonNullExpression" && d.expression === C) { + C = d; + continue; + } + d.type === "NewExpression" && d.callee === C || i(d) && d.expression === C ? (m = D.getParentNode(o + 1), C = d) : m = d; + } + return C === T ? false : m[I.get(m.type)] === C; + } + function $(D, T, m) { + let C = D.getValue(), o = C.type === "ConditionalExpression", d = o ? "consequent" : "trueType", v = o ? "alternate" : "falseType", S = o ? ["test"] : ["checkType", "extendsType"], b = C[d], B = C[v], k = [], M = false, R = D.getParentNode(), q = R.type === C.type && S.some((ue) => R[ue] === C), J = R.type === C.type && !q, L, Q, V = 0; + do + Q = L || C, L = D.getParentNode(V), V++; + while (L && L.type === C.type && S.every((ue) => L[ue] !== Q)); + let j = L || R, Y = Q; + if (o && (s(C[S[0]]) || s(b) || s(B) || N(Y))) { + M = true, J = true; + let ue = (z) => [_("("), f([g, z]), g, _(")")], Fe = (z) => z.type === "NullLiteral" || z.type === "Literal" && z.value === null || z.type === "Identifier" && z.name === "undefined"; + k.push(" ? ", Fe(b) ? m(d) : ue(m(d)), " : ", B.type === C.type || Fe(B) ? m(v) : ue(m(v))); + } else { + let ue = [h, "? ", b.type === C.type ? _("", "(") : "", F(2, m(d)), b.type === C.type ? _("", ")") : "", h, ": ", B.type === C.type ? m(v) : F(2, m(v))]; + k.push(R.type !== C.type || R[v] === C || q ? ue : T.useTabs ? w(f(ue)) : F(Math.max(0, T.tabWidth - 2), ue)); + } + let ee = [...S.map((ue) => a(C[ue])), a(b), a(B)].flat().some((ue) => y(ue) && t2(T.originalText, l(ue), p2(ue))), ce = (ue) => R === j ? c(ue, { shouldBreak: ee }) : ee ? [ue, E] : ue, W = !M && (u(R) || R.type === "NGPipeExpression" && R.left === C) && !R.computed, K = P(D), de = ce([x(D, T, m), J ? k : f(k), o && W && !K ? g : ""]); + return q || K ? c([f([g, de]), g]) : de; + } + r.exports = { printTernary: $ }; + } }), No = te({ "src/language-js/print/statement.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2 } } = qe(), s = qt(), { getLeftSidePathName: a, hasNakedLeftSide: n, isJsxNode: u, isTheOnlyJsxElementInMarkdown: i, hasComment: l, CommentCheckFlags: p2, isNextLineEmpty: y } = Ke(), { shouldPrintParamsWithoutParens: h } = qr(); + function g(x, I, P, $) { + let D = x.getValue(), T = [], m = D.type === "ClassBody", C = c(D[$]); + return x.each((o, d, v) => { + let S = o.getValue(); + if (S.type === "EmptyStatement") + return; + let b = P(); + !I.semi && !m && !i(I, o) && f(o, I) ? l(S, p2.Leading) ? T.push(P([], { needsSemi: true })) : T.push(";", b) : T.push(b), !I.semi && m && E(S) && N(S, v[d + 1]) && T.push(";"), S !== C && (T.push(t2), y(S, I) && T.push(t2)); + }, $), T; + } + function c(x) { + for (let I = x.length - 1; I >= 0; I--) { + let P = x[I]; + if (P.type !== "EmptyStatement") + return P; + } + } + function f(x, I) { + return x.getNode().type !== "ExpressionStatement" ? false : x.call(($) => F($, I), "expression"); + } + function F(x, I) { + let P = x.getValue(); + switch (P.type) { + case "ParenthesizedExpression": + case "TypeCastExpression": + case "ArrayExpression": + case "ArrayPattern": + case "TemplateLiteral": + case "TemplateElement": + case "RegExpLiteral": + return true; + case "ArrowFunctionExpression": { + if (!h(x, I)) + return true; + break; + } + case "UnaryExpression": { + let { prefix: $, operator: D } = P; + if ($ && (D === "+" || D === "-")) + return true; + break; + } + case "BindExpression": { + if (!P.object) + return true; + break; + } + case "Literal": { + if (P.regex) + return true; + break; + } + default: + if (u(P)) + return true; + } + return s(x, I) ? true : n(P) ? x.call(($) => F($, I), ...a(x, P)) : false; + } + function _(x, I, P) { + return g(x, I, P, "body"); + } + function w(x, I, P) { + return g(x, I, P, "consequent"); + } + var E = (x) => { + let { type: I } = x; + return I === "ClassProperty" || I === "PropertyDefinition" || I === "ClassPrivateProperty" || I === "ClassAccessorProperty" || I === "AccessorProperty" || I === "TSAbstractPropertyDefinition" || I === "TSAbstractAccessorProperty"; + }; + function N(x, I) { + let { type: P, name: $ } = x.key; + if (!x.computed && P === "Identifier" && ($ === "static" || $ === "get" || $ === "set" || $ === "accessor") && !x.value && !x.typeAnnotation) + return true; + if (!I || I.static || I.accessibility) + return false; + if (!I.computed) { + let D = I.key && I.key.name; + if (D === "in" || D === "instanceof") + return true; + } + if (E(I) && I.variance && !I.static && !I.declare) + return true; + switch (I.type) { + case "ClassProperty": + case "PropertyDefinition": + case "TSAbstractPropertyDefinition": + return I.computed; + case "MethodDefinition": + case "TSAbstractMethodDefinition": + case "ClassMethod": + case "ClassPrivateMethod": { + if ((I.value ? I.value.async : I.async) || I.kind === "get" || I.kind === "set") + return false; + let T = I.value ? I.value.generator : I.generator; + return !!(I.computed || T); + } + case "TSIndexSignature": + return true; + } + return false; + } + r.exports = { printBody: _, printSwitchCaseConsequent: w }; + } }), wo = te({ "src/language-js/print/block.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { isNonEmptyArray: s } = Ue(), { builders: { hardline: a, indent: n } } = qe(), { hasComment: u, CommentCheckFlags: i, isNextLineEmpty: l } = Ke(), { printHardlineAfterHeritage: p2 } = nr(), { printBody: y } = No(); + function h(c, f, F) { + let _ = c.getValue(), w = []; + if (_.type === "StaticBlock" && w.push("static "), _.type === "ClassBody" && s(_.body)) { + let N = c.getParentNode(); + w.push(p2(N)); + } + w.push("{"); + let E = g(c, f, F); + if (E) + w.push(n([a, E]), a); + else { + let N = c.getParentNode(), x = c.getParentNode(1); + N.type === "ArrowFunctionExpression" || N.type === "FunctionExpression" || N.type === "FunctionDeclaration" || N.type === "ObjectMethod" || N.type === "ClassMethod" || N.type === "ClassPrivateMethod" || N.type === "ForStatement" || N.type === "WhileStatement" || N.type === "DoWhileStatement" || N.type === "DoExpression" || N.type === "CatchClause" && !x.finalizer || N.type === "TSModuleDeclaration" || N.type === "TSDeclareFunction" || _.type === "StaticBlock" || _.type === "ClassBody" || w.push(a); + } + return w.push("}"), w; + } + function g(c, f, F) { + let _ = c.getValue(), w = s(_.directives), E = _.body.some((I) => I.type !== "EmptyStatement"), N = u(_, i.Dangling); + if (!w && !E && !N) + return ""; + let x = []; + if (w && c.each((I, P, $) => { + x.push(F()), (P < $.length - 1 || E || N) && (x.push(a), l(I.getValue(), f) && x.push(a)); + }, "directives"), E && x.push(y(c, f, F)), N && x.push(t2(c, f, true)), _.type === "Program") { + let I = c.getParentNode(); + (!I || I.type !== "ModuleExpression") && x.push(a); + } + return x; + } + r.exports = { printBlock: h, printBlockBody: g }; + } }), yd = te({ "src/language-js/print/typescript.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { hasNewlineInRange: s } = Ue(), { builders: { join: a, line: n, hardline: u, softline: i, group: l, indent: p2, conditionalGroup: y, ifBreak: h } } = qe(), { isStringLiteral: g, getTypeScriptMappedTypeModifier: c, shouldPrintComma: f, isCallExpression: F, isMemberExpression: _ } = Ke(), w = gd(), { locStart: E, locEnd: N } = ut(), { printOptionalToken: x, printTypeScriptModifiers: I } = ct(), { printTernary: P } = Bo(), { printFunctionParameters: $, shouldGroupFunctionParameters: D } = Lr(), { printTemplateLiteral: T } = jt(), { printArrayItems: m } = er(), { printObject: C } = uu(), { printClassProperty: o, printClassMethod: d } = nr(), { printTypeParameter: v, printTypeParameters: S } = jr(), { printPropertyKey: b } = rr(), { printFunction: B, printMethodInternal: k } = qr(), { printInterface: M } = bo(), { printBlock: R } = wo(), { printTypeAlias: q, printIntersectionType: J, printUnionType: L, printFunctionType: Q, printTupleType: V, printIndexedAccessType: j, printJSDocType: Y } = Or(); + function ie(ee, ce, W) { + let K = ee.getValue(); + if (!K.type.startsWith("TS")) + return; + if (w(K)) + return K.type.slice(2, -7).toLowerCase(); + let de = ce.semi ? ";" : "", ue = []; + switch (K.type) { + case "TSThisType": + return "this"; + case "TSTypeAssertion": { + let Fe = !(K.expression.type === "ArrayExpression" || K.expression.type === "ObjectExpression"), z = l(["<", p2([i, W("typeAnnotation")]), i, ">"]), U = [h("("), p2([i, W("expression")]), i, h(")")]; + return Fe ? y([[z, W("expression")], [z, l(U, { shouldBreak: true })], [z, W("expression")]]) : l([z, W("expression")]); + } + case "TSDeclareFunction": + return B(ee, W, ce); + case "TSExportAssignment": + return ["export = ", W("expression"), de]; + case "TSModuleBlock": + return R(ee, ce, W); + case "TSInterfaceBody": + case "TSTypeLiteral": + return C(ee, ce, W); + case "TSTypeAliasDeclaration": + return q(ee, ce, W); + case "TSQualifiedName": + return a(".", [W("left"), W("right")]); + case "TSAbstractMethodDefinition": + case "TSDeclareMethod": + return d(ee, ce, W); + case "TSAbstractAccessorProperty": + case "TSAbstractPropertyDefinition": + return o(ee, ce, W); + case "TSInterfaceHeritage": + case "TSExpressionWithTypeArguments": + return ue.push(W("expression")), K.typeParameters && ue.push(W("typeParameters")), ue; + case "TSTemplateLiteralType": + return T(ee, W, ce); + case "TSNamedTupleMember": + return [W("label"), K.optional ? "?" : "", ": ", W("elementType")]; + case "TSRestType": + return ["...", W("typeAnnotation")]; + case "TSOptionalType": + return [W("typeAnnotation"), "?"]; + case "TSInterfaceDeclaration": + return M(ee, ce, W); + case "TSClassImplements": + return [W("expression"), W("typeParameters")]; + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return S(ee, ce, W, "params"); + case "TSTypeParameter": + return v(ee, ce, W); + case "TSSatisfiesExpression": + case "TSAsExpression": { + let Fe = K.type === "TSAsExpression" ? "as" : "satisfies"; + ue.push(W("expression"), ` ${Fe} `, W("typeAnnotation")); + let z = ee.getParentNode(); + return F(z) && z.callee === K || _(z) && z.object === K ? l([p2([i, ...ue]), i]) : ue; + } + case "TSArrayType": + return [W("elementType"), "[]"]; + case "TSPropertySignature": + return K.readonly && ue.push("readonly "), ue.push(b(ee, ce, W), x(ee)), K.typeAnnotation && ue.push(": ", W("typeAnnotation")), K.initializer && ue.push(" = ", W("initializer")), ue; + case "TSParameterProperty": + return K.accessibility && ue.push(K.accessibility + " "), K.export && ue.push("export "), K.static && ue.push("static "), K.override && ue.push("override "), K.readonly && ue.push("readonly "), ue.push(W("parameter")), ue; + case "TSTypeQuery": + return ["typeof ", W("exprName"), W("typeParameters")]; + case "TSIndexSignature": { + let Fe = ee.getParentNode(), z = K.parameters.length > 1 ? h(f(ce) ? "," : "") : "", U = l([p2([i, a([", ", i], ee.map(W, "parameters"))]), z, i]); + return [K.export ? "export " : "", K.accessibility ? [K.accessibility, " "] : "", K.static ? "static " : "", K.readonly ? "readonly " : "", K.declare ? "declare " : "", "[", K.parameters ? U : "", K.typeAnnotation ? "]: " : "]", K.typeAnnotation ? W("typeAnnotation") : "", Fe.type === "ClassBody" ? de : ""]; + } + case "TSTypePredicate": + return [K.asserts ? "asserts " : "", W("parameterName"), K.typeAnnotation ? [" is ", W("typeAnnotation")] : ""]; + case "TSNonNullExpression": + return [W("expression"), "!"]; + case "TSImportType": + return [K.isTypeOf ? "typeof " : "", "import(", W(K.parameter ? "parameter" : "argument"), ")", K.qualifier ? [".", W("qualifier")] : "", S(ee, ce, W, "typeParameters")]; + case "TSLiteralType": + return W("literal"); + case "TSIndexedAccessType": + return j(ee, ce, W); + case "TSConstructSignatureDeclaration": + case "TSCallSignatureDeclaration": + case "TSConstructorType": { + if (K.type === "TSConstructorType" && K.abstract && ue.push("abstract "), K.type !== "TSCallSignatureDeclaration" && ue.push("new "), ue.push(l($(ee, W, ce, false, true))), K.returnType || K.typeAnnotation) { + let Fe = K.type === "TSConstructorType"; + ue.push(Fe ? " => " : ": ", W("returnType"), W("typeAnnotation")); + } + return ue; + } + case "TSTypeOperator": + return [K.operator, " ", W("typeAnnotation")]; + case "TSMappedType": { + let Fe = s(ce.originalText, E(K), N(K)); + return l(["{", p2([ce.bracketSpacing ? n : i, W("typeParameter"), K.optional ? c(K.optional, "?") : "", K.typeAnnotation ? ": " : "", W("typeAnnotation"), h(de)]), t2(ee, ce, true), ce.bracketSpacing ? n : i, "}"], { shouldBreak: Fe }); + } + case "TSMethodSignature": { + let Fe = K.kind && K.kind !== "method" ? `${K.kind} ` : ""; + ue.push(K.accessibility ? [K.accessibility, " "] : "", Fe, K.export ? "export " : "", K.static ? "static " : "", K.readonly ? "readonly " : "", K.abstract ? "abstract " : "", K.declare ? "declare " : "", K.computed ? "[" : "", W("key"), K.computed ? "]" : "", x(ee)); + let z = $(ee, W, ce, false, true), U = K.returnType ? "returnType" : "typeAnnotation", Z = K[U], se = Z ? W(U) : "", fe = D(K, se); + return ue.push(fe ? l(z) : z), Z && ue.push(": ", l(se)), l(ue); + } + case "TSNamespaceExportDeclaration": + return ue.push("export as namespace ", W("id")), ce.semi && ue.push(";"), l(ue); + case "TSEnumDeclaration": + return K.declare && ue.push("declare "), K.modifiers && ue.push(I(ee, ce, W)), K.const && ue.push("const "), ue.push("enum ", W("id"), " "), K.members.length === 0 ? ue.push(l(["{", t2(ee, ce), i, "}"])) : ue.push(l(["{", p2([u, m(ee, ce, "members", W), f(ce, "es5") ? "," : ""]), t2(ee, ce, true), u, "}"])), ue; + case "TSEnumMember": + return K.computed ? ue.push("[", W("id"), "]") : ue.push(W("id")), K.initializer && ue.push(" = ", W("initializer")), ue; + case "TSImportEqualsDeclaration": + return K.isExport && ue.push("export "), ue.push("import "), K.importKind && K.importKind !== "value" && ue.push(K.importKind, " "), ue.push(W("id"), " = ", W("moduleReference")), ce.semi && ue.push(";"), l(ue); + case "TSExternalModuleReference": + return ["require(", W("expression"), ")"]; + case "TSModuleDeclaration": { + let Fe = ee.getParentNode(), z = g(K.id), U = Fe.type === "TSModuleDeclaration", Z = K.body && K.body.type === "TSModuleDeclaration"; + if (U) + ue.push("."); + else { + K.declare && ue.push("declare "), ue.push(I(ee, ce, W)); + let se = ce.originalText.slice(E(K), E(K.id)); + K.id.type === "Identifier" && K.id.name === "global" && !/namespace|module/.test(se) || ue.push(z || /(?:^|\s)module(?:\s|$)/.test(se) ? "module " : "namespace "); + } + return ue.push(W("id")), Z ? ue.push(W("body")) : K.body ? ue.push(" ", l(W("body"))) : ue.push(de), ue; + } + case "TSConditionalType": + return P(ee, ce, W); + case "TSInferType": + return ["infer", " ", W("typeParameter")]; + case "TSIntersectionType": + return J(ee, ce, W); + case "TSUnionType": + return L(ee, ce, W); + case "TSFunctionType": + return Q(ee, ce, W); + case "TSTupleType": + return V(ee, ce, W); + case "TSTypeReference": + return [W("typeName"), S(ee, ce, W, "typeParameters")]; + case "TSTypeAnnotation": + return W("typeAnnotation"); + case "TSEmptyBodyFunctionExpression": + return k(ee, ce, W); + case "TSJSDocAllType": + return "*"; + case "TSJSDocUnknownType": + return "?"; + case "TSJSDocNullableType": + return Y(ee, W, "?"); + case "TSJSDocNonNullableType": + return Y(ee, W, "!"); + case "TSInstantiationExpression": + return [W("expression"), W("typeParameters")]; + default: + throw new Error(`Unknown TypeScript node type: ${JSON.stringify(K.type)}.`); + } + } + r.exports = { printTypescript: ie }; + } }), hd = te({ "src/language-js/print/comment.js"(e, r) { + "use strict"; + ne(); + var { hasNewline: t2 } = Ue(), { builders: { join: s, hardline: a }, utils: { replaceTextEndOfLine: n } } = qe(), { isLineComment: u } = Ke(), { locStart: i, locEnd: l } = ut(), p2 = Pt(); + function y(c, f) { + let F = c.getValue(); + if (u(F)) + return f.originalText.slice(i(F), l(F)).trimEnd(); + if (p2(F)) { + if (h(F)) { + let E = g(F); + return F.trailing && !t2(f.originalText, i(F), { backwards: true }) ? [a, E] : E; + } + let _ = l(F), w = f.originalText.slice(_ - 3, _) === "*-/"; + return ["/*", n(F.value), w ? "*-/" : "*/"]; + } + throw new Error("Not a comment: " + JSON.stringify(F)); + } + function h(c) { + let f = `*${c.value}*`.split(` +`); + return f.length > 1 && f.every((F) => F.trim()[0] === "*"); + } + function g(c) { + let f = c.value.split(` +`); + return ["/*", s(a, f.map((F, _) => _ === 0 ? F.trimEnd() : " " + (_ < f.length - 1 ? F.trim() : F.trimStart()))), "*/"]; + } + r.exports = { printComment: y }; + } }), vd = te({ "src/language-js/print/literal.js"(e, r) { + "use strict"; + ne(); + var { printString: t2, printNumber: s } = Ue(), { replaceTextEndOfLine: a } = Yt(), { printDirective: n } = ct(); + function u(y, h) { + let g = y.getNode(); + switch (g.type) { + case "RegExpLiteral": + return p2(g); + case "BigIntLiteral": + return l(g.bigint || g.extra.raw); + case "NumericLiteral": + return s(g.extra.raw); + case "StringLiteral": + return a(t2(g.extra.raw, h)); + case "NullLiteral": + return "null"; + case "BooleanLiteral": + return String(g.value); + case "DecimalLiteral": + return s(g.value) + "m"; + case "Literal": { + if (g.regex) + return p2(g.regex); + if (g.bigint) + return l(g.raw); + if (g.decimal) + return s(g.decimal) + "m"; + let { value: c } = g; + return typeof c == "number" ? s(g.raw) : typeof c == "string" ? i(y) ? n(g.raw, h) : a(t2(g.raw, h)) : String(c); + } + } + } + function i(y) { + if (y.getName() !== "expression") + return; + let h = y.getParentNode(); + return h.type === "ExpressionStatement" && h.directive; + } + function l(y) { + return y.toLowerCase(); + } + function p2(y) { + let { pattern: h, flags: g } = y; + return g = [...g].sort().join(""), `/${h}/${g}`; + } + r.exports = { printLiteral: u }; + } }), Cd = te({ "src/language-js/printer-estree.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { hasNewline: s } = Ue(), { builders: { join: a, line: n, hardline: u, softline: i, group: l, indent: p2 }, utils: { replaceTextEndOfLine: y } } = qe(), h = td(), g = rd(), { insertPragma: c } = Co(), f = Eo(), F = qt(), _ = Fo(), { hasFlowShorthandAnnotationComment: w, hasComment: E, CommentCheckFlags: N, isTheOnlyJsxElementInMarkdown: x, isLineComment: I, isNextLineEmpty: P, needsHardlineAfterDanglingComment: $, hasIgnoreComment: D, isCallExpression: T, isMemberExpression: m, markerForIfWithoutBlockAndSameLineComment: C } = Ke(), { locStart: o, locEnd: d } = ut(), v = Pt(), { printHtmlBinding: S, isVueEventBindingExpression: b } = pd(), { printAngular: B } = fd(), { printJsx: k, hasJsxIgnoreComment: M } = Dd(), { printFlow: R } = dd(), { printTypescript: q } = yd(), { printOptionalToken: J, printBindExpressionCallee: L, printTypeAnnotation: Q, adjustClause: V, printRestSpread: j, printDefiniteToken: Y, printDirective: ie } = ct(), { printImportDeclaration: ee, printExportDeclaration: ce, printExportAllDeclaration: W, printModuleSpecifier: K } = To(), { printTernary: de } = Bo(), { printTemplateLiteral: ue } = jt(), { printArray: Fe } = er(), { printObject: z } = uu(), { printClass: U, printClassMethod: Z, printClassProperty: se } = nr(), { printProperty: fe } = rr(), { printFunction: ge, printArrowFunction: he, printMethod: we, printReturnStatement: ke, printThrowStatement: Re } = qr(), { printCallExpression: Ne } = xo(), { printVariableDeclarator: Pe, printAssignmentExpression: oe } = tr(), { printBinaryishExpression: H } = ru(), { printSwitchCaseConsequent: pe } = No(), { printMemberExpression: X } = So(), { printBlock: le, printBlockBody: Ae } = wo(), { printComment: Ee } = hd(), { printLiteral: De } = vd(), { printDecorators: A } = nu(); + function G(Ce, Be, ve, ze) { + let be = re(Ce, Be, ve, ze); + if (!be) + return ""; + let Ye = Ce.getValue(), { type: Se } = Ye; + if (Se === "ClassMethod" || Se === "ClassPrivateMethod" || Se === "ClassProperty" || Se === "ClassAccessorProperty" || Se === "AccessorProperty" || Se === "TSAbstractAccessorProperty" || Se === "PropertyDefinition" || Se === "TSAbstractPropertyDefinition" || Se === "ClassPrivateProperty" || Se === "MethodDefinition" || Se === "TSAbstractMethodDefinition" || Se === "TSDeclareMethod") + return be; + let Ie = [be], Oe = A(Ce, Be, ve), Je = Ye.type === "ClassExpression" && Oe; + if (Oe && (Ie = [...Oe, be], !Je)) + return l(Ie); + if (!F(Ce, Be)) + return ze && ze.needsSemi && Ie.unshift(";"), Ie.length === 1 && Ie[0] === be ? be : Ie; + if (Je && (Ie = [p2([n, ...Ie])]), Ie.unshift("("), ze && ze.needsSemi && Ie.unshift(";"), w(Ye)) { + let [je] = Ye.trailingComments; + Ie.push(" /*", je.value.trimStart(), "*/"), je.printed = true; + } + return Je && Ie.push(n), Ie.push(")"), Ie; + } + function re(Ce, Be, ve, ze) { + let be = Ce.getValue(), Ye = Be.semi ? ";" : ""; + if (!be) + return ""; + if (typeof be == "string") + return be; + for (let Ie of [De, S, B, k, R, q]) { + let Oe = Ie(Ce, Be, ve); + if (typeof Oe < "u") + return Oe; + } + let Se = []; + switch (be.type) { + case "JsExpressionRoot": + return ve("node"); + case "JsonRoot": + return [ve("node"), u]; + case "File": + return be.program && be.program.interpreter && Se.push(ve(["program", "interpreter"])), Se.push(ve("program")), Se; + case "Program": + return Ae(Ce, Be, ve); + case "EmptyStatement": + return ""; + case "ExpressionStatement": { + if (Be.parser === "__vue_event_binding" || Be.parser === "__vue_ts_event_binding") { + let Oe = Ce.getParentNode(); + if (Oe.type === "Program" && Oe.body.length === 1 && Oe.body[0] === be) + return [ve("expression"), b(be.expression) ? ";" : ""]; + } + let Ie = t2(Ce, Be, true, (Oe) => { + let { marker: Je } = Oe; + return Je === C; + }); + return [ve("expression"), x(Be, Ce) ? "" : Ye, Ie ? [" ", Ie] : ""]; + } + case "ParenthesizedExpression": + return !E(be.expression) && (be.expression.type === "ObjectExpression" || be.expression.type === "ArrayExpression") ? ["(", ve("expression"), ")"] : l(["(", p2([i, ve("expression")]), i, ")"]); + case "AssignmentExpression": + return oe(Ce, Be, ve); + case "VariableDeclarator": + return Pe(Ce, Be, ve); + case "BinaryExpression": + case "LogicalExpression": + return H(Ce, Be, ve); + case "AssignmentPattern": + return [ve("left"), " = ", ve("right")]; + case "OptionalMemberExpression": + case "MemberExpression": + return X(Ce, Be, ve); + case "MetaProperty": + return [ve("meta"), ".", ve("property")]; + case "BindExpression": + return be.object && Se.push(ve("object")), Se.push(l(p2([i, L(Ce, Be, ve)]))), Se; + case "Identifier": + return [be.name, J(Ce), Y(Ce), Q(Ce, Be, ve)]; + case "V8IntrinsicIdentifier": + return ["%", be.name]; + case "SpreadElement": + case "SpreadElementPattern": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + return j(Ce, Be, ve); + case "FunctionDeclaration": + case "FunctionExpression": + return ge(Ce, ve, Be, ze); + case "ArrowFunctionExpression": + return he(Ce, Be, ve, ze); + case "YieldExpression": + return Se.push("yield"), be.delegate && Se.push("*"), be.argument && Se.push(" ", ve("argument")), Se; + case "AwaitExpression": { + if (Se.push("await"), be.argument) { + Se.push(" ", ve("argument")); + let Ie = Ce.getParentNode(); + if (T(Ie) && Ie.callee === be || m(Ie) && Ie.object === be) { + Se = [p2([i, ...Se]), i]; + let Oe = Ce.findAncestor((Je) => Je.type === "AwaitExpression" || Je.type === "BlockStatement"); + if (!Oe || Oe.type !== "AwaitExpression") + return l(Se); + } + } + return Se; + } + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + return ce(Ce, Be, ve); + case "ExportAllDeclaration": + return W(Ce, Be, ve); + case "ImportDeclaration": + return ee(Ce, Be, ve); + case "ImportSpecifier": + case "ExportSpecifier": + case "ImportNamespaceSpecifier": + case "ExportNamespaceSpecifier": + case "ImportDefaultSpecifier": + case "ExportDefaultSpecifier": + return K(Ce, Be, ve); + case "ImportAttribute": + return [ve("key"), ": ", ve("value")]; + case "Import": + return "import"; + case "BlockStatement": + case "StaticBlock": + case "ClassBody": + return le(Ce, Be, ve); + case "ThrowStatement": + return Re(Ce, Be, ve); + case "ReturnStatement": + return ke(Ce, Be, ve); + case "NewExpression": + case "ImportExpression": + case "OptionalCallExpression": + case "CallExpression": + return Ne(Ce, Be, ve); + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + return z(Ce, Be, ve); + case "ObjectProperty": + case "Property": + return be.method || be.kind === "get" || be.kind === "set" ? we(Ce, Be, ve) : fe(Ce, Be, ve); + case "ObjectMethod": + return we(Ce, Be, ve); + case "Decorator": + return ["@", ve("expression")]; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + return Fe(Ce, Be, ve); + case "SequenceExpression": { + let Ie = Ce.getParentNode(0); + if (Ie.type === "ExpressionStatement" || Ie.type === "ForStatement") { + let Oe = []; + return Ce.each((Je, Te) => { + Te === 0 ? Oe.push(ve()) : Oe.push(",", p2([n, ve()])); + }, "expressions"), l(Oe); + } + return l(a([",", n], Ce.map(ve, "expressions"))); + } + case "ThisExpression": + return "this"; + case "Super": + return "super"; + case "Directive": + return [ve("value"), Ye]; + case "DirectiveLiteral": + return ie(be.extra.raw, Be); + case "UnaryExpression": + return Se.push(be.operator), /[a-z]$/.test(be.operator) && Se.push(" "), E(be.argument) ? Se.push(l(["(", p2([i, ve("argument")]), i, ")"])) : Se.push(ve("argument")), Se; + case "UpdateExpression": + return Se.push(ve("argument"), be.operator), be.prefix && Se.reverse(), Se; + case "ConditionalExpression": + return de(Ce, Be, ve); + case "VariableDeclaration": { + let Ie = Ce.map(ve, "declarations"), Oe = Ce.getParentNode(), Je = Oe.type === "ForStatement" || Oe.type === "ForInStatement" || Oe.type === "ForOfStatement", Te = be.declarations.some((Me) => Me.init), je; + return Ie.length === 1 && !E(be.declarations[0]) ? je = Ie[0] : Ie.length > 0 && (je = p2(Ie[0])), Se = [be.declare ? "declare " : "", be.kind, je ? [" ", je] : "", p2(Ie.slice(1).map((Me) => [",", Te && !Je ? u : n, Me]))], Je && Oe.body !== be || Se.push(Ye), l(Se); + } + case "WithStatement": + return l(["with (", ve("object"), ")", V(be.body, ve("body"))]); + case "IfStatement": { + let Ie = V(be.consequent, ve("consequent")), Oe = l(["if (", l([p2([i, ve("test")]), i]), ")", Ie]); + if (Se.push(Oe), be.alternate) { + let Je = E(be.consequent, N.Trailing | N.Line) || $(be), Te = be.consequent.type === "BlockStatement" && !Je; + Se.push(Te ? " " : u), E(be, N.Dangling) && Se.push(t2(Ce, Be, true), Je ? u : " "), Se.push("else", l(V(be.alternate, ve("alternate"), be.alternate.type === "IfStatement"))); + } + return Se; + } + case "ForStatement": { + let Ie = V(be.body, ve("body")), Oe = t2(Ce, Be, true), Je = Oe ? [Oe, i] : ""; + return !be.init && !be.test && !be.update ? [Je, l(["for (;;)", Ie])] : [Je, l(["for (", l([p2([i, ve("init"), ";", n, ve("test"), ";", n, ve("update")]), i]), ")", Ie])]; + } + case "WhileStatement": + return l(["while (", l([p2([i, ve("test")]), i]), ")", V(be.body, ve("body"))]); + case "ForInStatement": + return l(["for (", ve("left"), " in ", ve("right"), ")", V(be.body, ve("body"))]); + case "ForOfStatement": + return l(["for", be.await ? " await" : "", " (", ve("left"), " of ", ve("right"), ")", V(be.body, ve("body"))]); + case "DoWhileStatement": { + let Ie = V(be.body, ve("body")); + return Se = [l(["do", Ie])], be.body.type === "BlockStatement" ? Se.push(" ") : Se.push(u), Se.push("while (", l([p2([i, ve("test")]), i]), ")", Ye), Se; + } + case "DoExpression": + return [be.async ? "async " : "", "do ", ve("body")]; + case "BreakStatement": + return Se.push("break"), be.label && Se.push(" ", ve("label")), Se.push(Ye), Se; + case "ContinueStatement": + return Se.push("continue"), be.label && Se.push(" ", ve("label")), Se.push(Ye), Se; + case "LabeledStatement": + return be.body.type === "EmptyStatement" ? [ve("label"), ":;"] : [ve("label"), ": ", ve("body")]; + case "TryStatement": + return ["try ", ve("block"), be.handler ? [" ", ve("handler")] : "", be.finalizer ? [" finally ", ve("finalizer")] : ""]; + case "CatchClause": + if (be.param) { + let Ie = E(be.param, (Je) => !v(Je) || Je.leading && s(Be.originalText, d(Je)) || Je.trailing && s(Be.originalText, o(Je), { backwards: true })), Oe = ve("param"); + return ["catch ", Ie ? ["(", p2([i, Oe]), i, ") "] : ["(", Oe, ") "], ve("body")]; + } + return ["catch ", ve("body")]; + case "SwitchStatement": + return [l(["switch (", p2([i, ve("discriminant")]), i, ")"]), " {", be.cases.length > 0 ? p2([u, a(u, Ce.map((Ie, Oe, Je) => { + let Te = Ie.getValue(); + return [ve(), Oe !== Je.length - 1 && P(Te, Be) ? u : ""]; + }, "cases"))]) : "", u, "}"]; + case "SwitchCase": { + be.test ? Se.push("case ", ve("test"), ":") : Se.push("default:"), E(be, N.Dangling) && Se.push(" ", t2(Ce, Be, true)); + let Ie = be.consequent.filter((Oe) => Oe.type !== "EmptyStatement"); + if (Ie.length > 0) { + let Oe = pe(Ce, Be, ve); + Se.push(Ie.length === 1 && Ie[0].type === "BlockStatement" ? [" ", Oe] : p2([u, Oe])); + } + return Se; + } + case "DebuggerStatement": + return ["debugger", Ye]; + case "ClassDeclaration": + case "ClassExpression": + return U(Ce, Be, ve); + case "ClassMethod": + case "ClassPrivateMethod": + case "MethodDefinition": + return Z(Ce, Be, ve); + case "ClassProperty": + case "PropertyDefinition": + case "ClassPrivateProperty": + case "ClassAccessorProperty": + case "AccessorProperty": + return se(Ce, Be, ve); + case "TemplateElement": + return y(be.value.raw); + case "TemplateLiteral": + return ue(Ce, ve, Be); + case "TaggedTemplateExpression": + return [ve("tag"), ve("typeParameters"), ve("quasi")]; + case "PrivateIdentifier": + return ["#", ve("name")]; + case "PrivateName": + return ["#", ve("id")]; + case "InterpreterDirective": + return Se.push("#!", be.value, u), P(be, Be) && Se.push(u), Se; + case "TopicReference": + return "%"; + case "ArgumentPlaceholder": + return "?"; + case "ModuleExpression": { + Se.push("module {"); + let Ie = ve("body"); + return Ie && Se.push(p2([u, Ie]), u), Se.push("}"), Se; + } + default: + throw new Error("unknown type: " + JSON.stringify(be.type)); + } + } + function ye(Ce) { + return Ce.type && !v(Ce) && !I(Ce) && Ce.type !== "EmptyStatement" && Ce.type !== "TemplateElement" && Ce.type !== "Import" && Ce.type !== "TSEmptyBodyFunctionExpression"; + } + r.exports = { preprocess: _, print: G, embed: h, insertPragma: c, massageAstNode: g, hasPrettierIgnore(Ce) { + return D(Ce) || M(Ce); + }, willPrintOwnComments: f.willPrintOwnComments, canAttachComment: ye, printComment: Ee, isBlockComment: v, handleComments: { avoidAstMutation: true, ownLine: f.handleOwnLineComment, endOfLine: f.handleEndOfLineComment, remaining: f.handleRemainingComment }, getCommentChildNodes: f.getCommentChildNodes }; + } }), Ed = te({ "src/language-js/printer-estree-json.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2, indent: s, join: a } } = qe(), n = Fo(); + function u(y, h, g) { + let c = y.getValue(); + switch (c.type) { + case "JsonRoot": + return [g("node"), t2]; + case "ArrayExpression": { + if (c.elements.length === 0) + return "[]"; + let f = y.map(() => y.getValue() === null ? "null" : g(), "elements"); + return ["[", s([t2, a([",", t2], f)]), t2, "]"]; + } + case "ObjectExpression": + return c.properties.length === 0 ? "{}" : ["{", s([t2, a([",", t2], y.map(g, "properties"))]), t2, "}"]; + case "ObjectProperty": + return [g("key"), ": ", g("value")]; + case "UnaryExpression": + return [c.operator === "+" ? "" : c.operator, g("argument")]; + case "NullLiteral": + return "null"; + case "BooleanLiteral": + return c.value ? "true" : "false"; + case "StringLiteral": + return JSON.stringify(c.value); + case "NumericLiteral": + return i(y) ? JSON.stringify(String(c.value)) : JSON.stringify(c.value); + case "Identifier": + return i(y) ? JSON.stringify(c.name) : c.name; + case "TemplateLiteral": + return g(["quasis", 0]); + case "TemplateElement": + return JSON.stringify(c.value.cooked); + default: + throw new Error("unknown type: " + JSON.stringify(c.type)); + } + } + function i(y) { + return y.getName() === "key" && y.getParentNode().type === "ObjectProperty"; + } + var l = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]); + function p2(y, h) { + let { type: g } = y; + if (g === "ObjectProperty") { + let { key: c } = y; + c.type === "Identifier" ? h.key = { type: "StringLiteral", value: c.name } : c.type === "NumericLiteral" && (h.key = { type: "StringLiteral", value: String(c.value) }); + return; + } + if (g === "UnaryExpression" && y.operator === "+") + return h.argument; + if (g === "ArrayExpression") { + for (let [c, f] of y.elements.entries()) + f === null && h.elements.splice(c, 0, { type: "NullLiteral" }); + return; + } + if (g === "TemplateLiteral") + return { type: "StringLiteral", value: y.quasis[0].value.cooked }; + } + p2.ignoredProperties = l, r.exports = { preprocess: n, print: u, massageAstNode: p2 }; + } }), Mt = te({ "src/common/common-options.js"(e, r) { + "use strict"; + ne(); + var t2 = "Common"; + r.exports = { bracketSpacing: { since: "0.0.0", category: t2, type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, singleQuote: { since: "0.0.0", category: t2, type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { since: "1.8.2", category: t2, type: "choice", default: [{ since: "1.8.2", value: true }, { since: "1.9.0", value: "preserve" }], description: "How to wrap prose.", choices: [{ since: "1.9.0", value: "always", description: "Wrap prose if it exceeds the print width." }, { since: "1.9.0", value: "never", description: "Do not wrap prose." }, { since: "1.9.0", value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { since: "2.4.0", category: t2, type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { since: "2.6.0", category: t2, type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } }; + } }), Fd = te({ "src/language-js/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(), s = "JavaScript"; + r.exports = { arrowParens: { since: "1.9.0", category: s, type: "choice", default: [{ since: "1.9.0", value: "avoid" }, { since: "2.0.0", value: "always" }], description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: t2.bracketSameLine, bracketSpacing: t2.bracketSpacing, jsxBracketSameLine: { since: "0.17.0", category: s, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { since: "1.0.0", category: s, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, singleQuote: t2.singleQuote, jsxSingleQuote: { since: "1.15.0", category: s, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { since: "1.17.0", category: s, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { since: "0.0.0", category: s, type: "choice", default: [{ since: "0.0.0", value: false }, { since: "0.19.0", value: "none" }, { since: "2.0.0", value: "es5" }], description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }, { value: "all", description: "Trailing commas wherever possible (including function arguments)." }] }, singleAttributePerLine: t2.singleAttributePerLine }; + } }), Ad = te({ "src/language-js/parse/parsers.js"() { + ne(); + } }), Ln = te({ "node_modules/linguist-languages/data/JavaScript.json"(e, r) { + r.exports = { name: "JavaScript", type: "programming", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: ["js", "node"], extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".jsx", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"], filenames: ["Jakefile"], interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], languageId: 183 }; + } }), Sd = te({ "node_modules/linguist-languages/data/TypeScript.json"(e, r) { + r.exports = { name: "TypeScript", type: "programming", color: "#3178c6", aliases: ["ts"], interpreters: ["deno", "ts-node"], extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aceMode: "typescript", codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", languageId: 378 }; + } }), xd = te({ "node_modules/linguist-languages/data/TSX.json"(e, r) { + r.exports = { name: "TSX", type: "programming", color: "#3178c6", group: "TypeScript", extensions: [".tsx"], tmScope: "source.tsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", languageId: 94901924 }; + } }), wa = te({ "node_modules/linguist-languages/data/JSON.json"(e, r) { + r.exports = { name: "JSON", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".jsonl", ".mcmeta", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], filenames: [".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", "Pipfile.lock", "composer.lock", "mcmod.info"], languageId: 174 }; + } }), bd = te({ "node_modules/linguist-languages/data/JSON with Comments.json"(e, r) { + r.exports = { name: "JSON with Comments", type: "data", color: "#292929", group: "JSON", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", aliases: ["jsonc"], extensions: [".jsonc", ".code-snippets", ".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"], filenames: [".babelrc", ".devcontainer.json", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "api-extractor.json", "devcontainer.json", "jsconfig.json", "language-configuration.json", "tsconfig.json", "tslint.json"], languageId: 423 }; + } }), Td = te({ "node_modules/linguist-languages/data/JSON5.json"(e, r) { + r.exports = { name: "JSON5", type: "data", color: "#267CB9", extensions: [".json5"], tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "application/json", languageId: 175 }; + } }), Bd = te({ "src/language-js/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Cd(), a = Ed(), n = Fd(), u = Ad(), i = [t2(Ln(), (p2) => ({ since: "0.0.0", parsers: ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], vscodeLanguageIds: ["javascript", "mongo"], interpreters: [...p2.interpreters, "zx"], extensions: [...p2.extensions.filter((y) => y !== ".jsx"), ".wxs"] })), t2(Ln(), () => ({ name: "Flow", since: "0.0.0", parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"], aliases: [], filenames: [], extensions: [".js.flow"] })), t2(Ln(), () => ({ name: "JSX", since: "0.0.0", parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], aliases: void 0, filenames: void 0, extensions: [".jsx"], group: "JavaScript", interpreters: void 0, tmScope: "source.js.jsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", color: void 0 })), t2(Sd(), () => ({ since: "1.4.0", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"] })), t2(xd(), () => ({ since: "1.4.0", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"] })), t2(wa(), () => ({ name: "JSON.stringify", since: "1.13.0", parsers: ["json-stringify"], vscodeLanguageIds: ["json"], extensions: [".importmap"], filenames: ["package.json", "package-lock.json", "composer.json"] })), t2(wa(), (p2) => ({ since: "1.5.0", parsers: ["json"], vscodeLanguageIds: ["json"], extensions: p2.extensions.filter((y) => y !== ".jsonl") })), t2(bd(), (p2) => ({ since: "1.5.0", parsers: ["json"], vscodeLanguageIds: ["jsonc"], filenames: [...p2.filenames, ".eslintrc", ".swcrc"] })), t2(Td(), () => ({ since: "1.13.0", parsers: ["json5"], vscodeLanguageIds: ["json5"] }))], l = { estree: s, "estree-json": a }; + r.exports = { languages: i, options: n, printers: l, parsers: u }; + } }), Nd = te({ "src/language-css/clean.js"(e, r) { + "use strict"; + ne(); + var { isFrontMatterNode: t2 } = Ue(), s = lt(), a = /* @__PURE__ */ new Set(["raw", "raws", "sourceIndex", "source", "before", "after", "trailingComma"]); + function n(i, l, p2) { + if (t2(i) && i.lang === "yaml" && delete l.value, i.type === "css-comment" && p2.type === "css-root" && p2.nodes.length > 0 && ((p2.nodes[0] === i || t2(p2.nodes[0]) && p2.nodes[1] === i) && (delete l.text, /^\*\s*@(?:format|prettier)\s*$/.test(i.text)) || p2.type === "css-root" && s(p2.nodes) === i)) + return null; + if (i.type === "value-root" && delete l.text, (i.type === "media-query" || i.type === "media-query-list" || i.type === "media-feature-expression") && delete l.value, i.type === "css-rule" && delete l.params, i.type === "selector-combinator" && (l.value = l.value.replace(/\s+/g, " ")), i.type === "media-feature" && (l.value = l.value.replace(/ /g, "")), (i.type === "value-word" && (i.isColor && i.isHex || ["initial", "inherit", "unset", "revert"].includes(l.value.replace().toLowerCase())) || i.type === "media-feature" || i.type === "selector-root-invalid" || i.type === "selector-pseudo") && (l.value = l.value.toLowerCase()), i.type === "css-decl" && (l.prop = l.prop.toLowerCase()), (i.type === "css-atrule" || i.type === "css-import") && (l.name = l.name.toLowerCase()), i.type === "value-number" && (l.unit = l.unit.toLowerCase()), (i.type === "media-feature" || i.type === "media-keyword" || i.type === "media-type" || i.type === "media-unknown" || i.type === "media-url" || i.type === "media-value" || i.type === "selector-attribute" || i.type === "selector-string" || i.type === "selector-class" || i.type === "selector-combinator" || i.type === "value-string") && l.value && (l.value = u(l.value)), i.type === "selector-attribute" && (l.attribute = l.attribute.trim(), l.namespace && typeof l.namespace == "string" && (l.namespace = l.namespace.trim(), l.namespace.length === 0 && (l.namespace = true)), l.value && (l.value = l.value.trim().replace(/^["']|["']$/g, ""), delete l.quoted)), (i.type === "media-value" || i.type === "media-type" || i.type === "value-number" || i.type === "selector-root-invalid" || i.type === "selector-class" || i.type === "selector-combinator" || i.type === "selector-tag") && l.value && (l.value = l.value.replace(/([\d+.Ee-]+)([A-Za-z]*)/g, (y, h, g) => { + let c = Number(h); + return Number.isNaN(c) ? y : c + g.toLowerCase(); + })), i.type === "selector-tag") { + let y = i.value.toLowerCase(); + ["from", "to"].includes(y) && (l.value = y); + } + if (i.type === "css-atrule" && i.name.toLowerCase() === "supports" && delete l.value, i.type === "selector-unknown" && delete l.value, i.type === "value-comma_group") { + let y = i.groups.findIndex((h) => h.type === "value-number" && h.unit === "..."); + y !== -1 && (l.groups[y].unit = "", l.groups.splice(y + 1, 0, { type: "value-word", value: "...", isColor: false, isHex: false })); + } + if (i.type === "value-comma_group" && i.groups.some((y) => y.type === "value-atword" && y.value.endsWith("[") || y.type === "value-word" && y.value.startsWith("]"))) + return { type: "value-atword", value: i.groups.map((y) => y.value).join(""), group: { open: null, close: null, groups: [], type: "value-paren_group" } }; + } + n.ignoredProperties = a; + function u(i) { + return i.replace(/'/g, '"').replace(/\\([^\dA-Fa-f])/g, "$1"); + } + r.exports = n; + } }), su = te({ "src/utils/front-matter/print.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2, markAsRoot: s } } = qe(); + function a(n, u) { + if (n.lang === "yaml") { + let i = n.value.trim(), l = i ? u(i, { parser: "yaml" }, { stripTrailingHardline: true }) : ""; + return s([n.startDelimiter, t2, l, l ? t2 : "", n.endDelimiter]); + } + } + r.exports = a; + } }), wd = te({ "src/language-css/embed.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2 } } = qe(), s = su(); + function a(n, u, i) { + let l = n.getValue(); + if (l.type === "front-matter") { + let p2 = s(l, i); + return p2 ? [p2, t2] : ""; + } + } + r.exports = a; + } }), _o = te({ "src/utils/front-matter/parse.js"(e, r) { + "use strict"; + ne(); + var t2 = new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)", "s"); + function s(a) { + let n = a.match(t2); + if (!n) + return { content: a }; + let { startDelimiter: u, language: i, value: l = "", endDelimiter: p2 } = n.groups, y = i.trim() || "yaml"; + if (u === "+++" && (y = "toml"), y !== "yaml" && u !== p2) + return { content: a }; + let [h] = n; + return { frontMatter: { type: "front-matter", lang: y, value: l, startDelimiter: u, endDelimiter: p2, raw: h.replace(/\n$/, "") }, content: h.replace(/[^\n]/g, " ") + a.slice(h.length) }; + } + r.exports = s; + } }), _d = te({ "src/language-css/pragma.js"(e, r) { + "use strict"; + ne(); + var t2 = Co(), s = _o(); + function a(u) { + return t2.hasPragma(s(u).content); + } + function n(u) { + let { frontMatter: i, content: l } = s(u); + return (i ? i.raw + ` + +` : "") + t2.insertPragma(l); + } + r.exports = { hasPragma: a, insertPragma: n }; + } }), Pd = te({ "src/language-css/utils/index.js"(e, r) { + "use strict"; + ne(); + var t2 = /* @__PURE__ */ new Set(["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]); + function s(z, U) { + let Z = Array.isArray(U) ? U : [U], se = -1, fe; + for (; fe = z.getParentNode(++se); ) + if (Z.includes(fe.type)) + return se; + return -1; + } + function a(z, U) { + let Z = s(z, U); + return Z === -1 ? null : z.getParentNode(Z); + } + function n(z) { + var U; + let Z = a(z, "css-decl"); + return Z == null || (U = Z.prop) === null || U === void 0 ? void 0 : U.toLowerCase(); + } + var u = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert"]); + function i(z) { + return u.has(z.toLowerCase()); + } + function l(z, U) { + let Z = a(z, "css-atrule"); + return (Z == null ? void 0 : Z.name) && Z.name.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(U.toLowerCase()); + } + function p2(z) { + return z.includes("$") || z.includes("@") || z.includes("#") || z.startsWith("%") || z.startsWith("--") || z.startsWith(":--") || z.includes("(") && z.includes(")") ? z : z.toLowerCase(); + } + function y(z, U) { + var Z; + let se = a(z, "value-func"); + return (se == null || (Z = se.value) === null || Z === void 0 ? void 0 : Z.toLowerCase()) === U; + } + function h(z) { + var U; + let Z = a(z, "css-rule"), se = Z == null || (U = Z.raws) === null || U === void 0 ? void 0 : U.selector; + return se && (se.startsWith(":import") || se.startsWith(":export")); + } + function g(z, U) { + let Z = Array.isArray(U) ? U : [U], se = a(z, "css-atrule"); + return se && Z.includes(se.name.toLowerCase()); + } + function c(z) { + let U = z.getValue(), Z = a(z, "css-atrule"); + return (Z == null ? void 0 : Z.name) === "import" && U.groups[0].value === "url" && U.groups.length === 2; + } + function f(z) { + return z.type === "value-func" && z.value.toLowerCase() === "url"; + } + function F(z, U) { + var Z; + let se = (Z = z.getParentNode()) === null || Z === void 0 ? void 0 : Z.nodes; + return se && se.indexOf(U) === se.length - 1; + } + function _(z) { + let { selector: U } = z; + return U ? typeof U == "string" && /^@.+:.*$/.test(U) || U.value && /^@.+:.*$/.test(U.value) : false; + } + function w(z) { + return z.type === "value-word" && ["from", "through", "end"].includes(z.value); + } + function E(z) { + return z.type === "value-word" && ["and", "or", "not"].includes(z.value); + } + function N(z) { + return z.type === "value-word" && z.value === "in"; + } + function x(z) { + return z.type === "value-operator" && z.value === "*"; + } + function I(z) { + return z.type === "value-operator" && z.value === "/"; + } + function P(z) { + return z.type === "value-operator" && z.value === "+"; + } + function $(z) { + return z.type === "value-operator" && z.value === "-"; + } + function D(z) { + return z.type === "value-operator" && z.value === "%"; + } + function T(z) { + return x(z) || I(z) || P(z) || $(z) || D(z); + } + function m(z) { + return z.type === "value-word" && ["==", "!="].includes(z.value); + } + function C(z) { + return z.type === "value-word" && ["<", ">", "<=", ">="].includes(z.value); + } + function o(z) { + return z.type === "css-atrule" && ["if", "else", "for", "each", "while"].includes(z.name); + } + function d(z) { + var U; + return ((U = z.raws) === null || U === void 0 ? void 0 : U.params) && /^\(\s*\)$/.test(z.raws.params); + } + function v(z) { + return z.name.startsWith("prettier-placeholder"); + } + function S(z) { + return z.prop.startsWith("@prettier-placeholder"); + } + function b(z, U) { + return z.value === "$$" && z.type === "value-func" && (U == null ? void 0 : U.type) === "value-word" && !U.raws.before; + } + function B(z) { + var U, Z; + return ((U = z.value) === null || U === void 0 ? void 0 : U.type) === "value-root" && ((Z = z.value.group) === null || Z === void 0 ? void 0 : Z.type) === "value-value" && z.prop.toLowerCase() === "composes"; + } + function k(z) { + var U, Z, se; + return ((U = z.value) === null || U === void 0 || (Z = U.group) === null || Z === void 0 || (se = Z.group) === null || se === void 0 ? void 0 : se.type) === "value-paren_group" && z.value.group.group.open !== null && z.value.group.group.close !== null; + } + function M(z) { + var U; + return ((U = z.raws) === null || U === void 0 ? void 0 : U.before) === ""; + } + function R(z) { + var U, Z; + return z.type === "value-comma_group" && ((U = z.groups) === null || U === void 0 || (Z = U[1]) === null || Z === void 0 ? void 0 : Z.type) === "value-colon"; + } + function q(z) { + var U; + return z.type === "value-paren_group" && ((U = z.groups) === null || U === void 0 ? void 0 : U[0]) && R(z.groups[0]); + } + function J(z) { + var U; + let Z = z.getValue(); + if (Z.groups.length === 0) + return false; + let se = z.getParentNode(1); + if (!q(Z) && !(se && q(se))) + return false; + let fe = a(z, "css-decl"); + return !!(fe != null && (U = fe.prop) !== null && U !== void 0 && U.startsWith("$") || q(se) || se.type === "value-func"); + } + function L(z) { + return z.type === "value-comment" && z.inline; + } + function Q(z) { + return z.type === "value-word" && z.value === "#"; + } + function V(z) { + return z.type === "value-word" && z.value === "{"; + } + function j(z) { + return z.type === "value-word" && z.value === "}"; + } + function Y(z) { + return ["value-word", "value-atword"].includes(z.type); + } + function ie(z) { + return (z == null ? void 0 : z.type) === "value-colon"; + } + function ee(z, U) { + if (!R(U)) + return false; + let { groups: Z } = U, se = Z.indexOf(z); + return se === -1 ? false : ie(Z[se + 1]); + } + function ce(z) { + return z.value && ["not", "and", "or"].includes(z.value.toLowerCase()); + } + function W(z) { + return z.type !== "value-func" ? false : t2.has(z.value.toLowerCase()); + } + function K(z) { + return /\/\//.test(z.split(/[\n\r]/).pop()); + } + function de(z) { + return (z == null ? void 0 : z.type) === "value-atword" && z.value.startsWith("prettier-placeholder-"); + } + function ue(z, U) { + var Z, se; + if (((Z = z.open) === null || Z === void 0 ? void 0 : Z.value) !== "(" || ((se = z.close) === null || se === void 0 ? void 0 : se.value) !== ")" || z.groups.some((fe) => fe.type !== "value-comma_group")) + return false; + if (U.type === "value-comma_group") { + let fe = U.groups.indexOf(z) - 1, ge = U.groups[fe]; + if ((ge == null ? void 0 : ge.type) === "value-word" && ge.value === "with") + return true; + } + return false; + } + function Fe(z) { + var U, Z; + return z.type === "value-paren_group" && ((U = z.open) === null || U === void 0 ? void 0 : U.value) === "(" && ((Z = z.close) === null || Z === void 0 ? void 0 : Z.value) === ")"; + } + r.exports = { getAncestorCounter: s, getAncestorNode: a, getPropOfDeclNode: n, maybeToLowerCase: p2, insideValueFunctionNode: y, insideICSSRuleNode: h, insideAtRuleNode: g, insideURLFunctionInImportAtRuleNode: c, isKeyframeAtRuleKeywords: l, isWideKeywords: i, isLastNode: F, isSCSSControlDirectiveNode: o, isDetachedRulesetDeclarationNode: _, isRelationalOperatorNode: C, isEqualityOperatorNode: m, isMultiplicationNode: x, isDivisionNode: I, isAdditionNode: P, isSubtractionNode: $, isModuloNode: D, isMathOperatorNode: T, isEachKeywordNode: N, isForKeywordNode: w, isURLFunctionNode: f, isIfElseKeywordNode: E, hasComposesNode: B, hasParensAroundNode: k, hasEmptyRawBefore: M, isDetachedRulesetCallNode: d, isTemplatePlaceholderNode: v, isTemplatePropNode: S, isPostcssSimpleVarNode: b, isKeyValuePairNode: R, isKeyValuePairInParenGroupNode: q, isKeyInValuePairNode: ee, isSCSSMapItemNode: J, isInlineValueCommentNode: L, isHashNode: Q, isLeftCurlyBraceNode: V, isRightCurlyBraceNode: j, isWordNode: Y, isColonNode: ie, isMediaAndSupportsKeywords: ce, isColorAdjusterFuncNode: W, lastLineHasInlineComment: K, isAtWordPlaceholderNode: de, isConfigurationNode: ue, isParenGroupNode: Fe }; + } }), Id = te({ "src/utils/line-column-to-index.js"(e, r) { + "use strict"; + ne(), r.exports = function(t2, s) { + let a = 0; + for (let n = 0; n < t2.line - 1; ++n) + a = s.indexOf(` +`, a) + 1; + return a + t2.column; + }; + } }), kd = te({ "src/language-css/loc.js"(e, r) { + "use strict"; + ne(); + var { skipEverythingButNewLine: t2 } = Pr(), s = lt(), a = Id(); + function n(c, f) { + return typeof c.sourceIndex == "number" ? c.sourceIndex : c.source ? a(c.source.start, f) - 1 : null; + } + function u(c, f) { + if (c.type === "css-comment" && c.inline) + return t2(f, c.source.startOffset); + let F = c.nodes && s(c.nodes); + return F && c.source && !c.source.end && (c = F), c.source && c.source.end ? a(c.source.end, f) : null; + } + function i(c, f) { + c.source && (c.source.startOffset = n(c, f), c.source.endOffset = u(c, f)); + for (let F in c) { + let _ = c[F]; + F === "source" || !_ || typeof _ != "object" || (_.type === "value-root" || _.type === "value-unknown" ? l(_, p2(c), _.text || _.value) : i(_, f)); + } + } + function l(c, f, F) { + c.source && (c.source.startOffset = n(c, F) + f, c.source.endOffset = u(c, F) + f); + for (let _ in c) { + let w = c[_]; + _ === "source" || !w || typeof w != "object" || l(w, f, F); + } + } + function p2(c) { + let f = c.source.startOffset; + return typeof c.prop == "string" && (f += c.prop.length), c.type === "css-atrule" && typeof c.name == "string" && (f += 1 + c.name.length + c.raws.afterName.match(/^\s*:?\s*/)[0].length), c.type !== "css-atrule" && c.raws && typeof c.raws.between == "string" && (f += c.raws.between.length), f; + } + function y(c) { + let f = "initial", F = "initial", _, w = false, E = []; + for (let N = 0; N < c.length; N++) { + let x = c[N]; + switch (f) { + case "initial": + if (x === "'") { + f = "single-quotes"; + continue; + } + if (x === '"') { + f = "double-quotes"; + continue; + } + if ((x === "u" || x === "U") && c.slice(N, N + 4).toLowerCase() === "url(") { + f = "url", N += 3; + continue; + } + if (x === "*" && c[N - 1] === "/") { + f = "comment-block"; + continue; + } + if (x === "/" && c[N - 1] === "/") { + f = "comment-inline", _ = N - 1; + continue; + } + continue; + case "single-quotes": + if (x === "'" && c[N - 1] !== "\\" && (f = F, F = "initial"), x === ` +` || x === "\r") + return c; + continue; + case "double-quotes": + if (x === '"' && c[N - 1] !== "\\" && (f = F, F = "initial"), x === ` +` || x === "\r") + return c; + continue; + case "url": + if (x === ")" && (f = "initial"), x === ` +` || x === "\r") + return c; + if (x === "'") { + f = "single-quotes", F = "url"; + continue; + } + if (x === '"') { + f = "double-quotes", F = "url"; + continue; + } + continue; + case "comment-block": + x === "/" && c[N - 1] === "*" && (f = "initial"); + continue; + case "comment-inline": + (x === '"' || x === "'" || x === "*") && (w = true), (x === ` +` || x === "\r") && (w && E.push([_, N]), f = "initial", w = false); + continue; + } + } + for (let [N, x] of E) + c = c.slice(0, N) + c.slice(N, x).replace(/["'*]/g, " ") + c.slice(x); + return c; + } + function h(c) { + return c.source.startOffset; + } + function g(c) { + return c.source.endOffset; + } + r.exports = { locStart: h, locEnd: g, calculateLoc: i, replaceQuotesInInlineComments: y }; + } }), Ld = te({ "src/language-css/utils/is-less-parser.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return s.parser === "css" || s.parser === "less"; + } + r.exports = t2; + } }), Od = te({ "src/language-css/utils/is-scss.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + return s === "less" || s === "scss" ? s === "scss" : /(?:\w\s*:\s*[^:}]+|#){|@import[^\n]+(?:url|,)/.test(a); + } + r.exports = t2; + } }), jd = te({ "src/language-css/utils/css-units.evaluate.js"(e, r) { + r.exports = { em: "em", rem: "rem", ex: "ex", rex: "rex", cap: "cap", rcap: "rcap", ch: "ch", rch: "rch", ic: "ic", ric: "ric", lh: "lh", rlh: "rlh", vw: "vw", svw: "svw", lvw: "lvw", dvw: "dvw", vh: "vh", svh: "svh", lvh: "lvh", dvh: "dvh", vi: "vi", svi: "svi", lvi: "lvi", dvi: "dvi", vb: "vb", svb: "svb", lvb: "lvb", dvb: "dvb", vmin: "vmin", svmin: "svmin", lvmin: "lvmin", dvmin: "dvmin", vmax: "vmax", svmax: "svmax", lvmax: "lvmax", dvmax: "dvmax", cm: "cm", mm: "mm", q: "Q", in: "in", pt: "pt", pc: "pc", px: "px", deg: "deg", grad: "grad", rad: "rad", turn: "turn", s: "s", ms: "ms", hz: "Hz", khz: "kHz", dpi: "dpi", dpcm: "dpcm", dppx: "dppx", x: "x" }; + } }), qd = te({ "src/language-css/utils/print-unit.js"(e, r) { + "use strict"; + ne(); + var t2 = jd(); + function s(a) { + let n = a.toLowerCase(); + return Object.prototype.hasOwnProperty.call(t2, n) ? t2[n] : a; + } + r.exports = s; + } }), Md = te({ "src/language-css/printer-postcss.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { printNumber: s, printString: a, hasNewline: n, isFrontMatterNode: u, isNextLineEmpty: i, isNonEmptyArray: l } = Ue(), { builders: { join: p2, line: y, hardline: h, softline: g, group: c, fill: f, indent: F, dedent: _, ifBreak: w, breakParent: E }, utils: { removeLines: N, getDocParts: x } } = qe(), I = Nd(), P = wd(), { insertPragma: $ } = _d(), { getAncestorNode: D, getPropOfDeclNode: T, maybeToLowerCase: m, insideValueFunctionNode: C, insideICSSRuleNode: o, insideAtRuleNode: d, insideURLFunctionInImportAtRuleNode: v, isKeyframeAtRuleKeywords: S, isWideKeywords: b, isLastNode: B, isSCSSControlDirectiveNode: k, isDetachedRulesetDeclarationNode: M, isRelationalOperatorNode: R, isEqualityOperatorNode: q, isMultiplicationNode: J, isDivisionNode: L, isAdditionNode: Q, isSubtractionNode: V, isMathOperatorNode: j, isEachKeywordNode: Y, isForKeywordNode: ie, isURLFunctionNode: ee, isIfElseKeywordNode: ce, hasComposesNode: W, hasParensAroundNode: K, hasEmptyRawBefore: de, isKeyValuePairNode: ue, isKeyInValuePairNode: Fe, isDetachedRulesetCallNode: z, isTemplatePlaceholderNode: U, isTemplatePropNode: Z, isPostcssSimpleVarNode: se, isSCSSMapItemNode: fe, isInlineValueCommentNode: ge, isHashNode: he, isLeftCurlyBraceNode: we, isRightCurlyBraceNode: ke, isWordNode: Re, isColonNode: Ne, isMediaAndSupportsKeywords: Pe, isColorAdjusterFuncNode: oe, lastLineHasInlineComment: H, isAtWordPlaceholderNode: pe, isConfigurationNode: X, isParenGroupNode: le } = Pd(), { locStart: Ae, locEnd: Ee } = kd(), De = Ld(), A = Od(), G = qd(); + function re(Te) { + return Te.trailingComma === "es5" || Te.trailingComma === "all"; + } + function ye(Te, je, Me) { + let ae = Te.getValue(); + if (!ae) + return ""; + if (typeof ae == "string") + return ae; + switch (ae.type) { + case "front-matter": + return [ae.raw, h]; + case "css-root": { + let Ve = Ce(Te, je, Me), We = ae.raws.after.trim(); + return We.startsWith(";") && (We = We.slice(1).trim()), [Ve, We ? ` ${We}` : "", x(Ve).length > 0 ? h : ""]; + } + case "css-comment": { + let Ve = ae.inline || ae.raws.inline, We = je.originalText.slice(Ae(ae), Ee(ae)); + return Ve ? We.trimEnd() : We; + } + case "css-rule": + return [Me("selector"), ae.important ? " !important" : "", ae.nodes ? [ae.selector && ae.selector.type === "selector-unknown" && H(ae.selector.value) ? y : " ", "{", ae.nodes.length > 0 ? F([h, Ce(Te, je, Me)]) : "", h, "}", M(ae) ? ";" : ""] : ";"]; + case "css-decl": { + let Ve = Te.getParentNode(), { between: We } = ae.raws, Xe = We.trim(), st = Xe === ":", O = W(ae) ? N(Me("value")) : Me("value"); + return !st && H(Xe) && (O = F([h, _(O)])), [ae.raws.before.replace(/[\s;]/g, ""), Ve.type === "css-atrule" && Ve.variable || o(Te) ? ae.prop : m(ae.prop), Xe.startsWith("//") ? " " : "", Xe, ae.extend ? "" : " ", De(je) && ae.extend && ae.selector ? ["extend(", Me("selector"), ")"] : "", O, ae.raws.important ? ae.raws.important.replace(/\s*!\s*important/i, " !important") : ae.important ? " !important" : "", ae.raws.scssDefault ? ae.raws.scssDefault.replace(/\s*!default/i, " !default") : ae.scssDefault ? " !default" : "", ae.raws.scssGlobal ? ae.raws.scssGlobal.replace(/\s*!global/i, " !global") : ae.scssGlobal ? " !global" : "", ae.nodes ? [" {", F([g, Ce(Te, je, Me)]), g, "}"] : Z(ae) && !Ve.raws.semicolon && je.originalText[Ee(ae) - 1] !== ";" ? "" : je.__isHTMLStyleAttribute && B(Te, ae) ? w(";") : ";"]; + } + case "css-atrule": { + let Ve = Te.getParentNode(), We = U(ae) && !Ve.raws.semicolon && je.originalText[Ee(ae) - 1] !== ";"; + if (De(je)) { + if (ae.mixin) + return [Me("selector"), ae.important ? " !important" : "", We ? "" : ";"]; + if (ae.function) + return [ae.name, Me("params"), We ? "" : ";"]; + if (ae.variable) + return ["@", ae.name, ": ", ae.value ? Me("value") : "", ae.raws.between.trim() ? ae.raws.between.trim() + " " : "", ae.nodes ? ["{", F([ae.nodes.length > 0 ? g : "", Ce(Te, je, Me)]), g, "}"] : "", We ? "" : ";"]; + } + return ["@", z(ae) || ae.name.endsWith(":") ? ae.name : m(ae.name), ae.params ? [z(ae) ? "" : U(ae) ? ae.raws.afterName === "" ? "" : ae.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(ae.raws.afterName) ? [h, h] : /^\s*\n/.test(ae.raws.afterName) ? h : " " : " ", Me("params")] : "", ae.selector ? F([" ", Me("selector")]) : "", ae.value ? c([" ", Me("value"), k(ae) ? K(ae) ? " " : y : ""]) : ae.name === "else" ? " " : "", ae.nodes ? [k(ae) ? "" : ae.selector && !ae.selector.nodes && typeof ae.selector.value == "string" && H(ae.selector.value) || !ae.selector && typeof ae.params == "string" && H(ae.params) ? y : " ", "{", F([ae.nodes.length > 0 ? g : "", Ce(Te, je, Me)]), g, "}"] : We ? "" : ";"]; + } + case "media-query-list": { + let Ve = []; + return Te.each((We) => { + let Xe = We.getValue(); + Xe.type === "media-query" && Xe.value === "" || Ve.push(Me()); + }, "nodes"), c(F(p2(y, Ve))); + } + case "media-query": + return [p2(" ", Te.map(Me, "nodes")), B(Te, ae) ? "" : ","]; + case "media-type": + return Oe(Se(ae.value, je)); + case "media-feature-expression": + return ae.nodes ? ["(", ...Te.map(Me, "nodes"), ")"] : ae.value; + case "media-feature": + return m(Se(ae.value.replace(/ +/g, " "), je)); + case "media-colon": + return [ae.value, " "]; + case "media-value": + return Oe(Se(ae.value, je)); + case "media-keyword": + return Se(ae.value, je); + case "media-url": + return Se(ae.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/g, ")"), je); + case "media-unknown": + return ae.value; + case "selector-root": + return c([d(Te, "custom-selector") ? [D(Te, "css-atrule").customSelector, y] : "", p2([",", d(Te, ["extend", "custom-selector", "nest"]) ? y : h], Te.map(Me, "nodes"))]); + case "selector-selector": + return c(F(Te.map(Me, "nodes"))); + case "selector-comment": + return ae.value; + case "selector-string": + return Se(ae.value, je); + case "selector-tag": { + let Ve = Te.getParentNode(), We = Ve && Ve.nodes.indexOf(ae), Xe = We && Ve.nodes[We - 1]; + return [ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", Xe.type === "selector-nesting" ? ae.value : Oe(S(Te, ae.value) ? ae.value.toLowerCase() : ae.value)]; + } + case "selector-id": + return ["#", ae.value]; + case "selector-class": + return [".", Oe(Se(ae.value, je))]; + case "selector-attribute": { + var nt; + return ["[", ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", ae.attribute.trim(), (nt = ae.operator) !== null && nt !== void 0 ? nt : "", ae.value ? Ie(Se(ae.value.trim(), je), je) : "", ae.insensitive ? " i" : "", "]"]; + } + case "selector-combinator": { + if (ae.value === "+" || ae.value === ">" || ae.value === "~" || ae.value === ">>>") { + let Xe = Te.getParentNode(); + return [Xe.type === "selector-selector" && Xe.nodes[0] === ae ? "" : y, ae.value, B(Te, ae) ? "" : " "]; + } + let Ve = ae.value.trim().startsWith("(") ? y : "", We = Oe(Se(ae.value.trim(), je)) || y; + return [Ve, We]; + } + case "selector-universal": + return [ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", ae.value]; + case "selector-pseudo": + return [m(ae.value), l(ae.nodes) ? c(["(", F([g, p2([",", y], Te.map(Me, "nodes"))]), g, ")"]) : ""]; + case "selector-nesting": + return ae.value; + case "selector-unknown": { + let Ve = D(Te, "css-rule"); + if (Ve && Ve.isSCSSNesterProperty) + return Oe(Se(m(ae.value), je)); + let We = Te.getParentNode(); + if (We.raws && We.raws.selector) { + let st = Ae(We), O = st + We.raws.selector.length; + return je.originalText.slice(st, O).trim(); + } + let Xe = Te.getParentNode(1); + if (We.type === "value-paren_group" && Xe && Xe.type === "value-func" && Xe.value === "selector") { + let st = Ee(We.open) + 1, O = Ae(We.close), me = je.originalText.slice(st, O).trim(); + return H(me) ? [E, me] : me; + } + return ae.value; + } + case "value-value": + case "value-root": + return Me("group"); + case "value-comment": + return je.originalText.slice(Ae(ae), Ee(ae)); + case "value-comma_group": { + let Ve = Te.getParentNode(), We = Te.getParentNode(1), Xe = T(Te), st = Xe && Ve.type === "value-value" && (Xe === "grid" || Xe.startsWith("grid-template")), O = D(Te, "css-atrule"), me = O && k(O), _e = ae.groups.some((at) => ge(at)), He = Te.map(Me, "groups"), Ge = [], it = C(Te, "url"), Qe = false, rt = false; + for (let at = 0; at < ae.groups.length; ++at) { + var tt; + Ge.push(He[at]); + let Ze = ae.groups[at - 1], Le = ae.groups[at], $e = ae.groups[at + 1], sr = ae.groups[at + 2]; + if (it) { + ($e && Q($e) || Q(Le)) && Ge.push(" "); + continue; + } + if (d(Te, "forward") && Le.type === "value-word" && Le.value && Ze !== void 0 && Ze.type === "value-word" && Ze.value === "as" && $e.type === "value-operator" && $e.value === "*" || !$e || Le.type === "value-word" && Le.value.endsWith("-") && pe($e)) + continue; + if (Le.type === "value-string" && Le.quoted) { + let $r = Le.value.lastIndexOf("#{"), Vr = Le.value.lastIndexOf("}"); + $r !== -1 && Vr !== -1 ? Qe = $r > Vr : $r !== -1 ? Qe = true : Vr !== -1 && (Qe = false); + } + if (Qe || Ne(Le) || Ne($e) || Le.type === "value-atword" && (Le.value === "" || Le.value.endsWith("[")) || $e.type === "value-word" && $e.value.startsWith("]") || Le.value === "~" || Le.value && Le.value.includes("\\") && $e && $e.type !== "value-comment" || Ze && Ze.value && Ze.value.indexOf("\\") === Ze.value.length - 1 && Le.type === "value-operator" && Le.value === "/" || Le.value === "\\" || se(Le, $e) || he(Le) || we(Le) || ke($e) || we($e) && de($e) || ke(Le) && de($e) || Le.value === "--" && he($e)) + continue; + let Rr = j(Le), ou = j($e); + if ((Rr && he($e) || ou && ke(Le)) && de($e) || !Ze && L(Le) || C(Te, "calc") && (Q(Le) || Q($e) || V(Le) || V($e)) && de($e)) + continue; + let qo = (Q(Le) || V(Le)) && at === 0 && ($e.type === "value-number" || $e.isHex) && We && oe(We) && !de($e), lu = sr && sr.type === "value-func" || sr && Re(sr) || Le.type === "value-func" || Re(Le), cu = $e.type === "value-func" || Re($e) || Ze && Ze.type === "value-func" || Ze && Re(Ze); + if (!(!(J($e) || J(Le)) && !C(Te, "calc") && !qo && (L($e) && !lu || L(Le) && !cu || Q($e) && !lu || Q(Le) && !cu || V($e) || V(Le)) && (de($e) || Rr && (!Ze || Ze && j(Ze)))) && !((je.parser === "scss" || je.parser === "less") && Rr && Le.value === "-" && le($e) && Ee(Le) === Ae($e.open) && $e.open.value === "(")) { + if (ge(Le)) { + if (Ve.type === "value-paren_group") { + Ge.push(_(h)); + continue; + } + Ge.push(h); + continue; + } + if (me && (q($e) || R($e) || ce($e) || Y(Le) || ie(Le))) { + Ge.push(" "); + continue; + } + if (O && O.name.toLowerCase() === "namespace") { + Ge.push(" "); + continue; + } + if (st) { + Le.source && $e.source && Le.source.start.line !== $e.source.start.line ? (Ge.push(h), rt = true) : Ge.push(" "); + continue; + } + if (ou) { + Ge.push(" "); + continue; + } + if (!($e && $e.value === "...") && !(pe(Le) && pe($e) && Ee(Le) === Ae($e))) { + if (pe(Le) && le($e) && Ee(Le) === Ae($e.open)) { + Ge.push(g); + continue; + } + if (Le.value === "with" && le($e)) { + Ge.push(" "); + continue; + } + (tt = Le.value) !== null && tt !== void 0 && tt.endsWith("#") && $e.value === "{" && le($e.group) || Ge.push(y); + } + } + } + return _e && Ge.push(E), rt && Ge.unshift(h), me ? c(F(Ge)) : v(Te) ? c(f(Ge)) : c(F(f(Ge))); + } + case "value-paren_group": { + let Ve = Te.getParentNode(); + if (Ve && ee(Ve) && (ae.groups.length === 1 || ae.groups.length > 0 && ae.groups[0].type === "value-comma_group" && ae.groups[0].groups.length > 0 && ae.groups[0].groups[0].type === "value-word" && ae.groups[0].groups[0].value.startsWith("data:"))) + return [ae.open ? Me("open") : "", p2(",", Te.map(Me, "groups")), ae.close ? Me("close") : ""]; + if (!ae.open) { + let it = Te.map(Me, "groups"), Qe = []; + for (let rt = 0; rt < it.length; rt++) + rt !== 0 && Qe.push([",", y]), Qe.push(it[rt]); + return c(F(f(Qe))); + } + let We = fe(Te), Xe = t2(ae.groups), st = Xe && Xe.type === "value-comment", O = Fe(ae, Ve), me = X(ae, Ve), _e = me || We && !O, He = me || O, Ge = c([ae.open ? Me("open") : "", F([g, p2([y], Te.map((it, Qe) => { + let rt = it.getValue(), at = Qe === ae.groups.length - 1, Ze = [Me(), at ? "" : ","]; + if (ue(rt) && rt.type === "value-comma_group" && rt.groups && rt.groups[0].type !== "value-paren_group" && rt.groups[2] && rt.groups[2].type === "value-paren_group") { + let Le = x(Ze[0].contents.contents); + Le[1] = c(Le[1]), Ze = [c(_(Ze))]; + } + if (!at && rt.type === "value-comma_group" && l(rt.groups)) { + let Le = t2(rt.groups); + !Le.source && Le.close && (Le = Le.close), Le.source && i(je.originalText, Le, Ee) && Ze.push(h); + } + return Ze; + }, "groups"))]), w(!st && A(je.parser, je.originalText) && We && re(je) ? "," : ""), g, ae.close ? Me("close") : ""], { shouldBreak: _e }); + return He ? _(Ge) : Ge; + } + case "value-func": + return [ae.value, d(Te, "supports") && Pe(ae) ? " " : "", Me("group")]; + case "value-paren": + return ae.value; + case "value-number": + return [Je(ae.value), G(ae.unit)]; + case "value-operator": + return ae.value; + case "value-word": + return ae.isColor && ae.isHex || b(ae.value) ? ae.value.toLowerCase() : ae.value; + case "value-colon": { + let Ve = Te.getParentNode(), We = Ve && Ve.groups.indexOf(ae), Xe = We && Ve.groups[We - 1]; + return [ae.value, Xe && typeof Xe.value == "string" && t2(Xe.value) === "\\" || C(Te, "url") ? "" : y]; + } + case "value-comma": + return [ae.value, " "]; + case "value-string": + return a(ae.raws.quote + ae.value + ae.raws.quote, je); + case "value-atword": + return ["@", ae.value]; + case "value-unicode-range": + return ae.value; + case "value-unknown": + return ae.value; + default: + throw new Error(`Unknown postcss type ${JSON.stringify(ae.type)}`); + } + } + function Ce(Te, je, Me) { + let ae = []; + return Te.each((nt, tt, Ve) => { + let We = Ve[tt - 1]; + if (We && We.type === "css-comment" && We.text.trim() === "prettier-ignore") { + let Xe = nt.getValue(); + ae.push(je.originalText.slice(Ae(Xe), Ee(Xe))); + } else + ae.push(Me()); + tt !== Ve.length - 1 && (Ve[tt + 1].type === "css-comment" && !n(je.originalText, Ae(Ve[tt + 1]), { backwards: true }) && !u(Ve[tt]) || Ve[tt + 1].type === "css-atrule" && Ve[tt + 1].name === "else" && Ve[tt].type !== "css-comment" ? ae.push(" ") : (ae.push(je.__isHTMLStyleAttribute ? y : h), i(je.originalText, nt.getValue(), Ee) && !u(Ve[tt]) && ae.push(h))); + }, "nodes"), ae; + } + var Be = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gs, ve = /(?:\d*\.\d+|\d+\.?)(?:[Ee][+-]?\d+)?/g, ze = /[A-Za-z]+/g, be = /[$@]?[A-Z_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/g, Ye = new RegExp(Be.source + `|(${be.source})?(${ve.source})(${ze.source})?`, "g"); + function Se(Te, je) { + return Te.replace(Be, (Me) => a(Me, je)); + } + function Ie(Te, je) { + let Me = je.singleQuote ? "'" : '"'; + return Te.includes('"') || Te.includes("'") ? Te : Me + Te + Me; + } + function Oe(Te) { + return Te.replace(Ye, (je, Me, ae, nt, tt) => !ae && nt ? Je(nt) + m(tt || "") : je); + } + function Je(Te) { + return s(Te).replace(/\.0(?=$|e)/, ""); + } + r.exports = { print: ye, embed: P, insertPragma: $, massageAstNode: I }; + } }), Rd = te({ "src/language-css/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { singleQuote: t2.singleQuote }; + } }), $d = te({ "src/language-css/parsers.js"() { + ne(); + } }), Vd = te({ "node_modules/linguist-languages/data/CSS.json"(e, r) { + r.exports = { name: "CSS", type: "markup", tmScope: "source.css", aceMode: "css", codemirrorMode: "css", codemirrorMimeType: "text/css", color: "#563d7c", extensions: [".css"], languageId: 50 }; + } }), Wd = te({ "node_modules/linguist-languages/data/PostCSS.json"(e, r) { + r.exports = { name: "PostCSS", type: "markup", color: "#dc3a0c", tmScope: "source.postcss", group: "CSS", extensions: [".pcss", ".postcss"], aceMode: "text", languageId: 262764437 }; + } }), Hd = te({ "node_modules/linguist-languages/data/Less.json"(e, r) { + r.exports = { name: "Less", type: "markup", color: "#1d365d", aliases: ["less-css"], extensions: [".less"], tmScope: "source.css.less", aceMode: "less", codemirrorMode: "css", codemirrorMimeType: "text/css", languageId: 198 }; + } }), Gd = te({ "node_modules/linguist-languages/data/SCSS.json"(e, r) { + r.exports = { name: "SCSS", type: "markup", color: "#c6538c", tmScope: "source.css.scss", aceMode: "scss", codemirrorMode: "css", codemirrorMimeType: "text/x-scss", extensions: [".scss"], languageId: 329 }; + } }), Ud = te({ "src/language-css/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Md(), a = Rd(), n = $d(), u = [t2(Vd(), (l) => ({ since: "1.4.0", parsers: ["css"], vscodeLanguageIds: ["css"], extensions: [...l.extensions, ".wxss"] })), t2(Wd(), () => ({ since: "1.4.0", parsers: ["css"], vscodeLanguageIds: ["postcss"] })), t2(Hd(), () => ({ since: "1.4.0", parsers: ["less"], vscodeLanguageIds: ["less"] })), t2(Gd(), () => ({ since: "1.4.0", parsers: ["scss"], vscodeLanguageIds: ["scss"] }))], i = { postcss: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), Jd = te({ "src/language-handlebars/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.loc.start.offset; + } + function s(a) { + return a.loc.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), zd = te({ "src/language-handlebars/clean.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + if (s.type === "TextNode") { + let n = s.chars.trim(); + if (!n) + return null; + a.chars = n.replace(/[\t\n\f\r ]+/g, " "); + } + s.type === "AttrNode" && s.name.toLowerCase() === "class" && delete a.value; + } + t2.ignoredProperties = /* @__PURE__ */ new Set(["loc", "selfClosing"]), r.exports = t2; + } }), Xd = te({ "src/language-handlebars/html-void-elements.evaluate.js"(e, r) { + r.exports = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; + } }), Kd = te({ "src/language-handlebars/utils.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), s = Xd(); + function a(x) { + let I = x.getValue(), P = x.getParentNode(0); + return !!(g(x, ["ElementNode"]) && t2(P.children) === I || g(x, ["Block"]) && t2(P.body) === I); + } + function n(x) { + return x.toUpperCase() === x; + } + function u(x) { + return h(x, ["ElementNode"]) && typeof x.tag == "string" && !x.tag.startsWith(":") && (n(x.tag[0]) || x.tag.includes(".")); + } + var i = new Set(s); + function l(x) { + return i.has(x.toLowerCase()) && !n(x[0]); + } + function p2(x) { + return x.selfClosing === true || l(x.tag) || u(x) && x.children.every((I) => y(I)); + } + function y(x) { + return h(x, ["TextNode"]) && !/\S/.test(x.chars); + } + function h(x, I) { + return x && I.includes(x.type); + } + function g(x, I) { + let P = x.getParentNode(0); + return h(P, I); + } + function c(x, I) { + let P = _(x); + return h(P, I); + } + function f(x, I) { + let P = w(x); + return h(P, I); + } + function F(x, I) { + var P, $, D, T; + let m = x.getValue(), C = (P = x.getParentNode(0)) !== null && P !== void 0 ? P : {}, o = ($ = (D = (T = C.children) !== null && T !== void 0 ? T : C.body) !== null && D !== void 0 ? D : C.parts) !== null && $ !== void 0 ? $ : [], d = o.indexOf(m); + return d !== -1 && o[d + I]; + } + function _(x) { + let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; + return F(x, -I); + } + function w(x) { + return F(x, 1); + } + function E(x) { + return h(x, ["MustacheCommentStatement"]) && typeof x.value == "string" && x.value.trim() === "prettier-ignore"; + } + function N(x) { + let I = x.getValue(), P = _(x, 2); + return E(I) || E(P); + } + r.exports = { getNextNode: w, getPreviousNode: _, hasPrettierIgnore: N, isLastNodeOfSiblings: a, isNextNodeOfSomeType: f, isNodeOfSomeType: h, isParentOfSomeType: g, isPreviousNodeOfSomeType: c, isVoid: p2, isWhitespaceNode: y }; + } }), Yd = te({ "src/language-handlebars/printer-glimmer.js"(e, r) { + "use strict"; + ne(); + var { builders: { dedent: t2, fill: s, group: a, hardline: n, ifBreak: u, indent: i, join: l, line: p2, softline: y }, utils: { getDocParts: h, replaceTextEndOfLine: g } } = qe(), { getPreferredQuote: c, isNonEmptyArray: f } = Ue(), { locStart: F, locEnd: _ } = Jd(), w = zd(), { getNextNode: E, getPreviousNode: N, hasPrettierIgnore: x, isLastNodeOfSiblings: I, isNextNodeOfSomeType: P, isNodeOfSomeType: $, isParentOfSomeType: D, isPreviousNodeOfSomeType: T, isVoid: m, isWhitespaceNode: C } = Kd(), o = 2; + function d(H, pe, X) { + let le = H.getValue(); + if (!le) + return ""; + if (x(H)) + return pe.originalText.slice(F(le), _(le)); + let Ae = pe.singleQuote ? "'" : '"'; + switch (le.type) { + case "Block": + case "Program": + case "Template": + return a(H.map(X, "body")); + case "ElementNode": { + let Ee = a(S(H, X)), De = pe.htmlWhitespaceSensitivity === "ignore" && P(H, ["ElementNode"]) ? y : ""; + if (m(le)) + return [Ee, De]; + let A = [""]; + return le.children.length === 0 ? [Ee, i(A), De] : pe.htmlWhitespaceSensitivity === "ignore" ? [Ee, i(b(H, pe, X)), n, i(A), De] : [Ee, i(a(b(H, pe, X))), i(A), De]; + } + case "BlockStatement": { + let Ee = H.getParentNode(1); + return Ee && Ee.inverse && Ee.inverse.body.length === 1 && Ee.inverse.body[0] === le && Ee.inverse.body[0].path.parts[0] === Ee.path.parts[0] ? [ie(H, X, Ee.inverse.body[0].path.parts[0]), de(H, X, pe), ue(H, X, pe)] : [j(H, X), a([de(H, X, pe), ue(H, X, pe), ee(H, X, pe)])]; + } + case "ElementModifierStatement": + return a(["{{", Re(H, X), "}}"]); + case "MustacheStatement": + return a([k(le), Re(H, X), M(le)]); + case "SubExpression": + return a(["(", ke(H, X), y, ")"]); + case "AttrNode": { + let Ee = le.value.type === "TextNode"; + if (Ee && le.value.chars === "" && F(le.value) === _(le.value)) + return le.name; + let A = Ee ? c(le.value.chars, Ae).quote : le.value.type === "ConcatStatement" ? c(le.value.parts.filter((re) => re.type === "TextNode").map((re) => re.chars).join(""), Ae).quote : "", G = X("value"); + return [le.name, "=", A, le.name === "class" && A ? a(i(G)) : G, A]; + } + case "ConcatStatement": + return H.map(X, "parts"); + case "Hash": + return l(p2, H.map(X, "pairs")); + case "HashPair": + return [le.key, "=", X("value")]; + case "TextNode": { + let Ee = le.chars.replace(/{{/g, "\\{{"), De = U(H); + if (De) { + if (De === "class") { + let Ye = Ee.trim().split(/\s+/).join(" "), Se = false, Ie = false; + return D(H, ["ConcatStatement"]) && (T(H, ["MustacheStatement"]) && /^\s/.test(Ee) && (Se = true), P(H, ["MustacheStatement"]) && /\s$/.test(Ee) && Ye !== "" && (Ie = true)), [Se ? p2 : "", Ye, Ie ? p2 : ""]; + } + return g(Ee); + } + let G = /^[\t\n\f\r ]*$/.test(Ee), re = !N(H), ye = !E(H); + if (pe.htmlWhitespaceSensitivity !== "ignore") { + let Ye = /^[\t\n\f\r ]*/, Se = /[\t\n\f\r ]*$/, Ie = ye && D(H, ["Template"]), Oe = re && D(H, ["Template"]); + if (G) { + if (Oe || Ie) + return ""; + let ae = [p2], nt = Z(Ee); + return nt && (ae = ge(nt)), I(H) && (ae = ae.map((tt) => t2(tt))), ae; + } + let [Je] = Ee.match(Ye), [Te] = Ee.match(Se), je = []; + if (Je) { + je = [p2]; + let ae = Z(Je); + ae && (je = ge(ae)), Ee = Ee.replace(Ye, ""); + } + let Me = []; + if (Te) { + if (!Ie) { + Me = [p2]; + let ae = Z(Te); + ae && (Me = ge(ae)), I(H) && (Me = Me.map((nt) => t2(nt))); + } + Ee = Ee.replace(Se, ""); + } + return [...je, s(Fe(Ee)), ...Me]; + } + let Ce = Z(Ee), Be = se(Ee), ve = fe(Ee); + if ((re || ye) && G && D(H, ["Block", "ElementNode", "Template"])) + return ""; + G && Ce ? (Be = Math.min(Ce, o), ve = 0) : (P(H, ["BlockStatement", "ElementNode"]) && (ve = Math.max(ve, 1)), T(H, ["BlockStatement", "ElementNode"]) && (Be = Math.max(Be, 1))); + let ze = "", be = ""; + return ve === 0 && P(H, ["MustacheStatement"]) && (be = " "), Be === 0 && T(H, ["MustacheStatement"]) && (ze = " "), re && (Be = 0, ze = ""), ye && (ve = 0, be = ""), Ee = Ee.replace(/^[\t\n\f\r ]+/g, ze).replace(/[\t\n\f\r ]+$/, be), [...ge(Be), s(Fe(Ee)), ...ge(ve)]; + } + case "MustacheCommentStatement": { + let Ee = F(le), De = _(le), A = pe.originalText.charAt(Ee + 2) === "~", G = pe.originalText.charAt(De - 3) === "~", re = le.value.includes("}}") ? "--" : ""; + return ["{{", A ? "~" : "", "!", re, le.value, re, G ? "~" : "", "}}"]; + } + case "PathExpression": + return le.original; + case "BooleanLiteral": + return String(le.value); + case "CommentStatement": + return [""]; + case "StringLiteral": { + if (we(H)) { + let Ee = pe.singleQuote ? '"' : "'"; + return he(le.value, Ee); + } + return he(le.value, Ae); + } + case "NumberLiteral": + return String(le.value); + case "UndefinedLiteral": + return "undefined"; + case "NullLiteral": + return "null"; + default: + throw new Error("unknown glimmer type: " + JSON.stringify(le.type)); + } + } + function v(H, pe) { + return F(H) - F(pe); + } + function S(H, pe) { + let X = H.getValue(), le = ["attributes", "modifiers", "comments"].filter((Ee) => f(X[Ee])), Ae = le.flatMap((Ee) => X[Ee]).sort(v); + for (let Ee of le) + H.each((De) => { + let A = Ae.indexOf(De.getValue()); + Ae.splice(A, 1, [p2, pe()]); + }, Ee); + return f(X.blockParams) && Ae.push(p2, oe(X)), ["<", X.tag, i(Ae), B(X)]; + } + function b(H, pe, X) { + let Ae = H.getValue().children.every((Ee) => C(Ee)); + return pe.htmlWhitespaceSensitivity === "ignore" && Ae ? "" : H.map((Ee, De) => { + let A = X(); + return De === 0 && pe.htmlWhitespaceSensitivity === "ignore" ? [y, A] : A; + }, "children"); + } + function B(H) { + return m(H) ? u([y, "/>"], [" />", y]) : u([y, ">"], ">"); + } + function k(H) { + let pe = H.escaped === false ? "{{{" : "{{", X = H.strip && H.strip.open ? "~" : ""; + return [pe, X]; + } + function M(H) { + let pe = H.escaped === false ? "}}}" : "}}"; + return [H.strip && H.strip.close ? "~" : "", pe]; + } + function R(H) { + let pe = k(H), X = H.openStrip.open ? "~" : ""; + return [pe, X, "#"]; + } + function q(H) { + let pe = M(H); + return [H.openStrip.close ? "~" : "", pe]; + } + function J(H) { + let pe = k(H), X = H.closeStrip.open ? "~" : ""; + return [pe, X, "/"]; + } + function L(H) { + let pe = M(H); + return [H.closeStrip.close ? "~" : "", pe]; + } + function Q(H) { + let pe = k(H), X = H.inverseStrip.open ? "~" : ""; + return [pe, X]; + } + function V(H) { + let pe = M(H); + return [H.inverseStrip.close ? "~" : "", pe]; + } + function j(H, pe) { + let X = H.getValue(), le = [], Ae = Pe(H, pe); + return Ae && le.push(a(Ae)), f(X.program.blockParams) && le.push(oe(X.program)), a([R(X), Ne(H, pe), le.length > 0 ? i([p2, l(p2, le)]) : "", y, q(X)]); + } + function Y(H, pe) { + return [pe.htmlWhitespaceSensitivity === "ignore" ? n : "", Q(H), "else", V(H)]; + } + function ie(H, pe, X) { + let le = H.getValue(), Ae = H.getParentNode(1); + return a([Q(Ae), ["else", " ", X], i([p2, a(Pe(H, pe)), ...f(le.program.blockParams) ? [p2, oe(le.program)] : []]), y, V(Ae)]); + } + function ee(H, pe, X) { + let le = H.getValue(); + return X.htmlWhitespaceSensitivity === "ignore" ? [ce(le) ? y : n, J(le), pe("path"), L(le)] : [J(le), pe("path"), L(le)]; + } + function ce(H) { + return $(H, ["BlockStatement"]) && H.program.body.every((pe) => C(pe)); + } + function W(H) { + return K(H) && H.inverse.body.length === 1 && $(H.inverse.body[0], ["BlockStatement"]) && H.inverse.body[0].path.parts[0] === H.path.parts[0]; + } + function K(H) { + return $(H, ["BlockStatement"]) && H.inverse; + } + function de(H, pe, X) { + let le = H.getValue(); + if (ce(le)) + return ""; + let Ae = pe("program"); + return X.htmlWhitespaceSensitivity === "ignore" ? i([n, Ae]) : i(Ae); + } + function ue(H, pe, X) { + let le = H.getValue(), Ae = pe("inverse"), Ee = X.htmlWhitespaceSensitivity === "ignore" ? [n, Ae] : Ae; + return W(le) ? Ee : K(le) ? [Y(le, X), i(Ee)] : ""; + } + function Fe(H) { + return h(l(p2, z(H))); + } + function z(H) { + return H.split(/[\t\n\f\r ]+/); + } + function U(H) { + for (let pe = 0; pe < 2; pe++) { + let X = H.getParentNode(pe); + if (X && X.type === "AttrNode") + return X.name.toLowerCase(); + } + } + function Z(H) { + return H = typeof H == "string" ? H : "", H.split(` +`).length - 1; + } + function se(H) { + H = typeof H == "string" ? H : ""; + let pe = (H.match(/^([^\S\n\r]*[\n\r])+/g) || [])[0] || ""; + return Z(pe); + } + function fe(H) { + H = typeof H == "string" ? H : ""; + let pe = (H.match(/([\n\r][^\S\n\r]*)+$/g) || [])[0] || ""; + return Z(pe); + } + function ge() { + let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return Array.from({ length: Math.min(H, o) }).fill(n); + } + function he(H, pe) { + let { quote: X, regex: le } = c(H, pe); + return [X, H.replace(le, `\\${X}`), X]; + } + function we(H) { + let pe = 0, X = H.getParentNode(pe); + for (; X && $(X, ["SubExpression"]); ) + pe++, X = H.getParentNode(pe); + return !!(X && $(H.getParentNode(pe + 1), ["ConcatStatement"]) && $(H.getParentNode(pe + 2), ["AttrNode"])); + } + function ke(H, pe) { + let X = Ne(H, pe), le = Pe(H, pe); + return le ? i([X, p2, a(le)]) : X; + } + function Re(H, pe) { + let X = Ne(H, pe), le = Pe(H, pe); + return le ? [i([X, p2, le]), y] : X; + } + function Ne(H, pe) { + return pe("path"); + } + function Pe(H, pe) { + let X = H.getValue(), le = []; + if (X.params.length > 0) { + let Ae = H.map(pe, "params"); + le.push(...Ae); + } + if (X.hash && X.hash.pairs.length > 0) { + let Ae = pe("hash"); + le.push(Ae); + } + return le.length === 0 ? "" : l(p2, le); + } + function oe(H) { + return ["as |", H.blockParams.join(" "), "|"]; + } + r.exports = { print: d, massageAstNode: w }; + } }), Qd = te({ "src/language-handlebars/parsers.js"() { + ne(); + } }), Zd = te({ "node_modules/linguist-languages/data/Handlebars.json"(e, r) { + r.exports = { name: "Handlebars", type: "markup", color: "#f7931e", aliases: ["hbs", "htmlbars"], extensions: [".handlebars", ".hbs"], tmScope: "text.html.handlebars", aceMode: "handlebars", languageId: 155 }; + } }), eg = te({ "src/language-handlebars/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Yd(), a = Qd(), n = [t2(Zd(), () => ({ since: "2.3.0", parsers: ["glimmer"], vscodeLanguageIds: ["handlebars"] }))], u = { glimmer: s }; + r.exports = { languages: n, printers: u, parsers: a }; + } }), tg = te({ "src/language-graphql/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(a); + } + function s(a) { + return `# @format + +` + a; + } + r.exports = { hasPragma: t2, insertPragma: s }; + } }), rg = te({ "src/language-graphql/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return typeof a.start == "number" ? a.start : a.loc && a.loc.start; + } + function s(a) { + return typeof a.end == "number" ? a.end : a.loc && a.loc.end; + } + r.exports = { locStart: t2, locEnd: s }; + } }), ng = te({ "src/language-graphql/printer-graphql.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, hardline: s, line: a, softline: n, group: u, indent: i, ifBreak: l } } = qe(), { isNextLineEmpty: p2, isNonEmptyArray: y } = Ue(), { insertPragma: h } = tg(), { locStart: g, locEnd: c } = rg(); + function f(P, $, D) { + let T = P.getValue(); + if (!T) + return ""; + if (typeof T == "string") + return T; + switch (T.kind) { + case "Document": { + let m = []; + return P.each((C, o, d) => { + m.push(D()), o !== d.length - 1 && (m.push(s), p2($.originalText, C.getValue(), c) && m.push(s)); + }, "definitions"), [...m, s]; + } + case "OperationDefinition": { + let m = $.originalText[g(T)] !== "{", C = Boolean(T.name); + return [m ? T.operation : "", m && C ? [" ", D("name")] : "", m && !C && y(T.variableDefinitions) ? " " : "", y(T.variableDefinitions) ? u(["(", i([n, t2([l("", ", "), n], P.map(D, "variableDefinitions"))]), n, ")"]) : "", F(P, D, T), T.selectionSet ? !m && !C ? "" : " " : "", D("selectionSet")]; + } + case "FragmentDefinition": + return ["fragment ", D("name"), y(T.variableDefinitions) ? u(["(", i([n, t2([l("", ", "), n], P.map(D, "variableDefinitions"))]), n, ")"]) : "", " on ", D("typeCondition"), F(P, D, T), " ", D("selectionSet")]; + case "SelectionSet": + return ["{", i([s, t2(s, _(P, $, D, "selections"))]), s, "}"]; + case "Field": + return u([T.alias ? [D("alias"), ": "] : "", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", F(P, D, T), T.selectionSet ? " " : "", D("selectionSet")]); + case "Name": + return T.value; + case "StringValue": { + if (T.block) { + let m = T.value.replace(/"""/g, "\\$&").split(` +`); + return m.length === 1 && (m[0] = m[0].trim()), m.every((C) => C === "") && (m.length = 0), t2(s, ['"""', ...m, '"""']); + } + return ['"', T.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']; + } + case "IntValue": + case "FloatValue": + case "EnumValue": + return T.value; + case "BooleanValue": + return T.value ? "true" : "false"; + case "NullValue": + return "null"; + case "Variable": + return ["$", D("name")]; + case "ListValue": + return u(["[", i([n, t2([l("", ", "), n], P.map(D, "values"))]), n, "]"]); + case "ObjectValue": + return u(["{", $.bracketSpacing && T.fields.length > 0 ? " " : "", i([n, t2([l("", ", "), n], P.map(D, "fields"))]), n, l("", $.bracketSpacing && T.fields.length > 0 ? " " : ""), "}"]); + case "ObjectField": + case "Argument": + return [D("name"), ": ", D("value")]; + case "Directive": + return ["@", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : ""]; + case "NamedType": + return D("name"); + case "VariableDefinition": + return [D("variable"), ": ", D("type"), T.defaultValue ? [" = ", D("defaultValue")] : "", F(P, D, T)]; + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "ObjectTypeExtension" ? "extend " : "", "type ", D("name"), T.interfaces.length > 0 ? [" implements ", ...N(P, $, D)] : "", F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "FieldDefinition": + return [D("description"), T.description ? s : "", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", ": ", D("type"), F(P, D, T)]; + case "DirectiveDefinition": + return [D("description"), T.description ? s : "", "directive ", "@", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", T.repeatable ? " repeatable" : "", " on ", t2(" | ", P.map(D, "locations"))]; + case "EnumTypeExtension": + case "EnumTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "EnumTypeExtension" ? "extend " : "", "enum ", D("name"), F(P, D, T), T.values.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "values"))]), s, "}"] : ""]; + case "EnumValueDefinition": + return [D("description"), T.description ? s : "", D("name"), F(P, D, T)]; + case "InputValueDefinition": + return [D("description"), T.description ? T.description.block ? s : a : "", D("name"), ": ", D("type"), T.defaultValue ? [" = ", D("defaultValue")] : "", F(P, D, T)]; + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", D("name"), F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "SchemaExtension": + return ["extend schema", F(P, D, T), ...T.operationTypes.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "operationTypes"))]), s, "}"] : []]; + case "SchemaDefinition": + return [D("description"), T.description ? s : "", "schema", F(P, D, T), " {", T.operationTypes.length > 0 ? i([s, t2(s, _(P, $, D, "operationTypes"))]) : "", s, "}"]; + case "OperationTypeDefinition": + return [D("operation"), ": ", D("type")]; + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", D("name"), T.interfaces.length > 0 ? [" implements ", ...N(P, $, D)] : "", F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "FragmentSpread": + return ["...", D("name"), F(P, D, T)]; + case "InlineFragment": + return ["...", T.typeCondition ? [" on ", D("typeCondition")] : "", F(P, D, T), " ", D("selectionSet")]; + case "UnionTypeExtension": + case "UnionTypeDefinition": + return u([D("description"), T.description ? s : "", u([T.kind === "UnionTypeExtension" ? "extend " : "", "union ", D("name"), F(P, D, T), T.types.length > 0 ? [" =", l("", " "), i([l([a, " "]), t2([a, "| "], P.map(D, "types"))])] : ""])]); + case "ScalarTypeExtension": + case "ScalarTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", D("name"), F(P, D, T)]; + case "NonNullType": + return [D("type"), "!"]; + case "ListType": + return ["[", D("type"), "]"]; + default: + throw new Error("unknown graphql type: " + JSON.stringify(T.kind)); + } + } + function F(P, $, D) { + if (D.directives.length === 0) + return ""; + let T = t2(a, P.map($, "directives")); + return D.kind === "FragmentDefinition" || D.kind === "OperationDefinition" ? u([a, T]) : [" ", u(i([n, T]))]; + } + function _(P, $, D, T) { + return P.map((m, C, o) => { + let d = D(); + return C < o.length - 1 && p2($.originalText, m.getValue(), c) ? [d, s] : d; + }, T); + } + function w(P) { + return P.kind && P.kind !== "Comment"; + } + function E(P) { + let $ = P.getValue(); + if ($.kind === "Comment") + return "#" + $.value.trimEnd(); + throw new Error("Not a comment: " + JSON.stringify($)); + } + function N(P, $, D) { + let T = P.getNode(), m = [], { interfaces: C } = T, o = P.map((d) => D(d), "interfaces"); + for (let d = 0; d < C.length; d++) { + let v = C[d]; + m.push(o[d]); + let S = C[d + 1]; + if (S) { + let b = $.originalText.slice(v.loc.end, S.loc.start), B = b.includes("#"), k = b.replace(/#.*/g, "").trim(); + m.push(k === "," ? "," : " &", B ? a : " "); + } + } + return m; + } + function x(P, $) { + P.kind === "StringValue" && P.block && !P.value.includes(` +`) && ($.value = $.value.trim()); + } + x.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]); + function I(P) { + var $; + let D = P.getValue(); + return D == null || ($ = D.comments) === null || $ === void 0 ? void 0 : $.some((T) => T.value.trim() === "prettier-ignore"); + } + r.exports = { print: f, massageAstNode: x, hasPrettierIgnore: I, insertPragma: h, printComment: E, canAttachComment: w }; + } }), ug = te({ "src/language-graphql/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { bracketSpacing: t2.bracketSpacing }; + } }), sg = te({ "src/language-graphql/parsers.js"() { + ne(); + } }), ig = te({ "node_modules/linguist-languages/data/GraphQL.json"(e, r) { + r.exports = { name: "GraphQL", type: "data", color: "#e10098", extensions: [".graphql", ".gql", ".graphqls"], tmScope: "source.graphql", aceMode: "text", languageId: 139 }; + } }), ag = te({ "src/language-graphql/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = ng(), a = ug(), n = sg(), u = [t2(ig(), () => ({ since: "1.5.0", parsers: ["graphql"], vscodeLanguageIds: ["graphql"] }))], i = { graphql: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), Po = te({ "node_modules/collapse-white-space/index.js"(e, r) { + "use strict"; + ne(), r.exports = t2; + function t2(s) { + return String(s).replace(/\s+/g, " "); + } + } }), Io = te({ "src/language-markdown/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.position.start.offset; + } + function s(a) { + return a.position.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), og = te({ "src/language-markdown/constants.evaluate.js"(e, r) { + r.exports = { cjkPattern: "(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u2ff0-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?", kPattern: "[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]", punctuationPattern: "[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]" }; + } }), iu = te({ "src/language-markdown/utils.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2 } = Ue(), { locStart: s, locEnd: a } = Io(), { cjkPattern: n, kPattern: u, punctuationPattern: i } = og(), l = ["liquidNode", "inlineCode", "emphasis", "esComment", "strong", "delete", "wikiLink", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"], p2 = [...l, "tableCell", "paragraph", "heading"], y = new RegExp(u), h = new RegExp(i); + function g(E, N) { + let x = "non-cjk", I = "cj-letter", P = "k-letter", $ = "cjk-punctuation", D = [], T = (N.proseWrap === "preserve" ? E : E.replace(new RegExp(`(${n}) +(${n})`, "g"), "$1$2")).split(/([\t\n ]+)/); + for (let [C, o] of T.entries()) { + if (C % 2 === 1) { + D.push({ type: "whitespace", value: /\n/.test(o) ? ` +` : " " }); + continue; + } + if ((C === 0 || C === T.length - 1) && o === "") + continue; + let d = o.split(new RegExp(`(${n})`)); + for (let [v, S] of d.entries()) + if (!((v === 0 || v === d.length - 1) && S === "")) { + if (v % 2 === 0) { + S !== "" && m({ type: "word", value: S, kind: x, hasLeadingPunctuation: h.test(S[0]), hasTrailingPunctuation: h.test(t2(S)) }); + continue; + } + m(h.test(S) ? { type: "word", value: S, kind: $, hasLeadingPunctuation: true, hasTrailingPunctuation: true } : { type: "word", value: S, kind: y.test(S) ? P : I, hasLeadingPunctuation: false, hasTrailingPunctuation: false }); + } + } + return D; + function m(C) { + let o = t2(D); + o && o.type === "word" && (o.kind === x && C.kind === I && !o.hasTrailingPunctuation || o.kind === I && C.kind === x && !C.hasLeadingPunctuation ? D.push({ type: "whitespace", value: " " }) : !d(x, $) && ![o.value, C.value].some((v) => /\u3000/.test(v)) && D.push({ type: "whitespace", value: "" })), D.push(C); + function d(v, S) { + return o.kind === v && C.kind === S || o.kind === S && C.kind === v; + } + } + } + function c(E, N) { + let [, x, I, P] = N.slice(E.position.start.offset, E.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/); + return { numberText: x, marker: I, leadingSpaces: P }; + } + function f(E, N) { + if (!E.ordered || E.children.length < 2) + return false; + let x = Number(c(E.children[0], N.originalText).numberText), I = Number(c(E.children[1], N.originalText).numberText); + if (x === 0 && E.children.length > 2) { + let P = Number(c(E.children[2], N.originalText).numberText); + return I === 1 && P === 1; + } + return I === 1; + } + function F(E, N) { + let { value: x } = E; + return E.position.end.offset === N.length && x.endsWith(` +`) && N.endsWith(` +`) ? x.slice(0, -1) : x; + } + function _(E, N) { + return function x(I, P, $) { + let D = Object.assign({}, N(I, P, $)); + return D.children && (D.children = D.children.map((T, m) => x(T, m, [D, ...$]))), D; + }(E, null, []); + } + function w(E) { + if ((E == null ? void 0 : E.type) !== "link" || E.children.length !== 1) + return false; + let [N] = E.children; + return s(E) === s(N) && a(E) === a(N); + } + r.exports = { mapAst: _, splitText: g, punctuationPattern: i, getFencedCodeBlockValue: F, getOrderedListItemInfo: c, hasGitDiffFriendlyOrderedList: f, INLINE_NODE_TYPES: l, INLINE_NODE_WRAPPER_TYPES: p2, isAutolink: w }; + } }), lg = te({ "src/language-markdown/embed.js"(e, r) { + "use strict"; + ne(); + var { inferParserByLanguage: t2, getMaxContinuousCount: s } = Ue(), { builders: { hardline: a, markAsRoot: n }, utils: { replaceEndOfLine: u } } = qe(), i = su(), { getFencedCodeBlockValue: l } = iu(); + function p2(y, h, g, c) { + let f = y.getValue(); + if (f.type === "code" && f.lang !== null) { + let F = t2(f.lang, c); + if (F) { + let _ = c.__inJsTemplate ? "~" : "`", w = _.repeat(Math.max(3, s(f.value, _) + 1)), E = { parser: F }; + f.lang === "tsx" && (E.filepath = "dummy.tsx"); + let N = g(l(f, c.originalText), E, { stripTrailingHardline: true }); + return n([w, f.lang, f.meta ? " " + f.meta : "", a, u(N), a, w]); + } + } + switch (f.type) { + case "front-matter": + return i(f, g); + case "importExport": + return [g(f.value, { parser: "babel" }, { stripTrailingHardline: true }), a]; + case "jsx": + return g(`<$>${f.value}`, { parser: "__js_expression", rootMarker: "mdx" }, { stripTrailingHardline: true }); + } + return null; + } + r.exports = p2; + } }), ko = te({ "src/language-markdown/pragma.js"(e, r) { + "use strict"; + ne(); + var t2 = _o(), s = ["format", "prettier"]; + function a(n) { + let u = `@(${s.join("|")})`, i = new RegExp([``, `{\\s*\\/\\*\\s*${u}\\s*\\*\\/\\s*}`, ``].join("|"), "m"), l = n.match(i); + return (l == null ? void 0 : l.index) === 0; + } + r.exports = { startWithPragma: a, hasPragma: (n) => a(t2(n).content.trimStart()), insertPragma: (n) => { + let u = t2(n), i = ``; + return u.frontMatter ? `${u.frontMatter.raw} + +${i} + +${u.content}` : `${i} + +${u.content}`; + } }; + } }), cg = te({ "src/language-markdown/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { getOrderedListItemInfo: s, mapAst: a, splitText: n } = iu(), u = /^.$/su; + function i(w, E) { + return w = y(w, E), w = c(w), w = p2(w, E), w = F(w, E), w = _(w, E), w = f(w, E), w = l(w), w = h(w), w; + } + function l(w) { + return a(w, (E) => E.type !== "import" && E.type !== "export" ? E : Object.assign(Object.assign({}, E), {}, { type: "importExport" })); + } + function p2(w, E) { + return a(w, (N) => N.type !== "inlineCode" || E.proseWrap === "preserve" ? N : Object.assign(Object.assign({}, N), {}, { value: N.value.replace(/\s+/g, " ") })); + } + function y(w, E) { + return a(w, (N) => N.type !== "text" || N.value === "*" || N.value === "_" || !u.test(N.value) || N.position.end.offset - N.position.start.offset === N.value.length ? N : Object.assign(Object.assign({}, N), {}, { value: E.originalText.slice(N.position.start.offset, N.position.end.offset) })); + } + function h(w) { + return g(w, (E, N) => E.type === "importExport" && N.type === "importExport", (E, N) => ({ type: "importExport", value: E.value + ` + +` + N.value, position: { start: E.position.start, end: N.position.end } })); + } + function g(w, E, N) { + return a(w, (x) => { + if (!x.children) + return x; + let I = x.children.reduce((P, $) => { + let D = t2(P); + return D && E(D, $) ? P.splice(-1, 1, N(D, $)) : P.push($), P; + }, []); + return Object.assign(Object.assign({}, x), {}, { children: I }); + }); + } + function c(w) { + return g(w, (E, N) => E.type === "text" && N.type === "text", (E, N) => ({ type: "text", value: E.value + N.value, position: { start: E.position.start, end: N.position.end } })); + } + function f(w, E) { + return a(w, (N, x, I) => { + let [P] = I; + if (N.type !== "text") + return N; + let { value: $ } = N; + return P.type === "paragraph" && (x === 0 && ($ = $.trimStart()), x === P.children.length - 1 && ($ = $.trimEnd())), { type: "sentence", position: N.position, children: n($, E) }; + }); + } + function F(w, E) { + return a(w, (N, x, I) => { + if (N.type === "code") { + let P = /^\n?(?: {4,}|\t)/.test(E.originalText.slice(N.position.start.offset, N.position.end.offset)); + if (N.isIndented = P, P) + for (let $ = 0; $ < I.length; $++) { + let D = I[$]; + if (D.hasIndentedCodeblock) + break; + D.type === "list" && (D.hasIndentedCodeblock = true); + } + } + return N; + }); + } + function _(w, E) { + return a(w, (I, P, $) => { + if (I.type === "list" && I.children.length > 0) { + for (let D = 0; D < $.length; D++) { + let T = $[D]; + if (T.type === "list" && !T.isAligned) + return I.isAligned = false, I; + } + I.isAligned = x(I); + } + return I; + }); + function N(I) { + return I.children.length === 0 ? -1 : I.children[0].position.start.column - 1; + } + function x(I) { + if (!I.ordered) + return true; + let [P, $] = I.children; + if (s(P, E.originalText).leadingSpaces.length > 1) + return true; + let T = N(P); + if (T === -1) + return false; + if (I.children.length === 1) + return T % E.tabWidth === 0; + let m = N($); + return T !== m ? false : T % E.tabWidth === 0 ? true : s($, E.originalText).leadingSpaces.length > 1; + } + } + r.exports = i; + } }), pg = te({ "src/language-markdown/clean.js"(e, r) { + "use strict"; + ne(); + var t2 = Po(), { isFrontMatterNode: s } = Ue(), { startWithPragma: a } = ko(), n = /* @__PURE__ */ new Set(["position", "raw"]); + function u(i, l, p2) { + if ((i.type === "front-matter" || i.type === "code" || i.type === "yaml" || i.type === "import" || i.type === "export" || i.type === "jsx") && delete l.value, i.type === "list" && delete l.isAligned, (i.type === "list" || i.type === "listItem") && (delete l.spread, delete l.loose), i.type === "text" || (i.type === "inlineCode" && (l.value = i.value.replace(/[\t\n ]+/g, " ")), i.type === "wikiLink" && (l.value = i.value.trim().replace(/[\t\n]+/g, " ")), (i.type === "definition" || i.type === "linkReference" || i.type === "imageReference") && (l.label = t2(i.label)), (i.type === "definition" || i.type === "link" || i.type === "image") && i.title && (l.title = i.title.replace(/\\(["')])/g, "$1")), p2 && p2.type === "root" && p2.children.length > 0 && (p2.children[0] === i || s(p2.children[0]) && p2.children[1] === i) && i.type === "html" && a(i.value))) + return null; + } + u.ignoredProperties = n, r.exports = u; + } }), fg = te({ "src/language-markdown/printer-markdown.js"(e, r) { + "use strict"; + ne(); + var t2 = Po(), { getLast: s, getMinNotPresentContinuousCount: a, getMaxContinuousCount: n, getStringWidth: u, isNonEmptyArray: i } = Ue(), { builders: { breakParent: l, join: p2, line: y, literalline: h, markAsRoot: g, hardline: c, softline: f, ifBreak: F, fill: _, align: w, indent: E, group: N, hardlineWithoutBreakParent: x }, utils: { normalizeDoc: I, replaceTextEndOfLine: P }, printer: { printDocToString: $ } } = qe(), D = lg(), { insertPragma: T } = ko(), { locStart: m, locEnd: C } = Io(), o = cg(), d = pg(), { getFencedCodeBlockValue: v, hasGitDiffFriendlyOrderedList: S, splitText: b, punctuationPattern: B, INLINE_NODE_TYPES: k, INLINE_NODE_WRAPPER_TYPES: M, isAutolink: R } = iu(), q = /* @__PURE__ */ new Set(["importExport"]), J = ["heading", "tableCell", "link", "wikiLink"], L = /* @__PURE__ */ new Set(["listItem", "definition", "footnoteDefinition"]); + function Q(oe, H, pe) { + let X = oe.getValue(); + if (ge(oe)) + return b(H.originalText.slice(X.position.start.offset, X.position.end.offset), H).map((le) => le.type === "word" ? le.value : le.value === "" ? "" : W(oe, le.value, H)); + switch (X.type) { + case "front-matter": + return H.originalText.slice(X.position.start.offset, X.position.end.offset); + case "root": + return X.children.length === 0 ? "" : [I(de(oe, H, pe)), q.has(z(X).type) ? "" : c]; + case "paragraph": + return ue(oe, H, pe, { postprocessor: _ }); + case "sentence": + return ue(oe, H, pe); + case "word": { + let le = X.value.replace(/\*/g, "\\$&").replace(new RegExp([`(^|${B})(_+)`, `(_+)(${B}|$)`].join("|"), "g"), (De, A, G, re, ye) => (G ? `${A}${G}` : `${re}${ye}`).replace(/_/g, "\\_")), Ae = (De, A, G) => De.type === "sentence" && G === 0, Ee = (De, A, G) => R(De.children[G - 1]); + return le !== X.value && (oe.match(void 0, Ae, Ee) || oe.match(void 0, Ae, (De, A, G) => De.type === "emphasis" && G === 0, Ee)) && (le = le.replace(/^(\\?[*_])+/, (De) => De.replace(/\\/g, ""))), le; + } + case "whitespace": { + let le = oe.getParentNode(), Ae = le.children.indexOf(X), Ee = le.children[Ae + 1], De = Ee && /^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(Ee.value) ? "never" : H.proseWrap; + return W(oe, X.value, { proseWrap: De }); + } + case "emphasis": { + let le; + if (R(X.children[0])) + le = H.originalText[X.position.start.offset]; + else { + let Ae = oe.getParentNode(), Ee = Ae.children.indexOf(X), De = Ae.children[Ee - 1], A = Ae.children[Ee + 1]; + le = De && De.type === "sentence" && De.children.length > 0 && s(De.children).type === "word" && !s(De.children).hasTrailingPunctuation || A && A.type === "sentence" && A.children.length > 0 && A.children[0].type === "word" && !A.children[0].hasLeadingPunctuation || ce(oe, "emphasis") ? "*" : "_"; + } + return [le, ue(oe, H, pe), le]; + } + case "strong": + return ["**", ue(oe, H, pe), "**"]; + case "delete": + return ["~~", ue(oe, H, pe), "~~"]; + case "inlineCode": { + let le = a(X.value, "`"), Ae = "`".repeat(le || 1), Ee = le && !/^\s/.test(X.value) ? " " : ""; + return [Ae, Ee, X.value, Ee, Ae]; + } + case "wikiLink": { + let le = ""; + return H.proseWrap === "preserve" ? le = X.value : le = X.value.replace(/[\t\n]+/g, " "), ["[[", le, "]]"]; + } + case "link": + switch (H.originalText[X.position.start.offset]) { + case "<": { + let le = "mailto:"; + return ["<", X.url.startsWith(le) && H.originalText.slice(X.position.start.offset + 1, X.position.start.offset + 1 + le.length) !== le ? X.url.slice(le.length) : X.url, ">"]; + } + case "[": + return ["[", ue(oe, H, pe), "](", he(X.url, ")"), we(X.title, H), ")"]; + default: + return H.originalText.slice(X.position.start.offset, X.position.end.offset); + } + case "image": + return ["![", X.alt || "", "](", he(X.url, ")"), we(X.title, H), ")"]; + case "blockquote": + return ["> ", w("> ", ue(oe, H, pe))]; + case "heading": + return ["#".repeat(X.depth) + " ", ue(oe, H, pe)]; + case "code": { + if (X.isIndented) { + let Ee = " ".repeat(4); + return w(Ee, [Ee, ...P(X.value, c)]); + } + let le = H.__inJsTemplate ? "~" : "`", Ae = le.repeat(Math.max(3, n(X.value, le) + 1)); + return [Ae, X.lang || "", X.meta ? " " + X.meta : "", c, ...P(v(X, H.originalText), c), c, Ae]; + } + case "html": { + let le = oe.getParentNode(), Ae = le.type === "root" && s(le.children) === X ? X.value.trimEnd() : X.value, Ee = /^$/s.test(Ae); + return P(Ae, Ee ? c : g(h)); + } + case "list": { + let le = Y(X, oe.getParentNode()), Ae = S(X, H); + return ue(oe, H, pe, { processor: (Ee, De) => { + let A = re(), G = Ee.getValue(); + if (G.children.length === 2 && G.children[1].type === "html" && G.children[0].position.start.column !== G.children[1].position.start.column) + return [A, V(Ee, H, pe, A)]; + return [A, w(" ".repeat(A.length), V(Ee, H, pe, A))]; + function re() { + let ye = X.ordered ? (De === 0 ? X.start : Ae ? 1 : X.start + De) + (le % 2 === 0 ? ". " : ") ") : le % 2 === 0 ? "- " : "* "; + return X.isAligned || X.hasIndentedCodeblock ? j(ye, H) : ye; + } + } }); + } + case "thematicBreak": { + let le = ee(oe, "list"); + return le === -1 ? "---" : Y(oe.getParentNode(le), oe.getParentNode(le + 1)) % 2 === 0 ? "***" : "---"; + } + case "linkReference": + return ["[", ue(oe, H, pe), "]", X.referenceType === "full" ? Ne(X) : X.referenceType === "collapsed" ? "[]" : ""]; + case "imageReference": + switch (X.referenceType) { + case "full": + return ["![", X.alt || "", "]", Ne(X)]; + default: + return ["![", X.alt, "]", X.referenceType === "collapsed" ? "[]" : ""]; + } + case "definition": { + let le = H.proseWrap === "always" ? y : " "; + return N([Ne(X), ":", E([le, he(X.url), X.title === null ? "" : [le, we(X.title, H, false)]])]); + } + case "footnote": + return ["[^", ue(oe, H, pe), "]"]; + case "footnoteReference": + return Pe(X); + case "footnoteDefinition": { + let le = oe.getParentNode().children[oe.getName() + 1], Ae = X.children.length === 1 && X.children[0].type === "paragraph" && (H.proseWrap === "never" || H.proseWrap === "preserve" && X.children[0].position.start.line === X.children[0].position.end.line); + return [Pe(X), ": ", Ae ? ue(oe, H, pe) : N([w(" ".repeat(4), ue(oe, H, pe, { processor: (Ee, De) => De === 0 ? N([f, pe()]) : pe() })), le && le.type === "footnoteDefinition" ? f : ""])]; + } + case "table": + return K(oe, H, pe); + case "tableCell": + return ue(oe, H, pe); + case "break": + return /\s/.test(H.originalText[X.position.start.offset]) ? [" ", g(h)] : ["\\", c]; + case "liquidNode": + return P(X.value, c); + case "importExport": + return [X.value, c]; + case "esComment": + return ["{/* ", X.value, " */}"]; + case "jsx": + return X.value; + case "math": + return ["$$", c, X.value ? [...P(X.value, c), c] : "", "$$"]; + case "inlineMath": + return H.originalText.slice(m(X), C(X)); + case "tableRow": + case "listItem": + default: + throw new Error(`Unknown markdown type ${JSON.stringify(X.type)}`); + } + } + function V(oe, H, pe, X) { + let le = oe.getValue(), Ae = le.checked === null ? "" : le.checked ? "[x] " : "[ ] "; + return [Ae, ue(oe, H, pe, { processor: (Ee, De) => { + if (De === 0 && Ee.getValue().type !== "list") + return w(" ".repeat(Ae.length), pe()); + let A = " ".repeat(ke(H.tabWidth - X.length, 0, 3)); + return [A, w(A, pe())]; + } })]; + } + function j(oe, H) { + let pe = X(); + return oe + " ".repeat(pe >= 4 ? 0 : pe); + function X() { + let le = oe.length % H.tabWidth; + return le === 0 ? 0 : H.tabWidth - le; + } + } + function Y(oe, H) { + return ie(oe, H, (pe) => pe.ordered === oe.ordered); + } + function ie(oe, H, pe) { + let X = -1; + for (let le of H.children) + if (le.type === oe.type && pe(le) ? X++ : X = -1, le === oe) + return X; + } + function ee(oe, H) { + let pe = Array.isArray(H) ? H : [H], X = -1, le; + for (; le = oe.getParentNode(++X); ) + if (pe.includes(le.type)) + return X; + return -1; + } + function ce(oe, H) { + let pe = ee(oe, H); + return pe === -1 ? null : oe.getParentNode(pe); + } + function W(oe, H, pe) { + if (pe.proseWrap === "preserve" && H === ` +`) + return c; + let X = pe.proseWrap === "always" && !ce(oe, J); + return H !== "" ? X ? y : " " : X ? f : ""; + } + function K(oe, H, pe) { + let X = oe.getValue(), le = [], Ae = oe.map((ye) => ye.map((Ce, Be) => { + let ve = $(pe(), H).formatted, ze = u(ve); + return le[Be] = Math.max(le[Be] || 3, ze), { text: ve, width: ze }; + }, "children"), "children"), Ee = A(false); + if (H.proseWrap !== "never") + return [l, Ee]; + let De = A(true); + return [l, N(F(De, Ee))]; + function A(ye) { + let Ce = [re(Ae[0], ye), G(ye)]; + return Ae.length > 1 && Ce.push(p2(x, Ae.slice(1).map((Be) => re(Be, ye)))), p2(x, Ce); + } + function G(ye) { + return `| ${le.map((Be, ve) => { + let ze = X.align[ve], be = ze === "center" || ze === "left" ? ":" : "-", Ye = ze === "center" || ze === "right" ? ":" : "-", Se = ye ? "-" : "-".repeat(Be - 2); + return `${be}${Se}${Ye}`; + }).join(" | ")} |`; + } + function re(ye, Ce) { + return `| ${ye.map((ve, ze) => { + let { text: be, width: Ye } = ve; + if (Ce) + return be; + let Se = le[ze] - Ye, Ie = X.align[ze], Oe = 0; + Ie === "right" ? Oe = Se : Ie === "center" && (Oe = Math.floor(Se / 2)); + let Je = Se - Oe; + return `${" ".repeat(Oe)}${be}${" ".repeat(Je)}`; + }).join(" | ")} |`; + } + } + function de(oe, H, pe) { + let X = [], le = null, { children: Ae } = oe.getValue(); + for (let [Ee, De] of Ae.entries()) + switch (U(De)) { + case "start": + le === null && (le = { index: Ee, offset: De.position.end.offset }); + break; + case "end": + le !== null && (X.push({ start: le, end: { index: Ee, offset: De.position.start.offset } }), le = null); + break; + default: + break; + } + return ue(oe, H, pe, { processor: (Ee, De) => { + if (X.length > 0) { + let A = X[0]; + if (De === A.start.index) + return [Fe(Ae[A.start.index]), H.originalText.slice(A.start.offset, A.end.offset), Fe(Ae[A.end.index])]; + if (A.start.index < De && De < A.end.index) + return false; + if (De === A.end.index) + return X.shift(), false; + } + return pe(); + } }); + } + function ue(oe, H, pe) { + let X = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { postprocessor: le } = X, Ae = X.processor || (() => pe()), Ee = oe.getValue(), De = [], A; + return oe.each((G, re) => { + let ye = G.getValue(), Ce = Ae(G, re); + if (Ce !== false) { + let Be = { parts: De, prevNode: A, parentNode: Ee, options: H }; + Z(ye, Be) && (De.push(c), A && q.has(A.type) || (se(ye, Be) || fe(ye, Be)) && De.push(c), fe(ye, Be) && De.push(c)), De.push(Ce), A = ye; + } + }, "children"), le ? le(De) : De; + } + function Fe(oe) { + if (oe.type === "html") + return oe.value; + if (oe.type === "paragraph" && Array.isArray(oe.children) && oe.children.length === 1 && oe.children[0].type === "esComment") + return ["{/* ", oe.children[0].value, " */}"]; + } + function z(oe) { + let H = oe; + for (; i(H.children); ) + H = s(H.children); + return H; + } + function U(oe) { + let H; + if (oe.type === "html") + H = oe.value.match(/^$/); + else { + let pe; + oe.type === "esComment" ? pe = oe : oe.type === "paragraph" && oe.children.length === 1 && oe.children[0].type === "esComment" && (pe = oe.children[0]), pe && (H = pe.value.match(/^prettier-ignore(?:-(start|end))?$/)); + } + return H ? H[1] || "next" : false; + } + function Z(oe, H) { + let pe = H.parts.length === 0, X = k.includes(oe.type), le = oe.type === "html" && M.includes(H.parentNode.type); + return !pe && !X && !le; + } + function se(oe, H) { + var pe, X, le; + let Ee = (H.prevNode && H.prevNode.type) === oe.type && L.has(oe.type), De = H.parentNode.type === "listItem" && !H.parentNode.loose, A = ((pe = H.prevNode) === null || pe === void 0 ? void 0 : pe.type) === "listItem" && H.prevNode.loose, G = U(H.prevNode) === "next", re = oe.type === "html" && ((X = H.prevNode) === null || X === void 0 ? void 0 : X.type) === "html" && H.prevNode.position.end.line + 1 === oe.position.start.line, ye = oe.type === "html" && H.parentNode.type === "listItem" && ((le = H.prevNode) === null || le === void 0 ? void 0 : le.type) === "paragraph" && H.prevNode.position.end.line + 1 === oe.position.start.line; + return A || !(Ee || De || G || re || ye); + } + function fe(oe, H) { + let pe = H.prevNode && H.prevNode.type === "list", X = oe.type === "code" && oe.isIndented; + return pe && X; + } + function ge(oe) { + let H = ce(oe, ["linkReference", "imageReference"]); + return H && (H.type !== "linkReference" || H.referenceType !== "full"); + } + function he(oe) { + let H = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], pe = [" ", ...Array.isArray(H) ? H : [H]]; + return new RegExp(pe.map((X) => `\\${X}`).join("|")).test(oe) ? `<${oe}>` : oe; + } + function we(oe, H) { + let pe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + if (!oe) + return ""; + if (pe) + return " " + we(oe, H, false); + if (oe = oe.replace(/\\(["')])/g, "$1"), oe.includes('"') && oe.includes("'") && !oe.includes(")")) + return `(${oe})`; + let X = oe.split("'").length - 1, le = oe.split('"').length - 1, Ae = X > le ? '"' : le > X || H.singleQuote ? "'" : '"'; + return oe = oe.replace(/\\/, "\\\\"), oe = oe.replace(new RegExp(`(${Ae})`, "g"), "\\$1"), `${Ae}${oe}${Ae}`; + } + function ke(oe, H, pe) { + return oe < H ? H : oe > pe ? pe : oe; + } + function Re(oe) { + let H = Number(oe.getName()); + if (H === 0) + return false; + let pe = oe.getParentNode().children[H - 1]; + return U(pe) === "next"; + } + function Ne(oe) { + return `[${t2(oe.label)}]`; + } + function Pe(oe) { + return `[^${oe.label}]`; + } + r.exports = { preprocess: o, print: Q, embed: D, massageAstNode: d, hasPrettierIgnore: Re, insertPragma: T }; + } }), Dg = te({ "src/language-markdown/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { proseWrap: t2.proseWrap, singleQuote: t2.singleQuote }; + } }), mg = te({ "src/language-markdown/parsers.js"() { + ne(); + } }), _a3 = te({ "node_modules/linguist-languages/data/Markdown.json"(e, r) { + r.exports = { name: "Markdown", type: "prose", color: "#083fa1", aliases: ["pandoc"], aceMode: "markdown", codemirrorMode: "gfm", codemirrorMimeType: "text/x-gfm", wrap: true, extensions: [".md", ".livemd", ".markdown", ".mdown", ".mdwn", ".mdx", ".mkd", ".mkdn", ".mkdown", ".ronn", ".scd", ".workbook"], filenames: ["contents.lr"], tmScope: "source.gfm", languageId: 222 }; + } }), dg = te({ "src/language-markdown/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = fg(), a = Dg(), n = mg(), u = [t2(_a3(), (l) => ({ since: "1.8.0", parsers: ["markdown"], vscodeLanguageIds: ["markdown"], filenames: [...l.filenames, "README"], extensions: l.extensions.filter((p2) => p2 !== ".mdx") })), t2(_a3(), () => ({ name: "MDX", since: "1.15.0", parsers: ["mdx"], vscodeLanguageIds: ["mdx"], filenames: [], extensions: [".mdx"] }))], i = { mdast: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), gg = te({ "src/language-html/clean.js"(e, r) { + "use strict"; + ne(); + var { isFrontMatterNode: t2 } = Ue(), s = /* @__PURE__ */ new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan"]); + function a(n, u) { + if (n.type === "text" || n.type === "comment" || t2(n) || n.type === "yaml" || n.type === "toml") + return null; + n.type === "attribute" && delete u.value, n.type === "docType" && delete u.value; + } + a.ignoredProperties = s, r.exports = a; + } }), yg = te({ "src/language-html/constants.evaluate.js"(e, r) { + r.exports = { CSS_DISPLAY_TAGS: { area: "none", base: "none", basefont: "none", datalist: "none", head: "none", link: "none", meta: "none", noembed: "none", noframes: "none", param: "block", rp: "none", script: "block", source: "block", style: "none", template: "inline", track: "block", title: "none", html: "block", body: "block", address: "block", blockquote: "block", center: "block", div: "block", figure: "block", figcaption: "block", footer: "block", form: "block", header: "block", hr: "block", legend: "block", listing: "block", main: "block", p: "block", plaintext: "block", pre: "block", xmp: "block", slot: "contents", ruby: "ruby", rt: "ruby-text", article: "block", aside: "block", h1: "block", h2: "block", h3: "block", h4: "block", h5: "block", h6: "block", hgroup: "block", nav: "block", section: "block", dir: "block", dd: "block", dl: "block", dt: "block", ol: "block", ul: "block", li: "list-item", table: "table", caption: "table-caption", colgroup: "table-column-group", col: "table-column", thead: "table-header-group", tbody: "table-row-group", tfoot: "table-footer-group", tr: "table-row", td: "table-cell", th: "table-cell", fieldset: "block", button: "inline-block", details: "block", summary: "block", dialog: "block", meter: "inline-block", progress: "inline-block", object: "inline-block", video: "inline-block", audio: "inline-block", select: "inline-block", option: "block", optgroup: "block" }, CSS_DISPLAY_DEFAULT: "inline", CSS_WHITE_SPACE_TAGS: { listing: "pre", plaintext: "pre", pre: "pre", xmp: "pre", nobr: "nowrap", table: "initial", textarea: "pre-wrap" }, CSS_WHITE_SPACE_DEFAULT: "normal" }; + } }), hg = te({ "src/language-html/utils/is-unknown-namespace.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return s.type === "element" && !s.hasExplicitNamespace && !["html", "svg"].includes(s.namespace); + } + r.exports = t2; + } }), Rt = te({ "src/language-html/utils/index.js"(e, r) { + "use strict"; + ne(); + var { inferParserByLanguage: t2, isFrontMatterNode: s } = Ue(), { builders: { line: a, hardline: n, join: u }, utils: { getDocParts: i, replaceTextEndOfLine: l } } = qe(), { CSS_DISPLAY_TAGS: p2, CSS_DISPLAY_DEFAULT: y, CSS_WHITE_SPACE_TAGS: h, CSS_WHITE_SPACE_DEFAULT: g } = yg(), c = hg(), f = /* @__PURE__ */ new Set([" ", ` +`, "\f", "\r", " "]), F = (A) => A.replace(/^[\t\n\f\r ]+/, ""), _ = (A) => A.replace(/[\t\n\f\r ]+$/, ""), w = (A) => F(_(A)), E = (A) => A.replace(/^[\t\f\r ]*\n/g, ""), N = (A) => E(_(A)), x = (A) => A.split(/[\t\n\f\r ]+/), I = (A) => A.match(/^[\t\n\f\r ]*/)[0], P = (A) => { + let [, G, re, ye] = A.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s); + return { leadingWhitespace: G, trailingWhitespace: ye, text: re }; + }, $ = (A) => /[\t\n\f\r ]/.test(A); + function D(A, G) { + return !!(A.type === "ieConditionalComment" && A.lastChild && !A.lastChild.isSelfClosing && !A.lastChild.endSourceSpan || A.type === "ieConditionalComment" && !A.complete || se(A) && A.children.some((re) => re.type !== "text" && re.type !== "interpolation") || X(A, G) && !o(A) && A.type !== "interpolation"); + } + function T(A) { + return A.type === "attribute" || !A.parent || !A.prev ? false : m(A.prev); + } + function m(A) { + return A.type === "comment" && A.value.trim() === "prettier-ignore"; + } + function C(A) { + return A.type === "text" || A.type === "comment"; + } + function o(A) { + return A.type === "element" && (A.fullName === "script" || A.fullName === "style" || A.fullName === "svg:style" || c(A) && (A.name === "script" || A.name === "style")); + } + function d(A) { + return A.children && !o(A); + } + function v(A) { + return o(A) || A.type === "interpolation" || S(A); + } + function S(A) { + return we(A).startsWith("pre"); + } + function b(A, G) { + let re = ye(); + if (re && !A.prev && A.parent && A.parent.tagDefinition && A.parent.tagDefinition.ignoreFirstLf) + return A.type === "interpolation"; + return re; + function ye() { + return s(A) ? false : (A.type === "text" || A.type === "interpolation") && A.prev && (A.prev.type === "text" || A.prev.type === "interpolation") ? true : !A.parent || A.parent.cssDisplay === "none" ? false : se(A.parent) ? true : !(!A.prev && (A.parent.type === "root" || se(A) && A.parent || o(A.parent) || H(A.parent, G) || !ue(A.parent.cssDisplay)) || A.prev && !U(A.prev.cssDisplay)); + } + } + function B(A, G) { + return s(A) ? false : (A.type === "text" || A.type === "interpolation") && A.next && (A.next.type === "text" || A.next.type === "interpolation") ? true : !A.parent || A.parent.cssDisplay === "none" ? false : se(A.parent) ? true : !(!A.next && (A.parent.type === "root" || se(A) && A.parent || o(A.parent) || H(A.parent, G) || !Fe(A.parent.cssDisplay)) || A.next && !z(A.next.cssDisplay)); + } + function k(A) { + return Z(A.cssDisplay) && !o(A); + } + function M(A) { + return s(A) || A.next && A.sourceSpan.end && A.sourceSpan.end.line + 1 < A.next.sourceSpan.start.line; + } + function R(A) { + return q(A) || A.type === "element" && A.children.length > 0 && (["body", "script", "style"].includes(A.name) || A.children.some((G) => ee(G))) || A.firstChild && A.firstChild === A.lastChild && A.firstChild.type !== "text" && V(A.firstChild) && (!A.lastChild.isTrailingSpaceSensitive || j(A.lastChild)); + } + function q(A) { + return A.type === "element" && A.children.length > 0 && (["html", "head", "ul", "ol", "select"].includes(A.name) || A.cssDisplay.startsWith("table") && A.cssDisplay !== "table-cell"); + } + function J(A) { + return Y(A) || A.prev && L(A.prev) || Q(A); + } + function L(A) { + return Y(A) || A.type === "element" && A.fullName === "br" || Q(A); + } + function Q(A) { + return V(A) && j(A); + } + function V(A) { + return A.hasLeadingSpaces && (A.prev ? A.prev.sourceSpan.end.line < A.sourceSpan.start.line : A.parent.type === "root" || A.parent.startSourceSpan.end.line < A.sourceSpan.start.line); + } + function j(A) { + return A.hasTrailingSpaces && (A.next ? A.next.sourceSpan.start.line > A.sourceSpan.end.line : A.parent.type === "root" || A.parent.endSourceSpan && A.parent.endSourceSpan.start.line > A.sourceSpan.end.line); + } + function Y(A) { + switch (A.type) { + case "ieConditionalComment": + case "comment": + case "directive": + return true; + case "element": + return ["script", "select"].includes(A.name); + } + return false; + } + function ie(A) { + return A.lastChild ? ie(A.lastChild) : A; + } + function ee(A) { + return A.children && A.children.some((G) => G.type !== "text"); + } + function ce(A) { + let { type: G, lang: re } = A.attrMap; + if (G === "module" || G === "text/javascript" || G === "text/babel" || G === "application/javascript" || re === "jsx") + return "babel"; + if (G === "application/x-typescript" || re === "ts" || re === "tsx") + return "typescript"; + if (G === "text/markdown") + return "markdown"; + if (G === "text/html") + return "html"; + if (G && (G.endsWith("json") || G.endsWith("importmap")) || G === "speculationrules") + return "json"; + if (G === "text/x-handlebars-template") + return "glimmer"; + } + function W(A, G) { + let { lang: re } = A.attrMap; + if (!re || re === "postcss" || re === "css") + return "css"; + if (re === "scss") + return "scss"; + if (re === "less") + return "less"; + if (re === "stylus") + return t2("stylus", G); + } + function K(A, G) { + if (A.name === "script" && !A.attrMap.src) + return !A.attrMap.lang && !A.attrMap.type ? "babel" : ce(A); + if (A.name === "style") + return W(A, G); + if (G && X(A, G)) + return ce(A) || !("src" in A.attrMap) && t2(A.attrMap.lang, G); + } + function de(A) { + return A === "block" || A === "list-item" || A.startsWith("table"); + } + function ue(A) { + return !de(A) && A !== "inline-block"; + } + function Fe(A) { + return !de(A) && A !== "inline-block"; + } + function z(A) { + return !de(A); + } + function U(A) { + return !de(A); + } + function Z(A) { + return !de(A) && A !== "inline-block"; + } + function se(A) { + return we(A).startsWith("pre"); + } + function fe(A, G) { + let re = 0; + for (let ye = A.stack.length - 1; ye >= 0; ye--) { + let Ce = A.stack[ye]; + Ce && typeof Ce == "object" && !Array.isArray(Ce) && G(Ce) && re++; + } + return re; + } + function ge(A, G) { + let re = A; + for (; re; ) { + if (G(re)) + return true; + re = re.parent; + } + return false; + } + function he(A, G) { + if (A.prev && A.prev.type === "comment") { + let ye = A.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/); + if (ye) + return ye[1]; + } + let re = false; + if (A.type === "element" && A.namespace === "svg") + if (ge(A, (ye) => ye.fullName === "svg:foreignObject")) + re = true; + else + return A.name === "svg" ? "inline-block" : "block"; + switch (G.htmlWhitespaceSensitivity) { + case "strict": + return "inline"; + case "ignore": + return "block"; + default: + return G.parser === "vue" && A.parent && A.parent.type === "root" ? "block" : A.type === "element" && (!A.namespace || re || c(A)) && p2[A.name] || y; + } + } + function we(A) { + return A.type === "element" && (!A.namespace || c(A)) && h[A.name] || g; + } + function ke(A) { + let G = Number.POSITIVE_INFINITY; + for (let re of A.split(` +`)) { + if (re.length === 0) + continue; + if (!f.has(re[0])) + return 0; + let ye = I(re).length; + re.length !== ye && ye < G && (G = ye); + } + return G === Number.POSITIVE_INFINITY ? 0 : G; + } + function Re(A) { + let G = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ke(A); + return G === 0 ? A : A.split(` +`).map((re) => re.slice(G)).join(` +`); + } + function Ne(A, G) { + let re = 0; + for (let ye = 0; ye < A.length; ye++) + A[ye] === G && re++; + return re; + } + function Pe(A) { + return A.replace(/'/g, "'").replace(/"/g, '"'); + } + var oe = /* @__PURE__ */ new Set(["template", "style", "script"]); + function H(A, G) { + return pe(A, G) && !oe.has(A.fullName); + } + function pe(A, G) { + return G.parser === "vue" && A.type === "element" && A.parent.type === "root" && A.fullName.toLowerCase() !== "html"; + } + function X(A, G) { + return pe(A, G) && (H(A, G) || A.attrMap.lang && A.attrMap.lang !== "html"); + } + function le(A) { + let G = A.fullName; + return G.charAt(0) === "#" || G === "slot-scope" || G === "v-slot" || G.startsWith("v-slot:"); + } + function Ae(A, G) { + let re = A.parent; + if (!pe(re, G)) + return false; + let ye = re.fullName, Ce = A.fullName; + return ye === "script" && Ce === "setup" || ye === "style" && Ce === "vars"; + } + function Ee(A) { + let G = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : A.value; + return A.parent.isWhitespaceSensitive ? A.parent.isIndentationSensitive ? l(G) : l(Re(N(G)), n) : i(u(a, x(G))); + } + function De(A, G) { + return pe(A, G) && A.name === "script"; + } + r.exports = { htmlTrim: w, htmlTrimPreserveIndentation: N, hasHtmlWhitespace: $, getLeadingAndTrailingHtmlWhitespace: P, canHaveInterpolation: d, countChars: Ne, countParents: fe, dedentString: Re, forceBreakChildren: q, forceBreakContent: R, forceNextEmptyLine: M, getLastDescendant: ie, getNodeCssStyleDisplay: he, getNodeCssStyleWhiteSpace: we, hasPrettierIgnore: T, inferScriptParser: K, isVueCustomBlock: H, isVueNonHtmlBlock: X, isVueScriptTag: De, isVueSlotAttribute: le, isVueSfcBindingsAttribute: Ae, isVueSfcBlock: pe, isDanglingSpaceSensitiveNode: k, isIndentationSensitiveNode: S, isLeadingSpaceSensitiveNode: b, isPreLikeNode: se, isScriptLikeTag: o, isTextLikeNode: C, isTrailingSpaceSensitiveNode: B, isWhitespaceSensitiveNode: v, isUnknownNamespace: c, preferHardlineAsLeadingSpaces: J, preferHardlineAsTrailingSpaces: L, shouldPreserveContent: D, unescapeQuoteEntities: Pe, getTextValueParts: Ee }; + } }), vg = te({ "node_modules/angular-html-parser/lib/compiler/src/chars.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.$EOF = 0, e.$BSPACE = 8, e.$TAB = 9, e.$LF = 10, e.$VTAB = 11, e.$FF = 12, e.$CR = 13, e.$SPACE = 32, e.$BANG = 33, e.$DQ = 34, e.$HASH = 35, e.$$ = 36, e.$PERCENT = 37, e.$AMPERSAND = 38, e.$SQ = 39, e.$LPAREN = 40, e.$RPAREN = 41, e.$STAR = 42, e.$PLUS = 43, e.$COMMA = 44, e.$MINUS = 45, e.$PERIOD = 46, e.$SLASH = 47, e.$COLON = 58, e.$SEMICOLON = 59, e.$LT = 60, e.$EQ = 61, e.$GT = 62, e.$QUESTION = 63, e.$0 = 48, e.$7 = 55, e.$9 = 57, e.$A = 65, e.$E = 69, e.$F = 70, e.$X = 88, e.$Z = 90, e.$LBRACKET = 91, e.$BACKSLASH = 92, e.$RBRACKET = 93, e.$CARET = 94, e.$_ = 95, e.$a = 97, e.$b = 98, e.$e = 101, e.$f = 102, e.$n = 110, e.$r = 114, e.$t = 116, e.$u = 117, e.$v = 118, e.$x = 120, e.$z = 122, e.$LBRACE = 123, e.$BAR = 124, e.$RBRACE = 125, e.$NBSP = 160, e.$PIPE = 124, e.$TILDA = 126, e.$AT = 64, e.$BT = 96; + function r(i) { + return i >= e.$TAB && i <= e.$SPACE || i == e.$NBSP; + } + e.isWhitespace = r; + function t2(i) { + return e.$0 <= i && i <= e.$9; + } + e.isDigit = t2; + function s(i) { + return i >= e.$a && i <= e.$z || i >= e.$A && i <= e.$Z; + } + e.isAsciiLetter = s; + function a(i) { + return i >= e.$a && i <= e.$f || i >= e.$A && i <= e.$F || t2(i); + } + e.isAsciiHexDigit = a; + function n(i) { + return i === e.$LF || i === e.$CR; + } + e.isNewLine = n; + function u(i) { + return e.$0 <= i && i <= e.$7; + } + e.isOctalDigit = u; + } }), Cg = te({ "node_modules/angular-html-parser/lib/compiler/src/aot/static_symbol.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = class { + constructor(s, a, n) { + this.filePath = s, this.name = a, this.members = n; + } + assertNoMembers() { + if (this.members.length) + throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`); + } + }; + e.StaticSymbol = r; + var t2 = class { + constructor() { + this.cache = /* @__PURE__ */ new Map(); + } + get(s, a, n) { + n = n || []; + let u = n.length ? `.${n.join(".")}` : "", i = `"${s}".${a}${u}`, l = this.cache.get(i); + return l || (l = new r(s, a, n), this.cache.set(i, l)), l; + } + }; + e.StaticSymbolCache = t2; + } }), Eg = te({ "node_modules/angular-html-parser/lib/compiler/src/util.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = /-+([a-z0-9])/g; + function t2(o) { + return o.replace(r, function() { + for (var d = arguments.length, v = new Array(d), S = 0; S < d; S++) + v[S] = arguments[S]; + return v[1].toUpperCase(); + }); + } + e.dashCaseToCamelCase = t2; + function s(o, d) { + return n(o, ":", d); + } + e.splitAtColon = s; + function a(o, d) { + return n(o, ".", d); + } + e.splitAtPeriod = a; + function n(o, d, v) { + let S = o.indexOf(d); + return S == -1 ? v : [o.slice(0, S).trim(), o.slice(S + 1).trim()]; + } + function u(o, d, v) { + return Array.isArray(o) ? d.visitArray(o, v) : E(o) ? d.visitStringMap(o, v) : o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? d.visitPrimitive(o, v) : d.visitOther(o, v); + } + e.visitValue = u; + function i(o) { + return o != null; + } + e.isDefined = i; + function l(o) { + return o === void 0 ? null : o; + } + e.noUndefined = l; + var p2 = class { + visitArray(o, d) { + return o.map((v) => u(v, this, d)); + } + visitStringMap(o, d) { + let v = {}; + return Object.keys(o).forEach((S) => { + v[S] = u(o[S], this, d); + }), v; + } + visitPrimitive(o, d) { + return o; + } + visitOther(o, d) { + return o; + } + }; + e.ValueTransformer = p2, e.SyncAsync = { assertSync: (o) => { + if (P(o)) + throw new Error("Illegal state: value cannot be a promise"); + return o; + }, then: (o, d) => P(o) ? o.then(d) : d(o), all: (o) => o.some(P) ? Promise.all(o) : o }; + function y(o) { + throw new Error(`Internal Error: ${o}`); + } + e.error = y; + function h(o, d) { + let v = Error(o); + return v[g] = true, d && (v[c] = d), v; + } + e.syntaxError = h; + var g = "ngSyntaxError", c = "ngParseErrors"; + function f(o) { + return o[g]; + } + e.isSyntaxError = f; + function F(o) { + return o[c] || []; + } + e.getParseErrors = F; + function _(o) { + return o.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); + } + e.escapeRegExp = _; + var w = Object.getPrototypeOf({}); + function E(o) { + return typeof o == "object" && o !== null && Object.getPrototypeOf(o) === w; + } + function N(o) { + let d = ""; + for (let v = 0; v < o.length; v++) { + let S = o.charCodeAt(v); + if (S >= 55296 && S <= 56319 && o.length > v + 1) { + let b = o.charCodeAt(v + 1); + b >= 56320 && b <= 57343 && (v++, S = (S - 55296 << 10) + b - 56320 + 65536); + } + S <= 127 ? d += String.fromCharCode(S) : S <= 2047 ? d += String.fromCharCode(S >> 6 & 31 | 192, S & 63 | 128) : S <= 65535 ? d += String.fromCharCode(S >> 12 | 224, S >> 6 & 63 | 128, S & 63 | 128) : S <= 2097151 && (d += String.fromCharCode(S >> 18 & 7 | 240, S >> 12 & 63 | 128, S >> 6 & 63 | 128, S & 63 | 128)); + } + return d; + } + e.utf8Encode = N; + function x(o) { + if (typeof o == "string") + return o; + if (o instanceof Array) + return "[" + o.map(x).join(", ") + "]"; + if (o == null) + return "" + o; + if (o.overriddenName) + return `${o.overriddenName}`; + if (o.name) + return `${o.name}`; + if (!o.toString) + return "object"; + let d = o.toString(); + if (d == null) + return "" + d; + let v = d.indexOf(` +`); + return v === -1 ? d : d.substring(0, v); + } + e.stringify = x; + function I(o) { + return typeof o == "function" && o.hasOwnProperty("__forward_ref__") ? o() : o; + } + e.resolveForwardRef = I; + function P(o) { + return !!o && typeof o.then == "function"; + } + e.isPromise = P; + var $ = class { + constructor(o) { + this.full = o; + let d = o.split("."); + this.major = d[0], this.minor = d[1], this.patch = d.slice(2).join("."); + } + }; + e.Version = $; + var D = typeof window < "u" && window, T = typeof self < "u" && typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && self, m = typeof globalThis < "u" && globalThis, C = m || D || T; + e.global = C; + } }), Fg = te({ "node_modules/angular-html-parser/lib/compiler/src/compile_metadata.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Cg(), t2 = Eg(), s = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/; + function a(v) { + return v.replace(/\W/g, "_"); + } + e.sanitizeIdentifier = a; + var n = 0; + function u(v) { + if (!v || !v.reference) + return null; + let S = v.reference; + if (S instanceof r.StaticSymbol) + return S.name; + if (S.__anonymousType) + return S.__anonymousType; + let b = t2.stringify(S); + return b.indexOf("(") >= 0 ? (b = `anonymous_${n++}`, S.__anonymousType = b) : b = a(b), b; + } + e.identifierName = u; + function i(v) { + let S = v.reference; + return S instanceof r.StaticSymbol ? S.filePath : `./${t2.stringify(S)}`; + } + e.identifierModuleUrl = i; + function l(v, S) { + return `View_${u({ reference: v })}_${S}`; + } + e.viewClassName = l; + function p2(v) { + return `RenderType_${u({ reference: v })}`; + } + e.rendererTypeName = p2; + function y(v) { + return `HostView_${u({ reference: v })}`; + } + e.hostViewClassName = y; + function h(v) { + return `${u({ reference: v })}NgFactory`; + } + e.componentFactoryName = h; + var g; + (function(v) { + v[v.Pipe = 0] = "Pipe", v[v.Directive = 1] = "Directive", v[v.NgModule = 2] = "NgModule", v[v.Injectable = 3] = "Injectable"; + })(g = e.CompileSummaryKind || (e.CompileSummaryKind = {})); + function c(v) { + return v.value != null ? a(v.value) : u(v.identifier); + } + e.tokenName = c; + function f(v) { + return v.identifier != null ? v.identifier.reference : v.value; + } + e.tokenReference = f; + var F = class { + constructor() { + let { moduleUrl: v, styles: S, styleUrls: b } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + this.moduleUrl = v || null, this.styles = P(S), this.styleUrls = P(b); + } + }; + e.CompileStylesheetMetadata = F; + var _ = class { + constructor(v) { + let { encapsulation: S, template: b, templateUrl: B, htmlAst: k, styles: M, styleUrls: R, externalStylesheets: q, animations: J, ngContentSelectors: L, interpolation: Q, isInline: V, preserveWhitespaces: j } = v; + if (this.encapsulation = S, this.template = b, this.templateUrl = B, this.htmlAst = k, this.styles = P(M), this.styleUrls = P(R), this.externalStylesheets = P(q), this.animations = J ? D(J) : [], this.ngContentSelectors = L || [], Q && Q.length != 2) + throw new Error("'interpolation' should have a start and an end symbol."); + this.interpolation = Q, this.isInline = V, this.preserveWhitespaces = j; + } + toSummary() { + return { ngContentSelectors: this.ngContentSelectors, encapsulation: this.encapsulation, styles: this.styles, animations: this.animations }; + } + }; + e.CompileTemplateMetadata = _; + var w = class { + static create(v) { + let { isHost: S, type: b, isComponent: B, selector: k, exportAs: M, changeDetection: R, inputs: q, outputs: J, host: L, providers: Q, viewProviders: V, queries: j, guards: Y, viewQueries: ie, entryComponents: ee, template: ce, componentViewType: W, rendererType: K, componentFactory: de } = v, ue = {}, Fe = {}, z = {}; + L != null && Object.keys(L).forEach((se) => { + let fe = L[se], ge = se.match(s); + ge === null ? z[se] = fe : ge[1] != null ? Fe[ge[1]] = fe : ge[2] != null && (ue[ge[2]] = fe); + }); + let U = {}; + q != null && q.forEach((se) => { + let fe = t2.splitAtColon(se, [se, se]); + U[fe[0]] = fe[1]; + }); + let Z = {}; + return J != null && J.forEach((se) => { + let fe = t2.splitAtColon(se, [se, se]); + Z[fe[0]] = fe[1]; + }), new w({ isHost: S, type: b, isComponent: !!B, selector: k, exportAs: M, changeDetection: R, inputs: U, outputs: Z, hostListeners: ue, hostProperties: Fe, hostAttributes: z, providers: Q, viewProviders: V, queries: j, guards: Y, viewQueries: ie, entryComponents: ee, template: ce, componentViewType: W, rendererType: K, componentFactory: de }); + } + constructor(v) { + let { isHost: S, type: b, isComponent: B, selector: k, exportAs: M, changeDetection: R, inputs: q, outputs: J, hostListeners: L, hostProperties: Q, hostAttributes: V, providers: j, viewProviders: Y, queries: ie, guards: ee, viewQueries: ce, entryComponents: W, template: K, componentViewType: de, rendererType: ue, componentFactory: Fe } = v; + this.isHost = !!S, this.type = b, this.isComponent = B, this.selector = k, this.exportAs = M, this.changeDetection = R, this.inputs = q, this.outputs = J, this.hostListeners = L, this.hostProperties = Q, this.hostAttributes = V, this.providers = P(j), this.viewProviders = P(Y), this.queries = P(ie), this.guards = ee, this.viewQueries = P(ce), this.entryComponents = P(W), this.template = K, this.componentViewType = de, this.rendererType = ue, this.componentFactory = Fe; + } + toSummary() { + return { summaryKind: g.Directive, type: this.type, isComponent: this.isComponent, selector: this.selector, exportAs: this.exportAs, inputs: this.inputs, outputs: this.outputs, hostListeners: this.hostListeners, hostProperties: this.hostProperties, hostAttributes: this.hostAttributes, providers: this.providers, viewProviders: this.viewProviders, queries: this.queries, guards: this.guards, viewQueries: this.viewQueries, entryComponents: this.entryComponents, changeDetection: this.changeDetection, template: this.template && this.template.toSummary(), componentViewType: this.componentViewType, rendererType: this.rendererType, componentFactory: this.componentFactory }; + } + }; + e.CompileDirectiveMetadata = w; + var E = class { + constructor(v) { + let { type: S, name: b, pure: B } = v; + this.type = S, this.name = b, this.pure = !!B; + } + toSummary() { + return { summaryKind: g.Pipe, type: this.type, name: this.name, pure: this.pure }; + } + }; + e.CompilePipeMetadata = E; + var N = class { + }; + e.CompileShallowModuleMetadata = N; + var x = class { + constructor(v) { + let { type: S, providers: b, declaredDirectives: B, exportedDirectives: k, declaredPipes: M, exportedPipes: R, entryComponents: q, bootstrapComponents: J, importedModules: L, exportedModules: Q, schemas: V, transitiveModule: j, id: Y } = v; + this.type = S || null, this.declaredDirectives = P(B), this.exportedDirectives = P(k), this.declaredPipes = P(M), this.exportedPipes = P(R), this.providers = P(b), this.entryComponents = P(q), this.bootstrapComponents = P(J), this.importedModules = P(L), this.exportedModules = P(Q), this.schemas = P(V), this.id = Y || null, this.transitiveModule = j || null; + } + toSummary() { + let v = this.transitiveModule; + return { summaryKind: g.NgModule, type: this.type, entryComponents: v.entryComponents, providers: v.providers, modules: v.modules, exportedDirectives: v.exportedDirectives, exportedPipes: v.exportedPipes }; + } + }; + e.CompileNgModuleMetadata = x; + var I = class { + constructor() { + this.directivesSet = /* @__PURE__ */ new Set(), this.directives = [], this.exportedDirectivesSet = /* @__PURE__ */ new Set(), this.exportedDirectives = [], this.pipesSet = /* @__PURE__ */ new Set(), this.pipes = [], this.exportedPipesSet = /* @__PURE__ */ new Set(), this.exportedPipes = [], this.modulesSet = /* @__PURE__ */ new Set(), this.modules = [], this.entryComponentsSet = /* @__PURE__ */ new Set(), this.entryComponents = [], this.providers = []; + } + addProvider(v, S) { + this.providers.push({ provider: v, module: S }); + } + addDirective(v) { + this.directivesSet.has(v.reference) || (this.directivesSet.add(v.reference), this.directives.push(v)); + } + addExportedDirective(v) { + this.exportedDirectivesSet.has(v.reference) || (this.exportedDirectivesSet.add(v.reference), this.exportedDirectives.push(v)); + } + addPipe(v) { + this.pipesSet.has(v.reference) || (this.pipesSet.add(v.reference), this.pipes.push(v)); + } + addExportedPipe(v) { + this.exportedPipesSet.has(v.reference) || (this.exportedPipesSet.add(v.reference), this.exportedPipes.push(v)); + } + addModule(v) { + this.modulesSet.has(v.reference) || (this.modulesSet.add(v.reference), this.modules.push(v)); + } + addEntryComponent(v) { + this.entryComponentsSet.has(v.componentType) || (this.entryComponentsSet.add(v.componentType), this.entryComponents.push(v)); + } + }; + e.TransitiveCompileNgModuleMetadata = I; + function P(v) { + return v || []; + } + var $ = class { + constructor(v, S) { + let { useClass: b, useValue: B, useExisting: k, useFactory: M, deps: R, multi: q } = S; + this.token = v, this.useClass = b || null, this.useValue = B, this.useExisting = k, this.useFactory = M || null, this.dependencies = R || null, this.multi = !!q; + } + }; + e.ProviderMeta = $; + function D(v) { + return v.reduce((S, b) => { + let B = Array.isArray(b) ? D(b) : b; + return S.concat(B); + }, []); + } + e.flatten = D; + function T(v) { + return v.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/, "ng:///"); + } + function m(v, S, b) { + let B; + return b.isInline ? S.type.reference instanceof r.StaticSymbol ? B = `${S.type.reference.filePath}.${S.type.reference.name}.html` : B = `${u(v)}/${u(S.type)}.html` : B = b.templateUrl, S.type.reference instanceof r.StaticSymbol ? B : T(B); + } + e.templateSourceUrl = m; + function C(v, S) { + let b = v.moduleUrl.split(/\/\\/g), B = b[b.length - 1]; + return T(`css/${S}${B}.ngstyle.js`); + } + e.sharedStylesheetJitUrl = C; + function o(v) { + return T(`${u(v.type)}/module.ngfactory.js`); + } + e.ngModuleJitUrl = o; + function d(v, S) { + return T(`${u(v)}/${u(S.type)}.ngfactory.js`); + } + e.templateJitUrl = d; + } }), Ag = te({ "node_modules/angular-html-parser/lib/compiler/src/parse_util.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = vg(), t2 = Fg(), s = class { + constructor(y, h, g, c) { + this.file = y, this.offset = h, this.line = g, this.col = c; + } + toString() { + return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url; + } + moveBy(y) { + let h = this.file.content, g = h.length, c = this.offset, f = this.line, F = this.col; + for (; c > 0 && y < 0; ) + if (c--, y++, h.charCodeAt(c) == r.$LF) { + f--; + let w = h.substr(0, c - 1).lastIndexOf(String.fromCharCode(r.$LF)); + F = w > 0 ? c - w : c; + } else + F--; + for (; c < g && y > 0; ) { + let _ = h.charCodeAt(c); + c++, y--, _ == r.$LF ? (f++, F = 0) : F++; + } + return new s(this.file, c, f, F); + } + getContext(y, h) { + let g = this.file.content, c = this.offset; + if (c != null) { + c > g.length - 1 && (c = g.length - 1); + let f = c, F = 0, _ = 0; + for (; F < y && c > 0 && (c--, F++, !(g[c] == ` +` && ++_ == h)); ) + ; + for (F = 0, _ = 0; F < y && f < g.length - 1 && (f++, F++, !(g[f] == ` +` && ++_ == h)); ) + ; + return { before: g.substring(c, this.offset), after: g.substring(this.offset, f + 1) }; + } + return null; + } + }; + e.ParseLocation = s; + var a = class { + constructor(y, h) { + this.content = y, this.url = h; + } + }; + e.ParseSourceFile = a; + var n = class { + constructor(y, h) { + let g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + this.start = y, this.end = h, this.details = g; + } + toString() { + return this.start.file.content.substring(this.start.offset, this.end.offset); + } + }; + e.ParseSourceSpan = n, e.EMPTY_PARSE_LOCATION = new s(new a("", ""), 0, 0, 0), e.EMPTY_SOURCE_SPAN = new n(e.EMPTY_PARSE_LOCATION, e.EMPTY_PARSE_LOCATION); + var u; + (function(y) { + y[y.WARNING = 0] = "WARNING", y[y.ERROR = 1] = "ERROR"; + })(u = e.ParseErrorLevel || (e.ParseErrorLevel = {})); + var i = class { + constructor(y, h) { + let g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : u.ERROR; + this.span = y, this.msg = h, this.level = g; + } + contextualMessage() { + let y = this.span.start.getContext(100, 3); + return y ? `${this.msg} ("${y.before}[${u[this.level]} ->]${y.after}")` : this.msg; + } + toString() { + let y = this.span.details ? `, ${this.span.details}` : ""; + return `${this.contextualMessage()}: ${this.span.start}${y}`; + } + }; + e.ParseError = i; + function l(y, h) { + let g = t2.identifierModuleUrl(h), c = g != null ? `in ${y} ${t2.identifierName(h)} in ${g}` : `in ${y} ${t2.identifierName(h)}`, f = new a("", c); + return new n(new s(f, -1, -1, -1), new s(f, -1, -1, -1)); + } + e.typeSourceSpan = l; + function p2(y, h, g) { + let c = `in ${y} ${h} in ${g}`, f = new a("", c); + return new n(new s(f, -1, -1, -1), new s(f, -1, -1, -1)); + } + e.r3JitTypeSourceSpan = p2; + } }), Sg = te({ "src/language-html/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var { ParseSourceSpan: t2 } = Ag(), { htmlTrim: s, getLeadingAndTrailingHtmlWhitespace: a, hasHtmlWhitespace: n, canHaveInterpolation: u, getNodeCssStyleDisplay: i, isDanglingSpaceSensitiveNode: l, isIndentationSensitiveNode: p2, isLeadingSpaceSensitiveNode: y, isTrailingSpaceSensitiveNode: h, isWhitespaceSensitiveNode: g, isVueScriptTag: c } = Rt(), f = [_, w, N, I, P, T, $, D, m, x, C]; + function F(o, d) { + for (let v of f) + v(o, d); + return o; + } + function _(o) { + o.walk((d) => { + if (d.type === "element" && d.tagDefinition.ignoreFirstLf && d.children.length > 0 && d.children[0].type === "text" && d.children[0].value[0] === ` +`) { + let v = d.children[0]; + v.value.length === 1 ? d.removeChild(v) : v.value = v.value.slice(1); + } + }); + } + function w(o) { + let d = (v) => v.type === "element" && v.prev && v.prev.type === "ieConditionalStartComment" && v.prev.sourceSpan.end.offset === v.startSourceSpan.start.offset && v.firstChild && v.firstChild.type === "ieConditionalEndComment" && v.firstChild.sourceSpan.start.offset === v.startSourceSpan.end.offset; + o.walk((v) => { + if (v.children) + for (let S = 0; S < v.children.length; S++) { + let b = v.children[S]; + if (!d(b)) + continue; + let B = b.prev, k = b.firstChild; + v.removeChild(B), S--; + let M = new t2(B.sourceSpan.start, k.sourceSpan.end), R = new t2(M.start, b.sourceSpan.end); + b.condition = B.condition, b.sourceSpan = R, b.startSourceSpan = M, b.removeChild(k); + } + }); + } + function E(o, d, v) { + o.walk((S) => { + if (S.children) + for (let b = 0; b < S.children.length; b++) { + let B = S.children[b]; + if (B.type !== "text" && !d(B)) + continue; + B.type !== "text" && (B.type = "text", B.value = v(B)); + let k = B.prev; + !k || k.type !== "text" || (k.value += B.value, k.sourceSpan = new t2(k.sourceSpan.start, B.sourceSpan.end), S.removeChild(B), b--); + } + }); + } + function N(o) { + return E(o, (d) => d.type === "cdata", (d) => ``); + } + function x(o) { + let d = (v) => v.type === "element" && v.attrs.length === 0 && v.children.length === 1 && v.firstChild.type === "text" && !n(v.children[0].value) && !v.firstChild.hasLeadingSpaces && !v.firstChild.hasTrailingSpaces && v.isLeadingSpaceSensitive && !v.hasLeadingSpaces && v.isTrailingSpaceSensitive && !v.hasTrailingSpaces && v.prev && v.prev.type === "text" && v.next && v.next.type === "text"; + o.walk((v) => { + if (v.children) + for (let S = 0; S < v.children.length; S++) { + let b = v.children[S]; + if (!d(b)) + continue; + let B = b.prev, k = b.next; + B.value += `<${b.rawName}>` + b.firstChild.value + `` + k.value, B.sourceSpan = new t2(B.sourceSpan.start, k.sourceSpan.end), B.isTrailingSpaceSensitive = k.isTrailingSpaceSensitive, B.hasTrailingSpaces = k.hasTrailingSpaces, v.removeChild(b), S--, v.removeChild(k); + } + }); + } + function I(o, d) { + if (d.parser === "html") + return; + let v = /{{(.+?)}}/s; + o.walk((S) => { + if (u(S)) + for (let b of S.children) { + if (b.type !== "text") + continue; + let B = b.sourceSpan.start, k = null, M = b.value.split(v); + for (let R = 0; R < M.length; R++, B = k) { + let q = M[R]; + if (R % 2 === 0) { + k = B.moveBy(q.length), q.length > 0 && S.insertChildBefore(b, { type: "text", value: q, sourceSpan: new t2(B, k) }); + continue; + } + k = B.moveBy(q.length + 4), S.insertChildBefore(b, { type: "interpolation", sourceSpan: new t2(B, k), children: q.length === 0 ? [] : [{ type: "text", value: q, sourceSpan: new t2(B.moveBy(2), k.moveBy(-2)) }] }); + } + S.removeChild(b); + } + }); + } + function P(o) { + o.walk((d) => { + if (!d.children) + return; + if (d.children.length === 0 || d.children.length === 1 && d.children[0].type === "text" && s(d.children[0].value).length === 0) { + d.hasDanglingSpaces = d.children.length > 0, d.children = []; + return; + } + let v = g(d), S = p2(d); + if (!v) + for (let b = 0; b < d.children.length; b++) { + let B = d.children[b]; + if (B.type !== "text") + continue; + let { leadingWhitespace: k, text: M, trailingWhitespace: R } = a(B.value), q = B.prev, J = B.next; + M ? (B.value = M, B.sourceSpan = new t2(B.sourceSpan.start.moveBy(k.length), B.sourceSpan.end.moveBy(-R.length)), k && (q && (q.hasTrailingSpaces = true), B.hasLeadingSpaces = true), R && (B.hasTrailingSpaces = true, J && (J.hasLeadingSpaces = true))) : (d.removeChild(B), b--, (k || R) && (q && (q.hasTrailingSpaces = true), J && (J.hasLeadingSpaces = true))); + } + d.isWhitespaceSensitive = v, d.isIndentationSensitive = S; + }); + } + function $(o) { + o.walk((d) => { + d.isSelfClosing = !d.children || d.type === "element" && (d.tagDefinition.isVoid || d.startSourceSpan === d.endSourceSpan); + }); + } + function D(o, d) { + o.walk((v) => { + v.type === "element" && (v.hasHtmComponentClosingTag = v.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(d.originalText.slice(v.endSourceSpan.start.offset, v.endSourceSpan.end.offset))); + }); + } + function T(o, d) { + o.walk((v) => { + v.cssDisplay = i(v, d); + }); + } + function m(o, d) { + o.walk((v) => { + let { children: S } = v; + if (S) { + if (S.length === 0) { + v.isDanglingSpaceSensitive = l(v); + return; + } + for (let b of S) + b.isLeadingSpaceSensitive = y(b, d), b.isTrailingSpaceSensitive = h(b, d); + for (let b = 0; b < S.length; b++) { + let B = S[b]; + B.isLeadingSpaceSensitive = (b === 0 || B.prev.isTrailingSpaceSensitive) && B.isLeadingSpaceSensitive, B.isTrailingSpaceSensitive = (b === S.length - 1 || B.next.isLeadingSpaceSensitive) && B.isTrailingSpaceSensitive; + } + } + }); + } + function C(o, d) { + if (d.parser === "vue") { + let v = o.children.find((b) => c(b, d)); + if (!v) + return; + let { lang: S } = v.attrMap; + (S === "ts" || S === "typescript") && (d.__should_parse_vue_template_with_ts = true); + } + } + r.exports = F; + } }), xg = te({ "src/language-html/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return /^\s*/.test(a); + } + function s(a) { + return ` + +` + a.replace(/^\s*\n/, ""); + } + r.exports = { hasPragma: t2, insertPragma: s }; + } }), au = te({ "src/language-html/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.sourceSpan.start.offset; + } + function s(a) { + return a.sourceSpan.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), ur = te({ "src/language-html/print/tag.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { isNonEmptyArray: s } = Ue(), { builders: { indent: a, join: n, line: u, softline: i, hardline: l }, utils: { replaceTextEndOfLine: p2 } } = qe(), { locStart: y, locEnd: h } = au(), { isTextLikeNode: g, getLastDescendant: c, isPreLikeNode: f, hasPrettierIgnore: F, shouldPreserveContent: _, isVueSfcBlock: w } = Rt(); + function E(L, Q) { + return [L.isSelfClosing ? "" : N(L, Q), x(L, Q)]; + } + function N(L, Q) { + return L.lastChild && o(L.lastChild) ? "" : [I(L, Q), $(L, Q)]; + } + function x(L, Q) { + return (L.next ? m(L.next) : C(L.parent)) ? "" : [D(L, Q), P(L, Q)]; + } + function I(L, Q) { + return C(L) ? D(L.lastChild, Q) : ""; + } + function P(L, Q) { + return o(L) ? $(L.parent, Q) : d(L) ? q(L.next) : ""; + } + function $(L, Q) { + if (t2(!L.isSelfClosing), T(L, Q)) + return ""; + switch (L.type) { + case "ieConditionalComment": + return ""; + case "ieConditionalStartComment": + return "]>"; + case "interpolation": + return "}}"; + case "element": + if (L.isSelfClosing) + return "/>"; + default: + return ">"; + } + } + function T(L, Q) { + return !L.isSelfClosing && !L.endSourceSpan && (F(L) || _(L.parent, Q)); + } + function m(L) { + return L.prev && L.prev.type !== "docType" && !g(L.prev) && L.isLeadingSpaceSensitive && !L.hasLeadingSpaces; + } + function C(L) { + return L.lastChild && L.lastChild.isTrailingSpaceSensitive && !L.lastChild.hasTrailingSpaces && !g(c(L.lastChild)) && !f(L); + } + function o(L) { + return !L.next && !L.hasTrailingSpaces && L.isTrailingSpaceSensitive && g(c(L)); + } + function d(L) { + return L.next && !g(L.next) && g(L) && L.isTrailingSpaceSensitive && !L.hasTrailingSpaces; + } + function v(L) { + let Q = L.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s); + return Q ? Q[1] ? Q[1].split(/\s+/) : true : false; + } + function S(L) { + return !L.prev && L.isLeadingSpaceSensitive && !L.hasLeadingSpaces; + } + function b(L, Q, V) { + let j = L.getValue(); + if (!s(j.attrs)) + return j.isSelfClosing ? " " : ""; + let Y = j.prev && j.prev.type === "comment" && v(j.prev.value), ie = typeof Y == "boolean" ? () => Y : Array.isArray(Y) ? (ue) => Y.includes(ue.rawName) : () => false, ee = L.map((ue) => { + let Fe = ue.getValue(); + return ie(Fe) ? p2(Q.originalText.slice(y(Fe), h(Fe))) : V(); + }, "attrs"), ce = j.type === "element" && j.fullName === "script" && j.attrs.length === 1 && j.attrs[0].fullName === "src" && j.children.length === 0, K = Q.singleAttributePerLine && j.attrs.length > 1 && !w(j, Q) ? l : u, de = [a([ce ? " " : u, n(K, ee)])]; + return j.firstChild && S(j.firstChild) || j.isSelfClosing && C(j.parent) || ce ? de.push(j.isSelfClosing ? " " : "") : de.push(Q.bracketSameLine ? j.isSelfClosing ? " " : "" : j.isSelfClosing ? u : i), de; + } + function B(L) { + return L.firstChild && S(L.firstChild) ? "" : J(L); + } + function k(L, Q, V) { + let j = L.getValue(); + return [M(j, Q), b(L, Q, V), j.isSelfClosing ? "" : B(j)]; + } + function M(L, Q) { + return L.prev && d(L.prev) ? "" : [R(L, Q), q(L)]; + } + function R(L, Q) { + return S(L) ? J(L.parent) : m(L) ? D(L.prev, Q) : ""; + } + function q(L) { + switch (L.type) { + case "ieConditionalComment": + case "ieConditionalStartComment": + return `<${L.rawName}`; + default: + return `<${L.rawName}`; + } + } + function J(L) { + switch (t2(!L.isSelfClosing), L.type) { + case "ieConditionalComment": + return "]>"; + case "element": + if (L.condition) + return ">"; + default: + return ">"; + } + } + r.exports = { printClosingTag: E, printClosingTagStart: N, printClosingTagStartMarker: $, printClosingTagEndMarker: D, printClosingTagSuffix: P, printClosingTagEnd: x, needsToBorrowLastChildClosingTagEndMarker: C, needsToBorrowParentClosingTagStartMarker: o, needsToBorrowPrevClosingTagEndMarker: m, printOpeningTag: k, printOpeningTagStart: M, printOpeningTagPrefix: R, printOpeningTagStartMarker: q, printOpeningTagEndMarker: J, needsToBorrowNextOpeningTagStartMarker: d, needsToBorrowParentOpeningTagEndMarker: S }; + } }), bg = te({ "node_modules/parse-srcset/src/parse-srcset.js"(e, r) { + ne(), function(t2, s) { + typeof define == "function" && define.amd ? define([], s) : typeof r == "object" && r.exports ? r.exports = s() : t2.parseSrcset = s(); + }(e, function() { + return function(t2, s) { + var a = s && s.logger || console; + function n($) { + return $ === " " || $ === " " || $ === ` +` || $ === "\f" || $ === "\r"; + } + function u($) { + var D, T = $.exec(t2.substring(N)); + if (T) + return D = T[0], N += D.length, D; + } + for (var i = t2.length, l = /^[ \t\n\r\u000c]+/, p2 = /^[, \t\n\r\u000c]+/, y = /^[^ \t\n\r\u000c]+/, h = /[,]+$/, g = /^\d+$/, c = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, f, F, _, w, E, N = 0, x = []; ; ) { + if (u(p2), N >= i) + return x; + f = u(y), F = [], f.slice(-1) === "," ? (f = f.replace(h, ""), P()) : I(); + } + function I() { + for (u(l), _ = "", w = "in descriptor"; ; ) { + if (E = t2.charAt(N), w === "in descriptor") + if (n(E)) + _ && (F.push(_), _ = "", w = "after descriptor"); + else if (E === ",") { + N += 1, _ && F.push(_), P(); + return; + } else if (E === "(") + _ = _ + E, w = "in parens"; + else if (E === "") { + _ && F.push(_), P(); + return; + } else + _ = _ + E; + else if (w === "in parens") + if (E === ")") + _ = _ + E, w = "in descriptor"; + else if (E === "") { + F.push(_), P(); + return; + } else + _ = _ + E; + else if (w === "after descriptor" && !n(E)) + if (E === "") { + P(); + return; + } else + w = "in descriptor", N -= 1; + N += 1; + } + } + function P() { + var $ = false, D, T, m, C, o = {}, d, v, S, b, B; + for (C = 0; C < F.length; C++) + d = F[C], v = d[d.length - 1], S = d.substring(0, d.length - 1), b = parseInt(S, 10), B = parseFloat(S), g.test(S) && v === "w" ? ((D || T) && ($ = true), b === 0 ? $ = true : D = b) : c.test(S) && v === "x" ? ((D || T || m) && ($ = true), B < 0 ? $ = true : T = B) : g.test(S) && v === "h" ? ((m || T) && ($ = true), b === 0 ? $ = true : m = b) : $ = true; + $ ? a && a.error && a.error("Invalid srcset descriptor found in '" + t2 + "' at '" + d + "'.") : (o.url = f, D && (o.w = D), T && (o.d = T), m && (o.h = m), x.push(o)); + } + }; + }); + } }), Tg = te({ "src/language-html/syntax-attribute.js"(e, r) { + "use strict"; + ne(); + var t2 = bg(), { builders: { ifBreak: s, join: a, line: n } } = qe(); + function u(l) { + let p2 = t2(l, { logger: { error(I) { + throw new Error(I); + } } }), y = p2.some((I) => { + let { w: P } = I; + return P; + }), h = p2.some((I) => { + let { h: P } = I; + return P; + }), g = p2.some((I) => { + let { d: P } = I; + return P; + }); + if (y + h + g > 1) + throw new Error("Mixed descriptor in srcset is not supported"); + let c = y ? "w" : h ? "h" : "d", f = y ? "w" : h ? "h" : "x", F = (I) => Math.max(...I), _ = p2.map((I) => I.url), w = F(_.map((I) => I.length)), E = p2.map((I) => I[c]).map((I) => I ? I.toString() : ""), N = E.map((I) => { + let P = I.indexOf("."); + return P === -1 ? I.length : P; + }), x = F(N); + return a([",", n], _.map((I, P) => { + let $ = [I], D = E[P]; + if (D) { + let T = w - I.length + 1, m = x - N[P], C = " ".repeat(T + m); + $.push(s(C, " "), D + f); + } + return $; + })); + } + function i(l) { + return l.trim().split(/\s+/).join(" "); + } + r.exports = { printImgSrcset: u, printClassNames: i }; + } }), Bg = te({ "src/language-html/syntax-vue.js"(e, r) { + "use strict"; + ne(); + var { builders: { group: t2 } } = qe(); + function s(i, l) { + let { left: p2, operator: y, right: h } = a(i); + return [t2(l(`function _(${p2}) {}`, { parser: "babel", __isVueForBindingLeft: true })), " ", y, " ", l(h, { parser: "__js_expression" }, { stripTrailingHardline: true })]; + } + function a(i) { + let l = /(.*?)\s+(in|of)\s+(.*)/s, p2 = /,([^,\]}]*)(?:,([^,\]}]*))?$/, y = /^\(|\)$/g, h = i.match(l); + if (!h) + return; + let g = {}; + if (g.for = h[3].trim(), !g.for) + return; + let c = h[1].trim().replace(y, ""), f = c.match(p2); + f ? (g.alias = c.replace(p2, ""), g.iterator1 = f[1].trim(), f[2] && (g.iterator2 = f[2].trim())) : g.alias = c; + let F = [g.alias, g.iterator1, g.iterator2]; + if (!F.some((_, w) => !_ && (w === 0 || F.slice(w + 1).some(Boolean)))) + return { left: F.filter(Boolean).join(","), operator: h[2], right: g.for }; + } + function n(i, l) { + return l(`function _(${i}) {}`, { parser: "babel", __isVueBindings: true }); + } + function u(i) { + let l = /^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/, p2 = /^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/, y = i.trim(); + return l.test(y) || p2.test(y); + } + r.exports = { isVueEventBindingExpression: u, printVueFor: s, printVueBindings: n }; + } }), Lo = te({ "src/language-html/get-node-content.js"(e, r) { + "use strict"; + ne(); + var { needsToBorrowParentClosingTagStartMarker: t2, printClosingTagStartMarker: s, needsToBorrowLastChildClosingTagEndMarker: a, printClosingTagEndMarker: n, needsToBorrowParentOpeningTagEndMarker: u, printOpeningTagEndMarker: i } = ur(); + function l(p2, y) { + let h = p2.startSourceSpan.end.offset; + p2.firstChild && u(p2.firstChild) && (h -= i(p2).length); + let g = p2.endSourceSpan.start.offset; + return p2.lastChild && t2(p2.lastChild) ? g += s(p2, y).length : a(p2) && (g -= n(p2.lastChild, y).length), y.originalText.slice(h, g); + } + r.exports = l; + } }), Ng = te({ "src/language-html/embed.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, group: s, hardline: a, indent: n, line: u, fill: i, softline: l }, utils: { mapDoc: p2, replaceTextEndOfLine: y } } = qe(), h = su(), { printClosingTag: g, printClosingTagSuffix: c, needsToBorrowPrevClosingTagEndMarker: f, printOpeningTagPrefix: F, printOpeningTag: _ } = ur(), { printImgSrcset: w, printClassNames: E } = Tg(), { printVueFor: N, printVueBindings: x, isVueEventBindingExpression: I } = Bg(), { isScriptLikeTag: P, isVueNonHtmlBlock: $, inferScriptParser: D, htmlTrimPreserveIndentation: T, dedentString: m, unescapeQuoteEntities: C, isVueSlotAttribute: o, isVueSfcBindingsAttribute: d, getTextValueParts: v } = Rt(), S = Lo(); + function b(k, M, R) { + let q = (ee) => new RegExp(ee.join("|")).test(k.fullName), J = () => C(k.value), L = false, Q = (ee, ce) => { + let W = ee.type === "NGRoot" ? ee.node.type === "NGMicrosyntax" && ee.node.body.length === 1 && ee.node.body[0].type === "NGMicrosyntaxExpression" ? ee.node.body[0].expression : ee.node : ee.type === "JsExpressionRoot" ? ee.node : ee; + W && (W.type === "ObjectExpression" || W.type === "ArrayExpression" || ce.parser === "__vue_expression" && (W.type === "TemplateLiteral" || W.type === "StringLiteral")) && (L = true); + }, V = (ee) => s(ee), j = function(ee) { + let ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return s([n([l, ee]), ce ? l : ""]); + }, Y = (ee) => L ? V(ee) : j(ee), ie = (ee, ce) => M(ee, Object.assign({ __onHtmlBindingRoot: Q, __embeddedInHtml: true }, ce)); + if (k.fullName === "srcset" && (k.parent.fullName === "img" || k.parent.fullName === "source")) + return j(w(J())); + if (k.fullName === "class" && !R.parentParser) { + let ee = J(); + if (!ee.includes("{{")) + return E(ee); + } + if (k.fullName === "style" && !R.parentParser) { + let ee = J(); + if (!ee.includes("{{")) + return j(ie(ee, { parser: "css", __isHTMLStyleAttribute: true })); + } + if (R.parser === "vue") { + if (k.fullName === "v-for") + return N(J(), ie); + if (o(k) || d(k, R)) + return x(J(), ie); + let ee = ["^@", "^v-on:"], ce = ["^:", "^v-bind:"], W = ["^v-"]; + if (q(ee)) { + let K = J(), de = I(K) ? "__js_expression" : R.__should_parse_vue_template_with_ts ? "__vue_ts_event_binding" : "__vue_event_binding"; + return Y(ie(K, { parser: de })); + } + if (q(ce)) + return Y(ie(J(), { parser: "__vue_expression" })); + if (q(W)) + return Y(ie(J(), { parser: "__js_expression" })); + } + if (R.parser === "angular") { + let ee = (z, U) => ie(z, Object.assign(Object.assign({}, U), {}, { trailingComma: "none" })), ce = ["^\\*"], W = ["^\\(.+\\)$", "^on-"], K = ["^\\[.+\\]$", "^bind(on)?-", "^ng-(if|show|hide|class|style)$"], de = ["^i18n(-.+)?$"]; + if (q(W)) + return Y(ee(J(), { parser: "__ng_action" })); + if (q(K)) + return Y(ee(J(), { parser: "__ng_binding" })); + if (q(de)) { + let z = J().trim(); + return j(i(v(k, z)), !z.includes("@@")); + } + if (q(ce)) + return Y(ee(J(), { parser: "__ng_directive" })); + let ue = /{{(.+?)}}/s, Fe = J(); + if (ue.test(Fe)) { + let z = []; + for (let [U, Z] of Fe.split(ue).entries()) + if (U % 2 === 0) + z.push(y(Z)); + else + try { + z.push(s(["{{", n([u, ee(Z, { parser: "__ng_interpolation", __isInHtmlInterpolation: true })]), u, "}}"])); + } catch { + z.push("{{", y(Z), "}}"); + } + return s(z); + } + } + return null; + } + function B(k, M, R, q) { + let J = k.getValue(); + switch (J.type) { + case "element": { + if (P(J) || J.type === "interpolation") + return; + if (!J.isSelfClosing && $(J, q)) { + let L = D(J, q); + if (!L) + return; + let Q = S(J, q), V = /^\s*$/.test(Q), j = ""; + return V || (j = R(T(Q), { parser: L, __embeddedInHtml: true }, { stripTrailingHardline: true }), V = j === ""), [F(J, q), s(_(k, q, M)), V ? "" : a, j, V ? "" : a, g(J, q), c(J, q)]; + } + break; + } + case "text": { + if (P(J.parent)) { + let L = D(J.parent, q); + if (L) { + let Q = L === "markdown" ? m(J.value.replace(/^[^\S\n]*\n/, "")) : J.value, V = { parser: L, __embeddedInHtml: true }; + if (q.parser === "html" && L === "babel") { + let j = "script", { attrMap: Y } = J.parent; + Y && (Y.type === "module" || Y.type === "text/babel" && Y["data-type"] === "module") && (j = "module"), V.__babelSourceType = j; + } + return [t2, F(J, q), R(Q, V, { stripTrailingHardline: true }), c(J, q)]; + } + } else if (J.parent.type === "interpolation") { + let L = { __isInHtmlInterpolation: true, __embeddedInHtml: true }; + return q.parser === "angular" ? (L.parser = "__ng_interpolation", L.trailingComma = "none") : q.parser === "vue" ? L.parser = q.__should_parse_vue_template_with_ts ? "__vue_ts_expression" : "__vue_expression" : L.parser = "__js_expression", [n([u, R(J.value, L, { stripTrailingHardline: true })]), J.parent.next && f(J.parent.next) ? " " : u]; + } + break; + } + case "attribute": { + if (!J.value) + break; + if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(q.originalText.slice(J.valueSpan.start.offset, J.valueSpan.end.offset))) + return [J.rawName, "=", J.value]; + if (q.parser === "lwc" && /^{.*}$/s.test(q.originalText.slice(J.valueSpan.start.offset, J.valueSpan.end.offset))) + return [J.rawName, "=", J.value]; + let L = b(J, (Q, V) => R(Q, Object.assign({ __isInHtmlAttribute: true, __embeddedInHtml: true }, V), { stripTrailingHardline: true }), q); + if (L) + return [J.rawName, '="', s(p2(L, (Q) => typeof Q == "string" ? Q.replace(/"/g, """) : Q)), '"']; + break; + } + case "front-matter": + return h(J, R); + } + } + r.exports = B; + } }), Oo = te({ "src/language-html/print/children.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, group: s, ifBreak: a, line: n, softline: u, hardline: i }, utils: { replaceTextEndOfLine: l } } = qe(), { locStart: p2, locEnd: y } = au(), { forceBreakChildren: h, forceNextEmptyLine: g, isTextLikeNode: c, hasPrettierIgnore: f, preferHardlineAsLeadingSpaces: F } = Rt(), { printOpeningTagPrefix: _, needsToBorrowNextOpeningTagStartMarker: w, printOpeningTagStartMarker: E, needsToBorrowPrevClosingTagEndMarker: N, printClosingTagEndMarker: x, printClosingTagSuffix: I, needsToBorrowParentClosingTagStartMarker: P } = ur(); + function $(m, C, o) { + let d = m.getValue(); + return f(d) ? [_(d, C), ...l(C.originalText.slice(p2(d) + (d.prev && w(d.prev) ? E(d).length : 0), y(d) - (d.next && N(d.next) ? x(d, C).length : 0))), I(d, C)] : o(); + } + function D(m, C) { + return c(m) && c(C) ? m.isTrailingSpaceSensitive ? m.hasTrailingSpaces ? F(C) ? i : n : "" : F(C) ? i : u : w(m) && (f(C) || C.firstChild || C.isSelfClosing || C.type === "element" && C.attrs.length > 0) || m.type === "element" && m.isSelfClosing && N(C) ? "" : !C.isLeadingSpaceSensitive || F(C) || N(C) && m.lastChild && P(m.lastChild) && m.lastChild.lastChild && P(m.lastChild.lastChild) ? i : C.hasLeadingSpaces ? n : u; + } + function T(m, C, o) { + let d = m.getValue(); + if (h(d)) + return [t2, ...m.map((S) => { + let b = S.getValue(), B = b.prev ? D(b.prev, b) : ""; + return [B ? [B, g(b.prev) ? i : ""] : "", $(S, C, o)]; + }, "children")]; + let v = d.children.map(() => Symbol("")); + return m.map((S, b) => { + let B = S.getValue(); + if (c(B)) { + if (B.prev && c(B.prev)) { + let Q = D(B.prev, B); + if (Q) + return g(B.prev) ? [i, i, $(S, C, o)] : [Q, $(S, C, o)]; + } + return $(S, C, o); + } + let k = [], M = [], R = [], q = [], J = B.prev ? D(B.prev, B) : "", L = B.next ? D(B, B.next) : ""; + return J && (g(B.prev) ? k.push(i, i) : J === i ? k.push(i) : c(B.prev) ? M.push(J) : M.push(a("", u, { groupId: v[b - 1] }))), L && (g(B) ? c(B.next) && q.push(i, i) : L === i ? c(B.next) && q.push(i) : R.push(L)), [...k, s([...M, s([$(S, C, o), ...R], { id: v[b] })]), ...q]; + }, "children"); + } + r.exports = { printChildren: T }; + } }), wg = te({ "src/language-html/print/element.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, dedentToRoot: s, group: a, ifBreak: n, indentIfBreak: u, indent: i, line: l, softline: p2 }, utils: { replaceTextEndOfLine: y } } = qe(), h = Lo(), { shouldPreserveContent: g, isScriptLikeTag: c, isVueCustomBlock: f, countParents: F, forceBreakContent: _ } = Rt(), { printOpeningTagPrefix: w, printOpeningTag: E, printClosingTagSuffix: N, printClosingTag: x, needsToBorrowPrevClosingTagEndMarker: I, needsToBorrowLastChildClosingTagEndMarker: P } = ur(), { printChildren: $ } = Oo(); + function D(T, m, C) { + let o = T.getValue(); + if (g(o, m)) + return [w(o, m), a(E(T, m, C)), ...y(h(o, m)), ...x(o, m), N(o, m)]; + let d = o.children.length === 1 && o.firstChild.type === "interpolation" && o.firstChild.isLeadingSpaceSensitive && !o.firstChild.hasLeadingSpaces && o.lastChild.isTrailingSpaceSensitive && !o.lastChild.hasTrailingSpaces, v = Symbol("element-attr-group-id"), S = (M) => a([a(E(T, m, C), { id: v }), M, x(o, m)]), b = (M) => d ? u(M, { groupId: v }) : (c(o) || f(o, m)) && o.parent.type === "root" && m.parser === "vue" && !m.vueIndentScriptAndStyle ? M : i(M), B = () => d ? n(p2, "", { groupId: v }) : o.firstChild.hasLeadingSpaces && o.firstChild.isLeadingSpaceSensitive ? l : o.firstChild.type === "text" && o.isWhitespaceSensitive && o.isIndentationSensitive ? s(p2) : p2, k = () => (o.next ? I(o.next) : P(o.parent)) ? o.lastChild.hasTrailingSpaces && o.lastChild.isTrailingSpaceSensitive ? " " : "" : d ? n(p2, "", { groupId: v }) : o.lastChild.hasTrailingSpaces && o.lastChild.isTrailingSpaceSensitive ? l : (o.lastChild.type === "comment" || o.lastChild.type === "text" && o.isWhitespaceSensitive && o.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${m.tabWidth * F(T, (R) => R.parent && R.parent.type !== "root")}}$`).test(o.lastChild.value) ? "" : p2; + return o.children.length === 0 ? S(o.hasDanglingSpaces && o.isDanglingSpaceSensitive ? l : "") : S([_(o) ? t2 : "", b([B(), $(T, m, C)]), k()]); + } + r.exports = { printElement: D }; + } }), _g = te({ "src/language-html/printer-html.js"(e, r) { + "use strict"; + ne(); + var { builders: { fill: t2, group: s, hardline: a, literalline: n }, utils: { cleanDoc: u, getDocParts: i, isConcat: l, replaceTextEndOfLine: p2 } } = qe(), y = gg(), { countChars: h, unescapeQuoteEntities: g, getTextValueParts: c } = Rt(), f = Sg(), { insertPragma: F } = xg(), { locStart: _, locEnd: w } = au(), E = Ng(), { printClosingTagSuffix: N, printClosingTagEnd: x, printOpeningTagPrefix: I, printOpeningTagStart: P } = ur(), { printElement: $ } = wg(), { printChildren: D } = Oo(); + function T(m, C, o) { + let d = m.getValue(); + switch (d.type) { + case "front-matter": + return p2(d.raw); + case "root": + return C.__onHtmlRoot && C.__onHtmlRoot(d), [s(D(m, C, o)), a]; + case "element": + case "ieConditionalComment": + return $(m, C, o); + case "ieConditionalStartComment": + case "ieConditionalEndComment": + return [P(d), x(d)]; + case "interpolation": + return [P(d, C), ...m.map(o, "children"), x(d, C)]; + case "text": { + if (d.parent.type === "interpolation") { + let S = /\n[^\S\n]*$/, b = S.test(d.value), B = b ? d.value.replace(S, "") : d.value; + return [...p2(B), b ? a : ""]; + } + let v = u([I(d, C), ...c(d), N(d, C)]); + return l(v) || v.type === "fill" ? t2(i(v)) : v; + } + case "docType": + return [s([P(d, C), " ", d.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")]), x(d, C)]; + case "comment": + return [I(d, C), ...p2(C.originalText.slice(_(d), w(d)), n), N(d, C)]; + case "attribute": { + if (d.value === null) + return d.rawName; + let v = g(d.value), S = h(v, "'"), b = h(v, '"'), B = S < b ? "'" : '"'; + return [d.rawName, "=", B, ...p2(B === '"' ? v.replace(/"/g, """) : v.replace(/'/g, "'")), B]; + } + default: + throw new Error(`Unexpected node type ${d.type}`); + } + } + r.exports = { preprocess: f, print: T, insertPragma: F, massageAstNode: y, embed: E }; + } }), Pg = te({ "src/language-html/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(), s = "HTML"; + r.exports = { bracketSameLine: t2.bracketSameLine, htmlWhitespaceSensitivity: { since: "1.15.0", category: s, type: "choice", default: "css", description: "How to handle whitespaces in HTML.", choices: [{ value: "css", description: "Respect the default value of CSS display property." }, { value: "strict", description: "Whitespaces are considered sensitive." }, { value: "ignore", description: "Whitespaces are considered insensitive." }] }, singleAttributePerLine: t2.singleAttributePerLine, vueIndentScriptAndStyle: { since: "1.19.0", category: s, type: "boolean", default: false, description: "Indent script and style tags in Vue files." } }; + } }), Ig = te({ "src/language-html/parsers.js"() { + ne(); + } }), On = te({ "node_modules/linguist-languages/data/HTML.json"(e, r) { + r.exports = { name: "HTML", type: "markup", tmScope: "text.html.basic", aceMode: "html", codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", color: "#e34c26", aliases: ["xhtml"], extensions: [".html", ".hta", ".htm", ".html.hl", ".inc", ".xht", ".xhtml"], languageId: 146 }; + } }), kg = te({ "node_modules/linguist-languages/data/Vue.json"(e, r) { + r.exports = { name: "Vue", type: "markup", color: "#41b883", extensions: [".vue"], tmScope: "text.html.vue", aceMode: "html", languageId: 391 }; + } }), Lg = te({ "src/language-html/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = _g(), a = Pg(), n = Ig(), u = [t2(On(), () => ({ name: "Angular", since: "1.15.0", parsers: ["angular"], vscodeLanguageIds: ["html"], extensions: [".component.html"], filenames: [] })), t2(On(), (l) => ({ since: "1.15.0", parsers: ["html"], vscodeLanguageIds: ["html"], extensions: [...l.extensions, ".mjml"] })), t2(On(), () => ({ name: "Lightning Web Components", since: "1.17.0", parsers: ["lwc"], vscodeLanguageIds: ["html"], extensions: [], filenames: [] })), t2(kg(), () => ({ since: "1.10.0", parsers: ["vue"], vscodeLanguageIds: ["vue"] }))], i = { html: s }; + r.exports = { languages: u, printers: i, options: a, parsers: n }; + } }), Og = te({ "src/language-yaml/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(n) { + return /^\s*@(?:prettier|format)\s*$/.test(n); + } + function s(n) { + return /^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(n); + } + function a(n) { + return `# @format + +${n}`; + } + r.exports = { isPragma: t2, hasPragma: s, insertPragma: a }; + } }), jg = te({ "src/language-yaml/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.position.start.offset; + } + function s(a) { + return a.position.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), qg = te({ "src/language-yaml/embed.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n, u) { + if (s.getValue().type === "root" && u.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(u.filepath)) + return n(u.originalText, Object.assign(Object.assign({}, u), {}, { parser: "json" })); + } + r.exports = t2; + } }), $t = te({ "src/language-yaml/utils.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2, isNonEmptyArray: s } = Ue(); + function a(D, T) { + let m = 0, C = D.stack.length - 1; + for (let o = 0; o < C; o++) { + let d = D.stack[o]; + n(d) && T(d) && m++; + } + return m; + } + function n(D, T) { + return D && typeof D.type == "string" && (!T || T.includes(D.type)); + } + function u(D, T, m) { + return T("children" in D ? Object.assign(Object.assign({}, D), {}, { children: D.children.map((C) => u(C, T, D)) }) : D, m); + } + function i(D, T, m) { + Object.defineProperty(D, T, { get: m, enumerable: false }); + } + function l(D, T) { + let m = 0, C = T.length; + for (let o = D.position.end.offset - 1; o < C; o++) { + let d = T[o]; + if (d === ` +` && m++, m === 1 && /\S/.test(d)) + return false; + if (m === 2) + return true; + } + return false; + } + function p2(D) { + switch (D.getValue().type) { + case "tag": + case "anchor": + case "comment": + return false; + } + let m = D.stack.length; + for (let C = 1; C < m; C++) { + let o = D.stack[C], d = D.stack[C - 1]; + if (Array.isArray(d) && typeof o == "number" && o !== d.length - 1) + return false; + } + return true; + } + function y(D) { + return s(D.children) ? y(t2(D.children)) : D; + } + function h(D) { + return D.value.trim() === "prettier-ignore"; + } + function g(D) { + let T = D.getValue(); + if (T.type === "documentBody") { + let m = D.getParentNode(); + return N(m.head) && h(t2(m.head.endComments)); + } + return F(T) && h(t2(T.leadingComments)); + } + function c(D) { + return !s(D.children) && !f(D); + } + function f(D) { + return F(D) || _(D) || w(D) || E(D) || N(D); + } + function F(D) { + return s(D == null ? void 0 : D.leadingComments); + } + function _(D) { + return s(D == null ? void 0 : D.middleComments); + } + function w(D) { + return D == null ? void 0 : D.indicatorComment; + } + function E(D) { + return D == null ? void 0 : D.trailingComment; + } + function N(D) { + return s(D == null ? void 0 : D.endComments); + } + function x(D) { + let T = [], m; + for (let C of D.split(/( +)/)) + C !== " " ? m === " " ? T.push(C) : T.push((T.pop() || "") + C) : m === void 0 && T.unshift(""), m = C; + return m === " " && T.push((T.pop() || "") + " "), T[0] === "" && (T.shift(), T.unshift(" " + (T.shift() || ""))), T; + } + function I(D, T, m) { + let C = T.split(` +`).map((o, d, v) => d === 0 && d === v.length - 1 ? o : d !== 0 && d !== v.length - 1 ? o.trim() : d === 0 ? o.trimEnd() : o.trimStart()); + return m.proseWrap === "preserve" ? C.map((o) => o.length === 0 ? [] : [o]) : C.map((o) => o.length === 0 ? [] : x(o)).reduce((o, d, v) => v !== 0 && C[v - 1].length > 0 && d.length > 0 && !(D === "quoteDouble" && t2(t2(o)).endsWith("\\")) ? [...o.slice(0, -1), [...t2(o), ...d]] : [...o, d], []).map((o) => m.proseWrap === "never" ? [o.join(" ")] : o); + } + function P(D, T) { + let { parentIndent: m, isLastDescendant: C, options: o } = T, d = D.position.start.line === D.position.end.line ? "" : o.originalText.slice(D.position.start.offset, D.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1], v; + if (D.indent === null) { + let B = d.match(/^(? *)[^\n\r ]/m); + v = B ? B.groups.leadingSpace.length : Number.POSITIVE_INFINITY; + } else + v = D.indent - 1 + m; + let S = d.split(` +`).map((B) => B.slice(v)); + if (o.proseWrap === "preserve" || D.type === "blockLiteral") + return b(S.map((B) => B.length === 0 ? [] : [B])); + return b(S.map((B) => B.length === 0 ? [] : x(B)).reduce((B, k, M) => M !== 0 && S[M - 1].length > 0 && k.length > 0 && !/^\s/.test(k[0]) && !/^\s|\s$/.test(t2(B)) ? [...B.slice(0, -1), [...t2(B), ...k]] : [...B, k], []).map((B) => B.reduce((k, M) => k.length > 0 && /\s$/.test(t2(k)) ? [...k.slice(0, -1), t2(k) + " " + M] : [...k, M], [])).map((B) => o.proseWrap === "never" ? [B.join(" ")] : B)); + function b(B) { + if (D.chomping === "keep") + return t2(B).length === 0 ? B.slice(0, -1) : B; + let k = 0; + for (let M = B.length - 1; M >= 0 && B[M].length === 0; M--) + k++; + return k === 0 ? B : k >= 2 && !C ? B.slice(0, -(k - 1)) : B.slice(0, -k); + } + } + function $(D) { + if (!D) + return true; + switch (D.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": + return true; + default: + return false; + } + } + r.exports = { getLast: t2, getAncestorCount: a, isNode: n, isEmptyNode: c, isInlineNode: $, mapNode: u, defineShortcut: i, isNextLineEmpty: l, isLastDescendantNode: p2, getBlockValueLineContents: P, getFlowScalarLineContents: I, getLastDescendantNode: y, hasPrettierIgnore: g, hasLeadingComments: F, hasMiddleComments: _, hasIndicatorComment: w, hasTrailingComment: E, hasEndComments: N }; + } }), Mg = te({ "src/language-yaml/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var { defineShortcut: t2, mapNode: s } = $t(); + function a(u) { + return s(u, n); + } + function n(u) { + switch (u.type) { + case "document": + t2(u, "head", () => u.children[0]), t2(u, "body", () => u.children[1]); + break; + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + t2(u, "content", () => u.children[0]); + break; + case "mappingItem": + case "flowMappingItem": + t2(u, "key", () => u.children[0]), t2(u, "value", () => u.children[1]); + break; + } + return u; + } + r.exports = a; + } }), Mr = te({ "src/language-yaml/print/misc.js"(e, r) { + "use strict"; + ne(); + var { builders: { softline: t2, align: s } } = qe(), { hasEndComments: a, isNextLineEmpty: n, isNode: u } = $t(), i = /* @__PURE__ */ new WeakMap(); + function l(h, g) { + let c = h.getValue(), f = h.stack[0], F; + return i.has(f) ? F = i.get(f) : (F = /* @__PURE__ */ new Set(), i.set(f, F)), !F.has(c.position.end.line) && (F.add(c.position.end.line), n(c, g) && !p2(h.getParentNode())) ? t2 : ""; + } + function p2(h) { + return a(h) && !u(h, ["documentHead", "documentBody", "flowMapping", "flowSequence"]); + } + function y(h, g) { + return s(" ".repeat(h), g); + } + r.exports = { alignWithSpaces: y, shouldPrintEndComments: p2, printNextEmptyLine: l }; + } }), Rg = te({ "src/language-yaml/print/flow-mapping-sequence.js"(e, r) { + "use strict"; + ne(); + var { builders: { ifBreak: t2, line: s, softline: a, hardline: n, join: u } } = qe(), { isEmptyNode: i, getLast: l, hasEndComments: p2 } = $t(), { printNextEmptyLine: y, alignWithSpaces: h } = Mr(); + function g(f, F, _) { + let w = f.getValue(), E = w.type === "flowMapping", N = E ? "{" : "[", x = E ? "}" : "]", I = a; + E && w.children.length > 0 && _.bracketSpacing && (I = s); + let P = l(w.children), $ = P && P.type === "flowMappingItem" && i(P.key) && i(P.value); + return [N, h(_.tabWidth, [I, c(f, F, _), _.trailingComma === "none" ? "" : t2(","), p2(w) ? [n, u(n, f.map(F, "endComments"))] : ""]), $ ? "" : I, x]; + } + function c(f, F, _) { + let w = f.getValue(); + return f.map((N, x) => [F(), x === w.children.length - 1 ? "" : [",", s, w.children[x].position.start.line !== w.children[x + 1].position.start.line ? y(N, _.originalText) : ""]], "children"); + } + r.exports = { printFlowMapping: g, printFlowSequence: g }; + } }), $g = te({ "src/language-yaml/print/mapping-item.js"(e, r) { + "use strict"; + ne(); + var { builders: { conditionalGroup: t2, group: s, hardline: a, ifBreak: n, join: u, line: i } } = qe(), { hasLeadingComments: l, hasMiddleComments: p2, hasTrailingComment: y, hasEndComments: h, isNode: g, isEmptyNode: c, isInlineNode: f } = $t(), { alignWithSpaces: F } = Mr(); + function _(x, I, P, $, D) { + let { key: T, value: m } = x, C = c(T), o = c(m); + if (C && o) + return ": "; + let d = $("key"), v = E(x) ? " " : ""; + if (o) + return x.type === "flowMappingItem" && I.type === "flowMapping" ? d : x.type === "mappingItem" && w(T.content, D) && !y(T.content) && (!I.tag || I.tag.value !== "tag:yaml.org,2002:set") ? [d, v, ":"] : ["? ", F(2, d)]; + let S = $("value"); + if (C) + return [": ", F(2, S)]; + if (l(m) || !f(T.content)) + return ["? ", F(2, d), a, u("", P.map($, "value", "leadingComments").map((q) => [q, a])), ": ", F(2, S)]; + if (N(T.content) && !l(T.content) && !p2(T.content) && !y(T.content) && !h(T) && !l(m.content) && !p2(m.content) && !h(m) && w(m.content, D)) + return [d, v, ": ", S]; + let b = Symbol("mappingKey"), B = s([n("? "), s(F(2, d), { id: b })]), k = [a, ": ", F(2, S)], M = [v, ":"]; + l(m.content) || h(m) && m.content && !g(m.content, ["mapping", "sequence"]) || I.type === "mapping" && y(T.content) && f(m.content) || g(m.content, ["mapping", "sequence"]) && m.content.tag === null && m.content.anchor === null ? M.push(a) : m.content && M.push(i), M.push(S); + let R = F(D.tabWidth, M); + return w(T.content, D) && !l(T.content) && !p2(T.content) && !h(T) ? t2([[d, R]]) : t2([[B, n(k, R, { groupId: b })]]); + } + function w(x, I) { + if (!x) + return true; + switch (x.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": + break; + case "alias": + return true; + default: + return false; + } + if (I.proseWrap === "preserve") + return x.position.start.line === x.position.end.line; + if (/\\$/m.test(I.originalText.slice(x.position.start.offset, x.position.end.offset))) + return false; + switch (I.proseWrap) { + case "never": + return !x.value.includes(` +`); + case "always": + return !/[\n ]/.test(x.value); + default: + return false; + } + } + function E(x) { + return x.key.content && x.key.content.type === "alias"; + } + function N(x) { + if (!x) + return true; + switch (x.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + return x.position.start.line === x.position.end.line; + case "alias": + return true; + default: + return false; + } + } + r.exports = _; + } }), Vg = te({ "src/language-yaml/print/block.js"(e, r) { + "use strict"; + ne(); + var { builders: { dedent: t2, dedentToRoot: s, fill: a, hardline: n, join: u, line: i, literalline: l, markAsRoot: p2 }, utils: { getDocParts: y } } = qe(), { getAncestorCount: h, getBlockValueLineContents: g, hasIndicatorComment: c, isLastDescendantNode: f, isNode: F } = $t(), { alignWithSpaces: _ } = Mr(); + function w(E, N, x) { + let I = E.getValue(), P = h(E, (C) => F(C, ["sequence", "mapping"])), $ = f(E), D = [I.type === "blockFolded" ? ">" : "|"]; + I.indent !== null && D.push(I.indent.toString()), I.chomping !== "clip" && D.push(I.chomping === "keep" ? "+" : "-"), c(I) && D.push(" ", N("indicatorComment")); + let T = g(I, { parentIndent: P, isLastDescendant: $, options: x }), m = []; + for (let [C, o] of T.entries()) + C === 0 && m.push(n), m.push(a(y(u(i, o)))), C !== T.length - 1 ? m.push(o.length === 0 ? n : p2(l)) : I.chomping === "keep" && $ && m.push(s(o.length === 0 ? n : l)); + return I.indent === null ? D.push(t2(_(x.tabWidth, m))) : D.push(s(_(I.indent - 1 + P, m))), D; + } + r.exports = w; + } }), Wg = te({ "src/language-yaml/printer-yaml.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, fill: s, group: a, hardline: n, join: u, line: i, lineSuffix: l, literalline: p2 }, utils: { getDocParts: y, replaceTextEndOfLine: h } } = qe(), { isPreviousLineEmpty: g } = Ue(), { insertPragma: c, isPragma: f } = Og(), { locStart: F } = jg(), _ = qg(), { getFlowScalarLineContents: w, getLastDescendantNode: E, hasLeadingComments: N, hasMiddleComments: x, hasTrailingComment: I, hasEndComments: P, hasPrettierIgnore: $, isLastDescendantNode: D, isNode: T, isInlineNode: m } = $t(), C = Mg(), { alignWithSpaces: o, printNextEmptyLine: d, shouldPrintEndComments: v } = Mr(), { printFlowMapping: S, printFlowSequence: b } = Rg(), B = $g(), k = Vg(); + function M(j, Y, ie) { + let ee = j.getValue(), ce = []; + ee.type !== "mappingValue" && N(ee) && ce.push([u(n, j.map(ie, "leadingComments")), n]); + let { tag: W, anchor: K } = ee; + W && ce.push(ie("tag")), W && K && ce.push(" "), K && ce.push(ie("anchor")); + let de = ""; + T(ee, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !D(j) && (de = d(j, Y.originalText)), (W || K) && (T(ee, ["sequence", "mapping"]) && !x(ee) ? ce.push(n) : ce.push(" ")), x(ee) && ce.push([ee.middleComments.length === 1 ? "" : n, u(n, j.map(ie, "middleComments")), n]); + let ue = j.getParentNode(); + return $(j) ? ce.push(h(Y.originalText.slice(ee.position.start.offset, ee.position.end.offset).trimEnd(), p2)) : ce.push(a(R(ee, ue, j, Y, ie))), I(ee) && !T(ee, ["document", "documentHead"]) && ce.push(l([ee.type === "mappingValue" && !ee.content ? "" : " ", ue.type === "mappingKey" && j.getParentNode(2).type === "mapping" && m(ee) ? "" : t2, ie("trailingComment")])), v(ee) && ce.push(o(ee.type === "sequenceItem" ? 2 : 0, [n, u(n, j.map((Fe) => [g(Y.originalText, Fe.getValue(), F) ? n : "", ie()], "endComments"))])), ce.push(de), ce; + } + function R(j, Y, ie, ee, ce) { + switch (j.type) { + case "root": { + let { children: W } = j, K = []; + ie.each((ue, Fe) => { + let z = W[Fe], U = W[Fe + 1]; + Fe !== 0 && K.push(n), K.push(ce()), J(z, U) ? (K.push(n, "..."), I(z) && K.push(" ", ce("trailingComment"))) : U && !I(U.head) && K.push(n, "---"); + }, "children"); + let de = E(j); + return (!T(de, ["blockLiteral", "blockFolded"]) || de.chomping !== "keep") && K.push(n), K; + } + case "document": { + let W = Y.children[ie.getName() + 1], K = []; + return L(j, W, Y, ee) === "head" && ((j.head.children.length > 0 || j.head.endComments.length > 0) && K.push(ce("head")), I(j.head) ? K.push(["---", " ", ce(["head", "trailingComment"])]) : K.push("---")), q(j) && K.push(ce("body")), u(n, K); + } + case "documentHead": + return u(n, [...ie.map(ce, "children"), ...ie.map(ce, "endComments")]); + case "documentBody": { + let { children: W, endComments: K } = j, de = ""; + if (W.length > 0 && K.length > 0) { + let ue = E(j); + T(ue, ["blockFolded", "blockLiteral"]) ? ue.chomping !== "keep" && (de = [n, n]) : de = n; + } + return [u(n, ie.map(ce, "children")), de, u(n, ie.map(ce, "endComments"))]; + } + case "directive": + return ["%", u(" ", [j.name, ...j.parameters])]; + case "comment": + return ["#", j.value]; + case "alias": + return ["*", j.value]; + case "tag": + return ee.originalText.slice(j.position.start.offset, j.position.end.offset); + case "anchor": + return ["&", j.value]; + case "plain": + return Q(j.type, ee.originalText.slice(j.position.start.offset, j.position.end.offset), ee); + case "quoteDouble": + case "quoteSingle": { + let W = "'", K = '"', de = ee.originalText.slice(j.position.start.offset + 1, j.position.end.offset - 1); + if (j.type === "quoteSingle" && de.includes("\\") || j.type === "quoteDouble" && /\\[^"]/.test(de)) { + let Fe = j.type === "quoteDouble" ? K : W; + return [Fe, Q(j.type, de, ee), Fe]; + } + if (de.includes(K)) + return [W, Q(j.type, j.type === "quoteDouble" ? de.replace(/\\"/g, K).replace(/'/g, W.repeat(2)) : de, ee), W]; + if (de.includes(W)) + return [K, Q(j.type, j.type === "quoteSingle" ? de.replace(/''/g, W) : de, ee), K]; + let ue = ee.singleQuote ? W : K; + return [ue, Q(j.type, de, ee), ue]; + } + case "blockFolded": + case "blockLiteral": + return k(ie, ce, ee); + case "mapping": + case "sequence": + return u(n, ie.map(ce, "children")); + case "sequenceItem": + return ["- ", o(2, j.content ? ce("content") : "")]; + case "mappingKey": + case "mappingValue": + return j.content ? ce("content") : ""; + case "mappingItem": + case "flowMappingItem": + return B(j, Y, ie, ce, ee); + case "flowMapping": + return S(ie, ce, ee); + case "flowSequence": + return b(ie, ce, ee); + case "flowSequenceItem": + return ce("content"); + default: + throw new Error(`Unexpected node type ${j.type}`); + } + } + function q(j) { + return j.body.children.length > 0 || P(j.body); + } + function J(j, Y) { + return I(j) || Y && (Y.head.children.length > 0 || P(Y.head)); + } + function L(j, Y, ie, ee) { + return ie.children[0] === j && /---(?:\s|$)/.test(ee.originalText.slice(F(j), F(j) + 4)) || j.head.children.length > 0 || P(j.head) || I(j.head) ? "head" : J(j, Y) ? false : Y ? "root" : false; + } + function Q(j, Y, ie) { + let ee = w(j, Y, ie); + return u(n, ee.map((ce) => s(y(u(i, ce))))); + } + function V(j, Y) { + if (T(Y)) + switch (delete Y.position, Y.type) { + case "comment": + if (f(Y.value)) + return null; + break; + case "quoteDouble": + case "quoteSingle": + Y.type = "quote"; + break; + } + } + r.exports = { preprocess: C, embed: _, print: M, massageAstNode: V, insertPragma: c }; + } }), Hg = te({ "src/language-yaml/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { bracketSpacing: t2.bracketSpacing, singleQuote: t2.singleQuote, proseWrap: t2.proseWrap }; + } }), Gg = te({ "src/language-yaml/parsers.js"() { + ne(); + } }), Ug = te({ "node_modules/linguist-languages/data/YAML.json"(e, r) { + r.exports = { name: "YAML", type: "data", color: "#cb171e", tmScope: "source.yaml", aliases: ["yml"], extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"], filenames: [".clang-format", ".clang-tidy", ".gemrc", "CITATION.cff", "glide.lock", "yarn.lock"], aceMode: "yaml", codemirrorMode: "yaml", codemirrorMimeType: "text/x-yaml", languageId: 407 }; + } }), Jg = te({ "src/language-yaml/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Wg(), a = Hg(), n = Gg(), u = [t2(Ug(), (i) => ({ since: "1.14.0", parsers: ["yaml"], vscodeLanguageIds: ["yaml", "ansible", "home-assistant"], filenames: [...i.filenames.filter((l) => l !== "yarn.lock"), ".prettierrc", ".stylelintrc", ".lintstagedrc"] }))]; + r.exports = { languages: u, printers: { yaml: s }, options: a, parsers: n }; + } }), zg = te({ "src/languages.js"(e, r) { + "use strict"; + ne(), r.exports = [Bd(), Ud(), eg(), ag(), dg(), Lg(), Jg()]; + } }); + ne(); + var { version: Xg } = Ia(), Ot = Gm(), { getSupportInfo: Kg } = Xn(), Yg = Um(), Qg = zg(), Zg = qe(); + function Nt(e) { + let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; + return function() { + for (var t2 = arguments.length, s = new Array(t2), a = 0; a < t2; a++) + s[a] = arguments[a]; + let n = s[r] || {}, u = n.plugins || []; + return s[r] = Object.assign(Object.assign({}, n), {}, { plugins: [...Qg, ...Array.isArray(u) ? u : Object.values(u)] }), e(...s); + }; + } + var jn = Nt(Ot.formatWithCursor); + jo.exports = { formatWithCursor: jn, format(e, r) { + return jn(e, r).formatted; + }, check(e, r) { + let { formatted: t2 } = jn(e, r); + return t2 === e; + }, doc: Zg, getSupportInfo: Nt(Kg, 0), version: Xg, util: Yg, __debug: { parse: Nt(Ot.parse), formatAST: Nt(Ot.formatAST), formatDoc: Nt(Ot.formatDoc), printToDoc: Nt(Ot.printToDoc), printDocToString: Nt(Ot.printDocToString) } }; + }); + return e0(); + }); + } + }); + + // node_modules/prettier/parser-graphql.js + var require_parser_graphql = __commonJS({ + "node_modules/prettier/parser-graphql.js"(exports, module) { + (function(e) { + if (typeof exports == "object" && typeof module == "object") + module.exports = e(); + else if (typeof define == "function" && define.amd) + define(e); + else { + var i = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : this || {}; + i.prettierPlugins = i.prettierPlugins || {}, i.prettierPlugins.graphql = e(); + } + })(function() { + "use strict"; + var oe = (a, d) => () => (d || a((d = { exports: {} }).exports, d), d.exports); + var be = oe((Ce, ae) => { + var H = Object.getOwnPropertyNames, se = (a, d) => function() { + return a && (d = (0, a[H(a)[0]])(a = 0)), d; + }, L = (a, d) => function() { + return d || (0, a[H(a)[0]])((d = { exports: {} }).exports, d), d.exports; + }, K = se({ ""() { + } }), ce = L({ "src/common/parser-create-error.js"(a, d) { + "use strict"; + K(); + function i(c, r) { + let _ = new SyntaxError(c + " (" + r.start.line + ":" + r.start.column + ")"); + return _.loc = r, _; + } + d.exports = i; + } }), ue = L({ "src/utils/try-combinations.js"(a, d) { + "use strict"; + K(); + function i() { + let c; + for (var r = arguments.length, _ = new Array(r), E = 0; E < r; E++) + _[E] = arguments[E]; + for (let [k, O] of _.entries()) + try { + return { result: O() }; + } catch (A) { + k === 0 && (c = A); + } + return { error: c }; + } + d.exports = i; + } }), le = L({ "src/language-graphql/pragma.js"(a, d) { + "use strict"; + K(); + function i(r) { + return /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(r); + } + function c(r) { + return `# @format + +` + r; + } + d.exports = { hasPragma: i, insertPragma: c }; + } }), pe = L({ "src/language-graphql/loc.js"(a, d) { + "use strict"; + K(); + function i(r) { + return typeof r.start == "number" ? r.start : r.loc && r.loc.start; + } + function c(r) { + return typeof r.end == "number" ? r.end : r.loc && r.loc.end; + } + d.exports = { locStart: i, locEnd: c }; + } }), fe = L({ "node_modules/graphql/jsutils/isObjectLike.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = i; + function d(c) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(_) { + return typeof _; + } : d = function(_) { + return _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _; + }, d(c); + } + function i(c) { + return d(c) == "object" && c !== null; + } + } }), z = L({ "node_modules/graphql/polyfills/symbols.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.SYMBOL_TO_STRING_TAG = a.SYMBOL_ASYNC_ITERATOR = a.SYMBOL_ITERATOR = void 0; + var d = typeof Symbol == "function" && Symbol.iterator != null ? Symbol.iterator : "@@iterator"; + a.SYMBOL_ITERATOR = d; + var i = typeof Symbol == "function" && Symbol.asyncIterator != null ? Symbol.asyncIterator : "@@asyncIterator"; + a.SYMBOL_ASYNC_ITERATOR = i; + var c = typeof Symbol == "function" && Symbol.toStringTag != null ? Symbol.toStringTag : "@@toStringTag"; + a.SYMBOL_TO_STRING_TAG = c; + } }), $ = L({ "node_modules/graphql/language/location.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.getLocation = d; + function d(i, c) { + for (var r = /\r\n|[\n\r]/g, _ = 1, E = c + 1, k; (k = r.exec(i.body)) && k.index < c; ) + _ += 1, E = c + 1 - (k.index + k[0].length); + return { line: _, column: E }; + } + } }), de = L({ "node_modules/graphql/language/printLocation.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.printLocation = i, a.printSourceLocation = c; + var d = $(); + function i(k) { + return c(k.source, (0, d.getLocation)(k.source, k.start)); + } + function c(k, O) { + var A = k.locationOffset.column - 1, N = _(A) + k.body, g = O.line - 1, D = k.locationOffset.line - 1, v = O.line + D, I = O.line === 1 ? A : 0, s = O.column + I, p2 = "".concat(k.name, ":").concat(v, ":").concat(s, ` +`), e = N.split(/\r\n|[\n\r]/g), n = e[g]; + if (n.length > 120) { + for (var t2 = Math.floor(s / 80), u = s % 80, y = [], f = 0; f < n.length; f += 80) + y.push(n.slice(f, f + 80)); + return p2 + r([["".concat(v), y[0]]].concat(y.slice(1, t2 + 1).map(function(m) { + return ["", m]; + }), [[" ", _(u - 1) + "^"], ["", y[t2 + 1]]])); + } + return p2 + r([["".concat(v - 1), e[g - 1]], ["".concat(v), n], ["", _(s - 1) + "^"], ["".concat(v + 1), e[g + 1]]]); + } + function r(k) { + var O = k.filter(function(N) { + var g = N[0], D = N[1]; + return D !== void 0; + }), A = Math.max.apply(Math, O.map(function(N) { + var g = N[0]; + return g.length; + })); + return O.map(function(N) { + var g = N[0], D = N[1]; + return E(A, g) + (D ? " | " + D : " |"); + }).join(` +`); + } + function _(k) { + return Array(k + 1).join(" "); + } + function E(k, O) { + return _(k - O.length) + O; + } + } }), W = L({ "node_modules/graphql/error/GraphQLError.js"(a) { + "use strict"; + K(); + function d(f) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(o) { + return typeof o; + } : d = function(o) { + return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, d(f); + } + Object.defineProperty(a, "__esModule", { value: true }), a.printError = y, a.GraphQLError = void 0; + var i = E(fe()), c = z(), r = $(), _ = de(); + function E(f) { + return f && f.__esModule ? f : { default: f }; + } + function k(f, m) { + if (!(f instanceof m)) + throw new TypeError("Cannot call a class as a function"); + } + function O(f, m) { + for (var o = 0; o < m.length; o++) { + var h = m[o]; + h.enumerable = h.enumerable || false, h.configurable = true, "value" in h && (h.writable = true), Object.defineProperty(f, h.key, h); + } + } + function A(f, m, o) { + return m && O(f.prototype, m), o && O(f, o), f; + } + function N(f, m) { + if (typeof m != "function" && m !== null) + throw new TypeError("Super expression must either be null or a function"); + f.prototype = Object.create(m && m.prototype, { constructor: { value: f, writable: true, configurable: true } }), m && n(f, m); + } + function g(f) { + var m = p2(); + return function() { + var h = t2(f), l; + if (m) { + var T = t2(this).constructor; + l = Reflect.construct(h, arguments, T); + } else + l = h.apply(this, arguments); + return D(this, l); + }; + } + function D(f, m) { + return m && (d(m) === "object" || typeof m == "function") ? m : v(f); + } + function v(f) { + if (f === void 0) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return f; + } + function I(f) { + var m = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; + return I = function(h) { + if (h === null || !e(h)) + return h; + if (typeof h != "function") + throw new TypeError("Super expression must either be null or a function"); + if (typeof m < "u") { + if (m.has(h)) + return m.get(h); + m.set(h, l); + } + function l() { + return s(h, arguments, t2(this).constructor); + } + return l.prototype = Object.create(h.prototype, { constructor: { value: l, enumerable: false, writable: true, configurable: true } }), n(l, h); + }, I(f); + } + function s(f, m, o) { + return p2() ? s = Reflect.construct : s = function(l, T, S) { + var x = [null]; + x.push.apply(x, T); + var b = Function.bind.apply(l, x), M = new b(); + return S && n(M, S.prototype), M; + }, s.apply(null, arguments); + } + function p2() { + if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) + return false; + if (typeof Proxy == "function") + return true; + try { + return Date.prototype.toString.call(Reflect.construct(Date, [], function() { + })), true; + } catch { + return false; + } + } + function e(f) { + return Function.toString.call(f).indexOf("[native code]") !== -1; + } + function n(f, m) { + return n = Object.setPrototypeOf || function(h, l) { + return h.__proto__ = l, h; + }, n(f, m); + } + function t2(f) { + return t2 = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }, t2(f); + } + var u = function(f) { + N(o, f); + var m = g(o); + function o(h, l, T, S, x, b, M) { + var U, V, q, G, C; + k(this, o), C = m.call(this, h); + var R = Array.isArray(l) ? l.length !== 0 ? l : void 0 : l ? [l] : void 0, Y = T; + if (!Y && R) { + var J; + Y = (J = R[0].loc) === null || J === void 0 ? void 0 : J.source; + } + var F = S; + !F && R && (F = R.reduce(function(w, P) { + return P.loc && w.push(P.loc.start), w; + }, [])), F && F.length === 0 && (F = void 0); + var B; + S && T ? B = S.map(function(w) { + return (0, r.getLocation)(T, w); + }) : R && (B = R.reduce(function(w, P) { + return P.loc && w.push((0, r.getLocation)(P.loc.source, P.loc.start)), w; + }, [])); + var j = M; + if (j == null && b != null) { + var Q = b.extensions; + (0, i.default)(Q) && (j = Q); + } + return Object.defineProperties(v(C), { name: { value: "GraphQLError" }, message: { value: h, enumerable: true, writable: true }, locations: { value: (U = B) !== null && U !== void 0 ? U : void 0, enumerable: B != null }, path: { value: x != null ? x : void 0, enumerable: x != null }, nodes: { value: R != null ? R : void 0 }, source: { value: (V = Y) !== null && V !== void 0 ? V : void 0 }, positions: { value: (q = F) !== null && q !== void 0 ? q : void 0 }, originalError: { value: b }, extensions: { value: (G = j) !== null && G !== void 0 ? G : void 0, enumerable: j != null } }), b != null && b.stack ? (Object.defineProperty(v(C), "stack", { value: b.stack, writable: true, configurable: true }), D(C)) : (Error.captureStackTrace ? Error.captureStackTrace(v(C), o) : Object.defineProperty(v(C), "stack", { value: Error().stack, writable: true, configurable: true }), C); + } + return A(o, [{ key: "toString", value: function() { + return y(this); + } }, { key: c.SYMBOL_TO_STRING_TAG, get: function() { + return "Object"; + } }]), o; + }(I(Error)); + a.GraphQLError = u; + function y(f) { + var m = f.message; + if (f.nodes) + for (var o = 0, h = f.nodes; o < h.length; o++) { + var l = h[o]; + l.loc && (m += ` + +` + (0, _.printLocation)(l.loc)); + } + else if (f.source && f.locations) + for (var T = 0, S = f.locations; T < S.length; T++) { + var x = S[T]; + m += ` + +` + (0, _.printSourceLocation)(f.source, x); + } + return m; + } + } }), Z = L({ "node_modules/graphql/error/syntaxError.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.syntaxError = i; + var d = W(); + function i(c, r, _) { + return new d.GraphQLError("Syntax Error: ".concat(_), void 0, c, [r]); + } + } }), he = L({ "node_modules/graphql/language/kinds.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.Kind = void 0; + var d = Object.freeze({ NAME: "Name", DOCUMENT: "Document", OPERATION_DEFINITION: "OperationDefinition", VARIABLE_DEFINITION: "VariableDefinition", SELECTION_SET: "SelectionSet", FIELD: "Field", ARGUMENT: "Argument", FRAGMENT_SPREAD: "FragmentSpread", INLINE_FRAGMENT: "InlineFragment", FRAGMENT_DEFINITION: "FragmentDefinition", VARIABLE: "Variable", INT: "IntValue", FLOAT: "FloatValue", STRING: "StringValue", BOOLEAN: "BooleanValue", NULL: "NullValue", ENUM: "EnumValue", LIST: "ListValue", OBJECT: "ObjectValue", OBJECT_FIELD: "ObjectField", DIRECTIVE: "Directive", NAMED_TYPE: "NamedType", LIST_TYPE: "ListType", NON_NULL_TYPE: "NonNullType", SCHEMA_DEFINITION: "SchemaDefinition", OPERATION_TYPE_DEFINITION: "OperationTypeDefinition", SCALAR_TYPE_DEFINITION: "ScalarTypeDefinition", OBJECT_TYPE_DEFINITION: "ObjectTypeDefinition", FIELD_DEFINITION: "FieldDefinition", INPUT_VALUE_DEFINITION: "InputValueDefinition", INTERFACE_TYPE_DEFINITION: "InterfaceTypeDefinition", UNION_TYPE_DEFINITION: "UnionTypeDefinition", ENUM_TYPE_DEFINITION: "EnumTypeDefinition", ENUM_VALUE_DEFINITION: "EnumValueDefinition", INPUT_OBJECT_TYPE_DEFINITION: "InputObjectTypeDefinition", DIRECTIVE_DEFINITION: "DirectiveDefinition", SCHEMA_EXTENSION: "SchemaExtension", SCALAR_TYPE_EXTENSION: "ScalarTypeExtension", OBJECT_TYPE_EXTENSION: "ObjectTypeExtension", INTERFACE_TYPE_EXTENSION: "InterfaceTypeExtension", UNION_TYPE_EXTENSION: "UnionTypeExtension", ENUM_TYPE_EXTENSION: "EnumTypeExtension", INPUT_OBJECT_TYPE_EXTENSION: "InputObjectTypeExtension" }); + a.Kind = d; + } }), ve = L({ "node_modules/graphql/jsutils/invariant.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = d; + function d(i, c) { + var r = Boolean(i); + if (!r) + throw new Error(c != null ? c : "Unexpected invariant triggered."); + } + } }), ee = L({ "node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = void 0; + var d = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : void 0, i = d; + a.default = i; + } }), Te = L({ "node_modules/graphql/jsutils/defineInspect.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = r; + var d = c(ve()), i = c(ee()); + function c(_) { + return _ && _.__esModule ? _ : { default: _ }; + } + function r(_) { + var E = _.prototype.toJSON; + typeof E == "function" || (0, d.default)(0), _.prototype.inspect = E, i.default && (_.prototype[i.default] = E); + } + } }), te = L({ "node_modules/graphql/language/ast.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isNode = _, a.Token = a.Location = void 0; + var d = i(Te()); + function i(E) { + return E && E.__esModule ? E : { default: E }; + } + var c = function() { + function E(O, A, N) { + this.start = O.start, this.end = A.end, this.startToken = O, this.endToken = A, this.source = N; + } + var k = E.prototype; + return k.toJSON = function() { + return { start: this.start, end: this.end }; + }, E; + }(); + a.Location = c, (0, d.default)(c); + var r = function() { + function E(O, A, N, g, D, v, I) { + this.kind = O, this.start = A, this.end = N, this.line = g, this.column = D, this.value = I, this.prev = v, this.next = null; + } + var k = E.prototype; + return k.toJSON = function() { + return { kind: this.kind, value: this.value, line: this.line, column: this.column }; + }, E; + }(); + a.Token = r, (0, d.default)(r); + function _(E) { + return E != null && typeof E.kind == "string"; + } + } }), ne = L({ "node_modules/graphql/language/tokenKind.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.TokenKind = void 0; + var d = Object.freeze({ SOF: "", EOF: "", BANG: "!", DOLLAR: "$", AMP: "&", PAREN_L: "(", PAREN_R: ")", SPREAD: "...", COLON: ":", EQUALS: "=", AT: "@", BRACKET_L: "[", BRACKET_R: "]", BRACE_L: "{", PIPE: "|", BRACE_R: "}", NAME: "Name", INT: "Int", FLOAT: "Float", STRING: "String", BLOCK_STRING: "BlockString", COMMENT: "Comment" }); + a.TokenKind = d; + } }), re = L({ "node_modules/graphql/jsutils/inspect.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = E; + var d = i(ee()); + function i(v) { + return v && v.__esModule ? v : { default: v }; + } + function c(v) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? c = function(s) { + return typeof s; + } : c = function(s) { + return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s; + }, c(v); + } + var r = 10, _ = 2; + function E(v) { + return k(v, []); + } + function k(v, I) { + switch (c(v)) { + case "string": + return JSON.stringify(v); + case "function": + return v.name ? "[function ".concat(v.name, "]") : "[function]"; + case "object": + return v === null ? "null" : O(v, I); + default: + return String(v); + } + } + function O(v, I) { + if (I.indexOf(v) !== -1) + return "[Circular]"; + var s = [].concat(I, [v]), p2 = g(v); + if (p2 !== void 0) { + var e = p2.call(v); + if (e !== v) + return typeof e == "string" ? e : k(e, s); + } else if (Array.isArray(v)) + return N(v, s); + return A(v, s); + } + function A(v, I) { + var s = Object.keys(v); + if (s.length === 0) + return "{}"; + if (I.length > _) + return "[" + D(v) + "]"; + var p2 = s.map(function(e) { + var n = k(v[e], I); + return e + ": " + n; + }); + return "{ " + p2.join(", ") + " }"; + } + function N(v, I) { + if (v.length === 0) + return "[]"; + if (I.length > _) + return "[Array]"; + for (var s = Math.min(r, v.length), p2 = v.length - s, e = [], n = 0; n < s; ++n) + e.push(k(v[n], I)); + return p2 === 1 ? e.push("... 1 more item") : p2 > 1 && e.push("... ".concat(p2, " more items")), "[" + e.join(", ") + "]"; + } + function g(v) { + var I = v[String(d.default)]; + if (typeof I == "function") + return I; + if (typeof v.inspect == "function") + return v.inspect; + } + function D(v) { + var I = Object.prototype.toString.call(v).replace(/^\[object /, "").replace(/]$/, ""); + if (I === "Object" && typeof v.constructor == "function") { + var s = v.constructor.name; + if (typeof s == "string" && s !== "") + return s; + } + return I; + } + } }), _e = L({ "node_modules/graphql/jsutils/devAssert.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = d; + function d(i, c) { + var r = Boolean(i); + if (!r) + throw new Error(c); + } + } }), Ee = L({ "node_modules/graphql/jsutils/instanceOf.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = void 0; + var d = i(re()); + function i(r) { + return r && r.__esModule ? r : { default: r }; + } + var c = function(_, E) { + return _ instanceof E; + }; + a.default = c; + } }), me = L({ "node_modules/graphql/language/source.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isSource = A, a.Source = void 0; + var d = z(), i = _(re()), c = _(_e()), r = _(Ee()); + function _(N) { + return N && N.__esModule ? N : { default: N }; + } + function E(N, g) { + for (var D = 0; D < g.length; D++) { + var v = g[D]; + v.enumerable = v.enumerable || false, v.configurable = true, "value" in v && (v.writable = true), Object.defineProperty(N, v.key, v); + } + } + function k(N, g, D) { + return g && E(N.prototype, g), D && E(N, D), N; + } + var O = function() { + function N(g) { + var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "GraphQL request", v = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { line: 1, column: 1 }; + typeof g == "string" || (0, c.default)(0, "Body must be a string. Received: ".concat((0, i.default)(g), ".")), this.body = g, this.name = D, this.locationOffset = v, this.locationOffset.line > 0 || (0, c.default)(0, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || (0, c.default)(0, "column in locationOffset is 1-indexed and must be positive."); + } + return k(N, [{ key: d.SYMBOL_TO_STRING_TAG, get: function() { + return "Source"; + } }]), N; + }(); + a.Source = O; + function A(N) { + return (0, r.default)(N, O); + } + } }), ye = L({ "node_modules/graphql/language/directiveLocation.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.DirectiveLocation = void 0; + var d = Object.freeze({ QUERY: "QUERY", MUTATION: "MUTATION", SUBSCRIPTION: "SUBSCRIPTION", FIELD: "FIELD", FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION", FRAGMENT_SPREAD: "FRAGMENT_SPREAD", INLINE_FRAGMENT: "INLINE_FRAGMENT", VARIABLE_DEFINITION: "VARIABLE_DEFINITION", SCHEMA: "SCHEMA", SCALAR: "SCALAR", OBJECT: "OBJECT", FIELD_DEFINITION: "FIELD_DEFINITION", ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION", INTERFACE: "INTERFACE", UNION: "UNION", ENUM: "ENUM", ENUM_VALUE: "ENUM_VALUE", INPUT_OBJECT: "INPUT_OBJECT", INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION" }); + a.DirectiveLocation = d; + } }), ke = L({ "node_modules/graphql/language/blockString.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.dedentBlockStringValue = d, a.getBlockStringIndentation = c, a.printBlockString = r; + function d(_) { + var E = _.split(/\r\n|[\n\r]/g), k = c(_); + if (k !== 0) + for (var O = 1; O < E.length; O++) + E[O] = E[O].slice(k); + for (var A = 0; A < E.length && i(E[A]); ) + ++A; + for (var N = E.length; N > A && i(E[N - 1]); ) + --N; + return E.slice(A, N).join(` +`); + } + function i(_) { + for (var E = 0; E < _.length; ++E) + if (_[E] !== " " && _[E] !== " ") + return false; + return true; + } + function c(_) { + for (var E, k = true, O = true, A = 0, N = null, g = 0; g < _.length; ++g) + switch (_.charCodeAt(g)) { + case 13: + _.charCodeAt(g + 1) === 10 && ++g; + case 10: + k = false, O = true, A = 0; + break; + case 9: + case 32: + ++A; + break; + default: + O && !k && (N === null || A < N) && (N = A), O = false; + } + return (E = N) !== null && E !== void 0 ? E : 0; + } + function r(_) { + var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, O = _.indexOf(` +`) === -1, A = _[0] === " " || _[0] === " ", N = _[_.length - 1] === '"', g = _[_.length - 1] === "\\", D = !O || N || g || k, v = ""; + return D && !(O && A) && (v += ` +` + E), v += E ? _.replace(/\n/g, ` +` + E) : _, D && (v += ` +`), '"""' + v.replace(/"""/g, '\\"""') + '"""'; + } + } }), Ne = L({ "node_modules/graphql/language/lexer.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isPunctuatorTokenKind = E, a.Lexer = void 0; + var d = Z(), i = te(), c = ne(), r = ke(), _ = function() { + function t2(y) { + var f = new i.Token(c.TokenKind.SOF, 0, 0, 0, 0, null); + this.source = y, this.lastToken = f, this.token = f, this.line = 1, this.lineStart = 0; + } + var u = t2.prototype; + return u.advance = function() { + this.lastToken = this.token; + var f = this.token = this.lookahead(); + return f; + }, u.lookahead = function() { + var f = this.token; + if (f.kind !== c.TokenKind.EOF) + do { + var m; + f = (m = f.next) !== null && m !== void 0 ? m : f.next = O(this, f); + } while (f.kind === c.TokenKind.COMMENT); + return f; + }, t2; + }(); + a.Lexer = _; + function E(t2) { + return t2 === c.TokenKind.BANG || t2 === c.TokenKind.DOLLAR || t2 === c.TokenKind.AMP || t2 === c.TokenKind.PAREN_L || t2 === c.TokenKind.PAREN_R || t2 === c.TokenKind.SPREAD || t2 === c.TokenKind.COLON || t2 === c.TokenKind.EQUALS || t2 === c.TokenKind.AT || t2 === c.TokenKind.BRACKET_L || t2 === c.TokenKind.BRACKET_R || t2 === c.TokenKind.BRACE_L || t2 === c.TokenKind.PIPE || t2 === c.TokenKind.BRACE_R; + } + function k(t2) { + return isNaN(t2) ? c.TokenKind.EOF : t2 < 127 ? JSON.stringify(String.fromCharCode(t2)) : '"\\u'.concat(("00" + t2.toString(16).toUpperCase()).slice(-4), '"'); + } + function O(t2, u) { + for (var y = t2.source, f = y.body, m = f.length, o = u.end; o < m; ) { + var h = f.charCodeAt(o), l = t2.line, T = 1 + o - t2.lineStart; + switch (h) { + case 65279: + case 9: + case 32: + case 44: + ++o; + continue; + case 10: + ++o, ++t2.line, t2.lineStart = o; + continue; + case 13: + f.charCodeAt(o + 1) === 10 ? o += 2 : ++o, ++t2.line, t2.lineStart = o; + continue; + case 33: + return new i.Token(c.TokenKind.BANG, o, o + 1, l, T, u); + case 35: + return N(y, o, l, T, u); + case 36: + return new i.Token(c.TokenKind.DOLLAR, o, o + 1, l, T, u); + case 38: + return new i.Token(c.TokenKind.AMP, o, o + 1, l, T, u); + case 40: + return new i.Token(c.TokenKind.PAREN_L, o, o + 1, l, T, u); + case 41: + return new i.Token(c.TokenKind.PAREN_R, o, o + 1, l, T, u); + case 46: + if (f.charCodeAt(o + 1) === 46 && f.charCodeAt(o + 2) === 46) + return new i.Token(c.TokenKind.SPREAD, o, o + 3, l, T, u); + break; + case 58: + return new i.Token(c.TokenKind.COLON, o, o + 1, l, T, u); + case 61: + return new i.Token(c.TokenKind.EQUALS, o, o + 1, l, T, u); + case 64: + return new i.Token(c.TokenKind.AT, o, o + 1, l, T, u); + case 91: + return new i.Token(c.TokenKind.BRACKET_L, o, o + 1, l, T, u); + case 93: + return new i.Token(c.TokenKind.BRACKET_R, o, o + 1, l, T, u); + case 123: + return new i.Token(c.TokenKind.BRACE_L, o, o + 1, l, T, u); + case 124: + return new i.Token(c.TokenKind.PIPE, o, o + 1, l, T, u); + case 125: + return new i.Token(c.TokenKind.BRACE_R, o, o + 1, l, T, u); + case 34: + return f.charCodeAt(o + 1) === 34 && f.charCodeAt(o + 2) === 34 ? I(y, o, l, T, u, t2) : v(y, o, l, T, u); + case 45: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return g(y, o, h, l, T, u); + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + return e(y, o, l, T, u); + } + throw (0, d.syntaxError)(y, o, A(h)); + } + var S = t2.line, x = 1 + o - t2.lineStart; + return new i.Token(c.TokenKind.EOF, m, m, S, x, u); + } + function A(t2) { + return t2 < 32 && t2 !== 9 && t2 !== 10 && t2 !== 13 ? "Cannot contain the invalid character ".concat(k(t2), ".") : t2 === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : "Cannot parse the unexpected character ".concat(k(t2), "."); + } + function N(t2, u, y, f, m) { + var o = t2.body, h, l = u; + do + h = o.charCodeAt(++l); + while (!isNaN(h) && (h > 31 || h === 9)); + return new i.Token(c.TokenKind.COMMENT, u, l, y, f, m, o.slice(u + 1, l)); + } + function g(t2, u, y, f, m, o) { + var h = t2.body, l = y, T = u, S = false; + if (l === 45 && (l = h.charCodeAt(++T)), l === 48) { + if (l = h.charCodeAt(++T), l >= 48 && l <= 57) + throw (0, d.syntaxError)(t2, T, "Invalid number, unexpected digit after 0: ".concat(k(l), ".")); + } else + T = D(t2, T, l), l = h.charCodeAt(T); + if (l === 46 && (S = true, l = h.charCodeAt(++T), T = D(t2, T, l), l = h.charCodeAt(T)), (l === 69 || l === 101) && (S = true, l = h.charCodeAt(++T), (l === 43 || l === 45) && (l = h.charCodeAt(++T)), T = D(t2, T, l), l = h.charCodeAt(T)), l === 46 || n(l)) + throw (0, d.syntaxError)(t2, T, "Invalid number, expected digit but got: ".concat(k(l), ".")); + return new i.Token(S ? c.TokenKind.FLOAT : c.TokenKind.INT, u, T, f, m, o, h.slice(u, T)); + } + function D(t2, u, y) { + var f = t2.body, m = u, o = y; + if (o >= 48 && o <= 57) { + do + o = f.charCodeAt(++m); + while (o >= 48 && o <= 57); + return m; + } + throw (0, d.syntaxError)(t2, m, "Invalid number, expected digit but got: ".concat(k(o), ".")); + } + function v(t2, u, y, f, m) { + for (var o = t2.body, h = u + 1, l = h, T = 0, S = ""; h < o.length && !isNaN(T = o.charCodeAt(h)) && T !== 10 && T !== 13; ) { + if (T === 34) + return S += o.slice(l, h), new i.Token(c.TokenKind.STRING, u, h + 1, y, f, m, S); + if (T < 32 && T !== 9) + throw (0, d.syntaxError)(t2, h, "Invalid character within String: ".concat(k(T), ".")); + if (++h, T === 92) { + switch (S += o.slice(l, h - 1), T = o.charCodeAt(h), T) { + case 34: + S += '"'; + break; + case 47: + S += "/"; + break; + case 92: + S += "\\"; + break; + case 98: + S += "\b"; + break; + case 102: + S += "\f"; + break; + case 110: + S += ` +`; + break; + case 114: + S += "\r"; + break; + case 116: + S += " "; + break; + case 117: { + var x = s(o.charCodeAt(h + 1), o.charCodeAt(h + 2), o.charCodeAt(h + 3), o.charCodeAt(h + 4)); + if (x < 0) { + var b = o.slice(h + 1, h + 5); + throw (0, d.syntaxError)(t2, h, "Invalid character escape sequence: \\u".concat(b, ".")); + } + S += String.fromCharCode(x), h += 4; + break; + } + default: + throw (0, d.syntaxError)(t2, h, "Invalid character escape sequence: \\".concat(String.fromCharCode(T), ".")); + } + ++h, l = h; + } + } + throw (0, d.syntaxError)(t2, h, "Unterminated string."); + } + function I(t2, u, y, f, m, o) { + for (var h = t2.body, l = u + 3, T = l, S = 0, x = ""; l < h.length && !isNaN(S = h.charCodeAt(l)); ) { + if (S === 34 && h.charCodeAt(l + 1) === 34 && h.charCodeAt(l + 2) === 34) + return x += h.slice(T, l), new i.Token(c.TokenKind.BLOCK_STRING, u, l + 3, y, f, m, (0, r.dedentBlockStringValue)(x)); + if (S < 32 && S !== 9 && S !== 10 && S !== 13) + throw (0, d.syntaxError)(t2, l, "Invalid character within String: ".concat(k(S), ".")); + S === 10 ? (++l, ++o.line, o.lineStart = l) : S === 13 ? (h.charCodeAt(l + 1) === 10 ? l += 2 : ++l, ++o.line, o.lineStart = l) : S === 92 && h.charCodeAt(l + 1) === 34 && h.charCodeAt(l + 2) === 34 && h.charCodeAt(l + 3) === 34 ? (x += h.slice(T, l) + '"""', l += 4, T = l) : ++l; + } + throw (0, d.syntaxError)(t2, l, "Unterminated string."); + } + function s(t2, u, y, f) { + return p2(t2) << 12 | p2(u) << 8 | p2(y) << 4 | p2(f); + } + function p2(t2) { + return t2 >= 48 && t2 <= 57 ? t2 - 48 : t2 >= 65 && t2 <= 70 ? t2 - 55 : t2 >= 97 && t2 <= 102 ? t2 - 87 : -1; + } + function e(t2, u, y, f, m) { + for (var o = t2.body, h = o.length, l = u + 1, T = 0; l !== h && !isNaN(T = o.charCodeAt(l)) && (T === 95 || T >= 48 && T <= 57 || T >= 65 && T <= 90 || T >= 97 && T <= 122); ) + ++l; + return new i.Token(c.TokenKind.NAME, u, l, y, f, m, o.slice(u, l)); + } + function n(t2) { + return t2 === 95 || t2 >= 65 && t2 <= 90 || t2 >= 97 && t2 <= 122; + } + } }), Oe = L({ "node_modules/graphql/language/parser.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.parse = O, a.parseValue = A, a.parseType = N, a.Parser = void 0; + var d = Z(), i = he(), c = te(), r = ne(), _ = me(), E = ye(), k = Ne(); + function O(I, s) { + var p2 = new g(I, s); + return p2.parseDocument(); + } + function A(I, s) { + var p2 = new g(I, s); + p2.expectToken(r.TokenKind.SOF); + var e = p2.parseValueLiteral(false); + return p2.expectToken(r.TokenKind.EOF), e; + } + function N(I, s) { + var p2 = new g(I, s); + p2.expectToken(r.TokenKind.SOF); + var e = p2.parseTypeReference(); + return p2.expectToken(r.TokenKind.EOF), e; + } + var g = function() { + function I(p2, e) { + var n = (0, _.isSource)(p2) ? p2 : new _.Source(p2); + this._lexer = new k.Lexer(n), this._options = e; + } + var s = I.prototype; + return s.parseName = function() { + var e = this.expectToken(r.TokenKind.NAME); + return { kind: i.Kind.NAME, value: e.value, loc: this.loc(e) }; + }, s.parseDocument = function() { + var e = this._lexer.token; + return { kind: i.Kind.DOCUMENT, definitions: this.many(r.TokenKind.SOF, this.parseDefinition, r.TokenKind.EOF), loc: this.loc(e) }; + }, s.parseDefinition = function() { + if (this.peek(r.TokenKind.NAME)) + switch (this._lexer.token.value) { + case "query": + case "mutation": + case "subscription": + return this.parseOperationDefinition(); + case "fragment": + return this.parseFragmentDefinition(); + case "schema": + case "scalar": + case "type": + case "interface": + case "union": + case "enum": + case "input": + case "directive": + return this.parseTypeSystemDefinition(); + case "extend": + return this.parseTypeSystemExtension(); + } + else { + if (this.peek(r.TokenKind.BRACE_L)) + return this.parseOperationDefinition(); + if (this.peekDescription()) + return this.parseTypeSystemDefinition(); + } + throw this.unexpected(); + }, s.parseOperationDefinition = function() { + var e = this._lexer.token; + if (this.peek(r.TokenKind.BRACE_L)) + return { kind: i.Kind.OPERATION_DEFINITION, operation: "query", name: void 0, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + var n = this.parseOperationType(), t2; + return this.peek(r.TokenKind.NAME) && (t2 = this.parseName()), { kind: i.Kind.OPERATION_DEFINITION, operation: n, name: t2, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + }, s.parseOperationType = function() { + var e = this.expectToken(r.TokenKind.NAME); + switch (e.value) { + case "query": + return "query"; + case "mutation": + return "mutation"; + case "subscription": + return "subscription"; + } + throw this.unexpected(e); + }, s.parseVariableDefinitions = function() { + return this.optionalMany(r.TokenKind.PAREN_L, this.parseVariableDefinition, r.TokenKind.PAREN_R); + }, s.parseVariableDefinition = function() { + var e = this._lexer.token; + return { kind: i.Kind.VARIABLE_DEFINITION, variable: this.parseVariable(), type: (this.expectToken(r.TokenKind.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(r.TokenKind.EQUALS) ? this.parseValueLiteral(true) : void 0, directives: this.parseDirectives(true), loc: this.loc(e) }; + }, s.parseVariable = function() { + var e = this._lexer.token; + return this.expectToken(r.TokenKind.DOLLAR), { kind: i.Kind.VARIABLE, name: this.parseName(), loc: this.loc(e) }; + }, s.parseSelectionSet = function() { + var e = this._lexer.token; + return { kind: i.Kind.SELECTION_SET, selections: this.many(r.TokenKind.BRACE_L, this.parseSelection, r.TokenKind.BRACE_R), loc: this.loc(e) }; + }, s.parseSelection = function() { + return this.peek(r.TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + }, s.parseField = function() { + var e = this._lexer.token, n = this.parseName(), t2, u; + return this.expectOptionalToken(r.TokenKind.COLON) ? (t2 = n, u = this.parseName()) : u = n, { kind: i.Kind.FIELD, alias: t2, name: u, arguments: this.parseArguments(false), directives: this.parseDirectives(false), selectionSet: this.peek(r.TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0, loc: this.loc(e) }; + }, s.parseArguments = function(e) { + var n = e ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(r.TokenKind.PAREN_L, n, r.TokenKind.PAREN_R); + }, s.parseArgument = function() { + var e = this._lexer.token, n = this.parseName(); + return this.expectToken(r.TokenKind.COLON), { kind: i.Kind.ARGUMENT, name: n, value: this.parseValueLiteral(false), loc: this.loc(e) }; + }, s.parseConstArgument = function() { + var e = this._lexer.token; + return { kind: i.Kind.ARGUMENT, name: this.parseName(), value: (this.expectToken(r.TokenKind.COLON), this.parseValueLiteral(true)), loc: this.loc(e) }; + }, s.parseFragment = function() { + var e = this._lexer.token; + this.expectToken(r.TokenKind.SPREAD); + var n = this.expectOptionalKeyword("on"); + return !n && this.peek(r.TokenKind.NAME) ? { kind: i.Kind.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(false), loc: this.loc(e) } : { kind: i.Kind.INLINE_FRAGMENT, typeCondition: n ? this.parseNamedType() : void 0, directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + }, s.parseFragmentDefinition = function() { + var e, n = this._lexer.token; + return this.expectKeyword("fragment"), ((e = this._options) === null || e === void 0 ? void 0 : e.experimentalFragmentVariables) === true ? { kind: i.Kind.FRAGMENT_DEFINITION, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(n) } : { kind: i.Kind.FRAGMENT_DEFINITION, name: this.parseFragmentName(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(n) }; + }, s.parseFragmentName = function() { + if (this._lexer.token.value === "on") + throw this.unexpected(); + return this.parseName(); + }, s.parseValueLiteral = function(e) { + var n = this._lexer.token; + switch (n.kind) { + case r.TokenKind.BRACKET_L: + return this.parseList(e); + case r.TokenKind.BRACE_L: + return this.parseObject(e); + case r.TokenKind.INT: + return this._lexer.advance(), { kind: i.Kind.INT, value: n.value, loc: this.loc(n) }; + case r.TokenKind.FLOAT: + return this._lexer.advance(), { kind: i.Kind.FLOAT, value: n.value, loc: this.loc(n) }; + case r.TokenKind.STRING: + case r.TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + case r.TokenKind.NAME: + switch (this._lexer.advance(), n.value) { + case "true": + return { kind: i.Kind.BOOLEAN, value: true, loc: this.loc(n) }; + case "false": + return { kind: i.Kind.BOOLEAN, value: false, loc: this.loc(n) }; + case "null": + return { kind: i.Kind.NULL, loc: this.loc(n) }; + default: + return { kind: i.Kind.ENUM, value: n.value, loc: this.loc(n) }; + } + case r.TokenKind.DOLLAR: + if (!e) + return this.parseVariable(); + break; + } + throw this.unexpected(); + }, s.parseStringLiteral = function() { + var e = this._lexer.token; + return this._lexer.advance(), { kind: i.Kind.STRING, value: e.value, block: e.kind === r.TokenKind.BLOCK_STRING, loc: this.loc(e) }; + }, s.parseList = function(e) { + var n = this, t2 = this._lexer.token, u = function() { + return n.parseValueLiteral(e); + }; + return { kind: i.Kind.LIST, values: this.any(r.TokenKind.BRACKET_L, u, r.TokenKind.BRACKET_R), loc: this.loc(t2) }; + }, s.parseObject = function(e) { + var n = this, t2 = this._lexer.token, u = function() { + return n.parseObjectField(e); + }; + return { kind: i.Kind.OBJECT, fields: this.any(r.TokenKind.BRACE_L, u, r.TokenKind.BRACE_R), loc: this.loc(t2) }; + }, s.parseObjectField = function(e) { + var n = this._lexer.token, t2 = this.parseName(); + return this.expectToken(r.TokenKind.COLON), { kind: i.Kind.OBJECT_FIELD, name: t2, value: this.parseValueLiteral(e), loc: this.loc(n) }; + }, s.parseDirectives = function(e) { + for (var n = []; this.peek(r.TokenKind.AT); ) + n.push(this.parseDirective(e)); + return n; + }, s.parseDirective = function(e) { + var n = this._lexer.token; + return this.expectToken(r.TokenKind.AT), { kind: i.Kind.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(e), loc: this.loc(n) }; + }, s.parseTypeReference = function() { + var e = this._lexer.token, n; + return this.expectOptionalToken(r.TokenKind.BRACKET_L) ? (n = this.parseTypeReference(), this.expectToken(r.TokenKind.BRACKET_R), n = { kind: i.Kind.LIST_TYPE, type: n, loc: this.loc(e) }) : n = this.parseNamedType(), this.expectOptionalToken(r.TokenKind.BANG) ? { kind: i.Kind.NON_NULL_TYPE, type: n, loc: this.loc(e) } : n; + }, s.parseNamedType = function() { + var e = this._lexer.token; + return { kind: i.Kind.NAMED_TYPE, name: this.parseName(), loc: this.loc(e) }; + }, s.parseTypeSystemDefinition = function() { + var e = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token; + if (e.kind === r.TokenKind.NAME) + switch (e.value) { + case "schema": + return this.parseSchemaDefinition(); + case "scalar": + return this.parseScalarTypeDefinition(); + case "type": + return this.parseObjectTypeDefinition(); + case "interface": + return this.parseInterfaceTypeDefinition(); + case "union": + return this.parseUnionTypeDefinition(); + case "enum": + return this.parseEnumTypeDefinition(); + case "input": + return this.parseInputObjectTypeDefinition(); + case "directive": + return this.parseDirectiveDefinition(); + } + throw this.unexpected(e); + }, s.peekDescription = function() { + return this.peek(r.TokenKind.STRING) || this.peek(r.TokenKind.BLOCK_STRING); + }, s.parseDescription = function() { + if (this.peekDescription()) + return this.parseStringLiteral(); + }, s.parseSchemaDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("schema"); + var t2 = this.parseDirectives(true), u = this.many(r.TokenKind.BRACE_L, this.parseOperationTypeDefinition, r.TokenKind.BRACE_R); + return { kind: i.Kind.SCHEMA_DEFINITION, description: n, directives: t2, operationTypes: u, loc: this.loc(e) }; + }, s.parseOperationTypeDefinition = function() { + var e = this._lexer.token, n = this.parseOperationType(); + this.expectToken(r.TokenKind.COLON); + var t2 = this.parseNamedType(); + return { kind: i.Kind.OPERATION_TYPE_DEFINITION, operation: n, type: t2, loc: this.loc(e) }; + }, s.parseScalarTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("scalar"); + var t2 = this.parseName(), u = this.parseDirectives(true); + return { kind: i.Kind.SCALAR_TYPE_DEFINITION, description: n, name: t2, directives: u, loc: this.loc(e) }; + }, s.parseObjectTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("type"); + var t2 = this.parseName(), u = this.parseImplementsInterfaces(), y = this.parseDirectives(true), f = this.parseFieldsDefinition(); + return { kind: i.Kind.OBJECT_TYPE_DEFINITION, description: n, name: t2, interfaces: u, directives: y, fields: f, loc: this.loc(e) }; + }, s.parseImplementsInterfaces = function() { + var e; + if (!this.expectOptionalKeyword("implements")) + return []; + if (((e = this._options) === null || e === void 0 ? void 0 : e.allowLegacySDLImplementsInterfaces) === true) { + var n = []; + this.expectOptionalToken(r.TokenKind.AMP); + do + n.push(this.parseNamedType()); + while (this.expectOptionalToken(r.TokenKind.AMP) || this.peek(r.TokenKind.NAME)); + return n; + } + return this.delimitedMany(r.TokenKind.AMP, this.parseNamedType); + }, s.parseFieldsDefinition = function() { + var e; + return ((e = this._options) === null || e === void 0 ? void 0 : e.allowLegacySDLEmptyFields) === true && this.peek(r.TokenKind.BRACE_L) && this._lexer.lookahead().kind === r.TokenKind.BRACE_R ? (this._lexer.advance(), this._lexer.advance(), []) : this.optionalMany(r.TokenKind.BRACE_L, this.parseFieldDefinition, r.TokenKind.BRACE_R); + }, s.parseFieldDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(), u = this.parseArgumentDefs(); + this.expectToken(r.TokenKind.COLON); + var y = this.parseTypeReference(), f = this.parseDirectives(true); + return { kind: i.Kind.FIELD_DEFINITION, description: n, name: t2, arguments: u, type: y, directives: f, loc: this.loc(e) }; + }, s.parseArgumentDefs = function() { + return this.optionalMany(r.TokenKind.PAREN_L, this.parseInputValueDef, r.TokenKind.PAREN_R); + }, s.parseInputValueDef = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(); + this.expectToken(r.TokenKind.COLON); + var u = this.parseTypeReference(), y; + this.expectOptionalToken(r.TokenKind.EQUALS) && (y = this.parseValueLiteral(true)); + var f = this.parseDirectives(true); + return { kind: i.Kind.INPUT_VALUE_DEFINITION, description: n, name: t2, type: u, defaultValue: y, directives: f, loc: this.loc(e) }; + }, s.parseInterfaceTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("interface"); + var t2 = this.parseName(), u = this.parseImplementsInterfaces(), y = this.parseDirectives(true), f = this.parseFieldsDefinition(); + return { kind: i.Kind.INTERFACE_TYPE_DEFINITION, description: n, name: t2, interfaces: u, directives: y, fields: f, loc: this.loc(e) }; + }, s.parseUnionTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("union"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseUnionMemberTypes(); + return { kind: i.Kind.UNION_TYPE_DEFINITION, description: n, name: t2, directives: u, types: y, loc: this.loc(e) }; + }, s.parseUnionMemberTypes = function() { + return this.expectOptionalToken(r.TokenKind.EQUALS) ? this.delimitedMany(r.TokenKind.PIPE, this.parseNamedType) : []; + }, s.parseEnumTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("enum"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseEnumValuesDefinition(); + return { kind: i.Kind.ENUM_TYPE_DEFINITION, description: n, name: t2, directives: u, values: y, loc: this.loc(e) }; + }, s.parseEnumValuesDefinition = function() { + return this.optionalMany(r.TokenKind.BRACE_L, this.parseEnumValueDefinition, r.TokenKind.BRACE_R); + }, s.parseEnumValueDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(), u = this.parseDirectives(true); + return { kind: i.Kind.ENUM_VALUE_DEFINITION, description: n, name: t2, directives: u, loc: this.loc(e) }; + }, s.parseInputObjectTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("input"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseInputFieldsDefinition(); + return { kind: i.Kind.INPUT_OBJECT_TYPE_DEFINITION, description: n, name: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseInputFieldsDefinition = function() { + return this.optionalMany(r.TokenKind.BRACE_L, this.parseInputValueDef, r.TokenKind.BRACE_R); + }, s.parseTypeSystemExtension = function() { + var e = this._lexer.lookahead(); + if (e.kind === r.TokenKind.NAME) + switch (e.value) { + case "schema": + return this.parseSchemaExtension(); + case "scalar": + return this.parseScalarTypeExtension(); + case "type": + return this.parseObjectTypeExtension(); + case "interface": + return this.parseInterfaceTypeExtension(); + case "union": + return this.parseUnionTypeExtension(); + case "enum": + return this.parseEnumTypeExtension(); + case "input": + return this.parseInputObjectTypeExtension(); + } + throw this.unexpected(e); + }, s.parseSchemaExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("schema"); + var n = this.parseDirectives(true), t2 = this.optionalMany(r.TokenKind.BRACE_L, this.parseOperationTypeDefinition, r.TokenKind.BRACE_R); + if (n.length === 0 && t2.length === 0) + throw this.unexpected(); + return { kind: i.Kind.SCHEMA_EXTENSION, directives: n, operationTypes: t2, loc: this.loc(e) }; + }, s.parseScalarTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("scalar"); + var n = this.parseName(), t2 = this.parseDirectives(true); + if (t2.length === 0) + throw this.unexpected(); + return { kind: i.Kind.SCALAR_TYPE_EXTENSION, name: n, directives: t2, loc: this.loc(e) }; + }, s.parseObjectTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("type"); + var n = this.parseName(), t2 = this.parseImplementsInterfaces(), u = this.parseDirectives(true), y = this.parseFieldsDefinition(); + if (t2.length === 0 && u.length === 0 && y.length === 0) + throw this.unexpected(); + return { kind: i.Kind.OBJECT_TYPE_EXTENSION, name: n, interfaces: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseInterfaceTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("interface"); + var n = this.parseName(), t2 = this.parseImplementsInterfaces(), u = this.parseDirectives(true), y = this.parseFieldsDefinition(); + if (t2.length === 0 && u.length === 0 && y.length === 0) + throw this.unexpected(); + return { kind: i.Kind.INTERFACE_TYPE_EXTENSION, name: n, interfaces: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseUnionTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("union"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseUnionMemberTypes(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.UNION_TYPE_EXTENSION, name: n, directives: t2, types: u, loc: this.loc(e) }; + }, s.parseEnumTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("enum"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseEnumValuesDefinition(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.ENUM_TYPE_EXTENSION, name: n, directives: t2, values: u, loc: this.loc(e) }; + }, s.parseInputObjectTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("input"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseInputFieldsDefinition(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.INPUT_OBJECT_TYPE_EXTENSION, name: n, directives: t2, fields: u, loc: this.loc(e) }; + }, s.parseDirectiveDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("directive"), this.expectToken(r.TokenKind.AT); + var t2 = this.parseName(), u = this.parseArgumentDefs(), y = this.expectOptionalKeyword("repeatable"); + this.expectKeyword("on"); + var f = this.parseDirectiveLocations(); + return { kind: i.Kind.DIRECTIVE_DEFINITION, description: n, name: t2, arguments: u, repeatable: y, locations: f, loc: this.loc(e) }; + }, s.parseDirectiveLocations = function() { + return this.delimitedMany(r.TokenKind.PIPE, this.parseDirectiveLocation); + }, s.parseDirectiveLocation = function() { + var e = this._lexer.token, n = this.parseName(); + if (E.DirectiveLocation[n.value] !== void 0) + return n; + throw this.unexpected(e); + }, s.loc = function(e) { + var n; + if (((n = this._options) === null || n === void 0 ? void 0 : n.noLocation) !== true) + return new c.Location(e, this._lexer.lastToken, this._lexer.source); + }, s.peek = function(e) { + return this._lexer.token.kind === e; + }, s.expectToken = function(e) { + var n = this._lexer.token; + if (n.kind === e) + return this._lexer.advance(), n; + throw (0, d.syntaxError)(this._lexer.source, n.start, "Expected ".concat(v(e), ", found ").concat(D(n), ".")); + }, s.expectOptionalToken = function(e) { + var n = this._lexer.token; + if (n.kind === e) + return this._lexer.advance(), n; + }, s.expectKeyword = function(e) { + var n = this._lexer.token; + if (n.kind === r.TokenKind.NAME && n.value === e) + this._lexer.advance(); + else + throw (0, d.syntaxError)(this._lexer.source, n.start, 'Expected "'.concat(e, '", found ').concat(D(n), ".")); + }, s.expectOptionalKeyword = function(e) { + var n = this._lexer.token; + return n.kind === r.TokenKind.NAME && n.value === e ? (this._lexer.advance(), true) : false; + }, s.unexpected = function(e) { + var n = e != null ? e : this._lexer.token; + return (0, d.syntaxError)(this._lexer.source, n.start, "Unexpected ".concat(D(n), ".")); + }, s.any = function(e, n, t2) { + this.expectToken(e); + for (var u = []; !this.expectOptionalToken(t2); ) + u.push(n.call(this)); + return u; + }, s.optionalMany = function(e, n, t2) { + if (this.expectOptionalToken(e)) { + var u = []; + do + u.push(n.call(this)); + while (!this.expectOptionalToken(t2)); + return u; + } + return []; + }, s.many = function(e, n, t2) { + this.expectToken(e); + var u = []; + do + u.push(n.call(this)); + while (!this.expectOptionalToken(t2)); + return u; + }, s.delimitedMany = function(e, n) { + this.expectOptionalToken(e); + var t2 = []; + do + t2.push(n.call(this)); + while (this.expectOptionalToken(e)); + return t2; + }, I; + }(); + a.Parser = g; + function D(I) { + var s = I.value; + return v(I.kind) + (s != null ? ' "'.concat(s, '"') : ""); + } + function v(I) { + return (0, k.isPunctuatorTokenKind)(I) ? '"'.concat(I, '"') : I; + } + } }); + K(); + var Ie = ce(), ge = ue(), { hasPragma: Se } = le(), { locStart: Ae, locEnd: De } = pe(); + function Ke(a) { + let d = [], { startToken: i } = a.loc, { next: c } = i; + for (; c.kind !== ""; ) + c.kind === "Comment" && (Object.assign(c, { column: c.column - 1 }), d.push(c)), c = c.next; + return d; + } + function ie(a) { + if (a && typeof a == "object") { + delete a.startToken, delete a.endToken, delete a.prev, delete a.next; + for (let d in a) + ie(a[d]); + } + return a; + } + var X = { allowLegacySDLImplementsInterfaces: false, experimentalFragmentVariables: true }; + function Le(a) { + let { GraphQLError: d } = W(); + if (a instanceof d) { + let { message: i, locations: [c] } = a; + return Ie(i, { start: c }); + } + return a; + } + function xe(a) { + let { parse: d } = Oe(), { result: i, error: c } = ge(() => d(a, Object.assign({}, X)), () => d(a, Object.assign(Object.assign({}, X), {}, { allowLegacySDLImplementsInterfaces: true }))); + if (!i) + throw Le(c); + return i.comments = Ke(i), ie(i), i; + } + ae.exports = { parsers: { graphql: { parse: xe, astFormat: "graphql", hasPragma: Se, locStart: Ae, locEnd: De } } }; + }); + return be(); + }); + } + }); + + // node_modules/monaco-editor/esm/vs/base/common/errors.js + var 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); + }; + } + addListener(listener) { + this.listeners.push(listener); + return () => { + this._removeListener(listener); + }; + } + emit(e) { + this.listeners.forEach((listener) => { + listener(e); + }); + } + _removeListener(listener) { + this.listeners.splice(this.listeners.indexOf(listener), 1); + } + setUnexpectedErrorHandler(newUnexpectedErrorHandler) { + this.unexpectedErrorHandler = newUnexpectedErrorHandler; + } + getUnexpectedErrorHandler() { + return this.unexpectedErrorHandler; + } + onUnexpectedError(e) { + this.unexpectedErrorHandler(e); + this.emit(e); + } + // For external errors, we don't want the listeners to be called + onUnexpectedExternalError(e) { + this.unexpectedErrorHandler(e); + } + }; + var errorHandler = new ErrorHandler(); + function onUnexpectedError(e) { + if (!isCancellationError(e)) { + errorHandler.onUnexpectedError(e); + } + return void 0; + } + function transformErrorForSerialization(error) { + if (error instanceof Error) { + const { name: name2, message } = error; + const stack = error.stacktrace || error.stack; + return { + $isError: true, + name: name2, + message, + stack, + noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error) + }; + } + return error; + } + var canceledName = "Canceled"; + function isCancellationError(error) { + if (error instanceof CancellationError) { + return true; + } + return error instanceof Error && error.name === canceledName && error.message === canceledName; + } + var CancellationError = class extends Error { + constructor() { + super(canceledName); + this.name = this.message; + } + }; + var ErrorNoTelemetry = class _ErrorNoTelemetry 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"; + } + }; + var BugIndicatingError = class _BugIndicatingError extends Error { + constructor(message) { + super(message || "An unexpected bug occurred."); + Object.setPrototypeOf(this, _BugIndicatingError.prototype); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/functional.js + 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; + }; + } + + // node_modules/monaco-editor/esm/vs/base/common/iterator.js + var Iterable; + (function(Iterable2) { + function is(thing) { + return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function"; + } + Iterable2.is = is; + const _empty2 = Object.freeze([]); + function empty() { + return _empty2; + } + Iterable2.empty = empty; + function* single(element) { + yield element; + } + Iterable2.single = single; + function wrap2(iterableOrElement) { + if (is(iterableOrElement)) { + return iterableOrElement; + } else { + return single(iterableOrElement); + } + } + Iterable2.wrap = wrap2; + function from(iterable) { + return iterable || _empty2; + } + Iterable2.from = from; + function isEmpty(iterable) { + return !iterable || iterable[Symbol.iterator]().next().done === true; + } + Iterable2.isEmpty = isEmpty; + function first(iterable) { + return iterable[Symbol.iterator]().next().value; + } + Iterable2.first = first; + 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* concat(...iterables) { + for (const iterable of iterables) { + for (const element of iterable) { + yield element; + } + } + } + Iterable2.concat = concat; + 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 < to; from2++) { + yield arr[from2]; + } + } + Iterable2.slice = slice; + function consume(iterable, atMost = Number.POSITIVE_INFINITY) { + const consumed = []; + if (atMost === 0) { + return [consumed, iterable]; + } + const iterator = iterable[Symbol.iterator](); + for (let i = 0; i < atMost; i++) { + const next = iterator.next(); + if (next.done) { + return [consumed, Iterable2.empty()]; + } + consumed.push(next.value); + } + return [consumed, { [Symbol.iterator]() { + return iterator; + } }]; + } + Iterable2.consume = consume; + })(Iterable || (Iterable = {})); + + // node_modules/monaco-editor/esm/vs/base/common/lifecycle.js + var TRACK_DISPOSABLES = false; + var disposableTracker = null; + function setDisposableTracker(tracker) { + disposableTracker = tracker; + } + 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 (_a3) { + } + } + } + markAsDisposed(disposable) { + if (disposable && disposable !== Disposable.None) { + try { + disposable[__is_disposable_tracked__] = true; + } catch (_a3) { + } + } + } + markAsSingleton(disposable) { + } + }()); + } + 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 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 DisposableStore = class _DisposableStore { + constructor() { + this._toDispose = /* @__PURE__ */ new Set(); + this._isDisposed = false; + trackDisposable(this); + } + /** + * Dispose of all registered disposables and mark this object as disposed. + * + * Any future disposables added to this object will be disposed of on `add`. + */ + dispose() { + if (this._isDisposed) { + return; + } + markAsDisposed(this); + this._isDisposed = true; + this.clear(); + } + /** + * @return `true` if this object has been disposed of. + */ + get isDisposed() { + return this._isDisposed; + } + /** + * Dispose of all registered disposables but do not mark this object as disposed. + */ + clear() { + if (this._toDispose.size === 0) { + return; + } + try { + dispose(this._toDispose); + } finally { + this._toDispose.clear(); + } + } + /** + * Add a new {@link IDisposable disposable} to the collection. + */ + 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; + var Disposable = class { + constructor() { + this._store = new DisposableStore(); + trackDisposable(this); + setParentOfDisposable(this._store, this); + } + dispose() { + markAsDisposed(this); + this._store.dispose(); + } + /** + * Adds `o` to the collection of disposables managed by this object. + */ + _register(o) { + if (o === this) { + throw new Error("Cannot register a disposable on itself!"); + } + return this._store.add(o); + } + }; + Disposable.None = Object.freeze({ dispose() { + } }); + var DisposableMap = class { + constructor() { + this._store = /* @__PURE__ */ new Map(); + this._isDisposed = false; + trackDisposable(this); + } + /** + * Disposes of all stored values and mark this object as disposed. + * + * Trying to use this object after it has been disposed of is an error. + */ + dispose() { + markAsDisposed(this); + this._isDisposed = true; + this.clearAndDisposeAll(); + } + /** + * Disposes of all stored values and clear the map, but DO NOT mark this object as disposed. + */ + clearAndDisposeAll() { + if (!this._store.size) { + return; + } + try { + dispose(this._store.values()); + } finally { + this._store.clear(); + } + } + has(key) { + return this._store.has(key); + } + get(key) { + return this._store.get(key); + } + set(key, value, skipDisposeOnOverwrite = false) { + var _a3; + 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) { + (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + } + this._store.set(key, value); + } + /** + * Delete the value stored for `key` from this map and also dispose of it. + */ + deleteAndDispose(key) { + var _a3; + (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + this._store.delete(key); + } + [Symbol.iterator]() { + return this._store[Symbol.iterator](); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/linkedList.js + var Node = class _Node { + constructor(element) { + this.element = element; + this.next = _Node.Undefined; + this.prev = _Node.Undefined; + } + }; + Node.Undefined = new Node(void 0); + var LinkedList = class { + constructor() { + this._first = Node.Undefined; + this._last = Node.Undefined; + this._size = 0; + } + get size() { + return this._size; + } + isEmpty() { + return this._first === Node.Undefined; + } + clear() { + let node = this._first; + while (node !== Node.Undefined) { + const next = node.next; + node.prev = Node.Undefined; + node.next = Node.Undefined; + node = next; + } + this._first = Node.Undefined; + this._last = Node.Undefined; + this._size = 0; + } + unshift(element) { + return this._insert(element, false); + } + push(element) { + return this._insert(element, true); + } + _insert(element, atTheEnd) { + const newNode = new Node(element); + if (this._first === Node.Undefined) { + this._first = newNode; + this._last = newNode; + } else if (atTheEnd) { + const oldLast = this._last; + this._last = newNode; + newNode.prev = oldLast; + oldLast.next = newNode; + } else { + const oldFirst = this._first; + this._first = newNode; + newNode.next = oldFirst; + oldFirst.prev = newNode; + } + this._size += 1; + let didRemove = false; + return () => { + if (!didRemove) { + didRemove = true; + this._remove(newNode); + } + }; + } + shift() { + if (this._first === Node.Undefined) { + return void 0; + } else { + const res = this._first.element; + this._remove(this._first); + return res; + } + } + pop() { + if (this._last === Node.Undefined) { + return void 0; + } else { + const res = this._last.element; + this._remove(this._last); + return res; + } + } + _remove(node) { + if (node.prev !== Node.Undefined && node.next !== Node.Undefined) { + const anchor = node.prev; + anchor.next = node.next; + node.next.prev = anchor; + } else if (node.prev === Node.Undefined && node.next === Node.Undefined) { + this._first = Node.Undefined; + this._last = Node.Undefined; + } else if (node.next === Node.Undefined) { + this._last = this._last.prev; + this._last.next = Node.Undefined; + } else if (node.prev === Node.Undefined) { + this._first = this._first.next; + this._first.prev = Node.Undefined; + } + this._size -= 1; + } + *[Symbol.iterator]() { + let node = this._first; + while (node !== Node.Undefined) { + yield node.element; + node = node.next; + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/stopwatch.js + var hasPerformanceNow = globalThis.performance && typeof globalThis.performance.now === "function"; + var StopWatch = class _StopWatch { + 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(); + } + reset() { + this._startTime = this._now(); + this._stopTime = -1; + } + elapsed() { + if (this._stopTime !== -1) { + return this._stopTime - this._startTime; + } + return this._now() - this._startTime; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/event.js + var _enableDisposeWithListenerWarning = false; + var _enableSnapshotPotentialLeakWarning = false; + var Event; + (function(Event2) { + Event2.None = () => Disposable.None; + function _addLeakageTraceLogic(options) { + if (_enableSnapshotPotentialLeakWarning) { + const { onDidAddListener: origListenerDidAdd } = options; + const stack = Stacktrace.create(); + let count = 0; + options.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 options = { + onWillAddFirstListener() { + listener = event(emitter.fire, emitter); + }, + onDidRemoveLastListener() { + listener === null || listener === void 0 ? void 0 : listener.dispose(); + } + }; + if (!disposable) { + _addLeakageTraceLogic(options); + } + const emitter = new Emitter(options); + 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 options = { + 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(options); + } + const emitter = new Emitter(options); + 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, equals3 = (a, b) => a === b, disposable) { + let firstCall = true; + let cache; + return filter(event, (value) => { + const shouldEmit = firstCall || !equals3(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(); + } + /** @see {@link Event.map} */ + map(fn) { + return new ChainableEvent(map(this.event, fn, this.disposables)); + } + /** @see {@link Event.forEach} */ + forEach(fn) { + return new ChainableEvent(forEach(this.event, fn, this.disposables)); + } + filter(fn) { + return new ChainableEvent(filter(this.event, fn, this.disposables)); + } + /** @see {@link Event.reduce} */ + reduce(merge, initial) { + return new ChainableEvent(reduce(this.event, merge, initial, this.disposables)); + } + /** @see {@link Event.reduce} */ + 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)); + } + /** + * Attach a listener to the event. + */ + on(listener, thisArgs, disposables) { + return this.event(listener, thisArgs, disposables); + } + /** @see {@link Event.once} */ + 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 = (id2) => id2) { + 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 = (id2) => id2) { + 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 options = { + onWillAddFirstListener: () => { + _observable.addObserver(this); + }, + onDidRemoveLastListener: () => { + _observable.removeObserver(this); + } + }; + if (!store) { + _addLeakageTraceLogic(options); + } + this.emitter = new Emitter(options); + 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 = {})); + var EventProfiling = class _EventProfiling { + constructor(name2) { + this.listenerCount = 0; + this.invocationCount = 0; + this.elapsedOverall = 0; + this.durations = []; + this.name = `${name2}_${_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 = /* @__PURE__ */ new Set(); + EventProfiling._idPool = 0; + var _globalLeakWarningThreshold = -1; + var LeakageMonitor = class { + constructor(threshold, name2 = Math.random().toString(18).slice(2, 5)) { + this.threshold = threshold; + this.name = name2; + this._warnCountdown = 0; + } + dispose() { + var _a3; + (_a3 = this._stacks) === null || _a3 === void 0 ? void 0 : _a3.clear(); + } + check(stack, listenerCount) { + const threshold = this.threshold; + if (threshold <= 0 || listenerCount < threshold) { + return void 0; + } + if (!this._stacks) { + this._stacks = /* @__PURE__ */ new Map(); + } + const count = this._stacks.get(stack.value) || 0; + this._stacks.set(stack.value, count + 1); + this._warnCountdown -= 1; + if (this._warnCountdown <= 0) { + this._warnCountdown = threshold * 0.5; + let topStack; + let topCount = 0; + for (const [stack2, count2] of this._stacks) { + if (!topStack || topCount < count2) { + topStack = stack2; + topCount = count2; + } + } + console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`); + console.warn(topStack); + } + return () => { + const count2 = this._stacks.get(stack.value) || 0; + this._stacks.set(stack.value, count2 - 1); + }; + } + }; + var Stacktrace = class _Stacktrace { + static create() { + var _a3; + return new _Stacktrace((_a3 = new Error().stack) !== null && _a3 !== void 0 ? _a3 : ""); + } + constructor(value) { + this.value = value; + } + print() { + console.warn(this.value.split("\n").slice(2).join("\n")); + } + }; + var id = 0; + var UniqueContainer = class { + constructor(value) { + this.value = value; + this.id = id++; + } + }; + var compactionThreshold = 2; + var forEachListener = (listeners, fn) => { + if (listeners instanceof UniqueContainer) { + fn(listeners); + } else { + for (let i = 0; i < listeners.length; i++) { + const l = listeners[i]; + if (l) { + fn(l); + } + } + } + }; + var Emitter = class { + constructor(options) { + var _a3, _b, _c, _d, _e; + this._size = 0; + this._options = options; + this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.leakWarningThreshold) ? new LeakageMonitor((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : void 0; + this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : void 0; + this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue; + } + dispose() { + var _a3, _b, _c, _d; + if (!this._disposed) { + this._disposed = true; + if (((_a3 = this._deliveryQueue) === null || _a3 === void 0 ? void 0 : _a3.current) === this) { + this._deliveryQueue.reset(); + } + if (this._listeners) { + if (_enableDisposeWithListenerWarning) { + const listeners = this._listeners; + queueMicrotask(() => { + forEachListener(listeners, (l) => { + var _a4; + return (_a4 = l.stack) === null || _a4 === void 0 ? void 0 : _a4.print(); + }); + }); + } + this._listeners = void 0; + this._size = 0; + } + (_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b); + (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose(); + } + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + var _a3; + (_a3 = this._event) !== null && _a3 !== void 0 ? _a3 : this._event = (callback, thisArgs, disposables) => { + var _a4, _b, _c, _d, _e; + 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 * 0.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) { + (_b = (_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.onWillAddFirstListener) === null || _b === void 0 ? void 0 : _b.call(_a4, this); + this._listeners = contained; + (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); + } else if (this._listeners instanceof UniqueContainer) { + (_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : 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 _a3, _b, _c, _d; + (_b = (_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onWillRemoveListener) === null || _b === void 0 ? void 0 : _b.call(_a3, this); + if (!this._listeners) { + return; + } + if (this._size === 1) { + this._listeners = void 0; + (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, 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; i < listeners.length; i++) { + if (listeners[i]) { + listeners[n++] = listeners[i]; + } else if (adjustDeliveryQueue) { + this._deliveryQueue.end--; + if (n < this._deliveryQueue.i) { + this._deliveryQueue.i--; + } + } + } + listeners.length = n; + } + } + _deliver(listener, value) { + var _a3; + if (!listener) { + return; + } + const errorHandler2 = ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onListenerError) || onUnexpectedError; + if (!errorHandler2) { + listener.value(value); + return; + } + try { + listener.value(value); + } catch (e) { + errorHandler2(e); + } + } + /** Delivers items in the queue. Assumes the queue is ready to go. */ + _deliverQueue(dq) { + const listeners = dq.current._listeners; + while (dq.i < dq.end) { + this._deliver(listeners[dq.i++], dq.value); + } + dq.reset(); + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + var _a3, _b, _c, _d; + if ((_a3 = this._deliveryQueue) === null || _a3 === void 0 ? void 0 : _a3.current) { + this._deliverQueue(this._deliveryQueue); + (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop(); + } + (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size); + if (!this._listeners) { + } else if (this._listeners instanceof UniqueContainer) { + this._deliver(this._listeners, event); + } else { + const dq = this._deliveryQueue; + dq.enqueue(this, event, this._listeners.length); + this._deliverQueue(dq); + } + (_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop(); + } + hasListeners() { + return this._size > 0; + } + }; + var 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; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/types.js + function isString(str) { + return typeof str === "string"; + } + + // node_modules/monaco-editor/esm/vs/base/common/objects.js + function getAllPropertyNames(obj) { + let res = []; + while (Object.prototype !== obj) { + res = res.concat(Object.getOwnPropertyNames(obj)); + obj = Object.getPrototypeOf(obj); + } + return res; + } + function getAllMethodNames(obj) { + const methods = []; + for (const prop of getAllPropertyNames(obj)) { + if (typeof obj[prop] === "function") { + methods.push(prop); + } + } + return methods; + } + function createProxyObject(methodNames, invoke) { + const createProxyMethod = (method) => { + return function() { + 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; + } + + // node_modules/monaco-editor/esm/vs/nls.js + var isPseudo = typeof document !== "undefined" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; + function _format(message, args) { + let result; + if (args.length === 0) { + result = message; + } else { + result = message.replace(/\{(\d+)\}/g, (match, rest) => { + const index = rest[0]; + const arg = args[index]; + let result2 = match; + 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 = "\uFF3B" + result.replace(/[aouei]/g, "$&$&") + "\uFF3D"; + } + return result; + } + function localize(data, message, ...args) { + return _format(message, args); + } + function getConfiguredDefaultLocale(_) { + return void 0; + } + + // node_modules/monaco-editor/esm/vs/base/common/platform.js + var _a; + var LANGUAGE_DEFAULT = "en"; + var _isWindows = false; + var _isMacintosh = false; + var _isLinux = false; + var _isLinuxSnap = false; + var _isNative = false; + var _isWeb = false; + var _isElectron = false; + var _isIOS = false; + var _isCI = false; + var _isMobile = false; + var _locale = void 0; + var _language = LANGUAGE_DEFAULT; + var _platformLocale = LANGUAGE_DEFAULT; + var _translationsConfigFile = void 0; + var _userAgent = void 0; + var globals = typeof self === "object" ? self : typeof global === "object" ? global : {}; + var nodeProcess = void 0; + if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") { + nodeProcess = globals.vscode.process; + } else if (typeof process !== "undefined") { + nodeProcess = process; + } + var isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === "string"; + var 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( + // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` + // to ensure that the NLS AMD Loader plugin has been loaded and configured. + // This is because the loader plugin decides what the default locale is based on + // how it's able to resolve the strings. + 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."); + } + var _platform = 0; + if (_isMacintosh) { + _platform = 1; + } else if (_isWindows) { + _platform = 3; + } else if (_isLinux) { + _platform = 2; + } + var isWindows = _isWindows; + var isMacintosh = _isMacintosh; + var isWebWorker = _isWeb && typeof globals.importScripts === "function"; + var userAgent = _userAgent; + var language = _language; + var Language; + (function(Language2) { + function value() { + return language; + } + Language2.value = value; + function isDefaultVariant() { + if (language.length === 2) { + return language === "en"; + } else if (language.length >= 3) { + return language[0] === "e" && language[1] === "n" && language[2] === "-"; + } else { + return false; + } + } + Language2.isDefaultVariant = isDefaultVariant; + function isDefault() { + return language === "en"; + } + Language2.isDefault = isDefault; + })(Language || (Language = {})); + var setTimeout0IsFaster = typeof globals.postMessage === "function" && !globals.importScripts; + var setTimeout0 = (() => { + if (setTimeout0IsFaster) { + const pending = []; + globals.addEventListener("message", (e) => { + if (e.data && e.data.vscodeScheduleAsyncWork) { + for (let i = 0, len = pending.length; i < len; i++) { + const candidate = pending[i]; + if (candidate.id === e.data.vscodeScheduleAsyncWork) { + pending.splice(i, 1); + candidate.callback(); + return; + } + } + } + }); + let lastId = 0; + return (callback) => { + const myId = ++lastId; + pending.push({ + id: myId, + callback + }); + globals.postMessage({ vscodeScheduleAsyncWork: myId }, "*"); + }; + } + return (callback) => setTimeout(callback); + })(); + var isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0); + var isFirefox = !!(userAgent && userAgent.indexOf("Firefox") >= 0); + var isSafari = !!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0)); + var isEdge = !!(userAgent && userAgent.indexOf("Edg/") >= 0); + var isAndroid = !!(userAgent && userAgent.indexOf("Android") >= 0); + + // node_modules/monaco-editor/esm/vs/base/common/cancellation.js + var shortcutEvent = Object.freeze(function(callback, context) { + const handle = setTimeout(callback.bind(context), 0); + return { dispose() { + clearTimeout(handle); + } }; + }); + var CancellationToken; + (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 = {})); + var 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; + } + } + }; + var 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 _a3; + if (cancel) { + this.cancel(); + } + (_a3 = this._parentListener) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + if (!this._token) { + this._token = CancellationToken.None; + } else if (this._token instanceof MutableToken) { + this._token.dispose(); + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/cache.js + var 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; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/lazy.js + var Lazy = class { + constructor(executor) { + this.executor = executor; + this._didRun = false; + } + /** + * True if the lazy value has been resolved. + */ + get hasValue() { + return this._didRun; + } + /** + * Get the wrapped value. + * + * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only + * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value + */ + 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 the wrapped value without forcing evaluation. + */ + get rawValue() { + return this._value; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/strings.js + var _a2; + function escapeRegExpCharacters(value) { + return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); + } + function splitLines(str) { + return str.split(/\r\n|\r|\n/); + } + function firstNonWhitespaceIndex(str) { + for (let i = 0, len = str.length; i < len; i++) { + const chCode = str.charCodeAt(i); + if (chCode !== 32 && chCode !== 9) { + return i; + } + } + return -1; + } + function lastNonWhitespaceIndex(str, startIndex = str.length - 1) { + for (let i = startIndex; i >= 0; i--) { + const chCode = str.charCodeAt(i); + if (chCode !== 32 && chCode !== 9) { + return i; + } + } + return -1; + } + function isUpperAsciiLetter(code) { + return code >= 65 && code <= 90; + } + function isHighSurrogate(charCode) { + return 55296 <= charCode && charCode <= 56319; + } + function isLowSurrogate(charCode) { + return 56320 <= charCode && charCode <= 57343; + } + function computeCodePoint(highSurrogate, lowSurrogate) { + return (highSurrogate - 55296 << 10) + (lowSurrogate - 56320) + 65536; + } + function getNextCodePoint(str, len, offset) { + const charCode = str.charCodeAt(offset); + if (isHighSurrogate(charCode) && offset + 1 < len) { + const nextCharCode = str.charCodeAt(offset + 1); + if (isLowSurrogate(nextCharCode)) { + return computeCodePoint(charCode, nextCharCode); + } + } + return charCode; + } + var IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; + function isBasicASCII(str) { + return IS_BASIC_ASCII.test(str); + } + var UTF8_BOM_CHARACTER = String.fromCharCode( + 65279 + /* CharCode.UTF8_BOM */ + ); + var GraphemeBreakTree = class _GraphemeBreakTree { + 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 (codePoint < data[3 * nodeIndex]) { + nodeIndex = 2 * nodeIndex; + } else if (codePoint > data[3 * nodeIndex + 1]) { + nodeIndex = 2 * nodeIndex + 1; + } else { + return data[3 * nodeIndex + 2]; + } + } + return 0; + } + }; + GraphemeBreakTree._INSTANCE = null; + function getGraphemeBreakRawData() { + return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]"); + } + var 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); + } + /** + * Returns the non basic ASCII code point that the given code point can be confused, + * or undefined if such code point does note exist. + */ + getPrimaryConfusable(codePoint) { + return this.confusableDictionary.get(codePoint); + } + getConfusableCodePoints() { + return new Set(this.confusableDictionary.keys()); + } + }; + _a2 = AmbiguousCharacters; + AmbiguousCharacters.ambiguousCharacterData = new Lazy(() => { + return 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 = /* @__PURE__ */ new Map(); + for (let i = 0; i < arr.length; i += 2) { + result.set(arr[i], arr[i + 1]); + } + return result; + } + function mergeMaps(map1, map2) { + const result = new Map(map1); + for (const [key, value] of map2) { + result.set(key, value); + } + return result; + } + function intersectMaps(map1, map2) { + if (!map1) { + return map2; + } + const result = /* @__PURE__ */ new Map(); + for (const [key, value] of map1) { + if (map2.has(key)) { + result.set(key, value); + } + } + return result; + } + const data = _a2.ambiguousCharacterData.value; + let filteredLocales = locales.filter((l) => !l.startsWith("_") && l in data); + if (filteredLocales.length === 0) { + filteredLocales = ["_default"]; + } + let languageSpecificMap = void 0; + for (const locale of filteredLocales) { + const map2 = arrayToMap(data[locale]); + 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("_"))); + var InvisibleCharacters = class _InvisibleCharacters { + 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; + + // node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js + var INITIALIZE = "$initialize"; + var RequestMessage = class { + constructor(vsWorker, req, method, args) { + this.vsWorker = vsWorker; + this.req = req; + this.method = method; + this.args = args; + this.type = 0; + } + }; + var ReplyMessage = class { + constructor(vsWorker, seq, res, err) { + this.vsWorker = vsWorker; + this.seq = seq; + this.res = res; + this.err = err; + this.type = 1; + } + }; + var SubscribeEventMessage = class { + constructor(vsWorker, req, eventName, arg) { + this.vsWorker = vsWorker; + this.req = req; + this.eventName = eventName; + this.arg = arg; + this.type = 2; + } + }; + var EventMessage = class { + constructor(vsWorker, req, event) { + this.vsWorker = vsWorker; + this.req = req; + this.event = event; + this.type = 3; + } + }; + var UnsubscribeEventMessage = class { + constructor(vsWorker, req) { + this.vsWorker = vsWorker; + this.req = req; + this.type = 4; + } + }; + var SimpleWorkerProtocol = class { + constructor(handler) { + this._workerId = -1; + this._handler = handler; + this._lastSentReq = 0; + this._pendingReplies = /* @__PURE__ */ Object.create(null); + this._pendingEmitters = /* @__PURE__ */ new Map(); + this._pendingEvents = /* @__PURE__ */ 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 + }; + 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 < msg.args.length; i++) { + if (msg.args[i] instanceof ArrayBuffer) { + transfer.push(msg.args[i]); + } + } + } else if (msg.type === 1) { + if (msg.res instanceof ArrayBuffer) { + transfer.push(msg.res); + } + } + this._handler.sendMessage(msg, transfer); + } + }; + function propertyIsEvent(name2) { + return name2[0] === "o" && name2[1] === "n" && isUpperAsciiLetter(name2.charCodeAt(2)); + } + function propertyIsDynamicEvent(name2) { + return /^onDynamic/.test(name2) && isUpperAsciiLetter(name2.charCodeAt(9)); + } + function createProxyObject2(methodNames, invoke, proxyListen) { + const createProxyMethod = (method) => { + return function() { + const args = Array.prototype.slice.call(arguments, 0); + return invoke(method, args); + }; + }; + const createProxyDynamicEvent = (eventName) => { + return 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 SimpleWorkerServer = class { + constructor(postMessage, requestHandlerFactory) { + this._requestHandlerFactory = requestHandlerFactory; + this._requestHandler = null; + this._protocol = new SimpleWorkerProtocol({ + sendMessage: (msg, transfer) => { + postMessage(msg, transfer); + }, + handleMessage: (method, args) => this._handleMessage(method, args), + handleEvent: (eventName, arg) => this._handleEvent(eventName, arg) + }); + } + onmessage(msg) { + this._protocol.handleMessage(msg); + } + _handleMessage(method, args) { + if (method === INITIALIZE) { + return this.initialize(args[0], args[1], args[2], args[3]); + } + if (!this._requestHandler || typeof this._requestHandler[method] !== "function") { + return Promise.reject(new Error("Missing requestHandler or method: " + method)); + } + try { + return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args)); + } catch (e) { + return Promise.reject(e); + } + } + _handleEvent(eventName, arg) { + if (!this._requestHandler) { + throw new Error(`Missing requestHandler`); + } + if (propertyIsDynamicEvent(eventName)) { + const event = this._requestHandler[eventName].call(this._requestHandler, arg); + if (typeof event !== "function") { + throw new Error(`Missing dynamic event ${eventName} on request handler.`); + } + return event; + } + if (propertyIsEvent(eventName)) { + const event = this._requestHandler[eventName]; + if (typeof event !== "function") { + throw new Error(`Missing event ${eventName} on request handler.`); + } + return event; + } + throw new Error(`Malformed event name ${eventName}`); + } + initialize(workerId, loaderConfig, moduleId, hostMethods) { + this._protocol.setWorkerId(workerId); + const proxyMethodRequest = (method, args) => { + return this._protocol.sendMessage(method, args); + }; + const proxyListen = (eventName, arg) => { + return this._protocol.listen(eventName, arg); + }; + const hostProxy = createProxyObject2(hostMethods, proxyMethodRequest, proxyListen); + if (this._requestHandlerFactory) { + this._requestHandler = this._requestHandlerFactory(hostProxy); + return Promise.resolve(getAllMethodNames(this._requestHandler)); + } + if (loaderConfig) { + if (typeof loaderConfig.baseUrl !== "undefined") { + delete loaderConfig["baseUrl"]; + } + if (typeof loaderConfig.paths !== "undefined") { + if (typeof loaderConfig.paths.vs !== "undefined") { + delete loaderConfig.paths["vs"]; + } + } + if (typeof loaderConfig.trustedTypesPolicy !== void 0) { + delete loaderConfig["trustedTypesPolicy"]; + } + loaderConfig.catchError = true; + globalThis.require.config(loaderConfig); + } + return new Promise((resolve2, reject) => { + const req = globalThis.require; + req([moduleId], (module) => { + this._requestHandler = module.create(hostProxy); + if (!this._requestHandler) { + reject(new Error(`No RequestHandler!`)); + return; + } + resolve2(getAllMethodNames(this._requestHandler)); + }, reject); + }); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js + var DiffChange = class { + /** + * Constructs a new DiffChange with the given sequence information + * and content. + */ + constructor(originalStart, originalLength, modifiedStart, modifiedLength) { + this.originalStart = originalStart; + this.originalLength = originalLength; + this.modifiedStart = modifiedStart; + this.modifiedLength = modifiedLength; + } + /** + * The end point (exclusive) of the change in the original sequence. + */ + getOriginalEnd() { + return this.originalStart + this.originalLength; + } + /** + * The end point (exclusive) of the change in the modified sequence. + */ + getModifiedEnd() { + return this.modifiedStart + this.modifiedLength; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/hash.js + function numberHash(val, initialHashVal) { + return (initialHashVal << 5) - initialHashVal + val | 0; + } + function stringHash(s, hashVal) { + hashVal = numberHash(149417, hashVal); + for (let i = 0, length = s.length; i < length; i++) { + hashVal = numberHash(s.charCodeAt(i), hashVal); + } + return hashVal; + } + function leftRotate(value, bits, totalBits = 32) { + const delta = totalBits - bits; + const mask = ~((1 << delta) - 1); + return (value << bits | (mask & value) >>> delta) >>> 0; + } + function fill(dest, index = 0, count = dest.byteLength, value = 0) { + for (let i = 0; i < count; i++) { + dest[index + i] = value; + } + } + function leftPad(value, length, char = "0") { + while (value.length < length) { + value = char + value; + } + return value; + } + function toHexString(bufferOrValue, bitsize = 32) { + if (bufferOrValue instanceof ArrayBuffer) { + return Array.from(new Uint8Array(bufferOrValue)).map((b) => b.toString(16).padStart(2, "0")).join(""); + } + return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4); + } + var StringSHA1 = class _StringSHA1 { + constructor() { + this._h0 = 1732584193; + this._h1 = 4023233417; + this._h2 = 2562383102; + this._h3 = 271733878; + this._h4 = 3285377520; + this._buff = new Uint8Array( + 64 + 3 + /* to fit any utf-8 */ + ); + 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 < strLen) { + const nextCharCode = str.charCodeAt(offset + 1); + if (isLowSurrogate(nextCharCode)) { + offset++; + codePoint = computeCodePoint(charCode, nextCharCode); + } else { + codePoint = 65533; + } + } else { + leftoverHighSurrogate = charCode; + break; + } + } else if (isLowSurrogate(charCode)) { + codePoint = 65533; + } + buffLen = this._push(buff, buffLen, codePoint); + offset++; + if (offset < strLen) { + charCode = str.charCodeAt(offset); + } else { + break; + } + } + this._buffLen = buffLen; + this._leftoverHighSurrogate = leftoverHighSurrogate; + } + _push(buff, buffLen, codePoint) { + if (codePoint < 128) { + buff[buffLen++] = codePoint; + } else if (codePoint < 2048) { + buff[buffLen++] = 192 | (codePoint & 1984) >>> 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 + /* SHA1Constant.UNICODE_REPLACEMENT */ + ); + } + 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)); + + // node_modules/monaco-editor/esm/vs/base/common/diff/diff.js + var 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; i < len; i++) { + characters[i] = source.charCodeAt(i); + } + return characters; + } + }; + function stringDiff(original, modified, pretty) { + return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes; + } + var Debug = class { + static Assert(condition, message) { + if (!condition) { + throw new Error(message); + } + } + }; + var MyArray = class { + /** + * Copies a range of elements from an Array starting at the specified source index and pastes + * them to another Array starting at the specified destination index. The length and the indexes + * are specified as 64-bit integers. + * sourceArray: + * The Array that contains the data to copy. + * sourceIndex: + * A 64-bit integer that represents the index in the sourceArray at which copying begins. + * destinationArray: + * The Array that receives the data. + * destinationIndex: + * A 64-bit integer that represents the index in the destinationArray at which storing begins. + * length: + * A 64-bit integer that represents the number of elements to copy. + */ + static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { + for (let i = 0; i < length; i++) { + destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; + } + } + static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { + for (let i = 0; i < length; i++) { + destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; + } + } + }; + var DiffChangeHelper = class { + /** + * Constructs a new DiffChangeHelper for the given DiffSequences. + */ + constructor() { + this.m_changes = []; + this.m_originalStart = 1073741824; + this.m_modifiedStart = 1073741824; + this.m_originalCount = 0; + this.m_modifiedCount = 0; + } + /** + * Marks the beginning of the next change in the set of differences. + */ + MarkNextChange() { + if (this.m_originalCount > 0 || 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; + } + /** + * Adds the original element at the given position to the elements + * affected by the current change. The modified index gives context + * to the change position with respect to the original sequence. + * @param originalIndex The index of the original element to add. + * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence. + */ + AddOriginalElement(originalIndex, modifiedIndex) { + this.m_originalStart = Math.min(this.m_originalStart, originalIndex); + this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); + this.m_originalCount++; + } + /** + * Adds the modified element at the given position to the elements + * affected by the current change. The original index gives context + * to the change position with respect to the modified sequence. + * @param originalIndex The index of the original element that provides corresponding position in the original sequence. + * @param modifiedIndex The index of the modified element to add. + */ + AddModifiedElement(originalIndex, modifiedIndex) { + this.m_originalStart = Math.min(this.m_originalStart, originalIndex); + this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); + this.m_modifiedCount++; + } + /** + * Retrieves all of the changes marked by the class. + */ + getChanges() { + if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { + this.MarkNextChange(); + } + return this.m_changes; + } + /** + * Retrieves all of the changes marked by the class in the reverse order + */ + getReverseChanges() { + if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { + this.MarkNextChange(); + } + this.m_changes.reverse(); + return this.m_changes; + } + }; + var LcsDiff = class _LcsDiff { + /** + * Constructs the DiffFinder + */ + 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 < len; i++) { + hashes[i] = stringHash(elements[i], 0); + } + return [elements, hashes, true]; + } + if (elements instanceof Int32Array) { + return [[], elements, false]; + } + return [[], new Int32Array(elements), false]; + } + ElementsAreEqual(originalIndex, newIndex) { + if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) { + return false; + } + return this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true; + } + ElementsAreStrictEqual(originalIndex, newIndex) { + if (!this.ElementsAreEqual(originalIndex, newIndex)) { + return false; + } + const originalElement = _LcsDiff._getStrictElement(this._originalSequence, originalIndex); + const modifiedElement = _LcsDiff._getStrictElement(this._modifiedSequence, newIndex); + return originalElement === modifiedElement; + } + static _getStrictElement(sequence, index) { + if (typeof sequence.getStrictElement === "function") { + return sequence.getStrictElement(index); + } + return null; + } + OriginalElementsAreEqual(index1, index2) { + if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) { + return false; + } + return this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true; + } + ModifiedElementsAreEqual(index1, index2) { + if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) { + return false; + } + return this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true; + } + ComputeDiff(pretty) { + return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty); + } + /** + * Computes the differences between the original and modified input + * sequences on the bounded range. + * @returns An array of the differences between the two input sequences. + */ + _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) { + const quitEarlyArr = [false]; + let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr); + if (pretty) { + changes = this.PrettifyChanges(changes); + } + return { + quitEarly: quitEarlyArr[0], + changes + }; + } + /** + * Private helper method which computes the differences on the bounded range + * recursively. + * @returns An array of the differences between the two input sequences. + */ + ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) { + quitEarlyArr[0] = false; + while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) { + originalStart++; + modifiedStart++; + } + while (originalEnd >= 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 < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { + originalIndex = forwardPoints[diagonal + 1]; + modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; + if (originalIndex < lastOriginalIndex) { + changeHelper.MarkNextChange(); + } + lastOriginalIndex = originalIndex; + changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex); + diagonalRelative = diagonal + 1 - diagonalForwardBase; + } else { + originalIndex = forwardPoints[diagonal - 1] + 1; + modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; + if (originalIndex < lastOriginalIndex) { + changeHelper.MarkNextChange(); + } + lastOriginalIndex = originalIndex - 1; + changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1); + diagonalRelative = diagonal - 1 - diagonalForwardBase; + } + if (historyIndex >= 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 < diagonalMax && reversePoints[diagonal - 1] >= 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); + } + /** + * Given the range to compute the diff on, this method finds the point: + * (midOriginal, midModified) + * that exists in the middle of the LCS of the two sequences and + * is the point at which the LCS problem may be broken down recursively. + * This method will try to keep the LCS trace in memory. If the LCS recursion + * point is calculated and the full trace is available in memory, then this method + * will return the change list. + * @param originalStart The start bound of the original sequence range + * @param originalEnd The end bound of the original sequence range + * @param modifiedStart The start bound of the modified sequence range + * @param modifiedEnd The end bound of the modified sequence range + * @param midOriginal The middle point of the original sequence range + * @param midModified The middle point of the modified sequence range + * @returns The diff changes, if available, otherwise null + */ + 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 || diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { + originalIndex = forwardPoints[diagonal + 1]; + } else { + originalIndex = forwardPoints[diagonal - 1] + 1; + } + modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset; + const tempOriginalIndex = originalIndex; + while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) { + originalIndex++; + modifiedIndex++; + } + forwardPoints[diagonal] = originalIndex; + if (originalIndex + modifiedIndex > furthestOriginalIndex + 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 < diagonalReverseEnd && reversePoints[diagonal - 1] >= 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); + } + /** + * Shifts the given changes to provide a more intuitive diff. + * While the first element in a diff matches the first element after the diff, + * we shift the diff down. + * + * @param changes The list of changes to shift + * @returns The shifted changes + */ + PrettifyChanges(changes) { + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; + const originalStop = i < changes.length - 1 ? changes[i + 1].originalStart : this._originalElementsOrHash.length; + const modifiedStop = i < changes.length - 1 ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length; + const checkOriginal = change.originalLength > 0; + const checkModified = change.modifiedLength > 0; + while (change.originalStart + change.originalLength < originalStop && change.modifiedStart + change.modifiedLength < modifiedStop && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) { + const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart); + const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength); + if (endStrictEqual && !startStrictEqual) { + break; + } + change.originalStart++; + change.modifiedStart++; + } + const mergedChangeArr = [null]; + if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) { + changes[i] = mergedChangeArr[0]; + changes.splice(i + 1, 1); + i--; + continue; + } + } + for (let i = changes.length - 1; i >= 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 (originalStart < originalStop || modifiedStart < modifiedStop) { + break; + } + if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) { + break; + } + if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) { + break; + } + const touchingPreviousChange = originalStart === originalStop && modifiedStart === modifiedStop; + const score2 = (touchingPreviousChange ? 5 : 0) + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength); + if (score2 > bestScore) { + bestScore = score2; + 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; i < len; i++) { + const aChange = changes[i - 1]; + const bChange = changes[i]; + const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength; + const aOriginalStart = aChange.originalStart; + const bOriginalEnd = bChange.originalStart + bChange.originalLength; + const abOriginalLength = bOriginalEnd - aOriginalStart; + const aModifiedStart = aChange.modifiedStart; + const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength; + const abModifiedLength = bModifiedEnd - aModifiedStart; + if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) { + const t2 = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength); + if (t2) { + const [originalMatchStart, modifiedMatchStart] = t2; + if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) { + aChange.originalLength = originalMatchStart - aChange.originalStart; + aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart; + bChange.originalStart = originalMatchStart + matchedLength; + bChange.modifiedStart = modifiedMatchStart + matchedLength; + bChange.originalLength = bOriginalEnd - bChange.originalStart; + bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart; + } + } + } + } + } + return changes; + } + _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) { + if (originalLength < desiredLength || modifiedLength < desiredLength) { + return null; + } + const originalMax = originalStart + originalLength - desiredLength + 1; + const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1; + let bestScore = 0; + let bestOriginalStart = 0; + let bestModifiedStart = 0; + for (let i = originalStart; i < originalMax; i++) { + for (let j = modifiedStart; j < modifiedMax; j++) { + const score2 = this._contiguousSequenceScore(i, j, desiredLength); + if (score2 > 0 && score2 > bestScore) { + bestScore = score2; + bestOriginalStart = i; + bestModifiedStart = j; + } + } + } + if (bestScore > 0) { + return [bestOriginalStart, bestModifiedStart]; + } + return null; + } + _contiguousSequenceScore(originalStart, modifiedStart, length) { + let score2 = 0; + for (let l = 0; l < length; l++) { + if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) { + return 0; + } + score2 += this._originalStringElements[originalStart + l].length; + } + return score2; + } + _OriginalIsBoundary(index) { + if (index <= 0 || index >= 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; + } + /** + * Concatenates the two input DiffChange lists and returns the resulting + * list. + * @param The left changes + * @param The right changes + * @returns The concatenated list + */ + 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; + } + } + /** + * Returns true if the two changes overlap and can be merged into a single + * change + * @param left The left change + * @param right The right change + * @param mergedChange The merged change if the two overlap, null otherwise + * @returns True if the two changes overlap + */ + 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; + } + } + /** + * Helper method used to clip a diagonal index to the range of valid + * diagonals. This also decides whether or not the diagonal index, + * if it exceeds the boundary, should be clipped to the boundary or clipped + * one inside the boundary depending on the Even/Odd status of the boundary + * and numDifferences. + * @param diagonal The index of the diagonal to clip. + * @param numDifferences The current number of differences being iterated upon. + * @param diagonalBaseIndex The base reference diagonal. + * @param numDiagonals The total number of diagonals. + * @returns The clipped diagonal index. + */ + ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) { + if (diagonal >= 0 && diagonal < numDiagonals) { + return diagonal; + } + const diagonalsBelow = diagonalBaseIndex; + const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1; + const diffEven = numDifferences % 2 === 0; + if (diagonal < 0) { + const lowerBoundEven = diagonalsBelow % 2 === 0; + return diffEven === lowerBoundEven ? 0 : 1; + } else { + const upperBoundEven = diagonalsAbove % 2 === 0; + return diffEven === upperBoundEven ? numDiagonals - 1 : numDiagonals - 2; + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/process.js + var safeProcess; + 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 = { + // Supported + get platform() { + return isWindows ? "win32" : isMacintosh ? "darwin" : "linux"; + }, + get arch() { + return void 0; + }, + // Unsupported + get env() { + return {}; + }, + cwd() { + return "/"; + } + }; + } + var cwd = safeProcess.cwd; + var env = safeProcess.env; + var platform = safeProcess.platform; + var arch = safeProcess.arch; + + // node_modules/monaco-editor/esm/vs/base/common/path.js + var CHAR_UPPERCASE_A = 65; + var CHAR_LOWERCASE_A = 97; + var CHAR_UPPERCASE_Z = 90; + var CHAR_LOWERCASE_Z = 122; + var CHAR_DOT = 46; + var CHAR_FORWARD_SLASH = 47; + var CHAR_BACKWARD_SLASH = 92; + var CHAR_COLON = 58; + var CHAR_QUESTION_MARK = 63; + var ErrorInvalidArgType = class extends Error { + constructor(name2, 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 type2 = name2.indexOf(".") !== -1 ? "property" : "argument"; + let msg = `The "${name2}" ${type2} ${determiner} of type ${expected}`; + msg += `. Received type ${typeof actual}`; + super(msg); + this.code = "ERR_INVALID_ARG_TYPE"; + } + }; + function validateObject(pathObject, name2) { + if (pathObject === null || typeof pathObject !== "object") { + throw new ErrorInvalidArgType(name2, "Object", pathObject); + } + } + function validateString(value, name2) { + if (typeof value !== "string") { + throw new ErrorInvalidArgType(name2, "string", value); + } + } + var platformIsWin32 = platform === "win32"; + 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, isPathSeparator2) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code = 0; + for (let i = 0; i <= path.length; ++i) { + if (i < path.length) { + code = path.charCodeAt(i); + } else if (isPathSeparator2(code)) { + break; + } else { + code = CHAR_FORWARD_SLASH; + } + if (isPathSeparator2(code)) { + if (lastSlash === i - 1 || dots === 1) { + } else if (dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + 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 win32 = { + // path.resolve([from ...], to) + 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 isAbsolute2 = false; + const code = path.charCodeAt(0); + if (len === 1) { + if (isPathSeparator(code)) { + rootEnd = 1; + isAbsolute2 = true; + } + } else if (isPathSeparator(code)) { + isAbsolute2 = true; + if (isPathSeparator(path.charCodeAt(1))) { + let j = 2; + let last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len || j !== last) { + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + isAbsolute2 = 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 = isAbsolute2; + if (isAbsolute2 && 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 isAbsolute2 = false; + const code = path.charCodeAt(0); + if (len === 1) { + return isPosixPathSeparator(code) ? "\\" : path; + } + if (isPathSeparator(code)) { + isAbsolute2 = true; + if (isPathSeparator(path.charCodeAt(1))) { + let j = 2; + let last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + return `\\\\${firstPart}\\${path.slice(last)}\\`; + } + if (j !== last) { + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + isAbsolute2 = true; + rootEnd = 3; + } + } + let tail = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute2, "\\", isPathSeparator) : ""; + if (tail.length === 0 && !isAbsolute2) { + tail = "."; + } + if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { + tail += "\\"; + } + if (device === void 0) { + return isAbsolute2 ? `\\${tail}` : tail; + } + return isAbsolute2 ? `${device}\\${tail}` : `${device}${tail}`; + }, + isAbsolute(path) { + validateString(path, "path"); + const len = path.length; + if (len === 0) { + return false; + } + const code = path.charCodeAt(0); + return isPathSeparator(code) || // Possible device root + 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; i < paths.length; ++i) { + const arg = paths[i]; + validateString(arg, "path"); + if (arg.length > 0) { + 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 < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) { + slashCount++; + } + if (slashCount >= 2) { + joined = `\\${joined.slice(slashCount)}`; + } + } + return win32.normalize(joined); + }, + // It will solve the relative path from `from` to `to`, for instance: + // from = 'C:\\orandea\\test\\aaa' + // to = 'C:\\orandea\\impl\\bbb' + // The output of the function should be: '..\\..\\impl\\bbb' + 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 (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { + fromStart++; + } + let fromEnd = from.length; + while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { + fromEnd--; + } + const fromLen = fromEnd - fromStart; + let toStart = 0; + while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { + toStart++; + } + let toEnd = to.length; + while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { + toEnd--; + } + const toLen = toEnd - toStart; + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for (; i < length; i++) { + const fromCode = from.charCodeAt(fromStart + i); + if (fromCode !== to.charCodeAt(toStart + i)) { + break; + } else if (fromCode === CHAR_BACKWARD_SLASH) { + lastCommonSep = i; + } + } + if (i !== length) { + if (lastCommonSep === -1) { + return toOrig; + } + } else { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { + return toOrig.slice(toStart + i + 1); + } + if (i === 2) { + return toOrig.slice(toStart + i); + } + } + if (fromLen > length) { + 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 (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + return path; + } + if (j !== last) { + rootEnd = offset = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + rootEnd = len > 2 && 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + rootEnd = j; + } else if (j !== last) { + rootEnd = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + if (len <= 2) { + ret.root = ret.dir = path; + return ret; + } + rootEnd = 2; + if (isPathSeparator(path.charCodeAt(2))) { + if (len === 3) { + ret.root = ret.dir = path; + return ret; + } + rootEnd = 3; + } + } + if (rootEnd > 0) { + 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 + }; + var posixCwd = (() => { + if (platformIsWin32) { + const regexp = /\\/g; + return () => { + const cwd2 = cwd().replace(regexp, "/"); + return cwd2.slice(cwd2.indexOf("/")); + }; + } + return () => cwd(); + })(); + var posix = { + // path.resolve([from ...], to) + 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 isAbsolute2 = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; + path = normalizeString(path, !isAbsolute2, "/", isPosixPathSeparator); + if (path.length === 0) { + if (isAbsolute2) { + return "/"; + } + return trailingSeparator ? "./" : "."; + } + if (trailingSeparator) { + path += "/"; + } + return isAbsolute2 ? `/${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; i < paths.length; ++i) { + const arg = paths[i]; + validateString(arg, "path"); + if (arg.length > 0) { + 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 length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for (; i < length; i++) { + const fromCode = from.charCodeAt(fromStart + i); + if (fromCode !== to.charCodeAt(toStart + i)) { + break; + } else if (fromCode === CHAR_FORWARD_SLASH) { + lastCommonSep = i; + } + } + if (i === length) { + if (toLen > length) { + 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 > length) { + 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 isAbsolute2 = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + let start; + if (isAbsolute2) { + 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 && isAbsolute2 ? 1 : startPart; + if (startDot === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 (isAbsolute2) { + ret.dir = "/"; + } + return ret; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + posix.win32 = win32.win32 = win32; + posix.posix = win32.posix = posix; + var normalize = platformIsWin32 ? win32.normalize : posix.normalize; + var isAbsolute = platformIsWin32 ? win32.isAbsolute : posix.isAbsolute; + var join = platformIsWin32 ? win32.join : posix.join; + var resolve = platformIsWin32 ? win32.resolve : posix.resolve; + var relative = platformIsWin32 ? win32.relative : posix.relative; + var dirname = platformIsWin32 ? win32.dirname : posix.dirname; + var basename = platformIsWin32 ? win32.basename : posix.basename; + var extname = platformIsWin32 ? win32.extname : posix.extname; + var format = platformIsWin32 ? win32.format : posix.format; + var parse = platformIsWin32 ? win32.parse : posix.parse; + var toNamespacedPath = platformIsWin32 ? win32.toNamespacedPath : posix.toNamespacedPath; + var sep = platformIsWin32 ? win32.sep : posix.sep; + var delimiter = platformIsWin32 ? win32.delimiter : posix.delimiter; + + // node_modules/monaco-editor/esm/vs/base/common/uri.js + var _schemePattern = /^\w[\w\d+.-]*$/; + var _singleSlashStart = /^\//; + var _doubleSlashStart = /^\/\//; + 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; + } + var _empty = ""; + var _slash = "/"; + var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; + var URI = class _URI { + 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"; + } + /** + * @internal + */ + 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); + } + } + // ---- filesystem path ----------------------- + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath() { + return uriToFsPath(this, false); + } + // ---- modify to new ------------------------- + with(change) { + if (!change) { + return this; + } + let { scheme, authority, path, query, 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); + } + // ---- parse & validate ------------------------ + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value, _strict = false) { + const match = _regexp.exec(value); + if (!match) { + return new Uri(_empty, _empty, _empty, _empty, _empty); + } + return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + } + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + 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); + } + /** + * Creates new URI from uri components. + * + * Unless `strict` is `true` the scheme is defaults to be `file`. This function performs + * validation and should be used for untrusted uri components retrieved from storage, + * user input, command arguments etc + */ + static from(components, strict) { + const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment, strict); + return result; + } + /** + * Join a URI path with path fragments and normalizes the resulting path. + * + * @param uri The input URI. + * @param pathFragment The path fragment to add to the URI path. + * @returns The resulting URI. + */ + 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 }); + } + // ---- printing/externalize --------------------------- + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding = false) { + return _asFormatted(this, skipEncoding); + } + toJSON() { + return this; + } + static revive(data) { + var _a3, _b; + if (!data) { + return data; + } else if (data instanceof _URI) { + return data; + } else { + const result = new Uri(data); + result._formatted = (_a3 = data.external) !== null && _a3 !== void 0 ? _a3 : null; + result._fsPath = data._sep === _pathSepMarker ? (_b = data.fsPath) !== null && _b !== void 0 ? _b : null : null; + return result; + } + } + }; + var _pathSepMarker = isWindows ? 1 : void 0; + var 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 + /* MarshalledId.Uri */ + }; + 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; + } + }; + var encodeTable = { + [ + 58 + /* CharCode.Colon */ + ]: "%3A", + [ + 47 + /* CharCode.Slash */ + ]: "%2F", + [ + 63 + /* CharCode.QuestionMark */ + ]: "%3F", + [ + 35 + /* CharCode.Hash */ + ]: "%23", + [ + 91 + /* CharCode.OpenSquareBracket */ + ]: "%5B", + [ + 93 + /* CharCode.CloseSquareBracket */ + ]: "%5D", + [ + 64 + /* CharCode.AtSign */ + ]: "%40", + [ + 33 + /* CharCode.ExclamationMark */ + ]: "%21", + [ + 36 + /* CharCode.DollarSign */ + ]: "%24", + [ + 38 + /* CharCode.Ampersand */ + ]: "%26", + [ + 39 + /* CharCode.SingleQuote */ + ]: "%27", + [ + 40 + /* CharCode.OpenParen */ + ]: "%28", + [ + 41 + /* CharCode.CloseParen */ + ]: "%29", + [ + 42 + /* CharCode.Asterisk */ + ]: "%2A", + [ + 43 + /* CharCode.Plus */ + ]: "%2B", + [ + 44 + /* CharCode.Comma */ + ]: "%2C", + [ + 59 + /* CharCode.Semicolon */ + ]: "%3B", + [ + 61 + /* CharCode.Equals */ + ]: "%3D", + [ + 32 + /* CharCode.Space */ + ]: "%20" + }; + function encodeURIComponentFast(uriComponent, isPath, isAuthority) { + let res = void 0; + let nativeEncodePos = -1; + for (let pos = 0; pos < uriComponent.length; pos++) { + const code = uriComponent.charCodeAt(pos); + if (code >= 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; pos < path.length; pos++) { + const code = path.charCodeAt(pos); + if (code === 35 || code === 63) { + if (res === void 0) { + res = path.substr(0, pos); + } + res += encodeTable[code]; + } else { + if (res !== void 0) { + res += path[pos]; + } + } + } + return res !== void 0 ? res : path; + } + function uriToFsPath(uri, keepDriveLetterCasing) { + let value; + if (uri.authority && uri.path.length > 1 && 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, authority, path, query, 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 (_a3) { + if (str.length > 3) { + return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); + } else { + return str; + } + } + } + var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + function percentDecode(str) { + if (!str.match(_rEncodedAsHex)) { + return str; + } + return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/position.js + var Position = class _Position { + constructor(lineNumber, column) { + this.lineNumber = lineNumber; + this.column = column; + } + /** + * Create a new position from this position. + * + * @param newLineNumber new line number + * @param newColumn new column + */ + with(newLineNumber = this.lineNumber, newColumn = this.column) { + if (newLineNumber === this.lineNumber && newColumn === this.column) { + return this; + } else { + return new _Position(newLineNumber, newColumn); + } + } + /** + * Derive a new position from this position. + * + * @param deltaLineNumber line number delta + * @param deltaColumn column delta + */ + delta(deltaLineNumber = 0, deltaColumn = 0) { + return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn); + } + /** + * Test if this position equals other position + */ + equals(other) { + return _Position.equals(this, other); + } + /** + * Test if position `a` equals position `b` + */ + static equals(a, b) { + if (!a && !b) { + return true; + } + return !!a && !!b && a.lineNumber === b.lineNumber && a.column === b.column; + } + /** + * Test if this position is before other position. + * If the two positions are equal, the result will be false. + */ + isBefore(other) { + return _Position.isBefore(this, other); + } + /** + * Test if position `a` is before position `b`. + * If the two positions are equal, the result will be false. + */ + static isBefore(a, b) { + if (a.lineNumber < b.lineNumber) { + return true; + } + if (b.lineNumber < a.lineNumber) { + return false; + } + return a.column < b.column; + } + /** + * Test if this position is before other position. + * If the two positions are equal, the result will be true. + */ + isBeforeOrEqual(other) { + return _Position.isBeforeOrEqual(this, other); + } + /** + * Test if position `a` is before position `b`. + * If the two positions are equal, the result will be true. + */ + static isBeforeOrEqual(a, b) { + if (a.lineNumber < b.lineNumber) { + return true; + } + if (b.lineNumber < a.lineNumber) { + return false; + } + return a.column <= b.column; + } + /** + * A function that compares positions, useful for sorting + */ + static compare(a, b) { + const aLineNumber = a.lineNumber | 0; + const bLineNumber = b.lineNumber | 0; + if (aLineNumber === bLineNumber) { + const aColumn = a.column | 0; + const bColumn = b.column | 0; + return aColumn - bColumn; + } + return aLineNumber - bLineNumber; + } + /** + * Clone this position. + */ + clone() { + return new _Position(this.lineNumber, this.column); + } + /** + * Convert to a human-readable representation. + */ + toString() { + return "(" + this.lineNumber + "," + this.column + ")"; + } + // --- + /** + * Create a `Position` from an `IPosition`. + */ + static lift(pos) { + return new _Position(pos.lineNumber, pos.column); + } + /** + * Test if `obj` is an `IPosition`. + */ + static isIPosition(obj) { + return obj && typeof obj.lineNumber === "number" && typeof obj.column === "number"; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/range.js + var Range = class _Range { + constructor(startLineNumber, startColumn, endLineNumber, endColumn) { + if (startLineNumber > endLineNumber || 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; + } + } + /** + * Test if this range is empty. + */ + isEmpty() { + return _Range.isEmpty(this); + } + /** + * Test if `range` is empty. + */ + static isEmpty(range) { + return range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn; + } + /** + * Test if position is in this range. If the position is at the edges, will return true. + */ + containsPosition(position) { + return _Range.containsPosition(this, position); + } + /** + * Test if `position` is in `range`. If the position is at the edges, will return true. + */ + static containsPosition(range, position) { + if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { + return false; + } + if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) { + return false; + } + if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) { + return false; + } + return true; + } + /** + * Test if `position` is in `range`. If the position is at the edges, will return false. + * @internal + */ + static strictContainsPosition(range, position) { + if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { + return false; + } + if (position.lineNumber === range.startLineNumber && position.column <= range.startColumn) { + return false; + } + if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) { + return false; + } + return true; + } + /** + * Test if range is in this range. If the range is equal to this range, will return true. + */ + containsRange(range) { + return _Range.containsRange(this, range); + } + /** + * Test if `otherRange` is in `range`. If the ranges are equal, will return true. + */ + static containsRange(range, otherRange) { + if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { + return false; + } + if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { + return false; + } + if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) { + return false; + } + if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) { + return false; + } + return true; + } + /** + * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. + */ + strictContainsRange(range) { + return _Range.strictContainsRange(this, range); + } + /** + * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false. + */ + static strictContainsRange(range, otherRange) { + if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { + return false; + } + if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { + return false; + } + if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { + return false; + } + if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { + return false; + } + return true; + } + /** + * A reunion of the two ranges. + * The smallest position will be used as the start point, and the largest one as the end point. + */ + plusRange(range) { + return _Range.plusRange(this, range); + } + /** + * A reunion of the two ranges. + * The smallest position will be used as the start point, and the largest one as the end point. + */ + static plusRange(a, b) { + let startLineNumber; + let startColumn; + let endLineNumber; + let endColumn; + if (b.startLineNumber < a.startLineNumber) { + startLineNumber = b.startLineNumber; + startColumn = b.startColumn; + } else if (b.startLineNumber === a.startLineNumber) { + startLineNumber = b.startLineNumber; + startColumn = Math.min(b.startColumn, a.startColumn); + } else { + startLineNumber = a.startLineNumber; + startColumn = a.startColumn; + } + if (b.endLineNumber > a.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); + } + /** + * A intersection of the two ranges. + */ + intersectRanges(range) { + return _Range.intersectRanges(this, range); + } + /** + * A intersection of the two ranges. + */ + 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 (resultStartLineNumber < otherStartLineNumber) { + resultStartLineNumber = otherStartLineNumber; + resultStartColumn = otherStartColumn; + } else if (resultStartLineNumber === otherStartLineNumber) { + resultStartColumn = Math.max(resultStartColumn, otherStartColumn); + } + if (resultEndLineNumber > otherEndLineNumber) { + 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); + } + /** + * Test if this range equals other. + */ + equalsRange(other) { + return _Range.equalsRange(this, other); + } + /** + * Test if range `a` equals `b`. + */ + 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; + } + /** + * Return the end position (which will be after or equal to the start position) + */ + getEndPosition() { + return _Range.getEndPosition(this); + } + /** + * Return the end position (which will be after or equal to the start position) + */ + static getEndPosition(range) { + return new Position(range.endLineNumber, range.endColumn); + } + /** + * Return the start position (which will be before or equal to the end position) + */ + getStartPosition() { + return _Range.getStartPosition(this); + } + /** + * Return the start position (which will be before or equal to the end position) + */ + static getStartPosition(range) { + return new Position(range.startLineNumber, range.startColumn); + } + /** + * Transform to a user presentable string representation. + */ + toString() { + return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"; + } + /** + * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position. + */ + setEndPosition(endLineNumber, endColumn) { + return new _Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn); + } + /** + * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. + */ + setStartPosition(startLineNumber, startColumn) { + return new _Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn); + } + /** + * Create a new empty range using this range's start position. + */ + collapseToStart() { + return _Range.collapseToStart(this); + } + /** + * Create a new empty range using this range's start position. + */ + static collapseToStart(range) { + return new _Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); + } + /** + * Create a new empty range using this range's end position. + */ + collapseToEnd() { + return _Range.collapseToEnd(this); + } + /** + * Create a new empty range using this range's end position. + */ + static collapseToEnd(range) { + return new _Range(range.endLineNumber, range.endColumn, range.endLineNumber, range.endColumn); + } + /** + * Moves the range by the given amount of lines. + */ + 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(range) { + if (!range) { + return null; + } + return new _Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); + } + /** + * Test if `obj` is an `IRange`. + */ + static isIRange(obj) { + return obj && typeof obj.startLineNumber === "number" && typeof obj.startColumn === "number" && typeof obj.endLineNumber === "number" && typeof obj.endColumn === "number"; + } + /** + * Test if the two ranges are touching in any way. + */ + static areIntersectingOrTouching(a, b) { + if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn) { + return false; + } + if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn) { + return false; + } + return true; + } + /** + * Test if the two ranges are intersecting. If the ranges are touching it returns true. + */ + static areIntersecting(a, b) { + if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn) { + return false; + } + if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn) { + return false; + } + return true; + } + /** + * A function that compares ranges, useful for sorting ranges + * It will first compare ranges on the startPosition and then on the endPosition + */ + static compareRangesUsingStarts(a, b) { + if (a && b) { + const aStartLineNumber = a.startLineNumber | 0; + const bStartLineNumber = b.startLineNumber | 0; + if (aStartLineNumber === bStartLineNumber) { + const aStartColumn = a.startColumn | 0; + const bStartColumn = b.startColumn | 0; + if (aStartColumn === bStartColumn) { + const aEndLineNumber = a.endLineNumber | 0; + const bEndLineNumber = b.endLineNumber | 0; + if (aEndLineNumber === bEndLineNumber) { + const aEndColumn = a.endColumn | 0; + const bEndColumn = b.endColumn | 0; + return aEndColumn - bEndColumn; + } + return aEndLineNumber - bEndLineNumber; + } + return aStartColumn - bStartColumn; + } + return aStartLineNumber - bStartLineNumber; + } + const aExists = a ? 1 : 0; + const bExists = b ? 1 : 0; + return aExists - bExists; + } + /** + * A function that compares ranges, useful for sorting ranges + * It will first compare ranges on the endPosition and then on the startPosition + */ + static compareRangesUsingEnds(a, b) { + if (a.endLineNumber === b.endLineNumber) { + if (a.endColumn === b.endColumn) { + if (a.startLineNumber === b.startLineNumber) { + return a.startColumn - b.startColumn; + } + return a.startLineNumber - b.startLineNumber; + } + return a.endColumn - b.endColumn; + } + return a.endLineNumber - b.endLineNumber; + } + /** + * Test if the range spans multiple lines. + */ + static spansMultipleLines(range) { + return range.endLineNumber > range.startLineNumber; + } + toJSON() { + return this; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/arrays.js + 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; i < len; i++) { + if (!itemEquals(one[i], other[i])) { + return false; + } + } + return true; + } + function findLastIndex(array, fn) { + for (let i = array.length - 1; i >= 0; i--) { + const element = array[i]; + if (fn(element)) { + return i; + } + } + return -1; + } + var CompareResult; + (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 = {})); + function compareBy(selector, comparator) { + return (a, b) => comparator(selector(a), selector(b)); + } + var numberComparator = (a, b) => a - b; + function reverseOrder(comparator) { + return (a, b) => -comparator(a, b); + } + var CallbackIterable = class _CallbackIterable { + constructor(iterate) { + this.iterate = iterate; + } + forEach(handler) { + this.iterate((item) => { + handler(item); + return true; + }); + } + 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)))); + } + some(predicate) { + let result = false; + this.iterate((item) => { + result = predicate(item); + return !result; + }); + return result; + } + findFirst(predicate) { + let result; + this.iterate((item) => { + if (predicate(item)) { + result = item; + return false; + } + return true; + }); + return result; + } + findLast(predicate) { + let result; + this.iterate((item) => { + if (predicate(item)) { + result = item; + } + return true; + }); + return result; + } + findLastMaxBy(comparator) { + let result; + let first = true; + this.iterate((item) => { + if (first || CompareResult.isGreaterThan(comparator(item, result))) { + first = false; + result = item; + } + return true; + }); + return result; + } + }; + CallbackIterable.empty = new CallbackIterable((_callback) => { + }); + + // node_modules/monaco-editor/esm/vs/base/common/uint.js + function toUint8(v) { + if (v < 0) { + return 0; + } + if (v > 255) { + return 255; + } + return v | 0; + } + function toUint32(v) { + if (v < 0) { + return 0; + } + if (v > 4294967295) { + return 4294967295; + } + return v | 0; + } + + // node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js + var PrefixSumComputer = class { + constructor(values) { + this.values = values; + this.prefixSum = new Uint32Array(values.length); + this.prefixSumValidIndex = new Int32Array(1); + this.prefixSumValidIndex[0] = -1; + } + getCount() { + return this.values.length; + } + 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = insertIndex - 1; + } + this.prefixSum = new Uint32Array(this.values.length); + if (this.prefixSumValidIndex[0] >= 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = index - 1; + } + return true; + } + removeValues(startIndex, count) { + startIndex = toUint32(startIndex); + count = toUint32(count); + const oldValues = this.values; + const oldPrefixSum = this.prefixSum; + if (startIndex >= 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = startIndex - 1; + } + if (this.prefixSumValidIndex[0] >= 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); + } + /** + * Returns the sum of the first `index + 1` many items. + * @returns `SUM(0 <= j <= index, values[j])`. + */ + 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 < midStart) { + high = mid - 1; + } else if (sum >= midStop) { + low = mid + 1; + } else { + break; + } + } + return new PrefixSumIndexOfResult(mid, sum - midStart); + } + }; + var PrefixSumIndexOfResult = class { + constructor(index, remainder) { + this.index = index; + this.remainder = remainder; + this._prefixSumIndexOfResultBrand = void 0; + this.index = index; + this.remainder = remainder; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js + var MirrorTextModel = class { + constructor(uri, lines, eol, versionId) { + this._uri = uri; + this._lines = lines; + this._eol = eol; + this._versionId = versionId; + this._lineStarts = null; + this._cachedTextValue = null; + } + dispose() { + this._lines.length = 0; + } + get version() { + return this._versionId; + } + getText() { + if (this._cachedTextValue === null) { + this._cachedTextValue = this._lines.join(this._eol); + } + return this._cachedTextValue; + } + onEvents(e) { + if (e.eol && e.eol !== this._eol) { + this._eol = e.eol; + this._lineStarts = null; + } + const changes = e.changes; + for (const change of changes) { + this._acceptDeleteRange(change.range); + this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text); + } + this._versionId = e.versionId; + this._cachedTextValue = null; + } + _ensureLineStarts() { + if (!this._lineStarts) { + const eolLength = this._eol.length; + const linesLength = this._lines.length; + const lineStartValues = new Uint32Array(linesLength); + for (let i = 0; i < linesLength; i++) { + lineStartValues[i] = this._lines[i].length + eolLength; + } + this._lineStarts = new PrefixSumComputer(lineStartValues); + } + } + /** + * All changes to a line's text go through this method + */ + _setLineText(lineIndex, newValue) { + this._lines[lineIndex] = newValue; + if (this._lineStarts) { + this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length); + } + } + _acceptDeleteRange(range) { + if (range.startLineNumber === range.endLineNumber) { + if (range.startColumn === range.endColumn) { + return; + } + this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1)); + return; + } + this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1)); + this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); + if (this._lineStarts) { + this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber); + } + } + _acceptInsertText(position, insertText) { + if (insertText.length === 0) { + return; + } + const insertLines = splitLines(insertText); + if (insertLines.length === 1) { + this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0] + this._lines[position.lineNumber - 1].substring(position.column - 1)); + return; + } + insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1); + this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0]); + const newLengths = new Uint32Array(insertLines.length - 1); + for (let i = 1; i < insertLines.length; i++) { + this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]); + newLengths[i - 1] = insertLines[i].length + this._eol.length; + } + if (this._lineStarts) { + this._lineStarts.insertValues(position.lineNumber, newLengths); + } + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js + var USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; + 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"); + } + var DEFAULT_WORD_REGEXP = createWordRegExp(); + 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; + } + var _defaultConfig = new LinkedList(); + _defaultConfig.unshift({ + maxLen: 1e3, + windowSize: 15, + timeBudget: 150 + }); + function getWordAtText(column, wordDefinition, text3, textOffset, config) { + if (!config) { + config = Iterable.first(_defaultConfig); + } + if (text3.length > config.maxLen) { + let start = column - config.maxLen / 2; + if (start < 0) { + start = 0; + } else { + textOffset += start; + } + text3 = text3.substring(start, column + config.maxLen / 2); + return getWordAtText(column, wordDefinition, text3, textOffset, config); + } + const t1 = Date.now(); + const pos = column - 1 - textOffset; + let prevRegexIndex = -1; + let match = 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, text3, pos, prevRegexIndex); + if (!thisMatch && match) { + break; + } + match = thisMatch; + if (regexIndex <= 0) { + break; + } + prevRegexIndex = regexIndex; + } + if (match) { + const result = { + word: match[0], + startColumn: textOffset + 1 + match.index, + endColumn: textOffset + 1 + match.index + match[0].length + }; + wordDefinition.lastIndex = 0; + return result; + } + return null; + } + function _findRegexMatchEnclosingPosition(wordDefinition, text3, pos, stopPos) { + let match; + while (match = wordDefinition.exec(text3)) { + const matchIndex = match.index || 0; + if (matchIndex <= pos && wordDefinition.lastIndex >= pos) { + return match; + } else if (stopPos > 0 && matchIndex > stopPos) { + return null; + } + } + return null; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js + var CharacterClassifier = class _CharacterClassifier { + constructor(_defaultValue) { + const defaultValue = toUint8(_defaultValue); + this._defaultValue = defaultValue; + this._asciiMap = _CharacterClassifier._createAsciiMap(defaultValue); + this._map = /* @__PURE__ */ new Map(); + } + static _createAsciiMap(defaultValue) { + const asciiMap = new Uint8Array(256); + asciiMap.fill(defaultValue); + return asciiMap; + } + set(charCode, _value) { + const value = toUint8(_value); + if (charCode >= 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(); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/languages/linkComputer.js + var Uint8Matrix = class { + constructor(rows, cols, defaultValue) { + const data = new Uint8Array(rows * cols); + for (let i = 0, len = rows * cols; i < len; i++) { + data[i] = defaultValue; + } + this._data = data; + this.rows = rows; + this.cols = cols; + } + get(row, col) { + return this._data[row * this.cols + col]; + } + set(row, col, value) { + this._data[row * this.cols + col] = value; + } + }; + var StateMachine = class { + constructor(edges) { + let maxCharCode = 0; + let maxState = 0; + for (let i = 0, len = edges.length; i < len; i++) { + const [from, chCode, to] = edges[i]; + if (chCode > maxCharCode) { + maxCharCode = chCode; + } + if (from > maxState) { + maxState = from; + } + if (to > maxState) { + maxState = to; + } + } + maxCharCode++; + maxState++; + const states = new Uint8Matrix( + maxState, + maxCharCode, + 0 + /* State.Invalid */ + ); + for (let i = 0, len = edges.length; i < len; i++) { + const [from, chCode, to] = edges[i]; + states.set(from, chCode, to); + } + this._states = states; + this._maxCharCode = maxCharCode; + } + nextState(currentState, chCode) { + if (chCode < 0 || chCode >= this._maxCharCode) { + return 0; + } + return this._states.get(currentState, chCode); + } + }; + var _stateMachine = null; + function getStateMachine() { + if (_stateMachine === null) { + _stateMachine = new StateMachine([ + [ + 1, + 104, + 2 + /* State.H */ + ], + [ + 1, + 72, + 2 + /* State.H */ + ], + [ + 1, + 102, + 6 + /* State.F */ + ], + [ + 1, + 70, + 6 + /* State.F */ + ], + [ + 2, + 116, + 3 + /* State.HT */ + ], + [ + 2, + 84, + 3 + /* State.HT */ + ], + [ + 3, + 116, + 4 + /* State.HTT */ + ], + [ + 3, + 84, + 4 + /* State.HTT */ + ], + [ + 4, + 112, + 5 + /* State.HTTP */ + ], + [ + 4, + 80, + 5 + /* State.HTTP */ + ], + [ + 5, + 115, + 9 + /* State.BeforeColon */ + ], + [ + 5, + 83, + 9 + /* State.BeforeColon */ + ], + [ + 5, + 58, + 10 + /* State.AfterColon */ + ], + [ + 6, + 105, + 7 + /* State.FI */ + ], + [ + 6, + 73, + 7 + /* State.FI */ + ], + [ + 7, + 108, + 8 + /* State.FIL */ + ], + [ + 7, + 76, + 8 + /* State.FIL */ + ], + [ + 8, + 101, + 9 + /* State.BeforeColon */ + ], + [ + 8, + 69, + 9 + /* State.BeforeColon */ + ], + [ + 9, + 58, + 10 + /* State.AfterColon */ + ], + [ + 10, + 47, + 11 + /* State.AlmostThere */ + ], + [ + 11, + 47, + 12 + /* State.End */ + ] + ]); + } + return _stateMachine; + } + var _classifier = null; + function getClassifier() { + if (_classifier === null) { + _classifier = new CharacterClassifier( + 0 + /* CharacterClass.None */ + ); + const FORCE_TERMINATION_CHARACTERS = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`; + for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) { + _classifier.set( + FORCE_TERMINATION_CHARACTERS.charCodeAt(i), + 1 + /* CharacterClass.ForceTermination */ + ); + } + const CANNOT_END_WITH_CHARACTERS = ".,;:"; + for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) { + _classifier.set( + CANNOT_END_WITH_CHARACTERS.charCodeAt(i), + 2 + /* CharacterClass.CannotEndIn */ + ); + } + } + return _classifier; + } + var LinkComputer = class _LinkComputer { + 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 < len) { + let resetStateMachine = false; + const chCode = line.charCodeAt(j); + if (state === 13) { + let chClass; + switch (chCode) { + case 40: + hasOpenParens = true; + chClass = 0; + break; + case 41: + chClass = hasOpenParens ? 0 : 1; + break; + case 91: + inSquareBrackets = true; + hasOpenSquareBracket = true; + chClass = 0; + break; + case 93: + inSquareBrackets = false; + chClass = hasOpenSquareBracket ? 0 : 1; + break; + case 123: + hasOpenCurlyBracket = true; + chClass = 0; + break; + case 125: + chClass = hasOpenCurlyBracket ? 0 : 1; + break; + case 39: + case 34: + case 96: + if (linkBeginChCode === chCode) { + chClass = 1; + } else if (linkBeginChCode === 39 || linkBeginChCode === 34 || linkBeginChCode === 96) { + chClass = 0; + } else { + chClass = 1; + } + break; + case 42: + chClass = linkBeginChCode === 42 ? 1 : 0; + break; + case 124: + chClass = linkBeginChCode === 124 ? 1 : 0; + break; + case 32: + chClass = inSquareBrackets ? 0 : 1; + break; + default: + chClass = classifier.get(chCode); + } + if (chClass === 1) { + result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, j)); + resetStateMachine = true; + } + } else if (state === 12) { + let chClass; + if (chCode === 91) { + hasOpenSquareBracket = true; + chClass = 0; + } else { + chClass = classifier.get(chCode); + } + if (chClass === 1) { + resetStateMachine = true; + } else { + state = 13; + } + } else { + state = stateMachine.nextState(state, chCode); + if (state === 0) { + resetStateMachine = true; + } + } + if (resetStateMachine) { + state = 1; + hasOpenParens = false; + hasOpenSquareBracket = false; + hasOpenCurlyBracket = false; + linkBeginIndex = j + 1; + linkBeginChCode = chCode; + } + j++; + } + if (state === 13) { + result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, len)); + } + } + return result; + } + }; + function computeLinks(model) { + if (!model || typeof model.getLineCount !== "function" || typeof model.getLineContent !== "function") { + return []; + } + return LinkComputer.computeLinks(model); + } + + // node_modules/monaco-editor/esm/vs/editor/common/languages/supports/inplaceReplaceSupport.js + var BasicInplaceReplace = class { + constructor() { + this._defaultValueSet = [ + ["true", "false"], + ["True", "False"], + ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], + ["public", "protected", "private"] + ]; + } + navigateValueSet(range1, text1, range2, text22, up) { + if (range1 && text1) { + const result = this.doNavigateValueSet(text1, up); + if (result) { + return { + range: range1, + value: result + }; + } + } + if (range2 && text22) { + const result = this.doNavigateValueSet(text22, up); + if (result) { + return { + range: range2, + value: result + }; + } + } + return null; + } + doNavigateValueSet(text3, up) { + const numberResult = this.numberReplace(text3, up); + if (numberResult !== null) { + return numberResult; + } + return this.textReplace(text3, up); + } + numberReplace(value, up) { + const precision = Math.pow(10, value.length - (value.lastIndexOf(".") + 1)); + let n1 = Number(value); + const n2 = parseFloat(value); + if (!isNaN(n1) && !isNaN(n2) && n1 === n2) { + if (n1 === 0 && !up) { + return null; + } else { + n1 = Math.floor(n1 * precision); + n1 += up ? precision : -precision; + return String(n1 / precision); + } + } + return null; + } + textReplace(value, up) { + return this.valueSetsReplace(this._defaultValueSet, value, up); + } + valueSetsReplace(valueSets, value, up) { + let result = null; + for (let i = 0, len = valueSets.length; result === null && i < len; i++) { + result = this.valueSetReplace(valueSets[i], value, up); + } + return result; + } + valueSetReplace(valueSet, value, up) { + let idx = valueSet.indexOf(value); + if (idx >= 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(); + + // node_modules/monaco-editor/esm/vs/base/common/keyCodes.js + var KeyCodeStrMap = class { + constructor() { + this._keyCodeToStr = []; + this._strToKeyCode = /* @__PURE__ */ 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; + } + }; + var uiMap = new KeyCodeStrMap(); + var userSettingsUSMap = new KeyCodeStrMap(); + var userSettingsGeneralMap = new KeyCodeStrMap(); + var EVENT_KEY_CODE_MAP = new Array(230); + var NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {}; + var scanCodeIntToStr = []; + var scanCodeStrToInt = /* @__PURE__ */ Object.create(null); + var scanCodeLowerCaseStrToInt = /* @__PURE__ */ Object.create(null); + var IMMUTABLE_CODE_TO_KEY_CODE = []; + var 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 empty = ""; + const mappings = [ + // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel + [1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", empty, empty], + [1, 1, "Hyper", 0, empty, 0, empty, empty, empty], + [1, 2, "Super", 0, empty, 0, empty, empty, empty], + [1, 3, "Fn", 0, empty, 0, empty, empty, empty], + [1, 4, "FnLock", 0, empty, 0, empty, empty, empty], + [1, 5, "Suspend", 0, empty, 0, empty, empty, empty], + [1, 6, "Resume", 0, empty, 0, empty, empty, empty], + [1, 7, "Turbo", 0, empty, 0, empty, empty, empty], + [1, 8, "Sleep", 0, empty, 0, "VK_SLEEP", empty, empty], + [1, 9, "WakeUp", 0, empty, 0, empty, empty, empty], + [0, 10, "KeyA", 31, "A", 65, "VK_A", empty, empty], + [0, 11, "KeyB", 32, "B", 66, "VK_B", empty, empty], + [0, 12, "KeyC", 33, "C", 67, "VK_C", empty, empty], + [0, 13, "KeyD", 34, "D", 68, "VK_D", empty, empty], + [0, 14, "KeyE", 35, "E", 69, "VK_E", empty, empty], + [0, 15, "KeyF", 36, "F", 70, "VK_F", empty, empty], + [0, 16, "KeyG", 37, "G", 71, "VK_G", empty, empty], + [0, 17, "KeyH", 38, "H", 72, "VK_H", empty, empty], + [0, 18, "KeyI", 39, "I", 73, "VK_I", empty, empty], + [0, 19, "KeyJ", 40, "J", 74, "VK_J", empty, empty], + [0, 20, "KeyK", 41, "K", 75, "VK_K", empty, empty], + [0, 21, "KeyL", 42, "L", 76, "VK_L", empty, empty], + [0, 22, "KeyM", 43, "M", 77, "VK_M", empty, empty], + [0, 23, "KeyN", 44, "N", 78, "VK_N", empty, empty], + [0, 24, "KeyO", 45, "O", 79, "VK_O", empty, empty], + [0, 25, "KeyP", 46, "P", 80, "VK_P", empty, empty], + [0, 26, "KeyQ", 47, "Q", 81, "VK_Q", empty, empty], + [0, 27, "KeyR", 48, "R", 82, "VK_R", empty, empty], + [0, 28, "KeyS", 49, "S", 83, "VK_S", empty, empty], + [0, 29, "KeyT", 50, "T", 84, "VK_T", empty, empty], + [0, 30, "KeyU", 51, "U", 85, "VK_U", empty, empty], + [0, 31, "KeyV", 52, "V", 86, "VK_V", empty, empty], + [0, 32, "KeyW", 53, "W", 87, "VK_W", empty, empty], + [0, 33, "KeyX", 54, "X", 88, "VK_X", empty, empty], + [0, 34, "KeyY", 55, "Y", 89, "VK_Y", empty, empty], + [0, 35, "KeyZ", 56, "Z", 90, "VK_Z", empty, empty], + [0, 36, "Digit1", 22, "1", 49, "VK_1", empty, empty], + [0, 37, "Digit2", 23, "2", 50, "VK_2", empty, empty], + [0, 38, "Digit3", 24, "3", 51, "VK_3", empty, empty], + [0, 39, "Digit4", 25, "4", 52, "VK_4", empty, empty], + [0, 40, "Digit5", 26, "5", 53, "VK_5", empty, empty], + [0, 41, "Digit6", 27, "6", 54, "VK_6", empty, empty], + [0, 42, "Digit7", 28, "7", 55, "VK_7", empty, empty], + [0, 43, "Digit8", 29, "8", 56, "VK_8", empty, empty], + [0, 44, "Digit9", 30, "9", 57, "VK_9", empty, empty], + [0, 45, "Digit0", 21, "0", 48, "VK_0", empty, empty], + [1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", empty, empty], + [1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", empty, empty], + [1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", empty, empty], + [1, 49, "Tab", 2, "Tab", 9, "VK_TAB", empty, empty], + [1, 50, "Space", 10, "Space", 32, "VK_SPACE", empty, empty], + [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, empty, 0, empty, empty, empty], + [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", empty, empty], + [1, 64, "F1", 59, "F1", 112, "VK_F1", empty, empty], + [1, 65, "F2", 60, "F2", 113, "VK_F2", empty, empty], + [1, 66, "F3", 61, "F3", 114, "VK_F3", empty, empty], + [1, 67, "F4", 62, "F4", 115, "VK_F4", empty, empty], + [1, 68, "F5", 63, "F5", 116, "VK_F5", empty, empty], + [1, 69, "F6", 64, "F6", 117, "VK_F6", empty, empty], + [1, 70, "F7", 65, "F7", 118, "VK_F7", empty, empty], + [1, 71, "F8", 66, "F8", 119, "VK_F8", empty, empty], + [1, 72, "F9", 67, "F9", 120, "VK_F9", empty, empty], + [1, 73, "F10", 68, "F10", 121, "VK_F10", empty, empty], + [1, 74, "F11", 69, "F11", 122, "VK_F11", empty, empty], + [1, 75, "F12", 70, "F12", 123, "VK_F12", empty, empty], + [1, 76, "PrintScreen", 0, empty, 0, empty, empty, empty], + [1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", empty, empty], + [1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", empty, empty], + [1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", empty, empty], + [1, 80, "Home", 14, "Home", 36, "VK_HOME", empty, empty], + [1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", empty, empty], + [1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", empty, empty], + [1, 83, "End", 13, "End", 35, "VK_END", empty, empty], + [1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", empty, empty], + [1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", empty], + [1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", empty], + [1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", empty], + [1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", empty], + [1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", empty, empty], + [1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", empty, empty], + [1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", empty, empty], + [1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", empty, empty], + [1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", empty, empty], + [1, 94, "NumpadEnter", 3, empty, 0, empty, empty, empty], + [1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", empty, empty], + [1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", empty, empty], + [1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", empty, empty], + [1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", empty, empty], + [1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", empty, empty], + [1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", empty, empty], + [1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", empty, empty], + [1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", empty, empty], + [1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", empty, empty], + [1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", empty, empty], + [1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", empty, empty], + [0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", empty, empty], + [1, 107, "ContextMenu", 58, "ContextMenu", 93, empty, empty, empty], + [1, 108, "Power", 0, empty, 0, empty, empty, empty], + [1, 109, "NumpadEqual", 0, empty, 0, empty, empty, empty], + [1, 110, "F13", 71, "F13", 124, "VK_F13", empty, empty], + [1, 111, "F14", 72, "F14", 125, "VK_F14", empty, empty], + [1, 112, "F15", 73, "F15", 126, "VK_F15", empty, empty], + [1, 113, "F16", 74, "F16", 127, "VK_F16", empty, empty], + [1, 114, "F17", 75, "F17", 128, "VK_F17", empty, empty], + [1, 115, "F18", 76, "F18", 129, "VK_F18", empty, empty], + [1, 116, "F19", 77, "F19", 130, "VK_F19", empty, empty], + [1, 117, "F20", 78, "F20", 131, "VK_F20", empty, empty], + [1, 118, "F21", 79, "F21", 132, "VK_F21", empty, empty], + [1, 119, "F22", 80, "F22", 133, "VK_F22", empty, empty], + [1, 120, "F23", 81, "F23", 134, "VK_F23", empty, empty], + [1, 121, "F24", 82, "F24", 135, "VK_F24", empty, empty], + [1, 122, "Open", 0, empty, 0, empty, empty, empty], + [1, 123, "Help", 0, empty, 0, empty, empty, empty], + [1, 124, "Select", 0, empty, 0, empty, empty, empty], + [1, 125, "Again", 0, empty, 0, empty, empty, empty], + [1, 126, "Undo", 0, empty, 0, empty, empty, empty], + [1, 127, "Cut", 0, empty, 0, empty, empty, empty], + [1, 128, "Copy", 0, empty, 0, empty, empty, empty], + [1, 129, "Paste", 0, empty, 0, empty, empty, empty], + [1, 130, "Find", 0, empty, 0, empty, empty, empty], + [1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", empty, empty], + [1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", empty, empty], + [1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", empty, empty], + [1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", empty, empty], + [0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", empty, empty], + [1, 136, "KanaMode", 0, empty, 0, empty, empty, empty], + [0, 137, "IntlYen", 0, empty, 0, empty, empty, empty], + [1, 138, "Convert", 0, empty, 0, empty, empty, empty], + [1, 139, "NonConvert", 0, empty, 0, empty, empty, empty], + [1, 140, "Lang1", 0, empty, 0, empty, empty, empty], + [1, 141, "Lang2", 0, empty, 0, empty, empty, empty], + [1, 142, "Lang3", 0, empty, 0, empty, empty, empty], + [1, 143, "Lang4", 0, empty, 0, empty, empty, empty], + [1, 144, "Lang5", 0, empty, 0, empty, empty, empty], + [1, 145, "Abort", 0, empty, 0, empty, empty, empty], + [1, 146, "Props", 0, empty, 0, empty, empty, empty], + [1, 147, "NumpadParenLeft", 0, empty, 0, empty, empty, empty], + [1, 148, "NumpadParenRight", 0, empty, 0, empty, empty, empty], + [1, 149, "NumpadBackspace", 0, empty, 0, empty, empty, empty], + [1, 150, "NumpadMemoryStore", 0, empty, 0, empty, empty, empty], + [1, 151, "NumpadMemoryRecall", 0, empty, 0, empty, empty, empty], + [1, 152, "NumpadMemoryClear", 0, empty, 0, empty, empty, empty], + [1, 153, "NumpadMemoryAdd", 0, empty, 0, empty, empty, empty], + [1, 154, "NumpadMemorySubtract", 0, empty, 0, empty, empty, empty], + [1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", empty, empty], + [1, 156, "NumpadClearEntry", 0, empty, 0, empty, empty, empty], + [1, 0, empty, 5, "Ctrl", 17, "VK_CONTROL", empty, empty], + [1, 0, empty, 4, "Shift", 16, "VK_SHIFT", empty, empty], + [1, 0, empty, 6, "Alt", 18, "VK_MENU", empty, empty], + [1, 0, empty, 57, "Meta", 91, "VK_COMMAND", empty, empty], + [1, 157, "ControlLeft", 5, empty, 0, "VK_LCONTROL", empty, empty], + [1, 158, "ShiftLeft", 4, empty, 0, "VK_LSHIFT", empty, empty], + [1, 159, "AltLeft", 6, empty, 0, "VK_LMENU", empty, empty], + [1, 160, "MetaLeft", 57, empty, 0, "VK_LWIN", empty, empty], + [1, 161, "ControlRight", 5, empty, 0, "VK_RCONTROL", empty, empty], + [1, 162, "ShiftRight", 4, empty, 0, "VK_RSHIFT", empty, empty], + [1, 163, "AltRight", 6, empty, 0, "VK_RMENU", empty, empty], + [1, 164, "MetaRight", 57, empty, 0, "VK_RWIN", empty, empty], + [1, 165, "BrightnessUp", 0, empty, 0, empty, empty, empty], + [1, 166, "BrightnessDown", 0, empty, 0, empty, empty, empty], + [1, 167, "MediaPlay", 0, empty, 0, empty, empty, empty], + [1, 168, "MediaRecord", 0, empty, 0, empty, empty, empty], + [1, 169, "MediaFastForward", 0, empty, 0, empty, empty, empty], + [1, 170, "MediaRewind", 0, empty, 0, empty, empty, empty], + [1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", empty, empty], + [1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", empty, empty], + [1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", empty, empty], + [1, 174, "Eject", 0, empty, 0, empty, empty, empty], + [1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", empty, empty], + [1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", empty, empty], + [1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", empty, empty], + [1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", empty, empty], + [1, 179, "LaunchApp1", 0, empty, 0, "VK_MEDIA_LAUNCH_APP1", empty, empty], + [1, 180, "SelectTask", 0, empty, 0, empty, empty, empty], + [1, 181, "LaunchScreenSaver", 0, empty, 0, empty, empty, empty], + [1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", empty, empty], + [1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", empty, empty], + [1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", empty, empty], + [1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", empty, empty], + [1, 186, "BrowserStop", 0, empty, 0, "VK_BROWSER_STOP", empty, empty], + [1, 187, "BrowserRefresh", 0, empty, 0, "VK_BROWSER_REFRESH", empty, empty], + [1, 188, "BrowserFavorites", 0, empty, 0, "VK_BROWSER_FAVORITES", empty, empty], + [1, 189, "ZoomToggle", 0, empty, 0, empty, empty, empty], + [1, 190, "MailReply", 0, empty, 0, empty, empty, empty], + [1, 191, "MailForward", 0, empty, 0, empty, empty, empty], + [1, 192, "MailSend", 0, empty, 0, empty, empty, empty], + // See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html + // If an Input Method Editor is processing key input and the event is keydown, return 229. + [1, 0, empty, 114, "KeyInComposition", 229, empty, empty, empty], + [1, 0, empty, 116, "ABNT_C2", 194, "VK_ABNT_C2", empty, empty], + [1, 0, empty, 96, "OEM_8", 223, "VK_OEM_8", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_KANA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HANGUL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_JUNJA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_FINAL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HANJA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_KANJI", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_CONVERT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_NONCONVERT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ACCEPT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_MODECHANGE", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_SELECT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PRINT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EXECUTE", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_SNAPSHOT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HELP", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_APPS", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PROCESSKEY", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PACKET", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_DBE_SBCSCHAR", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_DBE_DBCSCHAR", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ATTN", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_CRSEL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EXSEL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EREOF", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PLAY", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ZOOM", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_NONAME", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PA1", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_OEM_CLEAR", empty, empty] + ]; + 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 + /* KeyCode.Enter */ + ] = 46; + })(); + var KeyCodeUtils; + (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 = {})); + function KeyChord(firstPart, secondPart) { + const chordPart = (secondPart & 65535) << 16 >>> 0; + return (firstPart | chordPart) >>> 0; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/selection.js + var Selection = class _Selection extends Range { + constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { + super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn); + this.selectionStartLineNumber = selectionStartLineNumber; + this.selectionStartColumn = selectionStartColumn; + this.positionLineNumber = positionLineNumber; + this.positionColumn = positionColumn; + } + /** + * Transform to a human-readable representation. + */ + toString() { + return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; + } + /** + * Test if equals other selection. + */ + equalsSelection(other) { + return _Selection.selectionsEqual(this, other); + } + /** + * Test if the two selections are equal. + */ + static selectionsEqual(a, b) { + return a.selectionStartLineNumber === b.selectionStartLineNumber && a.selectionStartColumn === b.selectionStartColumn && a.positionLineNumber === b.positionLineNumber && a.positionColumn === b.positionColumn; + } + /** + * Get directions (LTR or RTL). + */ + getDirection() { + if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { + return 0; + } + return 1; + } + /** + * Create a new selection with a different `positionLineNumber` and `positionColumn`. + */ + 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); + } + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + getPosition() { + return new Position(this.positionLineNumber, this.positionColumn); + } + /** + * Get the position at the start of the selection. + */ + getSelectionStart() { + return new Position(this.selectionStartLineNumber, this.selectionStartColumn); + } + /** + * Create a new selection with a different `selectionStartLineNumber` and `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); + } + // ---- + /** + * Create a `Selection` from one or two positions + */ + static fromPositions(start, end = start) { + return new _Selection(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** + * Creates a `Selection` from a range, given a direction. + */ + static fromRange(range, direction) { + if (direction === 0) { + return new _Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); + } else { + return new _Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); + } + } + /** + * Create a `Selection` from an `ISelection`. + */ + static liftSelection(sel) { + return new _Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); + } + /** + * `a` equals `b`. + */ + 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 < len; i++) { + if (!this.selectionsEqual(a[i], b[i])) { + return false; + } + } + return true; + } + /** + * Test if `obj` is an `ISelection`. + */ + static isISelection(obj) { + return obj && typeof obj.selectionStartLineNumber === "number" && typeof obj.selectionStartColumn === "number" && typeof obj.positionLineNumber === "number" && typeof obj.positionColumn === "number"; + } + /** + * Create with a direction. + */ + static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) { + if (direction === 0) { + return new _Selection(startLineNumber, startColumn, endLineNumber, endColumn); + } + return new _Selection(endLineNumber, endColumn, startLineNumber, startColumn); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/codicons.js + var _codiconFontCharacters = /* @__PURE__ */ Object.create(null); + function register(id2, fontCharacter) { + if (isString(fontCharacter)) { + const val = _codiconFontCharacters[fontCharacter]; + if (val === void 0) { + throw new Error(`${id2} references an unknown codicon: ${fontCharacter}`); + } + fontCharacter = val; + } + _codiconFontCharacters[id2] = fontCharacter; + return { id: id2 }; + } + var Codicon = { + // built-in icons, with image name + add: register("add", 6e4), + plus: register("plus", 6e4), + gistNew: register("gist-new", 6e4), + repoCreate: register("repo-create", 6e4), + lightbulb: register("lightbulb", 60001), + lightBulb: register("light-bulb", 60001), + repo: register("repo", 60002), + repoDelete: register("repo-delete", 60002), + gistFork: register("gist-fork", 60003), + repoForked: register("repo-forked", 60003), + gitPullRequest: register("git-pull-request", 60004), + gitPullRequestAbandoned: register("git-pull-request-abandoned", 60004), + recordKeys: register("record-keys", 60005), + keyboard: register("keyboard", 60005), + tag: register("tag", 60006), + tagAdd: register("tag-add", 60006), + tagRemove: register("tag-remove", 60006), + gitPullRequestLabel: register("git-pull-request-label", 60006), + person: register("person", 60007), + personFollow: register("person-follow", 60007), + personOutline: register("person-outline", 60007), + personFilled: register("person-filled", 60007), + gitBranch: register("git-branch", 60008), + gitBranchCreate: register("git-branch-create", 60008), + gitBranchDelete: register("git-branch-delete", 60008), + sourceControl: register("source-control", 60008), + mirror: register("mirror", 60009), + mirrorPublic: register("mirror-public", 60009), + star: register("star", 60010), + starAdd: register("star-add", 60010), + starDelete: register("star-delete", 60010), + starEmpty: register("star-empty", 60010), + comment: register("comment", 60011), + commentAdd: register("comment-add", 60011), + alert: register("alert", 60012), + warning: register("warning", 60012), + search: register("search", 60013), + searchSave: register("search-save", 60013), + logOut: register("log-out", 60014), + signOut: register("sign-out", 60014), + logIn: register("log-in", 60015), + signIn: register("sign-in", 60015), + eye: register("eye", 60016), + eyeUnwatch: register("eye-unwatch", 60016), + eyeWatch: register("eye-watch", 60016), + circleFilled: register("circle-filled", 60017), + primitiveDot: register("primitive-dot", 60017), + closeDirty: register("close-dirty", 60017), + debugBreakpoint: register("debug-breakpoint", 60017), + debugBreakpointDisabled: register("debug-breakpoint-disabled", 60017), + debugHint: register("debug-hint", 60017), + primitiveSquare: register("primitive-square", 60018), + edit: register("edit", 60019), + pencil: register("pencil", 60019), + info: register("info", 60020), + issueOpened: register("issue-opened", 60020), + gistPrivate: register("gist-private", 60021), + gitForkPrivate: register("git-fork-private", 60021), + lock: register("lock", 60021), + mirrorPrivate: register("mirror-private", 60021), + close: register("close", 60022), + removeClose: register("remove-close", 60022), + x: register("x", 60022), + repoSync: register("repo-sync", 60023), + sync: register("sync", 60023), + clone: register("clone", 60024), + desktopDownload: register("desktop-download", 60024), + beaker: register("beaker", 60025), + microscope: register("microscope", 60025), + vm: register("vm", 60026), + deviceDesktop: register("device-desktop", 60026), + file: register("file", 60027), + fileText: register("file-text", 60027), + more: register("more", 60028), + ellipsis: register("ellipsis", 60028), + kebabHorizontal: register("kebab-horizontal", 60028), + mailReply: register("mail-reply", 60029), + reply: register("reply", 60029), + organization: register("organization", 60030), + organizationFilled: register("organization-filled", 60030), + organizationOutline: register("organization-outline", 60030), + newFile: register("new-file", 60031), + fileAdd: register("file-add", 60031), + newFolder: register("new-folder", 60032), + fileDirectoryCreate: register("file-directory-create", 60032), + trash: register("trash", 60033), + trashcan: register("trashcan", 60033), + history: register("history", 60034), + clock: register("clock", 60034), + folder: register("folder", 60035), + fileDirectory: register("file-directory", 60035), + symbolFolder: register("symbol-folder", 60035), + logoGithub: register("logo-github", 60036), + markGithub: register("mark-github", 60036), + github: register("github", 60036), + terminal: register("terminal", 60037), + console: register("console", 60037), + repl: register("repl", 60037), + zap: register("zap", 60038), + symbolEvent: register("symbol-event", 60038), + error: register("error", 60039), + stop: register("stop", 60039), + variable: register("variable", 60040), + symbolVariable: register("symbol-variable", 60040), + array: register("array", 60042), + symbolArray: register("symbol-array", 60042), + symbolModule: register("symbol-module", 60043), + symbolPackage: register("symbol-package", 60043), + symbolNamespace: register("symbol-namespace", 60043), + symbolObject: register("symbol-object", 60043), + symbolMethod: register("symbol-method", 60044), + symbolFunction: register("symbol-function", 60044), + symbolConstructor: register("symbol-constructor", 60044), + symbolBoolean: register("symbol-boolean", 60047), + symbolNull: register("symbol-null", 60047), + symbolNumeric: register("symbol-numeric", 60048), + symbolNumber: register("symbol-number", 60048), + symbolStructure: register("symbol-structure", 60049), + symbolStruct: register("symbol-struct", 60049), + symbolParameter: register("symbol-parameter", 60050), + symbolTypeParameter: register("symbol-type-parameter", 60050), + symbolKey: register("symbol-key", 60051), + symbolText: register("symbol-text", 60051), + symbolReference: register("symbol-reference", 60052), + goToFile: register("go-to-file", 60052), + symbolEnum: register("symbol-enum", 60053), + symbolValue: register("symbol-value", 60053), + symbolRuler: register("symbol-ruler", 60054), + symbolUnit: register("symbol-unit", 60054), + activateBreakpoints: register("activate-breakpoints", 60055), + archive: register("archive", 60056), + arrowBoth: register("arrow-both", 60057), + arrowDown: register("arrow-down", 60058), + arrowLeft: register("arrow-left", 60059), + arrowRight: register("arrow-right", 60060), + arrowSmallDown: register("arrow-small-down", 60061), + arrowSmallLeft: register("arrow-small-left", 60062), + arrowSmallRight: register("arrow-small-right", 60063), + arrowSmallUp: register("arrow-small-up", 60064), + arrowUp: register("arrow-up", 60065), + bell: register("bell", 60066), + bold: register("bold", 60067), + book: register("book", 60068), + bookmark: register("bookmark", 60069), + debugBreakpointConditionalUnverified: register("debug-breakpoint-conditional-unverified", 60070), + debugBreakpointConditional: register("debug-breakpoint-conditional", 60071), + debugBreakpointConditionalDisabled: register("debug-breakpoint-conditional-disabled", 60071), + debugBreakpointDataUnverified: register("debug-breakpoint-data-unverified", 60072), + debugBreakpointData: register("debug-breakpoint-data", 60073), + debugBreakpointDataDisabled: register("debug-breakpoint-data-disabled", 60073), + debugBreakpointLogUnverified: register("debug-breakpoint-log-unverified", 60074), + debugBreakpointLog: register("debug-breakpoint-log", 60075), + debugBreakpointLogDisabled: register("debug-breakpoint-log-disabled", 60075), + briefcase: register("briefcase", 60076), + broadcast: register("broadcast", 60077), + browser: register("browser", 60078), + bug: register("bug", 60079), + calendar: register("calendar", 60080), + caseSensitive: register("case-sensitive", 60081), + check: register("check", 60082), + checklist: register("checklist", 60083), + chevronDown: register("chevron-down", 60084), + dropDownButton: register("drop-down-button", 60084), + chevronLeft: register("chevron-left", 60085), + chevronRight: register("chevron-right", 60086), + chevronUp: register("chevron-up", 60087), + chromeClose: register("chrome-close", 60088), + chromeMaximize: register("chrome-maximize", 60089), + chromeMinimize: register("chrome-minimize", 60090), + chromeRestore: register("chrome-restore", 60091), + circle: register("circle", 60092), + circleOutline: register("circle-outline", 60092), + debugBreakpointUnverified: register("debug-breakpoint-unverified", 60092), + circleSlash: register("circle-slash", 60093), + circuitBoard: register("circuit-board", 60094), + clearAll: register("clear-all", 60095), + clippy: register("clippy", 60096), + closeAll: register("close-all", 60097), + cloudDownload: register("cloud-download", 60098), + cloudUpload: register("cloud-upload", 60099), + code: register("code", 60100), + collapseAll: register("collapse-all", 60101), + colorMode: register("color-mode", 60102), + commentDiscussion: register("comment-discussion", 60103), + compareChanges: register("compare-changes", 60157), + creditCard: register("credit-card", 60105), + dash: register("dash", 60108), + dashboard: register("dashboard", 60109), + database: register("database", 60110), + debugContinue: register("debug-continue", 60111), + debugDisconnect: register("debug-disconnect", 60112), + debugPause: register("debug-pause", 60113), + debugRestart: register("debug-restart", 60114), + debugStart: register("debug-start", 60115), + debugStepInto: register("debug-step-into", 60116), + debugStepOut: register("debug-step-out", 60117), + debugStepOver: register("debug-step-over", 60118), + debugStop: register("debug-stop", 60119), + debug: register("debug", 60120), + deviceCameraVideo: register("device-camera-video", 60121), + deviceCamera: register("device-camera", 60122), + deviceMobile: register("device-mobile", 60123), + diffAdded: register("diff-added", 60124), + diffIgnored: register("diff-ignored", 60125), + diffModified: register("diff-modified", 60126), + diffRemoved: register("diff-removed", 60127), + diffRenamed: register("diff-renamed", 60128), + diff: register("diff", 60129), + discard: register("discard", 60130), + editorLayout: register("editor-layout", 60131), + emptyWindow: register("empty-window", 60132), + exclude: register("exclude", 60133), + extensions: register("extensions", 60134), + eyeClosed: register("eye-closed", 60135), + fileBinary: register("file-binary", 60136), + fileCode: register("file-code", 60137), + fileMedia: register("file-media", 60138), + filePdf: register("file-pdf", 60139), + fileSubmodule: register("file-submodule", 60140), + fileSymlinkDirectory: register("file-symlink-directory", 60141), + fileSymlinkFile: register("file-symlink-file", 60142), + fileZip: register("file-zip", 60143), + files: register("files", 60144), + filter: register("filter", 60145), + flame: register("flame", 60146), + foldDown: register("fold-down", 60147), + foldUp: register("fold-up", 60148), + fold: register("fold", 60149), + folderActive: register("folder-active", 60150), + folderOpened: register("folder-opened", 60151), + gear: register("gear", 60152), + gift: register("gift", 60153), + gistSecret: register("gist-secret", 60154), + gist: register("gist", 60155), + gitCommit: register("git-commit", 60156), + gitCompare: register("git-compare", 60157), + gitMerge: register("git-merge", 60158), + githubAction: register("github-action", 60159), + githubAlt: register("github-alt", 60160), + globe: register("globe", 60161), + grabber: register("grabber", 60162), + graph: register("graph", 60163), + gripper: register("gripper", 60164), + heart: register("heart", 60165), + home: register("home", 60166), + horizontalRule: register("horizontal-rule", 60167), + hubot: register("hubot", 60168), + inbox: register("inbox", 60169), + issueClosed: register("issue-closed", 60324), + issueReopened: register("issue-reopened", 60171), + issues: register("issues", 60172), + italic: register("italic", 60173), + jersey: register("jersey", 60174), + json: register("json", 60175), + bracket: register("bracket", 60175), + kebabVertical: register("kebab-vertical", 60176), + key: register("key", 60177), + law: register("law", 60178), + lightbulbAutofix: register("lightbulb-autofix", 60179), + linkExternal: register("link-external", 60180), + link: register("link", 60181), + listOrdered: register("list-ordered", 60182), + listUnordered: register("list-unordered", 60183), + liveShare: register("live-share", 60184), + loading: register("loading", 60185), + location: register("location", 60186), + mailRead: register("mail-read", 60187), + mail: register("mail", 60188), + markdown: register("markdown", 60189), + megaphone: register("megaphone", 60190), + mention: register("mention", 60191), + milestone: register("milestone", 60192), + gitPullRequestMilestone: register("git-pull-request-milestone", 60192), + mortarBoard: register("mortar-board", 60193), + move: register("move", 60194), + multipleWindows: register("multiple-windows", 60195), + mute: register("mute", 60196), + noNewline: register("no-newline", 60197), + note: register("note", 60198), + octoface: register("octoface", 60199), + openPreview: register("open-preview", 60200), + package_: register("package", 60201), + paintcan: register("paintcan", 60202), + pin: register("pin", 60203), + play: register("play", 60204), + run: register("run", 60204), + plug: register("plug", 60205), + preserveCase: register("preserve-case", 60206), + preview: register("preview", 60207), + project: register("project", 60208), + pulse: register("pulse", 60209), + question: register("question", 60210), + quote: register("quote", 60211), + radioTower: register("radio-tower", 60212), + reactions: register("reactions", 60213), + references: register("references", 60214), + refresh: register("refresh", 60215), + regex: register("regex", 60216), + remoteExplorer: register("remote-explorer", 60217), + remote: register("remote", 60218), + remove: register("remove", 60219), + replaceAll: register("replace-all", 60220), + replace: register("replace", 60221), + repoClone: register("repo-clone", 60222), + repoForcePush: register("repo-force-push", 60223), + repoPull: register("repo-pull", 60224), + repoPush: register("repo-push", 60225), + report: register("report", 60226), + requestChanges: register("request-changes", 60227), + rocket: register("rocket", 60228), + rootFolderOpened: register("root-folder-opened", 60229), + rootFolder: register("root-folder", 60230), + rss: register("rss", 60231), + ruby: register("ruby", 60232), + saveAll: register("save-all", 60233), + saveAs: register("save-as", 60234), + save: register("save", 60235), + screenFull: register("screen-full", 60236), + screenNormal: register("screen-normal", 60237), + searchStop: register("search-stop", 60238), + server: register("server", 60240), + settingsGear: register("settings-gear", 60241), + settings: register("settings", 60242), + shield: register("shield", 60243), + smiley: register("smiley", 60244), + sortPrecedence: register("sort-precedence", 60245), + splitHorizontal: register("split-horizontal", 60246), + splitVertical: register("split-vertical", 60247), + squirrel: register("squirrel", 60248), + starFull: register("star-full", 60249), + starHalf: register("star-half", 60250), + symbolClass: register("symbol-class", 60251), + symbolColor: register("symbol-color", 60252), + symbolCustomColor: register("symbol-customcolor", 60252), + symbolConstant: register("symbol-constant", 60253), + symbolEnumMember: register("symbol-enum-member", 60254), + symbolField: register("symbol-field", 60255), + symbolFile: register("symbol-file", 60256), + symbolInterface: register("symbol-interface", 60257), + symbolKeyword: register("symbol-keyword", 60258), + symbolMisc: register("symbol-misc", 60259), + symbolOperator: register("symbol-operator", 60260), + symbolProperty: register("symbol-property", 60261), + wrench: register("wrench", 60261), + wrenchSubaction: register("wrench-subaction", 60261), + symbolSnippet: register("symbol-snippet", 60262), + tasklist: register("tasklist", 60263), + telescope: register("telescope", 60264), + textSize: register("text-size", 60265), + threeBars: register("three-bars", 60266), + thumbsdown: register("thumbsdown", 60267), + thumbsup: register("thumbsup", 60268), + tools: register("tools", 60269), + triangleDown: register("triangle-down", 60270), + triangleLeft: register("triangle-left", 60271), + triangleRight: register("triangle-right", 60272), + triangleUp: register("triangle-up", 60273), + twitter: register("twitter", 60274), + unfold: register("unfold", 60275), + unlock: register("unlock", 60276), + unmute: register("unmute", 60277), + unverified: register("unverified", 60278), + verified: register("verified", 60279), + versions: register("versions", 60280), + vmActive: register("vm-active", 60281), + vmOutline: register("vm-outline", 60282), + vmRunning: register("vm-running", 60283), + watch: register("watch", 60284), + whitespace: register("whitespace", 60285), + wholeWord: register("whole-word", 60286), + window: register("window", 60287), + wordWrap: register("word-wrap", 60288), + zoomIn: register("zoom-in", 60289), + zoomOut: register("zoom-out", 60290), + listFilter: register("list-filter", 60291), + listFlat: register("list-flat", 60292), + listSelection: register("list-selection", 60293), + selection: register("selection", 60293), + listTree: register("list-tree", 60294), + debugBreakpointFunctionUnverified: register("debug-breakpoint-function-unverified", 60295), + debugBreakpointFunction: register("debug-breakpoint-function", 60296), + debugBreakpointFunctionDisabled: register("debug-breakpoint-function-disabled", 60296), + debugStackframeActive: register("debug-stackframe-active", 60297), + circleSmallFilled: register("circle-small-filled", 60298), + debugStackframeDot: register("debug-stackframe-dot", 60298), + debugStackframe: register("debug-stackframe", 60299), + debugStackframeFocused: register("debug-stackframe-focused", 60299), + debugBreakpointUnsupported: register("debug-breakpoint-unsupported", 60300), + symbolString: register("symbol-string", 60301), + debugReverseContinue: register("debug-reverse-continue", 60302), + debugStepBack: register("debug-step-back", 60303), + debugRestartFrame: register("debug-restart-frame", 60304), + callIncoming: register("call-incoming", 60306), + callOutgoing: register("call-outgoing", 60307), + menu: register("menu", 60308), + expandAll: register("expand-all", 60309), + feedback: register("feedback", 60310), + gitPullRequestReviewer: register("git-pull-request-reviewer", 60310), + groupByRefType: register("group-by-ref-type", 60311), + ungroupByRefType: register("ungroup-by-ref-type", 60312), + account: register("account", 60313), + gitPullRequestAssignee: register("git-pull-request-assignee", 60313), + bellDot: register("bell-dot", 60314), + debugConsole: register("debug-console", 60315), + library: register("library", 60316), + output: register("output", 60317), + runAll: register("run-all", 60318), + syncIgnored: register("sync-ignored", 60319), + pinned: register("pinned", 60320), + githubInverted: register("github-inverted", 60321), + debugAlt: register("debug-alt", 60305), + serverProcess: register("server-process", 60322), + serverEnvironment: register("server-environment", 60323), + pass: register("pass", 60324), + stopCircle: register("stop-circle", 60325), + playCircle: register("play-circle", 60326), + record: register("record", 60327), + debugAltSmall: register("debug-alt-small", 60328), + vmConnect: register("vm-connect", 60329), + cloud: register("cloud", 60330), + merge: register("merge", 60331), + exportIcon: register("export", 60332), + graphLeft: register("graph-left", 60333), + magnet: register("magnet", 60334), + notebook: register("notebook", 60335), + redo: register("redo", 60336), + checkAll: register("check-all", 60337), + pinnedDirty: register("pinned-dirty", 60338), + passFilled: register("pass-filled", 60339), + circleLargeFilled: register("circle-large-filled", 60340), + circleLarge: register("circle-large", 60341), + circleLargeOutline: register("circle-large-outline", 60341), + combine: register("combine", 60342), + gather: register("gather", 60342), + table: register("table", 60343), + variableGroup: register("variable-group", 60344), + typeHierarchy: register("type-hierarchy", 60345), + typeHierarchySub: register("type-hierarchy-sub", 60346), + typeHierarchySuper: register("type-hierarchy-super", 60347), + gitPullRequestCreate: register("git-pull-request-create", 60348), + runAbove: register("run-above", 60349), + runBelow: register("run-below", 60350), + notebookTemplate: register("notebook-template", 60351), + debugRerun: register("debug-rerun", 60352), + workspaceTrusted: register("workspace-trusted", 60353), + workspaceUntrusted: register("workspace-untrusted", 60354), + workspaceUnspecified: register("workspace-unspecified", 60355), + terminalCmd: register("terminal-cmd", 60356), + terminalDebian: register("terminal-debian", 60357), + terminalLinux: register("terminal-linux", 60358), + terminalPowershell: register("terminal-powershell", 60359), + terminalTmux: register("terminal-tmux", 60360), + terminalUbuntu: register("terminal-ubuntu", 60361), + terminalBash: register("terminal-bash", 60362), + arrowSwap: register("arrow-swap", 60363), + copy: register("copy", 60364), + personAdd: register("person-add", 60365), + filterFilled: register("filter-filled", 60366), + wand: register("wand", 60367), + debugLineByLine: register("debug-line-by-line", 60368), + inspect: register("inspect", 60369), + layers: register("layers", 60370), + layersDot: register("layers-dot", 60371), + layersActive: register("layers-active", 60372), + compass: register("compass", 60373), + compassDot: register("compass-dot", 60374), + compassActive: register("compass-active", 60375), + azure: register("azure", 60376), + issueDraft: register("issue-draft", 60377), + gitPullRequestClosed: register("git-pull-request-closed", 60378), + gitPullRequestDraft: register("git-pull-request-draft", 60379), + debugAll: register("debug-all", 60380), + debugCoverage: register("debug-coverage", 60381), + runErrors: register("run-errors", 60382), + folderLibrary: register("folder-library", 60383), + debugContinueSmall: register("debug-continue-small", 60384), + beakerStop: register("beaker-stop", 60385), + graphLine: register("graph-line", 60386), + graphScatter: register("graph-scatter", 60387), + pieChart: register("pie-chart", 60388), + bracketDot: register("bracket-dot", 60389), + bracketError: register("bracket-error", 60390), + lockSmall: register("lock-small", 60391), + azureDevops: register("azure-devops", 60392), + verifiedFilled: register("verified-filled", 60393), + newLine: register("newline", 60394), + layout: register("layout", 60395), + layoutActivitybarLeft: register("layout-activitybar-left", 60396), + layoutActivitybarRight: register("layout-activitybar-right", 60397), + layoutPanelLeft: register("layout-panel-left", 60398), + layoutPanelCenter: register("layout-panel-center", 60399), + layoutPanelJustify: register("layout-panel-justify", 60400), + layoutPanelRight: register("layout-panel-right", 60401), + layoutPanel: register("layout-panel", 60402), + layoutSidebarLeft: register("layout-sidebar-left", 60403), + layoutSidebarRight: register("layout-sidebar-right", 60404), + layoutStatusbar: register("layout-statusbar", 60405), + layoutMenubar: register("layout-menubar", 60406), + layoutCentered: register("layout-centered", 60407), + layoutSidebarRightOff: register("layout-sidebar-right-off", 60416), + layoutPanelOff: register("layout-panel-off", 60417), + layoutSidebarLeftOff: register("layout-sidebar-left-off", 60418), + target: register("target", 60408), + indent: register("indent", 60409), + recordSmall: register("record-small", 60410), + errorSmall: register("error-small", 60411), + arrowCircleDown: register("arrow-circle-down", 60412), + arrowCircleLeft: register("arrow-circle-left", 60413), + arrowCircleRight: register("arrow-circle-right", 60414), + arrowCircleUp: register("arrow-circle-up", 60415), + heartFilled: register("heart-filled", 60420), + map: register("map", 60421), + mapFilled: register("map-filled", 60422), + circleSmall: register("circle-small", 60423), + bellSlash: register("bell-slash", 60424), + bellSlashDot: register("bell-slash-dot", 60425), + commentUnresolved: register("comment-unresolved", 60426), + gitPullRequestGoToChanges: register("git-pull-request-go-to-changes", 60427), + gitPullRequestNewChanges: register("git-pull-request-new-changes", 60428), + searchFuzzy: register("search-fuzzy", 60429), + commentDraft: register("comment-draft", 60430), + send: register("send", 60431), + sparkle: register("sparkle", 60432), + insert: register("insert", 60433), + mic: register("mic", 60434), + // derived icons, that could become separate icons + dialogError: register("dialog-error", "error"), + dialogWarning: register("dialog-warning", "warning"), + dialogInfo: register("dialog-info", "info"), + dialogClose: register("dialog-close", "close"), + treeItemExpanded: register("tree-item-expanded", "chevron-down"), + treeFilterOnTypeOn: register("tree-filter-on-type-on", "list-filter"), + treeFilterOnTypeOff: register("tree-filter-on-type-off", "list-selection"), + treeFilterClear: register("tree-filter-clear", "close"), + treeItemLoading: register("tree-item-loading", "loading"), + menuSelection: register("menu-selection", "check"), + menuSubmenu: register("menu-submenu", "chevron-right"), + menuBarMore: register("menubar-more", "more"), + scrollbarButtonLeft: register("scrollbar-button-left", "triangle-left"), + scrollbarButtonRight: register("scrollbar-button-right", "triangle-right"), + scrollbarButtonUp: register("scrollbar-button-up", "triangle-up"), + scrollbarButtonDown: register("scrollbar-button-down", "triangle-down"), + toolBarMore: register("toolbar-more", "more"), + quickInputBack: register("quick-input-back", "arrow-left") + }; + + // node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js + var __awaiter = 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()); + }); + }; + var TokenizationRegistry = class { + constructor() { + this._tokenizationSupports = /* @__PURE__ */ new Map(); + this._factories = /* @__PURE__ */ new Map(); + this._onDidChange = new Emitter(); + this.onDidChange = this._onDidChange.event; + this._colorMap = null; + } + handleChange(languageIds) { + this._onDidChange.fire({ + changedLanguages: languageIds, + changedColorMap: false + }); + } + register(languageId, support) { + this._tokenizationSupports.set(languageId, support); + this.handleChange([languageId]); + return toDisposable(() => { + 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 _a3; + (_a3 = this._factories.get(languageId)) === null || _a3 === void 0 ? void 0 : _a3.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 + /* ColorId.DefaultBackground */ + ]; + } + return null; + } + }; + var TokenizationSupportFactoryData = class extends Disposable { + get isResolved() { + return this._isResolved; + } + constructor(_registry, _languageId, _factory) { + super(); + this._registry = _registry; + 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)); + } + }); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/languages.js + var Token = class { + constructor(offset, type2, language2) { + this.offset = offset; + this.type = type2; + this.language = language2; + this._tokenBrand = void 0; + } + toString() { + return "(" + this.offset + ", " + this.type + ")"; + } + }; + var CompletionItemKinds; + (function(CompletionItemKinds2) { + const byKind = /* @__PURE__ */ 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 = /* @__PURE__ */ new Map(); + data.set( + "method", + 0 + /* CompletionItemKind.Method */ + ); + data.set( + "function", + 1 + /* CompletionItemKind.Function */ + ); + data.set( + "constructor", + 2 + /* CompletionItemKind.Constructor */ + ); + data.set( + "field", + 3 + /* CompletionItemKind.Field */ + ); + data.set( + "variable", + 4 + /* CompletionItemKind.Variable */ + ); + data.set( + "class", + 5 + /* CompletionItemKind.Class */ + ); + data.set( + "struct", + 6 + /* CompletionItemKind.Struct */ + ); + data.set( + "interface", + 7 + /* CompletionItemKind.Interface */ + ); + data.set( + "module", + 8 + /* CompletionItemKind.Module */ + ); + data.set( + "property", + 9 + /* CompletionItemKind.Property */ + ); + data.set( + "event", + 10 + /* CompletionItemKind.Event */ + ); + data.set( + "operator", + 11 + /* CompletionItemKind.Operator */ + ); + data.set( + "unit", + 12 + /* CompletionItemKind.Unit */ + ); + data.set( + "value", + 13 + /* CompletionItemKind.Value */ + ); + data.set( + "constant", + 14 + /* CompletionItemKind.Constant */ + ); + data.set( + "enum", + 15 + /* CompletionItemKind.Enum */ + ); + data.set( + "enum-member", + 16 + /* CompletionItemKind.EnumMember */ + ); + data.set( + "enumMember", + 16 + /* CompletionItemKind.EnumMember */ + ); + data.set( + "keyword", + 17 + /* CompletionItemKind.Keyword */ + ); + data.set( + "snippet", + 27 + /* CompletionItemKind.Snippet */ + ); + data.set( + "text", + 18 + /* CompletionItemKind.Text */ + ); + data.set( + "color", + 19 + /* CompletionItemKind.Color */ + ); + data.set( + "file", + 20 + /* CompletionItemKind.File */ + ); + data.set( + "reference", + 21 + /* CompletionItemKind.Reference */ + ); + data.set( + "customcolor", + 22 + /* CompletionItemKind.Customcolor */ + ); + data.set( + "folder", + 23 + /* CompletionItemKind.Folder */ + ); + data.set( + "type-parameter", + 24 + /* CompletionItemKind.TypeParameter */ + ); + data.set( + "typeParameter", + 24 + /* CompletionItemKind.TypeParameter */ + ); + data.set( + "account", + 25 + /* CompletionItemKind.User */ + ); + data.set( + "issue", + 26 + /* CompletionItemKind.Issue */ + ); + function fromString(value, strict) { + let res = data.get(value); + if (typeof res === "undefined" && !strict) { + res = 9; + } + return res; + } + CompletionItemKinds2.fromString = fromString; + })(CompletionItemKinds || (CompletionItemKinds = {})); + var InlineCompletionTriggerKind; + (function(InlineCompletionTriggerKind3) { + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; + })(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); + var SignatureHelpTriggerKind; + (function(SignatureHelpTriggerKind3) { + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; + })(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); + var DocumentHighlightKind; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4[DocumentHighlightKind4["Text"] = 0] = "Text"; + DocumentHighlightKind4[DocumentHighlightKind4["Read"] = 1] = "Read"; + DocumentHighlightKind4[DocumentHighlightKind4["Write"] = 2] = "Write"; + })(DocumentHighlightKind || (DocumentHighlightKind = {})); + var symbolKindNames = { + [ + 17 + /* SymbolKind.Array */ + ]: localize("Array", "array"), + [ + 16 + /* SymbolKind.Boolean */ + ]: localize("Boolean", "boolean"), + [ + 4 + /* SymbolKind.Class */ + ]: localize("Class", "class"), + [ + 13 + /* SymbolKind.Constant */ + ]: localize("Constant", "constant"), + [ + 8 + /* SymbolKind.Constructor */ + ]: localize("Constructor", "constructor"), + [ + 9 + /* SymbolKind.Enum */ + ]: localize("Enum", "enumeration"), + [ + 21 + /* SymbolKind.EnumMember */ + ]: localize("EnumMember", "enumeration member"), + [ + 23 + /* SymbolKind.Event */ + ]: localize("Event", "event"), + [ + 7 + /* SymbolKind.Field */ + ]: localize("Field", "field"), + [ + 0 + /* SymbolKind.File */ + ]: localize("File", "file"), + [ + 11 + /* SymbolKind.Function */ + ]: localize("Function", "function"), + [ + 10 + /* SymbolKind.Interface */ + ]: localize("Interface", "interface"), + [ + 19 + /* SymbolKind.Key */ + ]: localize("Key", "key"), + [ + 5 + /* SymbolKind.Method */ + ]: localize("Method", "method"), + [ + 1 + /* SymbolKind.Module */ + ]: localize("Module", "module"), + [ + 2 + /* SymbolKind.Namespace */ + ]: localize("Namespace", "namespace"), + [ + 20 + /* SymbolKind.Null */ + ]: localize("Null", "null"), + [ + 15 + /* SymbolKind.Number */ + ]: localize("Number", "number"), + [ + 18 + /* SymbolKind.Object */ + ]: localize("Object", "object"), + [ + 24 + /* SymbolKind.Operator */ + ]: localize("Operator", "operator"), + [ + 3 + /* SymbolKind.Package */ + ]: localize("Package", "package"), + [ + 6 + /* SymbolKind.Property */ + ]: localize("Property", "property"), + [ + 14 + /* SymbolKind.String */ + ]: localize("String", "string"), + [ + 22 + /* SymbolKind.Struct */ + ]: localize("Struct", "struct"), + [ + 25 + /* SymbolKind.TypeParameter */ + ]: localize("TypeParameter", "type parameter"), + [ + 12 + /* SymbolKind.Variable */ + ]: localize("Variable", "variable") + }; + var SymbolKinds; + (function(SymbolKinds2) { + const byKind = /* @__PURE__ */ 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 = {})); + var FoldingRangeKind = class _FoldingRangeKind { + /** + * Returns a {@link FoldingRangeKind} for the given value. + * + * @param value of the kind. + */ + static fromValue(value) { + switch (value) { + case "comment": + return _FoldingRangeKind.Comment; + case "imports": + return _FoldingRangeKind.Imports; + case "region": + return _FoldingRangeKind.Region; + } + return new _FoldingRangeKind(value); + } + /** + * Creates a new {@link FoldingRangeKind}. + * + * @param value of the kind. + */ + constructor(value) { + this.value = value; + } + }; + FoldingRangeKind.Comment = new FoldingRangeKind("comment"); + FoldingRangeKind.Imports = new FoldingRangeKind("imports"); + FoldingRangeKind.Region = new FoldingRangeKind("region"); + var Command; + (function(Command3) { + function is(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + return typeof obj.id === "string" && typeof obj.title === "string"; + } + Command3.is = is; + })(Command || (Command = {})); + var CommentThreadCollapsibleState; + (function(CommentThreadCollapsibleState2) { + CommentThreadCollapsibleState2[CommentThreadCollapsibleState2["Collapsed"] = 0] = "Collapsed"; + CommentThreadCollapsibleState2[CommentThreadCollapsibleState2["Expanded"] = 1] = "Expanded"; + })(CommentThreadCollapsibleState || (CommentThreadCollapsibleState = {})); + var CommentThreadState; + (function(CommentThreadState2) { + CommentThreadState2[CommentThreadState2["Unresolved"] = 0] = "Unresolved"; + CommentThreadState2[CommentThreadState2["Resolved"] = 1] = "Resolved"; + })(CommentThreadState || (CommentThreadState = {})); + var CommentMode; + (function(CommentMode2) { + CommentMode2[CommentMode2["Editing"] = 0] = "Editing"; + CommentMode2[CommentMode2["Preview"] = 1] = "Preview"; + })(CommentMode || (CommentMode = {})); + var CommentState; + (function(CommentState2) { + CommentState2[CommentState2["Published"] = 0] = "Published"; + CommentState2[CommentState2["Draft"] = 1] = "Draft"; + })(CommentState || (CommentState = {})); + var InlayHintKind; + (function(InlayHintKind4) { + InlayHintKind4[InlayHintKind4["Type"] = 1] = "Type"; + InlayHintKind4[InlayHintKind4["Parameter"] = 2] = "Parameter"; + })(InlayHintKind || (InlayHintKind = {})); + var TokenizationRegistry2 = new TokenizationRegistry(); + var ExternalUriOpenerPriority; + (function(ExternalUriOpenerPriority2) { + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["None"] = 0] = "None"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Option"] = 1] = "Option"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Default"] = 2] = "Default"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Preferred"] = 3] = "Preferred"; + })(ExternalUriOpenerPriority || (ExternalUriOpenerPriority = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js + var AccessibilitySupport; + (function(AccessibilitySupport2) { + AccessibilitySupport2[AccessibilitySupport2["Unknown"] = 0] = "Unknown"; + AccessibilitySupport2[AccessibilitySupport2["Disabled"] = 1] = "Disabled"; + AccessibilitySupport2[AccessibilitySupport2["Enabled"] = 2] = "Enabled"; + })(AccessibilitySupport || (AccessibilitySupport = {})); + var CodeActionTriggerType; + (function(CodeActionTriggerType2) { + CodeActionTriggerType2[CodeActionTriggerType2["Invoke"] = 1] = "Invoke"; + CodeActionTriggerType2[CodeActionTriggerType2["Auto"] = 2] = "Auto"; + })(CodeActionTriggerType || (CodeActionTriggerType = {})); + var CompletionItemInsertTextRule; + (function(CompletionItemInsertTextRule2) { + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["None"] = 0] = "None"; + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"] = 1] = "KeepWhitespace"; + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"] = 4] = "InsertAsSnippet"; + })(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {})); + var CompletionItemKind; + (function(CompletionItemKind4) { + CompletionItemKind4[CompletionItemKind4["Method"] = 0] = "Method"; + CompletionItemKind4[CompletionItemKind4["Function"] = 1] = "Function"; + CompletionItemKind4[CompletionItemKind4["Constructor"] = 2] = "Constructor"; + CompletionItemKind4[CompletionItemKind4["Field"] = 3] = "Field"; + CompletionItemKind4[CompletionItemKind4["Variable"] = 4] = "Variable"; + CompletionItemKind4[CompletionItemKind4["Class"] = 5] = "Class"; + CompletionItemKind4[CompletionItemKind4["Struct"] = 6] = "Struct"; + CompletionItemKind4[CompletionItemKind4["Interface"] = 7] = "Interface"; + CompletionItemKind4[CompletionItemKind4["Module"] = 8] = "Module"; + CompletionItemKind4[CompletionItemKind4["Property"] = 9] = "Property"; + CompletionItemKind4[CompletionItemKind4["Event"] = 10] = "Event"; + CompletionItemKind4[CompletionItemKind4["Operator"] = 11] = "Operator"; + CompletionItemKind4[CompletionItemKind4["Unit"] = 12] = "Unit"; + CompletionItemKind4[CompletionItemKind4["Value"] = 13] = "Value"; + CompletionItemKind4[CompletionItemKind4["Constant"] = 14] = "Constant"; + CompletionItemKind4[CompletionItemKind4["Enum"] = 15] = "Enum"; + CompletionItemKind4[CompletionItemKind4["EnumMember"] = 16] = "EnumMember"; + CompletionItemKind4[CompletionItemKind4["Keyword"] = 17] = "Keyword"; + CompletionItemKind4[CompletionItemKind4["Text"] = 18] = "Text"; + CompletionItemKind4[CompletionItemKind4["Color"] = 19] = "Color"; + CompletionItemKind4[CompletionItemKind4["File"] = 20] = "File"; + CompletionItemKind4[CompletionItemKind4["Reference"] = 21] = "Reference"; + CompletionItemKind4[CompletionItemKind4["Customcolor"] = 22] = "Customcolor"; + CompletionItemKind4[CompletionItemKind4["Folder"] = 23] = "Folder"; + CompletionItemKind4[CompletionItemKind4["TypeParameter"] = 24] = "TypeParameter"; + CompletionItemKind4[CompletionItemKind4["User"] = 25] = "User"; + CompletionItemKind4[CompletionItemKind4["Issue"] = 26] = "Issue"; + CompletionItemKind4[CompletionItemKind4["Snippet"] = 27] = "Snippet"; + })(CompletionItemKind || (CompletionItemKind = {})); + var CompletionItemTag; + (function(CompletionItemTag3) { + CompletionItemTag3[CompletionItemTag3["Deprecated"] = 1] = "Deprecated"; + })(CompletionItemTag || (CompletionItemTag = {})); + var CompletionTriggerKind; + (function(CompletionTriggerKind2) { + CompletionTriggerKind2[CompletionTriggerKind2["Invoke"] = 0] = "Invoke"; + CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 1] = "TriggerCharacter"; + CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions"; + })(CompletionTriggerKind || (CompletionTriggerKind = {})); + var ContentWidgetPositionPreference; + (function(ContentWidgetPositionPreference2) { + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"] = 0] = "EXACT"; + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"] = 1] = "ABOVE"; + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"] = 2] = "BELOW"; + })(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {})); + var CursorChangeReason; + (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 = {})); + var DefaultEndOfLine; + (function(DefaultEndOfLine2) { + DefaultEndOfLine2[DefaultEndOfLine2["LF"] = 1] = "LF"; + DefaultEndOfLine2[DefaultEndOfLine2["CRLF"] = 2] = "CRLF"; + })(DefaultEndOfLine || (DefaultEndOfLine = {})); + var DocumentHighlightKind2; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4[DocumentHighlightKind4["Text"] = 0] = "Text"; + DocumentHighlightKind4[DocumentHighlightKind4["Read"] = 1] = "Read"; + DocumentHighlightKind4[DocumentHighlightKind4["Write"] = 2] = "Write"; + })(DocumentHighlightKind2 || (DocumentHighlightKind2 = {})); + var EditorAutoIndentStrategy; + (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 = {})); + var EditorOption; + (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 = {})); + var EndOfLinePreference; + (function(EndOfLinePreference2) { + EndOfLinePreference2[EndOfLinePreference2["TextDefined"] = 0] = "TextDefined"; + EndOfLinePreference2[EndOfLinePreference2["LF"] = 1] = "LF"; + EndOfLinePreference2[EndOfLinePreference2["CRLF"] = 2] = "CRLF"; + })(EndOfLinePreference || (EndOfLinePreference = {})); + var EndOfLineSequence; + (function(EndOfLineSequence2) { + EndOfLineSequence2[EndOfLineSequence2["LF"] = 0] = "LF"; + EndOfLineSequence2[EndOfLineSequence2["CRLF"] = 1] = "CRLF"; + })(EndOfLineSequence || (EndOfLineSequence = {})); + var GlyphMarginLane; + (function(GlyphMarginLane3) { + GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; + GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right"; + })(GlyphMarginLane || (GlyphMarginLane = {})); + var IndentAction; + (function(IndentAction2) { + IndentAction2[IndentAction2["None"] = 0] = "None"; + IndentAction2[IndentAction2["Indent"] = 1] = "Indent"; + IndentAction2[IndentAction2["IndentOutdent"] = 2] = "IndentOutdent"; + IndentAction2[IndentAction2["Outdent"] = 3] = "Outdent"; + })(IndentAction || (IndentAction = {})); + var InjectedTextCursorStops; + (function(InjectedTextCursorStops3) { + InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; + InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; + })(InjectedTextCursorStops || (InjectedTextCursorStops = {})); + var InlayHintKind2; + (function(InlayHintKind4) { + InlayHintKind4[InlayHintKind4["Type"] = 1] = "Type"; + InlayHintKind4[InlayHintKind4["Parameter"] = 2] = "Parameter"; + })(InlayHintKind2 || (InlayHintKind2 = {})); + var InlineCompletionTriggerKind2; + (function(InlineCompletionTriggerKind3) { + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; + })(InlineCompletionTriggerKind2 || (InlineCompletionTriggerKind2 = {})); + var KeyCode; + (function(KeyCode2) { + KeyCode2[KeyCode2["DependsOnKbLayout"] = -1] = "DependsOnKbLayout"; + KeyCode2[KeyCode2["Unknown"] = 0] = "Unknown"; + KeyCode2[KeyCode2["Backspace"] = 1] = "Backspace"; + KeyCode2[KeyCode2["Tab"] = 2] = "Tab"; + KeyCode2[KeyCode2["Enter"] = 3] = "Enter"; + KeyCode2[KeyCode2["Shift"] = 4] = "Shift"; + KeyCode2[KeyCode2["Ctrl"] = 5] = "Ctrl"; + KeyCode2[KeyCode2["Alt"] = 6] = "Alt"; + KeyCode2[KeyCode2["PauseBreak"] = 7] = "PauseBreak"; + KeyCode2[KeyCode2["CapsLock"] = 8] = "CapsLock"; + KeyCode2[KeyCode2["Escape"] = 9] = "Escape"; + KeyCode2[KeyCode2["Space"] = 10] = "Space"; + KeyCode2[KeyCode2["PageUp"] = 11] = "PageUp"; + KeyCode2[KeyCode2["PageDown"] = 12] = "PageDown"; + KeyCode2[KeyCode2["End"] = 13] = "End"; + KeyCode2[KeyCode2["Home"] = 14] = "Home"; + KeyCode2[KeyCode2["LeftArrow"] = 15] = "LeftArrow"; + KeyCode2[KeyCode2["UpArrow"] = 16] = "UpArrow"; + KeyCode2[KeyCode2["RightArrow"] = 17] = "RightArrow"; + KeyCode2[KeyCode2["DownArrow"] = 18] = "DownArrow"; + KeyCode2[KeyCode2["Insert"] = 19] = "Insert"; + KeyCode2[KeyCode2["Delete"] = 20] = "Delete"; + KeyCode2[KeyCode2["Digit0"] = 21] = "Digit0"; + KeyCode2[KeyCode2["Digit1"] = 22] = "Digit1"; + KeyCode2[KeyCode2["Digit2"] = 23] = "Digit2"; + KeyCode2[KeyCode2["Digit3"] = 24] = "Digit3"; + KeyCode2[KeyCode2["Digit4"] = 25] = "Digit4"; + KeyCode2[KeyCode2["Digit5"] = 26] = "Digit5"; + KeyCode2[KeyCode2["Digit6"] = 27] = "Digit6"; + KeyCode2[KeyCode2["Digit7"] = 28] = "Digit7"; + KeyCode2[KeyCode2["Digit8"] = 29] = "Digit8"; + KeyCode2[KeyCode2["Digit9"] = 30] = "Digit9"; + KeyCode2[KeyCode2["KeyA"] = 31] = "KeyA"; + KeyCode2[KeyCode2["KeyB"] = 32] = "KeyB"; + KeyCode2[KeyCode2["KeyC"] = 33] = "KeyC"; + KeyCode2[KeyCode2["KeyD"] = 34] = "KeyD"; + KeyCode2[KeyCode2["KeyE"] = 35] = "KeyE"; + KeyCode2[KeyCode2["KeyF"] = 36] = "KeyF"; + KeyCode2[KeyCode2["KeyG"] = 37] = "KeyG"; + KeyCode2[KeyCode2["KeyH"] = 38] = "KeyH"; + KeyCode2[KeyCode2["KeyI"] = 39] = "KeyI"; + KeyCode2[KeyCode2["KeyJ"] = 40] = "KeyJ"; + KeyCode2[KeyCode2["KeyK"] = 41] = "KeyK"; + KeyCode2[KeyCode2["KeyL"] = 42] = "KeyL"; + KeyCode2[KeyCode2["KeyM"] = 43] = "KeyM"; + KeyCode2[KeyCode2["KeyN"] = 44] = "KeyN"; + KeyCode2[KeyCode2["KeyO"] = 45] = "KeyO"; + KeyCode2[KeyCode2["KeyP"] = 46] = "KeyP"; + KeyCode2[KeyCode2["KeyQ"] = 47] = "KeyQ"; + KeyCode2[KeyCode2["KeyR"] = 48] = "KeyR"; + KeyCode2[KeyCode2["KeyS"] = 49] = "KeyS"; + KeyCode2[KeyCode2["KeyT"] = 50] = "KeyT"; + KeyCode2[KeyCode2["KeyU"] = 51] = "KeyU"; + KeyCode2[KeyCode2["KeyV"] = 52] = "KeyV"; + KeyCode2[KeyCode2["KeyW"] = 53] = "KeyW"; + KeyCode2[KeyCode2["KeyX"] = 54] = "KeyX"; + KeyCode2[KeyCode2["KeyY"] = 55] = "KeyY"; + KeyCode2[KeyCode2["KeyZ"] = 56] = "KeyZ"; + KeyCode2[KeyCode2["Meta"] = 57] = "Meta"; + KeyCode2[KeyCode2["ContextMenu"] = 58] = "ContextMenu"; + KeyCode2[KeyCode2["F1"] = 59] = "F1"; + KeyCode2[KeyCode2["F2"] = 60] = "F2"; + KeyCode2[KeyCode2["F3"] = 61] = "F3"; + KeyCode2[KeyCode2["F4"] = 62] = "F4"; + KeyCode2[KeyCode2["F5"] = 63] = "F5"; + KeyCode2[KeyCode2["F6"] = 64] = "F6"; + KeyCode2[KeyCode2["F7"] = 65] = "F7"; + KeyCode2[KeyCode2["F8"] = 66] = "F8"; + KeyCode2[KeyCode2["F9"] = 67] = "F9"; + KeyCode2[KeyCode2["F10"] = 68] = "F10"; + KeyCode2[KeyCode2["F11"] = 69] = "F11"; + KeyCode2[KeyCode2["F12"] = 70] = "F12"; + KeyCode2[KeyCode2["F13"] = 71] = "F13"; + KeyCode2[KeyCode2["F14"] = 72] = "F14"; + KeyCode2[KeyCode2["F15"] = 73] = "F15"; + KeyCode2[KeyCode2["F16"] = 74] = "F16"; + KeyCode2[KeyCode2["F17"] = 75] = "F17"; + KeyCode2[KeyCode2["F18"] = 76] = "F18"; + KeyCode2[KeyCode2["F19"] = 77] = "F19"; + KeyCode2[KeyCode2["F20"] = 78] = "F20"; + KeyCode2[KeyCode2["F21"] = 79] = "F21"; + KeyCode2[KeyCode2["F22"] = 80] = "F22"; + KeyCode2[KeyCode2["F23"] = 81] = "F23"; + KeyCode2[KeyCode2["F24"] = 82] = "F24"; + KeyCode2[KeyCode2["NumLock"] = 83] = "NumLock"; + KeyCode2[KeyCode2["ScrollLock"] = 84] = "ScrollLock"; + KeyCode2[KeyCode2["Semicolon"] = 85] = "Semicolon"; + KeyCode2[KeyCode2["Equal"] = 86] = "Equal"; + KeyCode2[KeyCode2["Comma"] = 87] = "Comma"; + KeyCode2[KeyCode2["Minus"] = 88] = "Minus"; + KeyCode2[KeyCode2["Period"] = 89] = "Period"; + KeyCode2[KeyCode2["Slash"] = 90] = "Slash"; + KeyCode2[KeyCode2["Backquote"] = 91] = "Backquote"; + KeyCode2[KeyCode2["BracketLeft"] = 92] = "BracketLeft"; + KeyCode2[KeyCode2["Backslash"] = 93] = "Backslash"; + KeyCode2[KeyCode2["BracketRight"] = 94] = "BracketRight"; + KeyCode2[KeyCode2["Quote"] = 95] = "Quote"; + KeyCode2[KeyCode2["OEM_8"] = 96] = "OEM_8"; + KeyCode2[KeyCode2["IntlBackslash"] = 97] = "IntlBackslash"; + KeyCode2[KeyCode2["Numpad0"] = 98] = "Numpad0"; + KeyCode2[KeyCode2["Numpad1"] = 99] = "Numpad1"; + KeyCode2[KeyCode2["Numpad2"] = 100] = "Numpad2"; + KeyCode2[KeyCode2["Numpad3"] = 101] = "Numpad3"; + KeyCode2[KeyCode2["Numpad4"] = 102] = "Numpad4"; + KeyCode2[KeyCode2["Numpad5"] = 103] = "Numpad5"; + KeyCode2[KeyCode2["Numpad6"] = 104] = "Numpad6"; + KeyCode2[KeyCode2["Numpad7"] = 105] = "Numpad7"; + KeyCode2[KeyCode2["Numpad8"] = 106] = "Numpad8"; + KeyCode2[KeyCode2["Numpad9"] = 107] = "Numpad9"; + KeyCode2[KeyCode2["NumpadMultiply"] = 108] = "NumpadMultiply"; + KeyCode2[KeyCode2["NumpadAdd"] = 109] = "NumpadAdd"; + KeyCode2[KeyCode2["NUMPAD_SEPARATOR"] = 110] = "NUMPAD_SEPARATOR"; + KeyCode2[KeyCode2["NumpadSubtract"] = 111] = "NumpadSubtract"; + KeyCode2[KeyCode2["NumpadDecimal"] = 112] = "NumpadDecimal"; + KeyCode2[KeyCode2["NumpadDivide"] = 113] = "NumpadDivide"; + KeyCode2[KeyCode2["KEY_IN_COMPOSITION"] = 114] = "KEY_IN_COMPOSITION"; + KeyCode2[KeyCode2["ABNT_C1"] = 115] = "ABNT_C1"; + KeyCode2[KeyCode2["ABNT_C2"] = 116] = "ABNT_C2"; + KeyCode2[KeyCode2["AudioVolumeMute"] = 117] = "AudioVolumeMute"; + KeyCode2[KeyCode2["AudioVolumeUp"] = 118] = "AudioVolumeUp"; + KeyCode2[KeyCode2["AudioVolumeDown"] = 119] = "AudioVolumeDown"; + KeyCode2[KeyCode2["BrowserSearch"] = 120] = "BrowserSearch"; + KeyCode2[KeyCode2["BrowserHome"] = 121] = "BrowserHome"; + KeyCode2[KeyCode2["BrowserBack"] = 122] = "BrowserBack"; + KeyCode2[KeyCode2["BrowserForward"] = 123] = "BrowserForward"; + KeyCode2[KeyCode2["MediaTrackNext"] = 124] = "MediaTrackNext"; + KeyCode2[KeyCode2["MediaTrackPrevious"] = 125] = "MediaTrackPrevious"; + KeyCode2[KeyCode2["MediaStop"] = 126] = "MediaStop"; + KeyCode2[KeyCode2["MediaPlayPause"] = 127] = "MediaPlayPause"; + KeyCode2[KeyCode2["LaunchMediaPlayer"] = 128] = "LaunchMediaPlayer"; + KeyCode2[KeyCode2["LaunchMail"] = 129] = "LaunchMail"; + KeyCode2[KeyCode2["LaunchApp2"] = 130] = "LaunchApp2"; + KeyCode2[KeyCode2["Clear"] = 131] = "Clear"; + KeyCode2[KeyCode2["MAX_VALUE"] = 132] = "MAX_VALUE"; + })(KeyCode || (KeyCode = {})); + var MarkerSeverity; + (function(MarkerSeverity2) { + MarkerSeverity2[MarkerSeverity2["Hint"] = 1] = "Hint"; + MarkerSeverity2[MarkerSeverity2["Info"] = 2] = "Info"; + MarkerSeverity2[MarkerSeverity2["Warning"] = 4] = "Warning"; + MarkerSeverity2[MarkerSeverity2["Error"] = 8] = "Error"; + })(MarkerSeverity || (MarkerSeverity = {})); + var MarkerTag; + (function(MarkerTag2) { + MarkerTag2[MarkerTag2["Unnecessary"] = 1] = "Unnecessary"; + MarkerTag2[MarkerTag2["Deprecated"] = 2] = "Deprecated"; + })(MarkerTag || (MarkerTag = {})); + var MinimapPosition; + (function(MinimapPosition3) { + MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; + MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; + })(MinimapPosition || (MinimapPosition = {})); + var MouseTargetType; + (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 = {})); + var OverlayWidgetPositionPreference; + (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 = {})); + var OverviewRulerLane; + (function(OverviewRulerLane3) { + OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; + OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; + OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; + OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; + })(OverviewRulerLane || (OverviewRulerLane = {})); + var PositionAffinity; + (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 = {})); + var RenderLineNumbersType; + (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 = {})); + var RenderMinimap; + (function(RenderMinimap2) { + RenderMinimap2[RenderMinimap2["None"] = 0] = "None"; + RenderMinimap2[RenderMinimap2["Text"] = 1] = "Text"; + RenderMinimap2[RenderMinimap2["Blocks"] = 2] = "Blocks"; + })(RenderMinimap || (RenderMinimap = {})); + var ScrollType; + (function(ScrollType2) { + ScrollType2[ScrollType2["Smooth"] = 0] = "Smooth"; + ScrollType2[ScrollType2["Immediate"] = 1] = "Immediate"; + })(ScrollType || (ScrollType = {})); + var ScrollbarVisibility; + (function(ScrollbarVisibility2) { + ScrollbarVisibility2[ScrollbarVisibility2["Auto"] = 1] = "Auto"; + ScrollbarVisibility2[ScrollbarVisibility2["Hidden"] = 2] = "Hidden"; + ScrollbarVisibility2[ScrollbarVisibility2["Visible"] = 3] = "Visible"; + })(ScrollbarVisibility || (ScrollbarVisibility = {})); + var SelectionDirection; + (function(SelectionDirection2) { + SelectionDirection2[SelectionDirection2["LTR"] = 0] = "LTR"; + SelectionDirection2[SelectionDirection2["RTL"] = 1] = "RTL"; + })(SelectionDirection || (SelectionDirection = {})); + var SignatureHelpTriggerKind2; + (function(SignatureHelpTriggerKind3) { + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; + })(SignatureHelpTriggerKind2 || (SignatureHelpTriggerKind2 = {})); + var SymbolKind; + (function(SymbolKind3) { + SymbolKind3[SymbolKind3["File"] = 0] = "File"; + SymbolKind3[SymbolKind3["Module"] = 1] = "Module"; + SymbolKind3[SymbolKind3["Namespace"] = 2] = "Namespace"; + SymbolKind3[SymbolKind3["Package"] = 3] = "Package"; + SymbolKind3[SymbolKind3["Class"] = 4] = "Class"; + SymbolKind3[SymbolKind3["Method"] = 5] = "Method"; + SymbolKind3[SymbolKind3["Property"] = 6] = "Property"; + SymbolKind3[SymbolKind3["Field"] = 7] = "Field"; + SymbolKind3[SymbolKind3["Constructor"] = 8] = "Constructor"; + SymbolKind3[SymbolKind3["Enum"] = 9] = "Enum"; + SymbolKind3[SymbolKind3["Interface"] = 10] = "Interface"; + SymbolKind3[SymbolKind3["Function"] = 11] = "Function"; + SymbolKind3[SymbolKind3["Variable"] = 12] = "Variable"; + SymbolKind3[SymbolKind3["Constant"] = 13] = "Constant"; + SymbolKind3[SymbolKind3["String"] = 14] = "String"; + SymbolKind3[SymbolKind3["Number"] = 15] = "Number"; + SymbolKind3[SymbolKind3["Boolean"] = 16] = "Boolean"; + SymbolKind3[SymbolKind3["Array"] = 17] = "Array"; + SymbolKind3[SymbolKind3["Object"] = 18] = "Object"; + SymbolKind3[SymbolKind3["Key"] = 19] = "Key"; + SymbolKind3[SymbolKind3["Null"] = 20] = "Null"; + SymbolKind3[SymbolKind3["EnumMember"] = 21] = "EnumMember"; + SymbolKind3[SymbolKind3["Struct"] = 22] = "Struct"; + SymbolKind3[SymbolKind3["Event"] = 23] = "Event"; + SymbolKind3[SymbolKind3["Operator"] = 24] = "Operator"; + SymbolKind3[SymbolKind3["TypeParameter"] = 25] = "TypeParameter"; + })(SymbolKind || (SymbolKind = {})); + var SymbolTag; + (function(SymbolTag3) { + SymbolTag3[SymbolTag3["Deprecated"] = 1] = "Deprecated"; + })(SymbolTag || (SymbolTag = {})); + var TextEditorCursorBlinkingStyle; + (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 = {})); + var TextEditorCursorStyle; + (function(TextEditorCursorStyle2) { + TextEditorCursorStyle2[TextEditorCursorStyle2["Line"] = 1] = "Line"; + TextEditorCursorStyle2[TextEditorCursorStyle2["Block"] = 2] = "Block"; + TextEditorCursorStyle2[TextEditorCursorStyle2["Underline"] = 3] = "Underline"; + TextEditorCursorStyle2[TextEditorCursorStyle2["LineThin"] = 4] = "LineThin"; + TextEditorCursorStyle2[TextEditorCursorStyle2["BlockOutline"] = 5] = "BlockOutline"; + TextEditorCursorStyle2[TextEditorCursorStyle2["UnderlineThin"] = 6] = "UnderlineThin"; + })(TextEditorCursorStyle || (TextEditorCursorStyle = {})); + var TrackedRangeStickiness; + (function(TrackedRangeStickiness2) { + TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges"; + TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges"; + TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore"; + TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter"; + })(TrackedRangeStickiness || (TrackedRangeStickiness = {})); + var WrappingIndent; + (function(WrappingIndent2) { + WrappingIndent2[WrappingIndent2["None"] = 0] = "None"; + WrappingIndent2[WrappingIndent2["Same"] = 1] = "Same"; + WrappingIndent2[WrappingIndent2["Indent"] = 2] = "Indent"; + WrappingIndent2[WrappingIndent2["DeepIndent"] = 3] = "DeepIndent"; + })(WrappingIndent || (WrappingIndent = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js + var KeyMod = class { + static chord(firstPart, secondPart) { + return KeyChord(firstPart, secondPart); + } + }; + KeyMod.CtrlCmd = 2048; + KeyMod.Shift = 1024; + KeyMod.Alt = 512; + KeyMod.WinCtrl = 256; + function createMonacoBaseAPI() { + return { + editor: void 0, + languages: void 0, + CancellationTokenSource, + Emitter, + KeyCode, + KeyMod, + Position, + Range, + Selection, + SelectionDirection, + MarkerSeverity, + MarkerTag, + Uri: URI, + Token + }; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js + var WordCharacterClassifier = class extends CharacterClassifier { + constructor(wordSeparators) { + super( + 0 + /* WordCharacterClass.Regular */ + ); + for (let i = 0, len = wordSeparators.length; i < len; i++) { + this.set( + wordSeparators.charCodeAt(i), + 2 + /* WordCharacterClass.WordSeparator */ + ); + } + this.set( + 32, + 1 + /* WordCharacterClass.Whitespace */ + ); + this.set( + 9, + 1 + /* WordCharacterClass.Whitespace */ + ); + } + }; + function once2(computeFn) { + const cache = {}; + return (input) => { + if (!cache.hasOwnProperty(input)) { + cache[input] = computeFn(input); + } + return cache[input]; + }; + } + var getMapForWordSeparators = once2((input) => new WordCharacterClassifier(input)); + + // node_modules/monaco-editor/esm/vs/editor/common/model.js + var OverviewRulerLane2; + (function(OverviewRulerLane3) { + OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; + OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; + OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; + OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; + })(OverviewRulerLane2 || (OverviewRulerLane2 = {})); + var GlyphMarginLane2; + (function(GlyphMarginLane3) { + GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; + GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right"; + })(GlyphMarginLane2 || (GlyphMarginLane2 = {})); + var MinimapPosition2; + (function(MinimapPosition3) { + MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; + MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; + })(MinimapPosition2 || (MinimapPosition2 = {})); + var InjectedTextCursorStops2; + (function(InjectedTextCursorStops3) { + InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; + InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; + })(InjectedTextCursorStops2 || (InjectedTextCursorStops2 = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js + function leftIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + if (matchStartIndex === 0) { + return true; + } + const charBefore = text3.charCodeAt(matchStartIndex - 1); + if (wordSeparators.get(charBefore) !== 0) { + return true; + } + if (charBefore === 13 || charBefore === 10) { + return true; + } + if (matchLength > 0) { + const firstCharInMatch = text3.charCodeAt(matchStartIndex); + if (wordSeparators.get(firstCharInMatch) !== 0) { + return true; + } + } + return false; + } + function rightIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + if (matchStartIndex + matchLength === textLength) { + return true; + } + const charAfter = text3.charCodeAt(matchStartIndex + matchLength); + if (wordSeparators.get(charAfter) !== 0) { + return true; + } + if (charAfter === 13 || charAfter === 10) { + return true; + } + if (matchLength > 0) { + const lastCharInMatch = text3.charCodeAt(matchStartIndex + matchLength - 1); + if (wordSeparators.get(lastCharInMatch) !== 0) { + return true; + } + } + return false; + } + function isValidMatch(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + return leftIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) && rightIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength); + } + var Searcher = class { + constructor(wordSeparators, searchRegex) { + this._wordSeparators = wordSeparators; + this._searchRegex = searchRegex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + reset(lastIndex) { + this._searchRegex.lastIndex = lastIndex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + next(text3) { + const textLength = text3.length; + let m; + do { + if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { + return null; + } + m = this._searchRegex.exec(text3); + 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(text3, 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, text3, textLength, matchStartIndex, matchLength)) { + return m; + } + } while (m); + return null; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/assert.js + 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 < items.length - 1) { + const a = items[i]; + const b = items[i + 1]; + if (!predicate(a, b)) { + return false; + } + i++; + } + return true; + } + + // node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js + var UnicodeTextModelHighlighter = class { + static computeUnicodeHighlights(model, options, range) { + const startLine = range ? range.startLineNumber : 1; + const endLine = range ? range.endLineNumber : model.getLineCount(); + const codePointHighlighter = new CodePointHighlighter(options); + 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 < lineLength) { + const charCodeBefore = lineContent.charCodeAt(endIndex - 1); + if (isHighSurrogate(charCodeBefore)) { + endIndex++; + } + } + const str = lineContent.substring(startIndex, endIndex); + let word2 = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0); + if (word2 && word2.endColumn <= startIndex + 1) { + word2 = null; + } + const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word2 ? word2.word : null); + if (highlightReason !== 0) { + if (highlightReason === 3) { + ambiguousCharacterCount++; + } else if (highlightReason === 2) { + invisibleCharacterCount++; + } else if (highlightReason === 1) { + nonBasicAsciiCharacterCount++; + } else { + assertNever(highlightReason); + } + const MAX_RESULT_LENGTH = 1e3; + if (ranges.length >= MAX_RESULT_LENGTH) { + hasMore = true; + break forLoop; + } + ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1)); + } + } + } while (m); + } + return { + ranges, + hasMore, + ambiguousCharacterCount, + invisibleCharacterCount, + nonBasicAsciiCharacterCount + }; + } + static computeUnicodeHighlightReason(char, options) { + const codePointHighlighter = new CodePointHighlighter(options); + const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null); + switch (reason) { + case 0: + return null; + case 2: + return { + kind: 1 + /* UnicodeHighlighterReasonKind.Invisible */ + }; + case 3: { + const codePoint = char.codePointAt(0); + const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint); + const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(/* @__PURE__ */ new Set([...options.allowedLocales, l])).isAmbiguous(codePoint)); + return { kind: 0, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales }; + } + case 1: + return { + kind: 2 + /* UnicodeHighlighterReasonKind.NonBasicAscii */ + }; + } + } + }; + function buildRegExpCharClassExpr(codePoints, flags) { + const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(""))}]`; + return src; + } + var CodePointHighlighter = class { + constructor(options) { + this.options = options; + this.allowedCodePoints = new Set(options.allowedCodePoints); + this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales)); + } + getCandidateCodePoints() { + if (this.options.nonBasicASCII) { + return "allNonBasicAscii"; + } + const set = /* @__PURE__ */ 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 ( + /* Don't allow mixing weird looking characters with ASCII */ + !hasBasicASCIICharacters && /* Is there an obviously weird looking character? */ + 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; + } + }; + function isAllowedInvisibleCharacter(character) { + return character === " " || character === "\n" || character === " "; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js + var OffsetRange = class _OffsetRange { + static addRange(range, sortedRanges) { + let i = 0; + while (i < sortedRanges.length && sortedRanges[i].endExclusive < range.start) { + i++; + } + let j = i; + while (j < sortedRanges.length && sortedRanges[j].start <= range.endExclusive) { + j++; + } + if (i === j) { + sortedRanges.splice(i, 0, range); + } else { + const start = Math.min(range.start, sortedRanges[i].start); + const end = Math.max(range.endExclusive, sortedRanges[j - 1].endExclusive); + sortedRanges.splice(i, j - i, new _OffsetRange(start, end)); + } + } + static tryCreate(start, endExclusive) { + if (start > endExclusive) { + return void 0; + } + return new _OffsetRange(start, endExclusive); + } + static ofLength(length) { + return new _OffsetRange(0, length); + } + 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; + } + /** + * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n) + * The joined range is the smallest range that contains both ranges. + */ + join(other) { + return new _OffsetRange(Math.min(this.start, other.start), Math.max(this.endExclusive, other.endExclusive)); + } + /** + * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n) + * + * The resulting range is empty if the ranges do not intersect, but touch. + * If the ranges don't even touch, the result is undefined. + */ + intersect(other) { + const start = Math.max(this.start, other.start); + const end = Math.min(this.endExclusive, other.endExclusive); + if (start <= end) { + return new _OffsetRange(start, end); + } + return void 0; + } + slice(arr) { + return arr.slice(this.start, this.endExclusive); + } + /** + * Returns the given value if it is contained in this instance, otherwise the closest value that is contained. + * The range must not be empty. + */ + clip(value) { + if (this.isEmpty) { + throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); + } + return Math.max(this.start, Math.min(this.endExclusive - 1, value)); + } + /** + * Returns `r := value + k * length` such that `r` is contained in this range. + * The range must not be empty. + * + * E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`. + */ + clipCyclic(value) { + if (this.isEmpty) { + throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); + } + if (value < this.start) { + return this.endExclusive - (this.start - value) % this.length; + } + if (value >= this.endExclusive) { + return this.start + (value - this.start) % this.length; + } + return value; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js + var LineRange = class _LineRange { + static fromRange(range) { + return new _LineRange(range.startLineNumber, range.endLineNumber); + } + static subtract(a, b) { + if (!b) { + return [a]; + } + if (a.startLineNumber < b.startLineNumber && b.endLineNumberExclusive < a.endLineNumberExclusive) { + return [ + new _LineRange(a.startLineNumber, b.startLineNumber), + new _LineRange(b.endLineNumberExclusive, a.endLineNumberExclusive) + ]; + } else if (b.startLineNumber <= a.startLineNumber && a.endLineNumberExclusive <= b.endLineNumberExclusive) { + return []; + } else if (b.endLineNumberExclusive < a.endLineNumberExclusive) { + return [new _LineRange(Math.max(b.endLineNumberExclusive, a.startLineNumber), a.endLineNumberExclusive)]; + } else { + return [new _LineRange(a.startLineNumber, Math.min(b.startLineNumber, a.endLineNumberExclusive))]; + } + } + /** + * @param lineRanges An array of sorted line ranges. + */ + static joinMany(lineRanges) { + if (lineRanges.length === 0) { + return []; + } + let result = lineRanges[0]; + for (let i = 1; i < lineRanges.length; i++) { + result = this.join(result, lineRanges[i]); + } + return result; + } + /** + * @param lineRanges1 Must be sorted. + * @param lineRanges2 Must be sorted. + */ + static join(lineRanges1, lineRanges2) { + if (lineRanges1.length === 0) { + return lineRanges2; + } + if (lineRanges2.length === 0) { + return lineRanges1; + } + const result = []; + let i1 = 0; + let i2 = 0; + let current = null; + while (i1 < lineRanges1.length || i2 < lineRanges2.length) { + let next = null; + if (i1 < lineRanges1.length && i2 < lineRanges2.length) { + const lineRange1 = lineRanges1[i1]; + const lineRange2 = lineRanges2[i2]; + if (lineRange1.startLineNumber < lineRange2.startLineNumber) { + next = lineRange1; + i1++; + } else { + next = lineRange2; + i2++; + } + } else if (i1 < lineRanges1.length) { + next = lineRanges1[i1]; + i1++; + } else { + next = lineRanges2[i2]; + i2++; + } + if (current === null) { + current = next; + } else { + if (current.endLineNumberExclusive >= 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, length) { + return new _LineRange(startLineNumber, startLineNumber + length); + } + /** + * @internal + */ + 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; + } + /** + * Indicates if this line range contains the given line number. + */ + contains(lineNumber) { + return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; + } + /** + * Indicates if this line range is empty. + */ + get isEmpty() { + return this.startLineNumber === this.endLineNumberExclusive; + } + /** + * Moves this line range by the given offset of line numbers. + */ + delta(offset) { + return new _LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset); + } + deltaLength(offset) { + return new _LineRange(this.startLineNumber, this.endLineNumberExclusive + offset); + } + /** + * The number of lines this line range spans. + */ + get length() { + return this.endLineNumberExclusive - this.startLineNumber; + } + /** + * Creates a line range that combines this and the given line range. + */ + join(other) { + return new _LineRange(Math.min(this.startLineNumber, other.startLineNumber), Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive)); + } + toString() { + return `[${this.startLineNumber},${this.endLineNumberExclusive})`; + } + /** + * The resulting range is empty if the ranges do not intersect, but touch. + * If the ranges don't even touch, the result is undefined. + */ + intersect(other) { + const startLineNumber = Math.max(this.startLineNumber, other.startLineNumber); + const endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive); + if (startLineNumber <= endLineNumberExclusive) { + return new _LineRange(startLineNumber, endLineNumberExclusive); + } + return void 0; + } + intersectsStrict(other) { + return this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive; + } + overlapOrTouch(other) { + return this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive; + } + equals(b) { + return this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive; + } + toInclusiveRange() { + if (this.isEmpty) { + return null; + } + return new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER); + } + toExclusiveRange() { + return new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1); + } + mapToLineArray(f) { + const result = []; + for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { + result.push(f(lineNumber)); + } + return result; + } + forEach(f) { + for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { + f(lineNumber); + } + } + /** + * @internal + */ + serialize() { + return [this.startLineNumber, this.endLineNumberExclusive]; + } + includes(lineNumber) { + return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; + } + /** + * Converts this 1-based line range to a 0-based offset range (subtracts 1!). + * @internal + */ + toOffsetRange() { + return new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputer.js + var LinesDiff = class { + constructor(changes, moves, hitTimeout) { + this.changes = changes; + this.moves = moves; + this.hitTimeout = hitTimeout; + } + }; + var LineRangeMapping = class _LineRangeMapping { + static inverse(mapping, originalLineCount, modifiedLineCount) { + const result = []; + let lastOriginalEndLineNumber = 1; + let lastModifiedEndLineNumber = 1; + for (const m of mapping) { + const r2 = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, m.originalRange.startLineNumber), new LineRange(lastModifiedEndLineNumber, m.modifiedRange.startLineNumber), void 0); + if (!r2.modifiedRange.isEmpty) { + result.push(r2); + } + lastOriginalEndLineNumber = m.originalRange.endLineNumberExclusive; + lastModifiedEndLineNumber = m.modifiedRange.endLineNumberExclusive; + } + const r = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, originalLineCount + 1), new LineRange(lastModifiedEndLineNumber, modifiedLineCount + 1), void 0); + if (!r.modifiedRange.isEmpty) { + result.push(r); + } + return result; + } + constructor(originalRange, modifiedRange, innerChanges) { + this.originalRange = originalRange; + this.modifiedRange = modifiedRange; + this.innerChanges = innerChanges; + } + toString() { + return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + } + get changedLineCount() { + return Math.max(this.originalRange.length, this.modifiedRange.length); + } + flip() { + var _a3; + return new _LineRangeMapping(this.modifiedRange, this.originalRange, (_a3 = this.innerChanges) === null || _a3 === void 0 ? void 0 : _a3.map((c) => c.flip())); + } + }; + var RangeMapping = class _RangeMapping { + 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); + } + }; + var SimpleLineRangeMapping = class _SimpleLineRangeMapping { + 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)); + } + }; + var MovedText = class _MovedText { + constructor(lineRangeMapping, changes) { + this.lineRangeMapping = lineRangeMapping; + this.changes = changes; + } + flip() { + return new _MovedText(this.lineRangeMapping.flip(), this.changes.map((c) => c.flip())); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/legacyLinesDiffComputer.js + var MINIMUM_MATCHING_CHARACTER_LENGTH = 3; + var LegacyLinesDiffComputer = class { + computeDiff(originalLines, modifiedLines, options) { + var _a3; + const diffComputer = new DiffComputer(originalLines, modifiedLines, { + maxComputationTime: options.maxComputationTimeMs, + shouldIgnoreTrimWhitespace: options.ignoreTrimWhitespace, + shouldComputeCharChanges: true, + shouldMakePrettyDiff: true, + shouldPostProcessCharChanges: true + }); + const result = diffComputer.computeDiff(); + const changes = []; + let lastChange = null; + for (const c of result.changes) { + let originalRange; + if (c.originalEndLineNumber === 0) { + originalRange = new LineRange(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1); + } else { + originalRange = new LineRange(c.originalStartLineNumber, c.originalEndLineNumber + 1); + } + let modifiedRange; + if (c.modifiedEndLineNumber === 0) { + modifiedRange = new LineRange(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1); + } else { + modifiedRange = new LineRange(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); + } + let change = new LineRangeMapping(originalRange, modifiedRange, (_a3 = c.charChanges) === null || _a3 === void 0 ? void 0 : _a3.map((c2) => new 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(() => { + return checkAdjacentItems(changes, (m1, m2) => m2.originalRange.startLineNumber - m1.originalRange.endLineNumberExclusive === m2.modifiedRange.startLineNumber - m1.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber); + }); + return new LinesDiff(changes, [], result.quitEarly); + } + }; + function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) { + const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate); + return diffAlgo.ComputeDiff(pretty); + } + var LineSequence = class { + constructor(lines) { + const startColumns = []; + const endColumns = []; + for (let i = 0, length = lines.length; i < length; i++) { + startColumns[i] = getFirstNonBlankColumn(lines[i], 1); + endColumns[i] = getLastNonBlankColumn(lines[i], 1); + } + this.lines = lines; + this._startColumns = startColumns; + this._endColumns = endColumns; + } + getElements() { + const elements = []; + for (let i = 0, len = this.lines.length; i < len; i++) { + elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1); + } + return elements; + } + getStrictElement(index) { + return this.lines[index]; + } + getStartLineNumber(i) { + return i + 1; + } + getEndLineNumber(i) { + return i + 1; + } + createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) { + const charCodes = []; + const lineNumbers = []; + const columns = []; + let len = 0; + for (let index = startIndex; index <= endIndex; index++) { + const lineContent = this.lines[index]; + const startColumn = shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1; + const endColumn = shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1; + for (let col = startColumn; col < endColumn; col++) { + charCodes[len] = lineContent.charCodeAt(col - 1); + lineNumbers[len] = index + 1; + columns[len] = col; + len++; + } + if (!shouldIgnoreTrimWhitespace && index < endIndex) { + charCodes[len] = 10; + lineNumbers[len] = index + 1; + columns[len] = lineContent.length + 1; + len++; + } + } + return new CharSequence(charCodes, lineNumbers, columns); + } + }; + var CharSequence = class { + constructor(charCodes, lineNumbers, columns) { + this._charCodes = charCodes; + this._lineNumbers = lineNumbers; + this._columns = columns; + } + toString() { + return "[" + this._charCodes.map((s, idx) => (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; + } + }; + var CharChange = class _CharChange { + 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); + } + }; + function postProcessCharChanges(rawChanges) { + if (rawChanges.length <= 1) { + return rawChanges; + } + const result = [rawChanges[0]]; + let prevChange = result[0]; + for (let i = 1, len = rawChanges.length; i < len; i++) { + const currChange = rawChanges[i]; + const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength); + const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength); + const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength); + if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) { + prevChange.originalLength = currChange.originalStart + currChange.originalLength - prevChange.originalStart; + prevChange.modifiedLength = currChange.modifiedStart + currChange.modifiedLength - prevChange.modifiedStart; + } else { + result.push(currChange); + prevChange = currChange; + } + } + return result; + } + var LineChange = class _LineChange { + 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, length = rawChanges.length; i < length; i++) { + charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence)); + } + } + } + return new _LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges); + } + }; + var DiffComputer = class { + constructor(originalLines, modifiedLines, opts) { + this.shouldComputeCharChanges = opts.shouldComputeCharChanges; + this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges; + this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace; + this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff; + this.originalLines = originalLines; + this.modifiedLines = modifiedLines; + this.original = new LineSequence(originalLines); + this.modified = new LineSequence(modifiedLines); + this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime); + this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5e3)); + } + computeDiff() { + if (this.original.lines.length === 1 && this.original.lines[0].length === 0) { + if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { + return { + quitEarly: false, + changes: [] + }; + } + return { + quitEarly: false, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: 1, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: this.modified.lines.length, + charChanges: void 0 + }] + }; + } + if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { + return { + quitEarly: false, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: this.original.lines.length, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: 1, + charChanges: void 0 + }] + }; + } + const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff); + const rawChanges = diffResult.changes; + const quitEarly = diffResult.quitEarly; + if (this.shouldIgnoreTrimWhitespace) { + const lineChanges = []; + for (let i = 0, length = rawChanges.length; i < length; i++) { + lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); + } + return { + quitEarly, + changes: lineChanges + }; + } + const result = []; + let originalLineIndex = 0; + let modifiedLineIndex = 0; + for (let i = -1, len = rawChanges.length; i < len; i++) { + const nextChange = i + 1 < len ? rawChanges[i + 1] : null; + const originalStop = nextChange ? nextChange.originalStart : this.originalLines.length; + const modifiedStop = nextChange ? nextChange.modifiedStart : this.modifiedLines.length; + while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) { + const originalLine = this.originalLines[originalLineIndex]; + const modifiedLine = this.modifiedLines[modifiedLineIndex]; + if (originalLine !== modifiedLine) { + { + let originalStartColumn = getFirstNonBlankColumn(originalLine, 1); + let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1); + while (originalStartColumn > 1 && 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 < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) { + const originalChar = originalLine.charCodeAt(originalEndColumn - 1); + const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1); + if (originalChar !== modifiedChar) { + break; + } + originalEndColumn++; + modifiedEndColumn++; + } + if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) { + this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn); + } + } + } + originalLineIndex++; + modifiedLineIndex++; + } + if (nextChange) { + result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); + originalLineIndex += nextChange.originalLength; + modifiedLineIndex += nextChange.modifiedLength; + } + } + return { + quitEarly, + changes: result + }; + } + _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { + if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) { + return; + } + let charChanges = void 0; + if (this.shouldComputeCharChanges) { + charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)]; + } + result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges)); + } + _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { + const len = result.length; + if (len === 0) { + return false; + } + const prevChange = result[len - 1]; + if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) { + return false; + } + if (prevChange.originalEndLineNumber === originalLineNumber && prevChange.modifiedEndLineNumber === modifiedLineNumber) { + if (this.shouldComputeCharChanges && prevChange.charChanges) { + prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); + } + return true; + } + if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) { + prevChange.originalEndLineNumber = originalLineNumber; + prevChange.modifiedEndLineNumber = modifiedLineNumber; + if (this.shouldComputeCharChanges && prevChange.charChanges) { + prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); + } + return true; + } + return false; + } + }; + function getFirstNonBlankColumn(txt, defaultValue) { + const r = firstNonWhitespaceIndex(txt); + if (r === -1) { + return defaultValue; + } + return r + 1; + } + function getLastNonBlankColumn(txt, defaultValue) { + const r = lastNonWhitespaceIndex(txt); + if (r === -1) { + return defaultValue; + } + return r + 2; + } + function createContinueProcessingPredicate(maximumRuntime) { + if (maximumRuntime === 0) { + return () => true; + } + const startTime = Date.now(); + return () => { + return Date.now() - startTime < maximumRuntime; + }; + } + + // node_modules/monaco-editor/esm/vs/base/common/collections.js + var SetMap = class { + constructor() { + this.map = /* @__PURE__ */ new Map(); + } + add(key, value) { + let values = this.map.get(key); + if (!values) { + values = /* @__PURE__ */ new Set(); + this.map.set(key, values); + } + values.add(value); + } + delete(key, value) { + const values = this.map.get(key); + if (!values) { + return; + } + values.delete(value); + if (values.size === 0) { + this.map.delete(key); + } + } + forEach(key, fn) { + const values = this.map.get(key); + if (!values) { + return; + } + values.forEach(fn); + } + get(key) { + const values = this.map.get(key); + if (!values) { + return /* @__PURE__ */ new Set(); + } + return values; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/diffAlgorithm.js + var DiffAlgorithmResult = class _DiffAlgorithmResult { + static trivial(seq1, seq2) { + return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], false); + } + static trivialTimedOut(seq1, seq2) { + return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], true); + } + constructor(diffs, hitTimeout) { + this.diffs = diffs; + this.hitTimeout = hitTimeout; + } + }; + var SequenceDiff = class _SequenceDiff { + constructor(seq1Range, seq2Range) { + this.seq1Range = seq1Range; + this.seq2Range = seq2Range; + } + reverse() { + return new _SequenceDiff(this.seq2Range, this.seq1Range); + } + toString() { + return `${this.seq1Range} <-> ${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)); + } + }; + var InfiniteTimeout = class { + isValid() { + return true; + } + }; + InfiniteTimeout.instance = new InfiniteTimeout(); + var DateTimeout = class { + constructor(timeout) { + this.timeout = timeout; + this.startTime = Date.now(); + this.valid = true; + if (timeout <= 0) { + throw new BugIndicatingError("timeout must be positive"); + } + } + // Recommendation: Set a log-point `{this.disable()}` in the body + isValid() { + const valid = Date.now() - this.startTime < this.timeout; + if (!valid && this.valid) { + this.valid = false; + debugger; + } + return this.valid; + } + disable() { + this.timeout = Number.MAX_SAFE_INTEGER; + this.isValid = () => true; + this.valid = true; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/utils.js + var Array2D = class { + constructor(width, height) { + this.width = width; + this.height = height; + this.array = []; + this.array = new Array(width * height); + } + get(x, y) { + return this.array[x + y * this.width]; + } + set(x, y, value) { + this.array[x + y * this.width] = value; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/dynamicProgrammingDiffing.js + var DynamicProgrammingDiffing = class { + compute(sequence1, sequence2, timeout = InfiniteTimeout.instance, equalityScore) { + if (sequence1.length === 0 || sequence2.length === 0) { + return DiffAlgorithmResult.trivial(sequence1, sequence2); + } + const lcsLengths = new Array2D(sequence1.length, sequence2.length); + const directions = new Array2D(sequence1.length, sequence2.length); + const lengths = new Array2D(sequence1.length, sequence2.length); + for (let s12 = 0; s12 < sequence1.length; s12++) { + for (let s22 = 0; s22 < sequence2.length; s22++) { + if (!timeout.isValid()) { + return DiffAlgorithmResult.trivialTimedOut(sequence1, sequence2); + } + const horizontalLen = s12 === 0 ? 0 : lcsLengths.get(s12 - 1, s22); + const verticalLen = s22 === 0 ? 0 : lcsLengths.get(s12, s22 - 1); + let extendedSeqScore; + if (sequence1.getElement(s12) === sequence2.getElement(s22)) { + if (s12 === 0 || s22 === 0) { + extendedSeqScore = 0; + } else { + extendedSeqScore = lcsLengths.get(s12 - 1, s22 - 1); + } + if (s12 > 0 && 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); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/joinSequenceDiffs.js + 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; i < diffs.length; i++) { + let shouldJoinDiffs = function(before, after) { + const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); + const unchangedText = sequence1.getText(unchangedRange); + const unchangedTextWithoutWs = unchangedText.replace(/\s/g, ""); + if (unchangedTextWithoutWs.length <= 4 && (before.seq1Range.length + before.seq2Range.length > 5 || 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; i < diffs.length; i++) { + let shouldJoinDiffs = function(before, after) { + const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); + const unchangedLineCount = sequence1.countLinesIn(unchangedRange); + if (unchangedLineCount > 5 || 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; i < diffs.length; i++) { + const cur = diffs[i]; + let range1 = cur.seq1Range; + let range2 = cur.seq2Range; + const fullRange1 = sequence1.extendToFullLines(cur.seq1Range); + const prefix = sequence1.getText(new OffsetRange(fullRange1.start, cur.seq1Range.start)); + if (prefix.length > 0 && 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; i < sequenceDiffs.length; i++) { + const prevResult = result[result.length - 1]; + let cur = sequenceDiffs[i]; + if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { + const length = cur.seq1Range.start - prevResult.seq1Range.endExclusive; + let d; + for (d = 1; d <= length; d++) { + if (sequence1.getElement(cur.seq1Range.start - d) !== sequence1.getElement(cur.seq1Range.endExclusive - d) || sequence2.getElement(cur.seq2Range.start - d) !== sequence2.getElement(cur.seq2Range.endExclusive - d)) { + break; + } + } + d--; + if (d === length) { + result[result.length - 1] = new SequenceDiff(new OffsetRange(prevResult.seq1Range.start, cur.seq1Range.endExclusive - length), new OffsetRange(prevResult.seq2Range.start, cur.seq2Range.endExclusive - length)); + continue; + } + cur = cur.delta(-d); + } + result.push(cur); + } + const result2 = []; + for (let i = 0; i < result.length - 1; i++) { + const nextResult = result[i + 1]; + let cur = result[i]; + if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { + const length = nextResult.seq1Range.start - cur.seq1Range.endExclusive; + let d; + for (d = 0; d < length; d++) { + if (sequence1.getElement(cur.seq1Range.start + d) !== sequence1.getElement(cur.seq1Range.endExclusive + d) || sequence2.getElement(cur.seq2Range.start + d) !== sequence2.getElement(cur.seq2Range.endExclusive + d)) { + break; + } + } + if (d === length) { + result[i + 1] = new SequenceDiff(new OffsetRange(cur.seq1Range.start + length, nextResult.seq1Range.endExclusive), new OffsetRange(cur.seq2Range.start + length, nextResult.seq2Range.endExclusive)); + continue; + } + if (d > 0) { + 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; i < sequenceDiffs.length; i++) { + const prevDiff = i > 0 ? sequenceDiffs[i - 1] : void 0; + const diff = sequenceDiffs[i]; + const nextDiff = i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1] : void 0; + const seq1ValidRange = new OffsetRange(prevDiff ? prevDiff.seq1Range.start + 1 : 0, nextDiff ? nextDiff.seq1Range.endExclusive - 1 : sequence1.length); + const seq2ValidRange = new OffsetRange(prevDiff ? prevDiff.seq2Range.start + 1 : 0, nextDiff ? nextDiff.seq2Range.endExclusive - 1 : sequence2.length); + if (diff.seq1Range.isEmpty) { + sequenceDiffs[i] = shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange); + } else if (diff.seq2Range.isEmpty) { + sequenceDiffs[i] = shiftDiffToBetterPosition(diff.reverse(), sequence2, sequence1, seq2ValidRange, seq1ValidRange).reverse(); + } + } + return sequenceDiffs; + } + function shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange) { + const maxShiftLimit = 100; + let deltaBefore = 1; + while (diff.seq1Range.start - deltaBefore >= seq1ValidRange.start && diff.seq2Range.start - deltaBefore >= seq2ValidRange.start && sequence2.isStronglyEqual(diff.seq2Range.start - deltaBefore, diff.seq2Range.endExclusive - deltaBefore) && deltaBefore < maxShiftLimit) { + deltaBefore++; + } + deltaBefore--; + let deltaAfter = 0; + while (diff.seq1Range.start + deltaAfter < seq1ValidRange.endExclusive && diff.seq2Range.endExclusive + deltaAfter < seq2ValidRange.endExclusive && sequence2.isStronglyEqual(diff.seq2Range.start + deltaAfter, diff.seq2Range.endExclusive + deltaAfter) && deltaAfter < maxShiftLimit) { + deltaAfter++; + } + if (deltaBefore === 0 && deltaAfter === 0) { + return diff; + } + let bestDelta = 0; + let bestScore = -1; + for (let delta = -deltaBefore; delta <= deltaAfter; delta++) { + const seq2OffsetStart = diff.seq2Range.start + delta; + const seq2OffsetEndExclusive = diff.seq2Range.endExclusive + delta; + const seq1Offset = diff.seq1Range.start + delta; + const score2 = sequence1.getBoundaryScore(seq1Offset) + sequence2.getBoundaryScore(seq2OffsetStart) + sequence2.getBoundaryScore(seq2OffsetEndExclusive); + if (score2 > bestScore) { + bestScore = score2; + bestDelta = delta; + } + } + return diff.delta(bestDelta); + } + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/myersDiffAlgorithm.js + var MyersDiffAlgorithm = class { + compute(seq1, seq2, timeout = InfiniteTimeout.instance) { + if (seq1.length === 0 || seq2.length === 0) { + return DiffAlgorithmResult.trivial(seq1, seq2); + } + function getXAfterSnake(x, y) { + while (x < seq1.length && y < seq2.length && seq1.getElement(x) === seq2.getElement(y)) { + x++; + y++; + } + return x; + } + let d = 0; + const V = new FastInt32Array(); + V.set(0, getXAfterSnake(0, 0)); + const paths = new FastArrayNegativeIndices(); + paths.set(0, V.get(0) === 0 ? null : new SnakePath(null, 0, 0, V.get(0))); + let k = 0; + loop: + while (true) { + d++; + if (!timeout.isValid()) { + return DiffAlgorithmResult.trivialTimedOut(seq1, seq2); + } + const lowerBound = -Math.min(d, seq2.length + d % 2); + const upperBound = Math.min(d, seq1.length + d % 2); + for (k = lowerBound; k <= upperBound; k += 2) { + const maxXofDLineTop = k === upperBound ? -1 : V.get(k + 1); + const maxXofDLineLeft = k === lowerBound ? -1 : V.get(k - 1) + 1; + const x = Math.min(Math.max(maxXofDLineTop, maxXofDLineLeft), seq1.length); + const y = x - k; + if (x > seq1.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); + } + }; + var SnakePath = class { + constructor(prev, x, y, length) { + this.prev = prev; + this.x = x; + this.y = y; + this.length = length; + } + }; + var 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; + } + } + }; + var 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; + } + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/advancedLinesDiffComputer.js + var AdvancedLinesDiffComputer = class { + constructor() { + this.dynamicProgrammingDiffing = new DynamicProgrammingDiffing(); + this.myersDiffingAlgorithm = new MyersDiffAlgorithm(); + } + computeDiff(originalLines, modifiedLines, options) { + 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 timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs); + const considerWhitespaceChanges = !options.ignoreTrimWhitespace; + const perfectHashes = /* @__PURE__ */ new Map(); + function getOrCreateHash(text3) { + let hash = perfectHashes.get(text3); + if (hash === void 0) { + hash = perfectHashes.size; + perfectHashes.set(text3, hash); + } + return hash; + } + 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, timeout, (offset1, offset2) => originalLines[offset1] === modifiedLines[offset2] ? modifiedLines[offset2].length === 0 ? 0.1 : 1 + Math.log(1 + modifiedLines[offset2].length) : 0.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; i < equalLinesCount; i++) { + const seq1Offset = seq1LastStart + i; + const seq2Offset = seq2LastStart + i; + if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) { + const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges); + for (const a of characterDiffs.mappings) { + alignments.push(a); + } + if (characterDiffs.hitTimeout) { + hitTimeout = true; + } + } + } + }; + let seq1LastStart = 0; + let seq2LastStart = 0; + for (const diff of lineAlignments) { + assertFn(() => diff.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, timeout, 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 (options.computeMoves) { + moves = this.computeMoves(changes, originalLines, modifiedLines, srcDocLines, tgtDocLines, timeout, 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(range, lines) { + if (range.startLineNumber < 1 || range.startLineNumber > lines.length + 1) { + return false; + } + if (range.endLineNumberExclusive < 1 || range.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, timeout, 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 = /* @__PURE__ */ 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 > 0.9 && best) { + insertions.delete(best); + moves.push(new SimpleLineRangeMapping(deletion.range, best.range)); + excludedChanges.add(deletion.source); + excludedChanges.add(best.source); + } + if (!timeout.isValid()) { + return []; + } + } + const original3LineHashes = new SetMap(); + for (const change of changes) { + if (excludedChanges.has(change)) { + continue; + } + for (let i = change.originalRange.startLineNumber; i < change.originalRange.endLineNumberExclusive - 2; i++) { + const key = `${hashedOriginalLines[i - 1]}:${hashedOriginalLines[i + 1 - 1]}:${hashedOriginalLines[i + 2 - 1]}`; + original3LineHashes.add(key, { range: new LineRange(i, i + 3) }); + } + } + const possibleMappings = []; + changes.sort(compareBy((c) => c.modifiedRange.startLineNumber, numberComparator)); + for (const change of changes) { + if (excludedChanges.has(change)) { + continue; + } + let lastMappings = []; + for (let i = change.modifiedRange.startLineNumber; i < change.modifiedRange.endLineNumberExclusive - 2; i++) { + const key = `${hashedModifiedLines[i - 1]}:${hashedModifiedLines[i + 1 - 1]}:${hashedModifiedLines[i + 2 - 1]}`; + const currentModifiedRange = new LineRange(i, i + 3); + const nextMappings = []; + original3LineHashes.forEach(key, ({ range }) => { + for (const lastMapping of lastMappings) { + if (lastMapping.originalLineRange.endLineNumberExclusive + 1 === range.endLineNumberExclusive && lastMapping.modifiedLineRange.endLineNumberExclusive + 1 === currentModifiedRange.endLineNumberExclusive) { + lastMapping.originalLineRange = new LineRange(lastMapping.originalLineRange.startLineNumber, range.endLineNumberExclusive); + lastMapping.modifiedLineRange = new LineRange(lastMapping.modifiedLineRange.startLineNumber, currentModifiedRange.endLineNumberExclusive); + nextMappings.push(lastMapping); + return; + } + } + const mapping = { + modifiedLineRange: currentModifiedRange, + originalLineRange: range + }; + possibleMappings.push(mapping); + nextMappings.push(mapping); + }); + lastMappings = nextMappings; + } + if (!timeout.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 < moves.length; i++) { + const last = joinedMoves[joinedMoves.length - 1]; + const current = moves[i]; + const originalDist = current.original.startLineNumber - last.original.endLineNumberExclusive; + const modifiedDist = current.modified.startLineNumber - last.modified.endLineNumberExclusive; + const currentMoveAfterLast = originalDist >= 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()), timeout, considerWhitespaceChanges); + const mappings = lineRangeMappingFromRangeMappings(moveChanges.mappings, originalLines, modifiedLines, true); + return new MovedText(m, mappings); + }); + return fullMoves; + } + refineDiff(originalLines, modifiedLines, diff, timeout, 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, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout); + 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 + }; + } + }; + var MonotonousFinder = class _MonotonousFinder { + static create(items, itemToDomain, domainComparator) { + items.sort((a, b) => domainComparator(itemToDomain(a), itemToDomain(b))); + return new _MonotonousFinder(items, itemToDomain, domainComparator); + } + 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; + } + /** + * Assumes the values are monotonously increasing. + */ + findLastItemBeforeOrEqual(value) { + if (this._hasLastValue && CompareResult.isLessThan(this._domainComparator(value, this._lastValue))) { + throw new BugIndicatingError(); + } + this._lastValue = value; + this._hasLastValue = true; + while (this._currentIdx < this._items.length && CompareResult.isLessThanOrEqual(this._domainComparator(this._itemToDomain(this._items[this._currentIdx]), value))) { + this._currentIdx++; + } + return this._currentIdx === 0 ? void 0 : this._items[this._currentIdx - 1]; + } + }; + function intersectRanges(ranges1, ranges2) { + const result = []; + let i1 = 0; + let i2 = 0; + while (i1 < ranges1.length && i2 < ranges2.length) { + const r1 = ranges1[i1]; + const r2 = ranges2[i2]; + const i = r1.intersect(r2); + if (i && !i.isEmpty) { + result.push(i); + } + if (r1.endLineNumberExclusive < r2.endLineNumberExclusive) { + i1++; + } else { + i2++; + } + } + return result; + } + var LineRangeSet = class { + constructor() { + this._normalizedRanges = []; + } + addRange(range) { + const joinRangeStartIdx = mapMinusOne(this._normalizedRanges.findIndex((r) => r.endLineNumberExclusive >= range.startLineNumber), this._normalizedRanges.length); + const joinRangeEndIdxExclusive = findLastIndex(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; + if (joinRangeStartIdx === joinRangeEndIdxExclusive) { + this._normalizedRanges.splice(joinRangeStartIdx, 0, range); + } else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) { + const joinRange = this._normalizedRanges[joinRangeStartIdx]; + this._normalizedRanges[joinRangeStartIdx] = joinRange.join(range); + } else { + const joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range); + this._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange); + } + } + intersects(range) { + for (const r of this._normalizedRanges) { + if (r.intersectsStrict(range)) { + return true; + } + } + return false; + } + /** + * Subtracts all ranges in this set from `range` and returns the result. + */ + subtractFrom(range) { + const joinRangeStartIdx = mapMinusOne(this._normalizedRanges.findIndex((r) => r.endLineNumberExclusive >= range.startLineNumber), this._normalizedRanges.length); + const joinRangeEndIdxExclusive = findLastIndex(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; + if (joinRangeStartIdx === joinRangeEndIdxExclusive) { + return [range]; + } + const result = []; + let startLineNumber = range.startLineNumber; + for (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) { + const r = this._normalizedRanges[i]; + if (r.startLineNumber > startLineNumber) { + result.push(new LineRange(startLineNumber, r.startLineNumber)); + } + startLineNumber = r.endLineNumberExclusive; + } + if (startLineNumber < range.endLineNumberExclusive) { + result.push(new LineRange(startLineNumber, range.endLineNumberExclusive)); + } + return result; + } + }; + function mapMinusOne(idx, mapTo) { + return idx === -1 ? mapTo : idx; + } + function coverFullWords(sequence1, sequence2, sequenceDiffs) { + const additional = []; + let lastModifiedWord = void 0; + function maybePushWordToAdditional() { + if (!lastModifiedWord) { + return; + } + const originalLength1 = lastModifiedWord.s1Range.length - lastModifiedWord.deleted; + const originalLength2 = lastModifiedWord.s2Range.length - lastModifiedWord.added; + if (originalLength1 !== originalLength2) { + } + if (Math.max(lastModifiedWord.deleted, lastModifiedWord.added) + (lastModifiedWord.count - 1) > originalLength1) { + additional.push(new SequenceDiff(lastModifiedWord.s1Range, lastModifiedWord.s2Range)); + } + lastModifiedWord = void 0; + } + for (const s of sequenceDiffs) { + let processWord = function(s1Range, s2Range) { + var _a3, _b, _c, _d; + if (!lastModifiedWord || !lastModifiedWord.s1Range.containsRange(s1Range) || !lastModifiedWord.s2Range.containsRange(s2Range)) { + if (lastModifiedWord && !(lastModifiedWord.s1Range.endExclusive < s1Range.start && lastModifiedWord.s2Range.endExclusive < s2Range.start)) { + const s1Added = OffsetRange.tryCreate(lastModifiedWord.s1Range.endExclusive, s1Range.start); + const s2Added = OffsetRange.tryCreate(lastModifiedWord.s2Range.endExclusive, s2Range.start); + lastModifiedWord.deleted += (_a3 = s1Added === null || s1Added === void 0 ? void 0 : s1Added.length) !== null && _a3 !== void 0 ? _a3 : 0; + lastModifiedWord.added += (_b = s2Added === null || s2Added === void 0 ? void 0 : s2Added.length) !== null && _b !== void 0 ? _b : 0; + lastModifiedWord.s1Range = lastModifiedWord.s1Range.join(s1Range); + lastModifiedWord.s2Range = lastModifiedWord.s2Range.join(s2Range); + } else { + maybePushWordToAdditional(); + lastModifiedWord = { added: 0, deleted: 0, count: 0, s1Range, s2Range }; + } + } + const changedS1 = s1Range.intersect(s.seq1Range); + const changedS2 = s2Range.intersect(s.seq2Range); + lastModifiedWord.count++; + lastModifiedWord.deleted += (_c = changedS1 === null || changedS1 === void 0 ? void 0 : changedS1.length) !== null && _c !== void 0 ? _c : 0; + lastModifiedWord.added += (_d = changedS2 === null || changedS2 === void 0 ? void 0 : changedS2.length) !== null && _d !== void 0 ? _d : 0; + }; + const w1Before = sequence1.findWordContaining(s.seq1Range.start - 1); + const w2Before = sequence2.findWordContaining(s.seq2Range.start - 1); + const w1After = sequence1.findWordContaining(s.seq1Range.endExclusive); + const w2After = sequence2.findWordContaining(s.seq2Range.endExclusive); + if (w1Before && w1After && w2Before && w2After && w1Before.equals(w1After) && w2Before.equals(w2After)) { + processWord(w1Before, w2Before); + } else { + if (w1Before && w2Before) { + processWord(w1Before, w2Before); + } + if (w1After && w2After) { + processWord(w1After, w2After); + } + } + } + maybePushWordToAdditional(); + const merged = mergeSequenceDiffs(sequenceDiffs, additional); + return merged; + } + function mergeSequenceDiffs(sequenceDiffs1, sequenceDiffs2) { + const result = []; + while (sequenceDiffs1.length > 0 || sequenceDiffs2.length > 0) { + const sd1 = sequenceDiffs1[0]; + const sd2 = sequenceDiffs2[0]; + let next; + if (sd1 && (!sd2 || sd1.seq1Range.start < sd2.seq1Range.start)) { + next = sequenceDiffs1.shift(); + } else { + next = sequenceDiffs2.shift(); + } + if (result.length > 0 && 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 first = g[0]; + const last = g[g.length - 1]; + changes.push(new LineRangeMapping(first.originalRange.join(last.originalRange), first.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 && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber); + }); + return changes; + } + function getLineRangeMapping(rangeMapping, originalLines, modifiedLines) { + let lineStartDelta = 0; + let lineEndDelta = 0; + if (rangeMapping.modifiedRange.endColumn === 1 && rangeMapping.originalRange.endColumn === 1 && rangeMapping.originalRange.startLineNumber + lineStartDelta <= rangeMapping.originalRange.endLineNumber && rangeMapping.modifiedRange.startLineNumber + lineStartDelta <= rangeMapping.modifiedRange.endLineNumber) { + lineEndDelta = -1; + } + if (rangeMapping.modifiedRange.startColumn - 1 >= 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; + } + } + var LineSequence2 = class { + constructor(trimmedHash, lines) { + this.trimmedHash = trimmedHash; + this.lines = lines; + } + getElement(offset) { + return this.trimmedHash[offset]; + } + get length() { + return this.trimmedHash.length; + } + getBoundaryScore(length) { + const indentationBefore = length === 0 ? 0 : getIndentation(this.lines[length - 1]); + const indentationAfter = length === this.lines.length ? 0 : getIndentation(this.lines[length]); + return 1e3 - (indentationBefore + indentationAfter); + } + getText(range) { + return this.lines.slice(range.start, range.endExclusive).join("\n"); + } + isStronglyEqual(offset1, offset2) { + return this.lines[offset1] === this.lines[offset2]; + } + }; + function getIndentation(str) { + let i = 0; + while (i < str.length && (str.charCodeAt(i) === 32 || str.charCodeAt(i) === 9)) { + i++; + } + return i; + } + var LinesSliceCharSequence = class { + constructor(lines, lineRange, considerWhitespaceChanges) { + this.lines = lines; + this.considerWhitespaceChanges = considerWhitespaceChanges; + this.elements = []; + this.firstCharOffsetByLineMinusOne = []; + this.additionalOffsetByLine = []; + let trimFirstLineFully = false; + if (lineRange.start > 0 && lineRange.endExclusive >= lines.length) { + lineRange = new OffsetRange(lineRange.start - 1, lineRange.endExclusive); + trimFirstLineFully = true; + } + this.lineRange = lineRange; + for (let i = this.lineRange.start; i < this.lineRange.endExclusive; i++) { + let line = lines[i]; + let offset = 0; + if (trimFirstLineFully) { + offset = line.length; + line = ""; + trimFirstLineFully = false; + } else if (!considerWhitespaceChanges) { + const trimmedStartLine = line.trimStart(); + offset = line.length - trimmedStartLine.length; + line = trimmedStartLine.trimEnd(); + } + this.additionalOffsetByLine.push(offset); + for (let i2 = 0; i2 < line.length; i2++) { + this.elements.push(line.charCodeAt(i2)); + } + if (i < lines.length - 1) { + this.elements.push("\n".charCodeAt(0)); + this.firstCharOffsetByLineMinusOne[i - this.lineRange.start] = this.elements.length; + } + } + this.additionalOffsetByLine.push(0); + } + toString() { + return `Slice: "${this.text}"`; + } + get text() { + return this.getText(new OffsetRange(0, this.length)); + } + getText(range) { + return this.elements.slice(range.start, range.endExclusive).map((e) => String.fromCharCode(e)).join(""); + } + getElement(offset) { + return this.elements[offset]; + } + get length() { + return this.elements.length; + } + getBoundaryScore(length) { + const prevCategory = getCategory(length > 0 ? this.elements[length - 1] : -1); + const nextCategory = getCategory(length < this.elements.length ? this.elements[length] : -1); + if (prevCategory === 6 && nextCategory === 7) { + return 0; + } + let score2 = 0; + if (prevCategory !== nextCategory) { + score2 += 10; + if (nextCategory === 1) { + score2 += 1; + } + } + score2 += getCategoryBoundaryScore(prevCategory); + score2 += getCategoryBoundaryScore(nextCategory); + return score2; + } + translateOffset(offset) { + if (this.lineRange.isEmpty) { + return new Position(this.lineRange.start + 1, 1); + } + let i = 0; + let j = this.firstCharOffsetByLineMinusOne.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (this.firstCharOffsetByLineMinusOne[k] > offset) { + 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(range) { + return Range.fromPositions(this.translateOffset(range.start), this.translateOffset(range.endExclusive)); + } + /** + * Finds the word that contains the character at the given offset + */ + 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 (end < this.elements.length && isWordChar(this.elements[end])) { + end++; + } + return new OffsetRange(start, end); + } + countLinesIn(range) { + return this.translateOffset(range.endExclusive).lineNumber - this.translateOffset(range.start).lineNumber; + } + isStronglyEqual(offset1, offset2) { + return this.elements[offset1] === this.elements[offset2]; + } + extendToFullLines(range) { + var _a3, _b; + const start = (_a3 = findLastMonotonous(this.firstCharOffsetByLineMinusOne, (x) => x <= range.start)) !== null && _a3 !== void 0 ? _a3 : 0; + const end = (_b = findFirstMonotonous(this.firstCharOffsetByLineMinusOne, (x) => range.endExclusive <= x)) !== null && _b !== void 0 ? _b : this.elements.length; + return new OffsetRange(start, end); + } + }; + function findLastIdxMonotonous(arr, predicate) { + let i = 0; + let j = arr.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (predicate(arr[k])) { + i = k + 1; + } else { + j = k; + } + } + return i - 1; + } + function findLastMonotonous(arr, predicate) { + const idx = findLastIdxMonotonous(arr, predicate); + return idx === -1 ? void 0 : arr[idx]; + } + function findFirstIdxMonotonous(arr, predicate) { + let i = 0; + let j = arr.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (predicate(arr[k])) { + j = k; + } else { + i = k + 1; + } + } + return i; + } + function findFirstMonotonous(arr, predicate) { + const idx = findFirstIdxMonotonous(arr, predicate); + return idx === arr.length ? void 0 : arr[idx]; + } + function isWordChar(charCode) { + return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90 || charCode >= 48 && charCode <= 57; + } + var score = { + [ + 0 + /* CharBoundaryCategory.WordLower */ + ]: 0, + [ + 1 + /* CharBoundaryCategory.WordUpper */ + ]: 0, + [ + 2 + /* CharBoundaryCategory.WordNumber */ + ]: 0, + [ + 3 + /* CharBoundaryCategory.End */ + ]: 10, + [ + 4 + /* CharBoundaryCategory.Other */ + ]: 2, + [ + 5 + /* CharBoundaryCategory.Space */ + ]: 3, + [ + 6 + /* CharBoundaryCategory.LineBreakCR */ + ]: 10, + [ + 7 + /* CharBoundaryCategory.LineBreakLF */ + ]: 10 + }; + 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; + } + var chrKeys = /* @__PURE__ */ new Map(); + function getKey(chr) { + let key = chrKeys.get(chr); + if (key === void 0) { + key = chrKeys.size; + chrKeys.set(chr, key); + } + return key; + } + var LineRangeFragment = class { + constructor(range, lines, source) { + this.range = range; + this.lines = lines; + this.source = source; + this.histogram = []; + let counter = 0; + for (let i = range.startLineNumber - 1; i < range.endLineNumberExclusive - 1; i++) { + const line = lines[i]; + for (let j = 0; j < line.length; j++) { + counter++; + const chr = line[j]; + const key2 = getKey(chr); + this.histogram[key2] = (this.histogram[key2] || 0) + 1; + } + counter++; + const key = getKey("\n"); + this.histogram[key] = (this.histogram[key] || 0) + 1; + } + this.totalCount = counter; + } + computeSimilarity(other) { + var _a3, _b; + let sumDifferences = 0; + const maxLength = Math.max(this.histogram.length, other.histogram.length); + for (let i = 0; i < maxLength; i++) { + sumDifferences += Math.abs(((_a3 = this.histogram[i]) !== null && _a3 !== void 0 ? _a3 : 0) - ((_b = other.histogram[i]) !== null && _b !== void 0 ? _b : 0)); + } + return 1 - sumDifferences / (this.totalCount + other.totalCount); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputers.js + var linesDiffComputers = { + getLegacy: () => new LegacyLinesDiffComputer(), + getAdvanced: () => new AdvancedLinesDiffComputer() + }; + + // node_modules/monaco-editor/esm/vs/base/common/color.js + function roundFloat(number, decimalPoints) { + const decimal = Math.pow(10, decimalPoints); + return Math.round(number * decimal) / decimal; + } + var 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; + } + }; + var HSLA = class _HSLA { + constructor(h, s, l, a) { + this._hslaBrand = void 0; + this.h = Math.max(Math.min(360, h), 0) | 0; + this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); + this.l = roundFloat(Math.max(Math.min(1, l), 0), 3); + this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); + } + static equals(a, b) { + return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a; + } + /** + * Converts an RGB color value to HSL. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes r, g, and b are contained in the set [0, 255] and + * returns h in the set [0, 360], s, and l in the set [0, 1]. + */ + 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 h = 0; + let s = 0; + const l = (min + max) / 2; + const chroma = max - min; + if (chroma > 0) { + s = Math.min(l <= 0.5 ? chroma / (2 * l) : chroma / (2 - 2 * l), 1); + switch (max) { + case r: + h = (g - b) / chroma + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / chroma + 2; + break; + case b: + h = (r - g) / chroma + 4; + break; + } + h *= 60; + h = Math.round(h); + } + return new _HSLA(h, s, l, a); + } + static _hue2rgb(p2, q, t2) { + if (t2 < 0) { + t2 += 1; + } + if (t2 > 1) { + t2 -= 1; + } + if (t2 < 1 / 6) { + return p2 + (q - p2) * 6 * t2; + } + if (t2 < 1 / 2) { + return q; + } + if (t2 < 2 / 3) { + return p2 + (q - p2) * (2 / 3 - t2) * 6; + } + return p2; + } + /** + * Converts an HSL color value to RGB. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and + * returns r, g, and b in the set [0, 255]. + */ + static toRGBA(hsla) { + const h = hsla.h / 360; + const { s, l, a } = hsla; + let r, g, b; + if (s === 0) { + r = g = b = l; + } else { + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p2 = 2 * l - q; + r = _HSLA._hue2rgb(p2, q, h + 1 / 3); + g = _HSLA._hue2rgb(p2, q, h); + b = _HSLA._hue2rgb(p2, q, h - 1 / 3); + } + return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a); + } + }; + var HSVA = class _HSVA { + constructor(h, s, v, a) { + this._hsvaBrand = void 0; + this.h = Math.max(Math.min(360, h), 0) | 0; + this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); + this.v = roundFloat(Math.max(Math.min(1, v), 0), 3); + this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); + } + static equals(a, b) { + return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a; + } + // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm + 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); + } + // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm + static toRGBA(hsva) { + const { h, s, v, a } = hsva; + const c = v * s; + const x = c * (1 - Math.abs(h / 60 % 2 - 1)); + const m = v - c; + let [r, g, b] = [0, 0, 0]; + if (h < 60) { + r = c; + g = x; + } else if (h < 120) { + r = x; + g = c; + } else if (h < 180) { + g = c; + b = x; + } else if (h < 240) { + g = x; + b = c; + } else if (h < 300) { + r = x; + b = c; + } else if (h <= 360) { + r = c; + b = x; + } + r = Math.round((r + m) * 255); + g = Math.round((g + m) * 255); + b = Math.round((b + m) * 255); + return new RGBA(r, g, b, a); + } + }; + var Color = class _Color { + 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); + } + /** + * http://www.w3.org/TR/WCAG20/#relativeluminancedef + * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. + */ + getRelativeLuminance() { + const R = _Color._relativeLuminanceForComponent(this.rgba.r); + const G = _Color._relativeLuminanceForComponent(this.rgba.g); + const B = _Color._relativeLuminanceForComponent(this.rgba.b); + const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B; + return roundFloat(luminance, 4); + } + static _relativeLuminanceForComponent(color) { + const c = color / 255; + return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); + } + /** + * http://www.w3.org/TR/WCAG20/#contrast-ratiodef + * Returns the contrast ration number in the set [1, 21]. + */ + getContrastRatio(another) { + const lum1 = this.getRelativeLuminance(); + const lum2 = another.getRelativeLuminance(); + return lum1 > lum2 ? (lum1 + 0.05) / (lum2 + 0.05) : (lum2 + 0.05) / (lum1 + 0.05); + } + /** + * http://24ways.org/2010/calculating-color-contrast + * Return 'true' if darker color otherwise 'false' + */ + isDarker() { + const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3; + return yiq < 128; + } + /** + * http://24ways.org/2010/calculating-color-contrast + * Return 'true' if lighter color otherwise 'false' + */ + 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 lum1 < lum2; + } + lighten(factor) { + return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a)); + } + darken(factor) { + return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a)); + } + transparent(factor) { + const { r, g, b, a } = this.rgba; + return new _Color(new RGBA(r, g, b, a * factor)); + } + isTransparent() { + return this.rgba.a === 0; + } + isOpaque() { + return this.rgba.a === 1; + } + opposite() { + return new _Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); + } + blend(c) { + const rgba = c.rgba; + const thisA = this.rgba.a; + const colorA = rgba.a; + const a = thisA + colorA * (1 - thisA); + if (a < 1e-6) { + return _Color.transparent; + } + const r = this.rgba.r * thisA / a + rgba.r * colorA * (1 - thisA) / a; + const g = this.rgba.g * thisA / a + rgba.g * colorA * (1 - thisA) / a; + const b = this.rgba.b * thisA / a + rgba.b * colorA * (1 - thisA) / a; + return new _Color(new RGBA(r, g, b, a)); + } + makeOpaque(opaqueBackground) { + if (this.isOpaque() || opaqueBackground.rgba.a !== 1) { + return this; + } + const { r, g, b, a } = this.rgba; + return new _Color(new RGBA(opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r), opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g), opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b), 1)); + } + flatten(...backgrounds) { + const background = backgrounds.reduceRight((accumulator, color) => { + return _Color._flatten(color, accumulator); + }); + return _Color._flatten(this, background); + } + static _flatten(foreground, background) { + const backgroundAlpha = 1 - foreground.rgba.a; + return new _Color(new RGBA(backgroundAlpha * background.rgba.r + foreground.rgba.a * foreground.rgba.r, backgroundAlpha * background.rgba.g + foreground.rgba.a * foreground.rgba.g, backgroundAlpha * background.rgba.b + foreground.rgba.a * foreground.rgba.b)); + } + toString() { + if (!this._toString) { + this._toString = _Color.Format.CSS.format(this); + } + return this._toString; + } + static getLighterColor(of, relative2, factor) { + if (of.isLighterThan(relative2)) { + return of; + } + factor = factor ? factor : 0.5; + const lum1 = of.getRelativeLuminance(); + const lum2 = relative2.getRelativeLuminance(); + factor = factor * (lum2 - lum1) / lum2; + return of.lighten(factor); + } + static getDarkerColor(of, relative2, factor) { + if (of.isDarkerThan(relative2)) { + return of; + } + factor = factor ? factor : 0.5; + const lum1 = of.getRelativeLuminance(); + const lum2 = relative2.getRelativeLuminance(); + factor = factor * (lum1 - lum2) / lum1; + return of.darken(factor); + } + }; + Color.white = new Color(new RGBA(255, 255, 255, 1)); + Color.black = new Color(new RGBA(0, 0, 0, 1)); + Color.red = new Color(new RGBA(255, 0, 0, 1)); + Color.blue = new Color(new RGBA(0, 0, 255, 1)); + Color.green = new Color(new RGBA(0, 255, 0, 1)); + Color.cyan = new Color(new RGBA(0, 255, 255, 1)); + Color.lightgrey = new Color(new RGBA(211, 211, 211, 1)); + Color.transparent = new Color(new RGBA(0, 0, 0, 0)); + (function(Color3) { + let Format; + (function(Format2) { + let CSS; + (function(CSS2) { + function formatRGB(color) { + if (color.rgba.a === 1) { + return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`; + } + return Color3.Format.CSS.formatRGBA(color); + } + CSS2.formatRGB = formatRGB; + function formatRGBA(color) { + return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+color.rgba.a.toFixed(2)})`; + } + CSS2.formatRGBA = formatRGBA; + function formatHSL(color) { + if (color.hsla.a === 1) { + return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`; + } + return Color3.Format.CSS.formatHSLA(color); + } + CSS2.formatHSL = formatHSL; + function formatHSLA(color) { + return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`; + } + CSS2.formatHSLA = formatHSLA; + function _toTwoDigitHex(n) { + const r = n.toString(16); + return r.length !== 2 ? "0" + r : r; + } + function formatHex(color) { + return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`; + } + CSS2.formatHex = formatHex; + function formatHexA(color, compact = false) { + if (compact && color.rgba.a === 1) { + return Color3.Format.CSS.formatHex(color); + } + return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`; + } + CSS2.formatHexA = formatHexA; + function format2(color) { + if (color.isOpaque()) { + return Color3.Format.CSS.formatHex(color); + } + return Color3.Format.CSS.formatRGBA(color); + } + CSS2.format = format2; + function parseHex(hex) { + const length = hex.length; + if (length === 0) { + return null; + } + if (hex.charCodeAt(0) !== 35) { + return null; + } + if (length === 7) { + const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); + const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); + const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); + return new Color3(new RGBA(r, g, b, 1)); + } + if (length === 9) { + const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); + const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); + const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); + const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8)); + return new Color3(new RGBA(r, g, b, a / 255)); + } + if (length === 4) { + const r = _parseHexDigit(hex.charCodeAt(1)); + const g = _parseHexDigit(hex.charCodeAt(2)); + const b = _parseHexDigit(hex.charCodeAt(3)); + return new Color3(new RGBA(16 * r + r, 16 * g + g, 16 * b + b)); + } + if (length === 5) { + const r = _parseHexDigit(hex.charCodeAt(1)); + const g = _parseHexDigit(hex.charCodeAt(2)); + const b = _parseHexDigit(hex.charCodeAt(3)); + const a = _parseHexDigit(hex.charCodeAt(4)); + return new Color3(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255)); + } + return null; + } + CSS2.parseHex = parseHex; + function _parseHexDigit(charCode) { + switch (charCode) { + case 48: + return 0; + case 49: + return 1; + case 50: + return 2; + case 51: + return 3; + case 52: + return 4; + case 53: + return 5; + case 54: + return 6; + case 55: + return 7; + case 56: + return 8; + case 57: + return 9; + case 97: + return 10; + case 65: + return 10; + case 98: + return 11; + case 66: + return 11; + case 99: + return 12; + case 67: + return 12; + case 100: + return 13; + case 68: + return 13; + case 101: + return 14; + case 69: + return 14; + case 102: + return 15; + case 70: + return 15; + } + return 0; + } + })(CSS = Format2.CSS || (Format2.CSS = {})); + })(Format = Color3.Format || (Color3.Format = {})); + })(Color || (Color = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js + function _parseCaptureGroups(captureGroups) { + const values = []; + for (const captureGroup of captureGroups) { + const parsedNumber = Number(captureGroup); + if (parsedNumber || parsedNumber === 0 && captureGroup.replace(/\s/g, "") !== "") { + values.push(parsedNumber); + } + } + return values; + } + function _toIColor(r, g, b, a) { + return { + red: r / 255, + blue: b / 255, + green: g / 255, + alpha: a + }; + } + function _findRange(model, match) { + const index = match.index; + const length = match[0].length; + if (!index) { + return; + } + const startPosition = model.positionAt(index); + const range = { + startLineNumber: startPosition.lineNumber, + startColumn: startPosition.column, + endLineNumber: startPosition.lineNumber, + endColumn: startPosition.column + length + }; + return range; + } + function _findHexColorInformation(range, hexValue) { + if (!range) { + return; + } + const parsedHexColor = Color.Format.CSS.parseHex(hexValue); + if (!parsedHexColor) { + return; + } + return { + range, + color: _toIColor(parsedHexColor.rgba.r, parsedHexColor.rgba.g, parsedHexColor.rgba.b, parsedHexColor.rgba.a) + }; + } + function _findRGBColorInformation(range, matches, isAlpha) { + if (!range || matches.length !== 1) { + return; + } + const match = matches[0]; + const captureGroups = match.values(); + const parsedRegex = _parseCaptureGroups(captureGroups); + return { + range, + color: _toIColor(parsedRegex[0], parsedRegex[1], parsedRegex[2], isAlpha ? parsedRegex[3] : 1) + }; + } + function _findHSLColorInformation(range, matches, isAlpha) { + if (!range || matches.length !== 1) { + return; + } + const match = matches[0]; + const captureGroups = match.values(); + const parsedRegex = _parseCaptureGroups(captureGroups); + const colorEquivalent = new Color(new HSLA(parsedRegex[0], parsedRegex[1] / 100, parsedRegex[2] / 100, isAlpha ? parsedRegex[3] : 1)); + return { + range, + color: _toIColor(colorEquivalent.rgba.r, colorEquivalent.rgba.g, colorEquivalent.rgba.b, colorEquivalent.rgba.a) + }; + } + function _findMatches(model, regex) { + if (typeof model === "string") { + return [...model.matchAll(regex)]; + } else { + return model.findMatches(regex); + } + } + function computeColors(model) { + const result = []; + const initialValidationRegex = /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm; + const initialValidationMatches = _findMatches(model, initialValidationRegex); + if (initialValidationMatches.length > 0) { + 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); + } + + // node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js + var __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()); + }); + }; + var 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; i < this._lines.length; i++) { + const line = this._lines[i]; + const offsetToAdd = this.offsetAt(new Position(i + 1, 1)); + const iteratorOverMatches = line.matchAll(regex); + for (const match of iteratorOverMatches) { + if (match.index || match.index === 0) { + match.index = match.index + offsetToAdd; + } + matches.push(match); + } + } + return matches; + } + getLinesContent() { + return this._lines.slice(0); + } + getLineCount() { + return this._lines.length; + } + getLineContent(lineNumber) { + return this._lines[lineNumber - 1]; + } + getWordAtPosition(position, wordDefinition) { + const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0); + if (wordAtText) { + return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn); + } + return null; + } + getWordUntilPosition(position, wordDefinition) { + const wordAtPosition = this.getWordAtPosition(position, wordDefinition); + if (!wordAtPosition) { + return { + word: "", + startColumn: position.column, + endColumn: position.column + }; + } + return { + word: this._lines[position.lineNumber - 1].substring(wordAtPosition.startColumn - 1, position.column - 1), + startColumn: wordAtPosition.startColumn, + endColumn: position.column + }; + } + words(wordDefinition) { + const lines = this._lines; + const wordenize = this._wordenize.bind(this); + let lineNumber = 0; + let lineText = ""; + let wordRangesIdx = 0; + let wordRanges = []; + return { + *[Symbol.iterator]() { + while (true) { + if (wordRangesIdx < wordRanges.length) { + const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end); + wordRangesIdx += 1; + yield value; + } else { + if (lineNumber < lines.length) { + lineText = lines[lineNumber]; + wordRanges = wordenize(lineText, wordDefinition); + wordRangesIdx = 0; + lineNumber += 1; + } else { + break; + } + } + } + } + }; + } + getLineWords(lineNumber, wordDefinition) { + const content = this._lines[lineNumber - 1]; + const ranges = this._wordenize(content, wordDefinition); + const words = []; + for (const range of ranges) { + words.push({ + word: content.substring(range.start, range.end), + startColumn: range.start + 1, + endColumn: range.end + 1 + }); + } + return words; + } + _wordenize(content, wordDefinition) { + const result = []; + let match; + wordDefinition.lastIndex = 0; + while (match = wordDefinition.exec(content)) { + if (match[0].length === 0) { + break; + } + result.push({ start: match.index, end: match.index + match[0].length }); + } + return result; + } + getValueInRange(range) { + range = this._validateRange(range); + if (range.startLineNumber === range.endLineNumber) { + return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); + } + const lineEnding = this._eol; + const startLineIndex = range.startLineNumber - 1; + const endLineIndex = range.endLineNumber - 1; + const resultLines = []; + resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); + for (let i = startLineIndex + 1; i < endLineIndex; i++) { + resultLines.push(this._lines[i]); + } + resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); + return resultLines.join(lineEnding); + } + offsetAt(position) { + position = this._validatePosition(position); + this._ensureLineStarts(); + return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1); + } + positionAt(offset) { + offset = Math.floor(offset); + offset = Math.max(0, offset); + this._ensureLineStarts(); + const out = this._lineStarts.getIndexOf(offset); + const lineLength = this._lines[out.index].length; + return { + lineNumber: 1 + out.index, + column: 1 + Math.min(out.remainder, lineLength) + }; + } + _validateRange(range) { + const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn }); + const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn }); + if (start.lineNumber !== range.startLineNumber || start.column !== range.startColumn || end.lineNumber !== range.endLineNumber || end.column !== range.endColumn) { + return { + startLineNumber: start.lineNumber, + startColumn: start.column, + endLineNumber: end.lineNumber, + endColumn: end.column + }; + } + return range; + } + _validatePosition(position) { + if (!Position.isIPosition(position)) { + throw new Error("bad position"); + } + let { lineNumber, column } = position; + let hasChanged = false; + if (lineNumber < 1) { + lineNumber = 1; + column = 1; + hasChanged = true; + } else if (lineNumber > this._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, column }; + } + } + }; + var EditorSimpleWorker = class _EditorSimpleWorker { + constructor(host, foreignModuleFactory) { + this._host = host; + this._models = /* @__PURE__ */ Object.create(null); + this._foreignModuleFactory = foreignModuleFactory; + this._foreignModule = null; + } + dispose() { + this._models = /* @__PURE__ */ 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, options, range) { + return __awaiter2(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, options, range); + }); + } + // ---- BEGIN diff -------------------------------------------------------------------------- + computeDiff(originalUrl, modifiedUrl, options, algorithm) { + return __awaiter2(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, options, algorithm); + }); + } + static computeDiff(originalTextModel, modifiedTextModel, options, algorithm) { + const diffAlgorithm = algorithm === "advanced" ? linesDiffComputers.getAdvanced() : linesDiffComputers.getLegacy(); + const originalLines = originalTextModel.getLinesContent(); + const modifiedLines = modifiedTextModel.getLinesContent(); + const result = diffAlgorithm.computeDiff(originalLines, modifiedLines, options); + const identical = result.changes.length > 0 ? false : this._modelsAreIdentical(originalTextModel, modifiedTextModel); + function getLineChanges(changes) { + return changes.map((m) => { + var _a3; + return [m.originalRange.startLineNumber, m.originalRange.endLineNumberExclusive, m.modifiedRange.startLineNumber, m.modifiedRange.endLineNumberExclusive, (_a3 = m.innerChanges) === null || _a3 === void 0 ? void 0 : _a3.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, + 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; + } + computeDirtyDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace) { + return __awaiter2(this, void 0, void 0, function* () { + const original = this._getModel(originalUrl); + const modified = this._getModel(modifiedUrl); + if (!original || !modified) { + return null; + } + const originalLines = original.getLinesContent(); + const modifiedLines = modified.getLinesContent(); + const diffComputer = new DiffComputer(originalLines, modifiedLines, { + shouldComputeCharChanges: false, + shouldPostProcessCharChanges: false, + shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, + shouldMakePrettyDiff: true, + maxComputationTime: 1e3 + }); + return diffComputer.computeDiff().changes; + }); + } + computeMoreMinimalEdits(modelUrl, edits, pretty) { + return __awaiter2(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, text: text3, eol } of edits) { + if (typeof eol === "number") { + lastEol = eol; + } + if (Range.isEmpty(range) && !text3) { + continue; + } + const original = model.getValueInRange(range); + text3 = text3.replace(/\r\n|\n|\r/g, model.eol); + if (original === text3) { + continue; + } + if (Math.max(text3.length, original.length) > _EditorSimpleWorker._diffLimit) { + result.push({ range, text: text3 }); + continue; + } + const changes = stringDiff(original, text3, pretty); + const editOffset = model.offsetAt(Range.lift(range).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: text3.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; + }); + } + computeHumanReadableDiff(modelUrl, edits, options) { + return __awaiter2(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, text: text3, eol } of edits) { + let addPositions = function(pos1, pos2) { + return new Position(pos1.lineNumber + pos2.lineNumber - 1, pos2.lineNumber === 1 ? pos1.column + pos2.column - 1 : pos2.column); + }, getText = function(lines, range2) { + const result2 = []; + for (let i = range2.startLineNumber; i <= range2.endLineNumber; i++) { + const line = lines[i - 1]; + if (i === range2.startLineNumber && i === range2.endLineNumber) { + result2.push(line.substring(range2.startColumn - 1, range2.endColumn - 1)); + } else if (i === range2.startLineNumber) { + result2.push(line.substring(range2.startColumn - 1)); + } else if (i === range2.endLineNumber) { + result2.push(line.substring(0, range2.endColumn - 1)); + } else { + result2.push(line); + } + } + return result2; + }; + if (typeof eol === "number") { + lastEol = eol; + } + if (Range.isEmpty(range) && !text3) { + continue; + } + const original = model.getValueInRange(range); + text3 = text3.replace(/\r\n|\n|\r/g, model.eol); + if (original === text3) { + continue; + } + if (Math.max(text3.length, original.length) > _EditorSimpleWorker._diffLimit) { + result.push({ range, text: text3 }); + continue; + } + const originalLines = original.split(/\r\n|\n|\r/); + const modifiedLines = text3.split(/\r\n|\n|\r/); + const diff = linesDiffComputers.getAdvanced().computeDiff(originalLines, modifiedLines, options); + const start = Range.lift(range).getStartPosition(); + for (const c of diff.changes) { + if (c.innerChanges) { + for (const x of c.innerChanges) { + result.push({ + range: Range.fromPositions(addPositions(start, x.originalRange.getStartPosition()), addPositions(start, x.originalRange.getEndPosition())), + text: getText(modifiedLines, x.modifiedRange).join(model.eol) + }); + } + } else { + throw new BugIndicatingError("The experimental diff algorithm always produces inner changes"); + } + } + } + if (typeof lastEol === "number") { + result.push({ eol: lastEol, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }); + } + return result; + }); + } + // ---- END minimal edits --------------------------------------------------------------- + computeLinks(modelUrl) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + return computeLinks(model); + }); + } + // --- BEGIN default document colors ----------------------------------------------------------- + computeDefaultDocumentColors(modelUrl) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + return computeDefaultDocumentColors(model); + }); + } + textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const sw = new StopWatch(); + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + const seen = /* @__PURE__ */ new Set(); + outer: + for (const url of modelUrls) { + const model = this._getModel(url); + if (!model) { + continue; + } + for (const word2 of model.words(wordDefRegExp)) { + if (word2 === leadingWord || !isNaN(Number(word2))) { + continue; + } + seen.add(word2); + if (seen.size > _EditorSimpleWorker._suggestionsLimit) { + break outer; + } + } + } + return { words: Array.from(seen), duration: sw.elapsed() }; + }); + } + // ---- END suggest -------------------------------------------------------------------------- + //#region -- word ranges -- + computeWordRanges(modelUrl, range, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return /* @__PURE__ */ Object.create(null); + } + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + const result = /* @__PURE__ */ Object.create(null); + for (let line = range.startLineNumber; line < range.endLineNumber; line++) { + const words = model.getLineWords(line, wordDefRegExp); + for (const word2 of words) { + if (!isNaN(Number(word2.word))) { + continue; + } + let array = result[word2.word]; + if (!array) { + array = []; + result[word2.word] = array; + } + array.push({ + startLineNumber: line, + startColumn: word2.startColumn, + endLineNumber: line, + endColumn: word2.endColumn + }); + } + } + return result; + }); + } + //#endregion + navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + if (range.startColumn === range.endColumn) { + range = { + startLineNumber: range.startLineNumber, + startColumn: range.startColumn, + endLineNumber: range.endLineNumber, + endColumn: range.endColumn + 1 + }; + } + const selectionText = model.getValueInRange(range); + const wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp); + if (!wordRange) { + return null; + } + const word2 = model.getValueInRange(wordRange); + const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word2, up); + return result; + }); + } + // ---- BEGIN foreign module support -------------------------------------------------------------------------- + loadForeignModule(moduleId, createData, foreignHostMethods) { + const proxyMethodRequest = (method, args) => { + return this._host.fhr(method, args); + }; + const foreignHost = createProxyObject(foreignHostMethods, proxyMethodRequest); + const ctx = { + host: foreignHost, + getMirrorModels: () => { + return this._getModels(); + } + }; + if (this._foreignModuleFactory) { + this._foreignModule = this._foreignModuleFactory(ctx, createData); + return Promise.resolve(getAllMethodNames(this._foreignModule)); + } + return Promise.reject(new Error(`Unexpected usage`)); + } + // foreign method request + 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(); + } + + // node_modules/monaco-editor/esm/vs/editor/editor.worker.js + var initialized = false; + function initialize(foreignModule) { + if (initialized) { + return; + } + initialized = true; + const simpleWorker = new SimpleWorkerServer((msg) => { + globalThis.postMessage(msg); + }, (host) => new EditorSimpleWorker(host, foreignModule)); + globalThis.onmessage = (e) => { + simpleWorker.onmessage(e.data); + }; + } + globalThis.onmessage = (e) => { + if (!initialized) { + initialize(null); + } + }; + + // node_modules/graphql/jsutils/devAssert.mjs + function devAssert(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message); + } + } + + // node_modules/graphql/jsutils/isObjectLike.mjs + function isObjectLike(value) { + return typeof value == "object" && value !== null; + } + + // node_modules/graphql/jsutils/invariant.mjs + function invariant(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error( + message != null ? message : "Unexpected invariant triggered." + ); + } + } + + // node_modules/graphql/language/location.mjs + var LineRegExp = /\r\n|[\n\r]/g; + function getLocation(source, position) { + let lastLineStart = 0; + let line = 1; + for (const match of source.body.matchAll(LineRegExp)) { + typeof match.index === "number" || invariant(false); + if (match.index >= position) { + break; + } + lastLineStart = match.index + match[0].length; + line += 1; + } + return { + line, + column: position + 1 - lastLineStart + }; + } + + // node_modules/graphql/language/printLocation.mjs + function printLocation(location) { + return printSourceLocation( + location.source, + getLocation(location.source, location.start) + ); + } + function printSourceLocation(source, sourceLocation) { + const firstLineColumnOffset = source.locationOffset.column - 1; + const body = "".padStart(firstLineColumnOffset) + source.body; + const lineIndex = sourceLocation.line - 1; + const lineOffset = source.locationOffset.line - 1; + const lineNum = sourceLocation.line + lineOffset; + const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + const columnNum = sourceLocation.column + columnOffset; + const locationStr = `${source.name}:${lineNum}:${columnNum} +`; + const lines = body.split(/\r\n|[\n\r]/g); + const locationLine = lines[lineIndex]; + if (locationLine.length > 120) { + const subLineIndex = Math.floor(columnNum / 80); + const subLineColumnNum = columnNum % 80; + const subLines = []; + for (let i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); + } + return locationStr + printPrefixedLines([ + [`${lineNum} |`, subLines[0]], + ...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]), + ["|", "^".padStart(subLineColumnNum)], + ["|", subLines[subLineIndex + 1]] + ]); + } + return locationStr + printPrefixedLines([ + // Lines specified like this: ["prefix", "string"], + [`${lineNum - 1} |`, lines[lineIndex - 1]], + [`${lineNum} |`, locationLine], + ["|", "^".padStart(columnNum)], + [`${lineNum + 1} |`, lines[lineIndex + 1]] + ]); + } + function printPrefixedLines(lines) { + const existingLines = lines.filter(([_, line]) => line !== void 0); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n"); + } + + // node_modules/graphql/error/GraphQLError.mjs + function toNormalizedOptions(args) { + const firstArg = args[0]; + if (firstArg == null || "kind" in firstArg || "length" in firstArg) { + return { + nodes: firstArg, + source: args[1], + positions: args[2], + path: args[3], + originalError: args[4], + extensions: args[5] + }; + } + return firstArg; + } + var GraphQLError = class _GraphQLError extends Error { + /** + * An array of `{ line, column }` locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + /** + * The original error thrown from a field resolver during execution. + */ + /** + * Extension fields to add to the formatted error. + */ + /** + * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. + */ + constructor(message, ...rawArgs) { + var _this$nodes, _nodeLocations$, _ref; + const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs); + super(message); + this.name = "GraphQLError"; + this.path = path !== null && path !== void 0 ? path : void 0; + this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0; + this.nodes = undefinedIfEmpty( + Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0 + ); + const nodeLocations = undefinedIfEmpty( + (_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null) + ); + this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; + this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start); + this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start)); + const originalExtensions = isObjectLike( + originalError === null || originalError === void 0 ? void 0 : originalError.extensions + ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0; + this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null); + Object.defineProperties(this, { + message: { + writable: true, + enumerable: true + }, + name: { + enumerable: false + }, + nodes: { + enumerable: false + }, + source: { + enumerable: false + }, + positions: { + enumerable: false + }, + originalError: { + enumerable: false + } + }); + if (originalError !== null && originalError !== void 0 && originalError.stack) { + Object.defineProperty(this, "stack", { + value: originalError.stack, + writable: true, + configurable: true + }); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, _GraphQLError); + } else { + Object.defineProperty(this, "stack", { + value: Error().stack, + writable: true, + configurable: true + }); + } + } + get [Symbol.toStringTag]() { + return "GraphQLError"; + } + toString() { + let output = this.message; + if (this.nodes) { + for (const node of this.nodes) { + if (node.loc) { + output += "\n\n" + printLocation(node.loc); + } + } + } else if (this.source && this.locations) { + for (const location of this.locations) { + output += "\n\n" + printSourceLocation(this.source, location); + } + } + return output; + } + toJSON() { + const formattedError = { + message: this.message + }; + if (this.locations != null) { + formattedError.locations = this.locations; + } + if (this.path != null) { + formattedError.path = this.path; + } + if (this.extensions != null && Object.keys(this.extensions).length > 0) { + formattedError.extensions = this.extensions; + } + return formattedError; + } + }; + function undefinedIfEmpty(array) { + return array === void 0 || array.length === 0 ? void 0 : array; + } + + // node_modules/graphql/error/syntaxError.mjs + function syntaxError(source, position, description) { + return new GraphQLError(`Syntax Error: ${description}`, { + source, + positions: [position] + }); + } + + // node_modules/graphql/language/ast.mjs + var Location = class { + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The Token at which this Node begins. + */ + /** + * The Token at which this Node ends. + */ + /** + * The Source document the AST represents. + */ + constructor(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + get [Symbol.toStringTag]() { + return "Location"; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } + }; + var Token2 = class { + /** + * The kind of Token. + */ + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The 1-indexed line number on which this Token appears. + */ + /** + * The 1-indexed column number at which this Token begins. + */ + /** + * For non-punctuation tokens, represents the interpreted value of the token. + * + * Note: is undefined for punctuation tokens, but typed as string for + * convenience in the parser. + */ + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + constructor(kind, start, end, line, column, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; + this.value = value; + this.prev = null; + this.next = null; + } + get [Symbol.toStringTag]() { + return "Token"; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } + }; + var QueryDocumentKeys = { + Name: [], + Document: ["definitions"], + OperationDefinition: [ + "name", + "variableDefinitions", + "directives", + "selectionSet" + ], + VariableDefinition: ["variable", "type", "defaultValue", "directives"], + Variable: ["name"], + SelectionSet: ["selections"], + Field: ["alias", "name", "arguments", "directives", "selectionSet"], + Argument: ["name", "value"], + FragmentSpread: ["name", "directives"], + InlineFragment: ["typeCondition", "directives", "selectionSet"], + FragmentDefinition: [ + "name", + // Note: fragment variable definitions are deprecated and will removed in v17.0.0 + "variableDefinitions", + "typeCondition", + "directives", + "selectionSet" + ], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ["values"], + ObjectValue: ["fields"], + ObjectField: ["name", "value"], + Directive: ["name", "arguments"], + NamedType: ["name"], + ListType: ["type"], + NonNullType: ["type"], + SchemaDefinition: ["description", "directives", "operationTypes"], + OperationTypeDefinition: ["type"], + ScalarTypeDefinition: ["description", "name", "directives"], + ObjectTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + FieldDefinition: ["description", "name", "arguments", "type", "directives"], + InputValueDefinition: [ + "description", + "name", + "type", + "defaultValue", + "directives" + ], + InterfaceTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeDefinition: ["description", "name", "directives", "types"], + EnumTypeDefinition: ["description", "name", "directives", "values"], + EnumValueDefinition: ["description", "name", "directives"], + InputObjectTypeDefinition: ["description", "name", "directives", "fields"], + DirectiveDefinition: ["description", "name", "arguments", "locations"], + SchemaExtension: ["directives", "operationTypes"], + ScalarTypeExtension: ["name", "directives"], + ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], + InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], + UnionTypeExtension: ["name", "directives", "types"], + EnumTypeExtension: ["name", "directives", "values"], + InputObjectTypeExtension: ["name", "directives", "fields"] + }; + var kindValues = new Set(Object.keys(QueryDocumentKeys)); + function isNode(maybeNode) { + const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; + return typeof maybeKind === "string" && kindValues.has(maybeKind); + } + var OperationTypeNode; + (function(OperationTypeNode2) { + OperationTypeNode2["QUERY"] = "query"; + OperationTypeNode2["MUTATION"] = "mutation"; + OperationTypeNode2["SUBSCRIPTION"] = "subscription"; + })(OperationTypeNode || (OperationTypeNode = {})); + + // node_modules/graphql/language/directiveLocation.mjs + var DirectiveLocation; + (function(DirectiveLocation2) { + DirectiveLocation2["QUERY"] = "QUERY"; + DirectiveLocation2["MUTATION"] = "MUTATION"; + DirectiveLocation2["SUBSCRIPTION"] = "SUBSCRIPTION"; + DirectiveLocation2["FIELD"] = "FIELD"; + DirectiveLocation2["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION"; + DirectiveLocation2["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD"; + DirectiveLocation2["INLINE_FRAGMENT"] = "INLINE_FRAGMENT"; + DirectiveLocation2["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION"; + DirectiveLocation2["SCHEMA"] = "SCHEMA"; + DirectiveLocation2["SCALAR"] = "SCALAR"; + DirectiveLocation2["OBJECT"] = "OBJECT"; + DirectiveLocation2["FIELD_DEFINITION"] = "FIELD_DEFINITION"; + DirectiveLocation2["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION"; + DirectiveLocation2["INTERFACE"] = "INTERFACE"; + DirectiveLocation2["UNION"] = "UNION"; + DirectiveLocation2["ENUM"] = "ENUM"; + DirectiveLocation2["ENUM_VALUE"] = "ENUM_VALUE"; + DirectiveLocation2["INPUT_OBJECT"] = "INPUT_OBJECT"; + DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION"; + })(DirectiveLocation || (DirectiveLocation = {})); + + // node_modules/graphql/language/kinds.mjs + var Kind; + (function(Kind2) { + Kind2["NAME"] = "Name"; + Kind2["DOCUMENT"] = "Document"; + Kind2["OPERATION_DEFINITION"] = "OperationDefinition"; + Kind2["VARIABLE_DEFINITION"] = "VariableDefinition"; + Kind2["SELECTION_SET"] = "SelectionSet"; + Kind2["FIELD"] = "Field"; + Kind2["ARGUMENT"] = "Argument"; + Kind2["FRAGMENT_SPREAD"] = "FragmentSpread"; + Kind2["INLINE_FRAGMENT"] = "InlineFragment"; + Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition"; + Kind2["VARIABLE"] = "Variable"; + Kind2["INT"] = "IntValue"; + Kind2["FLOAT"] = "FloatValue"; + Kind2["STRING"] = "StringValue"; + Kind2["BOOLEAN"] = "BooleanValue"; + Kind2["NULL"] = "NullValue"; + Kind2["ENUM"] = "EnumValue"; + Kind2["LIST"] = "ListValue"; + Kind2["OBJECT"] = "ObjectValue"; + Kind2["OBJECT_FIELD"] = "ObjectField"; + Kind2["DIRECTIVE"] = "Directive"; + Kind2["NAMED_TYPE"] = "NamedType"; + Kind2["LIST_TYPE"] = "ListType"; + Kind2["NON_NULL_TYPE"] = "NonNullType"; + Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition"; + Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition"; + Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition"; + Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition"; + Kind2["FIELD_DEFINITION"] = "FieldDefinition"; + Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition"; + Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition"; + Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition"; + Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition"; + Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition"; + Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition"; + Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition"; + Kind2["SCHEMA_EXTENSION"] = "SchemaExtension"; + Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension"; + Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension"; + Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension"; + Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension"; + Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension"; + Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension"; + })(Kind || (Kind = {})); + + // node_modules/graphql/language/characterClasses.mjs + function isWhiteSpace(code) { + return code === 9 || code === 32; + } + function isDigit(code) { + return code >= 48 && code <= 57; + } + function isLetter(code) { + return code >= 97 && code <= 122 || // A-Z + code >= 65 && code <= 90; + } + function isNameStart(code) { + return isLetter(code) || code === 95; + } + function isNameContinue(code) { + return isLetter(code) || isDigit(code) || code === 95; + } + + // node_modules/graphql/language/blockString.mjs + function dedentBlockStringLines(lines) { + var _firstNonEmptyLine2; + let commonIndent = Number.MAX_SAFE_INTEGER; + let firstNonEmptyLine = null; + let lastNonEmptyLine = -1; + for (let i = 0; i < lines.length; ++i) { + var _firstNonEmptyLine; + const line = lines[i]; + const indent2 = leadingWhitespace(line); + if (indent2 === line.length) { + continue; + } + firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; + lastNonEmptyLine = i; + if (i !== 0 && indent2 < commonIndent) { + commonIndent = indent2; + } + } + return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice( + (_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, + lastNonEmptyLine + 1 + ); + } + function leadingWhitespace(str) { + let i = 0; + while (i < str.length && isWhiteSpace(str.charCodeAt(i))) { + ++i; + } + return i; + } + function printBlockString(value, options) { + const escapedValue = value.replace(/"""/g, '\\"""'); + const lines = escapedValue.split(/\r\n|[\n\r]/g); + const isSingleLine = lines.length === 1; + const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); + const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); + const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; + const hasTrailingSlash = value.endsWith("\\"); + const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; + const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability + (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); + let result = ""; + const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0)); + if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { + result += "\n"; + } + result += escapedValue; + if (printAsMultipleLines || forceTrailingNewline) { + result += "\n"; + } + return '"""' + result + '"""'; + } + + // node_modules/graphql/language/tokenKind.mjs + var TokenKind; + (function(TokenKind2) { + TokenKind2["SOF"] = ""; + TokenKind2["EOF"] = ""; + TokenKind2["BANG"] = "!"; + TokenKind2["DOLLAR"] = "$"; + TokenKind2["AMP"] = "&"; + TokenKind2["PAREN_L"] = "("; + TokenKind2["PAREN_R"] = ")"; + TokenKind2["SPREAD"] = "..."; + TokenKind2["COLON"] = ":"; + TokenKind2["EQUALS"] = "="; + TokenKind2["AT"] = "@"; + TokenKind2["BRACKET_L"] = "["; + TokenKind2["BRACKET_R"] = "]"; + TokenKind2["BRACE_L"] = "{"; + TokenKind2["PIPE"] = "|"; + TokenKind2["BRACE_R"] = "}"; + TokenKind2["NAME"] = "Name"; + TokenKind2["INT"] = "Int"; + TokenKind2["FLOAT"] = "Float"; + TokenKind2["STRING"] = "String"; + TokenKind2["BLOCK_STRING"] = "BlockString"; + TokenKind2["COMMENT"] = "Comment"; + })(TokenKind || (TokenKind = {})); + + // node_modules/graphql/language/lexer.mjs + var Lexer = class { + /** + * The previously focused non-ignored token. + */ + /** + * The currently focused non-ignored token. + */ + /** + * The (1-indexed) line containing the current token. + */ + /** + * The character offset at which the current line begins. + */ + constructor(source) { + const startOfFileToken = new Token2(TokenKind.SOF, 0, 0, 0, 0); + this.source = source; + this.lastToken = startOfFileToken; + this.token = startOfFileToken; + this.line = 1; + this.lineStart = 0; + } + get [Symbol.toStringTag]() { + return "Lexer"; + } + /** + * Advances the token stream to the next non-ignored token. + */ + advance() { + this.lastToken = this.token; + const token = this.token = this.lookahead(); + return token; + } + /** + * Looks ahead and returns the next non-ignored token, but does not change + * the state of Lexer. + */ + lookahead() { + let token = this.token; + if (token.kind !== TokenKind.EOF) { + do { + if (token.next) { + token = token.next; + } else { + const nextToken = readNextToken(this, token.end); + token.next = nextToken; + nextToken.prev = token; + token = nextToken; + } + } while (token.kind === TokenKind.COMMENT); + } + return token; + } + }; + function isPunctuatorTokenKind(kind) { + return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R; + } + function isUnicodeScalarValue(code) { + return code >= 0 && code <= 55295 || code >= 57344 && code <= 1114111; + } + function isSupplementaryCodePoint(body, location) { + return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1)); + } + function isLeadingSurrogate(code) { + return code >= 55296 && code <= 56319; + } + function isTrailingSurrogate(code) { + return code >= 56320 && code <= 57343; + } + function printCodePointAt(lexer, location) { + const code = lexer.source.body.codePointAt(location); + if (code === void 0) { + return TokenKind.EOF; + } else if (code >= 32 && code <= 126) { + const char = String.fromCodePoint(code); + return char === '"' ? `'"'` : `"${char}"`; + } + return "U+" + code.toString(16).toUpperCase().padStart(4, "0"); + } + function createToken(lexer, kind, start, end, value) { + const line = lexer.line; + const col = 1 + start - lexer.lineStart; + return new Token2(kind, start, end, line, col, value); + } + function readNextToken(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start; + while (position < bodyLength) { + const code = body.charCodeAt(position); + switch (code) { + case 65279: + case 9: + case 32: + case 44: + ++position; + continue; + case 10: + ++position; + ++lexer.line; + lexer.lineStart = position; + continue; + case 13: + if (body.charCodeAt(position + 1) === 10) { + position += 2; + } else { + ++position; + } + ++lexer.line; + lexer.lineStart = position; + continue; + case 35: + return readComment(lexer, position); + case 33: + return createToken(lexer, TokenKind.BANG, position, position + 1); + case 36: + return createToken(lexer, TokenKind.DOLLAR, position, position + 1); + case 38: + return createToken(lexer, TokenKind.AMP, position, position + 1); + case 40: + return createToken(lexer, TokenKind.PAREN_L, position, position + 1); + case 41: + return createToken(lexer, TokenKind.PAREN_R, position, position + 1); + case 46: + if (body.charCodeAt(position + 1) === 46 && body.charCodeAt(position + 2) === 46) { + return createToken(lexer, TokenKind.SPREAD, position, position + 3); + } + break; + case 58: + return createToken(lexer, TokenKind.COLON, position, position + 1); + case 61: + return createToken(lexer, TokenKind.EQUALS, position, position + 1); + case 64: + return createToken(lexer, TokenKind.AT, position, position + 1); + case 91: + return createToken(lexer, TokenKind.BRACKET_L, position, position + 1); + case 93: + return createToken(lexer, TokenKind.BRACKET_R, position, position + 1); + case 123: + return createToken(lexer, TokenKind.BRACE_L, position, position + 1); + case 124: + return createToken(lexer, TokenKind.PIPE, position, position + 1); + case 125: + return createToken(lexer, TokenKind.BRACE_R, position, position + 1); + case 34: + if (body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) { + return readBlockString(lexer, position); + } + return readString(lexer, position); + } + if (isDigit(code) || code === 45) { + return readNumber(lexer, position, code); + } + if (isNameStart(code)) { + return readName(lexer, position); + } + throw syntaxError( + lexer.source, + position, + code === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.` + ); + } + return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength); + } + function readComment(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 10 || code === 13) { + break; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + break; + } + } + return createToken( + lexer, + TokenKind.COMMENT, + start, + position, + body.slice(start + 1, position) + ); + } + function readNumber(lexer, start, firstCode) { + const body = lexer.source.body; + let position = start; + let code = firstCode; + let isFloat = false; + if (code === 45) { + code = body.charCodeAt(++position); + } + if (code === 48) { + code = body.charCodeAt(++position); + if (isDigit(code)) { + throw syntaxError( + lexer.source, + position, + `Invalid number, unexpected digit after 0: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } else { + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 46) { + isFloat = true; + code = body.charCodeAt(++position); + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 69 || code === 101) { + isFloat = true; + code = body.charCodeAt(++position); + if (code === 43 || code === 45) { + code = body.charCodeAt(++position); + } + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 46 || isNameStart(code)) { + throw syntaxError( + lexer.source, + position, + `Invalid number, expected digit but got: ${printCodePointAt( + lexer, + position + )}.` + ); + } + return createToken( + lexer, + isFloat ? TokenKind.FLOAT : TokenKind.INT, + start, + position, + body.slice(start, position) + ); + } + function readDigits(lexer, start, firstCode) { + if (!isDigit(firstCode)) { + throw syntaxError( + lexer.source, + start, + `Invalid number, expected digit but got: ${printCodePointAt( + lexer, + start + )}.` + ); + } + const body = lexer.source.body; + let position = start + 1; + while (isDigit(body.charCodeAt(position))) { + ++position; + } + return position; + } + function readString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + let chunkStart = position; + let value = ""; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 34) { + value += body.slice(chunkStart, position); + return createToken(lexer, TokenKind.STRING, start, position + 1, value); + } + if (code === 92) { + value += body.slice(chunkStart, position); + const escape = body.charCodeAt(position + 1) === 117 ? body.charCodeAt(position + 2) === 123 ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position); + value += escape.value; + position += escape.size; + chunkStart = position; + continue; + } + if (code === 10 || code === 13) { + break; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw syntaxError( + lexer.source, + position, + `Invalid character within String: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } + throw syntaxError(lexer.source, position, "Unterminated string."); + } + function readEscapedUnicodeVariableWidth(lexer, position) { + const body = lexer.source.body; + let point = 0; + let size = 3; + while (size < 12) { + const code = body.charCodeAt(position + size++); + if (code === 125) { + if (size < 5 || !isUnicodeScalarValue(point)) { + break; + } + return { + value: String.fromCodePoint(point), + size + }; + } + point = point << 4 | readHexDigit(code); + if (point < 0) { + break; + } + } + throw syntaxError( + lexer.source, + position, + `Invalid Unicode escape sequence: "${body.slice( + position, + position + size + )}".` + ); + } + function readEscapedUnicodeFixedWidth(lexer, position) { + const body = lexer.source.body; + const code = read16BitHexCode(body, position + 2); + if (isUnicodeScalarValue(code)) { + return { + value: String.fromCodePoint(code), + size: 6 + }; + } + if (isLeadingSurrogate(code)) { + if (body.charCodeAt(position + 6) === 92 && body.charCodeAt(position + 7) === 117) { + const trailingCode = read16BitHexCode(body, position + 8); + if (isTrailingSurrogate(trailingCode)) { + return { + value: String.fromCodePoint(code, trailingCode), + size: 12 + }; + } + } + } + throw syntaxError( + lexer.source, + position, + `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".` + ); + } + function read16BitHexCode(body, position) { + return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3)); + } + function readHexDigit(code) { + return code >= 48 && code <= 57 ? code - 48 : code >= 65 && code <= 70 ? code - 55 : code >= 97 && code <= 102 ? code - 87 : -1; + } + function readEscapedCharacter(lexer, position) { + const body = lexer.source.body; + const code = body.charCodeAt(position + 1); + switch (code) { + case 34: + return { + value: '"', + size: 2 + }; + case 92: + return { + value: "\\", + size: 2 + }; + case 47: + return { + value: "/", + size: 2 + }; + case 98: + return { + value: "\b", + size: 2 + }; + case 102: + return { + value: "\f", + size: 2 + }; + case 110: + return { + value: "\n", + size: 2 + }; + case 114: + return { + value: "\r", + size: 2 + }; + case 116: + return { + value: " ", + size: 2 + }; + } + throw syntaxError( + lexer.source, + position, + `Invalid character escape sequence: "${body.slice( + position, + position + 2 + )}".` + ); + } + function readBlockString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let lineStart = lexer.lineStart; + let position = start + 3; + let chunkStart = position; + let currentLine = ""; + const blockLines = []; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + const token = createToken( + lexer, + TokenKind.BLOCK_STRING, + start, + position + 3, + // Return a string of the lines joined with U+000A. + dedentBlockStringLines(blockLines).join("\n") + ); + lexer.line += blockLines.length - 1; + lexer.lineStart = lineStart; + return token; + } + if (code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) { + currentLine += body.slice(chunkStart, position); + chunkStart = position + 1; + position += 4; + continue; + } + if (code === 10 || code === 13) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + if (code === 13 && body.charCodeAt(position + 1) === 10) { + position += 2; + } else { + ++position; + } + currentLine = ""; + chunkStart = position; + lineStart = position; + continue; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw syntaxError( + lexer.source, + position, + `Invalid character within String: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } + throw syntaxError(lexer.source, position, "Unterminated string."); + } + function readName(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (isNameContinue(code)) { + ++position; + } else { + break; + } + } + return createToken( + lexer, + TokenKind.NAME, + start, + position, + body.slice(start, position) + ); + } + + // node_modules/graphql/jsutils/inspect.mjs + var MAX_ARRAY_LENGTH = 10; + var MAX_RECURSIVE_DEPTH = 2; + function inspect(value) { + return formatValue(value, []); + } + function formatValue(value, seenValues) { + switch (typeof value) { + case "string": + return JSON.stringify(value); + case "function": + return value.name ? `[function ${value.name}]` : "[function]"; + case "object": + return formatObjectValue(value, seenValues); + default: + return String(value); + } + } + function formatObjectValue(value, previouslySeenValues) { + if (value === null) { + return "null"; + } + if (previouslySeenValues.includes(value)) { + return "[Circular]"; + } + const seenValues = [...previouslySeenValues, value]; + if (isJSONable(value)) { + const jsonValue = value.toJSON(); + if (jsonValue !== value) { + return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues); + } + } else if (Array.isArray(value)) { + return formatArray(value, seenValues); + } + return formatObject(value, seenValues); + } + function isJSONable(value) { + return typeof value.toJSON === "function"; + } + function formatObject(object, seenValues) { + const entries = Object.entries(object); + if (entries.length === 0) { + return "{}"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return "[" + getObjectTag(object) + "]"; + } + const properties = entries.map( + ([key, value]) => key + ": " + formatValue(value, seenValues) + ); + return "{ " + properties.join(", ") + " }"; + } + function formatArray(array, seenValues) { + if (array.length === 0) { + return "[]"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return "[Array]"; + } + const len = Math.min(MAX_ARRAY_LENGTH, array.length); + const remaining = array.length - len; + const items = []; + for (let i = 0; i < len; ++i) { + items.push(formatValue(array[i], seenValues)); + } + if (remaining === 1) { + items.push("... 1 more item"); + } else if (remaining > 1) { + items.push(`... ${remaining} more items`); + } + return "[" + items.join(", ") + "]"; + } + function getObjectTag(object) { + const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, ""); + if (tag === "Object" && typeof object.constructor === "function") { + const name2 = object.constructor.name; + if (typeof name2 === "string" && name2 !== "") { + return name2; + } + } + return tag; + } + + // node_modules/graphql/jsutils/instanceOf.mjs + var instanceOf = ( + /* c8 ignore next 6 */ + // FIXME: https://github.com/graphql/graphql-js/issues/2317 + globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf2(value, constructor) { + return value instanceof constructor; + } : function instanceOf3(value, constructor) { + if (value instanceof constructor) { + return true; + } + if (typeof value === "object" && value !== null) { + var _value$constructor; + const className = constructor.prototype[Symbol.toStringTag]; + const valueClassName = ( + // We still need to support constructor's name to detect conflicts with older versions of this library. + Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name + ); + if (className === valueClassName) { + const stringifiedValue = inspect(value); + throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); + } + } + return false; + } + ); + + // node_modules/graphql/language/source.mjs + var Source = class { + constructor(body, name2 = "GraphQL request", locationOffset = { + line: 1, + column: 1 + }) { + typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`); + this.body = body; + this.name = name2; + this.locationOffset = locationOffset; + this.locationOffset.line > 0 || devAssert( + false, + "line in locationOffset is 1-indexed and must be positive." + ); + this.locationOffset.column > 0 || devAssert( + false, + "column in locationOffset is 1-indexed and must be positive." + ); + } + get [Symbol.toStringTag]() { + return "Source"; + } + }; + function isSource(source) { + return instanceOf(source, Source); + } + + // node_modules/graphql/language/parser.mjs + function parse2(source, options) { + const parser = new Parser(source, options); + return parser.parseDocument(); + } + function parseValue(source, options) { + const parser = new Parser(source, options); + parser.expectToken(TokenKind.SOF); + const value = parser.parseValueLiteral(false); + parser.expectToken(TokenKind.EOF); + return value; + } + var Parser = class { + constructor(source, options = {}) { + const sourceObj = isSource(source) ? source : new Source(source); + this._lexer = new Lexer(sourceObj); + this._options = options; + this._tokenCounter = 0; + } + /** + * Converts a name lex token into a name parse node. + */ + parseName() { + const token = this.expectToken(TokenKind.NAME); + return this.node(token, { + kind: Kind.NAME, + value: token.value + }); + } + // Implements the parsing rules in the Document section. + /** + * Document : Definition+ + */ + parseDocument() { + return this.node(this._lexer.token, { + kind: Kind.DOCUMENT, + definitions: this.many( + TokenKind.SOF, + this.parseDefinition, + TokenKind.EOF + ) + }); + } + /** + * Definition : + * - ExecutableDefinition + * - TypeSystemDefinition + * - TypeSystemExtension + * + * ExecutableDefinition : + * - OperationDefinition + * - FragmentDefinition + * + * TypeSystemDefinition : + * - SchemaDefinition + * - TypeDefinition + * - DirectiveDefinition + * + * TypeDefinition : + * - ScalarTypeDefinition + * - ObjectTypeDefinition + * - InterfaceTypeDefinition + * - UnionTypeDefinition + * - EnumTypeDefinition + * - InputObjectTypeDefinition + */ + parseDefinition() { + if (this.peek(TokenKind.BRACE_L)) { + return this.parseOperationDefinition(); + } + const hasDescription = this.peekDescription(); + const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token; + if (keywordToken.kind === TokenKind.NAME) { + switch (keywordToken.value) { + case "schema": + return this.parseSchemaDefinition(); + case "scalar": + return this.parseScalarTypeDefinition(); + case "type": + return this.parseObjectTypeDefinition(); + case "interface": + return this.parseInterfaceTypeDefinition(); + case "union": + return this.parseUnionTypeDefinition(); + case "enum": + return this.parseEnumTypeDefinition(); + case "input": + return this.parseInputObjectTypeDefinition(); + case "directive": + return this.parseDirectiveDefinition(); + } + if (hasDescription) { + throw syntaxError( + this._lexer.source, + this._lexer.token.start, + "Unexpected description, descriptions are supported only on type definitions." + ); + } + switch (keywordToken.value) { + case "query": + case "mutation": + case "subscription": + return this.parseOperationDefinition(); + case "fragment": + return this.parseFragmentDefinition(); + case "extend": + return this.parseTypeSystemExtension(); + } + } + throw this.unexpected(keywordToken); + } + // Implements the parsing rules in the Operations section. + /** + * OperationDefinition : + * - SelectionSet + * - OperationType Name? VariableDefinitions? Directives? SelectionSet + */ + parseOperationDefinition() { + const start = this._lexer.token; + if (this.peek(TokenKind.BRACE_L)) { + return this.node(start, { + kind: Kind.OPERATION_DEFINITION, + operation: OperationTypeNode.QUERY, + name: void 0, + variableDefinitions: [], + directives: [], + selectionSet: this.parseSelectionSet() + }); + } + const operation = this.parseOperationType(); + let name2; + if (this.peek(TokenKind.NAME)) { + name2 = this.parseName(); + } + return this.node(start, { + kind: Kind.OPERATION_DEFINITION, + operation, + name: name2, + variableDefinitions: this.parseVariableDefinitions(), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * OperationType : one of query mutation subscription + */ + parseOperationType() { + const operationToken = this.expectToken(TokenKind.NAME); + switch (operationToken.value) { + case "query": + return OperationTypeNode.QUERY; + case "mutation": + return OperationTypeNode.MUTATION; + case "subscription": + return OperationTypeNode.SUBSCRIPTION; + } + throw this.unexpected(operationToken); + } + /** + * VariableDefinitions : ( VariableDefinition+ ) + */ + parseVariableDefinitions() { + return this.optionalMany( + TokenKind.PAREN_L, + this.parseVariableDefinition, + TokenKind.PAREN_R + ); + } + /** + * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? + */ + parseVariableDefinition() { + return this.node(this._lexer.token, { + kind: Kind.VARIABLE_DEFINITION, + variable: this.parseVariable(), + type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()), + defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseConstValueLiteral() : void 0, + directives: this.parseConstDirectives() + }); + } + /** + * Variable : $ Name + */ + parseVariable() { + const start = this._lexer.token; + this.expectToken(TokenKind.DOLLAR); + return this.node(start, { + kind: Kind.VARIABLE, + name: this.parseName() + }); + } + /** + * ``` + * SelectionSet : { Selection+ } + * ``` + */ + parseSelectionSet() { + return this.node(this._lexer.token, { + kind: Kind.SELECTION_SET, + selections: this.many( + TokenKind.BRACE_L, + this.parseSelection, + TokenKind.BRACE_R + ) + }); + } + /** + * Selection : + * - Field + * - FragmentSpread + * - InlineFragment + */ + parseSelection() { + return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + } + /** + * Field : Alias? Name Arguments? Directives? SelectionSet? + * + * Alias : Name : + */ + parseField() { + const start = this._lexer.token; + const nameOrAlias = this.parseName(); + let alias; + let name2; + if (this.expectOptionalToken(TokenKind.COLON)) { + alias = nameOrAlias; + name2 = this.parseName(); + } else { + name2 = nameOrAlias; + } + return this.node(start, { + kind: Kind.FIELD, + alias, + name: name2, + arguments: this.parseArguments(false), + directives: this.parseDirectives(false), + selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0 + }); + } + /** + * Arguments[Const] : ( Argument[?Const]+ ) + */ + parseArguments(isConst) { + const item = isConst ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R); + } + /** + * Argument[Const] : Name : Value[?Const] + */ + parseArgument(isConst = false) { + const start = this._lexer.token; + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + return this.node(start, { + kind: Kind.ARGUMENT, + name: name2, + value: this.parseValueLiteral(isConst) + }); + } + parseConstArgument() { + return this.parseArgument(true); + } + // Implements the parsing rules in the Fragments section. + /** + * Corresponds to both FragmentSpread and InlineFragment in the spec. + * + * FragmentSpread : ... FragmentName Directives? + * + * InlineFragment : ... TypeCondition? Directives? SelectionSet + */ + parseFragment() { + const start = this._lexer.token; + this.expectToken(TokenKind.SPREAD); + const hasTypeCondition = this.expectOptionalKeyword("on"); + if (!hasTypeCondition && this.peek(TokenKind.NAME)) { + return this.node(start, { + kind: Kind.FRAGMENT_SPREAD, + name: this.parseFragmentName(), + directives: this.parseDirectives(false) + }); + } + return this.node(start, { + kind: Kind.INLINE_FRAGMENT, + typeCondition: hasTypeCondition ? this.parseNamedType() : void 0, + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * FragmentDefinition : + * - fragment FragmentName on TypeCondition Directives? SelectionSet + * + * TypeCondition : NamedType + */ + parseFragmentDefinition() { + const start = this._lexer.token; + this.expectKeyword("fragment"); + if (this._options.allowLegacyFragmentVariables === true) { + return this.node(start, { + kind: Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + variableDefinitions: this.parseVariableDefinitions(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + return this.node(start, { + kind: Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * FragmentName : Name but not `on` + */ + parseFragmentName() { + if (this._lexer.token.value === "on") { + throw this.unexpected(); + } + return this.parseName(); + } + // Implements the parsing rules in the Values section. + /** + * Value[Const] : + * - [~Const] Variable + * - IntValue + * - FloatValue + * - StringValue + * - BooleanValue + * - NullValue + * - EnumValue + * - ListValue[?Const] + * - ObjectValue[?Const] + * + * BooleanValue : one of `true` `false` + * + * NullValue : `null` + * + * EnumValue : Name but not `true`, `false` or `null` + */ + parseValueLiteral(isConst) { + const token = this._lexer.token; + switch (token.kind) { + case TokenKind.BRACKET_L: + return this.parseList(isConst); + case TokenKind.BRACE_L: + return this.parseObject(isConst); + case TokenKind.INT: + this.advanceLexer(); + return this.node(token, { + kind: Kind.INT, + value: token.value + }); + case TokenKind.FLOAT: + this.advanceLexer(); + return this.node(token, { + kind: Kind.FLOAT, + value: token.value + }); + case TokenKind.STRING: + case TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + case TokenKind.NAME: + this.advanceLexer(); + switch (token.value) { + case "true": + return this.node(token, { + kind: Kind.BOOLEAN, + value: true + }); + case "false": + return this.node(token, { + kind: Kind.BOOLEAN, + value: false + }); + case "null": + return this.node(token, { + kind: Kind.NULL + }); + default: + return this.node(token, { + kind: Kind.ENUM, + value: token.value + }); + } + case TokenKind.DOLLAR: + if (isConst) { + this.expectToken(TokenKind.DOLLAR); + if (this._lexer.token.kind === TokenKind.NAME) { + const varName = this._lexer.token.value; + throw syntaxError( + this._lexer.source, + token.start, + `Unexpected variable "$${varName}" in constant value.` + ); + } else { + throw this.unexpected(token); + } + } + return this.parseVariable(); + default: + throw this.unexpected(); + } + } + parseConstValueLiteral() { + return this.parseValueLiteral(true); + } + parseStringLiteral() { + const token = this._lexer.token; + this.advanceLexer(); + return this.node(token, { + kind: Kind.STRING, + value: token.value, + block: token.kind === TokenKind.BLOCK_STRING + }); + } + /** + * ListValue[Const] : + * - [ ] + * - [ Value[?Const]+ ] + */ + parseList(isConst) { + const item = () => this.parseValueLiteral(isConst); + return this.node(this._lexer.token, { + kind: Kind.LIST, + values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R) + }); + } + /** + * ``` + * ObjectValue[Const] : + * - { } + * - { ObjectField[?Const]+ } + * ``` + */ + parseObject(isConst) { + const item = () => this.parseObjectField(isConst); + return this.node(this._lexer.token, { + kind: Kind.OBJECT, + fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R) + }); + } + /** + * ObjectField[Const] : Name : Value[?Const] + */ + parseObjectField(isConst) { + const start = this._lexer.token; + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + return this.node(start, { + kind: Kind.OBJECT_FIELD, + name: name2, + value: this.parseValueLiteral(isConst) + }); + } + // Implements the parsing rules in the Directives section. + /** + * Directives[Const] : Directive[?Const]+ + */ + parseDirectives(isConst) { + const directives = []; + while (this.peek(TokenKind.AT)) { + directives.push(this.parseDirective(isConst)); + } + return directives; + } + parseConstDirectives() { + return this.parseDirectives(true); + } + /** + * ``` + * Directive[Const] : @ Name Arguments[?Const]? + * ``` + */ + parseDirective(isConst) { + const start = this._lexer.token; + this.expectToken(TokenKind.AT); + return this.node(start, { + kind: Kind.DIRECTIVE, + name: this.parseName(), + arguments: this.parseArguments(isConst) + }); + } + // Implements the parsing rules in the Types section. + /** + * Type : + * - NamedType + * - ListType + * - NonNullType + */ + parseTypeReference() { + const start = this._lexer.token; + let type2; + if (this.expectOptionalToken(TokenKind.BRACKET_L)) { + const innerType = this.parseTypeReference(); + this.expectToken(TokenKind.BRACKET_R); + type2 = this.node(start, { + kind: Kind.LIST_TYPE, + type: innerType + }); + } else { + type2 = this.parseNamedType(); + } + if (this.expectOptionalToken(TokenKind.BANG)) { + return this.node(start, { + kind: Kind.NON_NULL_TYPE, + type: type2 + }); + } + return type2; + } + /** + * NamedType : Name + */ + parseNamedType() { + return this.node(this._lexer.token, { + kind: Kind.NAMED_TYPE, + name: this.parseName() + }); + } + // Implements the parsing rules in the Type Definition section. + peekDescription() { + return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING); + } + /** + * Description : StringValue + */ + parseDescription() { + if (this.peekDescription()) { + return this.parseStringLiteral(); + } + } + /** + * ``` + * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } + * ``` + */ + parseSchemaDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("schema"); + const directives = this.parseConstDirectives(); + const operationTypes = this.many( + TokenKind.BRACE_L, + this.parseOperationTypeDefinition, + TokenKind.BRACE_R + ); + return this.node(start, { + kind: Kind.SCHEMA_DEFINITION, + description, + directives, + operationTypes + }); + } + /** + * OperationTypeDefinition : OperationType : NamedType + */ + parseOperationTypeDefinition() { + const start = this._lexer.token; + const operation = this.parseOperationType(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseNamedType(); + return this.node(start, { + kind: Kind.OPERATION_TYPE_DEFINITION, + operation, + type: type2 + }); + } + /** + * ScalarTypeDefinition : Description? scalar Name Directives[Const]? + */ + parseScalarTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("scalar"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.SCALAR_TYPE_DEFINITION, + description, + name: name2, + directives + }); + } + /** + * ObjectTypeDefinition : + * Description? + * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? + */ + parseObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("type"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: Kind.OBJECT_TYPE_DEFINITION, + description, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * ImplementsInterfaces : + * - implements `&`? NamedType + * - ImplementsInterfaces & NamedType + */ + parseImplementsInterfaces() { + return this.expectOptionalKeyword("implements") ? this.delimitedMany(TokenKind.AMP, this.parseNamedType) : []; + } + /** + * ``` + * FieldsDefinition : { FieldDefinition+ } + * ``` + */ + parseFieldsDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseFieldDefinition, + TokenKind.BRACE_R + ); + } + /** + * FieldDefinition : + * - Description? Name ArgumentsDefinition? : Type Directives[Const]? + */ + parseFieldDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseName(); + const args = this.parseArgumentDefs(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseTypeReference(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.FIELD_DEFINITION, + description, + name: name2, + arguments: args, + type: type2, + directives + }); + } + /** + * ArgumentsDefinition : ( InputValueDefinition+ ) + */ + parseArgumentDefs() { + return this.optionalMany( + TokenKind.PAREN_L, + this.parseInputValueDef, + TokenKind.PAREN_R + ); + } + /** + * InputValueDefinition : + * - Description? Name : Type DefaultValue? Directives[Const]? + */ + parseInputValueDef() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseTypeReference(); + let defaultValue; + if (this.expectOptionalToken(TokenKind.EQUALS)) { + defaultValue = this.parseConstValueLiteral(); + } + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.INPUT_VALUE_DEFINITION, + description, + name: name2, + type: type2, + defaultValue, + directives + }); + } + /** + * InterfaceTypeDefinition : + * - Description? interface Name Directives[Const]? FieldsDefinition? + */ + parseInterfaceTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("interface"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: Kind.INTERFACE_TYPE_DEFINITION, + description, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeDefinition : + * - Description? union Name Directives[Const]? UnionMemberTypes? + */ + parseUnionTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("union"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + return this.node(start, { + kind: Kind.UNION_TYPE_DEFINITION, + description, + name: name2, + directives, + types + }); + } + /** + * UnionMemberTypes : + * - = `|`? NamedType + * - UnionMemberTypes | NamedType + */ + parseUnionMemberTypes() { + return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : []; + } + /** + * EnumTypeDefinition : + * - Description? enum Name Directives[Const]? EnumValuesDefinition? + */ + parseEnumTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("enum"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + return this.node(start, { + kind: Kind.ENUM_TYPE_DEFINITION, + description, + name: name2, + directives, + values + }); + } + /** + * ``` + * EnumValuesDefinition : { EnumValueDefinition+ } + * ``` + */ + parseEnumValuesDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseEnumValueDefinition, + TokenKind.BRACE_R + ); + } + /** + * EnumValueDefinition : Description? EnumValue Directives[Const]? + */ + parseEnumValueDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseEnumValueName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.ENUM_VALUE_DEFINITION, + description, + name: name2, + directives + }); + } + /** + * EnumValue : Name but not `true`, `false` or `null` + */ + parseEnumValueName() { + if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") { + throw syntaxError( + this._lexer.source, + this._lexer.token.start, + `${getTokenDesc( + this._lexer.token + )} is reserved and cannot be used for an enum value.` + ); + } + return this.parseName(); + } + /** + * InputObjectTypeDefinition : + * - Description? input Name Directives[Const]? InputFieldsDefinition? + */ + parseInputObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("input"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + return this.node(start, { + kind: Kind.INPUT_OBJECT_TYPE_DEFINITION, + description, + name: name2, + directives, + fields + }); + } + /** + * ``` + * InputFieldsDefinition : { InputValueDefinition+ } + * ``` + */ + parseInputFieldsDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseInputValueDef, + TokenKind.BRACE_R + ); + } + /** + * TypeSystemExtension : + * - SchemaExtension + * - TypeExtension + * + * TypeExtension : + * - ScalarTypeExtension + * - ObjectTypeExtension + * - InterfaceTypeExtension + * - UnionTypeExtension + * - EnumTypeExtension + * - InputObjectTypeDefinition + */ + parseTypeSystemExtension() { + const keywordToken = this._lexer.lookahead(); + if (keywordToken.kind === TokenKind.NAME) { + switch (keywordToken.value) { + case "schema": + return this.parseSchemaExtension(); + case "scalar": + return this.parseScalarTypeExtension(); + case "type": + return this.parseObjectTypeExtension(); + case "interface": + return this.parseInterfaceTypeExtension(); + case "union": + return this.parseUnionTypeExtension(); + case "enum": + return this.parseEnumTypeExtension(); + case "input": + return this.parseInputObjectTypeExtension(); + } + } + throw this.unexpected(keywordToken); + } + /** + * ``` + * SchemaExtension : + * - extend schema Directives[Const]? { OperationTypeDefinition+ } + * - extend schema Directives[Const] + * ``` + */ + parseSchemaExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("schema"); + const directives = this.parseConstDirectives(); + const operationTypes = this.optionalMany( + TokenKind.BRACE_L, + this.parseOperationTypeDefinition, + TokenKind.BRACE_R + ); + if (directives.length === 0 && operationTypes.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.SCHEMA_EXTENSION, + directives, + operationTypes + }); + } + /** + * ScalarTypeExtension : + * - extend scalar Name Directives[Const] + */ + parseScalarTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("scalar"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + if (directives.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.SCALAR_TYPE_EXTENSION, + name: name2, + directives + }); + } + /** + * ObjectTypeExtension : + * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend type Name ImplementsInterfaces? Directives[Const] + * - extend type Name ImplementsInterfaces + */ + parseObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("type"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.OBJECT_TYPE_EXTENSION, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * InterfaceTypeExtension : + * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend interface Name ImplementsInterfaces? Directives[Const] + * - extend interface Name ImplementsInterfaces + */ + parseInterfaceTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("interface"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.INTERFACE_TYPE_EXTENSION, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeExtension : + * - extend union Name Directives[Const]? UnionMemberTypes + * - extend union Name Directives[Const] + */ + parseUnionTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("union"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + if (directives.length === 0 && types.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.UNION_TYPE_EXTENSION, + name: name2, + directives, + types + }); + } + /** + * EnumTypeExtension : + * - extend enum Name Directives[Const]? EnumValuesDefinition + * - extend enum Name Directives[Const] + */ + parseEnumTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("enum"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + if (directives.length === 0 && values.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.ENUM_TYPE_EXTENSION, + name: name2, + directives, + values + }); + } + /** + * InputObjectTypeExtension : + * - extend input Name Directives[Const]? InputFieldsDefinition + * - extend input Name Directives[Const] + */ + parseInputObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("input"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + if (directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.INPUT_OBJECT_TYPE_EXTENSION, + name: name2, + directives, + fields + }); + } + /** + * ``` + * DirectiveDefinition : + * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations + * ``` + */ + parseDirectiveDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("directive"); + this.expectToken(TokenKind.AT); + const name2 = this.parseName(); + const args = this.parseArgumentDefs(); + const repeatable = this.expectOptionalKeyword("repeatable"); + this.expectKeyword("on"); + const locations = this.parseDirectiveLocations(); + return this.node(start, { + kind: Kind.DIRECTIVE_DEFINITION, + description, + name: name2, + arguments: args, + repeatable, + locations + }); + } + /** + * DirectiveLocations : + * - `|`? DirectiveLocation + * - DirectiveLocations | DirectiveLocation + */ + parseDirectiveLocations() { + return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation); + } + /* + * DirectiveLocation : + * - ExecutableDirectiveLocation + * - TypeSystemDirectiveLocation + * + * ExecutableDirectiveLocation : one of + * `QUERY` + * `MUTATION` + * `SUBSCRIPTION` + * `FIELD` + * `FRAGMENT_DEFINITION` + * `FRAGMENT_SPREAD` + * `INLINE_FRAGMENT` + * + * TypeSystemDirectiveLocation : one of + * `SCHEMA` + * `SCALAR` + * `OBJECT` + * `FIELD_DEFINITION` + * `ARGUMENT_DEFINITION` + * `INTERFACE` + * `UNION` + * `ENUM` + * `ENUM_VALUE` + * `INPUT_OBJECT` + * `INPUT_FIELD_DEFINITION` + */ + parseDirectiveLocation() { + const start = this._lexer.token; + const name2 = this.parseName(); + if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name2.value)) { + return name2; + } + throw this.unexpected(start); + } + // Core parsing utility functions + /** + * Returns a node that, if configured to do so, sets a "loc" field as a + * location object, used to identify the place in the source that created a + * given parsed object. + */ + node(startToken, node) { + if (this._options.noLocation !== true) { + node.loc = new Location( + startToken, + this._lexer.lastToken, + this._lexer.source + ); + } + return node; + } + /** + * Determines if the next token is of a given kind + */ + peek(kind) { + return this._lexer.token.kind === kind; + } + /** + * If the next token is of the given kind, return that token after advancing the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + expectToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return token; + } + throw syntaxError( + this._lexer.source, + token.start, + `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.` + ); + } + /** + * If the next token is of the given kind, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ + expectOptionalToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * If the next token is a given keyword, advance the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + expectKeyword(value) { + const token = this._lexer.token; + if (token.kind === TokenKind.NAME && token.value === value) { + this.advanceLexer(); + } else { + throw syntaxError( + this._lexer.source, + token.start, + `Expected "${value}", found ${getTokenDesc(token)}.` + ); + } + } + /** + * If the next token is a given keyword, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ + expectOptionalKeyword(value) { + const token = this._lexer.token; + if (token.kind === TokenKind.NAME && token.value === value) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * Helper function for creating an error when an unexpected lexed token is encountered. + */ + unexpected(atToken) { + const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; + return syntaxError( + this._lexer.source, + token.start, + `Unexpected ${getTokenDesc(token)}.` + ); + } + /** + * Returns a possibly empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + any(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + while (!this.expectOptionalToken(closeKind)) { + nodes.push(parseFn.call(this)); + } + return nodes; + } + /** + * Returns a list of parse nodes, determined by the parseFn. + * It can be empty only if open token is missing otherwise it will always return non-empty list + * that begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + optionalMany(openKind, parseFn, closeKind) { + if (this.expectOptionalToken(openKind)) { + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + return []; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + many(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. + * Advances the parser to the next lex token after last item in the list. + */ + delimitedMany(delimiterKind, parseFn) { + this.expectOptionalToken(delimiterKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (this.expectOptionalToken(delimiterKind)); + return nodes; + } + advanceLexer() { + const { maxTokens } = this._options; + const token = this._lexer.advance(); + if (maxTokens !== void 0 && token.kind !== TokenKind.EOF) { + ++this._tokenCounter; + if (this._tokenCounter > maxTokens) { + throw syntaxError( + this._lexer.source, + token.start, + `Document contains more that ${maxTokens} tokens. Parsing aborted.` + ); + } + } + } + }; + function getTokenDesc(token) { + const value = token.value; + return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : ""); + } + function getTokenKindDesc(kind) { + return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind; + } + + // node_modules/graphql/jsutils/didYouMean.mjs + var MAX_SUGGESTIONS = 5; + function didYouMean(firstArg, secondArg) { + const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg]; + let message = " Did you mean "; + if (subMessage) { + message += subMessage + " "; + } + const suggestions = suggestionsArg.map((x) => `"${x}"`); + switch (suggestions.length) { + case 0: + return ""; + case 1: + return message + suggestions[0] + "?"; + case 2: + return message + suggestions[0] + " or " + suggestions[1] + "?"; + } + const selected = suggestions.slice(0, MAX_SUGGESTIONS); + const lastItem = selected.pop(); + return message + selected.join(", ") + ", or " + lastItem + "?"; + } + + // node_modules/graphql/jsutils/identityFunc.mjs + function identityFunc(x) { + return x; + } + + // node_modules/graphql/jsutils/keyMap.mjs + function keyMap(list2, keyFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = item; + } + return result; + } + + // node_modules/graphql/jsutils/keyValMap.mjs + function keyValMap(list2, keyFn, valFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = valFn(item); + } + return result; + } + + // node_modules/graphql/jsutils/mapValue.mjs + function mapValue(map, fn) { + const result = /* @__PURE__ */ Object.create(null); + for (const key of Object.keys(map)) { + result[key] = fn(map[key], key); + } + return result; + } + + // node_modules/graphql/jsutils/naturalCompare.mjs + function naturalCompare(aStr, bStr) { + let aIndex = 0; + let bIndex = 0; + while (aIndex < aStr.length && bIndex < bStr.length) { + let aChar = aStr.charCodeAt(aIndex); + let bChar = bStr.charCodeAt(bIndex); + if (isDigit2(aChar) && isDigit2(bChar)) { + let aNum = 0; + do { + ++aIndex; + aNum = aNum * 10 + aChar - DIGIT_0; + aChar = aStr.charCodeAt(aIndex); + } while (isDigit2(aChar) && aNum > 0); + let bNum = 0; + do { + ++bIndex; + bNum = bNum * 10 + bChar - DIGIT_0; + bChar = bStr.charCodeAt(bIndex); + } while (isDigit2(bChar) && bNum > 0); + if (aNum < bNum) { + return -1; + } + if (aNum > bNum) { + return 1; + } + } else { + if (aChar < bChar) { + return -1; + } + if (aChar > bChar) { + return 1; + } + ++aIndex; + ++bIndex; + } + } + return aStr.length - bStr.length; + } + var DIGIT_0 = 48; + var DIGIT_9 = 57; + function isDigit2(code) { + return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9; + } + + // node_modules/graphql/jsutils/suggestionList.mjs + function suggestionList(input, options) { + const optionsByDistance = /* @__PURE__ */ Object.create(null); + const lexicalDistance2 = new LexicalDistance(input); + const threshold = Math.floor(input.length * 0.4) + 1; + for (const option of options) { + const distance = lexicalDistance2.measure(option, threshold); + if (distance !== void 0) { + optionsByDistance[option] = distance; + } + } + return Object.keys(optionsByDistance).sort((a, b) => { + const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : naturalCompare(a, b); + }); + } + var LexicalDistance = class { + constructor(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray(this._inputLowerCase); + this._rows = [ + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0) + ]; + } + measure(option, threshold) { + if (this._input === option) { + return 0; + } + const optionLowerCase = option.toLowerCase(); + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + let a = stringToArray(optionLowerCase); + let b = this._inputArray; + if (a.length < b.length) { + const tmp = a; + a = b; + b = tmp; + } + const aLength = a.length; + const bLength = b.length; + if (aLength - bLength > threshold) { + return void 0; + } + const rows = this._rows; + for (let j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + for (let i = 1; i <= aLength; i++) { + const upRow = rows[(i - 1) % 3]; + const currentRow = rows[i % 3]; + let smallestCell = currentRow[0] = i; + for (let j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + let currentCell = Math.min( + upRow[j] + 1, + // delete + currentRow[j - 1] + 1, + // insert + upRow[j - 1] + cost + // substitute + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + currentRow[j] = currentCell; + } + if (smallestCell > threshold) { + return void 0; + } + } + const distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : void 0; + } + }; + function stringToArray(str) { + const strLength = str.length; + const array = new Array(strLength); + for (let i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + return array; + } + + // node_modules/graphql/jsutils/toObjMap.mjs + function toObjMap(obj) { + if (obj == null) { + return /* @__PURE__ */ Object.create(null); + } + if (Object.getPrototypeOf(obj) === null) { + return obj; + } + const map = /* @__PURE__ */ Object.create(null); + for (const [key, value] of Object.entries(obj)) { + map[key] = value; + } + return map; + } + + // node_modules/graphql/language/printString.mjs + function printString(str) { + return `"${str.replace(escapedRegExp, escapedReplacer)}"`; + } + var escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; + function escapedReplacer(str) { + return escapeSequences[str.charCodeAt(0)]; + } + var escapeSequences = [ + "\\u0000", + "\\u0001", + "\\u0002", + "\\u0003", + "\\u0004", + "\\u0005", + "\\u0006", + "\\u0007", + "\\b", + "\\t", + "\\n", + "\\u000B", + "\\f", + "\\r", + "\\u000E", + "\\u000F", + "\\u0010", + "\\u0011", + "\\u0012", + "\\u0013", + "\\u0014", + "\\u0015", + "\\u0016", + "\\u0017", + "\\u0018", + "\\u0019", + "\\u001A", + "\\u001B", + "\\u001C", + "\\u001D", + "\\u001E", + "\\u001F", + "", + "", + '\\"', + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 2F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 3F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 4F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\\\", + "", + "", + "", + // 5F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 6F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\u007F", + "\\u0080", + "\\u0081", + "\\u0082", + "\\u0083", + "\\u0084", + "\\u0085", + "\\u0086", + "\\u0087", + "\\u0088", + "\\u0089", + "\\u008A", + "\\u008B", + "\\u008C", + "\\u008D", + "\\u008E", + "\\u008F", + "\\u0090", + "\\u0091", + "\\u0092", + "\\u0093", + "\\u0094", + "\\u0095", + "\\u0096", + "\\u0097", + "\\u0098", + "\\u0099", + "\\u009A", + "\\u009B", + "\\u009C", + "\\u009D", + "\\u009E", + "\\u009F" + ]; + + // node_modules/graphql/language/visitor.mjs + var BREAK = Object.freeze({}); + function visit(root, visitor, visitorKeys = QueryDocumentKeys) { + const enterLeaveMap = /* @__PURE__ */ new Map(); + for (const kind of Object.values(Kind)) { + enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind)); + } + let stack = void 0; + let inArray = Array.isArray(root); + let keys = [root]; + let index = -1; + let edits = []; + let node = root; + let key = void 0; + let parent = void 0; + const path = []; + const ancestors = []; + do { + index++; + const isLeaving = index === keys.length; + const isEdited = isLeaving && edits.length !== 0; + if (isLeaving) { + key = ancestors.length === 0 ? void 0 : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + if (isEdited) { + if (inArray) { + node = node.slice(); + let editOffset = 0; + for (const [editKey, editValue] of edits) { + const arrayKey = editKey - editOffset; + if (editValue === null) { + node.splice(arrayKey, 1); + editOffset++; + } else { + node[arrayKey] = editValue; + } + } + } else { + node = Object.defineProperties( + {}, + Object.getOwnPropertyDescriptors(node) + ); + for (const [editKey, editValue] of edits) { + node[editKey] = editValue; + } + } + } + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else if (parent) { + key = inArray ? index : keys[index]; + node = parent[key]; + if (node === null || node === void 0) { + continue; + } + path.push(key); + } + let result; + if (!Array.isArray(node)) { + var _enterLeaveMap$get, _enterLeaveMap$get2; + isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`); + const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; + result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); + if (result === BREAK) { + break; + } + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== void 0) { + edits.push([key, result]); + if (!isLeaving) { + if (isNode(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + if (result === void 0 && isEdited) { + edits.push([key, node]); + } + if (isLeaving) { + path.pop(); + } else { + var _node$kind; + stack = { + inArray, + index, + keys, + edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; + index = -1; + edits = []; + if (parent) { + ancestors.push(parent); + } + parent = node; + } + } while (stack !== void 0); + if (edits.length !== 0) { + return edits[edits.length - 1][1]; + } + return root; + } + function visitInParallel(visitors) { + const skipping = new Array(visitors.length).fill(null); + const mergedVisitor = /* @__PURE__ */ Object.create(null); + for (const kind of Object.values(Kind)) { + let hasVisitor = false; + const enterList = new Array(visitors.length).fill(void 0); + const leaveList = new Array(visitors.length).fill(void 0); + for (let i = 0; i < visitors.length; ++i) { + const { enter, leave } = getEnterLeaveForKind(visitors[i], kind); + hasVisitor || (hasVisitor = enter != null || leave != null); + enterList[i] = enter; + leaveList[i] = leave; + } + if (!hasVisitor) { + continue; + } + const mergedEnterLeave = { + enter(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _enterList$i; + const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); + if (result === false) { + skipping[i] = node; + } else if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== void 0) { + return result; + } + } + } + }, + leave(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _leaveList$i; + const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); + if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== void 0 && result !== false) { + return result; + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; + mergedVisitor[kind] = mergedEnterLeave; + } + return mergedVisitor; + } + function getEnterLeaveForKind(visitor, kind) { + const kindVisitor = visitor[kind]; + if (typeof kindVisitor === "object") { + return kindVisitor; + } else if (typeof kindVisitor === "function") { + return { + enter: kindVisitor, + leave: void 0 + }; + } + return { + enter: visitor.enter, + leave: visitor.leave + }; + } + + // node_modules/graphql/language/printer.mjs + function print(ast) { + return visit(ast, printDocASTReducer); + } + var MAX_LINE_LENGTH = 80; + var printDocASTReducer = { + Name: { + leave: (node) => node.value + }, + Variable: { + leave: (node) => "$" + node.name + }, + // Document + Document: { + leave: (node) => join2(node.definitions, "\n\n") + }, + OperationDefinition: { + leave(node) { + const varDefs = wrap("(", join2(node.variableDefinitions, ", "), ")"); + const prefix = join2( + [ + node.operation, + join2([node.name, varDefs]), + join2(node.directives, " ") + ], + " " + ); + return (prefix === "query" ? "" : prefix + " ") + node.selectionSet; + } + }, + VariableDefinition: { + leave: ({ variable, type: type2, defaultValue, directives }) => variable + ": " + type2 + wrap(" = ", defaultValue) + wrap(" ", join2(directives, " ")) + }, + SelectionSet: { + leave: ({ selections }) => block(selections) + }, + Field: { + leave({ alias, name: name2, arguments: args, directives, selectionSet }) { + const prefix = wrap("", alias, ": ") + name2; + let argsLine = prefix + wrap("(", join2(args, ", "), ")"); + if (argsLine.length > MAX_LINE_LENGTH) { + argsLine = prefix + wrap("(\n", indent(join2(args, "\n")), "\n)"); + } + return join2([argsLine, join2(directives, " "), selectionSet], " "); + } + }, + Argument: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Fragments + FragmentSpread: { + leave: ({ name: name2, directives }) => "..." + name2 + wrap(" ", join2(directives, " ")) + }, + InlineFragment: { + leave: ({ typeCondition, directives, selectionSet }) => join2( + [ + "...", + wrap("on ", typeCondition), + join2(directives, " "), + selectionSet + ], + " " + ) + }, + FragmentDefinition: { + leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => ( + // or removed in the future. + `fragment ${name2}${wrap("(", join2(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join2(directives, " "), " ")}` + selectionSet + ) + }, + // Value + IntValue: { + leave: ({ value }) => value + }, + FloatValue: { + leave: ({ value }) => value + }, + StringValue: { + leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value) + }, + BooleanValue: { + leave: ({ value }) => value ? "true" : "false" + }, + NullValue: { + leave: () => "null" + }, + EnumValue: { + leave: ({ value }) => value + }, + ListValue: { + leave: ({ values }) => "[" + join2(values, ", ") + "]" + }, + ObjectValue: { + leave: ({ fields }) => "{" + join2(fields, ", ") + "}" + }, + ObjectField: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Directive + Directive: { + leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap("(", join2(args, ", "), ")") + }, + // Type + NamedType: { + leave: ({ name: name2 }) => name2 + }, + ListType: { + leave: ({ type: type2 }) => "[" + type2 + "]" + }, + NonNullType: { + leave: ({ type: type2 }) => type2 + "!" + }, + // Type System Definitions + SchemaDefinition: { + leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join2(["schema", join2(directives, " "), block(operationTypes)], " ") + }, + OperationTypeDefinition: { + leave: ({ operation, type: type2 }) => operation + ": " + type2 + }, + ScalarTypeDefinition: { + leave: ({ description, name: name2, directives }) => wrap("", description, "\n") + join2(["scalar", name2, join2(directives, " ")], " ") + }, + ObjectTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap("", description, "\n") + join2( + [ + "type", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + FieldDefinition: { + leave: ({ description, name: name2, arguments: args, type: type2, directives }) => wrap("", description, "\n") + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join2(args, "\n")), "\n)") : wrap("(", join2(args, ", "), ")")) + ": " + type2 + wrap(" ", join2(directives, " ")) + }, + InputValueDefinition: { + leave: ({ description, name: name2, type: type2, defaultValue, directives }) => wrap("", description, "\n") + join2( + [name2 + ": " + type2, wrap("= ", defaultValue), join2(directives, " ")], + " " + ) + }, + InterfaceTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap("", description, "\n") + join2( + [ + "interface", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + UnionTypeDefinition: { + leave: ({ description, name: name2, directives, types }) => wrap("", description, "\n") + join2( + ["union", name2, join2(directives, " "), wrap("= ", join2(types, " | "))], + " " + ) + }, + EnumTypeDefinition: { + leave: ({ description, name: name2, directives, values }) => wrap("", description, "\n") + join2(["enum", name2, join2(directives, " "), block(values)], " ") + }, + EnumValueDefinition: { + leave: ({ description, name: name2, directives }) => wrap("", description, "\n") + join2([name2, join2(directives, " ")], " ") + }, + InputObjectTypeDefinition: { + leave: ({ description, name: name2, directives, fields }) => wrap("", description, "\n") + join2(["input", name2, join2(directives, " "), block(fields)], " ") + }, + DirectiveDefinition: { + leave: ({ description, name: name2, arguments: args, repeatable, locations }) => wrap("", description, "\n") + "directive @" + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join2(args, "\n")), "\n)") : wrap("(", join2(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join2(locations, " | ") + }, + SchemaExtension: { + leave: ({ directives, operationTypes }) => join2( + ["extend schema", join2(directives, " "), block(operationTypes)], + " " + ) + }, + ScalarTypeExtension: { + leave: ({ name: name2, directives }) => join2(["extend scalar", name2, join2(directives, " ")], " ") + }, + ObjectTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join2( + [ + "extend type", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + InterfaceTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join2( + [ + "extend interface", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + UnionTypeExtension: { + leave: ({ name: name2, directives, types }) => join2( + [ + "extend union", + name2, + join2(directives, " "), + wrap("= ", join2(types, " | ")) + ], + " " + ) + }, + EnumTypeExtension: { + leave: ({ name: name2, directives, values }) => join2(["extend enum", name2, join2(directives, " "), block(values)], " ") + }, + InputObjectTypeExtension: { + leave: ({ name: name2, directives, fields }) => join2(["extend input", name2, join2(directives, " "), block(fields)], " ") + } + }; + function join2(maybeArray, separator = "") { + var _maybeArray$filter$jo; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ""; + } + function block(array) { + return wrap("{\n", indent(join2(array, "\n")), "\n}"); + } + function wrap(start, maybeString, end = "") { + return maybeString != null && maybeString !== "" ? start + maybeString + end : ""; + } + function indent(str) { + return wrap(" ", str.replace(/\n/g, "\n ")); + } + function hasMultilineItems(maybeArray) { + var _maybeArray$some; + return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; + } + + // node_modules/graphql/utilities/valueFromASTUntyped.mjs + function valueFromASTUntyped(valueNode, variables) { + switch (valueNode.kind) { + case Kind.NULL: + return null; + case Kind.INT: + return parseInt(valueNode.value, 10); + case Kind.FLOAT: + return parseFloat(valueNode.value); + case Kind.STRING: + case Kind.ENUM: + case Kind.BOOLEAN: + return valueNode.value; + case Kind.LIST: + return valueNode.values.map( + (node) => valueFromASTUntyped(node, variables) + ); + case Kind.OBJECT: + return keyValMap( + valueNode.fields, + (field) => field.name.value, + (field) => valueFromASTUntyped(field.value, variables) + ); + case Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; + } + } + + // node_modules/graphql/type/assertName.mjs + function assertName(name2) { + name2 != null || devAssert(false, "Must provide name."); + typeof name2 === "string" || devAssert(false, "Expected name to be a string."); + if (name2.length === 0) { + throw new GraphQLError("Expected name to be a non-empty string."); + } + for (let i = 1; i < name2.length; ++i) { + if (!isNameContinue(name2.charCodeAt(i))) { + throw new GraphQLError( + `Names must only contain [_a-zA-Z0-9] but "${name2}" does not.` + ); + } + } + if (!isNameStart(name2.charCodeAt(0))) { + throw new GraphQLError( + `Names must start with [_a-zA-Z] but "${name2}" does not.` + ); + } + return name2; + } + function assertEnumValueName(name2) { + if (name2 === "true" || name2 === "false" || name2 === "null") { + throw new GraphQLError(`Enum values cannot be named: ${name2}`); + } + return assertName(name2); + } + + // node_modules/graphql/type/definition.mjs + function isType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isInputObjectType(type2) || isListType(type2) || isNonNullType(type2); + } + function isScalarType(type2) { + return instanceOf(type2, GraphQLScalarType); + } + function isObjectType(type2) { + return instanceOf(type2, GraphQLObjectType); + } + function assertObjectType(type2) { + if (!isObjectType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL Object type.`); + } + return type2; + } + function isInterfaceType(type2) { + return instanceOf(type2, GraphQLInterfaceType); + } + function assertInterfaceType(type2) { + if (!isInterfaceType(type2)) { + throw new Error( + `Expected ${inspect(type2)} to be a GraphQL Interface type.` + ); + } + return type2; + } + function isUnionType(type2) { + return instanceOf(type2, GraphQLUnionType); + } + function isEnumType(type2) { + return instanceOf(type2, GraphQLEnumType); + } + function isInputObjectType(type2) { + return instanceOf(type2, GraphQLInputObjectType); + } + function isListType(type2) { + return instanceOf(type2, GraphQLList); + } + function isNonNullType(type2) { + return instanceOf(type2, GraphQLNonNull); + } + function isInputType(type2) { + return isScalarType(type2) || isEnumType(type2) || isInputObjectType(type2) || isWrappingType(type2) && isInputType(type2.ofType); + } + function isOutputType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isWrappingType(type2) && isOutputType(type2.ofType); + } + function isLeafType(type2) { + return isScalarType(type2) || isEnumType(type2); + } + function isCompositeType(type2) { + return isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2); + } + function isAbstractType(type2) { + return isInterfaceType(type2) || isUnionType(type2); + } + function assertAbstractType(type2) { + if (!isAbstractType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL abstract type.`); + } + return type2; + } + var GraphQLList = class { + constructor(ofType) { + isType(ofType) || devAssert(false, `Expected ${inspect(ofType)} to be a GraphQL type.`); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLList"; + } + toString() { + return "[" + String(this.ofType) + "]"; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLNonNull = class { + constructor(ofType) { + isNullableType(ofType) || devAssert( + false, + `Expected ${inspect(ofType)} to be a GraphQL nullable type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLNonNull"; + } + toString() { + return String(this.ofType) + "!"; + } + toJSON() { + return this.toString(); + } + }; + function isWrappingType(type2) { + return isListType(type2) || isNonNullType(type2); + } + function isNullableType(type2) { + return isType(type2) && !isNonNullType(type2); + } + function assertNullableType(type2) { + if (!isNullableType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL nullable type.`); + } + return type2; + } + function getNullableType(type2) { + if (type2) { + return isNonNullType(type2) ? type2.ofType : type2; + } + } + function isNamedType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isInputObjectType(type2); + } + function getNamedType(type2) { + if (type2) { + let unwrappedType = type2; + while (isWrappingType(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + return unwrappedType; + } + } + function resolveReadonlyArrayThunk(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + function resolveObjMapThunk(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + var GraphQLScalarType = class { + constructor(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; + const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc; + this.name = assertName(config.name); + this.description = config.description; + this.specifiedByURL = config.specifiedByURL; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc; + this.parseValue = parseValue2; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue2(valueFromASTUntyped(node, variables)); + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + config.specifiedByURL == null || typeof config.specifiedByURL === "string" || devAssert( + false, + `${this.name} must provide "specifiedByURL" as a string, but got: ${inspect(config.specifiedByURL)}.` + ); + config.serialize == null || typeof config.serialize === "function" || devAssert( + false, + `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.` + ); + if (config.parseLiteral) { + typeof config.parseValue === "function" && typeof config.parseLiteral === "function" || devAssert( + false, + `${this.name} must provide both "parseValue" and "parseLiteral" functions.` + ); + } + } + get [Symbol.toStringTag]() { + return "GraphQLScalarType"; + } + toConfig() { + return { + name: this.name, + description: this.description, + specifiedByURL: this.specifiedByURL, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLObjectType = class { + constructor(config) { + var _config$extensionASTN2; + this.name = assertName(config.name); + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; + this._fields = () => defineFieldMap(config); + this._interfaces = () => defineInterfaces(config); + config.isTypeOf == null || typeof config.isTypeOf === "function" || devAssert( + false, + `${this.name} must provide "isTypeOf" as a function, but got: ${inspect(config.isTypeOf)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineInterfaces(config) { + var _config$interfaces; + const interfaces = resolveReadonlyArrayThunk( + (_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : [] + ); + Array.isArray(interfaces) || devAssert( + false, + `${config.name} interfaces must be an Array or a function which returns an Array.` + ); + return interfaces; + } + function defineFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || devAssert( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return mapValue(fieldMap, (fieldConfig, fieldName) => { + var _fieldConfig$args; + isPlainObj(fieldConfig) || devAssert( + false, + `${config.name}.${fieldName} field config must be an object.` + ); + fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || devAssert( + false, + `${config.name}.${fieldName} field resolver must be a function if provided, but got: ${inspect(fieldConfig.resolve)}.` + ); + const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj(argsConfig) || devAssert( + false, + `${config.name}.${fieldName} args must be an object with argument names as keys.` + ); + return { + name: assertName(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + args: defineArguments(argsConfig), + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + deprecationReason: fieldConfig.deprecationReason, + extensions: toObjMap(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function defineArguments(config) { + return Object.entries(config).map(([argName, argConfig]) => ({ + name: assertName(argName), + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: toObjMap(argConfig.extensions), + astNode: argConfig.astNode + })); + } + function isPlainObj(obj) { + return isObjectLike(obj) && !Array.isArray(obj); + } + function fieldsToFieldsConfig(fields) { + return mapValue(fields, (field) => ({ + description: field.description, + type: field.type, + args: argsToArgsConfig(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + } + function argsToArgsConfig(args) { + return keyValMap( + args, + (arg) => arg.name, + (arg) => ({ + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + }) + ); + } + function isRequiredArgument(arg) { + return isNonNullType(arg.type) && arg.defaultValue === void 0; + } + var GraphQLInterfaceType = class { + constructor(config) { + var _config$extensionASTN3; + this.name = assertName(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; + this._fields = defineFieldMap.bind(void 0, config); + this._interfaces = defineInterfaces.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || devAssert( + false, + `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLInterfaceType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLUnionType = class { + constructor(config) { + var _config$extensionASTN4; + this.name = assertName(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; + this._types = defineTypes.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || devAssert( + false, + `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLUnionType"; + } + getTypes() { + if (typeof this._types === "function") { + this._types = this._types(); + } + return this._types; + } + toConfig() { + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineTypes(config) { + const types = resolveReadonlyArrayThunk(config.types); + Array.isArray(types) || devAssert( + false, + `Must provide Array of types or a function which returns such an array for Union ${config.name}.` + ); + return types; + } + var GraphQLEnumType = class { + /* */ + constructor(config) { + var _config$extensionASTN5; + this.name = assertName(config.name); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; + this._values = defineEnumValues(this.name, config.values); + this._valueLookup = new Map( + this._values.map((enumValue) => [enumValue.value, enumValue]) + ); + this._nameLookup = keyMap(this._values, (value) => value.name); + } + get [Symbol.toStringTag]() { + return "GraphQLEnumType"; + } + getValues() { + return this._values; + } + getValue(name2) { + return this._nameLookup[name2]; + } + serialize(outputValue) { + const enumValue = this._valueLookup.get(outputValue); + if (enumValue === void 0) { + throw new GraphQLError( + `Enum "${this.name}" cannot represent value: ${inspect(outputValue)}` + ); + } + return enumValue.name; + } + parseValue(inputValue) { + if (typeof inputValue !== "string") { + const valueStr = inspect(inputValue); + throw new GraphQLError( + `Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr) + ); + } + const enumValue = this.getValue(inputValue); + if (enumValue == null) { + throw new GraphQLError( + `Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue) + ); + } + return enumValue.value; + } + parseLiteral(valueNode, _variables) { + if (valueNode.kind !== Kind.ENUM) { + const valueStr = print(valueNode); + throw new GraphQLError( + `Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), + { + nodes: valueNode + } + ); + } + const enumValue = this.getValue(valueNode.value); + if (enumValue == null) { + const valueStr = print(valueNode); + throw new GraphQLError( + `Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), + { + nodes: valueNode + } + ); + } + return enumValue.value; + } + toConfig() { + const values = keyValMap( + this.getValues(), + (value) => value.name, + (value) => ({ + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + }) + ); + return { + name: this.name, + description: this.description, + values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function didYouMeanEnumValue(enumType, unknownValueStr) { + const allNames = enumType.getValues().map((value) => value.name); + const suggestedValues = suggestionList(unknownValueStr, allNames); + return didYouMean("the enum value", suggestedValues); + } + function defineEnumValues(typeName, valueMap) { + isPlainObj(valueMap) || devAssert( + false, + `${typeName} values must be an object with value names as keys.` + ); + return Object.entries(valueMap).map(([valueName, valueConfig]) => { + isPlainObj(valueConfig) || devAssert( + false, + `${typeName}.${valueName} must refer to an object with a "value" key representing an internal value but got: ${inspect(valueConfig)}.` + ); + return { + name: assertEnumValueName(valueName), + description: valueConfig.description, + value: valueConfig.value !== void 0 ? valueConfig.value : valueName, + deprecationReason: valueConfig.deprecationReason, + extensions: toObjMap(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); + } + var GraphQLInputObjectType = class { + constructor(config) { + var _config$extensionASTN6; + this.name = assertName(config.name); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; + this._fields = defineInputFieldMap.bind(void 0, config); + } + get [Symbol.toStringTag]() { + return "GraphQLInputObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + toConfig() { + const fields = mapValue(this.getFields(), (field) => ({ + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + return { + name: this.name, + description: this.description, + fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineInputFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || devAssert( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return mapValue(fieldMap, (fieldConfig, fieldName) => { + !("resolve" in fieldConfig) || devAssert( + false, + `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.` + ); + return { + name: assertName(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: toObjMap(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function isRequiredInputField(field) { + return isNonNullType(field.type) && field.defaultValue === void 0; + } + + // node_modules/graphql/utilities/typeComparators.mjs + function isEqualType(typeA, typeB) { + if (typeA === typeB) { + return true; + } + if (isNonNullType(typeA) && isNonNullType(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } + if (isListType(typeA) && isListType(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } + return false; + } + function isTypeSubTypeOf(schema, maybeSubType, superType) { + if (maybeSubType === superType) { + return true; + } + if (isNonNullType(superType)) { + if (isNonNullType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + return false; + } + if (isNonNullType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); + } + if (isListType(superType)) { + if (isListType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + return false; + } + if (isListType(maybeSubType)) { + return false; + } + return isAbstractType(superType) && (isInterfaceType(maybeSubType) || isObjectType(maybeSubType)) && schema.isSubType(superType, maybeSubType); + } + function doTypesOverlap(schema, typeA, typeB) { + if (typeA === typeB) { + return true; + } + if (isAbstractType(typeA)) { + if (isAbstractType(typeB)) { + return schema.getPossibleTypes(typeA).some((type2) => schema.isSubType(typeB, type2)); + } + return schema.isSubType(typeA, typeB); + } + if (isAbstractType(typeB)) { + return schema.isSubType(typeB, typeA); + } + return false; + } + + // node_modules/graphql/type/scalars.mjs + var GRAPHQL_MAX_INT = 2147483647; + var GRAPHQL_MIN_INT = -2147483648; + var GraphQLInt = new GraphQLScalarType({ + name: "Int", + description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isInteger(num)) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${inspect(coercedValue)}` + ); + } + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new GraphQLError( + "Int cannot represent non 32-bit signed integer value: " + inspect(coercedValue) + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${inspect(inputValue)}` + ); + } + if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) { + throw new GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${inputValue}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.INT) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + const num = parseInt(valueNode.value, 10); + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, + { + nodes: valueNode + } + ); + } + return num; + } + }); + var GraphQLFloat = new GraphQLScalarType({ + name: "Float", + description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isFinite(num)) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${inspect(coercedValue)}` + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${print(valueNode)}`, + valueNode + ); + } + return parseFloat(valueNode.value); + } + }); + var GraphQLString = new GraphQLScalarType({ + name: "String", + description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (typeof coercedValue === "boolean") { + return coercedValue ? "true" : "false"; + } + if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) { + return coercedValue.toString(); + } + throw new GraphQLError( + `String cannot represent value: ${inspect(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "string") { + throw new GraphQLError( + `String cannot represent a non string value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.STRING) { + throw new GraphQLError( + `String cannot represent a non string value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var GraphQLBoolean = new GraphQLScalarType({ + name: "Boolean", + description: "The `Boolean` scalar type represents `true` or `false`.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue; + } + if (Number.isFinite(coercedValue)) { + return coercedValue !== 0; + } + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${inspect(coercedValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "boolean") { + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.BOOLEAN) { + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var GraphQLID = new GraphQLScalarType({ + name: "ID", + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (Number.isInteger(coercedValue)) { + return String(coercedValue); + } + throw new GraphQLError( + `ID cannot represent value: ${inspect(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue === "string") { + return inputValue; + } + if (typeof inputValue === "number" && Number.isInteger(inputValue)) { + return inputValue.toString(); + } + throw new GraphQLError(`ID cannot represent value: ${inspect(inputValue)}`); + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) { + throw new GraphQLError( + "ID cannot represent a non-string and non-integer value: " + print(valueNode), + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var specifiedScalarTypes = Object.freeze([ + GraphQLString, + GraphQLInt, + GraphQLFloat, + GraphQLBoolean, + GraphQLID + ]); + function isSpecifiedScalarType(type2) { + return specifiedScalarTypes.some(({ name: name2 }) => type2.name === name2); + } + function serializeObject(outputValue) { + if (isObjectLike(outputValue)) { + if (typeof outputValue.valueOf === "function") { + const valueOfResult = outputValue.valueOf(); + if (!isObjectLike(valueOfResult)) { + return valueOfResult; + } + } + if (typeof outputValue.toJSON === "function") { + return outputValue.toJSON(); + } + } + return outputValue; + } + + // node_modules/graphql/type/directives.mjs + function isDirective(directive) { + return instanceOf(directive, GraphQLDirective); + } + var GraphQLDirective = class { + constructor(config) { + var _config$isRepeatable, _config$args; + this.name = assertName(config.name); + this.description = config.description; + this.locations = config.locations; + this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + Array.isArray(config.locations) || devAssert(false, `@${config.name} locations must be an Array.`); + const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; + isObjectLike(args) && !Array.isArray(args) || devAssert( + false, + `@${config.name} args must be an object with argument names as keys.` + ); + this.args = defineArguments(args); + } + get [Symbol.toStringTag]() { + return "GraphQLDirective"; + } + toConfig() { + return { + name: this.name, + description: this.description, + locations: this.locations, + args: argsToArgsConfig(this.args), + isRepeatable: this.isRepeatable, + extensions: this.extensions, + astNode: this.astNode + }; + } + toString() { + return "@" + this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLIncludeDirective = new GraphQLDirective({ + name: "include", + description: "Directs the executor to include this field or fragment only when the `if` argument is true.", + locations: [ + DirectiveLocation.FIELD, + DirectiveLocation.FRAGMENT_SPREAD, + DirectiveLocation.INLINE_FRAGMENT + ], + args: { + if: { + type: new GraphQLNonNull(GraphQLBoolean), + description: "Included when true." + } + } + }); + var GraphQLSkipDirective = new GraphQLDirective({ + name: "skip", + description: "Directs the executor to skip this field or fragment when the `if` argument is true.", + locations: [ + DirectiveLocation.FIELD, + DirectiveLocation.FRAGMENT_SPREAD, + DirectiveLocation.INLINE_FRAGMENT + ], + args: { + if: { + type: new GraphQLNonNull(GraphQLBoolean), + description: "Skipped when true." + } + } + }); + var DEFAULT_DEPRECATION_REASON = "No longer supported"; + var GraphQLDeprecatedDirective = new GraphQLDirective({ + name: "deprecated", + description: "Marks an element of a GraphQL schema as no longer supported.", + locations: [ + DirectiveLocation.FIELD_DEFINITION, + DirectiveLocation.ARGUMENT_DEFINITION, + DirectiveLocation.INPUT_FIELD_DEFINITION, + DirectiveLocation.ENUM_VALUE + ], + args: { + reason: { + type: GraphQLString, + description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + defaultValue: DEFAULT_DEPRECATION_REASON + } + } + }); + var GraphQLSpecifiedByDirective = new GraphQLDirective({ + name: "specifiedBy", + description: "Exposes a URL that specifies the behavior of this scalar.", + locations: [DirectiveLocation.SCALAR], + args: { + url: { + type: new GraphQLNonNull(GraphQLString), + description: "The URL that specifies the behavior of this scalar." + } + } + }); + var specifiedDirectives = Object.freeze([ + GraphQLIncludeDirective, + GraphQLSkipDirective, + GraphQLDeprecatedDirective, + GraphQLSpecifiedByDirective + ]); + + // node_modules/graphql/jsutils/isIterableObject.mjs + function isIterableObject(maybeIterable) { + return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === "function"; + } + + // node_modules/graphql/utilities/astFromValue.mjs + function astFromValue(value, type2) { + if (isNonNullType(type2)) { + const astValue = astFromValue(value, type2.ofType); + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === Kind.NULL) { + return null; + } + return astValue; + } + if (value === null) { + return { + kind: Kind.NULL + }; + } + if (value === void 0) { + return null; + } + if (isListType(type2)) { + const itemType = type2.ofType; + if (isIterableObject(value)) { + const valuesNodes = []; + for (const item of value) { + const itemNode = astFromValue(item, itemType); + if (itemNode != null) { + valuesNodes.push(itemNode); + } + } + return { + kind: Kind.LIST, + values: valuesNodes + }; + } + return astFromValue(value, itemType); + } + if (isInputObjectType(type2)) { + if (!isObjectLike(value)) { + return null; + } + const fieldNodes = []; + for (const field of Object.values(type2.getFields())) { + const fieldValue = astFromValue(value[field.name], field.type); + if (fieldValue) { + fieldNodes.push({ + kind: Kind.OBJECT_FIELD, + name: { + kind: Kind.NAME, + value: field.name + }, + value: fieldValue + }); + } + } + return { + kind: Kind.OBJECT, + fields: fieldNodes + }; + } + if (isLeafType(type2)) { + const serialized = type2.serialize(value); + if (serialized == null) { + return null; + } + if (typeof serialized === "boolean") { + return { + kind: Kind.BOOLEAN, + value: serialized + }; + } + if (typeof serialized === "number" && Number.isFinite(serialized)) { + const stringNum = String(serialized); + return integerStringRegExp.test(stringNum) ? { + kind: Kind.INT, + value: stringNum + } : { + kind: Kind.FLOAT, + value: stringNum + }; + } + if (typeof serialized === "string") { + if (isEnumType(type2)) { + return { + kind: Kind.ENUM, + value: serialized + }; + } + if (type2 === GraphQLID && integerStringRegExp.test(serialized)) { + return { + kind: Kind.INT, + value: serialized + }; + } + return { + kind: Kind.STRING, + value: serialized + }; + } + throw new TypeError(`Cannot convert value to AST: ${inspect(serialized)}.`); + } + invariant(false, "Unexpected input type: " + inspect(type2)); + } + var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; + + // node_modules/graphql/type/introspection.mjs + var __Schema = new GraphQLObjectType({ + name: "__Schema", + description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + fields: () => ({ + description: { + type: GraphQLString, + resolve: (schema) => schema.description + }, + types: { + description: "A list of all types supported by this server.", + type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))), + resolve(schema) { + return Object.values(schema.getTypeMap()); + } + }, + queryType: { + description: "The type that query operations will be rooted at.", + type: new GraphQLNonNull(__Type), + resolve: (schema) => schema.getQueryType() + }, + mutationType: { + description: "If this server supports mutation, the type that mutation operations will be rooted at.", + type: __Type, + resolve: (schema) => schema.getMutationType() + }, + subscriptionType: { + description: "If this server support subscription, the type that subscription operations will be rooted at.", + type: __Type, + resolve: (schema) => schema.getSubscriptionType() + }, + directives: { + description: "A list of all directives supported by this server.", + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__Directive)) + ), + resolve: (schema) => schema.getDirectives() + } + }) + }); + var __Directive = new GraphQLObjectType({ + name: "__Directive", + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (directive) => directive.name + }, + description: { + type: GraphQLString, + resolve: (directive) => directive.description + }, + isRepeatable: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (directive) => directive.isRepeatable + }, + locations: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__DirectiveLocation)) + ), + resolve: (directive) => directive.locations + }, + args: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__InputValue)) + ), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + } + }) + }); + var __DirectiveLocation = new GraphQLEnumType({ + name: "__DirectiveLocation", + description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + values: { + QUERY: { + value: DirectiveLocation.QUERY, + description: "Location adjacent to a query operation." + }, + MUTATION: { + value: DirectiveLocation.MUTATION, + description: "Location adjacent to a mutation operation." + }, + SUBSCRIPTION: { + value: DirectiveLocation.SUBSCRIPTION, + description: "Location adjacent to a subscription operation." + }, + FIELD: { + value: DirectiveLocation.FIELD, + description: "Location adjacent to a field." + }, + FRAGMENT_DEFINITION: { + value: DirectiveLocation.FRAGMENT_DEFINITION, + description: "Location adjacent to a fragment definition." + }, + FRAGMENT_SPREAD: { + value: DirectiveLocation.FRAGMENT_SPREAD, + description: "Location adjacent to a fragment spread." + }, + INLINE_FRAGMENT: { + value: DirectiveLocation.INLINE_FRAGMENT, + description: "Location adjacent to an inline fragment." + }, + VARIABLE_DEFINITION: { + value: DirectiveLocation.VARIABLE_DEFINITION, + description: "Location adjacent to a variable definition." + }, + SCHEMA: { + value: DirectiveLocation.SCHEMA, + description: "Location adjacent to a schema definition." + }, + SCALAR: { + value: DirectiveLocation.SCALAR, + description: "Location adjacent to a scalar definition." + }, + OBJECT: { + value: DirectiveLocation.OBJECT, + description: "Location adjacent to an object type definition." + }, + FIELD_DEFINITION: { + value: DirectiveLocation.FIELD_DEFINITION, + description: "Location adjacent to a field definition." + }, + ARGUMENT_DEFINITION: { + value: DirectiveLocation.ARGUMENT_DEFINITION, + description: "Location adjacent to an argument definition." + }, + INTERFACE: { + value: DirectiveLocation.INTERFACE, + description: "Location adjacent to an interface definition." + }, + UNION: { + value: DirectiveLocation.UNION, + description: "Location adjacent to a union definition." + }, + ENUM: { + value: DirectiveLocation.ENUM, + description: "Location adjacent to an enum definition." + }, + ENUM_VALUE: { + value: DirectiveLocation.ENUM_VALUE, + description: "Location adjacent to an enum value definition." + }, + INPUT_OBJECT: { + value: DirectiveLocation.INPUT_OBJECT, + description: "Location adjacent to an input object type definition." + }, + INPUT_FIELD_DEFINITION: { + value: DirectiveLocation.INPUT_FIELD_DEFINITION, + description: "Location adjacent to an input object field definition." + } + } + }); + var __Type = new GraphQLObjectType({ + name: "__Type", + description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + fields: () => ({ + kind: { + type: new GraphQLNonNull(__TypeKind), + resolve(type2) { + if (isScalarType(type2)) { + return TypeKind.SCALAR; + } + if (isObjectType(type2)) { + return TypeKind.OBJECT; + } + if (isInterfaceType(type2)) { + return TypeKind.INTERFACE; + } + if (isUnionType(type2)) { + return TypeKind.UNION; + } + if (isEnumType(type2)) { + return TypeKind.ENUM; + } + if (isInputObjectType(type2)) { + return TypeKind.INPUT_OBJECT; + } + if (isListType(type2)) { + return TypeKind.LIST; + } + if (isNonNullType(type2)) { + return TypeKind.NON_NULL; + } + invariant(false, `Unexpected type: "${inspect(type2)}".`); + } + }, + name: { + type: GraphQLString, + resolve: (type2) => "name" in type2 ? type2.name : void 0 + }, + description: { + type: GraphQLString, + resolve: (type2) => ( + /* c8 ignore next */ + "description" in type2 ? type2.description : void 0 + ) + }, + specifiedByURL: { + type: GraphQLString, + resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL : void 0 + }, + fields: { + type: new GraphQLList(new GraphQLNonNull(__Field)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isObjectType(type2) || isInterfaceType(type2)) { + const fields = Object.values(type2.getFields()); + return includeDeprecated ? fields : fields.filter((field) => field.deprecationReason == null); + } + } + }, + interfaces: { + type: new GraphQLList(new GraphQLNonNull(__Type)), + resolve(type2) { + if (isObjectType(type2) || isInterfaceType(type2)) { + return type2.getInterfaces(); + } + } + }, + possibleTypes: { + type: new GraphQLList(new GraphQLNonNull(__Type)), + resolve(type2, _args, _context, { schema }) { + if (isAbstractType(type2)) { + return schema.getPossibleTypes(type2); + } + } + }, + enumValues: { + type: new GraphQLList(new GraphQLNonNull(__EnumValue)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isEnumType(type2)) { + const values = type2.getValues(); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + inputFields: { + type: new GraphQLList(new GraphQLNonNull(__InputValue)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isInputObjectType(type2)) { + const values = Object.values(type2.getFields()); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + ofType: { + type: __Type, + resolve: (type2) => "ofType" in type2 ? type2.ofType : void 0 + } + }) + }); + var __Field = new GraphQLObjectType({ + name: "__Field", + description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (field) => field.name + }, + description: { + type: GraphQLString, + resolve: (field) => field.description + }, + args: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__InputValue)) + ), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + }, + type: { + type: new GraphQLNonNull(__Type), + resolve: (field) => field.type + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (field) => field.deprecationReason + } + }) + }); + var __InputValue = new GraphQLObjectType({ + name: "__InputValue", + description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (inputValue) => inputValue.name + }, + description: { + type: GraphQLString, + resolve: (inputValue) => inputValue.description + }, + type: { + type: new GraphQLNonNull(__Type), + resolve: (inputValue) => inputValue.type + }, + defaultValue: { + type: GraphQLString, + description: "A GraphQL-formatted string representing the default value for this input value.", + resolve(inputValue) { + const { type: type2, defaultValue } = inputValue; + const valueAST = astFromValue(defaultValue, type2); + return valueAST ? print(valueAST) : null; + } + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (obj) => obj.deprecationReason + } + }) + }); + var __EnumValue = new GraphQLObjectType({ + name: "__EnumValue", + description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (enumValue) => enumValue.name + }, + description: { + type: GraphQLString, + resolve: (enumValue) => enumValue.description + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (enumValue) => enumValue.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (enumValue) => enumValue.deprecationReason + } + }) + }); + var TypeKind; + (function(TypeKind2) { + TypeKind2["SCALAR"] = "SCALAR"; + TypeKind2["OBJECT"] = "OBJECT"; + TypeKind2["INTERFACE"] = "INTERFACE"; + TypeKind2["UNION"] = "UNION"; + TypeKind2["ENUM"] = "ENUM"; + TypeKind2["INPUT_OBJECT"] = "INPUT_OBJECT"; + TypeKind2["LIST"] = "LIST"; + TypeKind2["NON_NULL"] = "NON_NULL"; + })(TypeKind || (TypeKind = {})); + var __TypeKind = new GraphQLEnumType({ + name: "__TypeKind", + description: "An enum describing what kind of type a given `__Type` is.", + values: { + SCALAR: { + value: TypeKind.SCALAR, + description: "Indicates this type is a scalar." + }, + OBJECT: { + value: TypeKind.OBJECT, + description: "Indicates this type is an object. `fields` and `interfaces` are valid fields." + }, + INTERFACE: { + value: TypeKind.INTERFACE, + description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields." + }, + UNION: { + value: TypeKind.UNION, + description: "Indicates this type is a union. `possibleTypes` is a valid field." + }, + ENUM: { + value: TypeKind.ENUM, + description: "Indicates this type is an enum. `enumValues` is a valid field." + }, + INPUT_OBJECT: { + value: TypeKind.INPUT_OBJECT, + description: "Indicates this type is an input object. `inputFields` is a valid field." + }, + LIST: { + value: TypeKind.LIST, + description: "Indicates this type is a list. `ofType` is a valid field." + }, + NON_NULL: { + value: TypeKind.NON_NULL, + description: "Indicates this type is a non-null. `ofType` is a valid field." + } + } + }); + var SchemaMetaFieldDef = { + name: "__schema", + type: new GraphQLNonNull(__Schema), + description: "Access the current type schema of this server.", + args: [], + resolve: (_source, _args, _context, { schema }) => schema, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var TypeMetaFieldDef = { + name: "__type", + type: __Type, + description: "Request the type information of a single type.", + args: [ + { + name: "name", + description: void 0, + type: new GraphQLNonNull(GraphQLString), + defaultValue: void 0, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + } + ], + resolve: (_source, { name: name2 }, _context, { schema }) => schema.getType(name2), + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var TypeNameMetaFieldDef = { + name: "__typename", + type: new GraphQLNonNull(GraphQLString), + description: "The name of the current Object type at runtime.", + args: [], + resolve: (_source, _args, _context, { parentType }) => parentType.name, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var introspectionTypes = Object.freeze([ + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind + ]); + function isIntrospectionType(type2) { + return introspectionTypes.some(({ name: name2 }) => type2.name === name2); + } + + // node_modules/graphql/type/schema.mjs + function isSchema(schema) { + return instanceOf(schema, GraphQLSchema); + } + function assertSchema(schema) { + if (!isSchema(schema)) { + throw new Error(`Expected ${inspect(schema)} to be a GraphQL schema.`); + } + return schema; + } + var GraphQLSchema = class { + // Used as a cache for validateSchema(). + constructor(config) { + var _config$extensionASTN, _config$directives; + this.__validationErrors = config.assumeValid === true ? [] : void 0; + isObjectLike(config) || devAssert(false, "Must provide configuration object."); + !config.types || Array.isArray(config.types) || devAssert( + false, + `"types" must be Array if provided but got: ${inspect(config.types)}.` + ); + !config.directives || Array.isArray(config.directives) || devAssert( + false, + `"directives" must be Array if provided but got: ${inspect(config.directives)}.` + ); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + this._queryType = config.query; + this._mutationType = config.mutation; + this._subscriptionType = config.subscription; + this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : specifiedDirectives; + const allReferencedTypes = new Set(config.types); + if (config.types != null) { + for (const type2 of config.types) { + allReferencedTypes.delete(type2); + collectReferencedTypes(type2, allReferencedTypes); + } + } + if (this._queryType != null) { + collectReferencedTypes(this._queryType, allReferencedTypes); + } + if (this._mutationType != null) { + collectReferencedTypes(this._mutationType, allReferencedTypes); + } + if (this._subscriptionType != null) { + collectReferencedTypes(this._subscriptionType, allReferencedTypes); + } + for (const directive of this._directives) { + if (isDirective(directive)) { + for (const arg of directive.args) { + collectReferencedTypes(arg.type, allReferencedTypes); + } + } + } + collectReferencedTypes(__Schema, allReferencedTypes); + this._typeMap = /* @__PURE__ */ Object.create(null); + this._subTypeMap = /* @__PURE__ */ Object.create(null); + this._implementationsMap = /* @__PURE__ */ Object.create(null); + for (const namedType of allReferencedTypes) { + if (namedType == null) { + continue; + } + const typeName = namedType.name; + typeName || devAssert( + false, + "One of the provided types for building the Schema is missing a name." + ); + if (this._typeMap[typeName] !== void 0) { + throw new Error( + `Schema must contain uniquely named types but contains multiple types named "${typeName}".` + ); + } + this._typeMap[typeName] = namedType; + if (isInterfaceType(namedType)) { + for (const iface of namedType.getInterfaces()) { + if (isInterfaceType(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === void 0) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.interfaces.push(namedType); + } + } + } else if (isObjectType(namedType)) { + for (const iface of namedType.getInterfaces()) { + if (isInterfaceType(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === void 0) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.objects.push(namedType); + } + } + } + } + } + get [Symbol.toStringTag]() { + return "GraphQLSchema"; + } + getQueryType() { + return this._queryType; + } + getMutationType() { + return this._mutationType; + } + getSubscriptionType() { + return this._subscriptionType; + } + getRootType(operation) { + switch (operation) { + case OperationTypeNode.QUERY: + return this.getQueryType(); + case OperationTypeNode.MUTATION: + return this.getMutationType(); + case OperationTypeNode.SUBSCRIPTION: + return this.getSubscriptionType(); + } + } + getTypeMap() { + return this._typeMap; + } + getType(name2) { + return this.getTypeMap()[name2]; + } + getPossibleTypes(abstractType) { + return isUnionType(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; + } + getImplementations(interfaceType) { + const implementations = this._implementationsMap[interfaceType.name]; + return implementations !== null && implementations !== void 0 ? implementations : { + objects: [], + interfaces: [] + }; + } + isSubType(abstractType, maybeSubType) { + let map = this._subTypeMap[abstractType.name]; + if (map === void 0) { + map = /* @__PURE__ */ Object.create(null); + if (isUnionType(abstractType)) { + for (const type2 of abstractType.getTypes()) { + map[type2.name] = true; + } + } else { + const implementations = this.getImplementations(abstractType); + for (const type2 of implementations.objects) { + map[type2.name] = true; + } + for (const type2 of implementations.interfaces) { + map[type2.name] = true; + } + } + this._subTypeMap[abstractType.name] = map; + } + return map[maybeSubType.name] !== void 0; + } + getDirectives() { + return this._directives; + } + getDirective(name2) { + return this.getDirectives().find((directive) => directive.name === name2); + } + toConfig() { + return { + description: this.description, + query: this.getQueryType(), + mutation: this.getMutationType(), + subscription: this.getSubscriptionType(), + types: Object.values(this.getTypeMap()), + directives: this.getDirectives(), + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes, + assumeValid: this.__validationErrors !== void 0 + }; + } + }; + function collectReferencedTypes(type2, typeSet) { + const namedType = getNamedType(type2); + if (!typeSet.has(namedType)) { + typeSet.add(namedType); + if (isUnionType(namedType)) { + for (const memberType of namedType.getTypes()) { + collectReferencedTypes(memberType, typeSet); + } + } else if (isObjectType(namedType) || isInterfaceType(namedType)) { + for (const interfaceType of namedType.getInterfaces()) { + collectReferencedTypes(interfaceType, typeSet); + } + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); + for (const arg of field.args) { + collectReferencedTypes(arg.type, typeSet); + } + } + } else if (isInputObjectType(namedType)) { + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); + } + } + } + return typeSet; + } + + // node_modules/graphql/type/validate.mjs + function validateSchema(schema) { + assertSchema(schema); + if (schema.__validationErrors) { + return schema.__validationErrors; + } + const context = new SchemaValidationContext(schema); + validateRootTypes(context); + validateDirectives(context); + validateTypes(context); + const errors = context.getErrors(); + schema.__validationErrors = errors; + return errors; + } + function assertValidSchema(schema) { + const errors = validateSchema(schema); + if (errors.length !== 0) { + throw new Error(errors.map((error) => error.message).join("\n\n")); + } + } + var SchemaValidationContext = class { + constructor(schema) { + this._errors = []; + this.schema = schema; + } + reportError(message, nodes) { + const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; + this._errors.push( + new GraphQLError(message, { + nodes: _nodes + }) + ); + } + getErrors() { + return this._errors; + } + }; + function validateRootTypes(context) { + const schema = context.schema; + const queryType = schema.getQueryType(); + if (!queryType) { + context.reportError("Query root type must be provided.", schema.astNode); + } else if (!isObjectType(queryType)) { + var _getOperationTypeNode; + context.reportError( + `Query root type must be Object type, it cannot be ${inspect( + queryType + )}.`, + (_getOperationTypeNode = getOperationTypeNode( + schema, + OperationTypeNode.QUERY + )) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode + ); + } + const mutationType = schema.getMutationType(); + if (mutationType && !isObjectType(mutationType)) { + var _getOperationTypeNode2; + context.reportError( + `Mutation root type must be Object type if provided, it cannot be ${inspect(mutationType)}.`, + (_getOperationTypeNode2 = getOperationTypeNode( + schema, + OperationTypeNode.MUTATION + )) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode + ); + } + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType && !isObjectType(subscriptionType)) { + var _getOperationTypeNode3; + context.reportError( + `Subscription root type must be Object type if provided, it cannot be ${inspect(subscriptionType)}.`, + (_getOperationTypeNode3 = getOperationTypeNode( + schema, + OperationTypeNode.SUBSCRIPTION + )) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode + ); + } + } + function getOperationTypeNode(schema, operation) { + var _flatMap$find; + return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (schemaNode) => { + var _schemaNode$operation; + return ( + /* c8 ignore next */ + (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : [] + ); + } + ).find((operationNode) => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type; + } + function validateDirectives(context) { + for (const directive of context.schema.getDirectives()) { + if (!isDirective(directive)) { + context.reportError( + `Expected directive but got: ${inspect(directive)}.`, + directive === null || directive === void 0 ? void 0 : directive.astNode + ); + continue; + } + validateName(context, directive); + for (const arg of directive.args) { + validateName(context, arg); + if (!isInputType(arg.type)) { + context.reportError( + `The type of @${directive.name}(${arg.name}:) must be Input Type but got: ${inspect(arg.type)}.`, + arg.astNode + ); + } + if (isRequiredArgument(arg) && arg.deprecationReason != null) { + var _arg$astNode; + context.reportError( + `Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(arg.astNode), + (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type + ] + ); + } + } + } + } + function validateName(context, node) { + if (node.name.startsWith("__")) { + context.reportError( + `Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, + node.astNode + ); + } + } + function validateTypes(context) { + const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); + const typeMap = context.schema.getTypeMap(); + for (const type2 of Object.values(typeMap)) { + if (!isNamedType(type2)) { + context.reportError( + `Expected GraphQL named type but got: ${inspect(type2)}.`, + type2.astNode + ); + continue; + } + if (!isIntrospectionType(type2)) { + validateName(context, type2); + } + if (isObjectType(type2)) { + validateFields(context, type2); + validateInterfaces(context, type2); + } else if (isInterfaceType(type2)) { + validateFields(context, type2); + validateInterfaces(context, type2); + } else if (isUnionType(type2)) { + validateUnionMembers(context, type2); + } else if (isEnumType(type2)) { + validateEnumValues(context, type2); + } else if (isInputObjectType(type2)) { + validateInputFields(context, type2); + validateInputObjectCircularRefs(type2); + } + } + } + function validateFields(context, type2) { + const fields = Object.values(type2.getFields()); + if (fields.length === 0) { + context.reportError(`Type ${type2.name} must define one or more fields.`, [ + type2.astNode, + ...type2.extensionASTNodes + ]); + } + for (const field of fields) { + validateName(context, field); + if (!isOutputType(field.type)) { + var _field$astNode; + context.reportError( + `The type of ${type2.name}.${field.name} must be Output Type but got: ${inspect(field.type)}.`, + (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type + ); + } + for (const arg of field.args) { + const argName = arg.name; + validateName(context, arg); + if (!isInputType(arg.type)) { + var _arg$astNode2; + context.reportError( + `The type of ${type2.name}.${field.name}(${argName}:) must be Input Type but got: ${inspect(arg.type)}.`, + (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type + ); + } + if (isRequiredArgument(arg) && arg.deprecationReason != null) { + var _arg$astNode3; + context.reportError( + `Required argument ${type2.name}.${field.name}(${argName}:) cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(arg.astNode), + (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type + ] + ); + } + } + } + } + function validateInterfaces(context, type2) { + const ifaceTypeNames = /* @__PURE__ */ Object.create(null); + for (const iface of type2.getInterfaces()) { + if (!isInterfaceType(iface)) { + context.reportError( + `Type ${inspect(type2)} must only implement Interface types, it cannot implement ${inspect(iface)}.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + if (type2 === iface) { + context.reportError( + `Type ${type2.name} cannot implement itself because it would create a circular reference.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + if (ifaceTypeNames[iface.name]) { + context.reportError( + `Type ${type2.name} can only implement ${iface.name} once.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + ifaceTypeNames[iface.name] = true; + validateTypeImplementsAncestors(context, type2, iface); + validateTypeImplementsInterface(context, type2, iface); + } + } + function validateTypeImplementsInterface(context, type2, iface) { + const typeFieldMap = type2.getFields(); + for (const ifaceField of Object.values(iface.getFields())) { + const fieldName = ifaceField.name; + const typeField = typeFieldMap[fieldName]; + if (!typeField) { + context.reportError( + `Interface field ${iface.name}.${fieldName} expected but ${type2.name} does not provide it.`, + [ifaceField.astNode, type2.astNode, ...type2.extensionASTNodes] + ); + continue; + } + if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) { + var _ifaceField$astNode, _typeField$astNode; + context.reportError( + `Interface field ${iface.name}.${fieldName} expects type ${inspect(ifaceField.type)} but ${type2.name}.${fieldName} is type ${inspect(typeField.type)}.`, + [ + (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, + (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type + ] + ); + } + for (const ifaceArg of ifaceField.args) { + const argName = ifaceArg.name; + const typeArg = typeField.args.find((arg) => arg.name === argName); + if (!typeArg) { + context.reportError( + `Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type2.name}.${fieldName} does not provide it.`, + [ifaceArg.astNode, typeField.astNode] + ); + continue; + } + if (!isEqualType(ifaceArg.type, typeArg.type)) { + var _ifaceArg$astNode, _typeArg$astNode; + context.reportError( + `Interface field argument ${iface.name}.${fieldName}(${argName}:) expects type ${inspect(ifaceArg.type)} but ${type2.name}.${fieldName}(${argName}:) is type ${inspect(typeArg.type)}.`, + [ + (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, + (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type + ] + ); + } + } + for (const typeArg of typeField.args) { + const argName = typeArg.name; + const ifaceArg = ifaceField.args.find((arg) => arg.name === argName); + if (!ifaceArg && isRequiredArgument(typeArg)) { + context.reportError( + `Object field ${type2.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, + [typeArg.astNode, ifaceField.astNode] + ); + } + } + } + } + function validateTypeImplementsAncestors(context, type2, iface) { + const ifaceInterfaces = type2.getInterfaces(); + for (const transitive of iface.getInterfaces()) { + if (!ifaceInterfaces.includes(transitive)) { + context.reportError( + transitive === type2 ? `Type ${type2.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type2.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, + [ + ...getAllImplementsInterfaceNodes(iface, transitive), + ...getAllImplementsInterfaceNodes(type2, iface) + ] + ); + } + } + } + function validateUnionMembers(context, union) { + const memberTypes = union.getTypes(); + if (memberTypes.length === 0) { + context.reportError( + `Union type ${union.name} must define one or more member types.`, + [union.astNode, ...union.extensionASTNodes] + ); + } + const includedTypeNames = /* @__PURE__ */ Object.create(null); + for (const memberType of memberTypes) { + if (includedTypeNames[memberType.name]) { + context.reportError( + `Union type ${union.name} can only include type ${memberType.name} once.`, + getUnionMemberTypeNodes(union, memberType.name) + ); + continue; + } + includedTypeNames[memberType.name] = true; + if (!isObjectType(memberType)) { + context.reportError( + `Union type ${union.name} can only include Object types, it cannot include ${inspect(memberType)}.`, + getUnionMemberTypeNodes(union, String(memberType)) + ); + } + } + } + function validateEnumValues(context, enumType) { + const enumValues = enumType.getValues(); + if (enumValues.length === 0) { + context.reportError( + `Enum type ${enumType.name} must define one or more values.`, + [enumType.astNode, ...enumType.extensionASTNodes] + ); + } + for (const enumValue of enumValues) { + validateName(context, enumValue); + } + } + function validateInputFields(context, inputObj) { + const fields = Object.values(inputObj.getFields()); + if (fields.length === 0) { + context.reportError( + `Input Object type ${inputObj.name} must define one or more fields.`, + [inputObj.astNode, ...inputObj.extensionASTNodes] + ); + } + for (const field of fields) { + validateName(context, field); + if (!isInputType(field.type)) { + var _field$astNode2; + context.reportError( + `The type of ${inputObj.name}.${field.name} must be Input Type but got: ${inspect(field.type)}.`, + (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type + ); + } + if (isRequiredInputField(field) && field.deprecationReason != null) { + var _field$astNode3; + context.reportError( + `Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(field.astNode), + (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type + ] + ); + } + } + } + function createInputObjectCircularRefsValidator(context) { + const visitedTypes = /* @__PURE__ */ Object.create(null); + const fieldPath = []; + const fieldPathIndexByTypeName = /* @__PURE__ */ Object.create(null); + return detectCycleRecursive; + function detectCycleRecursive(inputObj) { + if (visitedTypes[inputObj.name]) { + return; + } + visitedTypes[inputObj.name] = true; + fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; + const fields = Object.values(inputObj.getFields()); + for (const field of fields) { + if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) { + const fieldType = field.type.ofType; + const cycleIndex = fieldPathIndexByTypeName[fieldType.name]; + fieldPath.push(field); + if (cycleIndex === void 0) { + detectCycleRecursive(fieldType); + } else { + const cyclePath = fieldPath.slice(cycleIndex); + const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join("."); + context.reportError( + `Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, + cyclePath.map((fieldObj) => fieldObj.astNode) + ); + } + fieldPath.pop(); + } + } + fieldPathIndexByTypeName[inputObj.name] = void 0; + } + } + function getAllImplementsInterfaceNodes(type2, iface) { + const { astNode, extensionASTNodes } = type2; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; + return nodes.flatMap((typeNode) => { + var _typeNode$interfaces; + return ( + /* c8 ignore next */ + (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : [] + ); + }).filter((ifaceNode) => ifaceNode.name.value === iface.name); + } + function getUnionMemberTypeNodes(union, typeName) { + const { astNode, extensionASTNodes } = union; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; + return nodes.flatMap((unionNode) => { + var _unionNode$types; + return ( + /* c8 ignore next */ + (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : [] + ); + }).filter((typeNode) => typeNode.name.value === typeName); + } + function getDeprecatedDirectiveNode(definitionNode) { + var _definitionNode$direc; + return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find( + (node) => node.name.value === GraphQLDeprecatedDirective.name + ); + } + + // node_modules/graphql/utilities/typeFromAST.mjs + function typeFromAST(schema, typeNode) { + switch (typeNode.kind) { + case Kind.LIST_TYPE: { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new GraphQLList(innerType); + } + case Kind.NON_NULL_TYPE: { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new GraphQLNonNull(innerType); + } + case Kind.NAMED_TYPE: + return schema.getType(typeNode.name.value); + } + } + + // node_modules/graphql/utilities/TypeInfo.mjs + var TypeInfo = class { + constructor(schema, initialType, getFieldDefFn) { + this._schema = schema; + this._typeStack = []; + this._parentTypeStack = []; + this._inputTypeStack = []; + this._fieldDefStack = []; + this._defaultValueStack = []; + this._directive = null; + this._argument = null; + this._enumValue = null; + this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; + if (initialType) { + if (isInputType(initialType)) { + this._inputTypeStack.push(initialType); + } + if (isCompositeType(initialType)) { + this._parentTypeStack.push(initialType); + } + if (isOutputType(initialType)) { + this._typeStack.push(initialType); + } + } + } + get [Symbol.toStringTag]() { + return "TypeInfo"; + } + getType() { + if (this._typeStack.length > 0) { + return this._typeStack[this._typeStack.length - 1]; + } + } + getParentType() { + if (this._parentTypeStack.length > 0) { + return this._parentTypeStack[this._parentTypeStack.length - 1]; + } + } + getInputType() { + if (this._inputTypeStack.length > 0) { + return this._inputTypeStack[this._inputTypeStack.length - 1]; + } + } + getParentInputType() { + if (this._inputTypeStack.length > 1) { + return this._inputTypeStack[this._inputTypeStack.length - 2]; + } + } + getFieldDef() { + if (this._fieldDefStack.length > 0) { + return this._fieldDefStack[this._fieldDefStack.length - 1]; + } + } + getDefaultValue() { + if (this._defaultValueStack.length > 0) { + return this._defaultValueStack[this._defaultValueStack.length - 1]; + } + } + getDirective() { + return this._directive; + } + getArgument() { + return this._argument; + } + getEnumValue() { + return this._enumValue; + } + enter(node) { + const schema = this._schema; + switch (node.kind) { + case Kind.SELECTION_SET: { + const namedType = getNamedType(this.getType()); + this._parentTypeStack.push( + isCompositeType(namedType) ? namedType : void 0 + ); + break; + } + case Kind.FIELD: { + const parentType = this.getParentType(); + let fieldDef; + let fieldType; + if (parentType) { + fieldDef = this._getFieldDef(schema, parentType, node); + if (fieldDef) { + fieldType = fieldDef.type; + } + } + this._fieldDefStack.push(fieldDef); + this._typeStack.push(isOutputType(fieldType) ? fieldType : void 0); + break; + } + case Kind.DIRECTIVE: + this._directive = schema.getDirective(node.name.value); + break; + case Kind.OPERATION_DEFINITION: { + const rootType = schema.getRootType(node.operation); + this._typeStack.push(isObjectType(rootType) ? rootType : void 0); + break; + } + case Kind.INLINE_FRAGMENT: + case Kind.FRAGMENT_DEFINITION: { + const typeConditionAST = node.typeCondition; + const outputType = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType()); + this._typeStack.push(isOutputType(outputType) ? outputType : void 0); + break; + } + case Kind.VARIABLE_DEFINITION: { + const inputType = typeFromAST(schema, node.type); + this._inputTypeStack.push( + isInputType(inputType) ? inputType : void 0 + ); + break; + } + case Kind.ARGUMENT: { + var _this$getDirective; + let argDef; + let argType; + const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); + if (fieldOrDirective) { + argDef = fieldOrDirective.args.find( + (arg) => arg.name === node.name.value + ); + if (argDef) { + argType = argDef.type; + } + } + this._argument = argDef; + this._defaultValueStack.push(argDef ? argDef.defaultValue : void 0); + this._inputTypeStack.push(isInputType(argType) ? argType : void 0); + break; + } + case Kind.LIST: { + const listType = getNullableType(this.getInputType()); + const itemType = isListType(listType) ? listType.ofType : listType; + this._defaultValueStack.push(void 0); + this._inputTypeStack.push(isInputType(itemType) ? itemType : void 0); + break; + } + case Kind.OBJECT_FIELD: { + const objectType = getNamedType(this.getInputType()); + let inputFieldType; + let inputField; + if (isInputObjectType(objectType)) { + inputField = objectType.getFields()[node.name.value]; + if (inputField) { + inputFieldType = inputField.type; + } + } + this._defaultValueStack.push( + inputField ? inputField.defaultValue : void 0 + ); + this._inputTypeStack.push( + isInputType(inputFieldType) ? inputFieldType : void 0 + ); + break; + } + case Kind.ENUM: { + const enumType = getNamedType(this.getInputType()); + let enumValue; + if (isEnumType(enumType)) { + enumValue = enumType.getValue(node.value); + } + this._enumValue = enumValue; + break; + } + default: + } + } + leave(node) { + switch (node.kind) { + case Kind.SELECTION_SET: + this._parentTypeStack.pop(); + break; + case Kind.FIELD: + this._fieldDefStack.pop(); + this._typeStack.pop(); + break; + case Kind.DIRECTIVE: + this._directive = null; + break; + case Kind.OPERATION_DEFINITION: + case Kind.INLINE_FRAGMENT: + case Kind.FRAGMENT_DEFINITION: + this._typeStack.pop(); + break; + case Kind.VARIABLE_DEFINITION: + this._inputTypeStack.pop(); + break; + case Kind.ARGUMENT: + this._argument = null; + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case Kind.LIST: + case Kind.OBJECT_FIELD: + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case Kind.ENUM: + this._enumValue = null; + break; + default: + } + } + }; + function getFieldDef(schema, parentType, fieldNode) { + const name2 = fieldNode.name.value; + if (name2 === SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return SchemaMetaFieldDef; + } + if (name2 === TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return TypeMetaFieldDef; + } + if (name2 === TypeNameMetaFieldDef.name && isCompositeType(parentType)) { + return TypeNameMetaFieldDef; + } + if (isObjectType(parentType) || isInterfaceType(parentType)) { + return parentType.getFields()[name2]; + } + } + function visitWithTypeInfo(typeInfo, visitor) { + return { + enter(...args) { + const node = args[0]; + typeInfo.enter(node); + const fn = getEnterLeaveForKind(visitor, node.kind).enter; + if (fn) { + const result = fn.apply(visitor, args); + if (result !== void 0) { + typeInfo.leave(node); + if (isNode(result)) { + typeInfo.enter(result); + } + } + return result; + } + }, + leave(...args) { + const node = args[0]; + const fn = getEnterLeaveForKind(visitor, node.kind).leave; + let result; + if (fn) { + result = fn.apply(visitor, args); + } + typeInfo.leave(node); + return result; + } + }; + } + + // node_modules/graphql/language/predicates.mjs + function isExecutableDefinitionNode(node) { + return node.kind === Kind.OPERATION_DEFINITION || node.kind === Kind.FRAGMENT_DEFINITION; + } + function isTypeSystemDefinitionNode(node) { + return node.kind === Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === Kind.DIRECTIVE_DEFINITION; + } + function isTypeDefinitionNode(node) { + return node.kind === Kind.SCALAR_TYPE_DEFINITION || node.kind === Kind.OBJECT_TYPE_DEFINITION || node.kind === Kind.INTERFACE_TYPE_DEFINITION || node.kind === Kind.UNION_TYPE_DEFINITION || node.kind === Kind.ENUM_TYPE_DEFINITION || node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION; + } + function isTypeSystemExtensionNode(node) { + return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); + } + function isTypeExtensionNode(node) { + return node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || node.kind === Kind.INTERFACE_TYPE_EXTENSION || node.kind === Kind.UNION_TYPE_EXTENSION || node.kind === Kind.ENUM_TYPE_EXTENSION || node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + + // node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs + function ExecutableDefinitionsRule(context) { + return { + Document(node) { + for (const definition of node.definitions) { + if (!isExecutableDefinitionNode(definition)) { + const defName = definition.kind === Kind.SCHEMA_DEFINITION || definition.kind === Kind.SCHEMA_EXTENSION ? "schema" : '"' + definition.name.value + '"'; + context.reportError( + new GraphQLError(`The ${defName} definition is not executable.`, { + nodes: definition + }) + ); + } + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs + function FieldsOnCorrectTypeRule(context) { + return { + Field(node) { + const type2 = context.getParentType(); + if (type2) { + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + const schema = context.getSchema(); + const fieldName = node.name.value; + let suggestion = didYouMean( + "to use an inline fragment on", + getSuggestedTypeNames(schema, type2, fieldName) + ); + if (suggestion === "") { + suggestion = didYouMean(getSuggestedFieldNames(type2, fieldName)); + } + context.reportError( + new GraphQLError( + `Cannot query field "${fieldName}" on type "${type2.name}".` + suggestion, + { + nodes: node + } + ) + ); + } + } + } + }; + } + function getSuggestedTypeNames(schema, type2, fieldName) { + if (!isAbstractType(type2)) { + return []; + } + const suggestedTypes = /* @__PURE__ */ new Set(); + const usageCount = /* @__PURE__ */ Object.create(null); + for (const possibleType of schema.getPossibleTypes(type2)) { + if (!possibleType.getFields()[fieldName]) { + continue; + } + suggestedTypes.add(possibleType); + usageCount[possibleType.name] = 1; + for (const possibleInterface of possibleType.getInterfaces()) { + var _usageCount$possibleI; + if (!possibleInterface.getFields()[fieldName]) { + continue; + } + suggestedTypes.add(possibleInterface); + usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; + } + } + return [...suggestedTypes].sort((typeA, typeB) => { + const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; + if (usageCountDiff !== 0) { + return usageCountDiff; + } + if (isInterfaceType(typeA) && schema.isSubType(typeA, typeB)) { + return -1; + } + if (isInterfaceType(typeB) && schema.isSubType(typeB, typeA)) { + return 1; + } + return naturalCompare(typeA.name, typeB.name); + }).map((x) => x.name); + } + function getSuggestedFieldNames(type2, fieldName) { + if (isObjectType(type2) || isInterfaceType(type2)) { + const possibleFieldNames = Object.keys(type2.getFields()); + return suggestionList(fieldName, possibleFieldNames); + } + return []; + } + + // node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs + function FragmentsOnCompositeTypesRule(context) { + return { + InlineFragment(node) { + const typeCondition = node.typeCondition; + if (typeCondition) { + const type2 = typeFromAST(context.getSchema(), typeCondition); + if (type2 && !isCompositeType(type2)) { + const typeStr = print(typeCondition); + context.reportError( + new GraphQLError( + `Fragment cannot condition on non composite type "${typeStr}".`, + { + nodes: typeCondition + } + ) + ); + } + } + }, + FragmentDefinition(node) { + const type2 = typeFromAST(context.getSchema(), node.typeCondition); + if (type2 && !isCompositeType(type2)) { + const typeStr = print(node.typeCondition); + context.reportError( + new GraphQLError( + `Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, + { + nodes: node.typeCondition + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs + function KnownArgumentNamesRule(context) { + return { + // eslint-disable-next-line new-cap + ...KnownArgumentNamesOnDirectivesRule(context), + Argument(argNode) { + const argDef = context.getArgument(); + const fieldDef = context.getFieldDef(); + const parentType = context.getParentType(); + if (!argDef && fieldDef && parentType) { + const argName = argNode.name.value; + const knownArgsNames = fieldDef.args.map((arg) => arg.name); + const suggestions = suggestionList(argName, knownArgsNames); + context.reportError( + new GraphQLError( + `Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + didYouMean(suggestions), + { + nodes: argNode + } + ) + ); + } + } + }; + } + function KnownArgumentNamesOnDirectivesRule(context) { + const directiveArgs = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + directiveArgs[directive.name] = directive.args.map((arg) => arg.name); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value); + } + } + return { + Directive(directiveNode) { + const directiveName = directiveNode.name.value; + const knownArgs = directiveArgs[directiveName]; + if (directiveNode.arguments && knownArgs) { + for (const argNode of directiveNode.arguments) { + const argName = argNode.name.value; + if (!knownArgs.includes(argName)) { + const suggestions = suggestionList(argName, knownArgs); + context.reportError( + new GraphQLError( + `Unknown argument "${argName}" on directive "@${directiveName}".` + didYouMean(suggestions), + { + nodes: argNode + } + ) + ); + } + } + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/KnownDirectivesRule.mjs + function KnownDirectivesRule(context) { + const locationsMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + locationsMap[directive.name] = directive.locations; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + locationsMap[def.name.value] = def.locations.map((name2) => name2.value); + } + } + return { + Directive(node, _key, _parent, _path, ancestors) { + const name2 = node.name.value; + const locations = locationsMap[name2]; + if (!locations) { + context.reportError( + new GraphQLError(`Unknown directive "@${name2}".`, { + nodes: node + }) + ); + return; + } + const candidateLocation = getDirectiveLocationForASTPath(ancestors); + if (candidateLocation && !locations.includes(candidateLocation)) { + context.reportError( + new GraphQLError( + `Directive "@${name2}" may not be used on ${candidateLocation}.`, + { + nodes: node + } + ) + ); + } + } + }; + } + function getDirectiveLocationForASTPath(ancestors) { + const appliedTo = ancestors[ancestors.length - 1]; + "kind" in appliedTo || invariant(false); + switch (appliedTo.kind) { + case Kind.OPERATION_DEFINITION: + return getDirectiveLocationForOperation(appliedTo.operation); + case Kind.FIELD: + return DirectiveLocation.FIELD; + case Kind.FRAGMENT_SPREAD: + return DirectiveLocation.FRAGMENT_SPREAD; + case Kind.INLINE_FRAGMENT: + return DirectiveLocation.INLINE_FRAGMENT; + case Kind.FRAGMENT_DEFINITION: + return DirectiveLocation.FRAGMENT_DEFINITION; + case Kind.VARIABLE_DEFINITION: + return DirectiveLocation.VARIABLE_DEFINITION; + case Kind.SCHEMA_DEFINITION: + case Kind.SCHEMA_EXTENSION: + return DirectiveLocation.SCHEMA; + case Kind.SCALAR_TYPE_DEFINITION: + case Kind.SCALAR_TYPE_EXTENSION: + return DirectiveLocation.SCALAR; + case Kind.OBJECT_TYPE_DEFINITION: + case Kind.OBJECT_TYPE_EXTENSION: + return DirectiveLocation.OBJECT; + case Kind.FIELD_DEFINITION: + return DirectiveLocation.FIELD_DEFINITION; + case Kind.INTERFACE_TYPE_DEFINITION: + case Kind.INTERFACE_TYPE_EXTENSION: + return DirectiveLocation.INTERFACE; + case Kind.UNION_TYPE_DEFINITION: + case Kind.UNION_TYPE_EXTENSION: + return DirectiveLocation.UNION; + case Kind.ENUM_TYPE_DEFINITION: + case Kind.ENUM_TYPE_EXTENSION: + return DirectiveLocation.ENUM; + case Kind.ENUM_VALUE_DEFINITION: + return DirectiveLocation.ENUM_VALUE; + case Kind.INPUT_OBJECT_TYPE_DEFINITION: + case Kind.INPUT_OBJECT_TYPE_EXTENSION: + return DirectiveLocation.INPUT_OBJECT; + case Kind.INPUT_VALUE_DEFINITION: { + const parentNode = ancestors[ancestors.length - 3]; + "kind" in parentNode || invariant(false); + return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? DirectiveLocation.INPUT_FIELD_DEFINITION : DirectiveLocation.ARGUMENT_DEFINITION; + } + default: + invariant(false, "Unexpected kind: " + inspect(appliedTo.kind)); + } + } + function getDirectiveLocationForOperation(operation) { + switch (operation) { + case OperationTypeNode.QUERY: + return DirectiveLocation.QUERY; + case OperationTypeNode.MUTATION: + return DirectiveLocation.MUTATION; + case OperationTypeNode.SUBSCRIPTION: + return DirectiveLocation.SUBSCRIPTION; + } + } + + // node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs + function KnownFragmentNamesRule(context) { + return { + FragmentSpread(node) { + const fragmentName = node.name.value; + const fragment = context.getFragment(fragmentName); + if (!fragment) { + context.reportError( + new GraphQLError(`Unknown fragment "${fragmentName}".`, { + nodes: node.name + }) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs + function KnownTypeNamesRule(context) { + const schema = context.getSchema(); + const existingTypesMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const definedTypes = /* @__PURE__ */ Object.create(null); + for (const def of context.getDocument().definitions) { + if (isTypeDefinitionNode(def)) { + definedTypes[def.name.value] = true; + } + } + const typeNames = [ + ...Object.keys(existingTypesMap), + ...Object.keys(definedTypes) + ]; + return { + NamedType(node, _1, parent, _2, ancestors) { + const typeName = node.name.value; + if (!existingTypesMap[typeName] && !definedTypes[typeName]) { + var _ancestors$; + const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; + const isSDL = definitionNode != null && isSDLNode(definitionNode); + if (isSDL && standardTypeNames.includes(typeName)) { + return; + } + const suggestedTypes = suggestionList( + typeName, + isSDL ? standardTypeNames.concat(typeNames) : typeNames + ); + context.reportError( + new GraphQLError( + `Unknown type "${typeName}".` + didYouMean(suggestedTypes), + { + nodes: node + } + ) + ); + } + } + }; + } + var standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map( + (type2) => type2.name + ); + function isSDLNode(value) { + return "kind" in value && (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value)); + } + + // node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs + function LoneAnonymousOperationRule(context) { + let operationCount = 0; + return { + Document(node) { + operationCount = node.definitions.filter( + (definition) => definition.kind === Kind.OPERATION_DEFINITION + ).length; + }, + OperationDefinition(node) { + if (!node.name && operationCount > 1) { + context.reportError( + new GraphQLError( + "This anonymous operation must be the only defined operation.", + { + nodes: node + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs + function LoneSchemaDefinitionRule(context) { + var _ref, _ref2, _oldSchema$astNode; + const oldSchema = context.getSchema(); + const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); + let schemaDefinitionsCount = 0; + return { + SchemaDefinition(node) { + if (alreadyDefined) { + context.reportError( + new GraphQLError( + "Cannot define a new schema within a schema extension.", + { + nodes: node + } + ) + ); + return; + } + if (schemaDefinitionsCount > 0) { + context.reportError( + new GraphQLError("Must provide only one schema definition.", { + nodes: node + }) + ); + } + ++schemaDefinitionsCount; + } + }; + } + + // node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs + function NoFragmentCyclesRule(context) { + const visitedFrags = /* @__PURE__ */ Object.create(null); + const spreadPath = []; + const spreadPathIndexByName = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + detectCycleRecursive(node); + return false; + } + }; + function detectCycleRecursive(fragment) { + if (visitedFrags[fragment.name.value]) { + return; + } + const fragmentName = fragment.name.value; + visitedFrags[fragmentName] = true; + const spreadNodes = context.getFragmentSpreads(fragment.selectionSet); + if (spreadNodes.length === 0) { + return; + } + spreadPathIndexByName[fragmentName] = spreadPath.length; + for (const spreadNode of spreadNodes) { + const spreadName = spreadNode.name.value; + const cycleIndex = spreadPathIndexByName[spreadName]; + spreadPath.push(spreadNode); + if (cycleIndex === void 0) { + const spreadFragment = context.getFragment(spreadName); + if (spreadFragment) { + detectCycleRecursive(spreadFragment); + } + } else { + const cyclePath = spreadPath.slice(cycleIndex); + const viaPath = cyclePath.slice(0, -1).map((s) => '"' + s.name.value + '"').join(", "); + context.reportError( + new GraphQLError( + `Cannot spread fragment "${spreadName}" within itself` + (viaPath !== "" ? ` via ${viaPath}.` : "."), + { + nodes: cyclePath + } + ) + ); + } + spreadPath.pop(); + } + spreadPathIndexByName[fragmentName] = void 0; + } + } + + // node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs + function NoUndefinedVariablesRule(context) { + let variableNameDefined = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: { + enter() { + variableNameDefined = /* @__PURE__ */ Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { node } of usages) { + const varName = node.name.value; + if (variableNameDefined[varName] !== true) { + context.reportError( + new GraphQLError( + operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, + { + nodes: [node, operation] + } + ) + ); + } + } + } + }, + VariableDefinition(node) { + variableNameDefined[node.variable.name.value] = true; + } + }; + } + + // node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs + function NoUnusedFragmentsRule(context) { + const operationDefs = []; + const fragmentDefs = []; + return { + OperationDefinition(node) { + operationDefs.push(node); + return false; + }, + FragmentDefinition(node) { + fragmentDefs.push(node); + return false; + }, + Document: { + leave() { + const fragmentNameUsed = /* @__PURE__ */ Object.create(null); + for (const operation of operationDefs) { + for (const fragment of context.getRecursivelyReferencedFragments( + operation + )) { + fragmentNameUsed[fragment.name.value] = true; + } + } + for (const fragmentDef of fragmentDefs) { + const fragName = fragmentDef.name.value; + if (fragmentNameUsed[fragName] !== true) { + context.reportError( + new GraphQLError(`Fragment "${fragName}" is never used.`, { + nodes: fragmentDef + }) + ); + } + } + } + } + }; + } + + // node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs + function NoUnusedVariablesRule(context) { + let variableDefs = []; + return { + OperationDefinition: { + enter() { + variableDefs = []; + }, + leave(operation) { + const variableNameUsed = /* @__PURE__ */ Object.create(null); + const usages = context.getRecursiveVariableUsages(operation); + for (const { node } of usages) { + variableNameUsed[node.name.value] = true; + } + for (const variableDef of variableDefs) { + const variableName = variableDef.variable.name.value; + if (variableNameUsed[variableName] !== true) { + context.reportError( + new GraphQLError( + operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, + { + nodes: variableDef + } + ) + ); + } + } + } + }, + VariableDefinition(def) { + variableDefs.push(def); + } + }; + } + + // node_modules/graphql/utilities/sortValueNode.mjs + function sortValueNode(valueNode) { + switch (valueNode.kind) { + case Kind.OBJECT: + return { ...valueNode, fields: sortFields(valueNode.fields) }; + case Kind.LIST: + return { ...valueNode, values: valueNode.values.map(sortValueNode) }; + case Kind.INT: + case Kind.FLOAT: + case Kind.STRING: + case Kind.BOOLEAN: + case Kind.NULL: + case Kind.ENUM: + case Kind.VARIABLE: + return valueNode; + } + } + function sortFields(fields) { + return fields.map((fieldNode) => ({ + ...fieldNode, + value: sortValueNode(fieldNode.value) + })).sort( + (fieldA, fieldB) => naturalCompare(fieldA.name.value, fieldB.name.value) + ); + } + + // node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs + function reasonMessage(reason) { + if (Array.isArray(reason)) { + return reason.map( + ([responseName, subReason]) => `subfields "${responseName}" conflict because ` + reasonMessage(subReason) + ).join(" and "); + } + return reason; + } + function OverlappingFieldsCanBeMergedRule(context) { + const comparedFragmentPairs = new PairSet(); + const cachedFieldsAndFragmentNames = /* @__PURE__ */ new Map(); + return { + SelectionSet(selectionSet) { + const conflicts = findConflictsWithinSelectionSet( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + context.getParentType(), + selectionSet + ); + for (const [[responseName, reason], fields1, fields2] of conflicts) { + const reasonMsg = reasonMessage(reason); + context.reportError( + new GraphQLError( + `Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, + { + nodes: fields1.concat(fields2) + } + ) + ); + } + } + }; + } + function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) { + const conflicts = []; + const [fieldMap, fragmentNames] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType, + selectionSet + ); + collectConflictsWithin( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + fieldMap + ); + if (fragmentNames.length !== 0) { + for (let i = 0; i < fragmentNames.length; i++) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + fieldMap, + fragmentNames[i] + ); + for (let j = i + 1; j < fragmentNames.length; j++) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + fragmentNames[i], + fragmentNames[j] + ); + } + } + } + return conflicts; + } + function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) { + const fragment = context.getFragment(fragmentName); + if (!fragment) { + return; + } + const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment + ); + if (fieldMap === fieldMap2) { + return; + } + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap, + fieldMap2 + ); + for (const referencedFragmentName of referencedFragmentNames) { + if (comparedFragmentPairs.has( + referencedFragmentName, + fragmentName, + areMutuallyExclusive + )) { + continue; + } + comparedFragmentPairs.add( + referencedFragmentName, + fragmentName, + areMutuallyExclusive + ); + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap, + referencedFragmentName + ); + } + } + function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) { + if (fragmentName1 === fragmentName2) { + return; + } + if (comparedFragmentPairs.has( + fragmentName1, + fragmentName2, + areMutuallyExclusive + )) { + return; + } + comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); + const fragment1 = context.getFragment(fragmentName1); + const fragment2 = context.getFragment(fragmentName2); + if (!fragment1 || !fragment2) { + return; + } + const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment1 + ); + const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment2 + ); + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fieldMap2 + ); + for (const referencedFragmentName2 of referencedFragmentNames2) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fragmentName1, + referencedFragmentName2 + ); + } + for (const referencedFragmentName1 of referencedFragmentNames1) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + referencedFragmentName1, + fragmentName2 + ); + } + } + function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) { + const conflicts = []; + const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType1, + selectionSet1 + ); + const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType2, + selectionSet2 + ); + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fieldMap2 + ); + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fragmentName2 + ); + } + for (const fragmentName1 of fragmentNames1) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap2, + fragmentName1 + ); + } + for (const fragmentName1 of fragmentNames1) { + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fragmentName1, + fragmentName2 + ); + } + } + return conflicts; + } + function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) { + for (const [responseName, fields] of Object.entries(fieldMap)) { + if (fields.length > 1) { + for (let i = 0; i < fields.length; i++) { + for (let j = i + 1; j < fields.length; j++) { + const conflict = findConflict( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + // within one collection is never mutually exclusive + responseName, + fields[i], + fields[j] + ); + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } + } + function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) { + for (const [responseName, fields1] of Object.entries(fieldMap1)) { + const fields2 = fieldMap2[responseName]; + if (fields2) { + for (const field1 of fields1) { + for (const field2 of fields2) { + const conflict = findConflict( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + parentFieldsAreMutuallyExclusive, + responseName, + field1, + field2 + ); + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } + } + function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) { + const [parentType1, node1, def1] = field1; + const [parentType2, node2, def2] = field2; + const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && isObjectType(parentType1) && isObjectType(parentType2); + if (!areMutuallyExclusive) { + const name1 = node1.name.value; + const name2 = node2.name.value; + if (name1 !== name2) { + return [ + [responseName, `"${name1}" and "${name2}" are different fields`], + [node1], + [node2] + ]; + } + if (stringifyArguments(node1) !== stringifyArguments(node2)) { + return [ + [responseName, "they have differing arguments"], + [node1], + [node2] + ]; + } + } + const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; + const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; + if (type1 && type2 && doTypesConflict(type1, type2)) { + return [ + [ + responseName, + `they return conflicting types "${inspect(type1)}" and "${inspect( + type2 + )}"` + ], + [node1], + [node2] + ]; + } + const selectionSet1 = node1.selectionSet; + const selectionSet2 = node2.selectionSet; + if (selectionSet1 && selectionSet2) { + const conflicts = findConflictsBetweenSubSelectionSets( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + getNamedType(type1), + selectionSet1, + getNamedType(type2), + selectionSet2 + ); + return subfieldConflicts(conflicts, responseName, node1, node2); + } + } + function stringifyArguments(fieldNode) { + var _fieldNode$arguments; + const args = ( + /* c8 ignore next */ + (_fieldNode$arguments = fieldNode.arguments) !== null && _fieldNode$arguments !== void 0 ? _fieldNode$arguments : [] + ); + const inputObjectWithArgs = { + kind: Kind.OBJECT, + fields: args.map((argNode) => ({ + kind: Kind.OBJECT_FIELD, + name: argNode.name, + value: argNode.value + })) + }; + return print(sortValueNode(inputObjectWithArgs)); + } + function doTypesConflict(type1, type2) { + if (isListType(type1)) { + return isListType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if (isListType(type2)) { + return true; + } + if (isNonNullType(type1)) { + return isNonNullType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if (isNonNullType(type2)) { + return true; + } + if (isLeafType(type1) || isLeafType(type2)) { + return type1 !== type2; + } + return false; + } + function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) { + const cached = cachedFieldsAndFragmentNames.get(selectionSet); + if (cached) { + return cached; + } + const nodeAndDefs = /* @__PURE__ */ Object.create(null); + const fragmentNames = /* @__PURE__ */ Object.create(null); + _collectFieldsAndFragmentNames( + context, + parentType, + selectionSet, + nodeAndDefs, + fragmentNames + ); + const result = [nodeAndDefs, Object.keys(fragmentNames)]; + cachedFieldsAndFragmentNames.set(selectionSet, result); + return result; + } + function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) { + const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); + if (cached) { + return cached; + } + const fragmentType = typeFromAST(context.getSchema(), fragment.typeCondition); + return getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragmentType, + fragment.selectionSet + ); + } + function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case Kind.FIELD: { + const fieldName = selection.name.value; + let fieldDef; + if (isObjectType(parentType) || isInterfaceType(parentType)) { + fieldDef = parentType.getFields()[fieldName]; + } + const responseName = selection.alias ? selection.alias.value : fieldName; + if (!nodeAndDefs[responseName]) { + nodeAndDefs[responseName] = []; + } + nodeAndDefs[responseName].push([parentType, selection, fieldDef]); + break; + } + case Kind.FRAGMENT_SPREAD: + fragmentNames[selection.name.value] = true; + break; + case Kind.INLINE_FRAGMENT: { + const typeCondition = selection.typeCondition; + const inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType; + _collectFieldsAndFragmentNames( + context, + inlineFragmentType, + selection.selectionSet, + nodeAndDefs, + fragmentNames + ); + break; + } + } + } + } + function subfieldConflicts(conflicts, responseName, node1, node2) { + if (conflicts.length > 0) { + return [ + [responseName, conflicts.map(([reason]) => reason)], + [node1, ...conflicts.map(([, fields1]) => fields1).flat()], + [node2, ...conflicts.map(([, , fields2]) => fields2).flat()] + ]; + } + } + var PairSet = class { + constructor() { + this._data = /* @__PURE__ */ new Map(); + } + has(a, b, areMutuallyExclusive) { + var _this$_data$get; + const [key1, key2] = a < b ? [a, b] : [b, a]; + const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2); + if (result === void 0) { + return false; + } + return areMutuallyExclusive ? true : areMutuallyExclusive === result; + } + add(a, b, areMutuallyExclusive) { + const [key1, key2] = a < b ? [a, b] : [b, a]; + const map = this._data.get(key1); + if (map === void 0) { + this._data.set(key1, /* @__PURE__ */ new Map([[key2, areMutuallyExclusive]])); + } else { + map.set(key2, areMutuallyExclusive); + } + } + }; + + // node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs + function PossibleFragmentSpreadsRule(context) { + return { + InlineFragment(node) { + const fragType = context.getType(); + const parentType = context.getParentType(); + if (isCompositeType(fragType) && isCompositeType(parentType) && !doTypesOverlap(context.getSchema(), fragType, parentType)) { + const parentTypeStr = inspect(parentType); + const fragTypeStr = inspect(fragType); + context.reportError( + new GraphQLError( + `Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, + { + nodes: node + } + ) + ); + } + }, + FragmentSpread(node) { + const fragName = node.name.value; + const fragType = getFragmentType(context, fragName); + const parentType = context.getParentType(); + if (fragType && parentType && !doTypesOverlap(context.getSchema(), fragType, parentType)) { + const parentTypeStr = inspect(parentType); + const fragTypeStr = inspect(fragType); + context.reportError( + new GraphQLError( + `Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, + { + nodes: node + } + ) + ); + } + } + }; + } + function getFragmentType(context, name2) { + const frag = context.getFragment(name2); + if (frag) { + const type2 = typeFromAST(context.getSchema(), frag.typeCondition); + if (isCompositeType(type2)) { + return type2; + } + } + } + + // node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs + function PossibleTypeExtensionsRule(context) { + const schema = context.getSchema(); + const definedTypes = /* @__PURE__ */ Object.create(null); + for (const def of context.getDocument().definitions) { + if (isTypeDefinitionNode(def)) { + definedTypes[def.name.value] = def; + } + } + return { + ScalarTypeExtension: checkExtension, + ObjectTypeExtension: checkExtension, + InterfaceTypeExtension: checkExtension, + UnionTypeExtension: checkExtension, + EnumTypeExtension: checkExtension, + InputObjectTypeExtension: checkExtension + }; + function checkExtension(node) { + const typeName = node.name.value; + const defNode = definedTypes[typeName]; + const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); + let expectedKind; + if (defNode) { + expectedKind = defKindToExtKind[defNode.kind]; + } else if (existingType) { + expectedKind = typeToExtKind(existingType); + } + if (expectedKind) { + if (expectedKind !== node.kind) { + const kindStr = extensionKindToTypeName(node.kind); + context.reportError( + new GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, { + nodes: defNode ? [defNode, node] : node + }) + ); + } + } else { + const allTypeNames = Object.keys({ + ...definedTypes, + ...schema === null || schema === void 0 ? void 0 : schema.getTypeMap() + }); + const suggestedTypes = suggestionList(typeName, allTypeNames); + context.reportError( + new GraphQLError( + `Cannot extend type "${typeName}" because it is not defined.` + didYouMean(suggestedTypes), + { + nodes: node.name + } + ) + ); + } + } + } + var defKindToExtKind = { + [Kind.SCALAR_TYPE_DEFINITION]: Kind.SCALAR_TYPE_EXTENSION, + [Kind.OBJECT_TYPE_DEFINITION]: Kind.OBJECT_TYPE_EXTENSION, + [Kind.INTERFACE_TYPE_DEFINITION]: Kind.INTERFACE_TYPE_EXTENSION, + [Kind.UNION_TYPE_DEFINITION]: Kind.UNION_TYPE_EXTENSION, + [Kind.ENUM_TYPE_DEFINITION]: Kind.ENUM_TYPE_EXTENSION, + [Kind.INPUT_OBJECT_TYPE_DEFINITION]: Kind.INPUT_OBJECT_TYPE_EXTENSION + }; + function typeToExtKind(type2) { + if (isScalarType(type2)) { + return Kind.SCALAR_TYPE_EXTENSION; + } + if (isObjectType(type2)) { + return Kind.OBJECT_TYPE_EXTENSION; + } + if (isInterfaceType(type2)) { + return Kind.INTERFACE_TYPE_EXTENSION; + } + if (isUnionType(type2)) { + return Kind.UNION_TYPE_EXTENSION; + } + if (isEnumType(type2)) { + return Kind.ENUM_TYPE_EXTENSION; + } + if (isInputObjectType(type2)) { + return Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + invariant(false, "Unexpected type: " + inspect(type2)); + } + function extensionKindToTypeName(kind) { + switch (kind) { + case Kind.SCALAR_TYPE_EXTENSION: + return "scalar"; + case Kind.OBJECT_TYPE_EXTENSION: + return "object"; + case Kind.INTERFACE_TYPE_EXTENSION: + return "interface"; + case Kind.UNION_TYPE_EXTENSION: + return "union"; + case Kind.ENUM_TYPE_EXTENSION: + return "enum"; + case Kind.INPUT_OBJECT_TYPE_EXTENSION: + return "input object"; + default: + invariant(false, "Unexpected kind: " + inspect(kind)); + } + } + + // node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs + function ProvidedRequiredArgumentsRule(context) { + return { + // eslint-disable-next-line new-cap + ...ProvidedRequiredArgumentsOnDirectivesRule(context), + Field: { + // Validate on leave to allow for deeper errors to appear first. + leave(fieldNode) { + var _fieldNode$arguments; + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + return false; + } + const providedArgs = new Set( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + /* c8 ignore next */ + (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map((arg) => arg.name.value) + ); + for (const argDef of fieldDef.args) { + if (!providedArgs.has(argDef.name) && isRequiredArgument(argDef)) { + const argTypeStr = inspect(argDef.type); + context.reportError( + new GraphQLError( + `Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, + { + nodes: fieldNode + } + ) + ); + } + } + } + } + }; + } + function ProvidedRequiredArgumentsOnDirectivesRule(context) { + var _schema$getDirectives; + const requiredArgsMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : specifiedDirectives; + for (const directive of definedDirectives) { + requiredArgsMap[directive.name] = keyMap( + directive.args.filter(isRequiredArgument), + (arg) => arg.name + ); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + requiredArgsMap[def.name.value] = keyMap( + argNodes.filter(isRequiredArgumentNode), + (arg) => arg.name.value + ); + } + } + return { + Directive: { + // Validate on leave to allow for deeper errors to appear first. + leave(directiveNode) { + const directiveName = directiveNode.name.value; + const requiredArgs = requiredArgsMap[directiveName]; + if (requiredArgs) { + var _directiveNode$argume; + const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + const argNodeMap = new Set(argNodes.map((arg) => arg.name.value)); + for (const [argName, argDef] of Object.entries(requiredArgs)) { + if (!argNodeMap.has(argName)) { + const argType = isType(argDef.type) ? inspect(argDef.type) : print(argDef.type); + context.reportError( + new GraphQLError( + `Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, + { + nodes: directiveNode + } + ) + ); + } + } + } + } + } + }; + } + function isRequiredArgumentNode(arg) { + return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null; + } + + // node_modules/graphql/validation/rules/ScalarLeafsRule.mjs + function ScalarLeafsRule(context) { + return { + Field(node) { + const type2 = context.getType(); + const selectionSet = node.selectionSet; + if (type2) { + if (isLeafType(getNamedType(type2))) { + if (selectionSet) { + const fieldName = node.name.value; + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, + { + nodes: selectionSet + } + ) + ); + } + } else if (!selectionSet) { + const fieldName = node.name.value; + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, + { + nodes: node + } + ) + ); + } + } + } + }; + } + + // node_modules/graphql/utilities/valueFromAST.mjs + function valueFromAST(valueNode, type2, variables) { + if (!valueNode) { + return; + } + if (valueNode.kind === Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variables == null || variables[variableName] === void 0) { + return; + } + const variableValue = variables[variableName]; + if (variableValue === null && isNonNullType(type2)) { + return; + } + return variableValue; + } + if (isNonNullType(type2)) { + if (valueNode.kind === Kind.NULL) { + return; + } + return valueFromAST(valueNode, type2.ofType, variables); + } + if (valueNode.kind === Kind.NULL) { + return null; + } + if (isListType(type2)) { + const itemType = type2.ofType; + if (valueNode.kind === Kind.LIST) { + const coercedValues = []; + for (const itemNode of valueNode.values) { + if (isMissingVariable(itemNode, variables)) { + if (isNonNullType(itemType)) { + return; + } + coercedValues.push(null); + } else { + const itemValue = valueFromAST(itemNode, itemType, variables); + if (itemValue === void 0) { + return; + } + coercedValues.push(itemValue); + } + } + return coercedValues; + } + const coercedValue = valueFromAST(valueNode, itemType, variables); + if (coercedValue === void 0) { + return; + } + return [coercedValue]; + } + if (isInputObjectType(type2)) { + if (valueNode.kind !== Kind.OBJECT) { + return; + } + const coercedObj = /* @__PURE__ */ Object.create(null); + const fieldNodes = keyMap(valueNode.fields, (field) => field.name.value); + for (const field of Object.values(type2.getFields())) { + const fieldNode = fieldNodes[field.name]; + if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { + if (field.defaultValue !== void 0) { + coercedObj[field.name] = field.defaultValue; + } else if (isNonNullType(field.type)) { + return; + } + continue; + } + const fieldValue = valueFromAST(fieldNode.value, field.type, variables); + if (fieldValue === void 0) { + return; + } + coercedObj[field.name] = fieldValue; + } + return coercedObj; + } + if (isLeafType(type2)) { + let result; + try { + result = type2.parseLiteral(valueNode, variables); + } catch (_error) { + return; + } + if (result === void 0) { + return; + } + return result; + } + invariant(false, "Unexpected input type: " + inspect(type2)); + } + function isMissingVariable(valueNode, variables) { + return valueNode.kind === Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === void 0); + } + + // node_modules/graphql/execution/values.mjs + function getArgumentValues(def, node, variableValues) { + var _node$arguments; + const coercedValues = {}; + const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : []; + const argNodeMap = keyMap(argumentNodes, (arg) => arg.name.value); + for (const argDef of def.args) { + const name2 = argDef.name; + const argType = argDef.type; + const argumentNode = argNodeMap[name2]; + if (!argumentNode) { + if (argDef.defaultValue !== void 0) { + coercedValues[name2] = argDef.defaultValue; + } else if (isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of required type "${inspect(argType)}" was not provided.`, + { + nodes: node + } + ); + } + continue; + } + const valueNode = argumentNode.value; + let isNull = valueNode.kind === Kind.NULL; + if (valueNode.kind === Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variableValues == null || !hasOwnProperty(variableValues, variableName)) { + if (argDef.defaultValue !== void 0) { + coercedValues[name2] = argDef.defaultValue; + } else if (isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of required type "${inspect(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`, + { + nodes: valueNode + } + ); + } + continue; + } + isNull = variableValues[variableName] == null; + } + if (isNull && isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of non-null type "${inspect(argType)}" must not be null.`, + { + nodes: valueNode + } + ); + } + const coercedValue = valueFromAST(valueNode, argType, variableValues); + if (coercedValue === void 0) { + throw new GraphQLError( + `Argument "${name2}" has invalid value ${print(valueNode)}.`, + { + nodes: valueNode + } + ); + } + coercedValues[name2] = coercedValue; + } + return coercedValues; + } + function getDirectiveValues(directiveDef, node, variableValues) { + var _node$directives; + const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find( + (directive) => directive.name.value === directiveDef.name + ); + if (directiveNode) { + return getArgumentValues(directiveDef, directiveNode, variableValues); + } + } + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + // node_modules/graphql/execution/collectFields.mjs + function collectFields(schema, fragments, variableValues, runtimeType, selectionSet) { + const fields = /* @__PURE__ */ new Map(); + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + selectionSet, + fields, + /* @__PURE__ */ new Set() + ); + return fields; + } + function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case Kind.FIELD: { + if (!shouldIncludeNode(variableValues, selection)) { + continue; + } + const name2 = getFieldEntryKey(selection); + const fieldList = fields.get(name2); + if (fieldList !== void 0) { + fieldList.push(selection); + } else { + fields.set(name2, [selection]); + } + break; + } + case Kind.INLINE_FRAGMENT: { + if (!shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType)) { + continue; + } + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + selection.selectionSet, + fields, + visitedFragmentNames + ); + break; + } + case Kind.FRAGMENT_SPREAD: { + const fragName = selection.name.value; + if (visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection)) { + continue; + } + visitedFragmentNames.add(fragName); + const fragment = fragments[fragName]; + if (!fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType)) { + continue; + } + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + fragment.selectionSet, + fields, + visitedFragmentNames + ); + break; + } + } + } + } + function shouldIncludeNode(variableValues, node) { + const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues); + if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) { + return false; + } + const include = getDirectiveValues( + GraphQLIncludeDirective, + node, + variableValues + ); + if ((include === null || include === void 0 ? void 0 : include.if) === false) { + return false; + } + return true; + } + function doesFragmentConditionMatch(schema, fragment, type2) { + const typeConditionNode = fragment.typeCondition; + if (!typeConditionNode) { + return true; + } + const conditionalType = typeFromAST(schema, typeConditionNode); + if (conditionalType === type2) { + return true; + } + if (isAbstractType(conditionalType)) { + return schema.isSubType(conditionalType, type2); + } + return false; + } + function getFieldEntryKey(node) { + return node.alias ? node.alias.value : node.name.value; + } + + // node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs + function SingleFieldSubscriptionsRule(context) { + return { + OperationDefinition(node) { + if (node.operation === "subscription") { + const schema = context.getSchema(); + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType) { + const operationName = node.name ? node.name.value : null; + const variableValues = /* @__PURE__ */ Object.create(null); + const document2 = context.getDocument(); + const fragments = /* @__PURE__ */ Object.create(null); + for (const definition of document2.definitions) { + if (definition.kind === Kind.FRAGMENT_DEFINITION) { + fragments[definition.name.value] = definition; + } + } + const fields = collectFields( + schema, + fragments, + variableValues, + subscriptionType, + node.selectionSet + ); + if (fields.size > 1) { + const fieldSelectionLists = [...fields.values()]; + const extraFieldSelectionLists = fieldSelectionLists.slice(1); + const extraFieldSelections = extraFieldSelectionLists.flat(); + context.reportError( + new GraphQLError( + operationName != null ? `Subscription "${operationName}" must select only one top level field.` : "Anonymous Subscription must select only one top level field.", + { + nodes: extraFieldSelections + } + ) + ); + } + for (const fieldNodes of fields.values()) { + const field = fieldNodes[0]; + const fieldName = field.name.value; + if (fieldName.startsWith("__")) { + context.reportError( + new GraphQLError( + operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : "Anonymous Subscription must not select an introspection top level field.", + { + nodes: fieldNodes + } + ) + ); + } + } + } + } + } + }; + } + + // node_modules/graphql/jsutils/groupBy.mjs + function groupBy(list2, keyFn) { + const result = /* @__PURE__ */ new Map(); + for (const item of list2) { + const key = keyFn(item); + const group2 = result.get(key); + if (group2 === void 0) { + result.set(key, [item]); + } else { + group2.push(item); + } + } + return result; + } + + // node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs + function UniqueArgumentDefinitionNamesRule(context) { + return { + DirectiveDefinition(directiveNode) { + var _directiveNode$argume; + const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes); + }, + InterfaceTypeDefinition: checkArgUniquenessPerField, + InterfaceTypeExtension: checkArgUniquenessPerField, + ObjectTypeDefinition: checkArgUniquenessPerField, + ObjectTypeExtension: checkArgUniquenessPerField + }; + function checkArgUniquenessPerField(typeNode) { + var _typeNode$fields; + const typeName = typeNode.name.value; + const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : []; + for (const fieldDef of fieldNodes) { + var _fieldDef$arguments; + const fieldName = fieldDef.name.value; + const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : []; + checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes); + } + return false; + } + function checkArgUniqueness(parentName, argumentNodes) { + const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError( + new GraphQLError( + `Argument "${parentName}(${argName}:)" can only be defined once.`, + { + nodes: argNodes.map((node) => node.name) + } + ) + ); + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs + function UniqueArgumentNamesRule(context) { + return { + Field: checkArgUniqueness, + Directive: checkArgUniqueness + }; + function checkArgUniqueness(parentNode) { + var _parentNode$arguments; + const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : []; + const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError( + new GraphQLError( + `There can be only one argument named "${argName}".`, + { + nodes: argNodes.map((node) => node.name) + } + ) + ); + } + } + } + } + + // node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs + function UniqueDirectiveNamesRule(context) { + const knownDirectiveNames = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + return { + DirectiveDefinition(node) { + const directiveName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) { + context.reportError( + new GraphQLError( + `Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, + { + nodes: node.name + } + ) + ); + return; + } + if (knownDirectiveNames[directiveName]) { + context.reportError( + new GraphQLError( + `There can be only one directive named "@${directiveName}".`, + { + nodes: [knownDirectiveNames[directiveName], node.name] + } + ) + ); + } else { + knownDirectiveNames[directiveName] = node.name; + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs + function UniqueDirectivesPerLocationRule(context) { + const uniqueDirectiveMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + uniqueDirectiveMap[directive.name] = !directive.isRepeatable; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + uniqueDirectiveMap[def.name.value] = !def.repeatable; + } + } + const schemaDirectives = /* @__PURE__ */ Object.create(null); + const typeDirectivesMap = /* @__PURE__ */ Object.create(null); + return { + // Many different AST nodes may contain directives. Rather than listing + // them all, just listen for entering any node, and check to see if it + // defines any directives. + enter(node) { + if (!("directives" in node) || !node.directives) { + return; + } + let seenDirectives; + if (node.kind === Kind.SCHEMA_DEFINITION || node.kind === Kind.SCHEMA_EXTENSION) { + seenDirectives = schemaDirectives; + } else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) { + const typeName = node.name.value; + seenDirectives = typeDirectivesMap[typeName]; + if (seenDirectives === void 0) { + typeDirectivesMap[typeName] = seenDirectives = /* @__PURE__ */ Object.create(null); + } + } else { + seenDirectives = /* @__PURE__ */ Object.create(null); + } + for (const directive of node.directives) { + const directiveName = directive.name.value; + if (uniqueDirectiveMap[directiveName]) { + if (seenDirectives[directiveName]) { + context.reportError( + new GraphQLError( + `The directive "@${directiveName}" can only be used once at this location.`, + { + nodes: [seenDirectives[directiveName], directive] + } + ) + ); + } else { + seenDirectives[directiveName] = directive; + } + } + } + } + }; + } + + // node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs + function UniqueEnumValueNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const knownValueNames = /* @__PURE__ */ Object.create(null); + return { + EnumTypeDefinition: checkValueUniqueness, + EnumTypeExtension: checkValueUniqueness + }; + function checkValueUniqueness(node) { + var _node$values; + const typeName = node.name.value; + if (!knownValueNames[typeName]) { + knownValueNames[typeName] = /* @__PURE__ */ Object.create(null); + } + const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + const valueNames = knownValueNames[typeName]; + for (const valueDef of valueNodes) { + const valueName = valueDef.name.value; + const existingType = existingTypeMap[typeName]; + if (isEnumType(existingType) && existingType.getValue(valueName)) { + context.reportError( + new GraphQLError( + `Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, + { + nodes: valueDef.name + } + ) + ); + } else if (valueNames[valueName]) { + context.reportError( + new GraphQLError( + `Enum value "${typeName}.${valueName}" can only be defined once.`, + { + nodes: [valueNames[valueName], valueDef.name] + } + ) + ); + } else { + valueNames[valueName] = valueDef.name; + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs + function UniqueFieldDefinitionNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const knownFieldNames = /* @__PURE__ */ Object.create(null); + return { + InputObjectTypeDefinition: checkFieldUniqueness, + InputObjectTypeExtension: checkFieldUniqueness, + InterfaceTypeDefinition: checkFieldUniqueness, + InterfaceTypeExtension: checkFieldUniqueness, + ObjectTypeDefinition: checkFieldUniqueness, + ObjectTypeExtension: checkFieldUniqueness + }; + function checkFieldUniqueness(node) { + var _node$fields; + const typeName = node.name.value; + if (!knownFieldNames[typeName]) { + knownFieldNames[typeName] = /* @__PURE__ */ Object.create(null); + } + const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + const fieldNames = knownFieldNames[typeName]; + for (const fieldDef of fieldNodes) { + const fieldName = fieldDef.name.value; + if (hasField(existingTypeMap[typeName], fieldName)) { + context.reportError( + new GraphQLError( + `Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, + { + nodes: fieldDef.name + } + ) + ); + } else if (fieldNames[fieldName]) { + context.reportError( + new GraphQLError( + `Field "${typeName}.${fieldName}" can only be defined once.`, + { + nodes: [fieldNames[fieldName], fieldDef.name] + } + ) + ); + } else { + fieldNames[fieldName] = fieldDef.name; + } + } + return false; + } + } + function hasField(type2, fieldName) { + if (isObjectType(type2) || isInterfaceType(type2) || isInputObjectType(type2)) { + return type2.getFields()[fieldName] != null; + } + return false; + } + + // node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs + function UniqueFragmentNamesRule(context) { + const knownFragmentNames = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + const fragmentName = node.name.value; + if (knownFragmentNames[fragmentName]) { + context.reportError( + new GraphQLError( + `There can be only one fragment named "${fragmentName}".`, + { + nodes: [knownFragmentNames[fragmentName], node.name] + } + ) + ); + } else { + knownFragmentNames[fragmentName] = node.name; + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs + function UniqueInputFieldNamesRule(context) { + const knownNameStack = []; + let knownNames = /* @__PURE__ */ Object.create(null); + return { + ObjectValue: { + enter() { + knownNameStack.push(knownNames); + knownNames = /* @__PURE__ */ Object.create(null); + }, + leave() { + const prevKnownNames = knownNameStack.pop(); + prevKnownNames || invariant(false); + knownNames = prevKnownNames; + } + }, + ObjectField(node) { + const fieldName = node.name.value; + if (knownNames[fieldName]) { + context.reportError( + new GraphQLError( + `There can be only one input field named "${fieldName}".`, + { + nodes: [knownNames[fieldName], node.name] + } + ) + ); + } else { + knownNames[fieldName] = node.name; + } + } + }; + } + + // node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs + function UniqueOperationNamesRule(context) { + const knownOperationNames = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition(node) { + const operationName = node.name; + if (operationName) { + if (knownOperationNames[operationName.value]) { + context.reportError( + new GraphQLError( + `There can be only one operation named "${operationName.value}".`, + { + nodes: [ + knownOperationNames[operationName.value], + operationName + ] + } + ) + ); + } else { + knownOperationNames[operationName.value] = operationName; + } + } + return false; + }, + FragmentDefinition: () => false + }; + } + + // node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs + function UniqueOperationTypesRule(context) { + const schema = context.getSchema(); + const definedOperationTypes = /* @__PURE__ */ Object.create(null); + const existingOperationTypes = schema ? { + query: schema.getQueryType(), + mutation: schema.getMutationType(), + subscription: schema.getSubscriptionType() + } : {}; + return { + SchemaDefinition: checkOperationTypes, + SchemaExtension: checkOperationTypes + }; + function checkOperationTypes(node) { + var _node$operationTypes; + const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + for (const operationType of operationTypesNodes) { + const operation = operationType.operation; + const alreadyDefinedOperationType = definedOperationTypes[operation]; + if (existingOperationTypes[operation]) { + context.reportError( + new GraphQLError( + `Type for ${operation} already defined in the schema. It cannot be redefined.`, + { + nodes: operationType + } + ) + ); + } else if (alreadyDefinedOperationType) { + context.reportError( + new GraphQLError( + `There can be only one ${operation} type in schema.`, + { + nodes: [alreadyDefinedOperationType, operationType] + } + ) + ); + } else { + definedOperationTypes[operation] = operationType; + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs + function UniqueTypeNamesRule(context) { + const knownTypeNames = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + return { + ScalarTypeDefinition: checkTypeName, + ObjectTypeDefinition: checkTypeName, + InterfaceTypeDefinition: checkTypeName, + UnionTypeDefinition: checkTypeName, + EnumTypeDefinition: checkTypeName, + InputObjectTypeDefinition: checkTypeName + }; + function checkTypeName(node) { + const typeName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getType(typeName)) { + context.reportError( + new GraphQLError( + `Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, + { + nodes: node.name + } + ) + ); + return; + } + if (knownTypeNames[typeName]) { + context.reportError( + new GraphQLError(`There can be only one type named "${typeName}".`, { + nodes: [knownTypeNames[typeName], node.name] + }) + ); + } else { + knownTypeNames[typeName] = node.name; + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs + function UniqueVariableNamesRule(context) { + return { + OperationDefinition(operationNode) { + var _operationNode$variab; + const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : []; + const seenVariableDefinitions = groupBy( + variableDefinitions, + (node) => node.variable.name.value + ); + for (const [variableName, variableNodes] of seenVariableDefinitions) { + if (variableNodes.length > 1) { + context.reportError( + new GraphQLError( + `There can be only one variable named "$${variableName}".`, + { + nodes: variableNodes.map((node) => node.variable.name) + } + ) + ); + } + } + } + }; + } + + // node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs + function ValuesOfCorrectTypeRule(context) { + return { + ListValue(node) { + const type2 = getNullableType(context.getParentInputType()); + if (!isListType(type2)) { + isValidValueNode(context, node); + return false; + } + }, + ObjectValue(node) { + const type2 = getNamedType(context.getInputType()); + if (!isInputObjectType(type2)) { + isValidValueNode(context, node); + return false; + } + const fieldNodeMap = keyMap(node.fields, (field) => field.name.value); + for (const fieldDef of Object.values(type2.getFields())) { + const fieldNode = fieldNodeMap[fieldDef.name]; + if (!fieldNode && isRequiredInputField(fieldDef)) { + const typeStr = inspect(fieldDef.type); + context.reportError( + new GraphQLError( + `Field "${type2.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, + { + nodes: node + } + ) + ); + } + } + }, + ObjectField(node) { + const parentType = getNamedType(context.getParentInputType()); + const fieldType = context.getInputType(); + if (!fieldType && isInputObjectType(parentType)) { + const suggestions = suggestionList( + node.name.value, + Object.keys(parentType.getFields()) + ); + context.reportError( + new GraphQLError( + `Field "${node.name.value}" is not defined by type "${parentType.name}".` + didYouMean(suggestions), + { + nodes: node + } + ) + ); + } + }, + NullValue(node) { + const type2 = context.getInputType(); + if (isNonNullType(type2)) { + context.reportError( + new GraphQLError( + `Expected value of type "${inspect(type2)}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + } + }, + EnumValue: (node) => isValidValueNode(context, node), + IntValue: (node) => isValidValueNode(context, node), + FloatValue: (node) => isValidValueNode(context, node), + StringValue: (node) => isValidValueNode(context, node), + BooleanValue: (node) => isValidValueNode(context, node) + }; + } + function isValidValueNode(context, node) { + const locationType = context.getInputType(); + if (!locationType) { + return; + } + const type2 = getNamedType(locationType); + if (!isLeafType(type2)) { + const typeStr = inspect(locationType); + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + return; + } + try { + const parseResult = type2.parseLiteral( + node, + void 0 + /* variables */ + ); + if (parseResult === void 0) { + const typeStr = inspect(locationType); + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + } + } catch (error) { + const typeStr = inspect(locationType); + if (error instanceof GraphQLError) { + context.reportError(error); + } else { + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}; ` + error.message, + { + nodes: node, + originalError: error + } + ) + ); + } + } + } + + // node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs + function VariablesAreInputTypesRule(context) { + return { + VariableDefinition(node) { + const type2 = typeFromAST(context.getSchema(), node.type); + if (type2 !== void 0 && !isInputType(type2)) { + const variableName = node.variable.name.value; + const typeName = print(node.type); + context.reportError( + new GraphQLError( + `Variable "$${variableName}" cannot be non-input type "${typeName}".`, + { + nodes: node.type + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs + function VariablesInAllowedPositionRule(context) { + let varDefMap = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: { + enter() { + varDefMap = /* @__PURE__ */ Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { node, type: type2, defaultValue } of usages) { + const varName = node.name.value; + const varDef = varDefMap[varName]; + if (varDef && type2) { + const schema = context.getSchema(); + const varType = typeFromAST(schema, varDef.type); + if (varType && !allowedVariableUsage( + schema, + varType, + varDef.defaultValue, + type2, + defaultValue + )) { + const varTypeStr = inspect(varType); + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, + { + nodes: [varDef, node] + } + ) + ); + } + } + } + } + }, + VariableDefinition(node) { + varDefMap[node.variable.name.value] = node; + } + }; + } + function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) { + if (isNonNullType(locationType) && !isNonNullType(varType)) { + const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL; + const hasLocationDefaultValue = locationDefaultValue !== void 0; + if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { + return false; + } + const nullableLocationType = locationType.ofType; + return isTypeSubTypeOf(schema, varType, nullableLocationType); + } + return isTypeSubTypeOf(schema, varType, locationType); + } + + // node_modules/graphql/validation/specifiedRules.mjs + var specifiedRules = Object.freeze([ + ExecutableDefinitionsRule, + UniqueOperationNamesRule, + LoneAnonymousOperationRule, + SingleFieldSubscriptionsRule, + KnownTypeNamesRule, + FragmentsOnCompositeTypesRule, + VariablesAreInputTypesRule, + ScalarLeafsRule, + FieldsOnCorrectTypeRule, + UniqueFragmentNamesRule, + KnownFragmentNamesRule, + NoUnusedFragmentsRule, + PossibleFragmentSpreadsRule, + NoFragmentCyclesRule, + UniqueVariableNamesRule, + NoUndefinedVariablesRule, + NoUnusedVariablesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + KnownArgumentNamesRule, + UniqueArgumentNamesRule, + ValuesOfCorrectTypeRule, + ProvidedRequiredArgumentsRule, + VariablesInAllowedPositionRule, + OverlappingFieldsCanBeMergedRule, + UniqueInputFieldNamesRule + ]); + var specifiedSDLRules = Object.freeze([ + LoneSchemaDefinitionRule, + UniqueOperationTypesRule, + UniqueTypeNamesRule, + UniqueEnumValueNamesRule, + UniqueFieldDefinitionNamesRule, + UniqueArgumentDefinitionNamesRule, + UniqueDirectiveNamesRule, + KnownTypeNamesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + PossibleTypeExtensionsRule, + KnownArgumentNamesOnDirectivesRule, + UniqueArgumentNamesRule, + UniqueInputFieldNamesRule, + ProvidedRequiredArgumentsOnDirectivesRule + ]); + + // node_modules/graphql/validation/ValidationContext.mjs + var ASTValidationContext = class { + constructor(ast, onError) { + this._ast = ast; + this._fragments = void 0; + this._fragmentSpreads = /* @__PURE__ */ new Map(); + this._recursivelyReferencedFragments = /* @__PURE__ */ new Map(); + this._onError = onError; + } + get [Symbol.toStringTag]() { + return "ASTValidationContext"; + } + reportError(error) { + this._onError(error); + } + getDocument() { + return this._ast; + } + getFragment(name2) { + let fragments; + if (this._fragments) { + fragments = this._fragments; + } else { + fragments = /* @__PURE__ */ Object.create(null); + for (const defNode of this.getDocument().definitions) { + if (defNode.kind === Kind.FRAGMENT_DEFINITION) { + fragments[defNode.name.value] = defNode; + } + } + this._fragments = fragments; + } + return fragments[name2]; + } + getFragmentSpreads(node) { + let spreads = this._fragmentSpreads.get(node); + if (!spreads) { + spreads = []; + const setsToVisit = [node]; + let set; + while (set = setsToVisit.pop()) { + for (const selection of set.selections) { + if (selection.kind === Kind.FRAGMENT_SPREAD) { + spreads.push(selection); + } else if (selection.selectionSet) { + setsToVisit.push(selection.selectionSet); + } + } + } + this._fragmentSpreads.set(node, spreads); + } + return spreads; + } + getRecursivelyReferencedFragments(operation) { + let fragments = this._recursivelyReferencedFragments.get(operation); + if (!fragments) { + fragments = []; + const collectedNames = /* @__PURE__ */ Object.create(null); + const nodesToVisit = [operation.selectionSet]; + let node; + while (node = nodesToVisit.pop()) { + for (const spread of this.getFragmentSpreads(node)) { + const fragName = spread.name.value; + if (collectedNames[fragName] !== true) { + collectedNames[fragName] = true; + const fragment = this.getFragment(fragName); + if (fragment) { + fragments.push(fragment); + nodesToVisit.push(fragment.selectionSet); + } + } + } + } + this._recursivelyReferencedFragments.set(operation, fragments); + } + return fragments; + } + }; + var SDLValidationContext = class extends ASTValidationContext { + constructor(ast, schema, onError) { + super(ast, onError); + this._schema = schema; + } + get [Symbol.toStringTag]() { + return "SDLValidationContext"; + } + getSchema() { + return this._schema; + } + }; + var ValidationContext = class extends ASTValidationContext { + constructor(schema, ast, typeInfo, onError) { + super(ast, onError); + this._schema = schema; + this._typeInfo = typeInfo; + this._variableUsages = /* @__PURE__ */ new Map(); + this._recursiveVariableUsages = /* @__PURE__ */ new Map(); + } + get [Symbol.toStringTag]() { + return "ValidationContext"; + } + getSchema() { + return this._schema; + } + getVariableUsages(node) { + let usages = this._variableUsages.get(node); + if (!usages) { + const newUsages = []; + const typeInfo = new TypeInfo(this._schema); + visit( + node, + visitWithTypeInfo(typeInfo, { + VariableDefinition: () => false, + Variable(variable) { + newUsages.push({ + node: variable, + type: typeInfo.getInputType(), + defaultValue: typeInfo.getDefaultValue() + }); + } + }) + ); + usages = newUsages; + this._variableUsages.set(node, usages); + } + return usages; + } + getRecursiveVariableUsages(operation) { + let usages = this._recursiveVariableUsages.get(operation); + if (!usages) { + usages = this.getVariableUsages(operation); + for (const frag of this.getRecursivelyReferencedFragments(operation)) { + usages = usages.concat(this.getVariableUsages(frag)); + } + this._recursiveVariableUsages.set(operation, usages); + } + return usages; + } + getType() { + return this._typeInfo.getType(); + } + getParentType() { + return this._typeInfo.getParentType(); + } + getInputType() { + return this._typeInfo.getInputType(); + } + getParentInputType() { + return this._typeInfo.getParentInputType(); + } + getFieldDef() { + return this._typeInfo.getFieldDef(); + } + getDirective() { + return this._typeInfo.getDirective(); + } + getArgument() { + return this._typeInfo.getArgument(); + } + getEnumValue() { + return this._typeInfo.getEnumValue(); + } + }; + + // node_modules/graphql/validation/validate.mjs + function validate(schema, documentAST, rules = specifiedRules, options, typeInfo = new TypeInfo(schema)) { + var _options$maxErrors; + const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100; + documentAST || devAssert(false, "Must provide document."); + assertValidSchema(schema); + const abortObj = Object.freeze({}); + const errors = []; + const context = new ValidationContext( + schema, + documentAST, + typeInfo, + (error) => { + if (errors.length >= maxErrors) { + errors.push( + new GraphQLError( + "Too many validation errors, error limit reached. Validation aborted." + ) + ); + throw abortObj; + } + errors.push(error); + } + ); + const visitor = visitInParallel(rules.map((rule) => rule(context))); + try { + visit(documentAST, visitWithTypeInfo(typeInfo, visitor)); + } catch (e) { + if (e !== abortObj) { + throw e; + } + } + return errors; + } + function validateSDL(documentAST, schemaToExtend, rules = specifiedSDLRules) { + const errors = []; + const context = new SDLValidationContext( + documentAST, + schemaToExtend, + (error) => { + errors.push(error); + } + ); + const visitors = rules.map((rule) => rule(context)); + visit(documentAST, visitInParallel(visitors)); + return errors; + } + function assertValidSDL(documentAST) { + const errors = validateSDL(documentAST); + if (errors.length !== 0) { + throw new Error(errors.map((error) => error.message).join("\n\n")); + } + } + + // node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs + function NoDeprecatedCustomRule(context) { + return { + Field(node) { + const fieldDef = context.getFieldDef(); + const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; + if (fieldDef && deprecationReason != null) { + const parentType = context.getParentType(); + parentType != null || invariant(false); + context.reportError( + new GraphQLError( + `The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + }, + Argument(node) { + const argDef = context.getArgument(); + const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; + if (argDef && deprecationReason != null) { + const directiveDef = context.getDirective(); + if (directiveDef != null) { + context.reportError( + new GraphQLError( + `Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } else { + const parentType = context.getParentType(); + const fieldDef = context.getFieldDef(); + parentType != null && fieldDef != null || invariant(false); + context.reportError( + new GraphQLError( + `Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }, + ObjectField(node) { + const inputObjectDef = getNamedType(context.getParentInputType()); + if (isInputObjectType(inputObjectDef)) { + const inputFieldDef = inputObjectDef.getFields()[node.name.value]; + const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; + if (deprecationReason != null) { + context.reportError( + new GraphQLError( + `The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }, + EnumValue(node) { + const enumValueDef = context.getEnumValue(); + const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; + if (enumValueDef && deprecationReason != null) { + const enumTypeDef = getNamedType(context.getInputType()); + enumTypeDef != null || invariant(false); + context.reportError( + new GraphQLError( + `The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }; + } + + // node_modules/graphql/utilities/buildClientSchema.mjs + function buildClientSchema(introspection, options) { + isObjectLike(introspection) && isObjectLike(introspection.__schema) || devAssert( + false, + `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${inspect( + introspection + )}.` + ); + const schemaIntrospection = introspection.__schema; + const typeMap = keyValMap( + schemaIntrospection.types, + (typeIntrospection) => typeIntrospection.name, + (typeIntrospection) => buildType(typeIntrospection) + ); + for (const stdType of [...specifiedScalarTypes, ...introspectionTypes]) { + if (typeMap[stdType.name]) { + typeMap[stdType.name] = stdType; + } + } + const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; + const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; + const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; + const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; + return new GraphQLSchema({ + description: schemaIntrospection.description, + query: queryType, + mutation: mutationType, + subscription: subscriptionType, + types: Object.values(typeMap), + directives, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); + function getType(typeRef) { + if (typeRef.kind === TypeKind.LIST) { + const itemRef = typeRef.ofType; + if (!itemRef) { + throw new Error("Decorated type deeper than introspection query."); + } + return new GraphQLList(getType(itemRef)); + } + if (typeRef.kind === TypeKind.NON_NULL) { + const nullableRef = typeRef.ofType; + if (!nullableRef) { + throw new Error("Decorated type deeper than introspection query."); + } + const nullableType = getType(nullableRef); + return new GraphQLNonNull(assertNullableType(nullableType)); + } + return getNamedType2(typeRef); + } + function getNamedType2(typeRef) { + const typeName = typeRef.name; + if (!typeName) { + throw new Error(`Unknown type reference: ${inspect(typeRef)}.`); + } + const type2 = typeMap[typeName]; + if (!type2) { + throw new Error( + `Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.` + ); + } + return type2; + } + function getObjectType(typeRef) { + return assertObjectType(getNamedType2(typeRef)); + } + function getInterfaceType(typeRef) { + return assertInterfaceType(getNamedType2(typeRef)); + } + function buildType(type2) { + if (type2 != null && type2.name != null && type2.kind != null) { + switch (type2.kind) { + case TypeKind.SCALAR: + return buildScalarDef(type2); + case TypeKind.OBJECT: + return buildObjectDef(type2); + case TypeKind.INTERFACE: + return buildInterfaceDef(type2); + case TypeKind.UNION: + return buildUnionDef(type2); + case TypeKind.ENUM: + return buildEnumDef(type2); + case TypeKind.INPUT_OBJECT: + return buildInputObjectDef(type2); + } + } + const typeStr = inspect(type2); + throw new Error( + `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.` + ); + } + function buildScalarDef(scalarIntrospection) { + return new GraphQLScalarType({ + name: scalarIntrospection.name, + description: scalarIntrospection.description, + specifiedByURL: scalarIntrospection.specifiedByURL + }); + } + function buildImplementationsList(implementingIntrospection) { + if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === TypeKind.INTERFACE) { + return []; + } + if (!implementingIntrospection.interfaces) { + const implementingIntrospectionStr = inspect(implementingIntrospection); + throw new Error( + `Introspection result missing interfaces: ${implementingIntrospectionStr}.` + ); + } + return implementingIntrospection.interfaces.map(getInterfaceType); + } + function buildObjectDef(objectIntrospection) { + return new GraphQLObjectType({ + name: objectIntrospection.name, + description: objectIntrospection.description, + interfaces: () => buildImplementationsList(objectIntrospection), + fields: () => buildFieldDefMap(objectIntrospection) + }); + } + function buildInterfaceDef(interfaceIntrospection) { + return new GraphQLInterfaceType({ + name: interfaceIntrospection.name, + description: interfaceIntrospection.description, + interfaces: () => buildImplementationsList(interfaceIntrospection), + fields: () => buildFieldDefMap(interfaceIntrospection) + }); + } + function buildUnionDef(unionIntrospection) { + if (!unionIntrospection.possibleTypes) { + const unionIntrospectionStr = inspect(unionIntrospection); + throw new Error( + `Introspection result missing possibleTypes: ${unionIntrospectionStr}.` + ); + } + return new GraphQLUnionType({ + name: unionIntrospection.name, + description: unionIntrospection.description, + types: () => unionIntrospection.possibleTypes.map(getObjectType) + }); + } + function buildEnumDef(enumIntrospection) { + if (!enumIntrospection.enumValues) { + const enumIntrospectionStr = inspect(enumIntrospection); + throw new Error( + `Introspection result missing enumValues: ${enumIntrospectionStr}.` + ); + } + return new GraphQLEnumType({ + name: enumIntrospection.name, + description: enumIntrospection.description, + values: keyValMap( + enumIntrospection.enumValues, + (valueIntrospection) => valueIntrospection.name, + (valueIntrospection) => ({ + description: valueIntrospection.description, + deprecationReason: valueIntrospection.deprecationReason + }) + ) + }); + } + function buildInputObjectDef(inputObjectIntrospection) { + if (!inputObjectIntrospection.inputFields) { + const inputObjectIntrospectionStr = inspect(inputObjectIntrospection); + throw new Error( + `Introspection result missing inputFields: ${inputObjectIntrospectionStr}.` + ); + } + return new GraphQLInputObjectType({ + name: inputObjectIntrospection.name, + description: inputObjectIntrospection.description, + fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields) + }); + } + function buildFieldDefMap(typeIntrospection) { + if (!typeIntrospection.fields) { + throw new Error( + `Introspection result missing fields: ${inspect(typeIntrospection)}.` + ); + } + return keyValMap( + typeIntrospection.fields, + (fieldIntrospection) => fieldIntrospection.name, + buildField + ); + } + function buildField(fieldIntrospection) { + const type2 = getType(fieldIntrospection.type); + if (!isOutputType(type2)) { + const typeStr = inspect(type2); + throw new Error( + `Introspection must provide output type for fields, but received: ${typeStr}.` + ); + } + if (!fieldIntrospection.args) { + const fieldIntrospectionStr = inspect(fieldIntrospection); + throw new Error( + `Introspection result missing field args: ${fieldIntrospectionStr}.` + ); + } + return { + description: fieldIntrospection.description, + deprecationReason: fieldIntrospection.deprecationReason, + type: type2, + args: buildInputValueDefMap(fieldIntrospection.args) + }; + } + function buildInputValueDefMap(inputValueIntrospections) { + return keyValMap( + inputValueIntrospections, + (inputValue) => inputValue.name, + buildInputValue + ); + } + function buildInputValue(inputValueIntrospection) { + const type2 = getType(inputValueIntrospection.type); + if (!isInputType(type2)) { + const typeStr = inspect(type2); + throw new Error( + `Introspection must provide input type for arguments, but received: ${typeStr}.` + ); + } + const defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type2) : void 0; + return { + description: inputValueIntrospection.description, + type: type2, + defaultValue, + deprecationReason: inputValueIntrospection.deprecationReason + }; + } + function buildDirective(directiveIntrospection) { + if (!directiveIntrospection.args) { + const directiveIntrospectionStr = inspect(directiveIntrospection); + throw new Error( + `Introspection result missing directive args: ${directiveIntrospectionStr}.` + ); + } + if (!directiveIntrospection.locations) { + const directiveIntrospectionStr = inspect(directiveIntrospection); + throw new Error( + `Introspection result missing directive locations: ${directiveIntrospectionStr}.` + ); + } + return new GraphQLDirective({ + name: directiveIntrospection.name, + description: directiveIntrospection.description, + isRepeatable: directiveIntrospection.isRepeatable, + locations: directiveIntrospection.locations.slice(), + args: buildInputValueDefMap(directiveIntrospection.args) + }); + } + } + + // node_modules/graphql/utilities/extendSchema.mjs + function extendSchemaImpl(schemaConfig, documentAST, options) { + var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; + const typeDefs = []; + const typeExtensionsMap = /* @__PURE__ */ Object.create(null); + const directiveDefs = []; + let schemaDef; + const schemaExtensions = []; + for (const def of documentAST.definitions) { + if (def.kind === Kind.SCHEMA_DEFINITION) { + schemaDef = def; + } else if (def.kind === Kind.SCHEMA_EXTENSION) { + schemaExtensions.push(def); + } else if (isTypeDefinitionNode(def)) { + typeDefs.push(def); + } else if (isTypeExtensionNode(def)) { + const extendedTypeName = def.name.value; + const existingTypeExtensions = typeExtensionsMap[extendedTypeName]; + typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; + } else if (def.kind === Kind.DIRECTIVE_DEFINITION) { + directiveDefs.push(def); + } + } + if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) { + return schemaConfig; + } + const typeMap = /* @__PURE__ */ Object.create(null); + for (const existingType of schemaConfig.types) { + typeMap[existingType.name] = extendNamedType(existingType); + } + for (const typeNode of typeDefs) { + var _stdTypeMap$name; + const name2 = typeNode.name.value; + typeMap[name2] = (_stdTypeMap$name = stdTypeMap[name2]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); + } + const operationTypes = { + // Get the extended root operation types. + query: schemaConfig.query && replaceNamedType(schemaConfig.query), + mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), + subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription), + // Then, incorporate schema definition and all schema extensions. + ...schemaDef && getOperationTypes([schemaDef]), + ...getOperationTypes(schemaExtensions) + }; + return { + description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value, + ...operationTypes, + types: Object.values(typeMap), + directives: [ + ...schemaConfig.directives.map(replaceDirective), + ...directiveDefs.map(buildDirective) + ], + extensions: /* @__PURE__ */ Object.create(null), + astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, + extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), + assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false + }; + function replaceType(type2) { + if (isListType(type2)) { + return new GraphQLList(replaceType(type2.ofType)); + } + if (isNonNullType(type2)) { + return new GraphQLNonNull(replaceType(type2.ofType)); + } + return replaceNamedType(type2); + } + function replaceNamedType(type2) { + return typeMap[type2.name]; + } + function replaceDirective(directive) { + const config = directive.toConfig(); + return new GraphQLDirective({ + ...config, + args: mapValue(config.args, extendArg) + }); + } + function extendNamedType(type2) { + if (isIntrospectionType(type2) || isSpecifiedScalarType(type2)) { + return type2; + } + if (isScalarType(type2)) { + return extendScalarType(type2); + } + if (isObjectType(type2)) { + return extendObjectType(type2); + } + if (isInterfaceType(type2)) { + return extendInterfaceType(type2); + } + if (isUnionType(type2)) { + return extendUnionType(type2); + } + if (isEnumType(type2)) { + return extendEnumType(type2); + } + if (isInputObjectType(type2)) { + return extendInputObjectType(type2); + } + invariant(false, "Unexpected type: " + inspect(type2)); + } + function extendInputObjectType(type2) { + var _typeExtensionsMap$co; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; + return new GraphQLInputObjectType({ + ...config, + fields: () => ({ + ...mapValue(config.fields, (field) => ({ + ...field, + type: replaceType(field.type) + })), + ...buildInputFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendEnumType(type2) { + var _typeExtensionsMap$ty; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type2.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; + return new GraphQLEnumType({ + ...config, + values: { ...config.values, ...buildEnumValueMap(extensions) }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendScalarType(type2) { + var _typeExtensionsMap$co2; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; + let specifiedByURL = config.specifiedByURL; + for (const extensionNode of extensions) { + var _getSpecifiedByURL; + specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL; + } + return new GraphQLScalarType({ + ...config, + specifiedByURL, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendObjectType(type2) { + var _typeExtensionsMap$co3; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; + return new GraphQLObjectType({ + ...config, + interfaces: () => [ + ...type2.getInterfaces().map(replaceNamedType), + ...buildInterfaces(extensions) + ], + fields: () => ({ + ...mapValue(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendInterfaceType(type2) { + var _typeExtensionsMap$co4; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; + return new GraphQLInterfaceType({ + ...config, + interfaces: () => [ + ...type2.getInterfaces().map(replaceNamedType), + ...buildInterfaces(extensions) + ], + fields: () => ({ + ...mapValue(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendUnionType(type2) { + var _typeExtensionsMap$co5; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; + return new GraphQLUnionType({ + ...config, + types: () => [ + ...type2.getTypes().map(replaceNamedType), + ...buildUnionTypes(extensions) + ], + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendField(field) { + return { + ...field, + type: replaceType(field.type), + args: field.args && mapValue(field.args, extendArg) + }; + } + function extendArg(arg) { + return { ...arg, type: replaceType(arg.type) }; + } + function getOperationTypes(nodes) { + const opTypes = {}; + for (const node of nodes) { + var _node$operationTypes; + const operationTypesNodes = ( + /* c8 ignore next */ + (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [] + ); + for (const operationType of operationTypesNodes) { + opTypes[operationType.operation] = getNamedType2(operationType.type); + } + } + return opTypes; + } + function getNamedType2(node) { + var _stdTypeMap$name2; + const name2 = node.name.value; + const type2 = (_stdTypeMap$name2 = stdTypeMap[name2]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name2]; + if (type2 === void 0) { + throw new Error(`Unknown type: "${name2}".`); + } + return type2; + } + function getWrappedType(node) { + if (node.kind === Kind.LIST_TYPE) { + return new GraphQLList(getWrappedType(node.type)); + } + if (node.kind === Kind.NON_NULL_TYPE) { + return new GraphQLNonNull(getWrappedType(node.type)); + } + return getNamedType2(node); + } + function buildDirective(node) { + var _node$description; + return new GraphQLDirective({ + name: node.name.value, + description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value, + // @ts-expect-error + locations: node.locations.map(({ value }) => value), + isRepeatable: node.repeatable, + args: buildArgumentMap(node.arguments), + astNode: node + }); + } + function buildFieldMap(nodes) { + const fieldConfigMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$fields; + const nodeFields = ( + /* c8 ignore next */ + (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [] + ); + for (const field of nodeFields) { + var _field$description; + fieldConfigMap[field.name.value] = { + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + type: getWrappedType(field.type), + description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value, + args: buildArgumentMap(field.arguments), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return fieldConfigMap; + } + function buildArgumentMap(args) { + const argsNodes = ( + /* c8 ignore next */ + args !== null && args !== void 0 ? args : [] + ); + const argConfigMap = /* @__PURE__ */ Object.create(null); + for (const arg of argsNodes) { + var _arg$description; + const type2 = getWrappedType(arg.type); + argConfigMap[arg.name.value] = { + type: type2, + description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value, + defaultValue: valueFromAST(arg.defaultValue, type2), + deprecationReason: getDeprecationReason(arg), + astNode: arg + }; + } + return argConfigMap; + } + function buildInputFieldMap(nodes) { + const inputFieldMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$fields2; + const fieldsNodes = ( + /* c8 ignore next */ + (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [] + ); + for (const field of fieldsNodes) { + var _field$description2; + const type2 = getWrappedType(field.type); + inputFieldMap[field.name.value] = { + type: type2, + description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value, + defaultValue: valueFromAST(field.defaultValue, type2), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return inputFieldMap; + } + function buildEnumValueMap(nodes) { + const enumValueMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$values; + const valuesNodes = ( + /* c8 ignore next */ + (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [] + ); + for (const value of valuesNodes) { + var _value$description; + enumValueMap[value.name.value] = { + description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value, + deprecationReason: getDeprecationReason(value), + astNode: value + }; + } + } + return enumValueMap; + } + function buildInterfaces(nodes) { + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (node) => { + var _node$interfaces$map, _node$interfaces; + return ( + /* c8 ignore next */ + (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType2)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : [] + ); + } + ); + } + function buildUnionTypes(nodes) { + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (node) => { + var _node$types$map, _node$types; + return ( + /* c8 ignore next */ + (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType2)) !== null && _node$types$map !== void 0 ? _node$types$map : [] + ); + } + ); + } + function buildType(astNode) { + var _typeExtensionsMap$na; + const name2 = astNode.name.value; + const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name2]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; + switch (astNode.kind) { + case Kind.OBJECT_TYPE_DEFINITION: { + var _astNode$description; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLObjectType({ + name: name2, + description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.INTERFACE_TYPE_DEFINITION: { + var _astNode$description2; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLInterfaceType({ + name: name2, + description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.ENUM_TYPE_DEFINITION: { + var _astNode$description3; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLEnumType({ + name: name2, + description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value, + values: buildEnumValueMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.UNION_TYPE_DEFINITION: { + var _astNode$description4; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLUnionType({ + name: name2, + description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value, + types: () => buildUnionTypes(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.SCALAR_TYPE_DEFINITION: { + var _astNode$description5; + return new GraphQLScalarType({ + name: name2, + description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value, + specifiedByURL: getSpecifiedByURL(astNode), + astNode, + extensionASTNodes + }); + } + case Kind.INPUT_OBJECT_TYPE_DEFINITION: { + var _astNode$description6; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLInputObjectType({ + name: name2, + description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value, + fields: () => buildInputFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + } + } + } + var stdTypeMap = keyMap( + [...specifiedScalarTypes, ...introspectionTypes], + (type2) => type2.name + ); + function getDeprecationReason(node) { + const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); + return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; + } + function getSpecifiedByURL(node) { + const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); + return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; + } + + // node_modules/graphql/utilities/buildASTSchema.mjs + function buildASTSchema(documentAST, options) { + documentAST != null && documentAST.kind === Kind.DOCUMENT || devAssert(false, "Must provide valid Document AST."); + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + assertValidSDL(documentAST); + } + const emptySchemaConfig = { + description: void 0, + types: [], + directives: [], + extensions: /* @__PURE__ */ Object.create(null), + extensionASTNodes: [], + assumeValid: false + }; + const config = extendSchemaImpl(emptySchemaConfig, documentAST, options); + if (config.astNode == null) { + for (const type2 of config.types) { + switch (type2.name) { + case "Query": + config.query = type2; + break; + case "Mutation": + config.mutation = type2; + break; + case "Subscription": + config.subscription = type2; + break; + } + } + } + const directives = [ + ...config.directives, + // If specified directives were not explicitly declared, add them. + ...specifiedDirectives.filter( + (stdDirective) => config.directives.every( + (directive) => directive.name !== stdDirective.name + ) + ) + ]; + return new GraphQLSchema({ ...config, directives }); + } + + // node_modules/graphql-language-service/esm/interface/autocompleteUtils.js + var import_introspection8 = __toESM(require_introspection()); + function getDefinitionState(tokenState) { + let definitionState; + forEachState(tokenState, (state) => { + switch (state.kind) { + case "Query": + case "ShortQuery": + case "Mutation": + case "Subscription": + case "FragmentDefinition": + definitionState = state; + break; + } + }); + return definitionState; + } + function getFieldDef2(schema, type2, fieldName) { + if (fieldName === import_introspection8.SchemaMetaFieldDef.name && schema.getQueryType() === type2) { + return import_introspection8.SchemaMetaFieldDef; + } + if (fieldName === import_introspection8.TypeMetaFieldDef.name && schema.getQueryType() === type2) { + return import_introspection8.TypeMetaFieldDef; + } + if (fieldName === import_introspection8.TypeNameMetaFieldDef.name && isCompositeType(type2)) { + return import_introspection8.TypeNameMetaFieldDef; + } + if ("getFields" in type2) { + return type2.getFields()[fieldName]; + } + return null; + } + function forEachState(stack, fn) { + const reverseStateStack = []; + let state = stack; + while (state === null || state === void 0 ? void 0 : state.kind) { + reverseStateStack.push(state); + state = state.prevState; + } + for (let i = reverseStateStack.length - 1; i >= 0; i--) { + fn(reverseStateStack[i]); + } + } + function objectValues(object) { + const keys = Object.keys(object); + const len = keys.length; + const values = new Array(len); + for (let i = 0; i < len; ++i) { + values[i] = object[keys[i]]; + } + return values; + } + function hintList(token, list2) { + return filterAndSortList(list2, normalizeText(token.string)); + } + function filterAndSortList(list2, text3) { + if (!text3) { + return filterNonEmpty(list2, (entry) => !entry.isDeprecated); + } + const byProximity = list2.map((entry) => ({ + proximity: getProximity(normalizeText(entry.label), text3), + entry + })); + return filterNonEmpty(filterNonEmpty(byProximity, (pair) => pair.proximity <= 2), (pair) => !pair.entry.isDeprecated).sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.label.length - b.entry.label.length).map((pair) => pair.entry); + } + function filterNonEmpty(array, predicate) { + const filtered = array.filter(predicate); + return filtered.length === 0 ? array : filtered; + } + function normalizeText(text3) { + return text3.toLowerCase().replaceAll(/\W/g, ""); + } + function getProximity(suggestion, text3) { + let proximity = lexicalDistance(text3, suggestion); + if (suggestion.length > text3.length) { + proximity -= suggestion.length - text3.length - 1; + proximity += suggestion.indexOf(text3) === 0 ? 0 : 0.5; + } + return proximity; + } + function lexicalDistance(a, b) { + let i; + let j; + const d = []; + const aLength = a.length; + const bLength = b.length; + for (i = 0; i <= aLength; i++) { + d[i] = [i]; + } + for (j = 1; j <= bLength; j++) { + d[0][j] = j; + } + for (i = 1; i <= aLength; i++) { + for (j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost); + } + } + } + return d[aLength][bLength]; + } + + // node_modules/vscode-languageserver-types/lib/esm/main.js + var DocumentUri; + (function(DocumentUri2) { + function is(value) { + return typeof value === "string"; + } + DocumentUri2.is = is; + })(DocumentUri || (DocumentUri = {})); + var URI2; + (function(URI3) { + function is(value) { + return typeof value === "string"; + } + URI3.is = is; + })(URI2 || (URI2 = {})); + var integer; + (function(integer2) { + integer2.MIN_VALUE = -2147483648; + integer2.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === "number" && integer2.MIN_VALUE <= value && value <= integer2.MAX_VALUE; + } + integer2.is = is; + })(integer || (integer = {})); + var uinteger; + (function(uinteger2) { + uinteger2.MIN_VALUE = 0; + uinteger2.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === "number" && uinteger2.MIN_VALUE <= value && value <= uinteger2.MAX_VALUE; + } + uinteger2.is = is; + })(uinteger || (uinteger = {})); + var Position2; + (function(Position4) { + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line, character }; + } + Position4.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position4.is = is; + })(Position2 || (Position2 = {})); + var Range2; + (function(Range4) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position2.create(one, two), end: Position2.create(three, four) }; + } else if (Position2.is(one) && Position2.is(two)) { + return { start: one, end: two }; + } else { + throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); + } + } + Range4.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position2.is(candidate.start) && Position2.is(candidate.end); + } + Range4.is = is; + })(Range2 || (Range2 = {})); + var Location2; + (function(Location3) { + function create(uri, range) { + return { uri, range }; + } + Location3.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location3.is = is; + })(Location2 || (Location2 = {})); + var LocationLink; + (function(LocationLink2) { + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri, targetRange, targetSelectionRange, originSelectionRange }; + } + LocationLink2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range2.is(candidate.targetSelectionRange) && (Range2.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink2.is = is; + })(LocationLink || (LocationLink = {})); + var Color2; + (function(Color3) { + function create(red, green, blue, alpha) { + return { + red, + green, + blue, + alpha + }; + } + Color3.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1); + } + Color3.is = is; + })(Color2 || (Color2 = {})); + var ColorInformation; + (function(ColorInformation2) { + function create(range, color) { + return { + range, + color + }; + } + ColorInformation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && Color2.is(candidate.color); + } + ColorInformation2.is = is; + })(ColorInformation || (ColorInformation = {})); + var ColorPresentation; + (function(ColorPresentation2) { + function create(label, textEdit, additionalTextEdits) { + return { + label, + textEdit, + additionalTextEdits + }; + } + ColorPresentation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation2.is = is; + })(ColorPresentation || (ColorPresentation = {})); + var FoldingRangeKind2; + (function(FoldingRangeKind3) { + FoldingRangeKind3.Comment = "comment"; + FoldingRangeKind3.Imports = "imports"; + FoldingRangeKind3.Region = "region"; + })(FoldingRangeKind2 || (FoldingRangeKind2 = {})); + var FoldingRange; + (function(FoldingRange2) { + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + var result = { + startLine, + endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange2.is = is; + })(FoldingRange || (FoldingRange = {})); + var DiagnosticRelatedInformation; + (function(DiagnosticRelatedInformation2) { + function create(location, message) { + return { + location, + message + }; + } + DiagnosticRelatedInformation2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location2.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation2.is = is; + })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); + var DiagnosticSeverity; + (function(DiagnosticSeverity2) { + DiagnosticSeverity2.Error = 1; + DiagnosticSeverity2.Warning = 2; + DiagnosticSeverity2.Information = 3; + DiagnosticSeverity2.Hint = 4; + })(DiagnosticSeverity || (DiagnosticSeverity = {})); + var DiagnosticTag; + (function(DiagnosticTag2) { + DiagnosticTag2.Unnecessary = 1; + DiagnosticTag2.Deprecated = 2; + })(DiagnosticTag || (DiagnosticTag = {})); + var CodeDescription; + (function(CodeDescription2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription2.is = is; + })(CodeDescription || (CodeDescription = {})); + var Diagnostic; + (function(Diagnostic2) { + function create(range, message, severity, code, source, relatedInformation) { + var result = { range, message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic2.create = create; + function is(value) { + var _a3; + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a3 = candidate.codeDescription) === null || _a3 === void 0 ? void 0 : _a3.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic2.is = is; + })(Diagnostic || (Diagnostic = {})); + var Command2; + (function(Command3) { + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title, command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command3.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command3.is = is; + })(Command2 || (Command2 = {})); + var TextEdit; + (function(TextEdit2) { + function replace(range, newText) { + return { range, newText }; + } + TextEdit2.replace = replace; + function insert(position, newText) { + return { range: { start: position, end: position }, newText }; + } + TextEdit2.insert = insert; + function del(range) { + return { range, newText: "" }; + } + TextEdit2.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range2.is(candidate.range); + } + TextEdit2.is = is; + })(TextEdit || (TextEdit = {})); + var ChangeAnnotation; + (function(ChangeAnnotation2) { + function create(label, needsConfirmation, description) { + var result = { label }; + if (needsConfirmation !== void 0) { + result.needsConfirmation = needsConfirmation; + } + if (description !== void 0) { + result.description = description; + } + return result; + } + ChangeAnnotation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === void 0) && (Is.string(candidate.description) || candidate.description === void 0); + } + ChangeAnnotation2.is = is; + })(ChangeAnnotation || (ChangeAnnotation = {})); + var ChangeAnnotationIdentifier; + (function(ChangeAnnotationIdentifier2) { + function is(value) { + var candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier2.is = is; + })(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); + var AnnotatedTextEdit; + (function(AnnotatedTextEdit2) { + function replace(range, newText, annotation) { + return { range, newText, annotationId: annotation }; + } + AnnotatedTextEdit2.replace = replace; + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText, annotationId: annotation }; + } + AnnotatedTextEdit2.insert = insert; + function del(range, annotation) { + return { range, newText: "", annotationId: annotation }; + } + AnnotatedTextEdit2.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit2.is = is; + })(AnnotatedTextEdit || (AnnotatedTextEdit = {})); + var TextDocumentEdit; + (function(TextDocumentEdit2) { + function create(textDocument, edits) { + return { textDocument, edits }; + } + TextDocumentEdit2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits); + } + TextDocumentEdit2.is = is; + })(TextDocumentEdit || (TextDocumentEdit = {})); + var CreateFile; + (function(CreateFile2) { + function create(uri, options, annotation) { + var result = { + kind: "create", + uri + }; + if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + CreateFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "create" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile2.is = is; + })(CreateFile || (CreateFile = {})); + var RenameFile; + (function(RenameFile2) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: "rename", + oldUri, + newUri + }; + if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + RenameFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "rename" && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile2.is = is; + })(RenameFile || (RenameFile = {})); + var DeleteFile; + (function(DeleteFile2) { + function create(uri, options, annotation) { + var result = { + kind: "delete", + uri + }; + if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + DeleteFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "delete" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile2.is = is; + })(DeleteFile || (DeleteFile = {})); + var WorkspaceEdit; + (function(WorkspaceEdit2) { + function is(value) { + var candidate = value; + return candidate && (candidate.changes !== void 0 || candidate.documentChanges !== void 0) && (candidate.documentChanges === void 0 || candidate.documentChanges.every(function(change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit2.is = is; + })(WorkspaceEdit || (WorkspaceEdit = {})); + var TextEditChangeImpl = ( + /** @class */ + function() { + function TextEditChangeImpl2(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl2.prototype.insert = function(position, newText, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.insert(position, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.replace = function(range, newText, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.replace(range, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.delete = function(range, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.del(range); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.add = function(edit) { + this.edits.push(edit); + }; + TextEditChangeImpl2.prototype.all = function() { + return this.edits; + }; + TextEditChangeImpl2.prototype.clear = function() { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl2.prototype.assertChangeAnnotations = function(value) { + if (value === void 0) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl2; + }() + ); + var ChangeAnnotations = ( + /** @class */ + function() { + function ChangeAnnotations2(annotations2) { + this._annotations = annotations2 === void 0 ? /* @__PURE__ */ Object.create(null) : annotations2; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations2.prototype.all = function() { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations2.prototype, "size", { + get: function() { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations2.prototype.manage = function(idOrAnnotation, annotation) { + var id2; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id2 = idOrAnnotation; + } else { + id2 = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id2] !== void 0) { + throw new Error("Id ".concat(id2, " is already in use.")); + } + if (annotation === void 0) { + throw new Error("No annotation provided for id ".concat(id2)); + } + this._annotations[id2] = annotation; + this._size++; + return id2; + }; + ChangeAnnotations2.prototype.nextId = function() { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations2; + }() + ); + var WorkspaceChange = ( + /** @class */ + function() { + function WorkspaceChange2(workspaceEdit) { + var _this = this; + this._textEditChanges = /* @__PURE__ */ Object.create(null); + if (workspaceEdit !== void 0) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function(change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function(key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange2.prototype, "edit", { + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get: function() { + this.initDocumentChanges(); + if (this._changeAnnotations !== void 0) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = void 0; + } else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange2.prototype.getTextEditChange = function(key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument, + edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } else { + this.initChanges(); + if (this._workspaceEdit.changes === void 0) { + throw new Error("Workspace edit is not configured for normal text edit changes."); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange2.prototype.initDocumentChanges = function() { + if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange2.prototype.initChanges = function() { + if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { + this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null); + } + }; + WorkspaceChange2.prototype.createFile = function(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = CreateFile.create(uri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + WorkspaceChange2.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = RenameFile.create(oldUri, newUri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + WorkspaceChange2.prototype.deleteFile = function(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = DeleteFile.create(uri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + return WorkspaceChange2; + }() + ); + var TextDocumentIdentifier; + (function(TextDocumentIdentifier2) { + function create(uri) { + return { uri }; + } + TextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier2.is = is; + })(TextDocumentIdentifier || (TextDocumentIdentifier = {})); + var VersionedTextDocumentIdentifier; + (function(VersionedTextDocumentIdentifier2) { + function create(uri, version) { + return { uri, version }; + } + VersionedTextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier2.is = is; + })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); + var OptionalVersionedTextDocumentIdentifier; + (function(OptionalVersionedTextDocumentIdentifier2) { + function create(uri, version) { + return { uri, version }; + } + OptionalVersionedTextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier2.is = is; + })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); + var TextDocumentItem; + (function(TextDocumentItem2) { + function create(uri, languageId, version, text3) { + return { uri, languageId, version, text: text3 }; + } + TextDocumentItem2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem2.is = is; + })(TextDocumentItem || (TextDocumentItem = {})); + var MarkupKind; + (function(MarkupKind2) { + MarkupKind2.PlainText = "plaintext"; + MarkupKind2.Markdown = "markdown"; + function is(value) { + var candidate = value; + return candidate === MarkupKind2.PlainText || candidate === MarkupKind2.Markdown; + } + MarkupKind2.is = is; + })(MarkupKind || (MarkupKind = {})); + var MarkupContent; + (function(MarkupContent2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent2.is = is; + })(MarkupContent || (MarkupContent = {})); + var CompletionItemKind2; + (function(CompletionItemKind4) { + CompletionItemKind4.Text = 1; + CompletionItemKind4.Method = 2; + CompletionItemKind4.Function = 3; + CompletionItemKind4.Constructor = 4; + CompletionItemKind4.Field = 5; + CompletionItemKind4.Variable = 6; + CompletionItemKind4.Class = 7; + CompletionItemKind4.Interface = 8; + CompletionItemKind4.Module = 9; + CompletionItemKind4.Property = 10; + CompletionItemKind4.Unit = 11; + CompletionItemKind4.Value = 12; + CompletionItemKind4.Enum = 13; + CompletionItemKind4.Keyword = 14; + CompletionItemKind4.Snippet = 15; + CompletionItemKind4.Color = 16; + CompletionItemKind4.File = 17; + CompletionItemKind4.Reference = 18; + CompletionItemKind4.Folder = 19; + CompletionItemKind4.EnumMember = 20; + CompletionItemKind4.Constant = 21; + CompletionItemKind4.Struct = 22; + CompletionItemKind4.Event = 23; + CompletionItemKind4.Operator = 24; + CompletionItemKind4.TypeParameter = 25; + })(CompletionItemKind2 || (CompletionItemKind2 = {})); + var InsertTextFormat; + (function(InsertTextFormat2) { + InsertTextFormat2.PlainText = 1; + InsertTextFormat2.Snippet = 2; + })(InsertTextFormat || (InsertTextFormat = {})); + var CompletionItemTag2; + (function(CompletionItemTag3) { + CompletionItemTag3.Deprecated = 1; + })(CompletionItemTag2 || (CompletionItemTag2 = {})); + var InsertReplaceEdit; + (function(InsertReplaceEdit2) { + function create(newText, insert, replace) { + return { newText, insert, replace }; + } + InsertReplaceEdit2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range2.is(candidate.insert) && Range2.is(candidate.replace); + } + InsertReplaceEdit2.is = is; + })(InsertReplaceEdit || (InsertReplaceEdit = {})); + var InsertTextMode; + (function(InsertTextMode2) { + InsertTextMode2.asIs = 1; + InsertTextMode2.adjustIndentation = 2; + })(InsertTextMode || (InsertTextMode = {})); + var CompletionItemLabelDetails; + (function(CompletionItemLabelDetails2) { + function is(value) { + var candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === void 0) && (Is.string(candidate.description) || candidate.description === void 0); + } + CompletionItemLabelDetails2.is = is; + })(CompletionItemLabelDetails || (CompletionItemLabelDetails = {})); + var CompletionItem; + (function(CompletionItem2) { + function create(label) { + return { label }; + } + CompletionItem2.create = create; + })(CompletionItem || (CompletionItem = {})); + var CompletionList; + (function(CompletionList2) { + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList2.create = create; + })(CompletionList || (CompletionList = {})); + var MarkedString; + (function(MarkedString2) { + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); + } + MarkedString2.fromPlainText = fromPlainText; + function is(value) { + var candidate = value; + return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value); + } + MarkedString2.is = is; + })(MarkedString || (MarkedString = {})); + var Hover; + (function(Hover2) { + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range2.is(value.range)); + } + Hover2.is = is; + })(Hover || (Hover = {})); + var ParameterInformation; + (function(ParameterInformation2) { + function create(label, documentation) { + return documentation ? { label, documentation } : { label }; + } + ParameterInformation2.create = create; + })(ParameterInformation || (ParameterInformation = {})); + var SignatureInformation; + (function(SignatureInformation2) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } else { + result.parameters = []; + } + return result; + } + SignatureInformation2.create = create; + })(SignatureInformation || (SignatureInformation = {})); + var DocumentHighlightKind3; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4.Text = 1; + DocumentHighlightKind4.Read = 2; + DocumentHighlightKind4.Write = 3; + })(DocumentHighlightKind3 || (DocumentHighlightKind3 = {})); + var DocumentHighlight; + (function(DocumentHighlight2) { + function create(range, kind) { + var result = { range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight2.create = create; + })(DocumentHighlight || (DocumentHighlight = {})); + var SymbolKind2; + (function(SymbolKind3) { + SymbolKind3.File = 1; + SymbolKind3.Module = 2; + SymbolKind3.Namespace = 3; + SymbolKind3.Package = 4; + SymbolKind3.Class = 5; + SymbolKind3.Method = 6; + SymbolKind3.Property = 7; + SymbolKind3.Field = 8; + SymbolKind3.Constructor = 9; + SymbolKind3.Enum = 10; + SymbolKind3.Interface = 11; + SymbolKind3.Function = 12; + SymbolKind3.Variable = 13; + SymbolKind3.Constant = 14; + SymbolKind3.String = 15; + SymbolKind3.Number = 16; + SymbolKind3.Boolean = 17; + SymbolKind3.Array = 18; + SymbolKind3.Object = 19; + SymbolKind3.Key = 20; + SymbolKind3.Null = 21; + SymbolKind3.EnumMember = 22; + SymbolKind3.Struct = 23; + SymbolKind3.Event = 24; + SymbolKind3.Operator = 25; + SymbolKind3.TypeParameter = 26; + })(SymbolKind2 || (SymbolKind2 = {})); + var SymbolTag2; + (function(SymbolTag3) { + SymbolTag3.Deprecated = 1; + })(SymbolTag2 || (SymbolTag2 = {})); + var SymbolInformation; + (function(SymbolInformation2) { + function create(name2, kind, range, uri, containerName) { + var result = { + name: name2, + kind, + location: { uri, range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation2.create = create; + })(SymbolInformation || (SymbolInformation = {})); + var WorkspaceSymbol; + (function(WorkspaceSymbol2) { + function create(name2, kind, uri, range) { + return range !== void 0 ? { name: name2, kind, location: { uri, range } } : { name: name2, kind, location: { uri } }; + } + WorkspaceSymbol2.create = create; + })(WorkspaceSymbol || (WorkspaceSymbol = {})); + var DocumentSymbol; + (function(DocumentSymbol2) { + function create(name2, detail, kind, range, selectionRange, children) { + var result = { + name: name2, + detail, + kind, + range, + selectionRange + }; + if (children !== void 0) { + result.children = children; + } + return result; + } + DocumentSymbol2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range2.is(candidate.range) && Range2.is(candidate.selectionRange) && (candidate.detail === void 0 || Is.string(candidate.detail)) && (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) && (candidate.children === void 0 || Array.isArray(candidate.children)) && (candidate.tags === void 0 || Array.isArray(candidate.tags)); + } + DocumentSymbol2.is = is; + })(DocumentSymbol || (DocumentSymbol = {})); + var CodeActionKind; + (function(CodeActionKind2) { + CodeActionKind2.Empty = ""; + CodeActionKind2.QuickFix = "quickfix"; + CodeActionKind2.Refactor = "refactor"; + CodeActionKind2.RefactorExtract = "refactor.extract"; + CodeActionKind2.RefactorInline = "refactor.inline"; + CodeActionKind2.RefactorRewrite = "refactor.rewrite"; + CodeActionKind2.Source = "source"; + CodeActionKind2.SourceOrganizeImports = "source.organizeImports"; + CodeActionKind2.SourceFixAll = "source.fixAll"; + })(CodeActionKind || (CodeActionKind = {})); + var CodeActionTriggerKind; + (function(CodeActionTriggerKind2) { + CodeActionTriggerKind2.Invoked = 1; + CodeActionTriggerKind2.Automatic = 2; + })(CodeActionTriggerKind || (CodeActionTriggerKind = {})); + var CodeActionContext; + (function(CodeActionContext2) { + function create(diagnostics, only, triggerKind) { + var result = { diagnostics }; + if (only !== void 0 && only !== null) { + result.only = only; + } + if (triggerKind !== void 0 && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === void 0 || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext2.is = is; + })(CodeActionContext || (CodeActionContext = {})); + var CodeAction; + (function(CodeAction2) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === "string") { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } else if (Command2.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== void 0) { + result.kind = kind; + } + return result; + } + CodeAction2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === void 0 || Is.string(candidate.kind)) && (candidate.edit !== void 0 || candidate.command !== void 0) && (candidate.command === void 0 || Command2.is(candidate.command)) && (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) && (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit)); + } + CodeAction2.is = is; + })(CodeAction || (CodeAction = {})); + var CodeLens; + (function(CodeLens2) { + function create(range, data) { + var result = { range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && (Is.undefined(candidate.command) || Command2.is(candidate.command)); + } + CodeLens2.is = is; + })(CodeLens || (CodeLens = {})); + var FormattingOptions; + (function(FormattingOptions2) { + function create(tabSize, insertSpaces) { + return { tabSize, insertSpaces }; + } + FormattingOptions2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions2.is = is; + })(FormattingOptions || (FormattingOptions = {})); + var DocumentLink; + (function(DocumentLink2) { + function create(range, target, data) { + return { range, target, data }; + } + DocumentLink2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink2.is = is; + })(DocumentLink || (DocumentLink = {})); + var SelectionRange; + (function(SelectionRange2) { + function create(range, parent) { + return { range, parent }; + } + SelectionRange2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && (candidate.parent === void 0 || SelectionRange2.is(candidate.parent)); + } + SelectionRange2.is = is; + })(SelectionRange || (SelectionRange = {})); + var SemanticTokenTypes; + (function(SemanticTokenTypes2) { + SemanticTokenTypes2["namespace"] = "namespace"; + SemanticTokenTypes2["type"] = "type"; + SemanticTokenTypes2["class"] = "class"; + SemanticTokenTypes2["enum"] = "enum"; + SemanticTokenTypes2["interface"] = "interface"; + SemanticTokenTypes2["struct"] = "struct"; + SemanticTokenTypes2["typeParameter"] = "typeParameter"; + SemanticTokenTypes2["parameter"] = "parameter"; + SemanticTokenTypes2["variable"] = "variable"; + SemanticTokenTypes2["property"] = "property"; + SemanticTokenTypes2["enumMember"] = "enumMember"; + SemanticTokenTypes2["event"] = "event"; + SemanticTokenTypes2["function"] = "function"; + SemanticTokenTypes2["method"] = "method"; + SemanticTokenTypes2["macro"] = "macro"; + SemanticTokenTypes2["keyword"] = "keyword"; + SemanticTokenTypes2["modifier"] = "modifier"; + SemanticTokenTypes2["comment"] = "comment"; + SemanticTokenTypes2["string"] = "string"; + SemanticTokenTypes2["number"] = "number"; + SemanticTokenTypes2["regexp"] = "regexp"; + SemanticTokenTypes2["operator"] = "operator"; + SemanticTokenTypes2["decorator"] = "decorator"; + })(SemanticTokenTypes || (SemanticTokenTypes = {})); + var SemanticTokenModifiers; + (function(SemanticTokenModifiers2) { + SemanticTokenModifiers2["declaration"] = "declaration"; + SemanticTokenModifiers2["definition"] = "definition"; + SemanticTokenModifiers2["readonly"] = "readonly"; + SemanticTokenModifiers2["static"] = "static"; + SemanticTokenModifiers2["deprecated"] = "deprecated"; + SemanticTokenModifiers2["abstract"] = "abstract"; + SemanticTokenModifiers2["async"] = "async"; + SemanticTokenModifiers2["modification"] = "modification"; + SemanticTokenModifiers2["documentation"] = "documentation"; + SemanticTokenModifiers2["defaultLibrary"] = "defaultLibrary"; + })(SemanticTokenModifiers || (SemanticTokenModifiers = {})); + var SemanticTokens; + (function(SemanticTokens2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === void 0 || typeof candidate.resultId === "string") && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === "number"); + } + SemanticTokens2.is = is; + })(SemanticTokens || (SemanticTokens = {})); + var InlineValueText; + (function(InlineValueText2) { + function create(range, text3) { + return { range, text: text3 }; + } + InlineValueText2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText2.is = is; + })(InlineValueText || (InlineValueText = {})); + var InlineValueVariableLookup; + (function(InlineValueVariableLookup2) { + function create(range, variableName, caseSensitiveLookup) { + return { range, variableName, caseSensitiveLookup }; + } + InlineValueVariableLookup2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === void 0); + } + InlineValueVariableLookup2.is = is; + })(InlineValueVariableLookup || (InlineValueVariableLookup = {})); + var InlineValueEvaluatableExpression; + (function(InlineValueEvaluatableExpression2) { + function create(range, expression) { + return { range, expression }; + } + InlineValueEvaluatableExpression2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === void 0); + } + InlineValueEvaluatableExpression2.is = is; + })(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {})); + var InlineValueContext; + (function(InlineValueContext2) { + function create(frameId, stoppedLocation) { + return { frameId, stoppedLocation }; + } + InlineValueContext2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(value.stoppedLocation); + } + InlineValueContext2.is = is; + })(InlineValueContext || (InlineValueContext = {})); + var InlayHintKind3; + (function(InlayHintKind4) { + InlayHintKind4.Type = 1; + InlayHintKind4.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind4.is = is; + })(InlayHintKind3 || (InlayHintKind3 = {})); + var InlayHintLabelPart; + (function(InlayHintLabelPart2) { + function create(value) { + return { value }; + } + InlayHintLabelPart2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === void 0 || Location2.is(candidate.location)) && (candidate.command === void 0 || Command2.is(candidate.command)); + } + InlayHintLabelPart2.is = is; + })(InlayHintLabelPart || (InlayHintLabelPart = {})); + var InlayHint; + (function(InlayHint2) { + function create(position, label, kind) { + var result = { position, label }; + if (kind !== void 0) { + result.kind = kind; + } + return result; + } + InlayHint2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position2.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === void 0 || InlayHintKind3.is(candidate.kind)) && candidate.textEdits === void 0 || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === void 0 || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === void 0 || Is.boolean(candidate.paddingRight)); + } + InlayHint2.is = is; + })(InlayHint || (InlayHint = {})); + var WorkspaceFolder; + (function(WorkspaceFolder2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && URI2.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder2.is = is; + })(WorkspaceFolder || (WorkspaceFolder = {})); + var TextDocument; + (function(TextDocument2) { + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument2.is = is; + function applyEdits(document2, edits) { + var text3 = document2.getText(); + var sortedEdits = mergeSort(edits, function(a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text3.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document2.offsetAt(e.range.start); + var endOffset = document2.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text3 = text3.substring(0, startOffset) + e.newText + text3.substring(endOffset, text3.length); + } else { + throw new Error("Overlapping edit"); + } + lastModifiedOffset = startOffset; + } + return text3; + } + TextDocument2.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + return data; + } + var p2 = data.length / 2 | 0; + var left = data.slice(0, p2); + var right = data.slice(p2); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + data[i++] = left[leftIdx++]; + } else { + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + })(TextDocument || (TextDocument = {})); + var FullTextDocument = ( + /** @class */ + function() { + function FullTextDocument2(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = void 0; + } + Object.defineProperty(FullTextDocument2.prototype, "uri", { + get: function() { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument2.prototype, "languageId", { + get: function() { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument2.prototype, "version", { + get: function() { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument2.prototype.getText = function(range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument2.prototype.update = function(event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = void 0; + }; + FullTextDocument2.prototype.getLineOffsets = function() { + if (this._lineOffsets === void 0) { + var lineOffsets = []; + var text3 = this._content; + var isLineStart = true; + for (var i = 0; i < text3.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text3.charAt(i); + isLineStart = ch === "\r" || ch === "\n"; + if (ch === "\r" && i + 1 < text3.length && text3.charAt(i + 1) === "\n") { + i++; + } + } + if (isLineStart && text3.length > 0) { + lineOffsets.push(text3.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument2.prototype.positionAt = function(offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position2.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } else { + low = mid + 1; + } + } + var line = low - 1; + return Position2.create(line, offset - lineOffsets[line]); + }; + FullTextDocument2.prototype.offsetAt = function(position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument2.prototype, "lineCount", { + get: function() { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument2; + }() + ); + var Is; + (function(Is2) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== "undefined"; + } + Is2.defined = defined; + function undefined2(value) { + return typeof value === "undefined"; + } + Is2.undefined = undefined2; + function boolean(value) { + return value === true || value === false; + } + Is2.boolean = boolean; + function string(value) { + return toString.call(value) === "[object String]"; + } + Is2.string = string; + function number(value) { + return toString.call(value) === "[object Number]"; + } + Is2.number = number; + function numberRange(value, min, max) { + return toString.call(value) === "[object Number]" && min <= value && value <= max; + } + Is2.numberRange = numberRange; + function integer2(value) { + return toString.call(value) === "[object Number]" && -2147483648 <= value && value <= 2147483647; + } + Is2.integer = integer2; + function uinteger2(value) { + return toString.call(value) === "[object Number]" && 0 <= value && value <= 2147483647; + } + Is2.uinteger = uinteger2; + function func(value) { + return toString.call(value) === "[object Function]"; + } + Is2.func = func; + function objectLiteral(value) { + return value !== null && typeof value === "object"; + } + Is2.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is2.typedArray = typedArray; + })(Is || (Is = {})); + + // node_modules/graphql-language-service/esm/types.js + var CompletionItemKind3; + (function(CompletionItemKind4) { + CompletionItemKind4.Text = 1; + CompletionItemKind4.Method = 2; + CompletionItemKind4.Function = 3; + CompletionItemKind4.Constructor = 4; + CompletionItemKind4.Field = 5; + CompletionItemKind4.Variable = 6; + CompletionItemKind4.Class = 7; + CompletionItemKind4.Interface = 8; + CompletionItemKind4.Module = 9; + CompletionItemKind4.Property = 10; + CompletionItemKind4.Unit = 11; + CompletionItemKind4.Value = 12; + CompletionItemKind4.Enum = 13; + CompletionItemKind4.Keyword = 14; + CompletionItemKind4.Snippet = 15; + CompletionItemKind4.Color = 16; + CompletionItemKind4.File = 17; + CompletionItemKind4.Reference = 18; + CompletionItemKind4.Folder = 19; + CompletionItemKind4.EnumMember = 20; + CompletionItemKind4.Constant = 21; + CompletionItemKind4.Struct = 22; + CompletionItemKind4.Event = 23; + CompletionItemKind4.Operator = 24; + CompletionItemKind4.TypeParameter = 25; + })(CompletionItemKind3 || (CompletionItemKind3 = {})); + + // node_modules/graphql-language-service/esm/parser/CharacterStream.js + var CharacterStream = class { + constructor(sourceText) { + this.getStartOfToken = () => this._start; + this.getCurrentPosition = () => this._pos; + this.eol = () => this._sourceText.length === this._pos; + this.sol = () => this._pos === 0; + this.peek = () => { + return this._sourceText.charAt(this._pos) || null; + }; + this.next = () => { + const char = this._sourceText.charAt(this._pos); + this._pos++; + return char; + }; + this.eat = (pattern) => { + const isMatched = this._testNextCharacter(pattern); + if (isMatched) { + this._start = this._pos; + this._pos++; + return this._sourceText.charAt(this._pos - 1); + } + return void 0; + }; + this.eatWhile = (match) => { + let isMatched = this._testNextCharacter(match); + let didEat = false; + if (isMatched) { + didEat = isMatched; + this._start = this._pos; + } + while (isMatched) { + this._pos++; + isMatched = this._testNextCharacter(match); + didEat = true; + } + return didEat; + }; + this.eatSpace = () => this.eatWhile(/[\s\u00a0]/); + this.skipToEnd = () => { + this._pos = this._sourceText.length; + }; + this.skipTo = (position) => { + this._pos = position; + }; + this.match = (pattern, consume = true, caseFold = false) => { + let token = null; + let match = null; + if (typeof pattern === "string") { + const regex = new RegExp(pattern, caseFold ? "i" : "g"); + match = regex.test(this._sourceText.slice(this._pos, this._pos + pattern.length)); + token = pattern; + } else if (pattern instanceof RegExp) { + match = this._sourceText.slice(this._pos).match(pattern); + token = match === null || match === void 0 ? void 0 : match[0]; + } + if (match != null && (typeof pattern === "string" || match instanceof Array && this._sourceText.startsWith(match[0], this._pos))) { + if (consume) { + this._start = this._pos; + if (token && token.length) { + this._pos += token.length; + } + } + return match; + } + return false; + }; + this.backUp = (num) => { + this._pos -= num; + }; + this.column = () => this._pos; + this.indentation = () => { + const match = this._sourceText.match(/\s*/); + let indent2 = 0; + if (match && match.length !== 0) { + const whiteSpaces = match[0]; + let pos = 0; + while (whiteSpaces.length > pos) { + if (whiteSpaces.charCodeAt(pos) === 9) { + indent2 += 2; + } else { + indent2++; + } + pos++; + } + } + return indent2; + }; + this.current = () => this._sourceText.slice(this._start, this._pos); + this._start = 0; + this._pos = 0; + this._sourceText = sourceText; + } + _testNextCharacter(pattern) { + const character = this._sourceText.charAt(this._pos); + let isMatched = false; + if (typeof pattern === "string") { + isMatched = character === pattern; + } else { + isMatched = pattern instanceof RegExp ? pattern.test(character) : pattern(character); + } + return isMatched; + } + }; + + // node_modules/graphql-language-service/esm/parser/RuleHelpers.js + function opt(ofRule) { + return { ofRule }; + } + function list(ofRule, separator) { + return { ofRule, isList: true, separator }; + } + function butNot(rule, exclusions) { + const ruleMatch = rule.match; + rule.match = (token) => { + let check = false; + if (ruleMatch) { + check = ruleMatch(token); + } + return check && exclusions.every((exclusion) => exclusion.match && !exclusion.match(token)); + }; + return rule; + } + function t(kind, style) { + return { style, match: (token) => token.kind === kind }; + } + function p(value, style) { + return { + style: style || "punctuation", + match: (token) => token.kind === "Punctuation" && token.value === value + }; + } + + // node_modules/graphql-language-service/esm/parser/Rules.js + var isIgnored = (ch) => ch === " " || ch === " " || ch === "," || ch === "\n" || ch === "\r" || ch === "\uFEFF" || ch === "\xA0"; + var LexRules = { + Name: /^[_A-Za-z][_0-9A-Za-z]*/, + Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/, + Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, + String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/, + Comment: /^#.*/ + }; + var ParseRules = { + Document: [list("Definition")], + Definition(token) { + switch (token.value) { + case "{": + return "ShortQuery"; + case "query": + return "Query"; + case "mutation": + return "Mutation"; + case "subscription": + return "Subscription"; + case "fragment": + return Kind.FRAGMENT_DEFINITION; + case "schema": + return "SchemaDef"; + case "scalar": + return "ScalarDef"; + case "type": + return "ObjectTypeDef"; + case "interface": + return "InterfaceDef"; + case "union": + return "UnionDef"; + case "enum": + return "EnumDef"; + case "input": + return "InputDef"; + case "extend": + return "ExtendDef"; + case "directive": + return "DirectiveDef"; + } + }, + ShortQuery: ["SelectionSet"], + Query: [ + word("query"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + Mutation: [ + word("mutation"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + Subscription: [ + word("subscription"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + VariableDefinitions: [p("("), list("VariableDefinition"), p(")")], + VariableDefinition: ["Variable", p(":"), "Type", opt("DefaultValue")], + Variable: [p("$", "variable"), name("variable")], + DefaultValue: [p("="), "Value"], + SelectionSet: [p("{"), list("Selection"), p("}")], + Selection(token, stream) { + return token.value === "..." ? stream.match(/[\s\u00a0,]*(on\b|@|{)/, false) ? "InlineFragment" : "FragmentSpread" : stream.match(/[\s\u00a0,]*:/, false) ? "AliasedField" : "Field"; + }, + AliasedField: [ + name("property"), + p(":"), + name("qualifier"), + opt("Arguments"), + list("Directive"), + opt("SelectionSet") + ], + Field: [ + name("property"), + opt("Arguments"), + list("Directive"), + opt("SelectionSet") + ], + Arguments: [p("("), list("Argument"), p(")")], + Argument: [name("attribute"), p(":"), "Value"], + FragmentSpread: [p("..."), name("def"), list("Directive")], + InlineFragment: [ + p("..."), + opt("TypeCondition"), + list("Directive"), + "SelectionSet" + ], + FragmentDefinition: [ + word("fragment"), + opt(butNot(name("def"), [word("on")])), + "TypeCondition", + list("Directive"), + "SelectionSet" + ], + TypeCondition: [word("on"), "NamedType"], + Value(token) { + switch (token.kind) { + case "Number": + return "NumberValue"; + case "String": + return "StringValue"; + case "Punctuation": + switch (token.value) { + case "[": + return "ListValue"; + case "{": + return "ObjectValue"; + case "$": + return "Variable"; + case "&": + return "NamedType"; + } + return null; + case "Name": + switch (token.value) { + case "true": + case "false": + return "BooleanValue"; + } + if (token.value === "null") { + return "NullValue"; + } + return "EnumValue"; + } + }, + NumberValue: [t("Number", "number")], + StringValue: [ + { + style: "string", + match: (token) => token.kind === "String", + update(state, token) { + if (token.value.startsWith('"""')) { + state.inBlockstring = !token.value.slice(3).endsWith('"""'); + } + } + } + ], + BooleanValue: [t("Name", "builtin")], + NullValue: [t("Name", "keyword")], + EnumValue: [name("string-2")], + ListValue: [p("["), list("Value"), p("]")], + ObjectValue: [p("{"), list("ObjectField"), p("}")], + ObjectField: [name("attribute"), p(":"), "Value"], + Type(token) { + return token.value === "[" ? "ListType" : "NonNullType"; + }, + ListType: [p("["), "Type", p("]"), opt(p("!"))], + NonNullType: ["NamedType", opt(p("!"))], + NamedType: [type("atom")], + Directive: [p("@", "meta"), name("meta"), opt("Arguments")], + DirectiveDef: [ + word("directive"), + p("@", "meta"), + name("meta"), + opt("ArgumentsDef"), + word("on"), + list("DirectiveLocation", p("|")) + ], + InterfaceDef: [ + word("interface"), + name("atom"), + opt("Implements"), + list("Directive"), + p("{"), + list("FieldDef"), + p("}") + ], + Implements: [word("implements"), list("NamedType", p("&"))], + DirectiveLocation: [name("string-2")], + SchemaDef: [ + word("schema"), + list("Directive"), + p("{"), + list("OperationTypeDef"), + p("}") + ], + OperationTypeDef: [name("keyword"), p(":"), name("atom")], + ScalarDef: [word("scalar"), name("atom"), list("Directive")], + ObjectTypeDef: [ + word("type"), + name("atom"), + opt("Implements"), + list("Directive"), + p("{"), + list("FieldDef"), + p("}") + ], + FieldDef: [ + name("property"), + opt("ArgumentsDef"), + p(":"), + "Type", + list("Directive") + ], + ArgumentsDef: [p("("), list("InputValueDef"), p(")")], + InputValueDef: [ + name("attribute"), + p(":"), + "Type", + opt("DefaultValue"), + list("Directive") + ], + UnionDef: [ + word("union"), + name("atom"), + list("Directive"), + p("="), + list("UnionMember", p("|")) + ], + UnionMember: ["NamedType"], + EnumDef: [ + word("enum"), + name("atom"), + list("Directive"), + p("{"), + list("EnumValueDef"), + p("}") + ], + EnumValueDef: [name("string-2"), list("Directive")], + InputDef: [ + word("input"), + name("atom"), + list("Directive"), + p("{"), + list("InputValueDef"), + p("}") + ], + ExtendDef: [word("extend"), "ExtensionDefinition"], + ExtensionDefinition(token) { + switch (token.value) { + case "schema": + return Kind.SCHEMA_EXTENSION; + case "scalar": + return Kind.SCALAR_TYPE_EXTENSION; + case "type": + return Kind.OBJECT_TYPE_EXTENSION; + case "interface": + return Kind.INTERFACE_TYPE_EXTENSION; + case "union": + return Kind.UNION_TYPE_EXTENSION; + case "enum": + return Kind.ENUM_TYPE_EXTENSION; + case "input": + return Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + }, + [Kind.SCHEMA_EXTENSION]: ["SchemaDef"], + [Kind.SCALAR_TYPE_EXTENSION]: ["ScalarDef"], + [Kind.OBJECT_TYPE_EXTENSION]: ["ObjectTypeDef"], + [Kind.INTERFACE_TYPE_EXTENSION]: ["InterfaceDef"], + [Kind.UNION_TYPE_EXTENSION]: ["UnionDef"], + [Kind.ENUM_TYPE_EXTENSION]: ["EnumDef"], + [Kind.INPUT_OBJECT_TYPE_EXTENSION]: ["InputDef"] + }; + function word(value) { + return { + style: "keyword", + match: (token) => token.kind === "Name" && token.value === value + }; + } + function name(style) { + return { + style, + match: (token) => token.kind === "Name", + update(state, token) { + state.name = token.value; + } + }; + } + function type(style) { + return { + style, + match: (token) => token.kind === "Name", + update(state, token) { + var _a3; + if ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.prevState) { + state.name = token.value; + state.prevState.prevState.type = token.value; + } + } + }; + } + + // node_modules/graphql-language-service/esm/parser/onlineParser.js + function onlineParser(options = { + eatWhitespace: (stream) => stream.eatWhile(isIgnored), + lexRules: LexRules, + parseRules: ParseRules, + editorConfig: {} + }) { + return { + startState() { + const initialState = { + level: 0, + step: 0, + name: null, + kind: null, + type: null, + rule: null, + needsSeparator: false, + prevState: null + }; + pushRule(options.parseRules, initialState, Kind.DOCUMENT); + return initialState; + }, + token(stream, state) { + return getToken(stream, state, options); + } + }; + } + function getToken(stream, state, options) { + var _a3; + if (state.inBlockstring) { + if (stream.match(/.*"""/)) { + state.inBlockstring = false; + return "string"; + } + stream.skipToEnd(); + return "string"; + } + const { lexRules, parseRules, eatWhitespace, editorConfig } = options; + if (state.rule && state.rule.length === 0) { + popRule(state); + } else if (state.needsAdvance) { + state.needsAdvance = false; + advanceRule(state, true); + } + if (stream.sol()) { + const tabSize = (editorConfig === null || editorConfig === void 0 ? void 0 : editorConfig.tabSize) || 2; + state.indentLevel = Math.floor(stream.indentation() / tabSize); + } + if (eatWhitespace(stream)) { + return "ws"; + } + const token = lex(lexRules, stream); + if (!token) { + const matchedSomething = stream.match(/\S+/); + if (!matchedSomething) { + stream.match(/\s/); + } + pushRule(SpecialParseRules, state, "Invalid"); + return "invalidchar"; + } + if (token.kind === "Comment") { + pushRule(SpecialParseRules, state, "Comment"); + return "comment"; + } + const backupState = assign({}, state); + if (token.kind === "Punctuation") { + if (/^[{([]/.test(token.value)) { + if (state.indentLevel !== void 0) { + state.levels = (state.levels || []).concat(state.indentLevel + 1); + } + } else if (/^[})\]]/.test(token.value)) { + const levels = state.levels = (state.levels || []).slice(0, -1); + if (state.indentLevel && levels.length > 0 && levels.at(-1) < state.indentLevel) { + state.indentLevel = levels.at(-1); + } + } + } + while (state.rule) { + let expected = typeof state.rule === "function" ? state.step === 0 ? state.rule(token, stream) : null : state.rule[state.step]; + if (state.needsSeparator) { + expected = expected === null || expected === void 0 ? void 0 : expected.separator; + } + if (expected) { + if (expected.ofRule) { + expected = expected.ofRule; + } + if (typeof expected === "string") { + pushRule(parseRules, state, expected); + continue; + } + if ((_a3 = expected.match) === null || _a3 === void 0 ? void 0 : _a3.call(expected, token)) { + if (expected.update) { + expected.update(state, token); + } + if (token.kind === "Punctuation") { + advanceRule(state, true); + } else { + state.needsAdvance = true; + } + return expected.style; + } + } + unsuccessful(state); + } + assign(state, backupState); + pushRule(SpecialParseRules, state, "Invalid"); + return "invalidchar"; + } + function assign(to, from) { + const keys = Object.keys(from); + for (let i = 0; i < keys.length; i++) { + to[keys[i]] = from[keys[i]]; + } + return to; + } + var SpecialParseRules = { + Invalid: [], + Comment: [] + }; + function pushRule(rules, state, ruleKind) { + if (!rules[ruleKind]) { + throw new TypeError("Unknown rule: " + ruleKind); + } + state.prevState = Object.assign({}, state); + state.kind = ruleKind; + state.name = null; + state.type = null; + state.rule = rules[ruleKind]; + state.step = 0; + state.needsSeparator = false; + } + function popRule(state) { + if (!state.prevState) { + return; + } + state.kind = state.prevState.kind; + state.name = state.prevState.name; + state.type = state.prevState.type; + state.rule = state.prevState.rule; + state.step = state.prevState.step; + state.needsSeparator = state.prevState.needsSeparator; + state.prevState = state.prevState.prevState; + } + function advanceRule(state, successful) { + var _a3; + if (isList(state) && state.rule) { + const step = state.rule[state.step]; + if (step.separator) { + const { separator } = step; + state.needsSeparator = !state.needsSeparator; + if (!state.needsSeparator && separator.ofRule) { + return; + } + } + if (successful) { + return; + } + } + state.needsSeparator = false; + state.step++; + while (state.rule && !(Array.isArray(state.rule) && state.step < state.rule.length)) { + popRule(state); + if (state.rule) { + if (isList(state)) { + if ((_a3 = state.rule) === null || _a3 === void 0 ? void 0 : _a3[state.step].separator) { + state.needsSeparator = !state.needsSeparator; + } + } else { + state.needsSeparator = false; + state.step++; + } + } + } + } + function isList(state) { + const step = Array.isArray(state.rule) && typeof state.rule[state.step] !== "string" && state.rule[state.step]; + return step && step.isList; + } + function unsuccessful(state) { + while (state.rule && !(Array.isArray(state.rule) && state.rule[state.step].ofRule)) { + popRule(state); + } + if (state.rule) { + advanceRule(state, false); + } + } + function lex(lexRules, stream) { + const kinds = Object.keys(lexRules); + for (let i = 0; i < kinds.length; i++) { + const match = stream.match(lexRules[kinds[i]]); + if (match && match instanceof Array) { + return { kind: kinds[i], value: match[0] }; + } + } + } + + // node_modules/graphql-language-service/esm/parser/types.js + var AdditionalRuleKinds = { + ALIASED_FIELD: "AliasedField", + ARGUMENTS: "Arguments", + SHORT_QUERY: "ShortQuery", + QUERY: "Query", + MUTATION: "Mutation", + SUBSCRIPTION: "Subscription", + TYPE_CONDITION: "TypeCondition", + INVALID: "Invalid", + COMMENT: "Comment", + SCHEMA_DEF: "SchemaDef", + SCALAR_DEF: "ScalarDef", + OBJECT_TYPE_DEF: "ObjectTypeDef", + OBJECT_VALUE: "ObjectValue", + LIST_VALUE: "ListValue", + INTERFACE_DEF: "InterfaceDef", + UNION_DEF: "UnionDef", + ENUM_DEF: "EnumDef", + ENUM_VALUE: "EnumValue", + FIELD_DEF: "FieldDef", + INPUT_DEF: "InputDef", + INPUT_VALUE_DEF: "InputValueDef", + ARGUMENTS_DEF: "ArgumentsDef", + EXTEND_DEF: "ExtendDef", + EXTENSION_DEFINITION: "ExtensionDefinition", + DIRECTIVE_DEF: "DirectiveDef", + IMPLEMENTS: "Implements", + VARIABLE_DEFINITIONS: "VariableDefinitions", + TYPE: "Type" + }; + var RuleKinds = Object.assign(Object.assign({}, Kind), AdditionalRuleKinds); + + // node_modules/graphql-language-service/esm/interface/getAutocompleteSuggestions.js + var SuggestionCommand = { + command: "editor.action.triggerSuggest", + title: "Suggestions" + }; + var collectFragmentDefs = (op) => { + const externalFragments = []; + if (op) { + try { + visit(parse2(op), { + FragmentDefinition(def) { + externalFragments.push(def); + } + }); + } catch (_a3) { + return []; + } + } + return externalFragments; + }; + var typeSystemKinds = [ + Kind.SCHEMA_DEFINITION, + Kind.OPERATION_TYPE_DEFINITION, + Kind.SCALAR_TYPE_DEFINITION, + Kind.OBJECT_TYPE_DEFINITION, + Kind.INTERFACE_TYPE_DEFINITION, + Kind.UNION_TYPE_DEFINITION, + Kind.ENUM_TYPE_DEFINITION, + Kind.INPUT_OBJECT_TYPE_DEFINITION, + Kind.DIRECTIVE_DEFINITION, + Kind.SCHEMA_EXTENSION, + Kind.SCALAR_TYPE_EXTENSION, + Kind.OBJECT_TYPE_EXTENSION, + Kind.INTERFACE_TYPE_EXTENSION, + Kind.UNION_TYPE_EXTENSION, + Kind.ENUM_TYPE_EXTENSION, + Kind.INPUT_OBJECT_TYPE_EXTENSION + ]; + var hasTypeSystemDefinitions = (sdl) => { + let hasTypeSystemDef = false; + if (sdl) { + try { + visit(parse2(sdl), { + enter(node) { + if (node.kind === "Document") { + return; + } + if (typeSystemKinds.includes(node.kind)) { + hasTypeSystemDef = true; + return BREAK; + } + return false; + } + }); + } catch (_a3) { + return hasTypeSystemDef; + } + } + return hasTypeSystemDef; + }; + function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fragmentDefs, options) { + var _a3; + const opts = Object.assign(Object.assign({}, options), { schema }); + const token = contextToken || getTokenAtPosition(queryText, cursor, 1); + const state = token.state.kind === "Invalid" ? token.state.prevState : token.state; + const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri); + if (!state) { + return []; + } + const { kind, step, prevState } = state; + const typeInfo = getTypeInfo(schema, token.state); + if (kind === RuleKinds.DOCUMENT) { + if (mode === GraphQLDocumentMode.TYPE_SYSTEM) { + return getSuggestionsForTypeSystemDefinitions(token); + } + return getSuggestionsForExecutableDefinitions(token); + } + if (kind === RuleKinds.EXTEND_DEF) { + return getSuggestionsForExtensionDefinitions(token); + } + if (((_a3 = prevState === null || prevState === void 0 ? void 0 : prevState.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === RuleKinds.EXTENSION_DEFINITION && state.name) { + return hintList(token, []); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.SCALAR_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isScalarType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.OBJECT_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isObjectType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.INTERFACE_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isInterfaceType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.UNION_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isUnionType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.ENUM_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isEnumType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.INPUT_OBJECT_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isInputObjectType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if (kind === RuleKinds.IMPLEMENTS || kind === RuleKinds.NAMED_TYPE && (prevState === null || prevState === void 0 ? void 0 : prevState.kind) === RuleKinds.IMPLEMENTS) { + return getSuggestionsForImplements(token, state, schema, queryText, typeInfo); + } + if (kind === RuleKinds.SELECTION_SET || kind === RuleKinds.FIELD || kind === RuleKinds.ALIASED_FIELD) { + return getSuggestionsForFieldNames(token, typeInfo, opts); + } + if (kind === RuleKinds.ARGUMENTS || kind === RuleKinds.ARGUMENT && step === 0) { + const { argDefs } = typeInfo; + if (argDefs) { + return hintList(token, argDefs.map((argDef) => { + var _a4; + return { + label: argDef.name, + insertText: argDef.name + ": ", + command: SuggestionCommand, + detail: String(argDef.type), + documentation: (_a4 = argDef.description) !== null && _a4 !== void 0 ? _a4 : void 0, + kind: CompletionItemKind3.Variable, + type: argDef.type + }; + })); + } + } + if ((kind === RuleKinds.OBJECT_VALUE || kind === RuleKinds.OBJECT_FIELD && step === 0) && typeInfo.objectFieldDefs) { + const objectFields = objectValues(typeInfo.objectFieldDefs); + const completionKind = kind === RuleKinds.OBJECT_VALUE ? CompletionItemKind3.Value : CompletionItemKind3.Field; + return hintList(token, objectFields.map((field) => { + var _a4; + return { + label: field.name, + detail: String(field.type), + documentation: (_a4 = field.description) !== null && _a4 !== void 0 ? _a4 : void 0, + kind: completionKind, + type: field.type + }; + })); + } + if (kind === RuleKinds.ENUM_VALUE || kind === RuleKinds.LIST_VALUE && step === 1 || kind === RuleKinds.OBJECT_FIELD && step === 2 || kind === RuleKinds.ARGUMENT && step === 2) { + return getSuggestionsForInputValues(token, typeInfo, queryText, schema); + } + if (kind === RuleKinds.VARIABLE && step === 1) { + const namedInputType = getNamedType(typeInfo.inputType); + const variableDefinitions = getVariableCompletions(queryText, schema, token); + return hintList(token, variableDefinitions.filter((v) => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name))); + } + if (kind === RuleKinds.TYPE_CONDITION && step === 1 || kind === RuleKinds.NAMED_TYPE && prevState != null && prevState.kind === RuleKinds.TYPE_CONDITION) { + return getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, kind); + } + if (kind === RuleKinds.FRAGMENT_SPREAD && step === 1) { + return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, Array.isArray(fragmentDefs) ? fragmentDefs : collectFragmentDefs(fragmentDefs)); + } + const unwrappedState = unwrapType(state); + if (mode === GraphQLDocumentMode.TYPE_SYSTEM && !unwrappedState.needsAdvance && kind === RuleKinds.NAMED_TYPE || kind === RuleKinds.LIST_TYPE) { + if (unwrappedState.kind === RuleKinds.FIELD_DEF) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isOutputType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if (unwrappedState.kind === RuleKinds.INPUT_VALUE_DEF) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isInputType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + } + if (kind === RuleKinds.VARIABLE_DEFINITION && step === 2 || kind === RuleKinds.LIST_TYPE && step === 1 || kind === RuleKinds.NAMED_TYPE && prevState && (prevState.kind === RuleKinds.VARIABLE_DEFINITION || prevState.kind === RuleKinds.LIST_TYPE || prevState.kind === RuleKinds.NON_NULL_TYPE)) { + return getSuggestionsForVariableDefinition(token, schema, kind); + } + if (kind === RuleKinds.DIRECTIVE) { + return getSuggestionsForDirective(token, state, schema, kind); + } + return []; + } + var insertSuffix = " {\n $1\n}"; + var getInsertText = (field) => { + const { type: type2 } = field; + if (isCompositeType(type2)) { + return insertSuffix; + } + if (isListType(type2) && isCompositeType(type2.ofType)) { + return insertSuffix; + } + if (isNonNullType(type2)) { + if (isCompositeType(type2.ofType)) { + return insertSuffix; + } + if (isListType(type2.ofType) && isCompositeType(type2.ofType.ofType)) { + return insertSuffix; + } + } + return null; + }; + function getSuggestionsForTypeSystemDefinitions(token) { + return hintList(token, [ + { label: "extend", kind: CompletionItemKind3.Function }, + { label: "type", kind: CompletionItemKind3.Function }, + { label: "interface", kind: CompletionItemKind3.Function }, + { label: "union", kind: CompletionItemKind3.Function }, + { label: "input", kind: CompletionItemKind3.Function }, + { label: "scalar", kind: CompletionItemKind3.Function }, + { label: "schema", kind: CompletionItemKind3.Function } + ]); + } + function getSuggestionsForExecutableDefinitions(token) { + return hintList(token, [ + { label: "query", kind: CompletionItemKind3.Function }, + { label: "mutation", kind: CompletionItemKind3.Function }, + { label: "subscription", kind: CompletionItemKind3.Function }, + { label: "fragment", kind: CompletionItemKind3.Function }, + { label: "{", kind: CompletionItemKind3.Constructor } + ]); + } + function getSuggestionsForExtensionDefinitions(token) { + return hintList(token, [ + { label: "type", kind: CompletionItemKind3.Function }, + { label: "interface", kind: CompletionItemKind3.Function }, + { label: "union", kind: CompletionItemKind3.Function }, + { label: "input", kind: CompletionItemKind3.Function }, + { label: "scalar", kind: CompletionItemKind3.Function }, + { label: "schema", kind: CompletionItemKind3.Function } + ]); + } + function getSuggestionsForFieldNames(token, typeInfo, options) { + var _a3; + if (typeInfo.parentType) { + const { parentType } = typeInfo; + let fields = []; + if ("getFields" in parentType) { + fields = objectValues(parentType.getFields()); + } + if (isCompositeType(parentType)) { + fields.push(TypeNameMetaFieldDef); + } + if (parentType === ((_a3 = options === null || options === void 0 ? void 0 : options.schema) === null || _a3 === void 0 ? void 0 : _a3.getQueryType())) { + fields.push(SchemaMetaFieldDef, TypeMetaFieldDef); + } + return hintList(token, fields.map((field, index) => { + var _a4; + const suggestion = { + sortText: String(index) + field.name, + label: field.name, + detail: String(field.type), + documentation: (_a4 = field.description) !== null && _a4 !== void 0 ? _a4 : void 0, + deprecated: Boolean(field.deprecationReason), + isDeprecated: Boolean(field.deprecationReason), + deprecationReason: field.deprecationReason, + kind: CompletionItemKind3.Field, + type: field.type + }; + if (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) { + const insertText = getInsertText(field); + if (insertText) { + suggestion.insertText = field.name + insertText; + suggestion.insertTextFormat = InsertTextFormat.Snippet; + suggestion.command = SuggestionCommand; + } + } + return suggestion; + })); + } + return []; + } + function getSuggestionsForInputValues(token, typeInfo, queryText, schema) { + const namedInputType = getNamedType(typeInfo.inputType); + const queryVariables = getVariableCompletions(queryText, schema, token).filter((v) => v.detail === namedInputType.name); + if (namedInputType instanceof GraphQLEnumType) { + const values = namedInputType.getValues(); + return hintList(token, values.map((value) => { + var _a3; + return { + label: value.name, + detail: String(namedInputType), + documentation: (_a3 = value.description) !== null && _a3 !== void 0 ? _a3 : void 0, + deprecated: Boolean(value.deprecationReason), + isDeprecated: Boolean(value.deprecationReason), + deprecationReason: value.deprecationReason, + kind: CompletionItemKind3.EnumMember, + type: namedInputType + }; + }).concat(queryVariables)); + } + if (namedInputType === GraphQLBoolean) { + return hintList(token, queryVariables.concat([ + { + label: "true", + detail: String(GraphQLBoolean), + documentation: "Not false.", + kind: CompletionItemKind3.Variable, + type: GraphQLBoolean + }, + { + label: "false", + detail: String(GraphQLBoolean), + documentation: "Not true.", + kind: CompletionItemKind3.Variable, + type: GraphQLBoolean + } + ])); + } + return queryVariables; + } + function getSuggestionsForImplements(token, tokenState, schema, documentText, typeInfo) { + if (tokenState.needsSeparator) { + return []; + } + const typeMap = schema.getTypeMap(); + const schemaInterfaces = objectValues(typeMap).filter(isInterfaceType); + const schemaInterfaceNames = schemaInterfaces.map(({ name: name2 }) => name2); + const inlineInterfaces = /* @__PURE__ */ new Set(); + runOnlineParser(documentText, (_, state) => { + var _a3, _b, _c, _d, _e; + if (state.name) { + if (state.kind === RuleKinds.INTERFACE_DEF && !schemaInterfaceNames.includes(state.name)) { + inlineInterfaces.add(state.name); + } + if (state.kind === RuleKinds.NAMED_TYPE && ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === RuleKinds.IMPLEMENTS) { + if (typeInfo.interfaceDef) { + const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(({ name: name2 }) => name2 === state.name); + if (existingType) { + return; + } + const type2 = schema.getType(state.name); + const interfaceConfig = (_c = typeInfo.interfaceDef) === null || _c === void 0 ? void 0 : _c.toConfig(); + typeInfo.interfaceDef = new GraphQLInterfaceType(Object.assign(Object.assign({}, interfaceConfig), { interfaces: [ + ...interfaceConfig.interfaces, + type2 || new GraphQLInterfaceType({ name: state.name, fields: {} }) + ] })); + } else if (typeInfo.objectTypeDef) { + const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(({ name: name2 }) => name2 === state.name); + if (existingType) { + return; + } + const type2 = schema.getType(state.name); + const objectTypeConfig = (_e = typeInfo.objectTypeDef) === null || _e === void 0 ? void 0 : _e.toConfig(); + typeInfo.objectTypeDef = new GraphQLObjectType(Object.assign(Object.assign({}, objectTypeConfig), { interfaces: [ + ...objectTypeConfig.interfaces, + type2 || new GraphQLInterfaceType({ name: state.name, fields: {} }) + ] })); + } + } + } + }); + const currentTypeToExtend = typeInfo.interfaceDef || typeInfo.objectTypeDef; + const siblingInterfaces = (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.getInterfaces()) || []; + const siblingInterfaceNames = siblingInterfaces.map(({ name: name2 }) => name2); + const possibleInterfaces = schemaInterfaces.concat([...inlineInterfaces].map((name2) => ({ name: name2 }))).filter(({ name: name2 }) => name2 !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name2)); + return hintList(token, possibleInterfaces.map((type2) => { + const result = { + label: type2.name, + kind: CompletionItemKind3.Interface, + type: type2 + }; + if (type2 === null || type2 === void 0 ? void 0 : type2.description) { + result.documentation = type2.description; + } + return result; + })); + } + function getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, _kind) { + let possibleTypes; + if (typeInfo.parentType) { + if (isAbstractType(typeInfo.parentType)) { + const abstractType = assertAbstractType(typeInfo.parentType); + const possibleObjTypes = schema.getPossibleTypes(abstractType); + const possibleIfaceMap = /* @__PURE__ */ Object.create(null); + for (const type2 of possibleObjTypes) { + for (const iface of type2.getInterfaces()) { + possibleIfaceMap[iface.name] = iface; + } + } + possibleTypes = possibleObjTypes.concat(objectValues(possibleIfaceMap)); + } else { + possibleTypes = [typeInfo.parentType]; + } + } else { + const typeMap = schema.getTypeMap(); + possibleTypes = objectValues(typeMap).filter((type2) => isCompositeType(type2) && !type2.name.startsWith("__")); + } + return hintList(token, possibleTypes.map((type2) => { + const namedType = getNamedType(type2); + return { + label: String(type2), + documentation: (namedType === null || namedType === void 0 ? void 0 : namedType.description) || "", + kind: CompletionItemKind3.Field + }; + })); + } + function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fragmentDefs) { + if (!queryText) { + return []; + } + const typeMap = schema.getTypeMap(); + const defState = getDefinitionState(token.state); + const fragments = getFragmentDefinitions(queryText); + if (fragmentDefs && fragmentDefs.length > 0) { + fragments.push(...fragmentDefs); + } + const relevantFrags = fragments.filter((frag) => typeMap[frag.typeCondition.name.value] && !(defState && defState.kind === RuleKinds.FRAGMENT_DEFINITION && defState.name === frag.name.value) && isCompositeType(typeInfo.parentType) && isCompositeType(typeMap[frag.typeCondition.name.value]) && doTypesOverlap(schema, typeInfo.parentType, typeMap[frag.typeCondition.name.value])); + return hintList(token, relevantFrags.map((frag) => ({ + label: frag.name.value, + detail: String(typeMap[frag.typeCondition.name.value]), + documentation: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`, + kind: CompletionItemKind3.Field, + type: typeMap[frag.typeCondition.name.value] + }))); + } + var getParentDefinition = (state, kind) => { + var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k; + if (((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === kind) { + return state.prevState; + } + if (((_c = (_b = state.prevState) === null || _b === void 0 ? void 0 : _b.prevState) === null || _c === void 0 ? void 0 : _c.kind) === kind) { + return state.prevState.prevState; + } + if (((_f = (_e = (_d = state.prevState) === null || _d === void 0 ? void 0 : _d.prevState) === null || _e === void 0 ? void 0 : _e.prevState) === null || _f === void 0 ? void 0 : _f.kind) === kind) { + return state.prevState.prevState.prevState; + } + if (((_k = (_j = (_h = (_g = state.prevState) === null || _g === void 0 ? void 0 : _g.prevState) === null || _h === void 0 ? void 0 : _h.prevState) === null || _j === void 0 ? void 0 : _j.prevState) === null || _k === void 0 ? void 0 : _k.kind) === kind) { + return state.prevState.prevState.prevState.prevState; + } + }; + function getVariableCompletions(queryText, schema, token) { + let variableName = null; + let variableType; + const definitions = /* @__PURE__ */ Object.create({}); + runOnlineParser(queryText, (_, state) => { + if ((state === null || state === void 0 ? void 0 : state.kind) === RuleKinds.VARIABLE && state.name) { + variableName = state.name; + } + if ((state === null || state === void 0 ? void 0 : state.kind) === RuleKinds.NAMED_TYPE && variableName) { + const parentDefinition = getParentDefinition(state, RuleKinds.TYPE); + if (parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type) { + variableType = schema.getType(parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type); + } + } + if (variableName && variableType && !definitions[variableName]) { + definitions[variableName] = { + detail: variableType.toString(), + insertText: token.string === "$" ? variableName : "$" + variableName, + label: variableName, + type: variableType, + kind: CompletionItemKind3.Variable + }; + variableName = null; + variableType = null; + } + }); + return objectValues(definitions); + } + function getFragmentDefinitions(queryText) { + const fragmentDefs = []; + runOnlineParser(queryText, (_, state) => { + if (state.kind === RuleKinds.FRAGMENT_DEFINITION && state.name && state.type) { + fragmentDefs.push({ + kind: RuleKinds.FRAGMENT_DEFINITION, + name: { + kind: Kind.NAME, + value: state.name + }, + selectionSet: { + kind: RuleKinds.SELECTION_SET, + selections: [] + }, + typeCondition: { + kind: RuleKinds.NAMED_TYPE, + name: { + kind: Kind.NAME, + value: state.type + } + } + }); + } + }); + return fragmentDefs; + } + function getSuggestionsForVariableDefinition(token, schema, _kind) { + const inputTypeMap = schema.getTypeMap(); + const inputTypes = objectValues(inputTypeMap).filter(isInputType); + return hintList(token, inputTypes.map((type2) => ({ + label: type2.name, + documentation: type2.description, + kind: CompletionItemKind3.Variable + }))); + } + function getSuggestionsForDirective(token, state, schema, _kind) { + var _a3; + if ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) { + const directives = schema.getDirectives().filter((directive) => canUseDirective(state.prevState, directive)); + return hintList(token, directives.map((directive) => ({ + label: directive.name, + documentation: directive.description || "", + kind: CompletionItemKind3.Function + }))); + } + return []; + } + function getTokenAtPosition(queryText, cursor, offset = 0) { + let styleAtCursor = null; + let stateAtCursor = null; + let stringAtCursor = null; + const token = runOnlineParser(queryText, (stream, state, style, index) => { + if (index === cursor.line && stream.getCurrentPosition() + offset >= cursor.character + 1) { + styleAtCursor = style; + stateAtCursor = Object.assign({}, state); + stringAtCursor = stream.current(); + return "BREAK"; + } + }); + return { + start: token.start, + end: token.end, + string: stringAtCursor || token.string, + state: stateAtCursor || token.state, + style: styleAtCursor || token.style + }; + } + function runOnlineParser(queryText, callback) { + const lines = queryText.split("\n"); + const parser = onlineParser(); + let state = parser.startState(); + let style = ""; + let stream = new CharacterStream(""); + for (let i = 0; i < lines.length; i++) { + stream = new CharacterStream(lines[i]); + while (!stream.eol()) { + style = parser.token(stream, state); + const code = callback(stream, state, style, i); + if (code === "BREAK") { + break; + } + } + callback(stream, state, style, i); + if (!state.kind) { + state = parser.startState(); + } + } + return { + start: stream.getStartOfToken(), + end: stream.getCurrentPosition(), + string: stream.current(), + state, + style + }; + } + function canUseDirective(state, directive) { + if (!(state === null || state === void 0 ? void 0 : state.kind)) { + return false; + } + const { kind, prevState } = state; + const { locations } = directive; + switch (kind) { + case RuleKinds.QUERY: + return locations.includes(DirectiveLocation.QUERY); + case RuleKinds.MUTATION: + return locations.includes(DirectiveLocation.MUTATION); + case RuleKinds.SUBSCRIPTION: + return locations.includes(DirectiveLocation.SUBSCRIPTION); + case RuleKinds.FIELD: + case RuleKinds.ALIASED_FIELD: + return locations.includes(DirectiveLocation.FIELD); + case RuleKinds.FRAGMENT_DEFINITION: + return locations.includes(DirectiveLocation.FRAGMENT_DEFINITION); + case RuleKinds.FRAGMENT_SPREAD: + return locations.includes(DirectiveLocation.FRAGMENT_SPREAD); + case RuleKinds.INLINE_FRAGMENT: + return locations.includes(DirectiveLocation.INLINE_FRAGMENT); + case RuleKinds.SCHEMA_DEF: + return locations.includes(DirectiveLocation.SCHEMA); + case RuleKinds.SCALAR_DEF: + return locations.includes(DirectiveLocation.SCALAR); + case RuleKinds.OBJECT_TYPE_DEF: + return locations.includes(DirectiveLocation.OBJECT); + case RuleKinds.FIELD_DEF: + return locations.includes(DirectiveLocation.FIELD_DEFINITION); + case RuleKinds.INTERFACE_DEF: + return locations.includes(DirectiveLocation.INTERFACE); + case RuleKinds.UNION_DEF: + return locations.includes(DirectiveLocation.UNION); + case RuleKinds.ENUM_DEF: + return locations.includes(DirectiveLocation.ENUM); + case RuleKinds.ENUM_VALUE: + return locations.includes(DirectiveLocation.ENUM_VALUE); + case RuleKinds.INPUT_DEF: + return locations.includes(DirectiveLocation.INPUT_OBJECT); + case RuleKinds.INPUT_VALUE_DEF: + const prevStateKind = prevState === null || prevState === void 0 ? void 0 : prevState.kind; + switch (prevStateKind) { + case RuleKinds.ARGUMENTS_DEF: + return locations.includes(DirectiveLocation.ARGUMENT_DEFINITION); + case RuleKinds.INPUT_DEF: + return locations.includes(DirectiveLocation.INPUT_FIELD_DEFINITION); + } + } + return false; + } + function getTypeInfo(schema, tokenState) { + let argDef; + let argDefs; + let directiveDef; + let enumValue; + let fieldDef; + let inputType; + let objectTypeDef; + let objectFieldDefs; + let parentType; + let type2; + let interfaceDef; + forEachState(tokenState, (state) => { + var _a3; + switch (state.kind) { + case RuleKinds.QUERY: + case "ShortQuery": + type2 = schema.getQueryType(); + break; + case RuleKinds.MUTATION: + type2 = schema.getMutationType(); + break; + case RuleKinds.SUBSCRIPTION: + type2 = schema.getSubscriptionType(); + break; + case RuleKinds.INLINE_FRAGMENT: + case RuleKinds.FRAGMENT_DEFINITION: + if (state.type) { + type2 = schema.getType(state.type); + } + break; + case RuleKinds.FIELD: + case RuleKinds.ALIASED_FIELD: { + if (!type2 || !state.name) { + fieldDef = null; + } else { + fieldDef = parentType ? getFieldDef2(schema, parentType, state.name) : null; + type2 = fieldDef ? fieldDef.type : null; + } + break; + } + case RuleKinds.SELECTION_SET: + parentType = getNamedType(type2); + break; + case RuleKinds.DIRECTIVE: + directiveDef = state.name ? schema.getDirective(state.name) : null; + break; + case RuleKinds.INTERFACE_DEF: + if (state.name) { + objectTypeDef = null; + interfaceDef = new GraphQLInterfaceType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case RuleKinds.OBJECT_TYPE_DEF: + if (state.name) { + interfaceDef = null; + objectTypeDef = new GraphQLObjectType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case RuleKinds.ARGUMENTS: { + if (state.prevState) { + switch (state.prevState.kind) { + case RuleKinds.FIELD: + argDefs = fieldDef && fieldDef.args; + break; + case RuleKinds.DIRECTIVE: + argDefs = directiveDef && directiveDef.args; + break; + case RuleKinds.ALIASED_FIELD: { + const name2 = (_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.name; + if (!name2) { + argDefs = null; + break; + } + const field = parentType ? getFieldDef2(schema, parentType, name2) : null; + if (!field) { + argDefs = null; + break; + } + argDefs = field.args; + break; + } + default: + argDefs = null; + break; + } + } else { + argDefs = null; + } + break; + } + case RuleKinds.ARGUMENT: + if (argDefs) { + for (let i = 0; i < argDefs.length; i++) { + if (argDefs[i].name === state.name) { + argDef = argDefs[i]; + break; + } + } + } + inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type; + break; + case RuleKinds.ENUM_VALUE: + const enumType = getNamedType(inputType); + enumValue = enumType instanceof GraphQLEnumType ? enumType.getValues().find((val) => val.value === state.name) : null; + break; + case RuleKinds.LIST_VALUE: + const nullableType = getNullableType(inputType); + inputType = nullableType instanceof GraphQLList ? nullableType.ofType : null; + break; + case RuleKinds.OBJECT_VALUE: + const objectType = getNamedType(inputType); + objectFieldDefs = objectType instanceof GraphQLInputObjectType ? objectType.getFields() : null; + break; + case RuleKinds.OBJECT_FIELD: + const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null; + inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type; + break; + case RuleKinds.NAMED_TYPE: + if (state.name) { + type2 = schema.getType(state.name); + } + break; + } + }); + return { + argDef, + argDefs, + directiveDef, + enumValue, + fieldDef, + inputType, + objectFieldDefs, + parentType, + type: type2, + interfaceDef, + objectTypeDef + }; + } + var GraphQLDocumentMode; + (function(GraphQLDocumentMode2) { + GraphQLDocumentMode2["TYPE_SYSTEM"] = "TYPE_SYSTEM"; + GraphQLDocumentMode2["EXECUTABLE"] = "EXECUTABLE"; + })(GraphQLDocumentMode || (GraphQLDocumentMode = {})); + function getDocumentMode(documentText, uri) { + if (uri === null || uri === void 0 ? void 0 : uri.endsWith(".graphqls")) { + return GraphQLDocumentMode.TYPE_SYSTEM; + } + return hasTypeSystemDefinitions(documentText) ? GraphQLDocumentMode.TYPE_SYSTEM : GraphQLDocumentMode.EXECUTABLE; + } + function unwrapType(state) { + if (state.prevState && state.kind && [ + RuleKinds.NAMED_TYPE, + RuleKinds.LIST_TYPE, + RuleKinds.TYPE, + RuleKinds.NON_NULL_TYPE + ].includes(state.kind)) { + return unwrapType(state.prevState); + } + return state; + } + + // node_modules/graphql-language-service/esm/utils/fragmentDependencies.js + var import_nullthrows = __toESM(require_nullthrows()); + + // node_modules/graphql-language-service/esm/utils/getVariablesJSONSchema.js + function text(into, newText) { + into.push(newText); + } + function renderType(into, t2) { + if (isNonNullType(t2)) { + renderType(into, t2.ofType); + text(into, "!"); + } else if (isListType(t2)) { + text(into, "["); + renderType(into, t2.ofType); + text(into, "]"); + } else { + text(into, t2.name); + } + } + function renderTypeToString(t2, useMarkdown) { + const into = []; + if (useMarkdown) { + text(into, "```graphql\n"); + } + renderType(into, t2); + if (useMarkdown) { + text(into, "\n```"); + } + return into.join(""); + } + var scalarTypesMap = { + Int: "integer", + String: "string", + Float: "number", + ID: "string", + Boolean: "boolean", + DateTime: "string" + }; + var Marker = class { + constructor() { + this.set = /* @__PURE__ */ new Set(); + } + mark(name2) { + if (this.set.has(name2)) { + return false; + } + this.set.add(name2); + return true; + } + }; + function getJSONSchemaFromGraphQLType(type2, options) { + let required = false; + let definition = /* @__PURE__ */ Object.create(null); + const definitions = /* @__PURE__ */ Object.create(null); + if ("defaultValue" in type2 && type2.defaultValue !== void 0) { + definition.default = type2.defaultValue; + } + if (isEnumType(type2)) { + definition.type = "string"; + definition.enum = type2.getValues().map((val) => val.name); + } + if (isScalarType(type2) && scalarTypesMap[type2.name]) { + definition.type = scalarTypesMap[type2.name]; + } + if (isListType(type2)) { + definition.type = "array"; + const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(type2.ofType, options); + if (def.$ref) { + definition.items = { $ref: def.$ref }; + } else { + definition.items = def; + } + if (defs) { + for (const defName of Object.keys(defs)) { + definitions[defName] = defs[defName]; + } + } + } + if (isNonNullType(type2)) { + required = true; + const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(type2.ofType, options); + definition = def; + if (defs) { + for (const defName of Object.keys(defs)) { + definitions[defName] = defs[defName]; + } + } + } + if (isInputObjectType(type2)) { + definition.$ref = `#/definitions/${type2.name}`; + if (options === null || options === void 0 ? void 0 : options.definitionMarker.mark(type2.name)) { + const fields = type2.getFields(); + const fieldDef = { + type: "object", + properties: {}, + required: [] + }; + if (type2.description) { + fieldDef.description = type2.description + "\n" + renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + fieldDef.markdownDescription = type2.description + "\n" + renderTypeToString(type2, true); + } + } else { + fieldDef.description = renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + fieldDef.markdownDescription = renderTypeToString(type2, true); + } + } + for (const fieldName of Object.keys(fields)) { + const field = fields[fieldName]; + const { required: fieldRequired, definition: typeDefinition, definitions: typeDefinitions } = getJSONSchemaFromGraphQLType(field.type, options); + const { definition: fieldDefinition } = getJSONSchemaFromGraphQLType(field, options); + fieldDef.properties[fieldName] = Object.assign(Object.assign({}, typeDefinition), fieldDefinition); + const renderedField = renderTypeToString(field.type); + fieldDef.properties[fieldName].description = field.description ? field.description + "\n" + renderedField : renderedField; + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + const renderedFieldMarkdown = renderTypeToString(field.type, true); + fieldDef.properties[fieldName].markdownDescription = field.description ? field.description + "\n" + renderedFieldMarkdown : renderedFieldMarkdown; + } + if (fieldRequired) { + fieldDef.required.push(fieldName); + } + if (typeDefinitions) { + for (const [defName, value] of Object.entries(typeDefinitions)) { + definitions[defName] = value; + } + } + } + definitions[type2.name] = fieldDef; + } + } + if ("description" in type2 && !isScalarType(type2) && type2.description && !definition.description) { + definition.description = type2.description + "\n" + renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + definition.markdownDescription = type2.description + "\n" + renderTypeToString(type2, true); + } + } else { + definition.description = renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + definition.markdownDescription = renderTypeToString(type2, true); + } + } + return { required, definition, definitions }; + } + function getVariablesJSONSchema(variableToType, options) { + var _a3; + const jsonSchema = { + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "object", + properties: {}, + required: [] + }; + const runtimeOptions = Object.assign(Object.assign({}, options), { definitionMarker: new Marker() }); + if (variableToType) { + for (const [variableName, type2] of Object.entries(variableToType)) { + const { definition, required, definitions } = getJSONSchemaFromGraphQLType(type2, runtimeOptions); + jsonSchema.properties[variableName] = definition; + if (required) { + (_a3 = jsonSchema.required) === null || _a3 === void 0 ? void 0 : _a3.push(variableName); + } + if (definitions) { + jsonSchema.definitions = Object.assign(Object.assign({}, jsonSchema === null || jsonSchema === void 0 ? void 0 : jsonSchema.definitions), definitions); + } + } + } + return jsonSchema; + } + + // node_modules/graphql-language-service/esm/utils/Range.js + var Range3 = class { + constructor(start, end) { + this.containsPosition = (position) => { + if (this.start.line === position.line) { + return this.start.character <= position.character; + } + if (this.end.line === position.line) { + return this.end.character >= position.character; + } + return this.start.line <= position.line && this.end.line >= position.line; + }; + this.start = start; + this.end = end; + } + setStart(line, character) { + this.start = new Position3(line, character); + } + setEnd(line, character) { + this.end = new Position3(line, character); + } + }; + var Position3 = class { + constructor(line, character) { + this.lessThanOrEqualTo = (position) => this.line < position.line || this.line === position.line && this.character <= position.character; + this.line = line; + this.character = character; + } + setLine(line) { + this.line = line; + } + setCharacter(character) { + this.character = character; + } + }; + + // node_modules/graphql-language-service/esm/utils/validateWithCustomRules.js + var specifiedSDLRules2 = [ + LoneSchemaDefinitionRule, + UniqueOperationTypesRule, + UniqueTypeNamesRule, + UniqueEnumValueNamesRule, + UniqueFieldDefinitionNamesRule, + UniqueDirectiveNamesRule, + KnownTypeNamesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + PossibleTypeExtensionsRule, + UniqueArgumentNamesRule, + UniqueInputFieldNamesRule + ]; + function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, isSchemaDocument) { + const rules = specifiedRules.filter((rule) => { + if (rule === NoUnusedFragmentsRule || rule === ExecutableDefinitionsRule) { + return false; + } + if (isRelayCompatMode && rule === KnownFragmentNamesRule) { + return false; + } + return true; + }); + if (customRules) { + Array.prototype.push.apply(rules, customRules); + } + if (isSchemaDocument) { + Array.prototype.push.apply(rules, specifiedSDLRules2); + } + const errors = validate(schema, ast, rules); + return errors.filter((error) => { + if (error.message.includes("Unknown directive") && error.nodes) { + const node = error.nodes[0]; + if (node && node.kind === Kind.DIRECTIVE) { + const name2 = node.name.value; + if (name2 === "arguments" || name2 === "argumentDefinitions") { + return false; + } + } + } + return true; + }); + } + + // node_modules/graphql-language-service/esm/utils/collectVariables.js + function collectVariables(schema, documentAST) { + const variableToType = /* @__PURE__ */ Object.create(null); + for (const definition of documentAST.definitions) { + if (definition.kind === "OperationDefinition") { + const { variableDefinitions } = definition; + if (variableDefinitions) { + for (const { variable, type: type2 } of variableDefinitions) { + const inputType = typeFromAST(schema, type2); + if (inputType) { + variableToType[variable.name.value] = inputType; + } else if (type2.kind === Kind.NAMED_TYPE && type2.name.value === "Float") { + variableToType[variable.name.value] = GraphQLFloat; + } + } + } + } + } + return variableToType; + } + + // node_modules/graphql-language-service/esm/utils/getOperationFacts.js + function getOperationASTFacts(documentAST, schema) { + const variableToType = schema ? collectVariables(schema, documentAST) : void 0; + const operations = []; + visit(documentAST, { + OperationDefinition(node) { + operations.push(node); + } + }); + return { variableToType, operations }; + } + + // node_modules/graphql-language-service/esm/interface/getDiagnostics.js + var SEVERITY = { + Error: "Error", + Warning: "Warning", + Information: "Information", + Hint: "Hint" + }; + var DIAGNOSTIC_SEVERITY = { + [SEVERITY.Error]: 1, + [SEVERITY.Warning]: 2, + [SEVERITY.Information]: 3, + [SEVERITY.Hint]: 4 + }; + var invariant2 = (condition, message) => { + if (!condition) { + throw new Error(message); + } + }; + function getDiagnostics(query, schema = null, customRules, isRelayCompatMode, externalFragments) { + var _a3, _b; + let ast = null; + let fragments = ""; + if (externalFragments) { + fragments = typeof externalFragments === "string" ? externalFragments : externalFragments.reduce((acc, node) => acc + print(node) + "\n\n", ""); + } + const enhancedQuery = fragments ? `${query} + +${fragments}` : query; + try { + ast = parse2(enhancedQuery); + } catch (error) { + if (error instanceof GraphQLError) { + const range = getRange((_b = (_a3 = error.locations) === null || _a3 === void 0 ? void 0 : _a3[0]) !== null && _b !== void 0 ? _b : { line: 0, column: 0 }, enhancedQuery); + return [ + { + severity: DIAGNOSTIC_SEVERITY.Error, + message: error.message, + source: "GraphQL: Syntax", + range + } + ]; + } + throw error; + } + return validateQuery(ast, schema, customRules, isRelayCompatMode); + } + function validateQuery(ast, schema = null, customRules, isRelayCompatMode) { + if (!schema) { + return []; + } + const validationErrorAnnotations = validateWithCustomRules(schema, ast, customRules, isRelayCompatMode).flatMap((error) => annotations(error, DIAGNOSTIC_SEVERITY.Error, "Validation")); + const deprecationWarningAnnotations = validate(schema, ast, [ + NoDeprecatedCustomRule + ]).flatMap((error) => annotations(error, DIAGNOSTIC_SEVERITY.Warning, "Deprecation")); + return validationErrorAnnotations.concat(deprecationWarningAnnotations); + } + function annotations(error, severity, type2) { + if (!error.nodes) { + return []; + } + const highlightedNodes = []; + for (const [i, node] of error.nodes.entries()) { + const highlightNode = node.kind !== "Variable" && "name" in node && node.name !== void 0 ? node.name : "variable" in node && node.variable !== void 0 ? node.variable : node; + if (highlightNode) { + invariant2(error.locations, "GraphQL validation error requires locations."); + const loc = error.locations[i]; + const highlightLoc = getLocation2(highlightNode); + const end = loc.column + (highlightLoc.end - highlightLoc.start); + highlightedNodes.push({ + source: `GraphQL: ${type2}`, + message: error.message, + severity, + range: new Range3(new Position3(loc.line - 1, loc.column - 1), new Position3(loc.line - 1, end)) + }); + } + } + return highlightedNodes; + } + function getRange(location, queryText) { + const parser = onlineParser(); + const state = parser.startState(); + const lines = queryText.split("\n"); + invariant2(lines.length >= location.line, "Query text must have more lines than where the error happened"); + let stream = null; + for (let i = 0; i < location.line; i++) { + stream = new CharacterStream(lines[i]); + while (!stream.eol()) { + const style = parser.token(stream, state); + if (style === "invalidchar") { + break; + } + } + } + invariant2(stream, "Expected Parser stream to be available."); + const line = location.line - 1; + const start = stream.getStartOfToken(); + const end = stream.getCurrentPosition(); + return new Range3(new Position3(line, start), new Position3(line, end)); + } + function getLocation2(node) { + const typeCastedNode = node; + const location = typeCastedNode.loc; + invariant2(location, "Expected ASTNode to have a location."); + return location; + } + + // node_modules/graphql-language-service/esm/interface/getOutline.js + var { INLINE_FRAGMENT } = Kind; + + // node_modules/graphql-language-service/esm/interface/getHoverInformation.js + function getHoverInformation(schema, queryText, cursor, contextToken, config) { + const token = contextToken || getTokenAtPosition(queryText, cursor); + if (!schema || !token || !token.state) { + return ""; + } + const { kind, step } = token.state; + const typeInfo = getTypeInfo(schema, token.state); + const options = Object.assign(Object.assign({}, config), { schema }); + if (kind === "Field" && step === 0 && typeInfo.fieldDef || kind === "AliasedField" && step === 2 && typeInfo.fieldDef) { + const into = []; + renderMdCodeStart(into, options); + renderField(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.fieldDef); + return into.join("").trim(); + } + if (kind === "Directive" && step === 1 && typeInfo.directiveDef) { + const into = []; + renderMdCodeStart(into, options); + renderDirective(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.directiveDef); + return into.join("").trim(); + } + if (kind === "Argument" && step === 0 && typeInfo.argDef) { + const into = []; + renderMdCodeStart(into, options); + renderArg(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.argDef); + return into.join("").trim(); + } + if (kind === "EnumValue" && typeInfo.enumValue && "description" in typeInfo.enumValue) { + const into = []; + renderMdCodeStart(into, options); + renderEnumValue(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.enumValue); + return into.join("").trim(); + } + if (kind === "NamedType" && typeInfo.type && "description" in typeInfo.type) { + const into = []; + renderMdCodeStart(into, options); + renderType2(into, typeInfo, options, typeInfo.type); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.type); + return into.join("").trim(); + } + return ""; + } + function renderMdCodeStart(into, options) { + if (options.useMarkdown) { + text2(into, "```graphql\n"); + } + } + function renderMdCodeEnd(into, options) { + if (options.useMarkdown) { + text2(into, "\n```"); + } + } + function renderField(into, typeInfo, options) { + renderQualifiedField(into, typeInfo, options); + renderTypeAnnotation(into, typeInfo, options, typeInfo.type); + } + function renderQualifiedField(into, typeInfo, options) { + if (!typeInfo.fieldDef) { + return; + } + const fieldName = typeInfo.fieldDef.name; + if (fieldName.slice(0, 2) !== "__") { + renderType2(into, typeInfo, options, typeInfo.parentType); + text2(into, "."); + } + text2(into, fieldName); + } + function renderDirective(into, typeInfo, _options) { + if (!typeInfo.directiveDef) { + return; + } + const name2 = "@" + typeInfo.directiveDef.name; + text2(into, name2); + } + function renderArg(into, typeInfo, options) { + if (typeInfo.directiveDef) { + renderDirective(into, typeInfo, options); + } else if (typeInfo.fieldDef) { + renderQualifiedField(into, typeInfo, options); + } + if (!typeInfo.argDef) { + return; + } + const { name: name2 } = typeInfo.argDef; + text2(into, "("); + text2(into, name2); + renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType); + text2(into, ")"); + } + function renderTypeAnnotation(into, typeInfo, options, t2) { + text2(into, ": "); + renderType2(into, typeInfo, options, t2); + } + function renderEnumValue(into, typeInfo, options) { + if (!typeInfo.enumValue) { + return; + } + const { name: name2 } = typeInfo.enumValue; + renderType2(into, typeInfo, options, typeInfo.inputType); + text2(into, "."); + text2(into, name2); + } + function renderType2(into, typeInfo, options, t2) { + if (!t2) { + return; + } + if (t2 instanceof GraphQLNonNull) { + renderType2(into, typeInfo, options, t2.ofType); + text2(into, "!"); + } else if (t2 instanceof GraphQLList) { + text2(into, "["); + renderType2(into, typeInfo, options, t2.ofType); + text2(into, "]"); + } else { + text2(into, t2.name); + } + } + function renderDescription(into, options, def) { + if (!def) { + return; + } + const description = typeof def.description === "string" ? def.description : null; + if (description) { + text2(into, "\n\n"); + text2(into, description); + } + renderDeprecation(into, options, def); + } + function renderDeprecation(into, _options, def) { + if (!def) { + return; + } + const reason = def.deprecationReason || null; + if (!reason) { + return; + } + text2(into, "\n\n"); + text2(into, "Deprecated: "); + text2(into, reason); + } + function text2(into, content) { + into.push(content); + } + + // node_modules/monaco-graphql/esm/LanguageService.js + var import_picomatch_browser = __toESM(require_picomatch_browser()); + + // node_modules/monaco-graphql/esm/schemaLoader.js + var defaultSchemaLoader = (schemaConfig, parser) => { + const { schema, documentAST, introspectionJSON, introspectionJSONString, buildSchemaOptions, documentString } = schemaConfig; + if (schema) { + return schema; + } + if (introspectionJSONString) { + const introspectionJSONResult = JSON.parse(introspectionJSONString); + return buildClientSchema(introspectionJSONResult, buildSchemaOptions); + } + if (documentString && parser) { + const docAST = parser(documentString); + return buildASTSchema(docAST, buildSchemaOptions); + } + if (introspectionJSON) { + return buildClientSchema(introspectionJSON, buildSchemaOptions); + } + if (documentAST) { + return buildASTSchema(documentAST, buildSchemaOptions); + } + throw new Error("no schema supplied"); + }; + + // node_modules/monaco-graphql/esm/LanguageService.js + var schemaCache = /* @__PURE__ */ new Map(); + var LanguageService = class { + _parser = parse2; + _schemas = []; + _schemaCache = schemaCache; + _schemaLoader = defaultSchemaLoader; + _parseOptions = void 0; + _customValidationRules = void 0; + _externalFragmentDefinitionNodes = null; + _externalFragmentDefinitionsString = null; + _fillLeafsOnComplete = false; + constructor({ parser, schemas, parseOptions, externalFragmentDefinitions, customValidationRules, fillLeafsOnComplete }) { + this._schemaLoader = defaultSchemaLoader; + if (schemas) { + this._schemas = schemas; + this._cacheSchemas(); + } + if (parser) { + this._parser = parser; + } + this._fillLeafsOnComplete = fillLeafsOnComplete; + if (parseOptions) { + this._parseOptions = parseOptions; + } + if (customValidationRules) { + this._customValidationRules = customValidationRules; + } + if (externalFragmentDefinitions) { + if (Array.isArray(externalFragmentDefinitions)) { + this._externalFragmentDefinitionNodes = externalFragmentDefinitions; + } else { + this._externalFragmentDefinitionsString = externalFragmentDefinitions; + } + } + } + _cacheSchemas() { + for (const schema of this._schemas) { + this._cacheSchema(schema); + } + } + _cacheSchema(schemaConfig) { + const schema = this._schemaLoader(schemaConfig, this.parse.bind(this)); + return this._schemaCache.set(schemaConfig.uri, { + ...schemaConfig, + schema + }); + } + getSchemaForFile(uri) { + if (!this._schemas?.length) { + return; + } + if (this._schemas.length === 1) { + return this._schemaCache.get(this._schemas[0].uri); + } + const schema = this._schemas.find((schemaConfig) => { + if (!schemaConfig.fileMatch) { + return false; + } + return schemaConfig.fileMatch.some((glob) => { + const isMatch = (0, import_picomatch_browser.default)(glob); + return isMatch(uri); + }); + }); + if (schema) { + const cacheEntry = this._schemaCache.get(schema.uri); + if (cacheEntry) { + return cacheEntry; + } + const cache = this._cacheSchema(schema); + return cache.get(schema.uri); + } + } + getExternalFragmentDefinitions() { + if (!this._externalFragmentDefinitionNodes && this._externalFragmentDefinitionsString) { + const definitionNodes = []; + try { + visit(this._parser(this._externalFragmentDefinitionsString), { + FragmentDefinition(node) { + definitionNodes.push(node); + } + }); + } catch { + throw new Error(`Failed parsing externalFragmentDefinitions string: +${this._externalFragmentDefinitionsString}`); + } + this._externalFragmentDefinitionNodes = definitionNodes; + } + return this._externalFragmentDefinitionNodes; + } + async updateSchemas(schemas) { + this._schemas = schemas; + this._cacheSchemas(); + } + updateSchema(schema) { + const schemaIndex = this._schemas.findIndex((c) => c.uri === schema.uri); + if (schemaIndex < 0) { + console.warn("updateSchema could not find a schema in your config by that URI", schema.uri); + return; + } + this._schemas[schemaIndex] = schema; + this._cacheSchema(schema); + } + addSchema(schema) { + this._schemas.push(schema); + this._cacheSchema(schema); + } + parse(text3, options) { + return this._parser(text3, options || this._parseOptions); + } + getCompletion = (uri, documentText, position) => { + const schema = this.getSchemaForFile(uri); + if (!documentText || documentText.length < 1 || !schema?.schema) { + return []; + } + return getAutocompleteSuggestions(schema.schema, documentText, position, void 0, this.getExternalFragmentDefinitions(), { uri, fillLeafsOnComplete: this._fillLeafsOnComplete }); + }; + getDiagnostics = (uri, documentText, customRules) => { + const schema = this.getSchemaForFile(uri); + if (!documentText || documentText.trim().length < 2 || !schema?.schema) { + return []; + } + return getDiagnostics(documentText, schema.schema, customRules ?? this._customValidationRules, false, this.getExternalFragmentDefinitions()); + }; + getHover = (uri, documentText, position, options) => { + const schema = this.getSchemaForFile(uri); + if (schema && documentText?.length > 3) { + return getHoverInformation(schema.schema, documentText, position, void 0, { + useMarkdown: true, + ...options + }); + } + }; + getVariablesJSONSchema = (uri, documentText, options) => { + const schema = this.getSchemaForFile(uri); + if (schema && documentText.length > 3) { + try { + const documentAST = this.parse(documentText); + const operationFacts = getOperationASTFacts(documentAST, schema.schema); + if (operationFacts?.variableToType) { + return getVariablesJSONSchema(operationFacts.variableToType, options); + } + } catch { + } + } + return null; + }; + }; + + // node_modules/monaco-graphql/esm/utils.js + function toMonacoRange(range) { + return { + startLineNumber: range.start.line + 1, + startColumn: range.start.character + 1, + endLineNumber: range.end.line + 1, + endColumn: range.end.character + 1 + }; + } + function toGraphQLPosition(position) { + return new Position3(position.lineNumber - 1, position.column - 1); + } + function toCompletion(entry, range) { + const results = { + label: entry.label, + insertText: entry.insertText, + insertTextFormat: entry.insertTextFormat, + sortText: entry.sortText, + filterText: entry.filterText, + documentation: entry.documentation, + detail: entry.detail, + range: range ? toMonacoRange(range) : void 0, + kind: entry.kind + }; + if (entry.insertTextFormat) { + results.insertTextFormat = entry.insertTextFormat; + } + if (entry.command) { + results.command = { ...entry.command, id: entry.command.command }; + } + return results; + } + function toMarkerData(diagnostic) { + return { + startLineNumber: diagnostic.range.start.line + 1, + endLineNumber: diagnostic.range.end.line + 1, + startColumn: diagnostic.range.start.character + 1, + endColumn: diagnostic.range.end.character, + message: diagnostic.message, + severity: 5, + code: diagnostic.code || void 0 + }; + } + + // node_modules/monaco-graphql/esm/GraphQLWorker.js + var GraphQLWorker = class { + _ctx; + _languageService; + _formattingOptions; + constructor(ctx, createData) { + this._ctx = ctx; + this._languageService = new LanguageService(createData.languageConfig); + this._formattingOptions = createData.formattingOptions; + } + async doValidation(uri) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return []; + } + const graphqlDiagnostics = this._languageService.getDiagnostics(uri, document2); + return graphqlDiagnostics.map(toMarkerData); + } catch (err) { + console.error(err); + return []; + } + } + async doComplete(uri, position) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return []; + } + const graphQLPosition = toGraphQLPosition(position); + const suggestions = this._languageService.getCompletion(uri, document2, graphQLPosition); + return suggestions.map((suggestion) => toCompletion(suggestion)); + } catch (err) { + console.error(err); + return []; + } + } + async doHover(uri, position) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return null; + } + const graphQLPosition = toGraphQLPosition(position); + const hover = this._languageService.getHover(uri, document2, graphQLPosition); + return { + content: hover, + range: toMonacoRange(getRange({ + column: graphQLPosition.character, + line: graphQLPosition.line + }, document2)) + }; + } catch (err) { + console.error(err); + return null; + } + } + async doGetVariablesJSONSchema(uri) { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!documentModel || !document2) { + return null; + } + const jsonSchema = this._languageService.getVariablesJSONSchema(uri, document2, { useMarkdownDescription: true }); + if (jsonSchema) { + jsonSchema.$id = "monaco://variables-schema.json"; + jsonSchema.title = "GraphQL Variables"; + return jsonSchema; + } + return null; + } + async doFormat(uri) { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!documentModel || !document2) { + return null; + } + const prettierStandalone = await Promise.resolve().then(() => __toESM(require_standalone())); + const prettierGraphqlParser = await Promise.resolve().then(() => __toESM(require_parser_graphql())); + return prettierStandalone.format(document2, { + parser: "graphql", + plugins: [prettierGraphqlParser], + ...this._formattingOptions?.prettierConfig + }); + } + _getTextModel(uri) { + const models = this._ctx.getMirrorModels(); + for (const model of models) { + if (model.uri.toString() === uri) { + return model; + } + } + return null; + } + doUpdateSchema(schema) { + return this._languageService.updateSchema(schema); + } + doUpdateSchemas(schemas) { + return this._languageService.updateSchemas(schemas); + } + }; + + // node_modules/monaco-graphql/esm/graphql.worker.js + self.onmessage = () => { + initialize((ctx, createData) => new GraphQLWorker(ctx, createData)); + }; +})(); diff --git a/frontend/git/windmill/frontend/.svelte-kit/output/server/workers/graphql.worker.bundle.js b/frontend/git/windmill/frontend/.svelte-kit/output/server/workers/graphql.worker.bundle.js new file mode 100644 index 0000000000..fbb4fd7a96 --- /dev/null +++ b/frontend/git/windmill/frontend/.svelte-kit/output/server/workers/graphql.worker.bundle.js @@ -0,0 +1,43424 @@ +(() => { + 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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + 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( + // 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 + )); + + // node_modules/graphql/jsutils/inspect.js + var require_inspect = __commonJS({ + "node_modules/graphql/jsutils/inspect.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.inspect = inspect2; + var MAX_ARRAY_LENGTH2 = 10; + var MAX_RECURSIVE_DEPTH2 = 2; + function inspect2(value) { + return formatValue2(value, []); + } + function formatValue2(value, seenValues) { + switch (typeof value) { + case "string": + return JSON.stringify(value); + case "function": + return value.name ? `[function ${value.name}]` : "[function]"; + case "object": + return formatObjectValue2(value, seenValues); + default: + return String(value); + } + } + function formatObjectValue2(value, previouslySeenValues) { + if (value === null) { + return "null"; + } + if (previouslySeenValues.includes(value)) { + return "[Circular]"; + } + const seenValues = [...previouslySeenValues, value]; + if (isJSONable2(value)) { + const jsonValue = value.toJSON(); + if (jsonValue !== value) { + return typeof jsonValue === "string" ? jsonValue : formatValue2(jsonValue, seenValues); + } + } else if (Array.isArray(value)) { + return formatArray2(value, seenValues); + } + return formatObject2(value, seenValues); + } + function isJSONable2(value) { + return typeof value.toJSON === "function"; + } + function formatObject2(object, seenValues) { + const entries = Object.entries(object); + if (entries.length === 0) { + return "{}"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH2) { + return "[" + getObjectTag2(object) + "]"; + } + const properties = entries.map( + ([key, value]) => key + ": " + formatValue2(value, seenValues) + ); + return "{ " + properties.join(", ") + " }"; + } + function formatArray2(array, seenValues) { + if (array.length === 0) { + return "[]"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH2) { + return "[Array]"; + } + const len = Math.min(MAX_ARRAY_LENGTH2, array.length); + const remaining = array.length - len; + const items = []; + for (let i = 0; i < len; ++i) { + items.push(formatValue2(array[i], seenValues)); + } + if (remaining === 1) { + items.push("... 1 more item"); + } else if (remaining > 1) { + items.push(`... ${remaining} more items`); + } + return "[" + items.join(", ") + "]"; + } + function getObjectTag2(object) { + const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, ""); + if (tag === "Object" && typeof object.constructor === "function") { + const name2 = object.constructor.name; + if (typeof name2 === "string" && name2 !== "") { + return name2; + } + } + return tag; + } + } + }); + + // node_modules/graphql/jsutils/invariant.js + var require_invariant = __commonJS({ + "node_modules/graphql/jsutils/invariant.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.invariant = invariant3; + function invariant3(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error( + message != null ? message : "Unexpected invariant triggered." + ); + } + } + } + }); + + // node_modules/graphql/language/directiveLocation.js + var require_directiveLocation = __commonJS({ + "node_modules/graphql/language/directiveLocation.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.DirectiveLocation = void 0; + var DirectiveLocation2; + exports.DirectiveLocation = DirectiveLocation2; + (function(DirectiveLocation3) { + DirectiveLocation3["QUERY"] = "QUERY"; + DirectiveLocation3["MUTATION"] = "MUTATION"; + DirectiveLocation3["SUBSCRIPTION"] = "SUBSCRIPTION"; + DirectiveLocation3["FIELD"] = "FIELD"; + DirectiveLocation3["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION"; + DirectiveLocation3["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD"; + DirectiveLocation3["INLINE_FRAGMENT"] = "INLINE_FRAGMENT"; + DirectiveLocation3["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION"; + DirectiveLocation3["SCHEMA"] = "SCHEMA"; + DirectiveLocation3["SCALAR"] = "SCALAR"; + DirectiveLocation3["OBJECT"] = "OBJECT"; + DirectiveLocation3["FIELD_DEFINITION"] = "FIELD_DEFINITION"; + DirectiveLocation3["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION"; + DirectiveLocation3["INTERFACE"] = "INTERFACE"; + DirectiveLocation3["UNION"] = "UNION"; + DirectiveLocation3["ENUM"] = "ENUM"; + DirectiveLocation3["ENUM_VALUE"] = "ENUM_VALUE"; + DirectiveLocation3["INPUT_OBJECT"] = "INPUT_OBJECT"; + DirectiveLocation3["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION"; + })(DirectiveLocation2 || (exports.DirectiveLocation = DirectiveLocation2 = {})); + } + }); + + // node_modules/graphql/language/characterClasses.js + var require_characterClasses = __commonJS({ + "node_modules/graphql/language/characterClasses.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isDigit = isDigit3; + exports.isLetter = isLetter2; + exports.isNameContinue = isNameContinue2; + exports.isNameStart = isNameStart2; + exports.isWhiteSpace = isWhiteSpace2; + function isWhiteSpace2(code) { + return code === 9 || code === 32; + } + function isDigit3(code) { + return code >= 48 && code <= 57; + } + function isLetter2(code) { + return code >= 97 && code <= 122 || // A-Z + code >= 65 && code <= 90; + } + function isNameStart2(code) { + return isLetter2(code) || code === 95; + } + function isNameContinue2(code) { + return isLetter2(code) || isDigit3(code) || code === 95; + } + } + }); + + // node_modules/graphql/language/blockString.js + var require_blockString = __commonJS({ + "node_modules/graphql/language/blockString.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.dedentBlockStringLines = dedentBlockStringLines2; + exports.isPrintableAsBlockString = isPrintableAsBlockString; + exports.printBlockString = printBlockString2; + var _characterClasses = require_characterClasses(); + function dedentBlockStringLines2(lines) { + var _firstNonEmptyLine2; + let commonIndent = Number.MAX_SAFE_INTEGER; + let firstNonEmptyLine = null; + let lastNonEmptyLine = -1; + for (let i = 0; i < lines.length; ++i) { + var _firstNonEmptyLine; + const line = lines[i]; + const indent2 = leadingWhitespace2(line); + if (indent2 === line.length) { + continue; + } + firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; + lastNonEmptyLine = i; + if (i !== 0 && indent2 < commonIndent) { + commonIndent = indent2; + } + } + return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice( + (_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, + lastNonEmptyLine + 1 + ); + } + function leadingWhitespace2(str) { + let i = 0; + while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) { + ++i; + } + return i; + } + function isPrintableAsBlockString(value) { + if (value === "") { + return true; + } + let isEmptyLine = true; + let hasIndent = false; + let hasCommonIndent = true; + let seenNonEmptyLine = false; + for (let i = 0; i < value.length; ++i) { + switch (value.codePointAt(i)) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 11: + case 12: + case 14: + case 15: + return false; + case 13: + return false; + case 10: + if (isEmptyLine && !seenNonEmptyLine) { + return false; + } + seenNonEmptyLine = true; + isEmptyLine = true; + hasIndent = false; + break; + case 9: + case 32: + hasIndent || (hasIndent = isEmptyLine); + break; + default: + hasCommonIndent && (hasCommonIndent = hasIndent); + isEmptyLine = false; + } + } + if (isEmptyLine) { + return false; + } + if (hasCommonIndent && seenNonEmptyLine) { + return false; + } + return true; + } + function printBlockString2(value, options) { + const escapedValue = value.replace(/"""/g, '\\"""'); + const lines = escapedValue.split(/\r\n|[\n\r]/g); + const isSingleLine = lines.length === 1; + const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every( + (line) => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)) + ); + const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); + const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; + const hasTrailingSlash = value.endsWith("\\"); + const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; + const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability + (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); + let result = ""; + const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0)); + if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { + result += "\n"; + } + result += escapedValue; + if (printAsMultipleLines || forceTrailingNewline) { + result += "\n"; + } + return '"""' + result + '"""'; + } + } + }); + + // node_modules/graphql/language/printString.js + var require_printString = __commonJS({ + "node_modules/graphql/language/printString.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.printString = printString2; + function printString2(str) { + return `"${str.replace(escapedRegExp2, escapedReplacer2)}"`; + } + var escapedRegExp2 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; + function escapedReplacer2(str) { + return escapeSequences2[str.charCodeAt(0)]; + } + var escapeSequences2 = [ + "\\u0000", + "\\u0001", + "\\u0002", + "\\u0003", + "\\u0004", + "\\u0005", + "\\u0006", + "\\u0007", + "\\b", + "\\t", + "\\n", + "\\u000B", + "\\f", + "\\r", + "\\u000E", + "\\u000F", + "\\u0010", + "\\u0011", + "\\u0012", + "\\u0013", + "\\u0014", + "\\u0015", + "\\u0016", + "\\u0017", + "\\u0018", + "\\u0019", + "\\u001A", + "\\u001B", + "\\u001C", + "\\u001D", + "\\u001E", + "\\u001F", + "", + "", + '\\"', + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 2F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 3F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 4F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\\\", + "", + "", + "", + // 5F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 6F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\u007F", + "\\u0080", + "\\u0081", + "\\u0082", + "\\u0083", + "\\u0084", + "\\u0085", + "\\u0086", + "\\u0087", + "\\u0088", + "\\u0089", + "\\u008A", + "\\u008B", + "\\u008C", + "\\u008D", + "\\u008E", + "\\u008F", + "\\u0090", + "\\u0091", + "\\u0092", + "\\u0093", + "\\u0094", + "\\u0095", + "\\u0096", + "\\u0097", + "\\u0098", + "\\u0099", + "\\u009A", + "\\u009B", + "\\u009C", + "\\u009D", + "\\u009E", + "\\u009F" + ]; + } + }); + + // node_modules/graphql/jsutils/devAssert.js + var require_devAssert = __commonJS({ + "node_modules/graphql/jsutils/devAssert.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.devAssert = devAssert2; + function devAssert2(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message); + } + } + } + }); + + // node_modules/graphql/language/ast.js + var require_ast = __commonJS({ + "node_modules/graphql/language/ast.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0; + exports.isNode = isNode2; + var Location3 = class { + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The Token at which this Node begins. + */ + /** + * The Token at which this Node ends. + */ + /** + * The Source document the AST represents. + */ + constructor(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + get [Symbol.toStringTag]() { + return "Location"; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } + }; + exports.Location = Location3; + var Token3 = class { + /** + * The kind of Token. + */ + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The 1-indexed line number on which this Token appears. + */ + /** + * The 1-indexed column number at which this Token begins. + */ + /** + * For non-punctuation tokens, represents the interpreted value of the token. + * + * Note: is undefined for punctuation tokens, but typed as string for + * convenience in the parser. + */ + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + constructor(kind, start, end, line, column, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; + this.value = value; + this.prev = null; + this.next = null; + } + get [Symbol.toStringTag]() { + return "Token"; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } + }; + exports.Token = Token3; + var QueryDocumentKeys2 = { + Name: [], + Document: ["definitions"], + OperationDefinition: [ + "name", + "variableDefinitions", + "directives", + "selectionSet" + ], + VariableDefinition: ["variable", "type", "defaultValue", "directives"], + Variable: ["name"], + SelectionSet: ["selections"], + Field: ["alias", "name", "arguments", "directives", "selectionSet"], + Argument: ["name", "value"], + FragmentSpread: ["name", "directives"], + InlineFragment: ["typeCondition", "directives", "selectionSet"], + FragmentDefinition: [ + "name", + // Note: fragment variable definitions are deprecated and will removed in v17.0.0 + "variableDefinitions", + "typeCondition", + "directives", + "selectionSet" + ], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ["values"], + ObjectValue: ["fields"], + ObjectField: ["name", "value"], + Directive: ["name", "arguments"], + NamedType: ["name"], + ListType: ["type"], + NonNullType: ["type"], + SchemaDefinition: ["description", "directives", "operationTypes"], + OperationTypeDefinition: ["type"], + ScalarTypeDefinition: ["description", "name", "directives"], + ObjectTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + FieldDefinition: ["description", "name", "arguments", "type", "directives"], + InputValueDefinition: [ + "description", + "name", + "type", + "defaultValue", + "directives" + ], + InterfaceTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeDefinition: ["description", "name", "directives", "types"], + EnumTypeDefinition: ["description", "name", "directives", "values"], + EnumValueDefinition: ["description", "name", "directives"], + InputObjectTypeDefinition: ["description", "name", "directives", "fields"], + DirectiveDefinition: ["description", "name", "arguments", "locations"], + SchemaExtension: ["directives", "operationTypes"], + ScalarTypeExtension: ["name", "directives"], + ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], + InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], + UnionTypeExtension: ["name", "directives", "types"], + EnumTypeExtension: ["name", "directives", "values"], + InputObjectTypeExtension: ["name", "directives", "fields"] + }; + exports.QueryDocumentKeys = QueryDocumentKeys2; + var kindValues2 = new Set(Object.keys(QueryDocumentKeys2)); + function isNode2(maybeNode) { + const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; + return typeof maybeKind === "string" && kindValues2.has(maybeKind); + } + var OperationTypeNode2; + exports.OperationTypeNode = OperationTypeNode2; + (function(OperationTypeNode3) { + OperationTypeNode3["QUERY"] = "query"; + OperationTypeNode3["MUTATION"] = "mutation"; + OperationTypeNode3["SUBSCRIPTION"] = "subscription"; + })(OperationTypeNode2 || (exports.OperationTypeNode = OperationTypeNode2 = {})); + } + }); + + // node_modules/graphql/language/kinds.js + var require_kinds = __commonJS({ + "node_modules/graphql/language/kinds.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.Kind = void 0; + var Kind2; + exports.Kind = Kind2; + (function(Kind3) { + Kind3["NAME"] = "Name"; + Kind3["DOCUMENT"] = "Document"; + Kind3["OPERATION_DEFINITION"] = "OperationDefinition"; + Kind3["VARIABLE_DEFINITION"] = "VariableDefinition"; + Kind3["SELECTION_SET"] = "SelectionSet"; + Kind3["FIELD"] = "Field"; + Kind3["ARGUMENT"] = "Argument"; + Kind3["FRAGMENT_SPREAD"] = "FragmentSpread"; + Kind3["INLINE_FRAGMENT"] = "InlineFragment"; + Kind3["FRAGMENT_DEFINITION"] = "FragmentDefinition"; + Kind3["VARIABLE"] = "Variable"; + Kind3["INT"] = "IntValue"; + Kind3["FLOAT"] = "FloatValue"; + Kind3["STRING"] = "StringValue"; + Kind3["BOOLEAN"] = "BooleanValue"; + Kind3["NULL"] = "NullValue"; + Kind3["ENUM"] = "EnumValue"; + Kind3["LIST"] = "ListValue"; + Kind3["OBJECT"] = "ObjectValue"; + Kind3["OBJECT_FIELD"] = "ObjectField"; + Kind3["DIRECTIVE"] = "Directive"; + Kind3["NAMED_TYPE"] = "NamedType"; + Kind3["LIST_TYPE"] = "ListType"; + Kind3["NON_NULL_TYPE"] = "NonNullType"; + Kind3["SCHEMA_DEFINITION"] = "SchemaDefinition"; + Kind3["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition"; + Kind3["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition"; + Kind3["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition"; + Kind3["FIELD_DEFINITION"] = "FieldDefinition"; + Kind3["INPUT_VALUE_DEFINITION"] = "InputValueDefinition"; + Kind3["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition"; + Kind3["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition"; + Kind3["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition"; + Kind3["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition"; + Kind3["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition"; + Kind3["DIRECTIVE_DEFINITION"] = "DirectiveDefinition"; + Kind3["SCHEMA_EXTENSION"] = "SchemaExtension"; + Kind3["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension"; + Kind3["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension"; + Kind3["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension"; + Kind3["UNION_TYPE_EXTENSION"] = "UnionTypeExtension"; + Kind3["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension"; + Kind3["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension"; + })(Kind2 || (exports.Kind = Kind2 = {})); + } + }); + + // node_modules/graphql/language/visitor.js + var require_visitor = __commonJS({ + "node_modules/graphql/language/visitor.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.BREAK = void 0; + exports.getEnterLeaveForKind = getEnterLeaveForKind2; + exports.getVisitFn = getVisitFn2; + exports.visit = visit2; + exports.visitInParallel = visitInParallel2; + var _devAssert = require_devAssert(); + var _inspect = require_inspect(); + var _ast = require_ast(); + var _kinds = require_kinds(); + var BREAK2 = Object.freeze({}); + exports.BREAK = BREAK2; + function visit2(root, visitor, visitorKeys = _ast.QueryDocumentKeys) { + const enterLeaveMap = /* @__PURE__ */ new Map(); + for (const kind of Object.values(_kinds.Kind)) { + enterLeaveMap.set(kind, getEnterLeaveForKind2(visitor, kind)); + } + let stack = void 0; + let inArray = Array.isArray(root); + let keys = [root]; + let index = -1; + let edits = []; + let node = root; + let key = void 0; + let parent = void 0; + const path = []; + const ancestors = []; + do { + index++; + const isLeaving = index === keys.length; + const isEdited = isLeaving && edits.length !== 0; + if (isLeaving) { + key = ancestors.length === 0 ? void 0 : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + if (isEdited) { + if (inArray) { + node = node.slice(); + let editOffset = 0; + for (const [editKey, editValue] of edits) { + const arrayKey = editKey - editOffset; + if (editValue === null) { + node.splice(arrayKey, 1); + editOffset++; + } else { + node[arrayKey] = editValue; + } + } + } else { + node = Object.defineProperties( + {}, + Object.getOwnPropertyDescriptors(node) + ); + for (const [editKey, editValue] of edits) { + node[editKey] = editValue; + } + } + } + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else if (parent) { + key = inArray ? index : keys[index]; + node = parent[key]; + if (node === null || node === void 0) { + continue; + } + path.push(key); + } + let result; + if (!Array.isArray(node)) { + var _enterLeaveMap$get, _enterLeaveMap$get2; + (0, _ast.isNode)(node) || (0, _devAssert.devAssert)( + false, + `Invalid AST Node: ${(0, _inspect.inspect)(node)}.` + ); + const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; + result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); + if (result === BREAK2) { + break; + } + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== void 0) { + edits.push([key, result]); + if (!isLeaving) { + if ((0, _ast.isNode)(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + if (result === void 0 && isEdited) { + edits.push([key, node]); + } + if (isLeaving) { + path.pop(); + } else { + var _node$kind; + stack = { + inArray, + index, + keys, + edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; + index = -1; + edits = []; + if (parent) { + ancestors.push(parent); + } + parent = node; + } + } while (stack !== void 0); + if (edits.length !== 0) { + return edits[edits.length - 1][1]; + } + return root; + } + function visitInParallel2(visitors) { + const skipping = new Array(visitors.length).fill(null); + const mergedVisitor = /* @__PURE__ */ Object.create(null); + for (const kind of Object.values(_kinds.Kind)) { + let hasVisitor = false; + const enterList = new Array(visitors.length).fill(void 0); + const leaveList = new Array(visitors.length).fill(void 0); + for (let i = 0; i < visitors.length; ++i) { + const { enter, leave } = getEnterLeaveForKind2(visitors[i], kind); + hasVisitor || (hasVisitor = enter != null || leave != null); + enterList[i] = enter; + leaveList[i] = leave; + } + if (!hasVisitor) { + continue; + } + const mergedEnterLeave = { + enter(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _enterList$i; + const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); + if (result === false) { + skipping[i] = node; + } else if (result === BREAK2) { + skipping[i] = BREAK2; + } else if (result !== void 0) { + return result; + } + } + } + }, + leave(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _leaveList$i; + const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); + if (result === BREAK2) { + skipping[i] = BREAK2; + } else if (result !== void 0 && result !== false) { + return result; + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; + mergedVisitor[kind] = mergedEnterLeave; + } + return mergedVisitor; + } + function getEnterLeaveForKind2(visitor, kind) { + const kindVisitor = visitor[kind]; + if (typeof kindVisitor === "object") { + return kindVisitor; + } else if (typeof kindVisitor === "function") { + return { + enter: kindVisitor, + leave: void 0 + }; + } + return { + enter: visitor.enter, + leave: visitor.leave + }; + } + function getVisitFn2(visitor, kind, isLeaving) { + const { enter, leave } = getEnterLeaveForKind2(visitor, kind); + return isLeaving ? leave : enter; + } + } + }); + + // node_modules/graphql/language/printer.js + var require_printer = __commonJS({ + "node_modules/graphql/language/printer.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.print = print2; + var _blockString = require_blockString(); + var _printString = require_printString(); + var _visitor = require_visitor(); + function print2(ast) { + return (0, _visitor.visit)(ast, printDocASTReducer2); + } + var MAX_LINE_LENGTH2 = 80; + var printDocASTReducer2 = { + Name: { + leave: (node) => node.value + }, + Variable: { + leave: (node) => "$" + node.name + }, + // Document + Document: { + leave: (node) => join3(node.definitions, "\n\n") + }, + OperationDefinition: { + leave(node) { + const varDefs = wrap2("(", join3(node.variableDefinitions, ", "), ")"); + const prefix = join3( + [ + node.operation, + join3([node.name, varDefs]), + join3(node.directives, " ") + ], + " " + ); + return (prefix === "query" ? "" : prefix + " ") + node.selectionSet; + } + }, + VariableDefinition: { + leave: ({ variable, type: type2, defaultValue, directives }) => variable + ": " + type2 + wrap2(" = ", defaultValue) + wrap2(" ", join3(directives, " ")) + }, + SelectionSet: { + leave: ({ selections }) => block2(selections) + }, + Field: { + leave({ alias, name: name2, arguments: args, directives, selectionSet }) { + const prefix = wrap2("", alias, ": ") + name2; + let argsLine = prefix + wrap2("(", join3(args, ", "), ")"); + if (argsLine.length > MAX_LINE_LENGTH2) { + argsLine = prefix + wrap2("(\n", indent2(join3(args, "\n")), "\n)"); + } + return join3([argsLine, join3(directives, " "), selectionSet], " "); + } + }, + Argument: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Fragments + FragmentSpread: { + leave: ({ name: name2, directives }) => "..." + name2 + wrap2(" ", join3(directives, " ")) + }, + InlineFragment: { + leave: ({ typeCondition, directives, selectionSet }) => join3( + [ + "...", + wrap2("on ", typeCondition), + join3(directives, " "), + selectionSet + ], + " " + ) + }, + FragmentDefinition: { + leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => ( + // or removed in the future. + `fragment ${name2}${wrap2("(", join3(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap2("", join3(directives, " "), " ")}` + selectionSet + ) + }, + // Value + IntValue: { + leave: ({ value }) => value + }, + FloatValue: { + leave: ({ value }) => value + }, + StringValue: { + leave: ({ value, block: isBlockString }) => isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value) + }, + BooleanValue: { + leave: ({ value }) => value ? "true" : "false" + }, + NullValue: { + leave: () => "null" + }, + EnumValue: { + leave: ({ value }) => value + }, + ListValue: { + leave: ({ values }) => "[" + join3(values, ", ") + "]" + }, + ObjectValue: { + leave: ({ fields }) => "{" + join3(fields, ", ") + "}" + }, + ObjectField: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Directive + Directive: { + leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap2("(", join3(args, ", "), ")") + }, + // Type + NamedType: { + leave: ({ name: name2 }) => name2 + }, + ListType: { + leave: ({ type: type2 }) => "[" + type2 + "]" + }, + NonNullType: { + leave: ({ type: type2 }) => type2 + "!" + }, + // Type System Definitions + SchemaDefinition: { + leave: ({ description, directives, operationTypes }) => wrap2("", description, "\n") + join3(["schema", join3(directives, " "), block2(operationTypes)], " ") + }, + OperationTypeDefinition: { + leave: ({ operation, type: type2 }) => operation + ": " + type2 + }, + ScalarTypeDefinition: { + leave: ({ description, name: name2, directives }) => wrap2("", description, "\n") + join3(["scalar", name2, join3(directives, " ")], " ") + }, + ObjectTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap2("", description, "\n") + join3( + [ + "type", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + FieldDefinition: { + leave: ({ description, name: name2, arguments: args, type: type2, directives }) => wrap2("", description, "\n") + name2 + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join3(args, "\n")), "\n)") : wrap2("(", join3(args, ", "), ")")) + ": " + type2 + wrap2(" ", join3(directives, " ")) + }, + InputValueDefinition: { + leave: ({ description, name: name2, type: type2, defaultValue, directives }) => wrap2("", description, "\n") + join3( + [name2 + ": " + type2, wrap2("= ", defaultValue), join3(directives, " ")], + " " + ) + }, + InterfaceTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap2("", description, "\n") + join3( + [ + "interface", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + UnionTypeDefinition: { + leave: ({ description, name: name2, directives, types }) => wrap2("", description, "\n") + join3( + ["union", name2, join3(directives, " "), wrap2("= ", join3(types, " | "))], + " " + ) + }, + EnumTypeDefinition: { + leave: ({ description, name: name2, directives, values }) => wrap2("", description, "\n") + join3(["enum", name2, join3(directives, " "), block2(values)], " ") + }, + EnumValueDefinition: { + leave: ({ description, name: name2, directives }) => wrap2("", description, "\n") + join3([name2, join3(directives, " ")], " ") + }, + InputObjectTypeDefinition: { + leave: ({ description, name: name2, directives, fields }) => wrap2("", description, "\n") + join3(["input", name2, join3(directives, " "), block2(fields)], " ") + }, + DirectiveDefinition: { + leave: ({ description, name: name2, arguments: args, repeatable, locations }) => wrap2("", description, "\n") + "directive @" + name2 + (hasMultilineItems2(args) ? wrap2("(\n", indent2(join3(args, "\n")), "\n)") : wrap2("(", join3(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join3(locations, " | ") + }, + SchemaExtension: { + leave: ({ directives, operationTypes }) => join3( + ["extend schema", join3(directives, " "), block2(operationTypes)], + " " + ) + }, + ScalarTypeExtension: { + leave: ({ name: name2, directives }) => join3(["extend scalar", name2, join3(directives, " ")], " ") + }, + ObjectTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join3( + [ + "extend type", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + InterfaceTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join3( + [ + "extend interface", + name2, + wrap2("implements ", join3(interfaces, " & ")), + join3(directives, " "), + block2(fields) + ], + " " + ) + }, + UnionTypeExtension: { + leave: ({ name: name2, directives, types }) => join3( + [ + "extend union", + name2, + join3(directives, " "), + wrap2("= ", join3(types, " | ")) + ], + " " + ) + }, + EnumTypeExtension: { + leave: ({ name: name2, directives, values }) => join3(["extend enum", name2, join3(directives, " "), block2(values)], " ") + }, + InputObjectTypeExtension: { + leave: ({ name: name2, directives, fields }) => join3(["extend input", name2, join3(directives, " "), block2(fields)], " ") + } + }; + function join3(maybeArray, separator = "") { + var _maybeArray$filter$jo; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ""; + } + function block2(array) { + return wrap2("{\n", indent2(join3(array, "\n")), "\n}"); + } + function wrap2(start, maybeString, end = "") { + return maybeString != null && maybeString !== "" ? start + maybeString + end : ""; + } + function indent2(str) { + return wrap2(" ", str.replace(/\n/g, "\n ")); + } + function hasMultilineItems2(maybeArray) { + var _maybeArray$some; + return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; + } + } + }); + + // node_modules/graphql/jsutils/isIterableObject.js + var require_isIterableObject = __commonJS({ + "node_modules/graphql/jsutils/isIterableObject.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isIterableObject = isIterableObject2; + function isIterableObject2(maybeIterable) { + return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === "function"; + } + } + }); + + // node_modules/graphql/jsutils/isObjectLike.js + var require_isObjectLike = __commonJS({ + "node_modules/graphql/jsutils/isObjectLike.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isObjectLike = isObjectLike2; + function isObjectLike2(value) { + return typeof value == "object" && value !== null; + } + } + }); + + // node_modules/graphql/jsutils/didYouMean.js + var require_didYouMean = __commonJS({ + "node_modules/graphql/jsutils/didYouMean.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.didYouMean = didYouMean2; + var MAX_SUGGESTIONS2 = 5; + function didYouMean2(firstArg, secondArg) { + const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg]; + let message = " Did you mean "; + if (subMessage) { + message += subMessage + " "; + } + const suggestions = suggestionsArg.map((x) => `"${x}"`); + switch (suggestions.length) { + case 0: + return ""; + case 1: + return message + suggestions[0] + "?"; + case 2: + return message + suggestions[0] + " or " + suggestions[1] + "?"; + } + const selected = suggestions.slice(0, MAX_SUGGESTIONS2); + const lastItem = selected.pop(); + return message + selected.join(", ") + ", or " + lastItem + "?"; + } + } + }); + + // node_modules/graphql/jsutils/identityFunc.js + var require_identityFunc = __commonJS({ + "node_modules/graphql/jsutils/identityFunc.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.identityFunc = identityFunc2; + function identityFunc2(x) { + return x; + } + } + }); + + // node_modules/graphql/jsutils/instanceOf.js + var require_instanceOf = __commonJS({ + "node_modules/graphql/jsutils/instanceOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.instanceOf = void 0; + var _inspect = require_inspect(); + var instanceOf4 = ( + /* c8 ignore next 6 */ + // FIXME: https://github.com/graphql/graphql-js/issues/2317 + globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf5(value, constructor) { + return value instanceof constructor; + } : function instanceOf5(value, constructor) { + if (value instanceof constructor) { + return true; + } + if (typeof value === "object" && value !== null) { + var _value$constructor; + const className = constructor.prototype[Symbol.toStringTag]; + const valueClassName = ( + // We still need to support constructor's name to detect conflicts with older versions of this library. + Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name + ); + if (className === valueClassName) { + const stringifiedValue = (0, _inspect.inspect)(value); + throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); + } + } + return false; + } + ); + exports.instanceOf = instanceOf4; + } + }); + + // node_modules/graphql/jsutils/keyMap.js + var require_keyMap = __commonJS({ + "node_modules/graphql/jsutils/keyMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.keyMap = keyMap2; + function keyMap2(list2, keyFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = item; + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/keyValMap.js + var require_keyValMap = __commonJS({ + "node_modules/graphql/jsutils/keyValMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.keyValMap = keyValMap2; + function keyValMap2(list2, keyFn, valFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = valFn(item); + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/mapValue.js + var require_mapValue = __commonJS({ + "node_modules/graphql/jsutils/mapValue.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.mapValue = mapValue2; + function mapValue2(map, fn) { + const result = /* @__PURE__ */ Object.create(null); + for (const key of Object.keys(map)) { + result[key] = fn(map[key], key); + } + return result; + } + } + }); + + // node_modules/graphql/jsutils/naturalCompare.js + var require_naturalCompare = __commonJS({ + "node_modules/graphql/jsutils/naturalCompare.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.naturalCompare = naturalCompare2; + function naturalCompare2(aStr, bStr) { + let aIndex = 0; + let bIndex = 0; + while (aIndex < aStr.length && bIndex < bStr.length) { + let aChar = aStr.charCodeAt(aIndex); + let bChar = bStr.charCodeAt(bIndex); + if (isDigit3(aChar) && isDigit3(bChar)) { + let aNum = 0; + do { + ++aIndex; + aNum = aNum * 10 + aChar - DIGIT_02; + aChar = aStr.charCodeAt(aIndex); + } while (isDigit3(aChar) && aNum > 0); + let bNum = 0; + do { + ++bIndex; + bNum = bNum * 10 + bChar - DIGIT_02; + bChar = bStr.charCodeAt(bIndex); + } while (isDigit3(bChar) && bNum > 0); + if (aNum < bNum) { + return -1; + } + if (aNum > bNum) { + return 1; + } + } else { + if (aChar < bChar) { + return -1; + } + if (aChar > bChar) { + return 1; + } + ++aIndex; + ++bIndex; + } + } + return aStr.length - bStr.length; + } + var DIGIT_02 = 48; + var DIGIT_92 = 57; + function isDigit3(code) { + return !isNaN(code) && DIGIT_02 <= code && code <= DIGIT_92; + } + } + }); + + // node_modules/graphql/jsutils/suggestionList.js + var require_suggestionList = __commonJS({ + "node_modules/graphql/jsutils/suggestionList.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.suggestionList = suggestionList2; + var _naturalCompare = require_naturalCompare(); + function suggestionList2(input, options) { + const optionsByDistance = /* @__PURE__ */ Object.create(null); + const lexicalDistance2 = new LexicalDistance2(input); + const threshold = Math.floor(input.length * 0.4) + 1; + for (const option of options) { + const distance = lexicalDistance2.measure(option, threshold); + if (distance !== void 0) { + optionsByDistance[option] = distance; + } + } + return Object.keys(optionsByDistance).sort((a, b) => { + const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b); + }); + } + var LexicalDistance2 = class { + constructor(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray2(this._inputLowerCase); + this._rows = [ + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0) + ]; + } + measure(option, threshold) { + if (this._input === option) { + return 0; + } + const optionLowerCase = option.toLowerCase(); + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + let a = stringToArray2(optionLowerCase); + let b = this._inputArray; + if (a.length < b.length) { + const tmp = a; + a = b; + b = tmp; + } + const aLength = a.length; + const bLength = b.length; + if (aLength - bLength > threshold) { + return void 0; + } + const rows = this._rows; + for (let j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + for (let i = 1; i <= aLength; i++) { + const upRow = rows[(i - 1) % 3]; + const currentRow = rows[i % 3]; + let smallestCell = currentRow[0] = i; + for (let j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + let currentCell = Math.min( + upRow[j] + 1, + // delete + currentRow[j - 1] + 1, + // insert + upRow[j - 1] + cost + // substitute + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + currentRow[j] = currentCell; + } + if (smallestCell > threshold) { + return void 0; + } + } + const distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : void 0; + } + }; + function stringToArray2(str) { + const strLength = str.length; + const array = new Array(strLength); + for (let i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + return array; + } + } + }); + + // node_modules/graphql/jsutils/toObjMap.js + var require_toObjMap = __commonJS({ + "node_modules/graphql/jsutils/toObjMap.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.toObjMap = toObjMap2; + function toObjMap2(obj) { + if (obj == null) { + return /* @__PURE__ */ Object.create(null); + } + if (Object.getPrototypeOf(obj) === null) { + return obj; + } + const map = /* @__PURE__ */ Object.create(null); + for (const [key, value] of Object.entries(obj)) { + map[key] = value; + } + return map; + } + } + }); + + // node_modules/graphql/language/location.js + var require_location = __commonJS({ + "node_modules/graphql/language/location.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.getLocation = getLocation3; + var _invariant = require_invariant(); + var LineRegExp2 = /\r\n|[\n\r]/g; + function getLocation3(source, position) { + let lastLineStart = 0; + let line = 1; + for (const match of source.body.matchAll(LineRegExp2)) { + typeof match.index === "number" || (0, _invariant.invariant)(false); + if (match.index >= position) { + break; + } + lastLineStart = match.index + match[0].length; + line += 1; + } + return { + line, + column: position + 1 - lastLineStart + }; + } + } + }); + + // node_modules/graphql/language/printLocation.js + var require_printLocation = __commonJS({ + "node_modules/graphql/language/printLocation.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.printLocation = printLocation2; + exports.printSourceLocation = printSourceLocation2; + var _location = require_location(); + function printLocation2(location) { + return printSourceLocation2( + location.source, + (0, _location.getLocation)(location.source, location.start) + ); + } + function printSourceLocation2(source, sourceLocation) { + const firstLineColumnOffset = source.locationOffset.column - 1; + const body = "".padStart(firstLineColumnOffset) + source.body; + const lineIndex = sourceLocation.line - 1; + const lineOffset = source.locationOffset.line - 1; + const lineNum = sourceLocation.line + lineOffset; + const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + const columnNum = sourceLocation.column + columnOffset; + const locationStr = `${source.name}:${lineNum}:${columnNum} +`; + const lines = body.split(/\r\n|[\n\r]/g); + const locationLine = lines[lineIndex]; + if (locationLine.length > 120) { + const subLineIndex = Math.floor(columnNum / 80); + const subLineColumnNum = columnNum % 80; + const subLines = []; + for (let i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); + } + return locationStr + printPrefixedLines2([ + [`${lineNum} |`, subLines[0]], + ...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]), + ["|", "^".padStart(subLineColumnNum)], + ["|", subLines[subLineIndex + 1]] + ]); + } + return locationStr + printPrefixedLines2([ + // Lines specified like this: ["prefix", "string"], + [`${lineNum - 1} |`, lines[lineIndex - 1]], + [`${lineNum} |`, locationLine], + ["|", "^".padStart(columnNum)], + [`${lineNum + 1} |`, lines[lineIndex + 1]] + ]); + } + function printPrefixedLines2(lines) { + const existingLines = lines.filter(([_, line]) => line !== void 0); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n"); + } + } + }); + + // node_modules/graphql/error/GraphQLError.js + var require_GraphQLError = __commonJS({ + "node_modules/graphql/error/GraphQLError.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLError = void 0; + exports.formatError = formatError2; + exports.printError = printError2; + var _isObjectLike = require_isObjectLike(); + var _location = require_location(); + var _printLocation = require_printLocation(); + function toNormalizedOptions2(args) { + const firstArg = args[0]; + if (firstArg == null || "kind" in firstArg || "length" in firstArg) { + return { + nodes: firstArg, + source: args[1], + positions: args[2], + path: args[3], + originalError: args[4], + extensions: args[5] + }; + } + return firstArg; + } + var GraphQLError2 = class _GraphQLError extends Error { + /** + * An array of `{ line, column }` locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + /** + * The original error thrown from a field resolver during execution. + */ + /** + * Extension fields to add to the formatted error. + */ + /** + * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. + */ + constructor(message, ...rawArgs) { + var _this$nodes, _nodeLocations$, _ref; + const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions2(rawArgs); + super(message); + this.name = "GraphQLError"; + this.path = path !== null && path !== void 0 ? path : void 0; + this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0; + this.nodes = undefinedIfEmpty2( + Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0 + ); + const nodeLocations = undefinedIfEmpty2( + (_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null) + ); + this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; + this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start); + this.locations = positions && source ? positions.map((pos) => (0, _location.getLocation)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map( + (loc) => (0, _location.getLocation)(loc.source, loc.start) + ); + const originalExtensions = (0, _isObjectLike.isObjectLike)( + originalError === null || originalError === void 0 ? void 0 : originalError.extensions + ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0; + this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null); + Object.defineProperties(this, { + message: { + writable: true, + enumerable: true + }, + name: { + enumerable: false + }, + nodes: { + enumerable: false + }, + source: { + enumerable: false + }, + positions: { + enumerable: false + }, + originalError: { + enumerable: false + } + }); + if (originalError !== null && originalError !== void 0 && originalError.stack) { + Object.defineProperty(this, "stack", { + value: originalError.stack, + writable: true, + configurable: true + }); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, _GraphQLError); + } else { + Object.defineProperty(this, "stack", { + value: Error().stack, + writable: true, + configurable: true + }); + } + } + get [Symbol.toStringTag]() { + return "GraphQLError"; + } + toString() { + let output = this.message; + if (this.nodes) { + for (const node of this.nodes) { + if (node.loc) { + output += "\n\n" + (0, _printLocation.printLocation)(node.loc); + } + } + } else if (this.source && this.locations) { + for (const location of this.locations) { + output += "\n\n" + (0, _printLocation.printSourceLocation)(this.source, location); + } + } + return output; + } + toJSON() { + const formattedError = { + message: this.message + }; + if (this.locations != null) { + formattedError.locations = this.locations; + } + if (this.path != null) { + formattedError.path = this.path; + } + if (this.extensions != null && Object.keys(this.extensions).length > 0) { + formattedError.extensions = this.extensions; + } + return formattedError; + } + }; + exports.GraphQLError = GraphQLError2; + function undefinedIfEmpty2(array) { + return array === void 0 || array.length === 0 ? void 0 : array; + } + function printError2(error) { + return error.toString(); + } + function formatError2(error) { + return error.toJSON(); + } + } + }); + + // node_modules/graphql/utilities/valueFromASTUntyped.js + var require_valueFromASTUntyped = __commonJS({ + "node_modules/graphql/utilities/valueFromASTUntyped.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.valueFromASTUntyped = valueFromASTUntyped2; + var _keyValMap = require_keyValMap(); + var _kinds = require_kinds(); + function valueFromASTUntyped2(valueNode, variables) { + switch (valueNode.kind) { + case _kinds.Kind.NULL: + return null; + case _kinds.Kind.INT: + return parseInt(valueNode.value, 10); + case _kinds.Kind.FLOAT: + return parseFloat(valueNode.value); + case _kinds.Kind.STRING: + case _kinds.Kind.ENUM: + case _kinds.Kind.BOOLEAN: + return valueNode.value; + case _kinds.Kind.LIST: + return valueNode.values.map( + (node) => valueFromASTUntyped2(node, variables) + ); + case _kinds.Kind.OBJECT: + return (0, _keyValMap.keyValMap)( + valueNode.fields, + (field) => field.name.value, + (field) => valueFromASTUntyped2(field.value, variables) + ); + case _kinds.Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; + } + } + } + }); + + // node_modules/graphql/type/assertName.js + var require_assertName = __commonJS({ + "node_modules/graphql/type/assertName.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.assertEnumValueName = assertEnumValueName2; + exports.assertName = assertName2; + var _devAssert = require_devAssert(); + var _GraphQLError = require_GraphQLError(); + var _characterClasses = require_characterClasses(); + function assertName2(name2) { + name2 != null || (0, _devAssert.devAssert)(false, "Must provide name."); + typeof name2 === "string" || (0, _devAssert.devAssert)(false, "Expected name to be a string."); + if (name2.length === 0) { + throw new _GraphQLError.GraphQLError( + "Expected name to be a non-empty string." + ); + } + for (let i = 1; i < name2.length; ++i) { + if (!(0, _characterClasses.isNameContinue)(name2.charCodeAt(i))) { + throw new _GraphQLError.GraphQLError( + `Names must only contain [_a-zA-Z0-9] but "${name2}" does not.` + ); + } + } + if (!(0, _characterClasses.isNameStart)(name2.charCodeAt(0))) { + throw new _GraphQLError.GraphQLError( + `Names must start with [_a-zA-Z] but "${name2}" does not.` + ); + } + return name2; + } + function assertEnumValueName2(name2) { + if (name2 === "true" || name2 === "false" || name2 === "null") { + throw new _GraphQLError.GraphQLError( + `Enum values cannot be named: ${name2}` + ); + } + return assertName2(name2); + } + } + }); + + // node_modules/graphql/type/definition.js + var require_definition = __commonJS({ + "node_modules/graphql/type/definition.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0; + exports.argsToArgsConfig = argsToArgsConfig2; + exports.assertAbstractType = assertAbstractType2; + exports.assertCompositeType = assertCompositeType2; + exports.assertEnumType = assertEnumType2; + exports.assertInputObjectType = assertInputObjectType2; + exports.assertInputType = assertInputType2; + exports.assertInterfaceType = assertInterfaceType2; + exports.assertLeafType = assertLeafType2; + exports.assertListType = assertListType2; + exports.assertNamedType = assertNamedType2; + exports.assertNonNullType = assertNonNullType2; + exports.assertNullableType = assertNullableType2; + exports.assertObjectType = assertObjectType2; + exports.assertOutputType = assertOutputType2; + exports.assertScalarType = assertScalarType2; + exports.assertType = assertType2; + exports.assertUnionType = assertUnionType2; + exports.assertWrappingType = assertWrappingType2; + exports.defineArguments = defineArguments2; + exports.getNamedType = getNamedType2; + exports.getNullableType = getNullableType2; + exports.isAbstractType = isAbstractType2; + exports.isCompositeType = isCompositeType2; + exports.isEnumType = isEnumType2; + exports.isInputObjectType = isInputObjectType2; + exports.isInputType = isInputType2; + exports.isInterfaceType = isInterfaceType2; + exports.isLeafType = isLeafType2; + exports.isListType = isListType2; + exports.isNamedType = isNamedType2; + exports.isNonNullType = isNonNullType2; + exports.isNullableType = isNullableType2; + exports.isObjectType = isObjectType2; + exports.isOutputType = isOutputType2; + exports.isRequiredArgument = isRequiredArgument2; + exports.isRequiredInputField = isRequiredInputField2; + exports.isScalarType = isScalarType2; + exports.isType = isType2; + exports.isUnionType = isUnionType2; + exports.isWrappingType = isWrappingType2; + exports.resolveObjMapThunk = resolveObjMapThunk2; + exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk2; + var _devAssert = require_devAssert(); + var _didYouMean = require_didYouMean(); + var _identityFunc = require_identityFunc(); + var _inspect = require_inspect(); + var _instanceOf = require_instanceOf(); + var _isObjectLike = require_isObjectLike(); + var _keyMap = require_keyMap(); + var _keyValMap = require_keyValMap(); + var _mapValue = require_mapValue(); + var _suggestionList = require_suggestionList(); + var _toObjMap = require_toObjMap(); + var _GraphQLError = require_GraphQLError(); + var _kinds = require_kinds(); + var _printer = require_printer(); + var _valueFromASTUntyped = require_valueFromASTUntyped(); + var _assertName = require_assertName(); + function isType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isInputObjectType2(type2) || isListType2(type2) || isNonNullType2(type2); + } + function assertType2(type2) { + if (!isType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL type.` + ); + } + return type2; + } + function isScalarType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLScalarType2); + } + function assertScalarType2(type2) { + if (!isScalarType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Scalar type.` + ); + } + return type2; + } + function isObjectType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLObjectType2); + } + function assertObjectType2(type2) { + if (!isObjectType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Object type.` + ); + } + return type2; + } + function isInterfaceType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLInterfaceType2); + } + function assertInterfaceType2(type2) { + if (!isInterfaceType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Interface type.` + ); + } + return type2; + } + function isUnionType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLUnionType2); + } + function assertUnionType2(type2) { + if (!isUnionType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Union type.` + ); + } + return type2; + } + function isEnumType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLEnumType2); + } + function assertEnumType2(type2) { + if (!isEnumType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Enum type.` + ); + } + return type2; + } + function isInputObjectType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLInputObjectType2); + } + function assertInputObjectType2(type2) { + if (!isInputObjectType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)( + type2 + )} to be a GraphQL Input Object type.` + ); + } + return type2; + } + function isListType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLList2); + } + function assertListType2(type2) { + if (!isListType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL List type.` + ); + } + return type2; + } + function isNonNullType2(type2) { + return (0, _instanceOf.instanceOf)(type2, GraphQLNonNull2); + } + function assertNonNullType2(type2) { + if (!isNonNullType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL Non-Null type.` + ); + } + return type2; + } + function isInputType2(type2) { + return isScalarType2(type2) || isEnumType2(type2) || isInputObjectType2(type2) || isWrappingType2(type2) && isInputType2(type2.ofType); + } + function assertInputType2(type2) { + if (!isInputType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL input type.` + ); + } + return type2; + } + function isOutputType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isWrappingType2(type2) && isOutputType2(type2.ofType); + } + function assertOutputType2(type2) { + if (!isOutputType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL output type.` + ); + } + return type2; + } + function isLeafType2(type2) { + return isScalarType2(type2) || isEnumType2(type2); + } + function assertLeafType2(type2) { + if (!isLeafType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL leaf type.` + ); + } + return type2; + } + function isCompositeType2(type2) { + return isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2); + } + function assertCompositeType2(type2) { + if (!isCompositeType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL composite type.` + ); + } + return type2; + } + function isAbstractType2(type2) { + return isInterfaceType2(type2) || isUnionType2(type2); + } + function assertAbstractType2(type2) { + if (!isAbstractType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL abstract type.` + ); + } + return type2; + } + var GraphQLList2 = class { + constructor(ofType) { + isType2(ofType) || (0, _devAssert.devAssert)( + false, + `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLList"; + } + toString() { + return "[" + String(this.ofType) + "]"; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLList = GraphQLList2; + var GraphQLNonNull2 = class { + constructor(ofType) { + isNullableType2(ofType) || (0, _devAssert.devAssert)( + false, + `Expected ${(0, _inspect.inspect)( + ofType + )} to be a GraphQL nullable type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLNonNull"; + } + toString() { + return String(this.ofType) + "!"; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLNonNull = GraphQLNonNull2; + function isWrappingType2(type2) { + return isListType2(type2) || isNonNullType2(type2); + } + function assertWrappingType2(type2) { + if (!isWrappingType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL wrapping type.` + ); + } + return type2; + } + function isNullableType2(type2) { + return isType2(type2) && !isNonNullType2(type2); + } + function assertNullableType2(type2) { + if (!isNullableType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL nullable type.` + ); + } + return type2; + } + function getNullableType2(type2) { + if (type2) { + return isNonNullType2(type2) ? type2.ofType : type2; + } + } + function isNamedType2(type2) { + return isScalarType2(type2) || isObjectType2(type2) || isInterfaceType2(type2) || isUnionType2(type2) || isEnumType2(type2) || isInputObjectType2(type2); + } + function assertNamedType2(type2) { + if (!isNamedType2(type2)) { + throw new Error( + `Expected ${(0, _inspect.inspect)(type2)} to be a GraphQL named type.` + ); + } + return type2; + } + function getNamedType2(type2) { + if (type2) { + let unwrappedType = type2; + while (isWrappingType2(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + return unwrappedType; + } + } + function resolveReadonlyArrayThunk2(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + function resolveObjMapThunk2(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + var GraphQLScalarType2 = class { + constructor(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; + const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.specifiedByURL = config.specifiedByURL; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc; + this.parseValue = parseValue2; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue2( + (0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables) + ); + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + config.specifiedByURL == null || typeof config.specifiedByURL === "string" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "specifiedByURL" as a string, but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.` + ); + config.serialize == null || typeof config.serialize === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.` + ); + if (config.parseLiteral) { + typeof config.parseValue === "function" && typeof config.parseLiteral === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide both "parseValue" and "parseLiteral" functions.` + ); + } + } + get [Symbol.toStringTag]() { + return "GraphQLScalarType"; + } + toConfig() { + return { + name: this.name, + description: this.description, + specifiedByURL: this.specifiedByURL, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLScalarType = GraphQLScalarType2; + var GraphQLObjectType2 = class { + constructor(config) { + var _config$extensionASTN2; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; + this._fields = () => defineFieldMap2(config); + this._interfaces = () => defineInterfaces2(config); + config.isTypeOf == null || typeof config.isTypeOf === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "isTypeOf" as a function, but got: ${(0, _inspect.inspect)(config.isTypeOf)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig2(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLObjectType = GraphQLObjectType2; + function defineInterfaces2(config) { + var _config$interfaces; + const interfaces = resolveReadonlyArrayThunk2( + (_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : [] + ); + Array.isArray(interfaces) || (0, _devAssert.devAssert)( + false, + `${config.name} interfaces must be an Array or a function which returns an Array.` + ); + return interfaces; + } + function defineFieldMap2(config) { + const fieldMap = resolveObjMapThunk2(config.fields); + isPlainObj2(fieldMap) || (0, _devAssert.devAssert)( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + var _fieldConfig$args; + isPlainObj2(fieldConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field config must be an object.` + ); + fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field resolver must be a function if provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.` + ); + const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj2(argsConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} args must be an object with argument names as keys.` + ); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + args: defineArguments2(argsConfig), + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function defineArguments2(config) { + return Object.entries(config).map(([argName, argConfig]) => ({ + name: (0, _assertName.assertName)(argName), + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(argConfig.extensions), + astNode: argConfig.astNode + })); + } + function isPlainObj2(obj) { + return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj); + } + function fieldsToFieldsConfig2(fields) { + return (0, _mapValue.mapValue)(fields, (field) => ({ + description: field.description, + type: field.type, + args: argsToArgsConfig2(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + } + function argsToArgsConfig2(args) { + return (0, _keyValMap.keyValMap)( + args, + (arg) => arg.name, + (arg) => ({ + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + }) + ); + } + function isRequiredArgument2(arg) { + return isNonNullType2(arg.type) && arg.defaultValue === void 0; + } + var GraphQLInterfaceType2 = class { + constructor(config) { + var _config$extensionASTN3; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; + this._fields = defineFieldMap2.bind(void 0, config); + this._interfaces = defineInterfaces2.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "resolveType" as a function, but got: ${(0, _inspect.inspect)(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLInterfaceType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig2(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLInterfaceType = GraphQLInterfaceType2; + var GraphQLUnionType2 = class { + constructor(config) { + var _config$extensionASTN4; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; + this._types = defineTypes2.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || (0, _devAssert.devAssert)( + false, + `${this.name} must provide "resolveType" as a function, but got: ${(0, _inspect.inspect)(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLUnionType"; + } + getTypes() { + if (typeof this._types === "function") { + this._types = this._types(); + } + return this._types; + } + toConfig() { + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLUnionType = GraphQLUnionType2; + function defineTypes2(config) { + const types = resolveReadonlyArrayThunk2(config.types); + Array.isArray(types) || (0, _devAssert.devAssert)( + false, + `Must provide Array of types or a function which returns such an array for Union ${config.name}.` + ); + return types; + } + var GraphQLEnumType2 = class { + /* */ + constructor(config) { + var _config$extensionASTN5; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; + this._values = defineEnumValues2(this.name, config.values); + this._valueLookup = new Map( + this._values.map((enumValue) => [enumValue.value, enumValue]) + ); + this._nameLookup = (0, _keyMap.keyMap)(this._values, (value) => value.name); + } + get [Symbol.toStringTag]() { + return "GraphQLEnumType"; + } + getValues() { + return this._values; + } + getValue(name2) { + return this._nameLookup[name2]; + } + serialize(outputValue) { + const enumValue = this._valueLookup.get(outputValue); + if (enumValue === void 0) { + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)( + outputValue + )}` + ); + } + return enumValue.name; + } + parseValue(inputValue) { + if (typeof inputValue !== "string") { + const valueStr = (0, _inspect.inspect)(inputValue); + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue2(this, valueStr) + ); + } + const enumValue = this.getValue(inputValue); + if (enumValue == null) { + throw new _GraphQLError.GraphQLError( + `Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue2(this, inputValue) + ); + } + return enumValue.value; + } + parseLiteral(valueNode, _variables) { + if (valueNode.kind !== _kinds.Kind.ENUM) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError( + `Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue2(this, valueStr), + { + nodes: valueNode + } + ); + } + const enumValue = this.getValue(valueNode.value); + if (enumValue == null) { + const valueStr = (0, _printer.print)(valueNode); + throw new _GraphQLError.GraphQLError( + `Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue2(this, valueStr), + { + nodes: valueNode + } + ); + } + return enumValue.value; + } + toConfig() { + const values = (0, _keyValMap.keyValMap)( + this.getValues(), + (value) => value.name, + (value) => ({ + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + }) + ); + return { + name: this.name, + description: this.description, + values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLEnumType = GraphQLEnumType2; + function didYouMeanEnumValue2(enumType, unknownValueStr) { + const allNames = enumType.getValues().map((value) => value.name); + const suggestedValues = (0, _suggestionList.suggestionList)( + unknownValueStr, + allNames + ); + return (0, _didYouMean.didYouMean)("the enum value", suggestedValues); + } + function defineEnumValues2(typeName, valueMap) { + isPlainObj2(valueMap) || (0, _devAssert.devAssert)( + false, + `${typeName} values must be an object with value names as keys.` + ); + return Object.entries(valueMap).map(([valueName, valueConfig]) => { + isPlainObj2(valueConfig) || (0, _devAssert.devAssert)( + false, + `${typeName}.${valueName} must refer to an object with a "value" key representing an internal value but got: ${(0, _inspect.inspect)( + valueConfig + )}.` + ); + return { + name: (0, _assertName.assertEnumValueName)(valueName), + description: valueConfig.description, + value: valueConfig.value !== void 0 ? valueConfig.value : valueName, + deprecationReason: valueConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); + } + var GraphQLInputObjectType2 = class { + constructor(config) { + var _config$extensionASTN6; + this.name = (0, _assertName.assertName)(config.name); + this.description = config.description; + this.extensions = (0, _toObjMap.toObjMap)(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; + this._fields = defineInputFieldMap2.bind(void 0, config); + } + get [Symbol.toStringTag]() { + return "GraphQLInputObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + toConfig() { + const fields = (0, _mapValue.mapValue)(this.getFields(), (field) => ({ + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + return { + name: this.name, + description: this.description, + fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + exports.GraphQLInputObjectType = GraphQLInputObjectType2; + function defineInputFieldMap2(config) { + const fieldMap = resolveObjMapThunk2(config.fields); + isPlainObj2(fieldMap) || (0, _devAssert.devAssert)( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => { + !("resolve" in fieldConfig) || (0, _devAssert.devAssert)( + false, + `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.` + ); + return { + name: (0, _assertName.assertName)(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function isRequiredInputField2(field) { + return isNonNullType2(field.type) && field.defaultValue === void 0; + } + } + }); + + // node_modules/graphql/type/scalars.js + var require_scalars = __commonJS({ + "node_modules/graphql/type/scalars.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0; + exports.isSpecifiedScalarType = isSpecifiedScalarType2; + exports.specifiedScalarTypes = void 0; + var _inspect = require_inspect(); + var _isObjectLike = require_isObjectLike(); + var _GraphQLError = require_GraphQLError(); + var _kinds = require_kinds(); + var _printer = require_printer(); + var _definition = require_definition(); + var GRAPHQL_MAX_INT2 = 2147483647; + exports.GRAPHQL_MAX_INT = GRAPHQL_MAX_INT2; + var GRAPHQL_MIN_INT2 = -2147483648; + exports.GRAPHQL_MIN_INT = GRAPHQL_MIN_INT2; + var GraphQLInt2 = new _definition.GraphQLScalarType({ + name: "Int", + description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isInteger(num)) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + } + if (num > GRAPHQL_MAX_INT2 || num < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + "Int cannot represent non 32-bit signed integer value: " + (0, _inspect.inspect)(coercedValue) + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + if (inputValue > GRAPHQL_MAX_INT2 || inputValue < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${inputValue}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non-integer value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + const num = parseInt(valueNode.value, 10); + if (num > GRAPHQL_MAX_INT2 || num < GRAPHQL_MIN_INT2) { + throw new _GraphQLError.GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, + { + nodes: valueNode + } + ); + } + return num; + } + }); + exports.GraphQLInt = GraphQLInt2; + var GraphQLFloat2 = new _definition.GraphQLScalarType({ + name: "Float", + description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isFinite(num)) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + `Float cannot represent non numeric value: ${(0, _printer.print)( + valueNode + )}`, + valueNode + ); + } + return parseFloat(valueNode.value); + } + }); + exports.GraphQLFloat = GraphQLFloat2; + var GraphQLString2 = new _definition.GraphQLScalarType({ + name: "String", + description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (typeof coercedValue === "boolean") { + return coercedValue ? "true" : "false"; + } + if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) { + return coercedValue.toString(); + } + throw new _GraphQLError.GraphQLError( + `String cannot represent value: ${(0, _inspect.inspect)(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "string") { + throw new _GraphQLError.GraphQLError( + `String cannot represent a non string value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING) { + throw new _GraphQLError.GraphQLError( + `String cannot represent a non string value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLString = GraphQLString2; + var GraphQLBoolean2 = new _definition.GraphQLScalarType({ + name: "Boolean", + description: "The `Boolean` scalar type represents `true` or `false`.", + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue; + } + if (Number.isFinite(coercedValue)) { + return coercedValue !== 0; + } + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)( + coercedValue + )}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "boolean") { + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)( + inputValue + )}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.BOOLEAN) { + throw new _GraphQLError.GraphQLError( + `Boolean cannot represent a non boolean value: ${(0, _printer.print)( + valueNode + )}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLBoolean = GraphQLBoolean2; + var GraphQLID2 = new _definition.GraphQLScalarType({ + name: "ID", + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize(outputValue) { + const coercedValue = serializeObject2(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (Number.isInteger(coercedValue)) { + return String(coercedValue); + } + throw new _GraphQLError.GraphQLError( + `ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue === "string") { + return inputValue; + } + if (typeof inputValue === "number" && Number.isInteger(inputValue)) { + return inputValue.toString(); + } + throw new _GraphQLError.GraphQLError( + `ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}` + ); + }, + parseLiteral(valueNode) { + if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) { + throw new _GraphQLError.GraphQLError( + "ID cannot represent a non-string and non-integer value: " + (0, _printer.print)(valueNode), + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + exports.GraphQLID = GraphQLID2; + var specifiedScalarTypes2 = Object.freeze([ + GraphQLString2, + GraphQLInt2, + GraphQLFloat2, + GraphQLBoolean2, + GraphQLID2 + ]); + exports.specifiedScalarTypes = specifiedScalarTypes2; + function isSpecifiedScalarType2(type2) { + return specifiedScalarTypes2.some(({ name: name2 }) => type2.name === name2); + } + function serializeObject2(outputValue) { + if ((0, _isObjectLike.isObjectLike)(outputValue)) { + if (typeof outputValue.valueOf === "function") { + const valueOfResult = outputValue.valueOf(); + if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) { + return valueOfResult; + } + } + if (typeof outputValue.toJSON === "function") { + return outputValue.toJSON(); + } + } + return outputValue; + } + } + }); + + // node_modules/graphql/utilities/astFromValue.js + var require_astFromValue = __commonJS({ + "node_modules/graphql/utilities/astFromValue.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.astFromValue = astFromValue2; + var _inspect = require_inspect(); + var _invariant = require_invariant(); + var _isIterableObject = require_isIterableObject(); + var _isObjectLike = require_isObjectLike(); + var _kinds = require_kinds(); + var _definition = require_definition(); + var _scalars = require_scalars(); + function astFromValue2(value, type2) { + if ((0, _definition.isNonNullType)(type2)) { + const astValue = astFromValue2(value, type2.ofType); + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) { + return null; + } + return astValue; + } + if (value === null) { + return { + kind: _kinds.Kind.NULL + }; + } + if (value === void 0) { + return null; + } + if ((0, _definition.isListType)(type2)) { + const itemType = type2.ofType; + if ((0, _isIterableObject.isIterableObject)(value)) { + const valuesNodes = []; + for (const item of value) { + const itemNode = astFromValue2(item, itemType); + if (itemNode != null) { + valuesNodes.push(itemNode); + } + } + return { + kind: _kinds.Kind.LIST, + values: valuesNodes + }; + } + return astFromValue2(value, itemType); + } + if ((0, _definition.isInputObjectType)(type2)) { + if (!(0, _isObjectLike.isObjectLike)(value)) { + return null; + } + const fieldNodes = []; + for (const field of Object.values(type2.getFields())) { + const fieldValue = astFromValue2(value[field.name], field.type); + if (fieldValue) { + fieldNodes.push({ + kind: _kinds.Kind.OBJECT_FIELD, + name: { + kind: _kinds.Kind.NAME, + value: field.name + }, + value: fieldValue + }); + } + } + return { + kind: _kinds.Kind.OBJECT, + fields: fieldNodes + }; + } + if ((0, _definition.isLeafType)(type2)) { + const serialized = type2.serialize(value); + if (serialized == null) { + return null; + } + if (typeof serialized === "boolean") { + return { + kind: _kinds.Kind.BOOLEAN, + value: serialized + }; + } + if (typeof serialized === "number" && Number.isFinite(serialized)) { + const stringNum = String(serialized); + return integerStringRegExp2.test(stringNum) ? { + kind: _kinds.Kind.INT, + value: stringNum + } : { + kind: _kinds.Kind.FLOAT, + value: stringNum + }; + } + if (typeof serialized === "string") { + if ((0, _definition.isEnumType)(type2)) { + return { + kind: _kinds.Kind.ENUM, + value: serialized + }; + } + if (type2 === _scalars.GraphQLID && integerStringRegExp2.test(serialized)) { + return { + kind: _kinds.Kind.INT, + value: serialized + }; + } + return { + kind: _kinds.Kind.STRING, + value: serialized + }; + } + throw new TypeError( + `Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.` + ); + } + (0, _invariant.invariant)( + false, + "Unexpected input type: " + (0, _inspect.inspect)(type2) + ); + } + var integerStringRegExp2 = /^-?(?:0|[1-9][0-9]*)$/; + } + }); + + // node_modules/graphql/type/introspection.js + var require_introspection = __commonJS({ + "node_modules/graphql/type/introspection.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0; + exports.isIntrospectionType = isIntrospectionType2; + var _inspect = require_inspect(); + var _invariant = require_invariant(); + var _directiveLocation = require_directiveLocation(); + var _printer = require_printer(); + var _astFromValue = require_astFromValue(); + var _definition = require_definition(); + var _scalars = require_scalars(); + var __Schema2 = new _definition.GraphQLObjectType({ + name: "__Schema", + description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + fields: () => ({ + description: { + type: _scalars.GraphQLString, + resolve: (schema) => schema.description + }, + types: { + description: "A list of all types supported by this server.", + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)) + ), + resolve(schema) { + return Object.values(schema.getTypeMap()); + } + }, + queryType: { + description: "The type that query operations will be rooted at.", + type: new _definition.GraphQLNonNull(__Type2), + resolve: (schema) => schema.getQueryType() + }, + mutationType: { + description: "If this server supports mutation, the type that mutation operations will be rooted at.", + type: __Type2, + resolve: (schema) => schema.getMutationType() + }, + subscriptionType: { + description: "If this server support subscription, the type that subscription operations will be rooted at.", + type: __Type2, + resolve: (schema) => schema.getSubscriptionType() + }, + directives: { + description: "A list of all directives supported by this server.", + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__Directive2) + ) + ), + resolve: (schema) => schema.getDirectives() + } + }) + }); + exports.__Schema = __Schema2; + var __Directive2 = new _definition.GraphQLObjectType({ + name: "__Directive", + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (directive) => directive.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (directive) => directive.description + }, + isRepeatable: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (directive) => directive.isRepeatable + }, + locations: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__DirectiveLocation2) + ) + ), + resolve: (directive) => directive.locations + }, + args: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + } + }) + }); + exports.__Directive = __Directive2; + var __DirectiveLocation2 = new _definition.GraphQLEnumType({ + name: "__DirectiveLocation", + description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + values: { + QUERY: { + value: _directiveLocation.DirectiveLocation.QUERY, + description: "Location adjacent to a query operation." + }, + MUTATION: { + value: _directiveLocation.DirectiveLocation.MUTATION, + description: "Location adjacent to a mutation operation." + }, + SUBSCRIPTION: { + value: _directiveLocation.DirectiveLocation.SUBSCRIPTION, + description: "Location adjacent to a subscription operation." + }, + FIELD: { + value: _directiveLocation.DirectiveLocation.FIELD, + description: "Location adjacent to a field." + }, + FRAGMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION, + description: "Location adjacent to a fragment definition." + }, + FRAGMENT_SPREAD: { + value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, + description: "Location adjacent to a fragment spread." + }, + INLINE_FRAGMENT: { + value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT, + description: "Location adjacent to an inline fragment." + }, + VARIABLE_DEFINITION: { + value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION, + description: "Location adjacent to a variable definition." + }, + SCHEMA: { + value: _directiveLocation.DirectiveLocation.SCHEMA, + description: "Location adjacent to a schema definition." + }, + SCALAR: { + value: _directiveLocation.DirectiveLocation.SCALAR, + description: "Location adjacent to a scalar definition." + }, + OBJECT: { + value: _directiveLocation.DirectiveLocation.OBJECT, + description: "Location adjacent to an object type definition." + }, + FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION, + description: "Location adjacent to a field definition." + }, + ARGUMENT_DEFINITION: { + value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, + description: "Location adjacent to an argument definition." + }, + INTERFACE: { + value: _directiveLocation.DirectiveLocation.INTERFACE, + description: "Location adjacent to an interface definition." + }, + UNION: { + value: _directiveLocation.DirectiveLocation.UNION, + description: "Location adjacent to a union definition." + }, + ENUM: { + value: _directiveLocation.DirectiveLocation.ENUM, + description: "Location adjacent to an enum definition." + }, + ENUM_VALUE: { + value: _directiveLocation.DirectiveLocation.ENUM_VALUE, + description: "Location adjacent to an enum value definition." + }, + INPUT_OBJECT: { + value: _directiveLocation.DirectiveLocation.INPUT_OBJECT, + description: "Location adjacent to an input object type definition." + }, + INPUT_FIELD_DEFINITION: { + value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, + description: "Location adjacent to an input object field definition." + } + } + }); + exports.__DirectiveLocation = __DirectiveLocation2; + var __Type2 = new _definition.GraphQLObjectType({ + name: "__Type", + description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + fields: () => ({ + kind: { + type: new _definition.GraphQLNonNull(__TypeKind2), + resolve(type2) { + if ((0, _definition.isScalarType)(type2)) { + return TypeKind2.SCALAR; + } + if ((0, _definition.isObjectType)(type2)) { + return TypeKind2.OBJECT; + } + if ((0, _definition.isInterfaceType)(type2)) { + return TypeKind2.INTERFACE; + } + if ((0, _definition.isUnionType)(type2)) { + return TypeKind2.UNION; + } + if ((0, _definition.isEnumType)(type2)) { + return TypeKind2.ENUM; + } + if ((0, _definition.isInputObjectType)(type2)) { + return TypeKind2.INPUT_OBJECT; + } + if ((0, _definition.isListType)(type2)) { + return TypeKind2.LIST; + } + if ((0, _definition.isNonNullType)(type2)) { + return TypeKind2.NON_NULL; + } + (0, _invariant.invariant)( + false, + `Unexpected type: "${(0, _inspect.inspect)(type2)}".` + ); + } + }, + name: { + type: _scalars.GraphQLString, + resolve: (type2) => "name" in type2 ? type2.name : void 0 + }, + description: { + type: _scalars.GraphQLString, + resolve: (type2) => ( + /* c8 ignore next */ + "description" in type2 ? type2.description : void 0 + ) + }, + specifiedByURL: { + type: _scalars.GraphQLString, + resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL : void 0 + }, + fields: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__Field2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isObjectType)(type2) || (0, _definition.isInterfaceType)(type2)) { + const fields = Object.values(type2.getFields()); + return includeDeprecated ? fields : fields.filter((field) => field.deprecationReason == null); + } + } + }, + interfaces: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)), + resolve(type2) { + if ((0, _definition.isObjectType)(type2) || (0, _definition.isInterfaceType)(type2)) { + return type2.getInterfaces(); + } + } + }, + possibleTypes: { + type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type2)), + resolve(type2, _args, _context, { schema }) { + if ((0, _definition.isAbstractType)(type2)) { + return schema.getPossibleTypes(type2); + } + } + }, + enumValues: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__EnumValue2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isEnumType)(type2)) { + const values = type2.getValues(); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + inputFields: { + type: new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if ((0, _definition.isInputObjectType)(type2)) { + const values = Object.values(type2.getFields()); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + ofType: { + type: __Type2, + resolve: (type2) => "ofType" in type2 ? type2.ofType : void 0 + } + }) + }); + exports.__Type = __Type2; + var __Field2 = new _definition.GraphQLObjectType({ + name: "__Field", + description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (field) => field.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (field) => field.description + }, + args: { + type: new _definition.GraphQLNonNull( + new _definition.GraphQLList( + new _definition.GraphQLNonNull(__InputValue2) + ) + ), + args: { + includeDeprecated: { + type: _scalars.GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + }, + type: { + type: new _definition.GraphQLNonNull(__Type2), + resolve: (field) => field.type + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (field) => field.deprecationReason + } + }) + }); + exports.__Field = __Field2; + var __InputValue2 = new _definition.GraphQLObjectType({ + name: "__InputValue", + description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (inputValue) => inputValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (inputValue) => inputValue.description + }, + type: { + type: new _definition.GraphQLNonNull(__Type2), + resolve: (inputValue) => inputValue.type + }, + defaultValue: { + type: _scalars.GraphQLString, + description: "A GraphQL-formatted string representing the default value for this input value.", + resolve(inputValue) { + const { type: type2, defaultValue } = inputValue; + const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type2); + return valueAST ? (0, _printer.print)(valueAST) : null; + } + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (obj) => obj.deprecationReason + } + }) + }); + exports.__InputValue = __InputValue2; + var __EnumValue2 = new _definition.GraphQLObjectType({ + name: "__EnumValue", + description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + fields: () => ({ + name: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + resolve: (enumValue) => enumValue.name + }, + description: { + type: _scalars.GraphQLString, + resolve: (enumValue) => enumValue.description + }, + isDeprecated: { + type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean), + resolve: (enumValue) => enumValue.deprecationReason != null + }, + deprecationReason: { + type: _scalars.GraphQLString, + resolve: (enumValue) => enumValue.deprecationReason + } + }) + }); + exports.__EnumValue = __EnumValue2; + var TypeKind2; + exports.TypeKind = TypeKind2; + (function(TypeKind3) { + TypeKind3["SCALAR"] = "SCALAR"; + TypeKind3["OBJECT"] = "OBJECT"; + TypeKind3["INTERFACE"] = "INTERFACE"; + TypeKind3["UNION"] = "UNION"; + TypeKind3["ENUM"] = "ENUM"; + TypeKind3["INPUT_OBJECT"] = "INPUT_OBJECT"; + TypeKind3["LIST"] = "LIST"; + TypeKind3["NON_NULL"] = "NON_NULL"; + })(TypeKind2 || (exports.TypeKind = TypeKind2 = {})); + var __TypeKind2 = new _definition.GraphQLEnumType({ + name: "__TypeKind", + description: "An enum describing what kind of type a given `__Type` is.", + values: { + SCALAR: { + value: TypeKind2.SCALAR, + description: "Indicates this type is a scalar." + }, + OBJECT: { + value: TypeKind2.OBJECT, + description: "Indicates this type is an object. `fields` and `interfaces` are valid fields." + }, + INTERFACE: { + value: TypeKind2.INTERFACE, + description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields." + }, + UNION: { + value: TypeKind2.UNION, + description: "Indicates this type is a union. `possibleTypes` is a valid field." + }, + ENUM: { + value: TypeKind2.ENUM, + description: "Indicates this type is an enum. `enumValues` is a valid field." + }, + INPUT_OBJECT: { + value: TypeKind2.INPUT_OBJECT, + description: "Indicates this type is an input object. `inputFields` is a valid field." + }, + LIST: { + value: TypeKind2.LIST, + description: "Indicates this type is a list. `ofType` is a valid field." + }, + NON_NULL: { + value: TypeKind2.NON_NULL, + description: "Indicates this type is a non-null. `ofType` is a valid field." + } + } + }); + exports.__TypeKind = __TypeKind2; + var SchemaMetaFieldDef3 = { + name: "__schema", + type: new _definition.GraphQLNonNull(__Schema2), + description: "Access the current type schema of this server.", + args: [], + resolve: (_source, _args, _context, { schema }) => schema, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.SchemaMetaFieldDef = SchemaMetaFieldDef3; + var TypeMetaFieldDef3 = { + name: "__type", + type: __Type2, + description: "Request the type information of a single type.", + args: [ + { + name: "name", + description: void 0, + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + defaultValue: void 0, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + } + ], + resolve: (_source, { name: name2 }, _context, { schema }) => schema.getType(name2), + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.TypeMetaFieldDef = TypeMetaFieldDef3; + var TypeNameMetaFieldDef3 = { + name: "__typename", + type: new _definition.GraphQLNonNull(_scalars.GraphQLString), + description: "The name of the current Object type at runtime.", + args: [], + resolve: (_source, _args, _context, { parentType }) => parentType.name, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef3; + var introspectionTypes2 = Object.freeze([ + __Schema2, + __Directive2, + __DirectiveLocation2, + __Type2, + __Field2, + __InputValue2, + __EnumValue2, + __TypeKind2 + ]); + exports.introspectionTypes = introspectionTypes2; + function isIntrospectionType2(type2) { + return introspectionTypes2.some(({ name: name2 }) => type2.name === name2); + } + } + }); + + // node_modules/nullthrows/nullthrows.js + var require_nullthrows = __commonJS({ + "node_modules/nullthrows/nullthrows.js"(exports, module) { + "use strict"; + function nullthrows2(x, message) { + if (x != null) { + return x; + } + var error = new Error(message !== void 0 ? message : "Got unexpected " + x); + error.framesToPop = 1; + throw error; + } + module.exports = nullthrows2; + module.exports.default = nullthrows2; + Object.defineProperty(module.exports, "__esModule", { value: true }); + } + }); + + // node_modules/picomatch-browser/lib/constants.js + var require_constants = __commonJS({ + "node_modules/picomatch-browser/lib/constants.js"(exports, module) { + "use strict"; + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DOT_LITERAL = "\\."; + var PLUS_LITERAL = "\\+"; + var QMARK_LITERAL = "\\?"; + var SLASH_LITERAL = "\\/"; + var ONE_CHAR = "(?=.)"; + var QMARK = "[^/]"; + var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + var NO_DOT = `(?!${DOT_LITERAL})`; + var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + var STAR = `${QMARK}*?`; + var SEP = "/"; + var POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR, + SEP + }; + var WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)`, + SEP: "\\" + }; + var POSIX_REGEX_SOURCE = { + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }; + module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + // Digits + CHAR_0: 48, + /* 0 */ + CHAR_9: 57, + /* 9 */ + // Alphabet chars. + CHAR_UPPERCASE_A: 65, + /* A */ + CHAR_LOWERCASE_A: 97, + /* a */ + CHAR_UPPERCASE_Z: 90, + /* Z */ + CHAR_LOWERCASE_Z: 122, + /* z */ + CHAR_LEFT_PARENTHESES: 40, + /* ( */ + CHAR_RIGHT_PARENTHESES: 41, + /* ) */ + CHAR_ASTERISK: 42, + /* * */ + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, + /* & */ + CHAR_AT: 64, + /* @ */ + CHAR_BACKWARD_SLASH: 92, + /* \ */ + CHAR_CARRIAGE_RETURN: 13, + /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, + /* ^ */ + CHAR_COLON: 58, + /* : */ + CHAR_COMMA: 44, + /* , */ + CHAR_DOT: 46, + /* . */ + CHAR_DOUBLE_QUOTE: 34, + /* " */ + CHAR_EQUAL: 61, + /* = */ + CHAR_EXCLAMATION_MARK: 33, + /* ! */ + CHAR_FORM_FEED: 12, + /* \f */ + CHAR_FORWARD_SLASH: 47, + /* / */ + CHAR_GRAVE_ACCENT: 96, + /* ` */ + CHAR_HASH: 35, + /* # */ + CHAR_HYPHEN_MINUS: 45, + /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, + /* < */ + CHAR_LEFT_CURLY_BRACE: 123, + /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, + /* [ */ + CHAR_LINE_FEED: 10, + /* \n */ + CHAR_NO_BREAK_SPACE: 160, + /* \u00A0 */ + CHAR_PERCENT: 37, + /* % */ + CHAR_PLUS: 43, + /* + */ + CHAR_QUESTION_MARK: 63, + /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, + /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, + /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, + /* ] */ + CHAR_SEMICOLON: 59, + /* ; */ + CHAR_SINGLE_QUOTE: 39, + /* ' */ + CHAR_SPACE: 32, + /* */ + CHAR_TAB: 9, + /* \t */ + CHAR_UNDERSCORE: 95, + /* _ */ + CHAR_VERTICAL_LINE: 124, + /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + /* \uFEFF */ + /** + * Create EXTGLOB_CHARS + */ + extglobChars(chars) { + return { + "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, + "?": { type: "qmark", open: "(?:", close: ")?" }, + "+": { type: "plus", open: "(?:", close: ")+" }, + "*": { type: "star", open: "(?:", close: ")*" }, + "@": { type: "at", open: "(?:", close: ")" } + }; + }, + /** + * Create GLOB_CHARS + */ + globChars(win322) { + return win322 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + } + }); + + // node_modules/picomatch-browser/lib/utils.js + var require_utils = __commonJS({ + "node_modules/picomatch-browser/lib/utils.js"(exports) { + "use strict"; + var { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = require_constants(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { + return true; + } + return false; + }; + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) + return input; + if (input[idx - 1] === "\\") + return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? "" : "^"; + const append = options.contains ? "" : "$"; + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + exports.basename = (path, { windows } = {}) => { + if (windows) { + return path.replace(/[\\/]$/, "").replace(/.*[\\/]/, ""); + } else { + return path.replace(/\/$/, "").replace(/.*\//, ""); + } + }; + } + }); + + // node_modules/picomatch-browser/lib/scan.js + var require_scan = __commonJS({ + "node_modules/picomatch-browser/lib/scan.js"(exports, module) { + "use strict"; + var utils = require_utils(); + var { + CHAR_ASTERISK, + /* * */ + CHAR_AT, + /* @ */ + CHAR_BACKWARD_SLASH: CHAR_BACKWARD_SLASH2, + /* \ */ + CHAR_COMMA, + /* , */ + CHAR_DOT: CHAR_DOT2, + /* . */ + CHAR_EXCLAMATION_MARK, + /* ! */ + CHAR_FORWARD_SLASH: CHAR_FORWARD_SLASH2, + /* / */ + CHAR_LEFT_CURLY_BRACE, + /* { */ + CHAR_LEFT_PARENTHESES, + /* ( */ + CHAR_LEFT_SQUARE_BRACKET, + /* [ */ + CHAR_PLUS, + /* + */ + CHAR_QUESTION_MARK: CHAR_QUESTION_MARK2, + /* ? */ + CHAR_RIGHT_CURLY_BRACE, + /* } */ + CHAR_RIGHT_PARENTHESES, + /* ) */ + CHAR_RIGHT_SQUARE_BRACKET + /* ] */ + } = require_constants(); + var isPathSeparator2 = (code) => { + return code === CHAR_FORWARD_SLASH2 || code === CHAR_BACKWARD_SLASH2; + }; + var depth = (token) => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + var scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: "", depth: 0, isGlob: false }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT2 && (code = advance()) === CHAR_DOT2) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_FORWARD_SLASH2) { + slashes.push(index); + tokens.push(token); + token = { value: "", depth: 0, isGlob: false }; + if (finished === true) + continue; + if (prev === CHAR_DOT2 && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK2 || code === CHAR_EXCLAMATION_MARK; + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) + isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_QUESTION_MARK2) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH2) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) { + continue; + } + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else { + base = str; + } + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator2(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + if (opts.unescape === true) { + if (glob) + glob = utils.removeBackslashes(glob); + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator2(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") { + parts.push(value); + } + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module.exports = scan; + } + }); + + // node_modules/picomatch-browser/lib/parse.js + var require_parse = __commonJS({ + "node_modules/picomatch-browser/lib/parse.js"(exports, module) { + "use strict"; + var constants = require_constants(); + var utils = require_utils(); + var { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + var expandRange = (args, options) => { + if (typeof options.expandRange === "function") { + return options.expandRange(...args, options); + } + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + var syntaxError2 = (type2, char) => { + return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var parse3 = (input, options) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + const bos = { type: "bos", value: "", output: opts.prepend || "" }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const PLATFORM_CHARS = constants.globChars(opts.windows); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + const globstar = (opts2) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) { + star = `(${star})`; + } + if (typeof opts.noext === "boolean") { + opts.noextglob = opts.noext; + } + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index]; + const remaining = () => input.slice(state.index + 1); + const consume = (value2 = "", num = 0) => { + state.consumed += value2; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) { + return false; + } + state.negated = true; + state.start++; + return true; + }; + const increment = (type2) => { + state[type2]++; + stack.push(type2); + }; + const decrement = (type2) => { + state[type2]--; + stack.pop(); + }; + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren" && !EXTGLOB_CHARS[tok.value]) { + extglobs[extglobs.length - 1].inner += tok.value; + } + if (tok.value || tok.output) + append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type2, value2) => { + const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); + push({ type: "paren", extglob: true, value: advance(), output }); + extglobs.push(token); + }; + const extglobClose = (token) => { + let output = token.close + (opts.capture ? ")" : ""); + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { + extglobStar = globstar(opts); + } + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + if (token.prev.type === "bos" && eos()) { + state.negatedExtglob = true; + } + } + push({ type: "paren", extglob: true, value, output }); + decrement("parens"); + }; + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + } + return QMARK.repeat(chars.length); + } + if (first === ".") { + return DOT_LITERAL.repeat(chars.length); + } + if (first === "*") { + if (esc) { + return esc + first + (rest ? star : ""); + } + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ""); + } else { + output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + } + } + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") { + continue; + } + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) { + continue; + } + if (next === "." || next === ";") { + continue; + } + if (!next) { + value += "\\"; + push({ type: "text", value }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += "\\"; + } + } + if (opts.unescape === true) { + value = advance() || ""; + } else { + value += advance() || ""; + } + if (state.brackets === 0) { + push({ type: "text", value }); + continue; + } + } + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const rest2 = prev.value.slice(idx + 2); + const posix2 = POSIX_REGEX_SOURCE[rest2]; + if (posix2) { + prev.value = pre + posix2; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { + value = `\\${value}`; + } + if (value === "]" && (prev.value === "[" || prev.value === "[^")) { + value = `\\${value}`; + } + if (opts.posix === true && value === "!" && prev.value === "[") { + value = "^"; + } + prev.value += value; + append({ value }); + continue; + } + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: "text", value }); + } + continue; + } + if (value === "(") { + increment("parens"); + push({ type: "paren", value }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("opening", "(")); + } + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); + decrement("parens"); + continue; + } + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("closing", "]")); + } + value = `\\${value}`; + } else { + increment("brackets"); + } + push({ type: "bracket", value }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ type: "text", value, output: `\\${value}` }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError2("opening", "[")); + } + push({ type: "text", value, output: `\\${value}` }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { + value = `/${value}`; + } + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ type: "text", value, output: value }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") { + break; + } + if (arr[i].type !== "dots") { + range.unshift(arr[i].value); + } + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t2 of toks) { + state.output += t2.output || t2.value; + } + } + push({ type: "brace", value, output }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: "text", value }); + continue; + } + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ type: "comma", value, output }); + continue; + } + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ type: "slash", value, output: SLASH_LITERAL }); + continue; + } + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") + prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ type: "text", value, output: DOT_LITERAL }); + continue; + } + push({ type: "dot", value, output: DOT_LITERAL }); + continue; + } + if (value === "?") { + const isGroup = prev && prev.value === "("; + if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) { + throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + } + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { + output = `\\${value}`; + } + push({ type: "text", value, output }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ type: "qmark", value, output: QMARK_NO_DOT }); + continue; + } + push({ type: "qmark", value, output: QMARK }); + continue; + } + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ type: "plus", value, output: PLUS_LITERAL }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ type: "plus", value }); + continue; + } + push({ type: "plus", value: PLUS_LITERAL }); + continue; + } + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ type: "at", extglob: true, value, output: "" }); + continue; + } + push({ type: "text", value }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") { + value = `\\${value}`; + } + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ type: "text", value }); + continue; + } + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ type: "star", value, output: "" }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ type: "star", value, output: "" }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") { + break; + } + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: "slash", value: "/", output: "" }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { type: "star", value, output: star }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") { + token.output = nodot + token.output; + } + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) + throw new SyntaxError(syntaxError2("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { + push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); + } + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) { + state.output += token.suffix; + } + } + } + return state; + }; + parse3.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + input = REPLACEMENTS[input] || input; + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(opts.windows); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { negated: false, prefix: "" }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) { + star = `(${star})`; + } + const globstar = (opts2) => { + if (opts2.noglobstar === true) + return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": + return `${nodot}${ONE_CHAR}${star}`; + case ".*": + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": + return nodot + globstar(opts); + case "**/*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) + return; + const source2 = create(match[1]); + if (!source2) + return; + return source2 + DOT_LITERAL + match[2]; + } + } + }; + const output = utils.removePrefix(input, state); + let source = create(output); + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + return source; + }; + module.exports = parse3; + } + }); + + // node_modules/picomatch-browser/lib/picomatch.js + var require_picomatch = __commonJS({ + "node_modules/picomatch-browser/lib/picomatch.js"(exports, module) { + "use strict"; + var scan = require_scan(); + var parse3 = require_parse(); + var utils = require_utils(); + var constants = require_constants(); + var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch2 = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch2(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state2 = isMatch(str); + if (state2) + return state2; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject2(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) { + throw new TypeError("Expected pattern to be a non-empty string"); + } + const opts = options || {}; + const posix2 = opts.windows; + const regex = isState ? picomatch2.compileRe(glob, options) : picomatch2.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored2 = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored2 = picomatch2(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch2.test(input, regex, options, { glob, posix: posix2 }); + const result = { glob, state, regex, posix: posix2, input, output, match, isMatch }; + if (typeof opts.onResult === "function") { + opts.onResult(result); + } + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored2(input)) { + if (typeof opts.onIgnore === "function") { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + if (returnState) { + matcher.state = state; + } + return matcher; + }; + picomatch2.test = (input, regex, options, { glob, posix: posix2 } = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected input to be a string"); + } + if (input === "") { + return { isMatch: false, output: "" }; + } + const opts = options || {}; + const format2 = opts.format || (posix2 ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format2 ? format2(input) : input; + if (match === false) { + output = format2 ? format2(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch2.matchBase(input, regex, options, posix2); + } else { + match = regex.exec(output); + } + } + return { isMatch: Boolean(match), match, output }; + }; + picomatch2.matchBase = (input, glob, options) => { + const regex = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options); + return regex.test(utils.basename(input)); + }; + picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str); + picomatch2.parse = (pattern, options) => { + if (Array.isArray(pattern)) + return pattern.map((p2) => picomatch2.parse(p2, options)); + return parse3(pattern, { ...options, fastpaths: false }); + }; + picomatch2.scan = (input, options) => scan(input, options); + picomatch2.compileRe = (parsed, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return parsed.output; + } + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${parsed.output})${append}`; + if (parsed && parsed.negated === true) { + source = `^(?!${source}).*$`; + } + const regex = picomatch2.toRegex(source, options); + if (returnState === true) { + regex.state = parsed; + } + return regex; + }; + picomatch2.makeRe = (input, options, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") { + throw new TypeError("Expected a non-empty string"); + } + const opts = options || {}; + let parsed = { negated: false, fastpaths: true }; + let prefix = ""; + let output; + if (input.startsWith("./")) { + input = input.slice(2); + prefix = parsed.prefix = "./"; + } + if (opts.fastpaths !== false && (input[0] === "." || input[0] === "*")) { + output = parse3.fastpaths(input, options); + } + if (output === void 0) { + parsed = parse3(input, options); + parsed.prefix = prefix + (parsed.prefix || ""); + } else { + parsed.output = output; + } + return picomatch2.compileRe(parsed, options, returnOutput, returnState); + }; + picomatch2.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) + throw err; + return /$^/; + } + }; + picomatch2.constants = constants; + module.exports = picomatch2; + } + }); + + // node_modules/picomatch-browser/index.js + var require_picomatch_browser = __commonJS({ + "node_modules/picomatch-browser/index.js"(exports, module) { + "use strict"; + module.exports = require_picomatch(); + } + }); + + // node_modules/prettier/standalone.js + var require_standalone = __commonJS({ + "node_modules/prettier/standalone.js"(exports, module) { + (function(e) { + if (typeof exports == "object" && typeof module == "object") + module.exports = e(); + else if (typeof define == "function" && define.amd) + define(e); + else { + var f = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : this || {}; + f.prettier = e(); + } + })(function() { + "use strict"; + var xe = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports); + var pt = xe((r0, pu) => { + var ir = function(e) { + return e && e.Math == Math && e; + }; + pu.exports = ir(typeof globalThis == "object" && globalThis) || ir(typeof window == "object" && window) || ir(typeof self == "object" && self) || ir(typeof global == "object" && global) || function() { + return this; + }() || Function("return this")(); + }); + var Dt = xe((n0, fu) => { + fu.exports = function(e) { + try { + return !!e(); + } catch { + return true; + } + }; + }); + var yt = xe((u0, Du) => { + var Mo = Dt(); + Du.exports = !Mo(function() { + return Object.defineProperty({}, 1, { get: function() { + return 7; + } })[1] != 7; + }); + }); + var ar = xe((s0, mu) => { + var Ro = Dt(); + mu.exports = !Ro(function() { + var e = function() { + }.bind(); + return typeof e != "function" || e.hasOwnProperty("prototype"); + }); + }); + var At = xe((i0, du) => { + var $o = ar(), or = Function.prototype.call; + du.exports = $o ? or.bind(or) : function() { + return or.apply(or, arguments); + }; + }); + var vu = xe((hu) => { + "use strict"; + var gu = {}.propertyIsEnumerable, yu = Object.getOwnPropertyDescriptor, Vo = yu && !gu.call({ 1: 2 }, 1); + hu.f = Vo ? function(r) { + var t2 = yu(this, r); + return !!t2 && t2.enumerable; + } : gu; + }); + var lr = xe((o0, Cu) => { + Cu.exports = function(e, r) { + return { enumerable: !(e & 1), configurable: !(e & 2), writable: !(e & 4), value: r }; + }; + }); + var mt = xe((l0, Au) => { + var Eu = ar(), Fu = Function.prototype, Wr = Fu.call, Wo = Eu && Fu.bind.bind(Wr, Wr); + Au.exports = Eu ? Wo : function(e) { + return function() { + return Wr.apply(e, arguments); + }; + }; + }); + var Vt = xe((c0, xu) => { + var Su = mt(), Ho = Su({}.toString), Go = Su("".slice); + xu.exports = function(e) { + return Go(Ho(e), 8, -1); + }; + }); + var Tu = xe((p0, bu) => { + var Uo = mt(), Jo = Dt(), zo = Vt(), Hr = Object, Xo = Uo("".split); + bu.exports = Jo(function() { + return !Hr("z").propertyIsEnumerable(0); + }) ? function(e) { + return zo(e) == "String" ? Xo(e, "") : Hr(e); + } : Hr; + }); + var cr = xe((f0, Bu) => { + Bu.exports = function(e) { + return e == null; + }; + }); + var Gr = xe((D0, Nu) => { + var Ko = cr(), Yo = TypeError; + Nu.exports = function(e) { + if (Ko(e)) + throw Yo("Can't call method on " + e); + return e; + }; + }); + var pr = xe((m0, wu) => { + var Qo = Tu(), Zo = Gr(); + wu.exports = function(e) { + return Qo(Zo(e)); + }; + }); + var Jr = xe((d0, _u) => { + var Ur = typeof document == "object" && document.all, el = typeof Ur > "u" && Ur !== void 0; + _u.exports = { all: Ur, IS_HTMLDDA: el }; + }); + var ot = xe((g0, Iu) => { + var Pu = Jr(), tl = Pu.all; + Iu.exports = Pu.IS_HTMLDDA ? function(e) { + return typeof e == "function" || e === tl; + } : function(e) { + return typeof e == "function"; + }; + }); + var St = xe((y0, Ou) => { + var ku = ot(), Lu = Jr(), rl = Lu.all; + Ou.exports = Lu.IS_HTMLDDA ? function(e) { + return typeof e == "object" ? e !== null : ku(e) || e === rl; + } : function(e) { + return typeof e == "object" ? e !== null : ku(e); + }; + }); + var Wt = xe((h0, ju) => { + var zr = pt(), nl = ot(), ul = function(e) { + return nl(e) ? e : void 0; + }; + ju.exports = function(e, r) { + return arguments.length < 2 ? ul(zr[e]) : zr[e] && zr[e][r]; + }; + }); + var Xr = xe((v0, qu) => { + var sl = mt(); + qu.exports = sl({}.isPrototypeOf); + }); + var Ru = xe((C0, Mu) => { + var il = Wt(); + Mu.exports = il("navigator", "userAgent") || ""; + }); + var Ju = xe((E0, Uu) => { + var Gu = pt(), Kr = Ru(), $u = Gu.process, Vu = Gu.Deno, Wu = $u && $u.versions || Vu && Vu.version, Hu = Wu && Wu.v8, dt, fr; + Hu && (dt = Hu.split("."), fr = dt[0] > 0 && dt[0] < 4 ? 1 : +(dt[0] + dt[1])); + !fr && Kr && (dt = Kr.match(/Edge\/(\d+)/), (!dt || dt[1] >= 74) && (dt = Kr.match(/Chrome\/(\d+)/), dt && (fr = +dt[1]))); + Uu.exports = fr; + }); + var Yr = xe((F0, Xu) => { + var zu = Ju(), al = Dt(); + Xu.exports = !!Object.getOwnPropertySymbols && !al(function() { + var e = Symbol(); + return !String(e) || !(Object(e) instanceof Symbol) || !Symbol.sham && zu && zu < 41; + }); + }); + var Qr = xe((A0, Ku) => { + var ol = Yr(); + Ku.exports = ol && !Symbol.sham && typeof Symbol.iterator == "symbol"; + }); + var Zr = xe((S0, Yu) => { + var ll = Wt(), cl = ot(), pl = Xr(), fl = Qr(), Dl = Object; + Yu.exports = fl ? function(e) { + return typeof e == "symbol"; + } : function(e) { + var r = ll("Symbol"); + return cl(r) && pl(r.prototype, Dl(e)); + }; + }); + var Dr = xe((x0, Qu) => { + var ml = String; + Qu.exports = function(e) { + try { + return ml(e); + } catch { + return "Object"; + } + }; + }); + var Ht = xe((b0, Zu) => { + var dl = ot(), gl = Dr(), yl = TypeError; + Zu.exports = function(e) { + if (dl(e)) + return e; + throw yl(gl(e) + " is not a function"); + }; + }); + var mr = xe((T0, es) => { + var hl = Ht(), vl = cr(); + es.exports = function(e, r) { + var t2 = e[r]; + return vl(t2) ? void 0 : hl(t2); + }; + }); + var rs = xe((B0, ts) => { + var en = At(), tn = ot(), rn = St(), Cl = TypeError; + ts.exports = function(e, r) { + var t2, s; + if (r === "string" && tn(t2 = e.toString) && !rn(s = en(t2, e)) || tn(t2 = e.valueOf) && !rn(s = en(t2, e)) || r !== "string" && tn(t2 = e.toString) && !rn(s = en(t2, e))) + return s; + throw Cl("Can't convert object to primitive value"); + }; + }); + var us = xe((N0, ns) => { + ns.exports = false; + }); + var dr = xe((w0, is) => { + var ss = pt(), El = Object.defineProperty; + is.exports = function(e, r) { + try { + El(ss, e, { value: r, configurable: true, writable: true }); + } catch { + ss[e] = r; + } + return r; + }; + }); + var gr = xe((_0, os) => { + var Fl = pt(), Al = dr(), as = "__core-js_shared__", Sl = Fl[as] || Al(as, {}); + os.exports = Sl; + }); + var nn = xe((P0, cs) => { + var xl = us(), ls = gr(); + (cs.exports = function(e, r) { + return ls[e] || (ls[e] = r !== void 0 ? r : {}); + })("versions", []).push({ version: "3.26.1", mode: xl ? "pure" : "global", copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE", source: "https://github.com/zloirock/core-js" }); + }); + var yr = xe((I0, ps) => { + var bl = Gr(), Tl = Object; + ps.exports = function(e) { + return Tl(bl(e)); + }; + }); + var Ct = xe((k0, fs) => { + var Bl = mt(), Nl = yr(), wl = Bl({}.hasOwnProperty); + fs.exports = Object.hasOwn || function(r, t2) { + return wl(Nl(r), t2); + }; + }); + var un = xe((L0, Ds) => { + var _l = mt(), Pl = 0, Il = Math.random(), kl = _l(1 .toString); + Ds.exports = function(e) { + return "Symbol(" + (e === void 0 ? "" : e) + ")_" + kl(++Pl + Il, 36); + }; + }); + var bt = xe((O0, hs) => { + var Ll = pt(), Ol = nn(), ms = Ct(), jl = un(), ds = Yr(), ys = Qr(), It = Ol("wks"), xt = Ll.Symbol, gs = xt && xt.for, ql = ys ? xt : xt && xt.withoutSetter || jl; + hs.exports = function(e) { + if (!ms(It, e) || !(ds || typeof It[e] == "string")) { + var r = "Symbol." + e; + ds && ms(xt, e) ? It[e] = xt[e] : ys && gs ? It[e] = gs(r) : It[e] = ql(r); + } + return It[e]; + }; + }); + var Fs = xe((j0, Es) => { + var Ml = At(), vs = St(), Cs = Zr(), Rl = mr(), $l = rs(), Vl = bt(), Wl = TypeError, Hl = Vl("toPrimitive"); + Es.exports = function(e, r) { + if (!vs(e) || Cs(e)) + return e; + var t2 = Rl(e, Hl), s; + if (t2) { + if (r === void 0 && (r = "default"), s = Ml(t2, e, r), !vs(s) || Cs(s)) + return s; + throw Wl("Can't convert object to primitive value"); + } + return r === void 0 && (r = "number"), $l(e, r); + }; + }); + var hr = xe((q0, As) => { + var Gl = Fs(), Ul = Zr(); + As.exports = function(e) { + var r = Gl(e, "string"); + return Ul(r) ? r : r + ""; + }; + }); + var bs = xe((M0, xs) => { + var Jl = pt(), Ss = St(), sn = Jl.document, zl = Ss(sn) && Ss(sn.createElement); + xs.exports = function(e) { + return zl ? sn.createElement(e) : {}; + }; + }); + var an = xe((R0, Ts) => { + var Xl = yt(), Kl = Dt(), Yl = bs(); + Ts.exports = !Xl && !Kl(function() { + return Object.defineProperty(Yl("div"), "a", { get: function() { + return 7; + } }).a != 7; + }); + }); + var on = xe((Ns) => { + var Ql = yt(), Zl = At(), ec = vu(), tc = lr(), rc = pr(), nc = hr(), uc = Ct(), sc = an(), Bs = Object.getOwnPropertyDescriptor; + Ns.f = Ql ? Bs : function(r, t2) { + if (r = rc(r), t2 = nc(t2), sc) + try { + return Bs(r, t2); + } catch { + } + if (uc(r, t2)) + return tc(!Zl(ec.f, r, t2), r[t2]); + }; + }); + var _s = xe((V0, ws) => { + var ic = yt(), ac = Dt(); + ws.exports = ic && ac(function() { + return Object.defineProperty(function() { + }, "prototype", { value: 42, writable: false }).prototype != 42; + }); + }); + var Tt = xe((W0, Ps) => { + var oc = St(), lc = String, cc = TypeError; + Ps.exports = function(e) { + if (oc(e)) + return e; + throw cc(lc(e) + " is not an object"); + }; + }); + var kt = xe((ks) => { + var pc = yt(), fc = an(), Dc = _s(), vr = Tt(), Is2 = hr(), mc = TypeError, ln = Object.defineProperty, dc = Object.getOwnPropertyDescriptor, cn = "enumerable", pn = "configurable", fn = "writable"; + ks.f = pc ? Dc ? function(r, t2, s) { + if (vr(r), t2 = Is2(t2), vr(s), typeof r == "function" && t2 === "prototype" && "value" in s && fn in s && !s[fn]) { + var a = dc(r, t2); + a && a[fn] && (r[t2] = s.value, s = { configurable: pn in s ? s[pn] : a[pn], enumerable: cn in s ? s[cn] : a[cn], writable: false }); + } + return ln(r, t2, s); + } : ln : function(r, t2, s) { + if (vr(r), t2 = Is2(t2), vr(s), fc) + try { + return ln(r, t2, s); + } catch { + } + if ("get" in s || "set" in s) + throw mc("Accessors not supported"); + return "value" in s && (r[t2] = s.value), r; + }; + }); + var Dn = xe((G0, Ls) => { + var gc = yt(), yc = kt(), hc = lr(); + Ls.exports = gc ? function(e, r, t2) { + return yc.f(e, r, hc(1, t2)); + } : function(e, r, t2) { + return e[r] = t2, e; + }; + }); + var qs = xe((U0, js) => { + var mn = yt(), vc = Ct(), Os = Function.prototype, Cc = mn && Object.getOwnPropertyDescriptor, dn = vc(Os, "name"), Ec = dn && function() { + }.name === "something", Fc = dn && (!mn || mn && Cc(Os, "name").configurable); + js.exports = { EXISTS: dn, PROPER: Ec, CONFIGURABLE: Fc }; + }); + var yn = xe((J0, Ms) => { + var Ac = mt(), Sc = ot(), gn = gr(), xc = Ac(Function.toString); + Sc(gn.inspectSource) || (gn.inspectSource = function(e) { + return xc(e); + }); + Ms.exports = gn.inspectSource; + }); + var Vs = xe((z0, $s) => { + var bc = pt(), Tc = ot(), Rs = bc.WeakMap; + $s.exports = Tc(Rs) && /native code/.test(String(Rs)); + }); + var Gs = xe((X0, Hs) => { + var Bc = nn(), Nc = un(), Ws = Bc("keys"); + Hs.exports = function(e) { + return Ws[e] || (Ws[e] = Nc(e)); + }; + }); + var hn = xe((K0, Us) => { + Us.exports = {}; + }); + var Ks = xe((Y0, Xs) => { + var wc = Vs(), zs = pt(), _c = St(), Pc = Dn(), vn = Ct(), Cn = gr(), Ic = Gs(), kc = hn(), Js = "Object already initialized", En = zs.TypeError, Lc = zs.WeakMap, Cr, Gt, Er, Oc = function(e) { + return Er(e) ? Gt(e) : Cr(e, {}); + }, jc = function(e) { + return function(r) { + var t2; + if (!_c(r) || (t2 = Gt(r)).type !== e) + throw En("Incompatible receiver, " + e + " required"); + return t2; + }; + }; + wc || Cn.state ? (gt = Cn.state || (Cn.state = new Lc()), gt.get = gt.get, gt.has = gt.has, gt.set = gt.set, Cr = function(e, r) { + if (gt.has(e)) + throw En(Js); + return r.facade = e, gt.set(e, r), r; + }, Gt = function(e) { + return gt.get(e) || {}; + }, Er = function(e) { + return gt.has(e); + }) : (Bt = Ic("state"), kc[Bt] = true, Cr = function(e, r) { + if (vn(e, Bt)) + throw En(Js); + return r.facade = e, Pc(e, Bt, r), r; + }, Gt = function(e) { + return vn(e, Bt) ? e[Bt] : {}; + }, Er = function(e) { + return vn(e, Bt); + }); + var gt, Bt; + Xs.exports = { set: Cr, get: Gt, has: Er, enforce: Oc, getterFor: jc }; + }); + var An = xe((Q0, Qs) => { + var qc = Dt(), Mc = ot(), Fr = Ct(), Fn = yt(), Rc = qs().CONFIGURABLE, $c = yn(), Ys = Ks(), Vc = Ys.enforce, Wc = Ys.get, Ar = Object.defineProperty, Hc = Fn && !qc(function() { + return Ar(function() { + }, "length", { value: 8 }).length !== 8; + }), Gc = String(String).split("String"), Uc = Qs.exports = function(e, r, t2) { + String(r).slice(0, 7) === "Symbol(" && (r = "[" + String(r).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), t2 && t2.getter && (r = "get " + r), t2 && t2.setter && (r = "set " + r), (!Fr(e, "name") || Rc && e.name !== r) && (Fn ? Ar(e, "name", { value: r, configurable: true }) : e.name = r), Hc && t2 && Fr(t2, "arity") && e.length !== t2.arity && Ar(e, "length", { value: t2.arity }); + try { + t2 && Fr(t2, "constructor") && t2.constructor ? Fn && Ar(e, "prototype", { writable: false }) : e.prototype && (e.prototype = void 0); + } catch { + } + var s = Vc(e); + return Fr(s, "source") || (s.source = Gc.join(typeof r == "string" ? r : "")), e; + }; + Function.prototype.toString = Uc(function() { + return Mc(this) && Wc(this).source || $c(this); + }, "toString"); + }); + var ei = xe((Z0, Zs) => { + var Jc = ot(), zc = kt(), Xc = An(), Kc = dr(); + Zs.exports = function(e, r, t2, s) { + s || (s = {}); + var a = s.enumerable, n = s.name !== void 0 ? s.name : r; + if (Jc(t2) && Xc(t2, n, s), s.global) + a ? e[r] = t2 : Kc(r, t2); + else { + try { + s.unsafe ? e[r] && (a = true) : delete e[r]; + } catch { + } + a ? e[r] = t2 : zc.f(e, r, { value: t2, enumerable: false, configurable: !s.nonConfigurable, writable: !s.nonWritable }); + } + return e; + }; + }); + var ri = xe((ey, ti) => { + var Yc = Math.ceil, Qc = Math.floor; + ti.exports = Math.trunc || function(r) { + var t2 = +r; + return (t2 > 0 ? Qc : Yc)(t2); + }; + }); + var Sr = xe((ty, ni) => { + var Zc = ri(); + ni.exports = function(e) { + var r = +e; + return r !== r || r === 0 ? 0 : Zc(r); + }; + }); + var si = xe((ry, ui) => { + var ep = Sr(), tp = Math.max, rp = Math.min; + ui.exports = function(e, r) { + var t2 = ep(e); + return t2 < 0 ? tp(t2 + r, 0) : rp(t2, r); + }; + }); + var ai = xe((ny, ii) => { + var np = Sr(), up = Math.min; + ii.exports = function(e) { + return e > 0 ? up(np(e), 9007199254740991) : 0; + }; + }); + var Lt = xe((uy, oi) => { + var sp = ai(); + oi.exports = function(e) { + return sp(e.length); + }; + }); + var pi = xe((sy, ci) => { + var ip = pr(), ap = si(), op = Lt(), li = function(e) { + return function(r, t2, s) { + var a = ip(r), n = op(a), u = ap(s, n), i; + if (e && t2 != t2) { + for (; n > u; ) + if (i = a[u++], i != i) + return true; + } else + for (; n > u; u++) + if ((e || u in a) && a[u] === t2) + return e || u || 0; + return !e && -1; + }; + }; + ci.exports = { includes: li(true), indexOf: li(false) }; + }); + var mi = xe((iy, Di) => { + var lp = mt(), Sn = Ct(), cp = pr(), pp = pi().indexOf, fp = hn(), fi = lp([].push); + Di.exports = function(e, r) { + var t2 = cp(e), s = 0, a = [], n; + for (n in t2) + !Sn(fp, n) && Sn(t2, n) && fi(a, n); + for (; r.length > s; ) + Sn(t2, n = r[s++]) && (~pp(a, n) || fi(a, n)); + return a; + }; + }); + var gi = xe((ay, di) => { + di.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"]; + }); + var hi = xe((yi) => { + var Dp = mi(), mp = gi(), dp = mp.concat("length", "prototype"); + yi.f = Object.getOwnPropertyNames || function(r) { + return Dp(r, dp); + }; + }); + var Ci = xe((vi) => { + vi.f = Object.getOwnPropertySymbols; + }); + var Fi = xe((cy, Ei) => { + var gp = Wt(), yp = mt(), hp = hi(), vp = Ci(), Cp = Tt(), Ep = yp([].concat); + Ei.exports = gp("Reflect", "ownKeys") || function(r) { + var t2 = hp.f(Cp(r)), s = vp.f; + return s ? Ep(t2, s(r)) : t2; + }; + }); + var xi = xe((py, Si) => { + var Ai = Ct(), Fp = Fi(), Ap = on(), Sp = kt(); + Si.exports = function(e, r, t2) { + for (var s = Fp(r), a = Sp.f, n = Ap.f, u = 0; u < s.length; u++) { + var i = s[u]; + !Ai(e, i) && !(t2 && Ai(t2, i)) && a(e, i, n(r, i)); + } + }; + }); + var Ti = xe((fy, bi) => { + var xp = Dt(), bp = ot(), Tp = /#|\.prototype\./, Ut = function(e, r) { + var t2 = Np[Bp(e)]; + return t2 == _p ? true : t2 == wp ? false : bp(r) ? xp(r) : !!r; + }, Bp = Ut.normalize = function(e) { + return String(e).replace(Tp, ".").toLowerCase(); + }, Np = Ut.data = {}, wp = Ut.NATIVE = "N", _p = Ut.POLYFILL = "P"; + bi.exports = Ut; + }); + var Jt = xe((Dy, Bi) => { + var xn = pt(), Pp = on().f, Ip = Dn(), kp = ei(), Lp = dr(), Op = xi(), jp = Ti(); + Bi.exports = function(e, r) { + var t2 = e.target, s = e.global, a = e.stat, n, u, i, l, p2, y; + if (s ? u = xn : a ? u = xn[t2] || Lp(t2, {}) : u = (xn[t2] || {}).prototype, u) + for (i in r) { + if (p2 = r[i], e.dontCallGetSet ? (y = Pp(u, i), l = y && y.value) : l = u[i], n = jp(s ? i : t2 + (a ? "." : "#") + i, e.forced), !n && l !== void 0) { + if (typeof p2 == typeof l) + continue; + Op(p2, l); + } + (e.sham || l && l.sham) && Ip(p2, "sham", true), kp(u, i, p2, e); + } + }; + }); + var bn = xe((my, Ni) => { + var qp = Vt(); + Ni.exports = Array.isArray || function(r) { + return qp(r) == "Array"; + }; + }); + var _i = xe((dy, wi) => { + var Mp = TypeError, Rp = 9007199254740991; + wi.exports = function(e) { + if (e > Rp) + throw Mp("Maximum allowed index exceeded"); + return e; + }; + }); + var Ii = xe((gy, Pi) => { + var $p = Vt(), Vp = mt(); + Pi.exports = function(e) { + if ($p(e) === "Function") + return Vp(e); + }; + }); + var Tn = xe((yy, Li) => { + var ki = Ii(), Wp = Ht(), Hp = ar(), Gp = ki(ki.bind); + Li.exports = function(e, r) { + return Wp(e), r === void 0 ? e : Hp ? Gp(e, r) : function() { + return e.apply(r, arguments); + }; + }; + }); + var Bn = xe((hy, ji) => { + "use strict"; + var Up = bn(), Jp = Lt(), zp = _i(), Xp = Tn(), Oi = function(e, r, t2, s, a, n, u, i) { + for (var l = a, p2 = 0, y = u ? Xp(u, i) : false, h, g; p2 < s; ) + p2 in t2 && (h = y ? y(t2[p2], p2, r) : t2[p2], n > 0 && Up(h) ? (g = Jp(h), l = Oi(e, r, h, g, l, n - 1) - 1) : (zp(l + 1), e[l] = h), l++), p2++; + return l; + }; + ji.exports = Oi; + }); + var Ri = xe((vy, Mi) => { + var Kp = bt(), Yp = Kp("toStringTag"), qi = {}; + qi[Yp] = "z"; + Mi.exports = String(qi) === "[object z]"; + }); + var Nn = xe((Cy, $i) => { + var Qp = Ri(), Zp = ot(), xr = Vt(), ef = bt(), tf = ef("toStringTag"), rf = Object, nf = xr(function() { + return arguments; + }()) == "Arguments", uf = function(e, r) { + try { + return e[r]; + } catch { + } + }; + $i.exports = Qp ? xr : function(e) { + var r, t2, s; + return e === void 0 ? "Undefined" : e === null ? "Null" : typeof (t2 = uf(r = rf(e), tf)) == "string" ? t2 : nf ? xr(r) : (s = xr(r)) == "Object" && Zp(r.callee) ? "Arguments" : s; + }; + }); + var Ji = xe((Ey, Ui) => { + var sf = mt(), af = Dt(), Vi = ot(), of = Nn(), lf = Wt(), cf = yn(), Wi = function() { + }, pf = [], Hi = lf("Reflect", "construct"), wn = /^\s*(?:class|function)\b/, ff = sf(wn.exec), Df = !wn.exec(Wi), zt = function(r) { + if (!Vi(r)) + return false; + try { + return Hi(Wi, pf, r), true; + } catch { + return false; + } + }, Gi = function(r) { + if (!Vi(r)) + return false; + switch (of(r)) { + case "AsyncFunction": + case "GeneratorFunction": + case "AsyncGeneratorFunction": + return false; + } + try { + return Df || !!ff(wn, cf(r)); + } catch { + return true; + } + }; + Gi.sham = true; + Ui.exports = !Hi || af(function() { + var e; + return zt(zt.call) || !zt(Object) || !zt(function() { + e = true; + }) || e; + }) ? Gi : zt; + }); + var Yi = xe((Fy, Ki) => { + var zi = bn(), mf = Ji(), df = St(), gf = bt(), yf = gf("species"), Xi = Array; + Ki.exports = function(e) { + var r; + return zi(e) && (r = e.constructor, mf(r) && (r === Xi || zi(r.prototype)) ? r = void 0 : df(r) && (r = r[yf], r === null && (r = void 0))), r === void 0 ? Xi : r; + }; + }); + var _n = xe((Ay, Qi) => { + var hf = Yi(); + Qi.exports = function(e, r) { + return new (hf(e))(r === 0 ? 0 : r); + }; + }); + var Zi = xe(() => { + "use strict"; + var vf = Jt(), Cf = Bn(), Ef = Ht(), Ff = yr(), Af = Lt(), Sf = _n(); + vf({ target: "Array", proto: true }, { flatMap: function(r) { + var t2 = Ff(this), s = Af(t2), a; + return Ef(r), a = Sf(t2, 0), a.length = Cf(a, t2, t2, s, 0, 1, r, arguments.length > 1 ? arguments[1] : void 0), a; + } }); + }); + var Pn = xe((by, ea) => { + ea.exports = {}; + }); + var ra = xe((Ty, ta) => { + var xf = bt(), bf = Pn(), Tf = xf("iterator"), Bf = Array.prototype; + ta.exports = function(e) { + return e !== void 0 && (bf.Array === e || Bf[Tf] === e); + }; + }); + var In = xe((By, ua) => { + var Nf = Nn(), na = mr(), wf = cr(), _f = Pn(), Pf = bt(), If = Pf("iterator"); + ua.exports = function(e) { + if (!wf(e)) + return na(e, If) || na(e, "@@iterator") || _f[Nf(e)]; + }; + }); + var ia = xe((Ny, sa) => { + var kf = At(), Lf = Ht(), Of = Tt(), jf = Dr(), qf = In(), Mf = TypeError; + sa.exports = function(e, r) { + var t2 = arguments.length < 2 ? qf(e) : r; + if (Lf(t2)) + return Of(kf(t2, e)); + throw Mf(jf(e) + " is not iterable"); + }; + }); + var la = xe((wy, oa) => { + var Rf = At(), aa = Tt(), $f = mr(); + oa.exports = function(e, r, t2) { + var s, a; + aa(e); + try { + if (s = $f(e, "return"), !s) { + if (r === "throw") + throw t2; + return t2; + } + s = Rf(s, e); + } catch (n) { + a = true, s = n; + } + if (r === "throw") + throw t2; + if (a) + throw s; + return aa(s), t2; + }; + }); + var ma = xe((_y, Da) => { + var Vf = Tn(), Wf = At(), Hf = Tt(), Gf = Dr(), Uf = ra(), Jf = Lt(), ca = Xr(), zf = ia(), Xf = In(), pa = la(), Kf = TypeError, br = function(e, r) { + this.stopped = e, this.result = r; + }, fa = br.prototype; + Da.exports = function(e, r, t2) { + var s = t2 && t2.that, a = !!(t2 && t2.AS_ENTRIES), n = !!(t2 && t2.IS_RECORD), u = !!(t2 && t2.IS_ITERATOR), i = !!(t2 && t2.INTERRUPTED), l = Vf(r, s), p2, y, h, g, c, f, F, _ = function(E) { + return p2 && pa(p2, "normal", E), new br(true, E); + }, w = function(E) { + return a ? (Hf(E), i ? l(E[0], E[1], _) : l(E[0], E[1])) : i ? l(E, _) : l(E); + }; + if (n) + p2 = e.iterator; + else if (u) + p2 = e; + else { + if (y = Xf(e), !y) + throw Kf(Gf(e) + " is not iterable"); + if (Uf(y)) { + for (h = 0, g = Jf(e); g > h; h++) + if (c = w(e[h]), c && ca(fa, c)) + return c; + return new br(false); + } + p2 = zf(e, y); + } + for (f = n ? e.next : p2.next; !(F = Wf(f, p2)).done; ) { + try { + c = w(F.value); + } catch (E) { + pa(p2, "throw", E); + } + if (typeof c == "object" && c && ca(fa, c)) + return c; + } + return new br(false); + }; + }); + var ga = xe((Py, da) => { + "use strict"; + var Yf = hr(), Qf = kt(), Zf = lr(); + da.exports = function(e, r, t2) { + var s = Yf(r); + s in e ? Qf.f(e, s, Zf(0, t2)) : e[s] = t2; + }; + }); + var ya = xe(() => { + var eD = Jt(), tD = ma(), rD = ga(); + eD({ target: "Object", stat: true }, { fromEntries: function(r) { + var t2 = {}; + return tD(r, function(s, a) { + rD(t2, s, a); + }, { AS_ENTRIES: true }), t2; + } }); + }); + var Ca = xe((Ly, va) => { + var ha = An(), nD = kt(); + va.exports = function(e, r, t2) { + return t2.get && ha(t2.get, r, { getter: true }), t2.set && ha(t2.set, r, { setter: true }), nD.f(e, r, t2); + }; + }); + var Fa = xe((Oy, Ea) => { + "use strict"; + var uD = Tt(); + Ea.exports = function() { + var e = uD(this), r = ""; + return e.hasIndices && (r += "d"), e.global && (r += "g"), e.ignoreCase && (r += "i"), e.multiline && (r += "m"), e.dotAll && (r += "s"), e.unicode && (r += "u"), e.unicodeSets && (r += "v"), e.sticky && (r += "y"), r; + }; + }); + var xa = xe(() => { + var sD = pt(), iD = yt(), aD = Ca(), oD = Fa(), lD = Dt(), Aa = sD.RegExp, Sa = Aa.prototype, cD = iD && lD(function() { + var e = true; + try { + Aa(".", "d"); + } catch { + e = false; + } + var r = {}, t2 = "", s = e ? "dgimsy" : "gimsy", a = function(l, p2) { + Object.defineProperty(r, l, { get: function() { + return t2 += p2, true; + } }); + }, n = { dotAll: "s", global: "g", ignoreCase: "i", multiline: "m", sticky: "y" }; + e && (n.hasIndices = "d"); + for (var u in n) + a(u, n[u]); + var i = Object.getOwnPropertyDescriptor(Sa, "flags").get.call(r); + return i !== s || t2 !== s; + }); + cD && aD(Sa, "flags", { configurable: true, get: oD }); + }); + var ba = xe(() => { + var pD = Jt(), kn = pt(); + pD({ global: true, forced: kn.globalThis !== kn }, { globalThis: kn }); + }); + var Ta = xe(() => { + ba(); + }); + var Ba = xe(() => { + "use strict"; + var fD = Jt(), DD = Bn(), mD = yr(), dD = Lt(), gD = Sr(), yD = _n(); + fD({ target: "Array", proto: true }, { flat: function() { + var r = arguments.length ? arguments[0] : void 0, t2 = mD(this), s = dD(t2), a = yD(t2, 0); + return a.length = DD(a, t2, t2, s, 0, r === void 0 ? 1 : gD(r)), a; + } }); + }); + var e0 = xe((Uy, jo) => { + var hD = ["cliName", "cliCategory", "cliDescription"], vD = ["_"], CD = ["languageId"]; + function Hn(e, r) { + if (e == null) + return {}; + var t2 = ED(e, r), s, a; + if (Object.getOwnPropertySymbols) { + var n = Object.getOwnPropertySymbols(e); + for (a = 0; a < n.length; a++) + s = n[a], !(r.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(e, s) && (t2[s] = e[s]); + } + return t2; + } + function ED(e, r) { + if (e == null) + return {}; + var t2 = {}, s = Object.keys(e), a, n; + for (n = 0; n < s.length; n++) + a = s[n], !(r.indexOf(a) >= 0) && (t2[a] = e[a]); + return t2; + } + Zi(); + ya(); + xa(); + Ta(); + Ba(); + var FD = Object.create, _r = Object.defineProperty, AD = Object.getOwnPropertyDescriptor, Gn = Object.getOwnPropertyNames, SD = Object.getPrototypeOf, xD = Object.prototype.hasOwnProperty, ht = (e, r) => function() { + return e && (r = (0, e[Gn(e)[0]])(e = 0)), r; + }, te = (e, r) => function() { + return r || (0, e[Gn(e)[0]])((r = { exports: {} }).exports, r), r.exports; + }, Kt = (e, r) => { + for (var t2 in r) + _r(e, t2, { get: r[t2], enumerable: true }); + }, Pa = (e, r, t2, s) => { + if (r && typeof r == "object" || typeof r == "function") + for (let a of Gn(r)) + !xD.call(e, a) && a !== t2 && _r(e, a, { get: () => r[a], enumerable: !(s = AD(r, a)) || s.enumerable }); + return e; + }, bD = (e, r, t2) => (t2 = e != null ? FD(SD(e)) : {}, Pa(r || !e || !e.__esModule ? _r(t2, "default", { value: e, enumerable: true }) : t2, e)), ft = (e) => Pa(_r({}, "__esModule", { value: true }), e), wt, ne = ht({ ""() { + wt = { env: {}, argv: [] }; + } }), Ia = te({ "package.json"(e, r) { + r.exports = { version: "2.8.8" }; + } }), TD = te({ "node_modules/diff/lib/diff/base.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.default = r; + function r() { + } + r.prototype = { diff: function(n, u) { + var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = i.callback; + typeof i == "function" && (l = i, i = {}), this.options = i; + var p2 = this; + function y(N) { + return l ? (setTimeout(function() { + l(void 0, N); + }, 0), true) : N; + } + n = this.castInput(n), u = this.castInput(u), n = this.removeEmpty(this.tokenize(n)), u = this.removeEmpty(this.tokenize(u)); + var h = u.length, g = n.length, c = 1, f = h + g, F = [{ newPos: -1, components: [] }], _ = this.extractCommon(F[0], u, n, 0); + if (F[0].newPos + 1 >= h && _ + 1 >= g) + return y([{ value: this.join(u), count: u.length }]); + function w() { + for (var N = -1 * c; N <= c; N += 2) { + var x = void 0, I = F[N - 1], P = F[N + 1], $ = (P ? P.newPos : 0) - N; + I && (F[N - 1] = void 0); + var D = I && I.newPos + 1 < h, T = P && 0 <= $ && $ < g; + if (!D && !T) { + F[N] = void 0; + continue; + } + if (!D || T && I.newPos < P.newPos ? (x = s(P), p2.pushComponent(x.components, void 0, true)) : (x = I, x.newPos++, p2.pushComponent(x.components, true, void 0)), $ = p2.extractCommon(x, u, n, N), x.newPos + 1 >= h && $ + 1 >= g) + return y(t2(p2, x.components, u, n, p2.useLongestToken)); + F[N] = x; + } + c++; + } + if (l) + (function N() { + setTimeout(function() { + if (c > f) + return l(); + w() || N(); + }, 0); + })(); + else + for (; c <= f; ) { + var E = w(); + if (E) + return E; + } + }, pushComponent: function(n, u, i) { + var l = n[n.length - 1]; + l && l.added === u && l.removed === i ? n[n.length - 1] = { count: l.count + 1, added: u, removed: i } : n.push({ count: 1, added: u, removed: i }); + }, extractCommon: function(n, u, i, l) { + for (var p2 = u.length, y = i.length, h = n.newPos, g = h - l, c = 0; h + 1 < p2 && g + 1 < y && this.equals(u[h + 1], i[g + 1]); ) + h++, g++, c++; + return c && n.components.push({ count: c }), n.newPos = h, g; + }, equals: function(n, u) { + return this.options.comparator ? this.options.comparator(n, u) : n === u || this.options.ignoreCase && n.toLowerCase() === u.toLowerCase(); + }, removeEmpty: function(n) { + for (var u = [], i = 0; i < n.length; i++) + n[i] && u.push(n[i]); + return u; + }, castInput: function(n) { + return n; + }, tokenize: function(n) { + return n.split(""); + }, join: function(n) { + return n.join(""); + } }; + function t2(a, n, u, i, l) { + for (var p2 = 0, y = n.length, h = 0, g = 0; p2 < y; p2++) { + var c = n[p2]; + if (c.removed) { + if (c.value = a.join(i.slice(g, g + c.count)), g += c.count, p2 && n[p2 - 1].added) { + var F = n[p2 - 1]; + n[p2 - 1] = n[p2], n[p2] = F; + } + } else { + if (!c.added && l) { + var f = u.slice(h, h + c.count); + f = f.map(function(w, E) { + var N = i[g + E]; + return N.length > w.length ? N : w; + }), c.value = a.join(f); + } else + c.value = a.join(u.slice(h, h + c.count)); + h += c.count, c.added || (g += c.count); + } + } + var _ = n[y - 1]; + return y > 1 && typeof _.value == "string" && (_.added || _.removed) && a.equals("", _.value) && (n[y - 2].value += _.value, n.pop()), n; + } + function s(a) { + return { newPos: a.newPos, components: a.components.slice(0) }; + } + } }), BD = te({ "node_modules/diff/lib/diff/array.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.diffArrays = a, e.arrayDiff = void 0; + var r = t2(TD()); + function t2(n) { + return n && n.__esModule ? n : { default: n }; + } + var s = new r.default(); + e.arrayDiff = s, s.tokenize = function(n) { + return n.slice(); + }, s.join = s.removeEmpty = function(n) { + return n; + }; + function a(n, u, i) { + return s.diff(n, u, i); + } + } }), Un = te({ "src/document/doc-builders.js"(e, r) { + "use strict"; + ne(); + function t2(C) { + return { type: "concat", parts: C }; + } + function s(C) { + return { type: "indent", contents: C }; + } + function a(C, o) { + return { type: "align", contents: o, n: C }; + } + function n(C) { + let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + return { type: "group", id: o.id, contents: C, break: Boolean(o.shouldBreak), expandedStates: o.expandedStates }; + } + function u(C) { + return a(Number.NEGATIVE_INFINITY, C); + } + function i(C) { + return a({ type: "root" }, C); + } + function l(C) { + return a(-1, C); + } + function p2(C, o) { + return n(C[0], Object.assign(Object.assign({}, o), {}, { expandedStates: C })); + } + function y(C) { + return { type: "fill", parts: C }; + } + function h(C, o) { + let d = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + return { type: "if-break", breakContents: C, flatContents: o, groupId: d.groupId }; + } + function g(C, o) { + return { type: "indent-if-break", contents: C, groupId: o.groupId, negate: o.negate }; + } + function c(C) { + return { type: "line-suffix", contents: C }; + } + var f = { type: "line-suffix-boundary" }, F = { type: "break-parent" }, _ = { type: "trim" }, w = { type: "line", hard: true }, E = { type: "line", hard: true, literal: true }, N = { type: "line" }, x = { type: "line", soft: true }, I = t2([w, F]), P = t2([E, F]), $ = { type: "cursor", placeholder: Symbol("cursor") }; + function D(C, o) { + let d = []; + for (let v = 0; v < o.length; v++) + v !== 0 && d.push(C), d.push(o[v]); + return t2(d); + } + function T(C, o, d) { + let v = C; + if (o > 0) { + for (let S = 0; S < Math.floor(o / d); ++S) + v = s(v); + v = a(o % d, v), v = a(Number.NEGATIVE_INFINITY, v); + } + return v; + } + function m(C, o) { + return { type: "label", label: C, contents: o }; + } + r.exports = { concat: t2, join: D, line: N, softline: x, hardline: I, literalline: P, group: n, conditionalGroup: p2, fill: y, lineSuffix: c, lineSuffixBoundary: f, cursor: $, breakParent: F, ifBreak: h, trim: _, indent: s, indentIfBreak: g, align: a, addAlignmentToDoc: T, markAsRoot: i, dedentToRoot: u, dedent: l, hardlineWithoutBreakParent: w, literallineWithoutBreakParent: E, label: m }; + } }), Jn = te({ "src/common/end-of-line.js"(e, r) { + "use strict"; + ne(); + function t2(u) { + let i = u.indexOf("\r"); + return i >= 0 ? u.charAt(i + 1) === ` +` ? "crlf" : "cr" : "lf"; + } + function s(u) { + switch (u) { + case "cr": + return "\r"; + case "crlf": + return `\r +`; + default: + return ` +`; + } + } + function a(u, i) { + let l; + switch (i) { + case ` +`: + l = /\n/g; + break; + case "\r": + l = /\r/g; + break; + case `\r +`: + l = /\r\n/g; + break; + default: + throw new Error(`Unexpected "eol" ${JSON.stringify(i)}.`); + } + let p2 = u.match(l); + return p2 ? p2.length : 0; + } + function n(u) { + return u.replace(/\r\n?/g, ` +`); + } + r.exports = { guessEndOfLine: t2, convertEndOfLineToChars: s, countEndOfLineChars: a, normalizeEndOfLine: n }; + } }), lt = te({ "src/utils/get-last.js"(e, r) { + "use strict"; + ne(); + var t2 = (s) => s[s.length - 1]; + r.exports = t2; + } }); + function ND() { + let { onlyFirst: e = false } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); + return new RegExp(r, e ? void 0 : "g"); + } + var wD = ht({ "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() { + ne(); + } }); + function _D(e) { + if (typeof e != "string") + throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``); + return e.replace(ND(), ""); + } + var PD = ht({ "node_modules/strip-ansi/index.js"() { + ne(), wD(); + } }); + function ID(e) { + return Number.isInteger(e) ? e >= 4352 && (e <= 4447 || e === 9001 || e === 9002 || 11904 <= e && e <= 12871 && e !== 12351 || 12880 <= e && e <= 19903 || 19968 <= e && e <= 42182 || 43360 <= e && e <= 43388 || 44032 <= e && e <= 55203 || 63744 <= e && e <= 64255 || 65040 <= e && e <= 65049 || 65072 <= e && e <= 65131 || 65281 <= e && e <= 65376 || 65504 <= e && e <= 65510 || 110592 <= e && e <= 110593 || 127488 <= e && e <= 127569 || 131072 <= e && e <= 262141) : false; + } + var kD = ht({ "node_modules/is-fullwidth-code-point/index.js"() { + ne(); + } }), LD = te({ "node_modules/emoji-regex/index.js"(e, r) { + "use strict"; + ne(), r.exports = function() { + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; + }; + } }), ka = {}; + Kt(ka, { default: () => OD }); + function OD(e) { + if (typeof e != "string" || e.length === 0 || (e = _D(e), e.length === 0)) + return 0; + e = e.replace((0, La.default)(), " "); + let r = 0; + for (let t2 = 0; t2 < e.length; t2++) { + let s = e.codePointAt(t2); + s <= 31 || s >= 127 && s <= 159 || s >= 768 && s <= 879 || (s > 65535 && t2++, r += ID(s) ? 2 : 1); + } + return r; + } + var La, jD = ht({ "node_modules/string-width/index.js"() { + ne(), PD(), kD(), La = bD(LD()); + } }), Oa = te({ "src/utils/get-string-width.js"(e, r) { + "use strict"; + ne(); + var t2 = (jD(), ft(ka)).default, s = /[^\x20-\x7F]/; + function a(n) { + return n ? s.test(n) ? t2(n) : n.length : 0; + } + r.exports = a; + } }), Yt = te({ "src/document/doc-utils.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { literalline: s, join: a } = Un(), n = (o) => Array.isArray(o) || o && o.type === "concat", u = (o) => { + if (Array.isArray(o)) + return o; + if (o.type !== "concat" && o.type !== "fill") + throw new Error("Expect doc type to be `concat` or `fill`."); + return o.parts; + }, i = {}; + function l(o, d, v, S) { + let b = [o]; + for (; b.length > 0; ) { + let B = b.pop(); + if (B === i) { + v(b.pop()); + continue; + } + if (v && b.push(B, i), !d || d(B) !== false) + if (n(B) || B.type === "fill") { + let k = u(B); + for (let M = k.length, R = M - 1; R >= 0; --R) + b.push(k[R]); + } else if (B.type === "if-break") + B.flatContents && b.push(B.flatContents), B.breakContents && b.push(B.breakContents); + else if (B.type === "group" && B.expandedStates) + if (S) + for (let k = B.expandedStates.length, M = k - 1; M >= 0; --M) + b.push(B.expandedStates[M]); + else + b.push(B.contents); + else + B.contents && b.push(B.contents); + } + } + function p2(o, d) { + let v = /* @__PURE__ */ new Map(); + return S(o); + function S(B) { + if (v.has(B)) + return v.get(B); + let k = b(B); + return v.set(B, k), k; + } + function b(B) { + if (Array.isArray(B)) + return d(B.map(S)); + if (B.type === "concat" || B.type === "fill") { + let k = B.parts.map(S); + return d(Object.assign(Object.assign({}, B), {}, { parts: k })); + } + if (B.type === "if-break") { + let k = B.breakContents && S(B.breakContents), M = B.flatContents && S(B.flatContents); + return d(Object.assign(Object.assign({}, B), {}, { breakContents: k, flatContents: M })); + } + if (B.type === "group" && B.expandedStates) { + let k = B.expandedStates.map(S), M = k[0]; + return d(Object.assign(Object.assign({}, B), {}, { contents: M, expandedStates: k })); + } + if (B.contents) { + let k = S(B.contents); + return d(Object.assign(Object.assign({}, B), {}, { contents: k })); + } + return d(B); + } + } + function y(o, d, v) { + let S = v, b = false; + function B(k) { + let M = d(k); + if (M !== void 0 && (b = true, S = M), b) + return false; + } + return l(o, B), S; + } + function h(o) { + if (o.type === "group" && o.break || o.type === "line" && o.hard || o.type === "break-parent") + return true; + } + function g(o) { + return y(o, h, false); + } + function c(o) { + if (o.length > 0) { + let d = t2(o); + !d.expandedStates && !d.break && (d.break = "propagated"); + } + return null; + } + function f(o) { + let d = /* @__PURE__ */ new Set(), v = []; + function S(B) { + if (B.type === "break-parent" && c(v), B.type === "group") { + if (v.push(B), d.has(B)) + return false; + d.add(B); + } + } + function b(B) { + B.type === "group" && v.pop().break && c(v); + } + l(o, S, b, true); + } + function F(o) { + return o.type === "line" && !o.hard ? o.soft ? "" : " " : o.type === "if-break" ? o.flatContents || "" : o; + } + function _(o) { + return p2(o, F); + } + var w = (o, d) => o && o.type === "line" && o.hard && d && d.type === "break-parent"; + function E(o) { + if (!o) + return o; + if (n(o) || o.type === "fill") { + let d = u(o); + for (; d.length > 1 && w(...d.slice(-2)); ) + d.length -= 2; + if (d.length > 0) { + let v = E(t2(d)); + d[d.length - 1] = v; + } + return Array.isArray(o) ? d : Object.assign(Object.assign({}, o), {}, { parts: d }); + } + switch (o.type) { + case "align": + case "indent": + case "indent-if-break": + case "group": + case "line-suffix": + case "label": { + let d = E(o.contents); + return Object.assign(Object.assign({}, o), {}, { contents: d }); + } + case "if-break": { + let d = E(o.breakContents), v = E(o.flatContents); + return Object.assign(Object.assign({}, o), {}, { breakContents: d, flatContents: v }); + } + } + return o; + } + function N(o) { + return E(I(o)); + } + function x(o) { + switch (o.type) { + case "fill": + if (o.parts.every((v) => v === "")) + return ""; + break; + case "group": + if (!o.contents && !o.id && !o.break && !o.expandedStates) + return ""; + if (o.contents.type === "group" && o.contents.id === o.id && o.contents.break === o.break && o.contents.expandedStates === o.expandedStates) + return o.contents; + break; + case "align": + case "indent": + case "indent-if-break": + case "line-suffix": + if (!o.contents) + return ""; + break; + case "if-break": + if (!o.flatContents && !o.breakContents) + return ""; + break; + } + if (!n(o)) + return o; + let d = []; + for (let v of u(o)) { + if (!v) + continue; + let [S, ...b] = n(v) ? u(v) : [v]; + typeof S == "string" && typeof t2(d) == "string" ? d[d.length - 1] += S : d.push(S), d.push(...b); + } + return d.length === 0 ? "" : d.length === 1 ? d[0] : Array.isArray(o) ? d : Object.assign(Object.assign({}, o), {}, { parts: d }); + } + function I(o) { + return p2(o, (d) => x(d)); + } + function P(o) { + let d = [], v = o.filter(Boolean); + for (; v.length > 0; ) { + let S = v.shift(); + if (S) { + if (n(S)) { + v.unshift(...u(S)); + continue; + } + if (d.length > 0 && typeof t2(d) == "string" && typeof S == "string") { + d[d.length - 1] += S; + continue; + } + d.push(S); + } + } + return d; + } + function $(o) { + return p2(o, (d) => Array.isArray(d) ? P(d) : d.parts ? Object.assign(Object.assign({}, d), {}, { parts: P(d.parts) }) : d); + } + function D(o) { + return p2(o, (d) => typeof d == "string" && d.includes(` +`) ? T(d) : d); + } + function T(o) { + let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : s; + return a(d, o.split(` +`)).parts; + } + function m(o) { + if (o.type === "line") + return true; + } + function C(o) { + return y(o, m, false); + } + r.exports = { isConcat: n, getDocParts: u, willBreak: g, traverseDoc: l, findInDoc: y, mapDoc: p2, propagateBreaks: f, removeLines: _, stripTrailingHardline: N, normalizeParts: P, normalizeDoc: $, cleanDoc: I, replaceTextEndOfLine: T, replaceEndOfLine: D, canBreak: C }; + } }), qD = te({ "src/document/doc-printer.js"(e, r) { + "use strict"; + ne(); + var { convertEndOfLineToChars: t2 } = Jn(), s = lt(), a = Oa(), { fill: n, cursor: u, indent: i } = Un(), { isConcat: l, getDocParts: p2 } = Yt(), y, h = 1, g = 2; + function c() { + return { value: "", length: 0, queue: [] }; + } + function f(x, I) { + return _(x, { type: "indent" }, I); + } + function F(x, I, P) { + return I === Number.NEGATIVE_INFINITY ? x.root || c() : I < 0 ? _(x, { type: "dedent" }, P) : I ? I.type === "root" ? Object.assign(Object.assign({}, x), {}, { root: x }) : _(x, { type: typeof I == "string" ? "stringAlign" : "numberAlign", n: I }, P) : x; + } + function _(x, I, P) { + let $ = I.type === "dedent" ? x.queue.slice(0, -1) : [...x.queue, I], D = "", T = 0, m = 0, C = 0; + for (let k of $) + switch (k.type) { + case "indent": + v(), P.useTabs ? o(1) : d(P.tabWidth); + break; + case "stringAlign": + v(), D += k.n, T += k.n.length; + break; + case "numberAlign": + m += 1, C += k.n; + break; + default: + throw new Error(`Unexpected type '${k.type}'`); + } + return b(), Object.assign(Object.assign({}, x), {}, { value: D, length: T, queue: $ }); + function o(k) { + D += " ".repeat(k), T += P.tabWidth * k; + } + function d(k) { + D += " ".repeat(k), T += k; + } + function v() { + P.useTabs ? S() : b(); + } + function S() { + m > 0 && o(m), B(); + } + function b() { + C > 0 && d(C), B(); + } + function B() { + m = 0, C = 0; + } + } + function w(x) { + if (x.length === 0) + return 0; + let I = 0; + for (; x.length > 0 && typeof s(x) == "string" && /^[\t ]*$/.test(s(x)); ) + I += x.pop().length; + if (x.length > 0 && typeof s(x) == "string") { + let P = s(x).replace(/[\t ]*$/, ""); + I += s(x).length - P.length, x[x.length - 1] = P; + } + return I; + } + function E(x, I, P, $, D) { + let T = I.length, m = [x], C = []; + for (; P >= 0; ) { + if (m.length === 0) { + if (T === 0) + return true; + m.push(I[--T]); + continue; + } + let { mode: o, doc: d } = m.pop(); + if (typeof d == "string") + C.push(d), P -= a(d); + else if (l(d) || d.type === "fill") { + let v = p2(d); + for (let S = v.length - 1; S >= 0; S--) + m.push({ mode: o, doc: v[S] }); + } else + switch (d.type) { + case "indent": + case "align": + case "indent-if-break": + case "label": + m.push({ mode: o, doc: d.contents }); + break; + case "trim": + P += w(C); + break; + case "group": { + if (D && d.break) + return false; + let v = d.break ? h : o, S = d.expandedStates && v === h ? s(d.expandedStates) : d.contents; + m.push({ mode: v, doc: S }); + break; + } + case "if-break": { + let S = (d.groupId ? y[d.groupId] || g : o) === h ? d.breakContents : d.flatContents; + S && m.push({ mode: o, doc: S }); + break; + } + case "line": + if (o === h || d.hard) + return true; + d.soft || (C.push(" "), P--); + break; + case "line-suffix": + $ = true; + break; + case "line-suffix-boundary": + if ($) + return false; + break; + } + } + return false; + } + function N(x, I) { + y = {}; + let P = I.printWidth, $ = t2(I.endOfLine), D = 0, T = [{ ind: c(), mode: h, doc: x }], m = [], C = false, o = []; + for (; T.length > 0; ) { + let { ind: v, mode: S, doc: b } = T.pop(); + if (typeof b == "string") { + let B = $ !== ` +` ? b.replace(/\n/g, $) : b; + m.push(B), D += a(B); + } else if (l(b)) { + let B = p2(b); + for (let k = B.length - 1; k >= 0; k--) + T.push({ ind: v, mode: S, doc: B[k] }); + } else + switch (b.type) { + case "cursor": + m.push(u.placeholder); + break; + case "indent": + T.push({ ind: f(v, I), mode: S, doc: b.contents }); + break; + case "align": + T.push({ ind: F(v, b.n, I), mode: S, doc: b.contents }); + break; + case "trim": + D -= w(m); + break; + case "group": + switch (S) { + case g: + if (!C) { + T.push({ ind: v, mode: b.break ? h : g, doc: b.contents }); + break; + } + case h: { + C = false; + let B = { ind: v, mode: g, doc: b.contents }, k = P - D, M = o.length > 0; + if (!b.break && E(B, T, k, M)) + T.push(B); + else if (b.expandedStates) { + let R = s(b.expandedStates); + if (b.break) { + T.push({ ind: v, mode: h, doc: R }); + break; + } else + for (let q = 1; q < b.expandedStates.length + 1; q++) + if (q >= b.expandedStates.length) { + T.push({ ind: v, mode: h, doc: R }); + break; + } else { + let J = b.expandedStates[q], L = { ind: v, mode: g, doc: J }; + if (E(L, T, k, M)) { + T.push(L); + break; + } + } + } else + T.push({ ind: v, mode: h, doc: b.contents }); + break; + } + } + b.id && (y[b.id] = s(T).mode); + break; + case "fill": { + let B = P - D, { parts: k } = b; + if (k.length === 0) + break; + let [M, R] = k, q = { ind: v, mode: g, doc: M }, J = { ind: v, mode: h, doc: M }, L = E(q, [], B, o.length > 0, true); + if (k.length === 1) { + L ? T.push(q) : T.push(J); + break; + } + let Q = { ind: v, mode: g, doc: R }, V = { ind: v, mode: h, doc: R }; + if (k.length === 2) { + L ? T.push(Q, q) : T.push(V, J); + break; + } + k.splice(0, 2); + let j = { ind: v, mode: S, doc: n(k) }, Y = k[0]; + E({ ind: v, mode: g, doc: [M, R, Y] }, [], B, o.length > 0, true) ? T.push(j, Q, q) : L ? T.push(j, V, q) : T.push(j, V, J); + break; + } + case "if-break": + case "indent-if-break": { + let B = b.groupId ? y[b.groupId] : S; + if (B === h) { + let k = b.type === "if-break" ? b.breakContents : b.negate ? b.contents : i(b.contents); + k && T.push({ ind: v, mode: S, doc: k }); + } + if (B === g) { + let k = b.type === "if-break" ? b.flatContents : b.negate ? i(b.contents) : b.contents; + k && T.push({ ind: v, mode: S, doc: k }); + } + break; + } + case "line-suffix": + o.push({ ind: v, mode: S, doc: b.contents }); + break; + case "line-suffix-boundary": + o.length > 0 && T.push({ ind: v, mode: S, doc: { type: "line", hard: true } }); + break; + case "line": + switch (S) { + case g: + if (b.hard) + C = true; + else { + b.soft || (m.push(" "), D += 1); + break; + } + case h: + if (o.length > 0) { + T.push({ ind: v, mode: S, doc: b }, ...o.reverse()), o.length = 0; + break; + } + b.literal ? v.root ? (m.push($, v.root.value), D = v.root.length) : (m.push($), D = 0) : (D -= w(m), m.push($ + v.value), D = v.length); + break; + } + break; + case "label": + T.push({ ind: v, mode: S, doc: b.contents }); + break; + default: + } + T.length === 0 && o.length > 0 && (T.push(...o.reverse()), o.length = 0); + } + let d = m.indexOf(u.placeholder); + if (d !== -1) { + let v = m.indexOf(u.placeholder, d + 1), S = m.slice(0, d).join(""), b = m.slice(d + 1, v).join(""), B = m.slice(v + 1).join(""); + return { formatted: S + b + B, cursorNodeStart: S.length, cursorNodeText: b }; + } + return { formatted: m.join("") }; + } + r.exports = { printDocToString: N }; + } }), MD = te({ "src/document/doc-debug.js"(e, r) { + "use strict"; + ne(); + var { isConcat: t2, getDocParts: s } = Yt(); + function a(u) { + if (!u) + return ""; + if (t2(u)) { + let i = []; + for (let l of s(u)) + if (t2(l)) + i.push(...a(l).parts); + else { + let p2 = a(l); + p2 !== "" && i.push(p2); + } + return { type: "concat", parts: i }; + } + return u.type === "if-break" ? Object.assign(Object.assign({}, u), {}, { breakContents: a(u.breakContents), flatContents: a(u.flatContents) }) : u.type === "group" ? Object.assign(Object.assign({}, u), {}, { contents: a(u.contents), expandedStates: u.expandedStates && u.expandedStates.map(a) }) : u.type === "fill" ? { type: "fill", parts: u.parts.map(a) } : u.contents ? Object.assign(Object.assign({}, u), {}, { contents: a(u.contents) }) : u; + } + function n(u) { + let i = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ new Set(); + return p2(a(u)); + function p2(h, g, c) { + if (typeof h == "string") + return JSON.stringify(h); + if (t2(h)) { + let f = s(h).map(p2).filter(Boolean); + return f.length === 1 ? f[0] : `[${f.join(", ")}]`; + } + if (h.type === "line") { + let f = Array.isArray(c) && c[g + 1] && c[g + 1].type === "break-parent"; + return h.literal ? f ? "literalline" : "literallineWithoutBreakParent" : h.hard ? f ? "hardline" : "hardlineWithoutBreakParent" : h.soft ? "softline" : "line"; + } + if (h.type === "break-parent") + return Array.isArray(c) && c[g - 1] && c[g - 1].type === "line" && c[g - 1].hard ? void 0 : "breakParent"; + if (h.type === "trim") + return "trim"; + if (h.type === "indent") + return "indent(" + p2(h.contents) + ")"; + if (h.type === "align") + return h.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + p2(h.contents) + ")" : h.n < 0 ? "dedent(" + p2(h.contents) + ")" : h.n.type === "root" ? "markAsRoot(" + p2(h.contents) + ")" : "align(" + JSON.stringify(h.n) + ", " + p2(h.contents) + ")"; + if (h.type === "if-break") + return "ifBreak(" + p2(h.breakContents) + (h.flatContents ? ", " + p2(h.flatContents) : "") + (h.groupId ? (h.flatContents ? "" : ', ""') + `, { groupId: ${y(h.groupId)} }` : "") + ")"; + if (h.type === "indent-if-break") { + let f = []; + h.negate && f.push("negate: true"), h.groupId && f.push(`groupId: ${y(h.groupId)}`); + let F = f.length > 0 ? `, { ${f.join(", ")} }` : ""; + return `indentIfBreak(${p2(h.contents)}${F})`; + } + if (h.type === "group") { + let f = []; + h.break && h.break !== "propagated" && f.push("shouldBreak: true"), h.id && f.push(`id: ${y(h.id)}`); + let F = f.length > 0 ? `, { ${f.join(", ")} }` : ""; + return h.expandedStates ? `conditionalGroup([${h.expandedStates.map((_) => p2(_)).join(",")}]${F})` : `group(${p2(h.contents)}${F})`; + } + if (h.type === "fill") + return `fill([${h.parts.map((f) => p2(f)).join(", ")}])`; + if (h.type === "line-suffix") + return "lineSuffix(" + p2(h.contents) + ")"; + if (h.type === "line-suffix-boundary") + return "lineSuffixBoundary"; + if (h.type === "label") + return `label(${JSON.stringify(h.label)}, ${p2(h.contents)})`; + throw new Error("Unknown doc type " + h.type); + } + function y(h) { + if (typeof h != "symbol") + return JSON.stringify(String(h)); + if (h in i) + return i[h]; + let g = String(h).slice(7, -1) || "symbol"; + for (let c = 0; ; c++) { + let f = g + (c > 0 ? ` #${c}` : ""); + if (!l.has(f)) + return l.add(f), i[h] = `Symbol.for(${JSON.stringify(f)})`; + } + } + } + r.exports = { printDocToDebug: n }; + } }), qe = te({ "src/document/index.js"(e, r) { + "use strict"; + ne(), r.exports = { builders: Un(), printer: qD(), utils: Yt(), debug: MD() }; + } }), ja = {}; + Kt(ja, { default: () => RD }); + function RD(e) { + if (typeof e != "string") + throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + var $D = ht({ "node_modules/escape-string-regexp/index.js"() { + ne(); + } }), qa = te({ "node_modules/semver/internal/debug.js"(e, r) { + ne(); + var t2 = typeof wt == "object" && wt.env && wt.env.NODE_DEBUG && /\bsemver\b/i.test(wt.env.NODE_DEBUG) ? function() { + for (var s = arguments.length, a = new Array(s), n = 0; n < s; n++) + a[n] = arguments[n]; + return console.error("SEMVER", ...a); + } : () => { + }; + r.exports = t2; + } }), Ma = te({ "node_modules/semver/internal/constants.js"(e, r) { + ne(); + var t2 = "2.0.0", s = 256, a = Number.MAX_SAFE_INTEGER || 9007199254740991, n = 16; + r.exports = { SEMVER_SPEC_VERSION: t2, MAX_LENGTH: s, MAX_SAFE_INTEGER: a, MAX_SAFE_COMPONENT_LENGTH: n }; + } }), VD = te({ "node_modules/semver/internal/re.js"(e, r) { + ne(); + var { MAX_SAFE_COMPONENT_LENGTH: t2 } = Ma(), s = qa(); + e = r.exports = {}; + var a = e.re = [], n = e.src = [], u = e.t = {}, i = 0, l = (p2, y, h) => { + let g = i++; + s(p2, g, y), u[p2] = g, n[g] = y, a[g] = new RegExp(y, h ? "g" : void 0); + }; + l("NUMERICIDENTIFIER", "0|[1-9]\\d*"), l("NUMERICIDENTIFIERLOOSE", "[0-9]+"), l("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"), l("MAINVERSION", `(${n[u.NUMERICIDENTIFIER]})\\.(${n[u.NUMERICIDENTIFIER]})\\.(${n[u.NUMERICIDENTIFIER]})`), l("MAINVERSIONLOOSE", `(${n[u.NUMERICIDENTIFIERLOOSE]})\\.(${n[u.NUMERICIDENTIFIERLOOSE]})\\.(${n[u.NUMERICIDENTIFIERLOOSE]})`), l("PRERELEASEIDENTIFIER", `(?:${n[u.NUMERICIDENTIFIER]}|${n[u.NONNUMERICIDENTIFIER]})`), l("PRERELEASEIDENTIFIERLOOSE", `(?:${n[u.NUMERICIDENTIFIERLOOSE]}|${n[u.NONNUMERICIDENTIFIER]})`), l("PRERELEASE", `(?:-(${n[u.PRERELEASEIDENTIFIER]}(?:\\.${n[u.PRERELEASEIDENTIFIER]})*))`), l("PRERELEASELOOSE", `(?:-?(${n[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[u.PRERELEASEIDENTIFIERLOOSE]})*))`), l("BUILDIDENTIFIER", "[0-9A-Za-z-]+"), l("BUILD", `(?:\\+(${n[u.BUILDIDENTIFIER]}(?:\\.${n[u.BUILDIDENTIFIER]})*))`), l("FULLPLAIN", `v?${n[u.MAINVERSION]}${n[u.PRERELEASE]}?${n[u.BUILD]}?`), l("FULL", `^${n[u.FULLPLAIN]}$`), l("LOOSEPLAIN", `[v=\\s]*${n[u.MAINVERSIONLOOSE]}${n[u.PRERELEASELOOSE]}?${n[u.BUILD]}?`), l("LOOSE", `^${n[u.LOOSEPLAIN]}$`), l("GTLT", "((?:<|>)?=?)"), l("XRANGEIDENTIFIERLOOSE", `${n[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), l("XRANGEIDENTIFIER", `${n[u.NUMERICIDENTIFIER]}|x|X|\\*`), l("XRANGEPLAIN", `[v=\\s]*(${n[u.XRANGEIDENTIFIER]})(?:\\.(${n[u.XRANGEIDENTIFIER]})(?:\\.(${n[u.XRANGEIDENTIFIER]})(?:${n[u.PRERELEASE]})?${n[u.BUILD]}?)?)?`), l("XRANGEPLAINLOOSE", `[v=\\s]*(${n[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[u.XRANGEIDENTIFIERLOOSE]})(?:${n[u.PRERELEASELOOSE]})?${n[u.BUILD]}?)?)?`), l("XRANGE", `^${n[u.GTLT]}\\s*${n[u.XRANGEPLAIN]}$`), l("XRANGELOOSE", `^${n[u.GTLT]}\\s*${n[u.XRANGEPLAINLOOSE]}$`), l("COERCE", `(^|[^\\d])(\\d{1,${t2}})(?:\\.(\\d{1,${t2}}))?(?:\\.(\\d{1,${t2}}))?(?:$|[^\\d])`), l("COERCERTL", n[u.COERCE], true), l("LONETILDE", "(?:~>?)"), l("TILDETRIM", `(\\s*)${n[u.LONETILDE]}\\s+`, true), e.tildeTrimReplace = "$1~", l("TILDE", `^${n[u.LONETILDE]}${n[u.XRANGEPLAIN]}$`), l("TILDELOOSE", `^${n[u.LONETILDE]}${n[u.XRANGEPLAINLOOSE]}$`), l("LONECARET", "(?:\\^)"), l("CARETTRIM", `(\\s*)${n[u.LONECARET]}\\s+`, true), e.caretTrimReplace = "$1^", l("CARET", `^${n[u.LONECARET]}${n[u.XRANGEPLAIN]}$`), l("CARETLOOSE", `^${n[u.LONECARET]}${n[u.XRANGEPLAINLOOSE]}$`), l("COMPARATORLOOSE", `^${n[u.GTLT]}\\s*(${n[u.LOOSEPLAIN]})$|^$`), l("COMPARATOR", `^${n[u.GTLT]}\\s*(${n[u.FULLPLAIN]})$|^$`), l("COMPARATORTRIM", `(\\s*)${n[u.GTLT]}\\s*(${n[u.LOOSEPLAIN]}|${n[u.XRANGEPLAIN]})`, true), e.comparatorTrimReplace = "$1$2$3", l("HYPHENRANGE", `^\\s*(${n[u.XRANGEPLAIN]})\\s+-\\s+(${n[u.XRANGEPLAIN]})\\s*$`), l("HYPHENRANGELOOSE", `^\\s*(${n[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[u.XRANGEPLAINLOOSE]})\\s*$`), l("STAR", "(<|>)?=?\\s*\\*"), l("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), l("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } }), WD = te({ "node_modules/semver/internal/parse-options.js"(e, r) { + ne(); + var t2 = ["includePrerelease", "loose", "rtl"], s = (a) => a ? typeof a != "object" ? { loose: true } : t2.filter((n) => a[n]).reduce((n, u) => (n[u] = true, n), {}) : {}; + r.exports = s; + } }), HD = te({ "node_modules/semver/internal/identifiers.js"(e, r) { + ne(); + var t2 = /^[0-9]+$/, s = (n, u) => { + let i = t2.test(n), l = t2.test(u); + return i && l && (n = +n, u = +u), n === u ? 0 : i && !l ? -1 : l && !i ? 1 : n < u ? -1 : 1; + }, a = (n, u) => s(u, n); + r.exports = { compareIdentifiers: s, rcompareIdentifiers: a }; + } }), GD = te({ "node_modules/semver/classes/semver.js"(e, r) { + ne(); + var t2 = qa(), { MAX_LENGTH: s, MAX_SAFE_INTEGER: a } = Ma(), { re: n, t: u } = VD(), i = WD(), { compareIdentifiers: l } = HD(), p2 = class { + constructor(y, h) { + if (h = i(h), y instanceof p2) { + if (y.loose === !!h.loose && y.includePrerelease === !!h.includePrerelease) + return y; + y = y.version; + } else if (typeof y != "string") + throw new TypeError(`Invalid Version: ${y}`); + if (y.length > s) + throw new TypeError(`version is longer than ${s} characters`); + t2("SemVer", y, h), this.options = h, this.loose = !!h.loose, this.includePrerelease = !!h.includePrerelease; + let g = y.trim().match(h.loose ? n[u.LOOSE] : n[u.FULL]); + if (!g) + throw new TypeError(`Invalid Version: ${y}`); + if (this.raw = y, this.major = +g[1], this.minor = +g[2], this.patch = +g[3], this.major > a || this.major < 0) + throw new TypeError("Invalid major version"); + if (this.minor > a || this.minor < 0) + throw new TypeError("Invalid minor version"); + if (this.patch > a || this.patch < 0) + throw new TypeError("Invalid patch version"); + g[4] ? this.prerelease = g[4].split(".").map((c) => { + if (/^[0-9]+$/.test(c)) { + let f = +c; + if (f >= 0 && f < a) + return f; + } + return c; + }) : this.prerelease = [], this.build = g[5] ? g[5].split(".") : [], this.format(); + } + format() { + return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version; + } + toString() { + return this.version; + } + compare(y) { + if (t2("SemVer.compare", this.version, this.options, y), !(y instanceof p2)) { + if (typeof y == "string" && y === this.version) + return 0; + y = new p2(y, this.options); + } + return y.version === this.version ? 0 : this.compareMain(y) || this.comparePre(y); + } + compareMain(y) { + return y instanceof p2 || (y = new p2(y, this.options)), l(this.major, y.major) || l(this.minor, y.minor) || l(this.patch, y.patch); + } + comparePre(y) { + if (y instanceof p2 || (y = new p2(y, this.options)), this.prerelease.length && !y.prerelease.length) + return -1; + if (!this.prerelease.length && y.prerelease.length) + return 1; + if (!this.prerelease.length && !y.prerelease.length) + return 0; + let h = 0; + do { + let g = this.prerelease[h], c = y.prerelease[h]; + if (t2("prerelease compare", h, g, c), g === void 0 && c === void 0) + return 0; + if (c === void 0) + return 1; + if (g === void 0) + return -1; + if (g === c) + continue; + return l(g, c); + } while (++h); + } + compareBuild(y) { + y instanceof p2 || (y = new p2(y, this.options)); + let h = 0; + do { + let g = this.build[h], c = y.build[h]; + if (t2("prerelease compare", h, g, c), g === void 0 && c === void 0) + return 0; + if (c === void 0) + return 1; + if (g === void 0) + return -1; + if (g === c) + continue; + return l(g, c); + } while (++h); + } + inc(y, h) { + switch (y) { + case "premajor": + this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", h); + break; + case "preminor": + this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", h); + break; + case "prepatch": + this.prerelease.length = 0, this.inc("patch", h), this.inc("pre", h); + break; + case "prerelease": + this.prerelease.length === 0 && this.inc("patch", h), this.inc("pre", h); + break; + case "major": + (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = []; + break; + case "minor": + (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = []; + break; + case "patch": + this.prerelease.length === 0 && this.patch++, this.prerelease = []; + break; + case "pre": + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + let g = this.prerelease.length; + for (; --g >= 0; ) + typeof this.prerelease[g] == "number" && (this.prerelease[g]++, g = -2); + g === -1 && this.prerelease.push(0); + } + h && (l(this.prerelease[0], h) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = [h, 0]) : this.prerelease = [h, 0]); + break; + default: + throw new Error(`invalid increment argument: ${y}`); + } + return this.format(), this.raw = this.version, this; + } + }; + r.exports = p2; + } }), zn = te({ "node_modules/semver/functions/compare.js"(e, r) { + ne(); + var t2 = GD(), s = (a, n, u) => new t2(a, u).compare(new t2(n, u)); + r.exports = s; + } }), UD = te({ "node_modules/semver/functions/lt.js"(e, r) { + ne(); + var t2 = zn(), s = (a, n, u) => t2(a, n, u) < 0; + r.exports = s; + } }), JD = te({ "node_modules/semver/functions/gte.js"(e, r) { + ne(); + var t2 = zn(), s = (a, n, u) => t2(a, n, u) >= 0; + r.exports = s; + } }), zD = te({ "src/utils/arrayify.js"(e, r) { + "use strict"; + ne(), r.exports = (t2, s) => Object.entries(t2).map((a) => { + let [n, u] = a; + return Object.assign({ [s]: n }, u); + }); + } }), XD = te({ "node_modules/outdent/lib/index.js"(e, r) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.outdent = void 0; + function t2() { + for (var E = [], N = 0; N < arguments.length; N++) + E[N] = arguments[N]; + } + function s() { + return typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : a(); + } + function a() { + return { add: t2, delete: t2, get: t2, set: t2, has: function(E) { + return false; + } }; + } + var n = Object.prototype.hasOwnProperty, u = function(E, N) { + return n.call(E, N); + }; + function i(E, N) { + for (var x in N) + u(N, x) && (E[x] = N[x]); + return E; + } + var l = /^[ \t]*(?:\r\n|\r|\n)/, p2 = /(?:\r\n|\r|\n)[ \t]*$/, y = /^(?:[\r\n]|$)/, h = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/, g = /^[ \t]*[\r\n][ \t\r\n]*$/; + function c(E, N, x) { + var I = 0, P = E[0].match(h); + P && (I = P[1].length); + var $ = "(\\r\\n|\\r|\\n).{0," + I + "}", D = new RegExp($, "g"); + N && (E = E.slice(1)); + var T = x.newline, m = x.trimLeadingNewline, C = x.trimTrailingNewline, o = typeof T == "string", d = E.length, v = E.map(function(S, b) { + return S = S.replace(D, "$1"), b === 0 && m && (S = S.replace(l, "")), b === d - 1 && C && (S = S.replace(p2, "")), o && (S = S.replace(/\r\n|\n|\r/g, function(B) { + return T; + })), S; + }); + return v; + } + function f(E, N) { + for (var x = "", I = 0, P = E.length; I < P; I++) + x += E[I], I < P - 1 && (x += N[I]); + return x; + } + function F(E) { + return u(E, "raw") && u(E, "length"); + } + function _(E) { + var N = s(), x = s(); + function I($) { + for (var D = [], T = 1; T < arguments.length; T++) + D[T - 1] = arguments[T]; + if (F($)) { + var m = $, C = (D[0] === I || D[0] === w) && g.test(m[0]) && y.test(m[1]), o = C ? x : N, d = o.get(m); + if (d || (d = c(m, C, E), o.set(m, d)), D.length === 0) + return d[0]; + var v = f(d, C ? D.slice(1) : D); + return v; + } else + return _(i(i({}, E), $ || {})); + } + var P = i(I, { string: function($) { + return c([$], false, E)[0]; + } }); + return P; + } + var w = _({ trimLeadingNewline: true, trimTrailingNewline: true }); + if (e.outdent = w, e.default = w, typeof r < "u") + try { + r.exports = w, Object.defineProperty(w, "__esModule", { value: true }), w.default = w, w.outdent = w; + } catch { + } + } }), KD = te({ "src/main/core-options.js"(e, r) { + "use strict"; + ne(); + var { outdent: t2 } = XD(), s = "Config", a = "Editor", n = "Format", u = "Other", i = "Output", l = "Global", p2 = "Special", y = { cursorOffset: { since: "1.4.0", category: p2, type: "int", default: -1, range: { start: -1, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Print (to stderr) where a cursor at the given position would move to after formatting. + This option cannot be used with --range-start and --range-end. + `, cliCategory: a }, endOfLine: { since: "1.15.0", category: l, type: "choice", default: [{ since: "1.15.0", value: "auto" }, { since: "2.0.0", value: "lf" }], description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: t2` + Maintain existing + (mixed values within one file are normalised by looking at what's used after the first line) + ` }] }, filepath: { since: "1.4.0", category: p2, type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: u, cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { since: "1.8.0", category: p2, type: "boolean", default: false, description: "Insert @format pragma into file's first docblock comment.", cliCategory: u }, parser: { since: "0.0.10", category: l, type: "choice", default: [{ since: "0.0.10", value: "babylon" }, { since: "1.13.0", value: void 0 }], description: "Which parser to use.", exception: (h) => typeof h == "string" || typeof h == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", since: "1.16.0", description: "JavaScript" }, { value: "babel-flow", since: "1.16.0", description: "Flow" }, { value: "babel-ts", since: "2.0.0", description: "TypeScript" }, { value: "typescript", since: "1.4.0", description: "TypeScript" }, { value: "acorn", since: "2.6.0", description: "JavaScript" }, { value: "espree", since: "2.2.0", description: "JavaScript" }, { value: "meriyah", since: "2.2.0", description: "JavaScript" }, { value: "css", since: "1.7.1", description: "CSS" }, { value: "less", since: "1.7.1", description: "Less" }, { value: "scss", since: "1.7.1", description: "SCSS" }, { value: "json", since: "1.5.0", description: "JSON" }, { value: "json5", since: "1.13.0", description: "JSON5" }, { value: "json-stringify", since: "1.13.0", description: "JSON.stringify" }, { value: "graphql", since: "1.5.0", description: "GraphQL" }, { value: "markdown", since: "1.8.0", description: "Markdown" }, { value: "mdx", since: "1.15.0", description: "MDX" }, { value: "vue", since: "1.10.0", description: "Vue" }, { value: "yaml", since: "1.14.0", description: "YAML" }, { value: "glimmer", since: "2.3.0", description: "Ember / Handlebars" }, { value: "html", since: "1.15.0", description: "HTML" }, { value: "angular", since: "1.15.0", description: "Angular" }, { value: "lwc", since: "1.17.0", description: "Lightning Web Components" }] }, plugins: { since: "1.10.0", type: "path", array: true, default: [{ value: [] }], category: l, description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (h) => typeof h == "string" || typeof h == "object", cliName: "plugin", cliCategory: s }, pluginSearchDirs: { since: "1.13.0", type: "path", array: true, default: [{ value: [] }], category: l, description: t2` + Custom directory that contains prettier plugins in node_modules subdirectory. + Overrides default behavior when plugins are searched relatively to the location of Prettier. + Multiple values are accepted. + `, exception: (h) => typeof h == "string" || typeof h == "object", cliName: "plugin-search-dir", cliCategory: s }, printWidth: { since: "0.0.0", category: l, type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 } }, rangeEnd: { since: "1.4.0", category: p2, type: "int", default: Number.POSITIVE_INFINITY, range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Format code ending at a given character offset (exclusive). + The range will extend forwards to the end of the selected statement. + This option cannot be used with --cursor-offset. + `, cliCategory: a }, rangeStart: { since: "1.4.0", category: p2, type: "int", default: 0, range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }, description: t2` + Format code starting at a given character offset. + The range will extend backwards to the start of the first line containing the selected statement. + This option cannot be used with --cursor-offset. + `, cliCategory: a }, requirePragma: { since: "1.7.0", category: p2, type: "boolean", default: false, description: t2` + Require either '@prettier' or '@format' to be present in the file's first docblock comment + in order for it to be formatted. + `, cliCategory: u }, tabWidth: { type: "int", category: l, default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 } }, useTabs: { since: "1.0.0", category: l, type: "boolean", default: false, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { since: "2.1.0", category: l, type: "choice", default: [{ since: "2.1.0", value: "auto" }], description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } }; + r.exports = { CATEGORY_CONFIG: s, CATEGORY_EDITOR: a, CATEGORY_FORMAT: n, CATEGORY_OTHER: u, CATEGORY_OUTPUT: i, CATEGORY_GLOBAL: l, CATEGORY_SPECIAL: p2, options: y }; + } }), Xn = te({ "src/main/support.js"(e, r) { + "use strict"; + ne(); + var t2 = { compare: zn(), lt: UD(), gte: JD() }, s = zD(), a = Ia().version, n = KD().options; + function u() { + let { plugins: l = [], showUnreleased: p2 = false, showDeprecated: y = false, showInternal: h = false } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, g = a.split("-", 1)[0], c = l.flatMap((E) => E.languages || []).filter(F), f = s(Object.assign({}, ...l.map((E) => { + let { options: N } = E; + return N; + }), n), "name").filter((E) => F(E) && _(E)).sort((E, N) => E.name === N.name ? 0 : E.name < N.name ? -1 : 1).map(w).map((E) => { + E = Object.assign({}, E), Array.isArray(E.default) && (E.default = E.default.length === 1 ? E.default[0].value : E.default.filter(F).sort((x, I) => t2.compare(I.since, x.since))[0].value), Array.isArray(E.choices) && (E.choices = E.choices.filter((x) => F(x) && _(x)), E.name === "parser" && i(E, c, l)); + let N = Object.fromEntries(l.filter((x) => x.defaultOptions && x.defaultOptions[E.name] !== void 0).map((x) => [x.name, x.defaultOptions[E.name]])); + return Object.assign(Object.assign({}, E), {}, { pluginDefaults: N }); + }); + return { languages: c, options: f }; + function F(E) { + return p2 || !("since" in E) || E.since && t2.gte(g, E.since); + } + function _(E) { + return y || !("deprecated" in E) || E.deprecated && t2.lt(g, E.deprecated); + } + function w(E) { + if (h) + return E; + let { cliName: N, cliCategory: x, cliDescription: I } = E; + return Hn(E, hD); + } + } + function i(l, p2, y) { + let h = new Set(l.choices.map((g) => g.value)); + for (let g of p2) + if (g.parsers) { + for (let c of g.parsers) + if (!h.has(c)) { + h.add(c); + let f = y.find((_) => _.parsers && _.parsers[c]), F = g.name; + f && f.name && (F += ` (plugin: ${f.name})`), l.choices.push({ value: c, description: F }); + } + } + } + r.exports = { getSupportInfo: u }; + } }), Kn = te({ "src/utils/is-non-empty-array.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return Array.isArray(s) && s.length > 0; + } + r.exports = t2; + } }), Pr = te({ "src/utils/text/skip.js"(e, r) { + "use strict"; + ne(); + function t2(i) { + return (l, p2, y) => { + let h = y && y.backwards; + if (p2 === false) + return false; + let { length: g } = l, c = p2; + for (; c >= 0 && c < g; ) { + let f = l.charAt(c); + if (i instanceof RegExp) { + if (!i.test(f)) + return c; + } else if (!i.includes(f)) + return c; + h ? c-- : c++; + } + return c === -1 || c === g ? c : false; + }; + } + var s = t2(/\s/), a = t2(" "), n = t2(",; "), u = t2(/[^\n\r]/); + r.exports = { skipWhitespace: s, skipSpaces: a, skipToLineEnd: n, skipEverythingButNewLine: u }; + } }), Ra = te({ "src/utils/text/skip-inline-comment.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + if (a === false) + return false; + if (s.charAt(a) === "/" && s.charAt(a + 1) === "*") { + for (let n = a + 2; n < s.length; ++n) + if (s.charAt(n) === "*" && s.charAt(n + 1) === "/") + return n + 2; + } + return a; + } + r.exports = t2; + } }), $a = te({ "src/utils/text/skip-trailing-comment.js"(e, r) { + "use strict"; + ne(); + var { skipEverythingButNewLine: t2 } = Pr(); + function s(a, n) { + return n === false ? false : a.charAt(n) === "/" && a.charAt(n + 1) === "/" ? t2(a, n) : n; + } + r.exports = s; + } }), Va = te({ "src/utils/text/skip-newline.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n) { + let u = n && n.backwards; + if (a === false) + return false; + let i = s.charAt(a); + if (u) { + if (s.charAt(a - 1) === "\r" && i === ` +`) + return a - 2; + if (i === ` +` || i === "\r" || i === "\u2028" || i === "\u2029") + return a - 1; + } else { + if (i === "\r" && s.charAt(a + 1) === ` +`) + return a + 2; + if (i === ` +` || i === "\r" || i === "\u2028" || i === "\u2029") + return a + 1; + } + return a; + } + r.exports = t2; + } }), YD = te({ "src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(e, r) { + "use strict"; + ne(); + var t2 = Ra(), s = Va(), a = $a(), { skipSpaces: n } = Pr(); + function u(i, l) { + let p2 = null, y = l; + for (; y !== p2; ) + p2 = y, y = n(i, y), y = t2(i, y), y = a(i, y), y = s(i, y); + return y; + } + r.exports = u; + } }), Ue = te({ "src/common/util.js"(e, r) { + "use strict"; + ne(); + var { default: t2 } = ($D(), ft(ja)), s = lt(), { getSupportInfo: a } = Xn(), n = Kn(), u = Oa(), { skipWhitespace: i, skipSpaces: l, skipToLineEnd: p2, skipEverythingButNewLine: y } = Pr(), h = Ra(), g = $a(), c = Va(), f = YD(), F = (V) => V[V.length - 2]; + function _(V) { + return (j, Y, ie) => { + let ee = ie && ie.backwards; + if (Y === false) + return false; + let { length: ce } = j, W = Y; + for (; W >= 0 && W < ce; ) { + let K = j.charAt(W); + if (V instanceof RegExp) { + if (!V.test(K)) + return W; + } else if (!V.includes(K)) + return W; + ee ? W-- : W++; + } + return W === -1 || W === ce ? W : false; + }; + } + function w(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, ie = l(V, Y.backwards ? j - 1 : j, Y), ee = c(V, ie, Y); + return ie !== ee; + } + function E(V, j, Y) { + for (let ie = j; ie < Y; ++ie) + if (V.charAt(ie) === ` +`) + return true; + return false; + } + function N(V, j, Y) { + let ie = Y(j) - 1; + ie = l(V, ie, { backwards: true }), ie = c(V, ie, { backwards: true }), ie = l(V, ie, { backwards: true }); + let ee = c(V, ie, { backwards: true }); + return ie !== ee; + } + function x(V, j) { + let Y = null, ie = j; + for (; ie !== Y; ) + Y = ie, ie = p2(V, ie), ie = h(V, ie), ie = l(V, ie); + return ie = g(V, ie), ie = c(V, ie), ie !== false && w(V, ie); + } + function I(V, j, Y) { + return x(V, Y(j)); + } + function P(V, j, Y) { + return f(V, Y(j)); + } + function $(V, j, Y) { + return V.charAt(P(V, j, Y)); + } + function D(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + return l(V, Y.backwards ? j - 1 : j, Y) !== j; + } + function T(V, j) { + let Y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, ie = 0; + for (let ee = Y; ee < V.length; ++ee) + V[ee] === " " ? ie = ie + j - ie % j : ie++; + return ie; + } + function m(V, j) { + let Y = V.lastIndexOf(` +`); + return Y === -1 ? 0 : T(V.slice(Y + 1).match(/^[\t ]*/)[0], j); + } + function C(V, j) { + let Y = { quote: '"', regex: /"/g, escaped: """ }, ie = { quote: "'", regex: /'/g, escaped: "'" }, ee = j === "'" ? ie : Y, ce = ee === ie ? Y : ie, W = ee; + if (V.includes(ee.quote) || V.includes(ce.quote)) { + let K = (V.match(ee.regex) || []).length, de = (V.match(ce.regex) || []).length; + W = K > de ? ce : ee; + } + return W; + } + function o(V, j) { + let Y = V.slice(1, -1), ie = j.parser === "json" || j.parser === "json5" && j.quoteProps === "preserve" && !j.singleQuote ? '"' : j.__isInHtmlAttribute ? "'" : C(Y, j.singleQuote ? "'" : '"').quote; + return d(Y, ie, !(j.parser === "css" || j.parser === "less" || j.parser === "scss" || j.__embeddedInHtml)); + } + function d(V, j, Y) { + let ie = j === '"' ? "'" : '"', ee = /\\(.)|(["'])/gs, ce = V.replace(ee, (W, K, de) => K === ie ? K : de === j ? "\\" + de : de || (Y && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(K) ? K : "\\" + K)); + return j + ce + j; + } + function v(V) { + return V.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1").replace(/^([+-])?\./, "$10.").replace(/(\.\d+?)0+(?=e|$)/, "$1").replace(/\.(?=e|$)/, ""); + } + function S(V, j) { + let Y = V.match(new RegExp(`(${t2(j)})+`, "g")); + return Y === null ? 0 : Y.reduce((ie, ee) => Math.max(ie, ee.length / j.length), 0); + } + function b(V, j) { + let Y = V.match(new RegExp(`(${t2(j)})+`, "g")); + if (Y === null) + return 0; + let ie = /* @__PURE__ */ new Map(), ee = 0; + for (let ce of Y) { + let W = ce.length / j.length; + ie.set(W, true), W > ee && (ee = W); + } + for (let ce = 1; ce < ee; ce++) + if (!ie.get(ce)) + return ce; + return ee + 1; + } + function B(V, j) { + (V.comments || (V.comments = [])).push(j), j.printed = false, j.nodeDescription = Q(V); + } + function k(V, j) { + j.leading = true, j.trailing = false, B(V, j); + } + function M(V, j, Y) { + j.leading = false, j.trailing = false, Y && (j.marker = Y), B(V, j); + } + function R(V, j) { + j.leading = false, j.trailing = true, B(V, j); + } + function q(V, j) { + let { languages: Y } = a({ plugins: j.plugins }), ie = Y.find((ee) => { + let { name: ce } = ee; + return ce.toLowerCase() === V; + }) || Y.find((ee) => { + let { aliases: ce } = ee; + return Array.isArray(ce) && ce.includes(V); + }) || Y.find((ee) => { + let { extensions: ce } = ee; + return Array.isArray(ce) && ce.includes(`.${V}`); + }); + return ie && ie.parsers[0]; + } + function J(V) { + return V && V.type === "front-matter"; + } + function L(V) { + let j = /* @__PURE__ */ new WeakMap(); + return function(Y) { + return j.has(Y) || j.set(Y, Symbol(V)), j.get(Y); + }; + } + function Q(V) { + let j = V.type || V.kind || "(unknown type)", Y = String(V.name || V.id && (typeof V.id == "object" ? V.id.name : V.id) || V.key && (typeof V.key == "object" ? V.key.name : V.key) || V.value && (typeof V.value == "object" ? "" : String(V.value)) || V.operator || ""); + return Y.length > 20 && (Y = Y.slice(0, 19) + "\u2026"), j + (Y ? " " + Y : ""); + } + r.exports = { inferParserByLanguage: q, getStringWidth: u, getMaxContinuousCount: S, getMinNotPresentContinuousCount: b, getPenultimate: F, getLast: s, getNextNonSpaceNonCommentCharacterIndexWithStartIndex: f, getNextNonSpaceNonCommentCharacterIndex: P, getNextNonSpaceNonCommentCharacter: $, skip: _, skipWhitespace: i, skipSpaces: l, skipToLineEnd: p2, skipEverythingButNewLine: y, skipInlineComment: h, skipTrailingComment: g, skipNewline: c, isNextLineEmptyAfterIndex: x, isNextLineEmpty: I, isPreviousLineEmpty: N, hasNewline: w, hasNewlineInRange: E, hasSpaces: D, getAlignmentSize: T, getIndentSize: m, getPreferredQuote: C, printString: o, printNumber: v, makeString: d, addLeadingComment: k, addDanglingComment: M, addTrailingComment: R, isFrontMatterNode: J, isNonEmptyArray: n, createGroupIdMapper: L }; + } }), Wa = {}; + Kt(Wa, { basename: () => za, default: () => Ka, delimiter: () => Mn, dirname: () => Ja, extname: () => Xa, isAbsolute: () => Qn, join: () => Ga, normalize: () => Yn, relative: () => Ua, resolve: () => wr, sep: () => qn }); + function Ha(e, r) { + for (var t2 = 0, s = e.length - 1; s >= 0; s--) { + var a = e[s]; + a === "." ? e.splice(s, 1) : a === ".." ? (e.splice(s, 1), t2++) : t2 && (e.splice(s, 1), t2--); + } + if (r) + for (; t2--; t2) + e.unshift(".."); + return e; + } + function wr() { + for (var e = "", r = false, t2 = arguments.length - 1; t2 >= -1 && !r; t2--) { + var s = t2 >= 0 ? arguments[t2] : "/"; + if (typeof s != "string") + throw new TypeError("Arguments to path.resolve must be strings"); + if (!s) + continue; + e = s + "/" + e, r = s.charAt(0) === "/"; + } + return e = Ha(Zn(e.split("/"), function(a) { + return !!a; + }), !r).join("/"), (r ? "/" : "") + e || "."; + } + function Yn(e) { + var r = Qn(e), t2 = Ya(e, -1) === "/"; + return e = Ha(Zn(e.split("/"), function(s) { + return !!s; + }), !r).join("/"), !e && !r && (e = "."), e && t2 && (e += "/"), (r ? "/" : "") + e; + } + function Qn(e) { + return e.charAt(0) === "/"; + } + function Ga() { + var e = Array.prototype.slice.call(arguments, 0); + return Yn(Zn(e, function(r, t2) { + if (typeof r != "string") + throw new TypeError("Arguments to path.join must be strings"); + return r; + }).join("/")); + } + function Ua(e, r) { + e = wr(e).substr(1), r = wr(r).substr(1); + function t2(p2) { + for (var y = 0; y < p2.length && p2[y] === ""; y++) + ; + for (var h = p2.length - 1; h >= 0 && p2[h] === ""; h--) + ; + return y > h ? [] : p2.slice(y, h - y + 1); + } + for (var s = t2(e.split("/")), a = t2(r.split("/")), n = Math.min(s.length, a.length), u = n, i = 0; i < n; i++) + if (s[i] !== a[i]) { + u = i; + break; + } + for (var l = [], i = u; i < s.length; i++) + l.push(".."); + return l = l.concat(a.slice(u)), l.join("/"); + } + function Ja(e) { + var r = Ir(e), t2 = r[0], s = r[1]; + return !t2 && !s ? "." : (s && (s = s.substr(0, s.length - 1)), t2 + s); + } + function za(e, r) { + var t2 = Ir(e)[2]; + return r && t2.substr(-1 * r.length) === r && (t2 = t2.substr(0, t2.length - r.length)), t2; + } + function Xa(e) { + return Ir(e)[3]; + } + function Zn(e, r) { + if (e.filter) + return e.filter(r); + for (var t2 = [], s = 0; s < e.length; s++) + r(e[s], s, e) && t2.push(e[s]); + return t2; + } + var Na, Ir, qn, Mn, Ka, Ya, QD = ht({ "node-modules-polyfills:path"() { + ne(), Na = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, Ir = function(e) { + return Na.exec(e).slice(1); + }, qn = "/", Mn = ":", Ka = { extname: Xa, basename: za, dirname: Ja, sep: qn, delimiter: Mn, relative: Ua, join: Ga, isAbsolute: Qn, normalize: Yn, resolve: wr }, Ya = "ab".substr(-1) === "b" ? function(e, r, t2) { + return e.substr(r, t2); + } : function(e, r, t2) { + return r < 0 && (r = e.length + r), e.substr(r, t2); + }; + } }), ZD = te({ "node-modules-polyfills-commonjs:path"(e, r) { + ne(); + var t2 = (QD(), ft(Wa)); + if (t2 && t2.default) { + r.exports = t2.default; + for (let s in t2) + r.exports[s] = t2[s]; + } else + t2 && (r.exports = t2); + } }), Qt = te({ "src/common/errors.js"(e, r) { + "use strict"; + ne(); + var t2 = class extends Error { + }, s = class extends Error { + }, a = class extends Error { + }, n = class extends Error { + }; + r.exports = { ConfigError: t2, DebugError: s, UndefinedParserError: a, ArgExpansionBailout: n }; + } }), vt = {}; + Kt(vt, { __assign: () => Nr, __asyncDelegator: () => fm, __asyncGenerator: () => pm, __asyncValues: () => Dm, __await: () => Xt, __awaiter: () => sm, __classPrivateFieldGet: () => ym, __classPrivateFieldSet: () => hm, __createBinding: () => am, __decorate: () => rm, __exportStar: () => om, __extends: () => em, __generator: () => im, __importDefault: () => gm, __importStar: () => dm, __makeTemplateObject: () => mm, __metadata: () => um, __param: () => nm, __read: () => Qa, __rest: () => tm, __spread: () => lm, __spreadArrays: () => cm, __values: () => Rn }); + function em(e, r) { + Br(e, r); + function t2() { + this.constructor = e; + } + e.prototype = r === null ? Object.create(r) : (t2.prototype = r.prototype, new t2()); + } + function tm(e, r) { + var t2 = {}; + for (var s in e) + Object.prototype.hasOwnProperty.call(e, s) && r.indexOf(s) < 0 && (t2[s] = e[s]); + if (e != null && typeof Object.getOwnPropertySymbols == "function") + for (var a = 0, s = Object.getOwnPropertySymbols(e); a < s.length; a++) + r.indexOf(s[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, s[a]) && (t2[s[a]] = e[s[a]]); + return t2; + } + function rm(e, r, t2, s) { + var a = arguments.length, n = a < 3 ? r : s === null ? s = Object.getOwnPropertyDescriptor(r, t2) : s, u; + if (typeof Reflect == "object" && typeof Reflect.decorate == "function") + n = Reflect.decorate(e, r, t2, s); + else + for (var i = e.length - 1; i >= 0; i--) + (u = e[i]) && (n = (a < 3 ? u(n) : a > 3 ? u(r, t2, n) : u(r, t2)) || n); + return a > 3 && n && Object.defineProperty(r, t2, n), n; + } + function nm(e, r) { + return function(t2, s) { + r(t2, s, e); + }; + } + function um(e, r) { + if (typeof Reflect == "object" && typeof Reflect.metadata == "function") + return Reflect.metadata(e, r); + } + function sm(e, r, t2, s) { + function a(n) { + return n instanceof t2 ? n : new t2(function(u) { + u(n); + }); + } + return new (t2 || (t2 = Promise))(function(n, u) { + function i(y) { + try { + p2(s.next(y)); + } catch (h) { + u(h); + } + } + function l(y) { + try { + p2(s.throw(y)); + } catch (h) { + u(h); + } + } + function p2(y) { + y.done ? n(y.value) : a(y.value).then(i, l); + } + p2((s = s.apply(e, r || [])).next()); + }); + } + function im(e, r) { + var t2 = { label: 0, sent: function() { + if (n[0] & 1) + throw n[1]; + return n[1]; + }, trys: [], ops: [] }, s, a, n, u; + return u = { next: i(0), throw: i(1), return: i(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() { + return this; + }), u; + function i(p2) { + return function(y) { + return l([p2, y]); + }; + } + function l(p2) { + if (s) + throw new TypeError("Generator is already executing."); + for (; t2; ) + try { + if (s = 1, a && (n = p2[0] & 2 ? a.return : p2[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, p2[1])).done) + return n; + switch (a = 0, n && (p2 = [p2[0] & 2, n.value]), p2[0]) { + case 0: + case 1: + n = p2; + break; + case 4: + return t2.label++, { value: p2[1], done: false }; + case 5: + t2.label++, a = p2[1], p2 = [0]; + continue; + case 7: + p2 = t2.ops.pop(), t2.trys.pop(); + continue; + default: + if (n = t2.trys, !(n = n.length > 0 && n[n.length - 1]) && (p2[0] === 6 || p2[0] === 2)) { + t2 = 0; + continue; + } + if (p2[0] === 3 && (!n || p2[1] > n[0] && p2[1] < n[3])) { + t2.label = p2[1]; + break; + } + if (p2[0] === 6 && t2.label < n[1]) { + t2.label = n[1], n = p2; + break; + } + if (n && t2.label < n[2]) { + t2.label = n[2], t2.ops.push(p2); + break; + } + n[2] && t2.ops.pop(), t2.trys.pop(); + continue; + } + p2 = r.call(e, t2); + } catch (y) { + p2 = [6, y], a = 0; + } finally { + s = n = 0; + } + if (p2[0] & 5) + throw p2[1]; + return { value: p2[0] ? p2[1] : void 0, done: true }; + } + } + function am(e, r, t2, s) { + s === void 0 && (s = t2), e[s] = r[t2]; + } + function om(e, r) { + for (var t2 in e) + t2 !== "default" && !r.hasOwnProperty(t2) && (r[t2] = e[t2]); + } + function Rn(e) { + var r = typeof Symbol == "function" && Symbol.iterator, t2 = r && e[r], s = 0; + if (t2) + return t2.call(e); + if (e && typeof e.length == "number") + return { next: function() { + return e && s >= e.length && (e = void 0), { value: e && e[s++], done: !e }; + } }; + throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + function Qa(e, r) { + var t2 = typeof Symbol == "function" && e[Symbol.iterator]; + if (!t2) + return e; + var s = t2.call(e), a, n = [], u; + try { + for (; (r === void 0 || r-- > 0) && !(a = s.next()).done; ) + n.push(a.value); + } catch (i) { + u = { error: i }; + } finally { + try { + a && !a.done && (t2 = s.return) && t2.call(s); + } finally { + if (u) + throw u.error; + } + } + return n; + } + function lm() { + for (var e = [], r = 0; r < arguments.length; r++) + e = e.concat(Qa(arguments[r])); + return e; + } + function cm() { + for (var e = 0, r = 0, t2 = arguments.length; r < t2; r++) + e += arguments[r].length; + for (var s = Array(e), a = 0, r = 0; r < t2; r++) + for (var n = arguments[r], u = 0, i = n.length; u < i; u++, a++) + s[a] = n[u]; + return s; + } + function Xt(e) { + return this instanceof Xt ? (this.v = e, this) : new Xt(e); + } + function pm(e, r, t2) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var s = t2.apply(e, r || []), a, n = []; + return a = {}, u("next"), u("throw"), u("return"), a[Symbol.asyncIterator] = function() { + return this; + }, a; + function u(g) { + s[g] && (a[g] = function(c) { + return new Promise(function(f, F) { + n.push([g, c, f, F]) > 1 || i(g, c); + }); + }); + } + function i(g, c) { + try { + l(s[g](c)); + } catch (f) { + h(n[0][3], f); + } + } + function l(g) { + g.value instanceof Xt ? Promise.resolve(g.value.v).then(p2, y) : h(n[0][2], g); + } + function p2(g) { + i("next", g); + } + function y(g) { + i("throw", g); + } + function h(g, c) { + g(c), n.shift(), n.length && i(n[0][0], n[0][1]); + } + } + function fm(e) { + var r, t2; + return r = {}, s("next"), s("throw", function(a) { + throw a; + }), s("return"), r[Symbol.iterator] = function() { + return this; + }, r; + function s(a, n) { + r[a] = e[a] ? function(u) { + return (t2 = !t2) ? { value: Xt(e[a](u)), done: a === "return" } : n ? n(u) : u; + } : n; + } + } + function Dm(e) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var r = e[Symbol.asyncIterator], t2; + return r ? r.call(e) : (e = typeof Rn == "function" ? Rn(e) : e[Symbol.iterator](), t2 = {}, s("next"), s("throw"), s("return"), t2[Symbol.asyncIterator] = function() { + return this; + }, t2); + function s(n) { + t2[n] = e[n] && function(u) { + return new Promise(function(i, l) { + u = e[n](u), a(i, l, u.done, u.value); + }); + }; + } + function a(n, u, i, l) { + Promise.resolve(l).then(function(p2) { + n({ value: p2, done: i }); + }, u); + } + } + function mm(e, r) { + return Object.defineProperty ? Object.defineProperty(e, "raw", { value: r }) : e.raw = r, e; + } + function dm(e) { + if (e && e.__esModule) + return e; + var r = {}; + if (e != null) + for (var t2 in e) + Object.hasOwnProperty.call(e, t2) && (r[t2] = e[t2]); + return r.default = e, r; + } + function gm(e) { + return e && e.__esModule ? e : { default: e }; + } + function ym(e, r) { + if (!r.has(e)) + throw new TypeError("attempted to get private field on non-instance"); + return r.get(e); + } + function hm(e, r, t2) { + if (!r.has(e)) + throw new TypeError("attempted to set private field on non-instance"); + return r.set(e, t2), t2; + } + var Br, Nr, Et = ht({ "node_modules/tslib/tslib.es6.js"() { + ne(), Br = function(e, r) { + return Br = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t2, s) { + t2.__proto__ = s; + } || function(t2, s) { + for (var a in s) + s.hasOwnProperty(a) && (t2[a] = s[a]); + }, Br(e, r); + }, Nr = function() { + return Nr = Object.assign || function(r) { + for (var t2, s = 1, a = arguments.length; s < a; s++) { + t2 = arguments[s]; + for (var n in t2) + Object.prototype.hasOwnProperty.call(t2, n) && (r[n] = t2[n]); + } + return r; + }, Nr.apply(this, arguments); + }; + } }), Za = te({ "node_modules/vnopts/lib/descriptors/api.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.apiDescriptor = { key: (r) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(r) ? r : JSON.stringify(r), value(r) { + if (r === null || typeof r != "object") + return JSON.stringify(r); + if (Array.isArray(r)) + return `[${r.map((s) => e.apiDescriptor.value(s)).join(", ")}]`; + let t2 = Object.keys(r); + return t2.length === 0 ? "{}" : `{ ${t2.map((s) => `${e.apiDescriptor.key(s)}: ${e.apiDescriptor.value(r[s])}`).join(", ")} }`; + }, pair: (r) => { + let { key: t2, value: s } = r; + return e.apiDescriptor.value({ [t2]: s }); + } }; + } }), vm = te({ "node_modules/vnopts/lib/descriptors/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Za(), e); + } }), kr = te({ "scripts/build/shims/chalk.cjs"(e, r) { + "use strict"; + ne(); + var t2 = (s) => s; + t2.grey = t2, t2.red = t2, t2.bold = t2, t2.yellow = t2, t2.blue = t2, t2.default = t2, r.exports = t2; + } }), eo = te({ "node_modules/vnopts/lib/handlers/deprecated/common.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(); + e.commonDeprecatedHandler = (t2, s, a) => { + let { descriptor: n } = a, u = [`${r.default.yellow(typeof t2 == "string" ? n.key(t2) : n.pair(t2))} is deprecated`]; + return s && u.push(`we now treat it as ${r.default.blue(typeof s == "string" ? n.key(s) : n.pair(s))}`), u.join("; ") + "."; + }; + } }), Cm = te({ "node_modules/vnopts/lib/handlers/deprecated/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(eo(), e); + } }), Em = te({ "node_modules/vnopts/lib/handlers/invalid/common.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(); + e.commonInvalidHandler = (t2, s, a) => [`Invalid ${r.default.red(a.descriptor.key(t2))} value.`, `Expected ${r.default.blue(a.schemas[t2].expected(a))},`, `but received ${r.default.red(a.descriptor.value(s))}.`].join(" "); + } }), to = te({ "node_modules/vnopts/lib/handlers/invalid/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Em(), e); + } }), Fm = te({ "node_modules/vnopts/node_modules/leven/index.js"(e, r) { + "use strict"; + ne(); + var t2 = [], s = []; + r.exports = function(a, n) { + if (a === n) + return 0; + var u = a; + a.length > n.length && (a = n, n = u); + var i = a.length, l = n.length; + if (i === 0) + return l; + if (l === 0) + return i; + for (; i > 0 && a.charCodeAt(~-i) === n.charCodeAt(~-l); ) + i--, l--; + if (i === 0) + return l; + for (var p2 = 0; p2 < i && a.charCodeAt(p2) === n.charCodeAt(p2); ) + p2++; + if (i -= p2, l -= p2, i === 0) + return l; + for (var y, h, g, c, f = 0, F = 0; f < i; ) + s[p2 + f] = a.charCodeAt(p2 + f), t2[f] = ++f; + for (; F < l; ) + for (y = n.charCodeAt(p2 + F), g = F++, h = F, f = 0; f < i; f++) + c = y === s[p2 + f] ? g : g + 1, g = t2[f], h = t2[f] = g > h ? c > h ? h + 1 : c : c > g ? g + 1 : c; + return h; + }; + } }), ro = te({ "node_modules/vnopts/lib/handlers/unknown/leven.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = kr(), t2 = Fm(); + e.levenUnknownHandler = (s, a, n) => { + let { descriptor: u, logger: i, schemas: l } = n, p2 = [`Ignored unknown option ${r.default.yellow(u.pair({ key: s, value: a }))}.`], y = Object.keys(l).sort().find((h) => t2(s, h) < 3); + y && p2.push(`Did you mean ${r.default.blue(u.key(y))}?`), i.warn(p2.join(" ")); + }; + } }), Am = te({ "node_modules/vnopts/lib/handlers/unknown/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(ro(), e); + } }), Sm = te({ "node_modules/vnopts/lib/handlers/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(Cm(), e), r.__exportStar(to(), e), r.__exportStar(Am(), e); + } }), Ft = te({ "node_modules/vnopts/lib/schema.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"]; + function t2(n, u) { + let i = new n(u), l = Object.create(i); + for (let p2 of r) + p2 in u && (l[p2] = a(u[p2], i, s.prototype[p2].length)); + return l; + } + e.createSchema = t2; + var s = class { + constructor(n) { + this.name = n.name; + } + static create(n) { + return t2(this, n); + } + default(n) { + } + expected(n) { + return "nothing"; + } + validate(n, u) { + return false; + } + deprecated(n, u) { + return false; + } + forward(n, u) { + } + redirect(n, u) { + } + overlap(n, u, i) { + return n; + } + preprocess(n, u) { + return n; + } + postprocess(n, u) { + return n; + } + }; + e.Schema = s; + function a(n, u, i) { + return typeof n == "function" ? function() { + for (var l = arguments.length, p2 = new Array(l), y = 0; y < l; y++) + p2[y] = arguments[y]; + return n(...p2.slice(0, i - 1), u, ...p2.slice(i - 1)); + } : () => n; + } + } }), xm = te({ "node_modules/vnopts/lib/schemas/alias.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + constructor(s) { + super(s), this._sourceName = s.sourceName; + } + expected(s) { + return s.schemas[this._sourceName].expected(s); + } + validate(s, a) { + return a.schemas[this._sourceName].validate(s, a); + } + redirect(s, a) { + return this._sourceName; + } + }; + e.AliasSchema = t2; + } }), bm = te({ "node_modules/vnopts/lib/schemas/any.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "anything"; + } + validate() { + return true; + } + }; + e.AnySchema = t2; + } }), Tm = te({ "node_modules/vnopts/lib/schemas/array.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)), t2 = Ft(), s = class extends t2.Schema { + constructor(n) { + var { valueSchema: u, name: i = u.name } = n, l = r.__rest(n, ["valueSchema", "name"]); + super(Object.assign({}, l, { name: i })), this._valueSchema = u; + } + expected(n) { + return `an array of ${this._valueSchema.expected(n)}`; + } + validate(n, u) { + if (!Array.isArray(n)) + return false; + let i = []; + for (let l of n) { + let p2 = u.normalizeValidateResult(this._valueSchema.validate(l, u), l); + p2 !== true && i.push(p2.value); + } + return i.length === 0 ? true : { value: i }; + } + deprecated(n, u) { + let i = []; + for (let l of n) { + let p2 = u.normalizeDeprecatedResult(this._valueSchema.deprecated(l, u), l); + p2 !== false && i.push(...p2.map((y) => { + let { value: h } = y; + return { value: [h] }; + })); + } + return i; + } + forward(n, u) { + let i = []; + for (let l of n) { + let p2 = u.normalizeForwardResult(this._valueSchema.forward(l, u), l); + i.push(...p2.map(a)); + } + return i; + } + redirect(n, u) { + let i = [], l = []; + for (let p2 of n) { + let y = u.normalizeRedirectResult(this._valueSchema.redirect(p2, u), p2); + "remain" in y && i.push(y.remain), l.push(...y.redirect.map(a)); + } + return i.length === 0 ? { redirect: l } : { redirect: l, remain: i }; + } + overlap(n, u) { + return n.concat(u); + } + }; + e.ArraySchema = s; + function a(n) { + let { from: u, to: i } = n; + return { from: [u], to: i }; + } + } }), Bm = te({ "node_modules/vnopts/lib/schemas/boolean.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "true or false"; + } + validate(s) { + return typeof s == "boolean"; + } + }; + e.BooleanSchema = t2; + } }), eu = te({ "node_modules/vnopts/lib/utils.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + function r(c, f) { + let F = /* @__PURE__ */ Object.create(null); + for (let _ of c) { + let w = _[f]; + if (F[w]) + throw new Error(`Duplicate ${f} ${JSON.stringify(w)}`); + F[w] = _; + } + return F; + } + e.recordFromArray = r; + function t2(c, f) { + let F = /* @__PURE__ */ new Map(); + for (let _ of c) { + let w = _[f]; + if (F.has(w)) + throw new Error(`Duplicate ${f} ${JSON.stringify(w)}`); + F.set(w, _); + } + return F; + } + e.mapFromArray = t2; + function s() { + let c = /* @__PURE__ */ Object.create(null); + return (f) => { + let F = JSON.stringify(f); + return c[F] ? true : (c[F] = true, false); + }; + } + e.createAutoChecklist = s; + function a(c, f) { + let F = [], _ = []; + for (let w of c) + f(w) ? F.push(w) : _.push(w); + return [F, _]; + } + e.partition = a; + function n(c) { + return c === Math.floor(c); + } + e.isInt = n; + function u(c, f) { + if (c === f) + return 0; + let F = typeof c, _ = typeof f, w = ["undefined", "object", "boolean", "number", "string"]; + return F !== _ ? w.indexOf(F) - w.indexOf(_) : F !== "string" ? Number(c) - Number(f) : c.localeCompare(f); + } + e.comparePrimitive = u; + function i(c) { + return c === void 0 ? {} : c; + } + e.normalizeDefaultResult = i; + function l(c, f) { + return c === true ? true : c === false ? { value: f } : c; + } + e.normalizeValidateResult = l; + function p2(c, f) { + let F = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + return c === false ? false : c === true ? F ? true : [{ value: f }] : "value" in c ? [c] : c.length === 0 ? false : c; + } + e.normalizeDeprecatedResult = p2; + function y(c, f) { + return typeof c == "string" || "key" in c ? { from: f, to: c } : "from" in c ? { from: c.from, to: c.to } : { from: f, to: c.to }; + } + e.normalizeTransferResult = y; + function h(c, f) { + return c === void 0 ? [] : Array.isArray(c) ? c.map((F) => y(F, f)) : [y(c, f)]; + } + e.normalizeForwardResult = h; + function g(c, f) { + let F = h(typeof c == "object" && "redirect" in c ? c.redirect : c, f); + return F.length === 0 ? { remain: f, redirect: F } : typeof c == "object" && "remain" in c ? { remain: c.remain, redirect: F } : { redirect: F }; + } + e.normalizeRedirectResult = g; + } }), Nm = te({ "node_modules/vnopts/lib/schemas/choice.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = eu(), s = class extends r.Schema { + constructor(a) { + super(a), this._choices = t2.mapFromArray(a.choices.map((n) => n && typeof n == "object" ? n : { value: n }), "value"); + } + expected(a) { + let { descriptor: n } = a, u = Array.from(this._choices.keys()).map((p2) => this._choices.get(p2)).filter((p2) => !p2.deprecated).map((p2) => p2.value).sort(t2.comparePrimitive).map(n.value), i = u.slice(0, -2), l = u.slice(-2); + return i.concat(l.join(" or ")).join(", "); + } + validate(a) { + return this._choices.has(a); + } + deprecated(a) { + let n = this._choices.get(a); + return n && n.deprecated ? { value: a } : false; + } + forward(a) { + let n = this._choices.get(a); + return n ? n.forward : void 0; + } + redirect(a) { + let n = this._choices.get(a); + return n ? n.redirect : void 0; + } + }; + e.ChoiceSchema = s; + } }), no = te({ "node_modules/vnopts/lib/schemas/number.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "a number"; + } + validate(s, a) { + return typeof s == "number"; + } + }; + e.NumberSchema = t2; + } }), wm = te({ "node_modules/vnopts/lib/schemas/integer.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = eu(), t2 = no(), s = class extends t2.NumberSchema { + expected() { + return "an integer"; + } + validate(a, n) { + return n.normalizeValidateResult(super.validate(a, n), a) === true && r.isInt(a); + } + }; + e.IntegerSchema = s; + } }), _m = te({ "node_modules/vnopts/lib/schemas/string.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Ft(), t2 = class extends r.Schema { + expected() { + return "a string"; + } + validate(s) { + return typeof s == "string"; + } + }; + e.StringSchema = t2; + } }), Pm = te({ "node_modules/vnopts/lib/schemas/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(xm(), e), r.__exportStar(bm(), e), r.__exportStar(Tm(), e), r.__exportStar(Bm(), e), r.__exportStar(Nm(), e), r.__exportStar(wm(), e), r.__exportStar(no(), e), r.__exportStar(_m(), e); + } }), Im = te({ "node_modules/vnopts/lib/defaults.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Za(), t2 = eo(), s = to(), a = ro(); + e.defaultDescriptor = r.apiDescriptor, e.defaultUnknownHandler = a.levenUnknownHandler, e.defaultInvalidHandler = s.commonInvalidHandler, e.defaultDeprecatedHandler = t2.commonDeprecatedHandler; + } }), km = te({ "node_modules/vnopts/lib/normalize.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Im(), t2 = eu(); + e.normalize = (a, n, u) => new s(n, u).normalize(a); + var s = class { + constructor(a, n) { + let { logger: u = console, descriptor: i = r.defaultDescriptor, unknown: l = r.defaultUnknownHandler, invalid: p2 = r.defaultInvalidHandler, deprecated: y = r.defaultDeprecatedHandler } = n || {}; + this._utils = { descriptor: i, logger: u || { warn: () => { + } }, schemas: t2.recordFromArray(a, "name"), normalizeDefaultResult: t2.normalizeDefaultResult, normalizeDeprecatedResult: t2.normalizeDeprecatedResult, normalizeForwardResult: t2.normalizeForwardResult, normalizeRedirectResult: t2.normalizeRedirectResult, normalizeValidateResult: t2.normalizeValidateResult }, this._unknownHandler = l, this._invalidHandler = p2, this._deprecatedHandler = y, this.cleanHistory(); + } + cleanHistory() { + this._hasDeprecationWarned = t2.createAutoChecklist(); + } + normalize(a) { + let n = {}, u = [a], i = () => { + for (; u.length !== 0; ) { + let l = u.shift(), p2 = this._applyNormalization(l, n); + u.push(...p2); + } + }; + i(); + for (let l of Object.keys(this._utils.schemas)) { + let p2 = this._utils.schemas[l]; + if (!(l in n)) { + let y = t2.normalizeDefaultResult(p2.default(this._utils)); + "value" in y && u.push({ [l]: y.value }); + } + } + i(); + for (let l of Object.keys(this._utils.schemas)) { + let p2 = this._utils.schemas[l]; + l in n && (n[l] = p2.postprocess(n[l], this._utils)); + } + return n; + } + _applyNormalization(a, n) { + let u = [], [i, l] = t2.partition(Object.keys(a), (p2) => p2 in this._utils.schemas); + for (let p2 of i) { + let y = this._utils.schemas[p2], h = y.preprocess(a[p2], this._utils), g = t2.normalizeValidateResult(y.validate(h, this._utils), h); + if (g !== true) { + let { value: w } = g, E = this._invalidHandler(p2, w, this._utils); + throw typeof E == "string" ? new Error(E) : E; + } + let c = (w) => { + let { from: E, to: N } = w; + u.push(typeof N == "string" ? { [N]: E } : { [N.key]: N.value }); + }, f = (w) => { + let { value: E, redirectTo: N } = w, x = t2.normalizeDeprecatedResult(y.deprecated(E, this._utils), h, true); + if (x !== false) + if (x === true) + this._hasDeprecationWarned(p2) || this._utils.logger.warn(this._deprecatedHandler(p2, N, this._utils)); + else + for (let { value: I } of x) { + let P = { key: p2, value: I }; + if (!this._hasDeprecationWarned(P)) { + let $ = typeof N == "string" ? { key: N, value: I } : N; + this._utils.logger.warn(this._deprecatedHandler(P, $, this._utils)); + } + } + }; + t2.normalizeForwardResult(y.forward(h, this._utils), h).forEach(c); + let _ = t2.normalizeRedirectResult(y.redirect(h, this._utils), h); + if (_.redirect.forEach(c), "remain" in _) { + let w = _.remain; + n[p2] = p2 in n ? y.overlap(n[p2], w, this._utils) : w, f({ value: w }); + } + for (let { from: w, to: E } of _.redirect) + f({ value: w, redirectTo: E }); + } + for (let p2 of l) { + let y = a[p2], h = this._unknownHandler(p2, y, this._utils); + if (h) + for (let g of Object.keys(h)) { + let c = { [g]: h[g] }; + g in this._utils.schemas ? u.push(c) : Object.assign(n, c); + } + } + return u; + } + }; + e.Normalizer = s; + } }), Lm = te({ "node_modules/vnopts/lib/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = (Et(), ft(vt)); + r.__exportStar(vm(), e), r.__exportStar(Sm(), e), r.__exportStar(Pm(), e), r.__exportStar(km(), e), r.__exportStar(Ft(), e); + } }), Om = te({ "src/main/options-normalizer.js"(e, r) { + "use strict"; + ne(); + var t2 = Lm(), s = lt(), a = { key: (g) => g.length === 1 ? `-${g}` : `--${g}`, value: (g) => t2.apiDescriptor.value(g), pair: (g) => { + let { key: c, value: f } = g; + return f === false ? `--no-${c}` : f === true ? a.key(c) : f === "" ? `${a.key(c)} without an argument` : `${a.key(c)}=${f}`; + } }, n = (g) => { + let { colorsModule: c, levenshteinDistance: f } = g; + return class extends t2.ChoiceSchema { + constructor(_) { + let { name: w, flags: E } = _; + super({ name: w, choices: E }), this._flags = [...E].sort(); + } + preprocess(_, w) { + if (typeof _ == "string" && _.length > 0 && !this._flags.includes(_)) { + let E = this._flags.find((N) => f(N, _) < 3); + if (E) + return w.logger.warn([`Unknown flag ${c.yellow(w.descriptor.value(_))},`, `did you mean ${c.blue(w.descriptor.value(E))}?`].join(" ")), E; + } + return _; + } + expected() { + return "a flag"; + } + }; + }, u; + function i(g, c) { + let { logger: f = false, isCLI: F = false, passThrough: _ = false, colorsModule: w = null, levenshteinDistance: E = null } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, N = _ ? Array.isArray(_) ? (T, m) => _.includes(T) ? { [T]: m } : void 0 : (T, m) => ({ [T]: m }) : (T, m, C) => { + let o = C.schemas, { _: d } = o, v = Hn(o, vD); + return t2.levenUnknownHandler(T, m, Object.assign(Object.assign({}, C), {}, { schemas: v })); + }, x = F ? a : t2.apiDescriptor, I = l(c, { isCLI: F, colorsModule: w, levenshteinDistance: E }), P = new t2.Normalizer(I, { logger: f, unknown: N, descriptor: x }), $ = f !== false; + $ && u && (P._hasDeprecationWarned = u); + let D = P.normalize(g); + return $ && (u = P._hasDeprecationWarned), F && D["plugin-search"] === false && (D["plugin-search-dir"] = false), D; + } + function l(g, c) { + let { isCLI: f, colorsModule: F, levenshteinDistance: _ } = c, w = []; + f && w.push(t2.AnySchema.create({ name: "_" })); + for (let E of g) + w.push(p2(E, { isCLI: f, optionInfos: g, colorsModule: F, levenshteinDistance: _ })), E.alias && f && w.push(t2.AliasSchema.create({ name: E.alias, sourceName: E.name })); + return w; + } + function p2(g, c) { + let { isCLI: f, optionInfos: F, colorsModule: _, levenshteinDistance: w } = c, { name: E } = g; + if (E === "plugin-search-dir" || E === "pluginSearchDirs") + return t2.AnySchema.create({ name: E, preprocess(P) { + return P === false || (P = Array.isArray(P) ? P : [P]), P; + }, validate(P) { + return P === false ? true : P.every(($) => typeof $ == "string"); + }, expected() { + return "false or paths to plugin search dir"; + } }); + let N = { name: E }, x, I = {}; + switch (g.type) { + case "int": + x = t2.IntegerSchema, f && (N.preprocess = Number); + break; + case "string": + x = t2.StringSchema; + break; + case "choice": + x = t2.ChoiceSchema, N.choices = g.choices.map((P) => typeof P == "object" && P.redirect ? Object.assign(Object.assign({}, P), {}, { redirect: { to: { key: g.name, value: P.redirect } } }) : P); + break; + case "boolean": + x = t2.BooleanSchema; + break; + case "flag": + x = n({ colorsModule: _, levenshteinDistance: w }), N.flags = F.flatMap((P) => [P.alias, P.description && P.name, P.oppositeDescription && `no-${P.name}`].filter(Boolean)); + break; + case "path": + x = t2.StringSchema; + break; + default: + throw new Error(`Unexpected type ${g.type}`); + } + if (g.exception ? N.validate = (P, $, D) => g.exception(P) || $.validate(P, D) : N.validate = (P, $, D) => P === void 0 || $.validate(P, D), g.redirect && (I.redirect = (P) => P ? { to: { key: g.redirect.option, value: g.redirect.value } } : void 0), g.deprecated && (I.deprecated = true), f && !g.array) { + let P = N.preprocess || (($) => $); + N.preprocess = ($, D, T) => D.preprocess(P(Array.isArray($) ? s($) : $), T); + } + return g.array ? t2.ArraySchema.create(Object.assign(Object.assign(Object.assign({}, f ? { preprocess: (P) => Array.isArray(P) ? P : [P] } : {}), I), {}, { valueSchema: x.create(N) })) : x.create(Object.assign(Object.assign({}, N), I)); + } + function y(g, c, f) { + return i(g, c, f); + } + function h(g, c, f) { + return i(g, c, Object.assign({ isCLI: true }, f)); + } + r.exports = { normalizeApiOptions: y, normalizeCliOptions: h }; + } }), ut = te({ "src/language-js/loc.js"(e, r) { + "use strict"; + ne(); + var t2 = Kn(); + function s(l) { + var p2, y; + let h = l.range ? l.range[0] : l.start, g = (p2 = (y = l.declaration) === null || y === void 0 ? void 0 : y.decorators) !== null && p2 !== void 0 ? p2 : l.decorators; + return t2(g) ? Math.min(s(g[0]), h) : h; + } + function a(l) { + return l.range ? l.range[1] : l.end; + } + function n(l, p2) { + let y = s(l); + return Number.isInteger(y) && y === s(p2); + } + function u(l, p2) { + let y = a(l); + return Number.isInteger(y) && y === a(p2); + } + function i(l, p2) { + return n(l, p2) && u(l, p2); + } + r.exports = { locStart: s, locEnd: a, hasSameLocStart: n, hasSameLoc: i }; + } }), jm = te({ "src/main/load-parser.js"(e, r) { + ne(), r.exports = () => { + }; + } }), qm = te({ "scripts/build/shims/babel-highlight.cjs"(e, r) { + "use strict"; + ne(); + var t2 = kr(), s = { shouldHighlight: () => false, getChalk: () => t2 }; + r.exports = s; + } }), Mm = te({ "node_modules/@babel/code-frame/lib/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.codeFrameColumns = u, e.default = i; + var r = qm(), t2 = false; + function s(l) { + return { gutter: l.grey, marker: l.red.bold, message: l.red.bold }; + } + var a = /\r\n|[\n\r\u2028\u2029]/; + function n(l, p2, y) { + let h = Object.assign({ column: 0, line: -1 }, l.start), g = Object.assign({}, h, l.end), { linesAbove: c = 2, linesBelow: f = 3 } = y || {}, F = h.line, _ = h.column, w = g.line, E = g.column, N = Math.max(F - (c + 1), 0), x = Math.min(p2.length, w + f); + F === -1 && (N = 0), w === -1 && (x = p2.length); + let I = w - F, P = {}; + if (I) + for (let $ = 0; $ <= I; $++) { + let D = $ + F; + if (!_) + P[D] = true; + else if ($ === 0) { + let T = p2[D - 1].length; + P[D] = [_, T - _ + 1]; + } else if ($ === I) + P[D] = [0, E]; + else { + let T = p2[D - $].length; + P[D] = [0, T]; + } + } + else + _ === E ? _ ? P[F] = [_, 0] : P[F] = true : P[F] = [_, E - _]; + return { start: N, end: x, markerLines: P }; + } + function u(l, p2) { + let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = (y.highlightCode || y.forceColor) && (0, r.shouldHighlight)(y), g = (0, r.getChalk)(y), c = s(g), f = ($, D) => h ? $(D) : D, F = l.split(a), { start: _, end: w, markerLines: E } = n(p2, F, y), N = p2.start && typeof p2.start.column == "number", x = String(w).length, P = (h ? (0, r.default)(l, y) : l).split(a, w).slice(_, w).map(($, D) => { + let T = _ + 1 + D, C = ` ${` ${T}`.slice(-x)} |`, o = E[T], d = !E[T + 1]; + if (o) { + let v = ""; + if (Array.isArray(o)) { + let S = $.slice(0, Math.max(o[0] - 1, 0)).replace(/[^\t]/g, " "), b = o[1] || 1; + v = [` + `, f(c.gutter, C.replace(/\d/g, " ")), " ", S, f(c.marker, "^").repeat(b)].join(""), d && y.message && (v += " " + f(c.message, y.message)); + } + return [f(c.marker, ">"), f(c.gutter, C), $.length > 0 ? ` ${$}` : "", v].join(""); + } else + return ` ${f(c.gutter, C)}${$.length > 0 ? ` ${$}` : ""}`; + }).join(` +`); + return y.message && !N && (P = `${" ".repeat(x + 1)}${y.message} +${P}`), h ? g.reset(P) : P; + } + function i(l, p2, y) { + let h = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; + if (!t2) { + t2 = true; + let c = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (wt.emitWarning) + wt.emitWarning(c, "DeprecationWarning"); + else { + let f = new Error(c); + f.name = "DeprecationWarning", console.warn(new Error(c)); + } + } + return y = Math.max(y, 0), u(l, { start: { column: y, line: p2 } }, h); + } + } }), tu = te({ "src/main/parser.js"(e, r) { + "use strict"; + ne(); + var { ConfigError: t2 } = Qt(), s = ut(), a = jm(), { locStart: n, locEnd: u } = s, i = Object.getOwnPropertyNames, l = Object.getOwnPropertyDescriptor; + function p2(g) { + let c = {}; + for (let f of g.plugins) + if (f.parsers) + for (let F of i(f.parsers)) + Object.defineProperty(c, F, l(f.parsers, F)); + return c; + } + function y(g) { + let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : p2(g); + if (typeof g.parser == "function") + return { parse: g.parser, astFormat: "estree", locStart: n, locEnd: u }; + if (typeof g.parser == "string") { + if (Object.prototype.hasOwnProperty.call(c, g.parser)) + return c[g.parser]; + throw new t2(`Couldn't resolve parser "${g.parser}". Parsers must be explicitly added to the standalone bundle.`); + } + } + function h(g, c) { + let f = p2(c), F = Object.defineProperties({}, Object.fromEntries(Object.keys(f).map((w) => [w, { enumerable: true, get() { + return f[w].parse; + } }]))), _ = y(c, f); + try { + return _.preprocess && (g = _.preprocess(g, c)), { text: g, ast: _.parse(g, F, c) }; + } catch (w) { + let { loc: E } = w; + if (E) { + let { codeFrameColumns: N } = Mm(); + throw w.codeFrame = N(g, E, { highlightCode: true }), w.message += ` +` + w.codeFrame, w; + } + throw w; + } + } + r.exports = { parse: h, resolveParser: y }; + } }), uo = te({ "src/main/options.js"(e, r) { + "use strict"; + ne(); + var t2 = ZD(), { UndefinedParserError: s } = Qt(), { getSupportInfo: a } = Xn(), n = Om(), { resolveParser: u } = tu(), i = { astFormat: "estree", printer: {}, originalText: void 0, locStart: null, locEnd: null }; + function l(h) { + let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = Object.assign({}, h), f = a({ plugins: h.plugins, showUnreleased: true, showDeprecated: true }).options, F = Object.assign(Object.assign({}, i), Object.fromEntries(f.filter((x) => x.default !== void 0).map((x) => [x.name, x.default]))); + if (!c.parser) { + if (!c.filepath) + (g.logger || console).warn("No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred."), c.parser = "babel"; + else if (c.parser = y(c.filepath, c.plugins), !c.parser) + throw new s(`No parser could be inferred for file: ${c.filepath}`); + } + let _ = u(n.normalizeApiOptions(c, [f.find((x) => x.name === "parser")], { passThrough: true, logger: false })); + c.astFormat = _.astFormat, c.locEnd = _.locEnd, c.locStart = _.locStart; + let w = p2(c); + c.printer = w.printers[c.astFormat]; + let E = Object.fromEntries(f.filter((x) => x.pluginDefaults && x.pluginDefaults[w.name] !== void 0).map((x) => [x.name, x.pluginDefaults[w.name]])), N = Object.assign(Object.assign({}, F), E); + for (let [x, I] of Object.entries(N)) + (c[x] === null || c[x] === void 0) && (c[x] = I); + return c.parser === "json" && (c.trailingComma = "none"), n.normalizeApiOptions(c, f, Object.assign({ passThrough: Object.keys(i) }, g)); + } + function p2(h) { + let { astFormat: g } = h; + if (!g) + throw new Error("getPlugin() requires astFormat to be set"); + let c = h.plugins.find((f) => f.printers && f.printers[g]); + if (!c) + throw new Error(`Couldn't find plugin for AST format "${g}"`); + return c; + } + function y(h, g) { + let c = t2.basename(h).toLowerCase(), F = a({ plugins: g }).languages.filter((_) => _.since !== null).find((_) => _.extensions && _.extensions.some((w) => c.endsWith(w)) || _.filenames && _.filenames.some((w) => w.toLowerCase() === c)); + return F && F.parsers[0]; + } + r.exports = { normalize: l, hiddenDefaults: i, inferParser: y }; + } }), Rm = te({ "src/main/massage-ast.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n) { + if (Array.isArray(s)) + return s.map((p2) => t2(p2, a, n)).filter(Boolean); + if (!s || typeof s != "object") + return s; + let u = a.printer.massageAstNode, i; + u && u.ignoredProperties ? i = u.ignoredProperties : i = /* @__PURE__ */ new Set(); + let l = {}; + for (let [p2, y] of Object.entries(s)) + !i.has(p2) && typeof y != "function" && (l[p2] = t2(y, a, s)); + if (u) { + let p2 = u(s, l, n); + if (p2 === null) + return; + if (p2) + return p2; + } + return l; + } + r.exports = t2; + } }), Zt = te({ "scripts/build/shims/assert.cjs"(e, r) { + "use strict"; + ne(); + var t2 = () => { + }; + t2.ok = t2, t2.strictEqual = t2, r.exports = t2; + } }), et = te({ "src/main/comments.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { builders: { line: s, hardline: a, breakParent: n, indent: u, lineSuffix: i, join: l, cursor: p2 } } = qe(), { hasNewline: y, skipNewline: h, skipSpaces: g, isPreviousLineEmpty: c, addLeadingComment: f, addDanglingComment: F, addTrailingComment: _ } = Ue(), w = /* @__PURE__ */ new WeakMap(); + function E(k, M, R) { + if (!k) + return; + let { printer: q, locStart: J, locEnd: L } = M; + if (R) { + if (q.canAttachComment && q.canAttachComment(k)) { + let V; + for (V = R.length - 1; V >= 0 && !(J(R[V]) <= J(k) && L(R[V]) <= L(k)); --V) + ; + R.splice(V + 1, 0, k); + return; + } + } else if (w.has(k)) + return w.get(k); + let Q = q.getCommentChildNodes && q.getCommentChildNodes(k, M) || typeof k == "object" && Object.entries(k).filter((V) => { + let [j] = V; + return j !== "enclosingNode" && j !== "precedingNode" && j !== "followingNode" && j !== "tokens" && j !== "comments" && j !== "parent"; + }).map((V) => { + let [, j] = V; + return j; + }); + if (Q) { + R || (R = [], w.set(k, R)); + for (let V of Q) + E(V, M, R); + return R; + } + } + function N(k, M, R, q) { + let { locStart: J, locEnd: L } = R, Q = J(M), V = L(M), j = E(k, R), Y, ie, ee = 0, ce = j.length; + for (; ee < ce; ) { + let W = ee + ce >> 1, K = j[W], de = J(K), ue = L(K); + if (de <= Q && V <= ue) + return N(K, M, R, K); + if (ue <= Q) { + Y = K, ee = W + 1; + continue; + } + if (V <= de) { + ie = K, ce = W; + continue; + } + throw new Error("Comment location overlaps with node location"); + } + if (q && q.type === "TemplateLiteral") { + let { quasis: W } = q, K = C(W, M, R); + Y && C(W, Y, R) !== K && (Y = null), ie && C(W, ie, R) !== K && (ie = null); + } + return { enclosingNode: q, precedingNode: Y, followingNode: ie }; + } + var x = () => false; + function I(k, M, R, q) { + if (!Array.isArray(k)) + return; + let J = [], { locStart: L, locEnd: Q, printer: { handleComments: V = {} } } = q, { avoidAstMutation: j, ownLine: Y = x, endOfLine: ie = x, remaining: ee = x } = V, ce = k.map((W, K) => Object.assign(Object.assign({}, N(M, W, q)), {}, { comment: W, text: R, options: q, ast: M, isLastComment: k.length - 1 === K })); + for (let [W, K] of ce.entries()) { + let { comment: de, precedingNode: ue, enclosingNode: Fe, followingNode: z, text: U, options: Z, ast: se, isLastComment: fe } = K; + if (Z.parser === "json" || Z.parser === "json5" || Z.parser === "__js_expression" || Z.parser === "__vue_expression" || Z.parser === "__vue_ts_expression") { + if (L(de) - L(se) <= 0) { + f(se, de); + continue; + } + if (Q(de) - Q(se) >= 0) { + _(se, de); + continue; + } + } + let ge; + if (j ? ge = [K] : (de.enclosingNode = Fe, de.precedingNode = ue, de.followingNode = z, ge = [de, U, Z, se, fe]), $(U, Z, ce, W)) + de.placement = "ownLine", Y(...ge) || (z ? f(z, de) : ue ? _(ue, de) : F(Fe || se, de)); + else if (D(U, Z, ce, W)) + de.placement = "endOfLine", ie(...ge) || (ue ? _(ue, de) : z ? f(z, de) : F(Fe || se, de)); + else if (de.placement = "remaining", !ee(...ge)) + if (ue && z) { + let he = J.length; + he > 0 && J[he - 1].followingNode !== z && T(J, U, Z), J.push(K); + } else + ue ? _(ue, de) : z ? f(z, de) : F(Fe || se, de); + } + if (T(J, R, q), !j) + for (let W of k) + delete W.precedingNode, delete W.enclosingNode, delete W.followingNode; + } + var P = (k) => !/[\S\n\u2028\u2029]/.test(k); + function $(k, M, R, q) { + let { comment: J, precedingNode: L } = R[q], { locStart: Q, locEnd: V } = M, j = Q(J); + if (L) + for (let Y = q - 1; Y >= 0; Y--) { + let { comment: ie, precedingNode: ee } = R[Y]; + if (ee !== L || !P(k.slice(V(ie), j))) + break; + j = Q(ie); + } + return y(k, j, { backwards: true }); + } + function D(k, M, R, q) { + let { comment: J, followingNode: L } = R[q], { locStart: Q, locEnd: V } = M, j = V(J); + if (L) + for (let Y = q + 1; Y < R.length; Y++) { + let { comment: ie, followingNode: ee } = R[Y]; + if (ee !== L || !P(k.slice(j, Q(ie)))) + break; + j = V(ie); + } + return y(k, j); + } + function T(k, M, R) { + let q = k.length; + if (q === 0) + return; + let { precedingNode: J, followingNode: L, enclosingNode: Q } = k[0], V = R.printer.getGapRegex && R.printer.getGapRegex(Q) || /^[\s(]*$/, j = R.locStart(L), Y; + for (Y = q; Y > 0; --Y) { + let { comment: ie, precedingNode: ee, followingNode: ce } = k[Y - 1]; + t2.strictEqual(ee, J), t2.strictEqual(ce, L); + let W = M.slice(R.locEnd(ie), j); + if (V.test(W)) + j = R.locStart(ie); + else + break; + } + for (let [ie, { comment: ee }] of k.entries()) + ie < Y ? _(J, ee) : f(L, ee); + for (let ie of [J, L]) + ie.comments && ie.comments.length > 1 && ie.comments.sort((ee, ce) => R.locStart(ee) - R.locStart(ce)); + k.length = 0; + } + function m(k, M) { + let R = k.getValue(); + return R.printed = true, M.printer.printComment(k, M); + } + function C(k, M, R) { + let q = R.locStart(M) - 1; + for (let J = 1; J < k.length; ++J) + if (q < R.locStart(k[J])) + return J - 1; + return 0; + } + function o(k, M) { + let R = k.getValue(), q = [m(k, M)], { printer: J, originalText: L, locStart: Q, locEnd: V } = M; + if (J.isBlockComment && J.isBlockComment(R)) { + let ie = y(L, V(R)) ? y(L, Q(R), { backwards: true }) ? a : s : " "; + q.push(ie); + } else + q.push(a); + let Y = h(L, g(L, V(R))); + return Y !== false && y(L, Y) && q.push(a), q; + } + function d(k, M) { + let R = k.getValue(), q = m(k, M), { printer: J, originalText: L, locStart: Q } = M, V = J.isBlockComment && J.isBlockComment(R); + if (y(L, Q(R), { backwards: true })) { + let Y = c(L, R, Q); + return i([a, Y ? a : "", q]); + } + let j = [" ", q]; + return V || (j = [i(j), n]), j; + } + function v(k, M, R, q) { + let J = [], L = k.getValue(); + return !L || !L.comments || (k.each(() => { + let Q = k.getValue(); + !Q.leading && !Q.trailing && (!q || q(Q)) && J.push(m(k, M)); + }, "comments"), J.length === 0) ? "" : R ? l(a, J) : u([a, l(a, J)]); + } + function S(k, M, R) { + let q = k.getValue(); + if (!q) + return {}; + let J = q.comments || []; + R && (J = J.filter((j) => !R.has(j))); + let L = q === M.cursorNode; + if (J.length === 0) { + let j = L ? p2 : ""; + return { leading: j, trailing: j }; + } + let Q = [], V = []; + return k.each(() => { + let j = k.getValue(); + if (R && R.has(j)) + return; + let { leading: Y, trailing: ie } = j; + Y ? Q.push(o(k, M)) : ie && V.push(d(k, M)); + }, "comments"), L && (Q.unshift(p2), V.push(p2)), { leading: Q, trailing: V }; + } + function b(k, M, R, q) { + let { leading: J, trailing: L } = S(k, R, q); + return !J && !L ? M : [J, M, L]; + } + function B(k) { + if (k) + for (let M of k) { + if (!M.printed) + throw new Error('Comment "' + M.value.trim() + '" was not printed. Please report this error!'); + delete M.printed; + } + } + r.exports = { attach: I, printComments: b, printCommentsSeparately: S, printDanglingComments: v, getSortedChildNodes: E, ensureAllCommentsPrinted: B }; + } }), $m = te({ "src/common/ast-path.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(); + function s(u, i) { + let l = a(u.stack, i); + return l === -1 ? null : u.stack[l]; + } + function a(u, i) { + for (let l = u.length - 1; l >= 0; l -= 2) { + let p2 = u[l]; + if (p2 && !Array.isArray(p2) && --i < 0) + return l; + } + return -1; + } + var n = class { + constructor(u) { + this.stack = [u]; + } + getName() { + let { stack: u } = this, { length: i } = u; + return i > 1 ? u[i - 2] : null; + } + getValue() { + return t2(this.stack); + } + getNode() { + let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return s(this, u); + } + getParentNode() { + let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return s(this, u + 1); + } + call(u) { + let { stack: i } = this, { length: l } = i, p2 = t2(i); + for (var y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), g = 1; g < y; g++) + h[g - 1] = arguments[g]; + for (let f of h) + p2 = p2[f], i.push(f, p2); + let c = u(this); + return i.length = l, c; + } + callParent(u) { + let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, l = a(this.stack, i + 1), p2 = this.stack.splice(l + 1), y = u(this); + return this.stack.push(...p2), y; + } + each(u) { + let { stack: i } = this, { length: l } = i, p2 = t2(i); + for (var y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), g = 1; g < y; g++) + h[g - 1] = arguments[g]; + for (let c of h) + p2 = p2[c], i.push(c, p2); + for (let c = 0; c < p2.length; ++c) + i.push(c, p2[c]), u(this, c, p2), i.length -= 2; + i.length = l; + } + map(u) { + let i = []; + for (var l = arguments.length, p2 = new Array(l > 1 ? l - 1 : 0), y = 1; y < l; y++) + p2[y - 1] = arguments[y]; + return this.each((h, g, c) => { + i[g] = u(h, g, c); + }, ...p2), i; + } + try(u) { + let { stack: i } = this, l = [...i]; + try { + return u(); + } finally { + i.length = 0, i.push(...l); + } + } + match() { + let u = this.stack.length - 1, i = null, l = this.stack[u--]; + for (var p2 = arguments.length, y = new Array(p2), h = 0; h < p2; h++) + y[h] = arguments[h]; + for (let g of y) { + if (l === void 0) + return false; + let c = null; + if (typeof i == "number" && (c = i, i = this.stack[u--], l = this.stack[u--]), g && !g(l, i, c)) + return false; + i = this.stack[u--], l = this.stack[u--]; + } + return true; + } + findAncestor(u) { + let i = this.stack.length - 1, l = null, p2 = this.stack[i--]; + for (; p2; ) { + let y = null; + if (typeof l == "number" && (y = l, l = this.stack[i--], p2 = this.stack[i--]), l !== null && u(p2, l, y)) + return p2; + l = this.stack[i--], p2 = this.stack[i--]; + } + } + }; + r.exports = n; + } }), Vm = te({ "src/main/multiparser.js"(e, r) { + "use strict"; + ne(); + var { utils: { stripTrailingHardline: t2 } } = qe(), { normalize: s } = uo(), a = et(); + function n(i, l, p2, y) { + if (p2.printer.embed && p2.embeddedLanguageFormatting === "auto") + return p2.printer.embed(i, l, (h, g, c) => u(h, g, p2, y, c), p2); + } + function u(i, l, p2, y) { + let { stripTrailingHardline: h = false } = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, g = s(Object.assign(Object.assign(Object.assign({}, p2), l), {}, { parentParser: p2.parser, originalText: i }), { passThrough: true }), c = tu().parse(i, g), { ast: f } = c; + i = c.text; + let F = f.comments; + delete f.comments, a.attach(F, f, i, g), g[Symbol.for("comments")] = F || [], g[Symbol.for("tokens")] = f.tokens || []; + let _ = y(f, g); + return a.ensureAllCommentsPrinted(F), h ? typeof _ == "string" ? _.replace(/(?:\r?\n)*$/, "") : t2(_) : _; + } + r.exports = { printSubtree: n }; + } }), Wm = te({ "src/main/ast-to-doc.js"(e, r) { + "use strict"; + ne(); + var t2 = $m(), { builders: { hardline: s, addAlignmentToDoc: a }, utils: { propagateBreaks: n } } = qe(), { printComments: u } = et(), i = Vm(); + function l(h, g) { + let c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, { printer: f } = g; + f.preprocess && (h = f.preprocess(h, g)); + let F = /* @__PURE__ */ new Map(), _ = new t2(h), w = E(); + return c > 0 && (w = a([s, w], c, g.tabWidth)), n(w), w; + function E(x, I) { + return x === void 0 || x === _ ? N(I) : Array.isArray(x) ? _.call(() => N(I), ...x) : _.call(() => N(I), x); + } + function N(x) { + let I = _.getValue(), P = I && typeof I == "object" && x === void 0; + if (P && F.has(I)) + return F.get(I); + let $ = y(_, g, E, x); + return P && F.set(I, $), $; + } + } + function p2(h, g) { + let { originalText: c, [Symbol.for("comments")]: f, locStart: F, locEnd: _ } = g, w = F(h), E = _(h), N = /* @__PURE__ */ new Set(); + for (let x of f) + F(x) >= w && _(x) <= E && (x.printed = true, N.add(x)); + return { doc: c.slice(w, E), printedComments: N }; + } + function y(h, g, c, f) { + let F = h.getValue(), { printer: _ } = g, w, E; + if (_.hasPrettierIgnore && _.hasPrettierIgnore(h)) + ({ doc: w, printedComments: E } = p2(F, g)); + else { + if (F) + try { + w = i.printSubtree(h, c, g, l); + } catch (N) { + if (globalThis.PRETTIER_DEBUG) + throw N; + } + w || (w = _.print(h, g, c, f)); + } + return (!_.willPrintOwnComments || !_.willPrintOwnComments(h, g)) && (w = u(h, w, g, E)), w; + } + r.exports = l; + } }), Hm = te({ "src/main/range-util.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), s = et(), a = (f) => { + let { parser: F } = f; + return F === "json" || F === "json5" || F === "json-stringify"; + }; + function n(f, F) { + let _ = [f.node, ...f.parentNodes], w = /* @__PURE__ */ new Set([F.node, ...F.parentNodes]); + return _.find((E) => y.has(E.type) && w.has(E)); + } + function u(f) { + let F = f.length - 1; + for (; ; ) { + let _ = f[F]; + if (_ && (_.type === "Program" || _.type === "File")) + F--; + else + break; + } + return f.slice(0, F + 1); + } + function i(f, F, _) { + let { locStart: w, locEnd: E } = _, N = f.node, x = F.node; + if (N === x) + return { startNode: N, endNode: x }; + let I = w(f.node); + for (let $ of u(F.parentNodes)) + if (w($) >= I) + x = $; + else + break; + let P = E(F.node); + for (let $ of u(f.parentNodes)) { + if (E($) <= P) + N = $; + else + break; + if (N === x) + break; + } + return { startNode: N, endNode: x }; + } + function l(f, F, _, w) { + let E = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [], N = arguments.length > 5 ? arguments[5] : void 0, { locStart: x, locEnd: I } = _, P = x(f), $ = I(f); + if (!(F > $ || F < P || N === "rangeEnd" && F === P || N === "rangeStart" && F === $)) { + for (let D of s.getSortedChildNodes(f, _)) { + let T = l(D, F, _, w, [f, ...E], N); + if (T) + return T; + } + if (!w || w(f, E[0])) + return { node: f, parentNodes: E }; + } + } + function p2(f, F) { + return F !== "DeclareExportDeclaration" && f !== "TypeParameterDeclaration" && (f === "Directive" || f === "TypeAlias" || f === "TSExportAssignment" || f.startsWith("Declare") || f.startsWith("TSDeclare") || f.endsWith("Statement") || f.endsWith("Declaration")); + } + var y = /* @__PURE__ */ new Set(["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]), h = /* @__PURE__ */ new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]); + function g(f, F, _) { + if (!F) + return false; + switch (f.parser) { + case "flow": + case "babel": + case "babel-flow": + case "babel-ts": + case "typescript": + case "acorn": + case "espree": + case "meriyah": + case "__babel_estree": + return p2(F.type, _ && _.type); + case "json": + case "json5": + case "json-stringify": + return y.has(F.type); + case "graphql": + return h.has(F.kind); + case "vue": + return F.tag !== "root"; + } + return false; + } + function c(f, F, _) { + let { rangeStart: w, rangeEnd: E, locStart: N, locEnd: x } = F; + t2.ok(E > w); + let I = f.slice(w, E).search(/\S/), P = I === -1; + if (!P) + for (w += I; E > w && !/\S/.test(f[E - 1]); --E) + ; + let $ = l(_, w, F, (C, o) => g(F, C, o), [], "rangeStart"), D = P ? $ : l(_, E, F, (C) => g(F, C), [], "rangeEnd"); + if (!$ || !D) + return { rangeStart: 0, rangeEnd: 0 }; + let T, m; + if (a(F)) { + let C = n($, D); + T = C, m = C; + } else + ({ startNode: T, endNode: m } = i($, D, F)); + return { rangeStart: Math.min(N(T), N(m)), rangeEnd: Math.max(x(T), x(m)) }; + } + r.exports = { calculateRange: c, findNodeAtOffset: l }; + } }), Gm = te({ "src/main/core.js"(e, r) { + "use strict"; + ne(); + var { diffArrays: t2 } = BD(), { printer: { printDocToString: s }, debug: { printDocToDebug: a } } = qe(), { getAlignmentSize: n } = Ue(), { guessEndOfLine: u, convertEndOfLineToChars: i, countEndOfLineChars: l, normalizeEndOfLine: p2 } = Jn(), y = uo().normalize, h = Rm(), g = et(), c = tu(), f = Wm(), F = Hm(), _ = "\uFEFF", w = Symbol("cursor"); + function E(m, C, o) { + let d = C.comments; + return d && (delete C.comments, g.attach(d, C, m, o)), o[Symbol.for("comments")] = d || [], o[Symbol.for("tokens")] = C.tokens || [], o.originalText = m, d; + } + function N(m, C) { + let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0; + if (!m || m.trim().length === 0) + return { formatted: "", cursorOffset: -1, comments: [] }; + let { ast: d, text: v } = c.parse(m, C); + if (C.cursorOffset >= 0) { + let k = F.findNodeAtOffset(d, C.cursorOffset, C); + k && k.node && (C.cursorNode = k.node); + } + let S = E(v, d, C), b = f(d, C, o), B = s(b, C); + if (g.ensureAllCommentsPrinted(S), o > 0) { + let k = B.formatted.trim(); + B.cursorNodeStart !== void 0 && (B.cursorNodeStart -= B.formatted.indexOf(k)), B.formatted = k + i(C.endOfLine); + } + if (C.cursorOffset >= 0) { + let k, M, R, q, J; + if (C.cursorNode && B.cursorNodeText ? (k = C.locStart(C.cursorNode), M = v.slice(k, C.locEnd(C.cursorNode)), R = C.cursorOffset - k, q = B.cursorNodeStart, J = B.cursorNodeText) : (k = 0, M = v, R = C.cursorOffset, q = 0, J = B.formatted), M === J) + return { formatted: B.formatted, cursorOffset: q + R, comments: S }; + let L = [...M]; + L.splice(R, 0, w); + let Q = [...J], V = t2(L, Q), j = q; + for (let Y of V) + if (Y.removed) { + if (Y.value.includes(w)) + break; + } else + j += Y.count; + return { formatted: B.formatted, cursorOffset: j, comments: S }; + } + return { formatted: B.formatted, cursorOffset: -1, comments: S }; + } + function x(m, C) { + let { ast: o, text: d } = c.parse(m, C), { rangeStart: v, rangeEnd: S } = F.calculateRange(d, C, o), b = d.slice(v, S), B = Math.min(v, d.lastIndexOf(` +`, v) + 1), k = d.slice(B, v).match(/^\s*/)[0], M = n(k, C.tabWidth), R = N(b, Object.assign(Object.assign({}, C), {}, { rangeStart: 0, rangeEnd: Number.POSITIVE_INFINITY, cursorOffset: C.cursorOffset > v && C.cursorOffset <= S ? C.cursorOffset - v : -1, endOfLine: "lf" }), M), q = R.formatted.trimEnd(), { cursorOffset: J } = C; + J > S ? J += q.length - b.length : R.cursorOffset >= 0 && (J = R.cursorOffset + v); + let L = d.slice(0, v) + q + d.slice(S); + if (C.endOfLine !== "lf") { + let Q = i(C.endOfLine); + J >= 0 && Q === `\r +` && (J += l(L.slice(0, J), ` +`)), L = L.replace(/\n/g, Q); + } + return { formatted: L, cursorOffset: J, comments: R.comments }; + } + function I(m, C, o) { + return typeof C != "number" || Number.isNaN(C) || C < 0 || C > m.length ? o : C; + } + function P(m, C) { + let { cursorOffset: o, rangeStart: d, rangeEnd: v } = C; + return o = I(m, o, -1), d = I(m, d, 0), v = I(m, v, m.length), Object.assign(Object.assign({}, C), {}, { cursorOffset: o, rangeStart: d, rangeEnd: v }); + } + function $(m, C) { + let { cursorOffset: o, rangeStart: d, rangeEnd: v, endOfLine: S } = P(m, C), b = m.charAt(0) === _; + if (b && (m = m.slice(1), o--, d--, v--), S === "auto" && (S = u(m)), m.includes("\r")) { + let B = (k) => l(m.slice(0, Math.max(k, 0)), `\r +`); + o -= B(o), d -= B(d), v -= B(v), m = p2(m); + } + return { hasBOM: b, text: m, options: P(m, Object.assign(Object.assign({}, C), {}, { cursorOffset: o, rangeStart: d, rangeEnd: v, endOfLine: S })) }; + } + function D(m, C) { + let o = c.resolveParser(C); + return !o.hasPragma || o.hasPragma(m); + } + function T(m, C) { + let { hasBOM: o, text: d, options: v } = $(m, y(C)); + if (v.rangeStart >= v.rangeEnd && d !== "" || v.requirePragma && !D(d, v)) + return { formatted: m, cursorOffset: C.cursorOffset, comments: [] }; + let S; + return v.rangeStart > 0 || v.rangeEnd < d.length ? S = x(d, v) : (!v.requirePragma && v.insertPragma && v.printer.insertPragma && !D(d, v) && (d = v.printer.insertPragma(d)), S = N(d, v)), o && (S.formatted = _ + S.formatted, S.cursorOffset >= 0 && S.cursorOffset++), S; + } + r.exports = { formatWithCursor: T, parse(m, C, o) { + let { text: d, options: v } = $(m, y(C)), S = c.parse(d, v); + return o && (S.ast = h(S.ast, v)), S; + }, formatAST(m, C) { + C = y(C); + let o = f(m, C); + return s(o, C); + }, formatDoc(m, C) { + return T(a(m), Object.assign(Object.assign({}, C), {}, { parser: "__js_expression" })).formatted; + }, printToDoc(m, C) { + C = y(C); + let { ast: o, text: d } = c.parse(m, C); + return E(d, o, C), f(o, C); + }, printDocToString(m, C) { + return s(m, y(C)); + } }; + } }), Um = te({ "src/common/util-shared.js"(e, r) { + "use strict"; + ne(); + var { getMaxContinuousCount: t2, getStringWidth: s, getAlignmentSize: a, getIndentSize: n, skip: u, skipWhitespace: i, skipSpaces: l, skipNewline: p2, skipToLineEnd: y, skipEverythingButNewLine: h, skipInlineComment: g, skipTrailingComment: c, hasNewline: f, hasNewlineInRange: F, hasSpaces: _, isNextLineEmpty: w, isNextLineEmptyAfterIndex: E, isPreviousLineEmpty: N, getNextNonSpaceNonCommentCharacterIndex: x, makeString: I, addLeadingComment: P, addDanglingComment: $, addTrailingComment: D } = Ue(); + r.exports = { getMaxContinuousCount: t2, getStringWidth: s, getAlignmentSize: a, getIndentSize: n, skip: u, skipWhitespace: i, skipSpaces: l, skipNewline: p2, skipToLineEnd: y, skipEverythingButNewLine: h, skipInlineComment: g, skipTrailingComment: c, hasNewline: f, hasNewlineInRange: F, hasSpaces: _, isNextLineEmpty: w, isNextLineEmptyAfterIndex: E, isPreviousLineEmpty: N, getNextNonSpaceNonCommentCharacterIndex: x, makeString: I, addLeadingComment: P, addDanglingComment: $, addTrailingComment: D }; + } }), _t = te({ "src/utils/create-language.js"(e, r) { + "use strict"; + ne(), r.exports = function(t2, s) { + let { languageId: a } = t2, n = Hn(t2, CD); + return Object.assign(Object.assign({ linguistLanguageId: a }, n), s(t2)); + }; + } }), Jm = te({ "node_modules/esutils/lib/ast.js"(e, r) { + ne(), function() { + "use strict"; + function t2(l) { + if (l == null) + return false; + switch (l.type) { + case "ArrayExpression": + case "AssignmentExpression": + case "BinaryExpression": + case "CallExpression": + case "ConditionalExpression": + case "FunctionExpression": + case "Identifier": + case "Literal": + case "LogicalExpression": + case "MemberExpression": + case "NewExpression": + case "ObjectExpression": + case "SequenceExpression": + case "ThisExpression": + case "UnaryExpression": + case "UpdateExpression": + return true; + } + return false; + } + function s(l) { + if (l == null) + return false; + switch (l.type) { + case "DoWhileStatement": + case "ForInStatement": + case "ForStatement": + case "WhileStatement": + return true; + } + return false; + } + function a(l) { + if (l == null) + return false; + switch (l.type) { + case "BlockStatement": + case "BreakStatement": + case "ContinueStatement": + case "DebuggerStatement": + case "DoWhileStatement": + case "EmptyStatement": + case "ExpressionStatement": + case "ForInStatement": + case "ForStatement": + case "IfStatement": + case "LabeledStatement": + case "ReturnStatement": + case "SwitchStatement": + case "ThrowStatement": + case "TryStatement": + case "VariableDeclaration": + case "WhileStatement": + case "WithStatement": + return true; + } + return false; + } + function n(l) { + return a(l) || l != null && l.type === "FunctionDeclaration"; + } + function u(l) { + switch (l.type) { + case "IfStatement": + return l.alternate != null ? l.alternate : l.consequent; + case "LabeledStatement": + case "ForStatement": + case "ForInStatement": + case "WhileStatement": + case "WithStatement": + return l.body; + } + return null; + } + function i(l) { + var p2; + if (l.type !== "IfStatement" || l.alternate == null) + return false; + p2 = l.consequent; + do { + if (p2.type === "IfStatement" && p2.alternate == null) + return true; + p2 = u(p2); + } while (p2); + return false; + } + r.exports = { isExpression: t2, isStatement: a, isIterationStatement: s, isSourceElement: n, isProblematicIfStatement: i, trailingStatement: u }; + }(); + } }), so = te({ "node_modules/esutils/lib/code.js"(e, r) { + ne(), function() { + "use strict"; + var t2, s, a, n, u, i; + s = { NonAsciiIdentifierStart: /[\xAA\xB5\xBA\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\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\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\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-\uAB65\uAB70-\uABE2\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ }, t2 = { NonAsciiIdentifierStart: /[\xAA\xB5\xBA\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\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\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\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-\uAB65\uAB70-\uABE2\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\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\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\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]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\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\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\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]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ }; + function l(E) { + return 48 <= E && E <= 57; + } + function p2(E) { + return 48 <= E && E <= 57 || 97 <= E && E <= 102 || 65 <= E && E <= 70; + } + function y(E) { + return E >= 48 && E <= 55; + } + a = [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279]; + function h(E) { + return E === 32 || E === 9 || E === 11 || E === 12 || E === 160 || E >= 5760 && a.indexOf(E) >= 0; + } + function g(E) { + return E === 10 || E === 13 || E === 8232 || E === 8233; + } + function c(E) { + if (E <= 65535) + return String.fromCharCode(E); + var N = String.fromCharCode(Math.floor((E - 65536) / 1024) + 55296), x = String.fromCharCode((E - 65536) % 1024 + 56320); + return N + x; + } + for (n = new Array(128), i = 0; i < 128; ++i) + n[i] = i >= 97 && i <= 122 || i >= 65 && i <= 90 || i === 36 || i === 95; + for (u = new Array(128), i = 0; i < 128; ++i) + u[i] = i >= 97 && i <= 122 || i >= 65 && i <= 90 || i >= 48 && i <= 57 || i === 36 || i === 95; + function f(E) { + return E < 128 ? n[E] : s.NonAsciiIdentifierStart.test(c(E)); + } + function F(E) { + return E < 128 ? u[E] : s.NonAsciiIdentifierPart.test(c(E)); + } + function _(E) { + return E < 128 ? n[E] : t2.NonAsciiIdentifierStart.test(c(E)); + } + function w(E) { + return E < 128 ? u[E] : t2.NonAsciiIdentifierPart.test(c(E)); + } + r.exports = { isDecimalDigit: l, isHexDigit: p2, isOctalDigit: y, isWhiteSpace: h, isLineTerminator: g, isIdentifierStartES5: f, isIdentifierPartES5: F, isIdentifierStartES6: _, isIdentifierPartES6: w }; + }(); + } }), zm = te({ "node_modules/esutils/lib/keyword.js"(e, r) { + ne(), function() { + "use strict"; + var t2 = so(); + function s(f) { + switch (f) { + case "implements": + case "interface": + case "package": + case "private": + case "protected": + case "public": + case "static": + case "let": + return true; + default: + return false; + } + } + function a(f, F) { + return !F && f === "yield" ? false : n(f, F); + } + function n(f, F) { + if (F && s(f)) + return true; + switch (f.length) { + case 2: + return f === "if" || f === "in" || f === "do"; + case 3: + return f === "var" || f === "for" || f === "new" || f === "try"; + case 4: + return f === "this" || f === "else" || f === "case" || f === "void" || f === "with" || f === "enum"; + case 5: + return f === "while" || f === "break" || f === "catch" || f === "throw" || f === "const" || f === "yield" || f === "class" || f === "super"; + case 6: + return f === "return" || f === "typeof" || f === "delete" || f === "switch" || f === "export" || f === "import"; + case 7: + return f === "default" || f === "finally" || f === "extends"; + case 8: + return f === "function" || f === "continue" || f === "debugger"; + case 10: + return f === "instanceof"; + default: + return false; + } + } + function u(f, F) { + return f === "null" || f === "true" || f === "false" || a(f, F); + } + function i(f, F) { + return f === "null" || f === "true" || f === "false" || n(f, F); + } + function l(f) { + return f === "eval" || f === "arguments"; + } + function p2(f) { + var F, _, w; + if (f.length === 0 || (w = f.charCodeAt(0), !t2.isIdentifierStartES5(w))) + return false; + for (F = 1, _ = f.length; F < _; ++F) + if (w = f.charCodeAt(F), !t2.isIdentifierPartES5(w)) + return false; + return true; + } + function y(f, F) { + return (f - 55296) * 1024 + (F - 56320) + 65536; + } + function h(f) { + var F, _, w, E, N; + if (f.length === 0) + return false; + for (N = t2.isIdentifierStartES6, F = 0, _ = f.length; F < _; ++F) { + if (w = f.charCodeAt(F), 55296 <= w && w <= 56319) { + if (++F, F >= _ || (E = f.charCodeAt(F), !(56320 <= E && E <= 57343))) + return false; + w = y(w, E); + } + if (!N(w)) + return false; + N = t2.isIdentifierPartES6; + } + return true; + } + function g(f, F) { + return p2(f) && !u(f, F); + } + function c(f, F) { + return h(f) && !i(f, F); + } + r.exports = { isKeywordES5: a, isKeywordES6: n, isReservedWordES5: u, isReservedWordES6: i, isRestrictedWord: l, isIdentifierNameES5: p2, isIdentifierNameES6: h, isIdentifierES5: g, isIdentifierES6: c }; + }(); + } }), Xm = te({ "node_modules/esutils/lib/utils.js"(e) { + ne(), function() { + "use strict"; + e.ast = Jm(), e.code = so(), e.keyword = zm(); + }(); + } }), Pt = te({ "src/language-js/utils/is-block-comment.js"(e, r) { + "use strict"; + ne(); + var t2 = /* @__PURE__ */ new Set(["Block", "CommentBlock", "MultiLine"]), s = (a) => t2.has(a == null ? void 0 : a.type); + r.exports = s; + } }), Km = te({ "src/language-js/utils/is-node-matches.js"(e, r) { + "use strict"; + ne(); + function t2(a, n) { + let u = n.split("."); + for (let i = u.length - 1; i >= 0; i--) { + let l = u[i]; + if (i === 0) + return a.type === "Identifier" && a.name === l; + if (a.type !== "MemberExpression" || a.optional || a.computed || a.property.type !== "Identifier" || a.property.name !== l) + return false; + a = a.object; + } + } + function s(a, n) { + return n.some((u) => t2(a, u)); + } + r.exports = s; + } }), Ke = te({ "src/language-js/utils/index.js"(e, r) { + "use strict"; + ne(); + var t2 = Xm().keyword.isIdentifierNameES5, { getLast: s, hasNewline: a, skipWhitespace: n, isNonEmptyArray: u, isNextLineEmptyAfterIndex: i, getStringWidth: l } = Ue(), { locStart: p2, locEnd: y, hasSameLocStart: h } = ut(), g = Pt(), c = Km(), f = "(?:(?=.)\\s)", F = new RegExp(`^${f}*:`), _ = new RegExp(`^${f}*::`); + function w(O) { + var me, _e; + return ((me = O.extra) === null || me === void 0 ? void 0 : me.parenthesized) && g((_e = O.trailingComments) === null || _e === void 0 ? void 0 : _e[0]) && F.test(O.trailingComments[0].value); + } + function E(O) { + let me = O == null ? void 0 : O[0]; + return g(me) && _.test(me.value); + } + function N(O, me) { + if (!O || typeof O != "object") + return false; + if (Array.isArray(O)) + return O.some((He) => N(He, me)); + let _e = me(O); + return typeof _e == "boolean" ? _e : Object.values(O).some((He) => N(He, me)); + } + function x(O) { + return O.type === "AssignmentExpression" || O.type === "BinaryExpression" || O.type === "LogicalExpression" || O.type === "NGPipeExpression" || O.type === "ConditionalExpression" || de(O) || ue(O) || O.type === "SequenceExpression" || O.type === "TaggedTemplateExpression" || O.type === "BindExpression" || O.type === "UpdateExpression" && !O.prefix || st(O) || O.type === "TSNonNullExpression"; + } + function I(O) { + var me, _e, He, Ge, it, Qe; + return O.expressions ? O.expressions[0] : (me = (_e = (He = (Ge = (it = (Qe = O.left) !== null && Qe !== void 0 ? Qe : O.test) !== null && it !== void 0 ? it : O.callee) !== null && Ge !== void 0 ? Ge : O.object) !== null && He !== void 0 ? He : O.tag) !== null && _e !== void 0 ? _e : O.argument) !== null && me !== void 0 ? me : O.expression; + } + function P(O, me) { + if (me.expressions) + return ["expressions", 0]; + if (me.left) + return ["left"]; + if (me.test) + return ["test"]; + if (me.object) + return ["object"]; + if (me.callee) + return ["callee"]; + if (me.tag) + return ["tag"]; + if (me.argument) + return ["argument"]; + if (me.expression) + return ["expression"]; + throw new Error("Unexpected node has no left side."); + } + function $(O) { + return O = new Set(O), (me) => O.has(me == null ? void 0 : me.type); + } + var D = $(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose"]), T = $(["ExportDefaultDeclaration", "ExportDefaultSpecifier", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration"]); + function m(O) { + let me = O.getParentNode(); + return O.getName() === "declaration" && T(me) ? me : null; + } + var C = $(["BooleanLiteral", "DirectiveLiteral", "Literal", "NullLiteral", "NumericLiteral", "BigIntLiteral", "DecimalLiteral", "RegExpLiteral", "StringLiteral", "TemplateLiteral", "TSTypeLiteral", "JSXText"]); + function o(O) { + return O.type === "NumericLiteral" || O.type === "Literal" && typeof O.value == "number"; + } + function d(O) { + return O.type === "UnaryExpression" && (O.operator === "+" || O.operator === "-") && o(O.argument); + } + function v(O) { + return O.type === "StringLiteral" || O.type === "Literal" && typeof O.value == "string"; + } + var S = $(["ObjectTypeAnnotation", "TSTypeLiteral", "TSMappedType"]), b = $(["FunctionExpression", "ArrowFunctionExpression"]); + function B(O) { + return O.type === "FunctionExpression" || O.type === "ArrowFunctionExpression" && O.body.type === "BlockStatement"; + } + function k(O) { + return de(O) && O.callee.type === "Identifier" && ["async", "inject", "fakeAsync", "waitForAsync"].includes(O.callee.name); + } + var M = $(["JSXElement", "JSXFragment"]); + function R(O, me) { + if (O.parentParser !== "markdown" && O.parentParser !== "mdx") + return false; + let _e = me.getNode(); + if (!_e.expression || !M(_e.expression)) + return false; + let He = me.getParentNode(); + return He.type === "Program" && He.body.length === 1; + } + function q(O) { + return O.kind === "get" || O.kind === "set"; + } + function J(O) { + return q(O) || h(O, O.value); + } + function L(O) { + return (O.type === "ObjectTypeProperty" || O.type === "ObjectTypeInternalSlot") && O.value.type === "FunctionTypeAnnotation" && !O.static && !J(O); + } + function Q(O) { + return (O.type === "TypeAnnotation" || O.type === "TSTypeAnnotation") && O.typeAnnotation.type === "FunctionTypeAnnotation" && !O.static && !h(O, O.typeAnnotation); + } + var V = $(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]); + function j(O) { + return ue(O) || O.type === "BindExpression" && Boolean(O.object); + } + var Y = /* @__PURE__ */ new Set(["AnyTypeAnnotation", "TSAnyKeyword", "NullLiteralTypeAnnotation", "TSNullKeyword", "ThisTypeAnnotation", "TSThisType", "NumberTypeAnnotation", "TSNumberKeyword", "VoidTypeAnnotation", "TSVoidKeyword", "BooleanTypeAnnotation", "TSBooleanKeyword", "BigIntTypeAnnotation", "TSBigIntKeyword", "SymbolTypeAnnotation", "TSSymbolKeyword", "StringTypeAnnotation", "TSStringKeyword", "BooleanLiteralTypeAnnotation", "StringLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "TSLiteralType", "TSTemplateLiteralType", "EmptyTypeAnnotation", "MixedTypeAnnotation", "TSNeverKeyword", "TSObjectKeyword", "TSUndefinedKeyword", "TSUnknownKeyword"]); + function ie(O) { + return O ? !!((O.type === "GenericTypeAnnotation" || O.type === "TSTypeReference") && !O.typeParameters || Y.has(O.type)) : false; + } + function ee(O) { + let me = /^(?:before|after)(?:Each|All)$/; + return O.callee.type === "Identifier" && me.test(O.callee.name) && O.arguments.length === 1; + } + var ce = ["it", "it.only", "it.skip", "describe", "describe.only", "describe.skip", "test", "test.only", "test.skip", "test.step", "test.describe", "test.describe.only", "test.describe.parallel", "test.describe.parallel.only", "test.describe.serial", "test.describe.serial.only", "skip", "xit", "xdescribe", "xtest", "fit", "fdescribe", "ftest"]; + function W(O) { + return c(O, ce); + } + function K(O, me) { + if (O.type !== "CallExpression") + return false; + if (O.arguments.length === 1) { + if (k(O) && me && K(me)) + return b(O.arguments[0]); + if (ee(O)) + return k(O.arguments[0]); + } else if ((O.arguments.length === 2 || O.arguments.length === 3) && (O.arguments[0].type === "TemplateLiteral" || v(O.arguments[0])) && W(O.callee)) + return O.arguments[2] && !o(O.arguments[2]) ? false : (O.arguments.length === 2 ? b(O.arguments[1]) : B(O.arguments[1]) && ve(O.arguments[1]).length <= 1) || k(O.arguments[1]); + return false; + } + var de = $(["CallExpression", "OptionalCallExpression"]), ue = $(["MemberExpression", "OptionalMemberExpression"]); + function Fe(O) { + let me = "expressions"; + O.type === "TSTemplateLiteralType" && (me = "types"); + let _e = O[me]; + return _e.length === 0 ? false : _e.every((He) => { + if (Me(He)) + return false; + if (He.type === "Identifier" || He.type === "ThisExpression") + return true; + if (ue(He)) { + let Ge = He; + for (; ue(Ge); ) + if (Ge.property.type !== "Identifier" && Ge.property.type !== "Literal" && Ge.property.type !== "StringLiteral" && Ge.property.type !== "NumericLiteral" || (Ge = Ge.object, Me(Ge))) + return false; + return Ge.type === "Identifier" || Ge.type === "ThisExpression"; + } + return false; + }); + } + function z(O, me) { + return O === "+" || O === "-" ? O + me : me; + } + function U(O, me) { + let _e = p2(me), He = n(O, y(me)); + return He !== false && O.slice(_e, _e + 2) === "/*" && O.slice(He, He + 2) === "*/"; + } + function Z(O, me) { + return M(me) ? Oe(me) : Me(me, Te.Leading, (_e) => a(O, y(_e))); + } + function se(O, me) { + return me.parser !== "json" && v(O.key) && oe(O.key).slice(1, -1) === O.key.value && (t2(O.key.value) && !(me.parser === "babel-ts" && O.type === "ClassProperty" || me.parser === "typescript" && O.type === "PropertyDefinition") || fe(O.key.value) && String(Number(O.key.value)) === O.key.value && (me.parser === "babel" || me.parser === "acorn" || me.parser === "espree" || me.parser === "meriyah" || me.parser === "__babel_estree")); + } + function fe(O) { + return /^(?:\d+|\d+\.\d+)$/.test(O); + } + function ge(O, me) { + let _e = /^[fx]?(?:describe|it|test)$/; + return me.type === "TaggedTemplateExpression" && me.quasi === O && me.tag.type === "MemberExpression" && me.tag.property.type === "Identifier" && me.tag.property.name === "each" && (me.tag.object.type === "Identifier" && _e.test(me.tag.object.name) || me.tag.object.type === "MemberExpression" && me.tag.object.property.type === "Identifier" && (me.tag.object.property.name === "only" || me.tag.object.property.name === "skip") && me.tag.object.object.type === "Identifier" && _e.test(me.tag.object.object.name)); + } + function he(O) { + return O.quasis.some((me) => me.value.raw.includes(` +`)); + } + function we(O, me) { + return (O.type === "TemplateLiteral" && he(O) || O.type === "TaggedTemplateExpression" && he(O.quasi)) && !a(me, p2(O), { backwards: true }); + } + function ke(O) { + if (!Me(O)) + return false; + let me = s(ae(O, Te.Dangling)); + return me && !g(me); + } + function Re(O) { + if (O.length <= 1) + return false; + let me = 0; + for (let _e of O) + if (b(_e)) { + if (me += 1, me > 1) + return true; + } else if (de(_e)) { + for (let He of _e.arguments) + if (b(He)) + return true; + } + return false; + } + function Ne(O) { + let me = O.getValue(), _e = O.getParentNode(); + return de(me) && de(_e) && _e.callee === me && me.arguments.length > _e.arguments.length && _e.arguments.length > 0; + } + function Pe(O, me) { + if (me >= 2) + return false; + let _e = (Qe) => Pe(Qe, me + 1), He = O.type === "Literal" && "regex" in O && O.regex.pattern || O.type === "RegExpLiteral" && O.pattern; + if (He && l(He) > 5) + return false; + if (O.type === "Literal" || O.type === "BigIntLiteral" || O.type === "DecimalLiteral" || O.type === "BooleanLiteral" || O.type === "NullLiteral" || O.type === "NumericLiteral" || O.type === "RegExpLiteral" || O.type === "StringLiteral" || O.type === "Identifier" || O.type === "ThisExpression" || O.type === "Super" || O.type === "PrivateName" || O.type === "PrivateIdentifier" || O.type === "ArgumentPlaceholder" || O.type === "Import") + return true; + if (O.type === "TemplateLiteral") + return O.quasis.every((Qe) => !Qe.value.raw.includes(` +`)) && O.expressions.every(_e); + if (O.type === "ObjectExpression") + return O.properties.every((Qe) => !Qe.computed && (Qe.shorthand || Qe.value && _e(Qe.value))); + if (O.type === "ArrayExpression") + return O.elements.every((Qe) => Qe === null || _e(Qe)); + if (tt(O)) + return (O.type === "ImportExpression" || Pe(O.callee, me)) && Ye(O).every(_e); + if (ue(O)) + return Pe(O.object, me) && Pe(O.property, me); + let Ge = { "!": true, "-": true, "+": true, "~": true }; + if (O.type === "UnaryExpression" && Ge[O.operator]) + return Pe(O.argument, me); + let it = { "++": true, "--": true }; + return O.type === "UpdateExpression" && it[O.operator] ? Pe(O.argument, me) : O.type === "TSNonNullExpression" ? Pe(O.expression, me) : false; + } + function oe(O) { + var me, _e; + return (me = (_e = O.extra) === null || _e === void 0 ? void 0 : _e.raw) !== null && me !== void 0 ? me : O.raw; + } + function H(O) { + return O; + } + function pe(O) { + return O.filepath && /\.tsx$/i.test(O.filepath); + } + function X(O) { + let me = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "es5"; + return O.trailingComma === "es5" && me === "es5" || O.trailingComma === "all" && (me === "all" || me === "es5"); + } + function le(O, me) { + switch (O.type) { + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + case "NGPipeExpression": + return le(O.left, me); + case "MemberExpression": + case "OptionalMemberExpression": + return le(O.object, me); + case "TaggedTemplateExpression": + return O.tag.type === "FunctionExpression" ? false : le(O.tag, me); + case "CallExpression": + case "OptionalCallExpression": + return O.callee.type === "FunctionExpression" ? false : le(O.callee, me); + case "ConditionalExpression": + return le(O.test, me); + case "UpdateExpression": + return !O.prefix && le(O.argument, me); + case "BindExpression": + return O.object && le(O.object, me); + case "SequenceExpression": + return le(O.expressions[0], me); + case "TSSatisfiesExpression": + case "TSAsExpression": + case "TSNonNullExpression": + return le(O.expression, me); + default: + return me(O); + } + } + var Ae = { "==": true, "!=": true, "===": true, "!==": true }, Ee = { "*": true, "/": true, "%": true }, De = { ">>": true, ">>>": true, "<<": true }; + function A(O, me) { + return !(re(me) !== re(O) || O === "**" || Ae[O] && Ae[me] || me === "%" && Ee[O] || O === "%" && Ee[me] || me !== O && Ee[me] && Ee[O] || De[O] && De[me]); + } + var G = new Map([["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].flatMap((O, me) => O.map((_e) => [_e, me]))); + function re(O) { + return G.get(O); + } + function ye(O) { + return Boolean(De[O]) || O === "|" || O === "^" || O === "&"; + } + function Ce(O) { + var me; + if (O.rest) + return true; + let _e = ve(O); + return ((me = s(_e)) === null || me === void 0 ? void 0 : me.type) === "RestElement"; + } + var Be = /* @__PURE__ */ new WeakMap(); + function ve(O) { + if (Be.has(O)) + return Be.get(O); + let me = []; + return O.this && me.push(O.this), Array.isArray(O.parameters) ? me.push(...O.parameters) : Array.isArray(O.params) && me.push(...O.params), O.rest && me.push(O.rest), Be.set(O, me), me; + } + function ze(O, me) { + let _e = O.getValue(), He = 0, Ge = (it) => me(it, He++); + _e.this && O.call(Ge, "this"), Array.isArray(_e.parameters) ? O.each(Ge, "parameters") : Array.isArray(_e.params) && O.each(Ge, "params"), _e.rest && O.call(Ge, "rest"); + } + var be = /* @__PURE__ */ new WeakMap(); + function Ye(O) { + if (be.has(O)) + return be.get(O); + let me = O.arguments; + return O.type === "ImportExpression" && (me = [O.source], O.attributes && me.push(O.attributes)), be.set(O, me), me; + } + function Se(O, me) { + let _e = O.getValue(); + _e.type === "ImportExpression" ? (O.call((He) => me(He, 0), "source"), _e.attributes && O.call((He) => me(He, 1), "attributes")) : O.each(me, "arguments"); + } + function Ie(O) { + return O.value.trim() === "prettier-ignore" && !O.unignore; + } + function Oe(O) { + return O && (O.prettierIgnore || Me(O, Te.PrettierIgnore)); + } + function Je(O) { + let me = O.getValue(); + return Oe(me); + } + var Te = { Leading: 1 << 1, Trailing: 1 << 2, Dangling: 1 << 3, Block: 1 << 4, Line: 1 << 5, PrettierIgnore: 1 << 6, First: 1 << 7, Last: 1 << 8 }, je = (O, me) => { + if (typeof O == "function" && (me = O, O = 0), O || me) + return (_e, He, Ge) => !(O & Te.Leading && !_e.leading || O & Te.Trailing && !_e.trailing || O & Te.Dangling && (_e.leading || _e.trailing) || O & Te.Block && !g(_e) || O & Te.Line && !D(_e) || O & Te.First && He !== 0 || O & Te.Last && He !== Ge.length - 1 || O & Te.PrettierIgnore && !Ie(_e) || me && !me(_e)); + }; + function Me(O, me, _e) { + if (!u(O == null ? void 0 : O.comments)) + return false; + let He = je(me, _e); + return He ? O.comments.some(He) : true; + } + function ae(O, me, _e) { + if (!Array.isArray(O == null ? void 0 : O.comments)) + return []; + let He = je(me, _e); + return He ? O.comments.filter(He) : O.comments; + } + var nt = (O, me) => { + let { originalText: _e } = me; + return i(_e, y(O)); + }; + function tt(O) { + return de(O) || O.type === "NewExpression" || O.type === "ImportExpression"; + } + function Ve(O) { + return O && (O.type === "ObjectProperty" || O.type === "Property" && !O.method && O.kind === "init"); + } + function We(O) { + return Boolean(O.__isUsingHackPipeline); + } + var Xe = Symbol("ifWithoutBlockAndSameLineComment"); + function st(O) { + return O.type === "TSAsExpression" || O.type === "TSSatisfiesExpression"; + } + r.exports = { getFunctionParameters: ve, iterateFunctionParametersPath: ze, getCallArguments: Ye, iterateCallArgumentsPath: Se, hasRestParameter: Ce, getLeftSide: I, getLeftSidePathName: P, getParentExportDeclaration: m, getTypeScriptMappedTypeModifier: z, hasFlowAnnotationComment: E, hasFlowShorthandAnnotationComment: w, hasLeadingOwnLineComment: Z, hasNakedLeftSide: x, hasNode: N, hasIgnoreComment: Je, hasNodeIgnoreComment: Oe, identity: H, isBinaryish: V, isCallLikeExpression: tt, isEnabledHackPipeline: We, isLineComment: D, isPrettierIgnoreComment: Ie, isCallExpression: de, isMemberExpression: ue, isExportDeclaration: T, isFlowAnnotationComment: U, isFunctionCompositionArgs: Re, isFunctionNotation: J, isFunctionOrArrowExpression: b, isGetterOrSetter: q, isJestEachTemplateLiteral: ge, isJsxNode: M, isLiteral: C, isLongCurriedCallExpression: Ne, isSimpleCallArgument: Pe, isMemberish: j, isNumericLiteral: o, isSignedNumericLiteral: d, isObjectProperty: Ve, isObjectType: S, isObjectTypePropertyAFunction: L, isSimpleType: ie, isSimpleNumber: fe, isSimpleTemplateLiteral: Fe, isStringLiteral: v, isStringPropSafeToUnquote: se, isTemplateOnItsOwnLine: we, isTestCall: K, isTheOnlyJsxElementInMarkdown: R, isTSXFile: pe, isTypeAnnotationAFunction: Q, isNextLineEmpty: nt, needsHardlineAfterDanglingComment: ke, rawText: oe, shouldPrintComma: X, isBitwiseOperator: ye, shouldFlatten: A, startsWithNoLookaheadToken: le, getPrecedence: re, hasComment: Me, getComments: ae, CommentCheckFlags: Te, markerForIfWithoutBlockAndSameLineComment: Xe, isTSTypeExpression: st }; + } }), jt = te({ "src/language-js/print/template-literal.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { getStringWidth: s, getIndentSize: a } = Ue(), { builders: { join: n, hardline: u, softline: i, group: l, indent: p2, align: y, lineSuffixBoundary: h, addAlignmentToDoc: g }, printer: { printDocToString: c }, utils: { mapDoc: f } } = qe(), { isBinaryish: F, isJestEachTemplateLiteral: _, isSimpleTemplateLiteral: w, hasComment: E, isMemberExpression: N, isTSTypeExpression: x } = Ke(); + function I(C, o, d) { + let v = C.getValue(); + if (v.type === "TemplateLiteral" && _(v, C.getParentNode())) { + let R = P(C, d, o); + if (R) + return R; + } + let b = "expressions"; + v.type === "TSTemplateLiteralType" && (b = "types"); + let B = [], k = C.map(o, b), M = w(v); + return M && (k = k.map((R) => c(R, Object.assign(Object.assign({}, d), {}, { printWidth: Number.POSITIVE_INFINITY })).formatted)), B.push(h, "`"), C.each((R) => { + let q = R.getName(); + if (B.push(o()), q < k.length) { + let { tabWidth: J } = d, L = R.getValue(), Q = a(L.value.raw, J), V = k[q]; + if (!M) { + let Y = v[b][q]; + (E(Y) || N(Y) || Y.type === "ConditionalExpression" || Y.type === "SequenceExpression" || x(Y) || F(Y)) && (V = [p2([i, V]), i]); + } + let j = Q === 0 && L.value.raw.endsWith(` +`) ? y(Number.NEGATIVE_INFINITY, V) : g(V, Q, J); + B.push(l(["${", j, h, "}"])); + } + }, "quasis"), B.push("`"), B; + } + function P(C, o, d) { + let v = C.getNode(), S = v.quasis[0].value.raw.trim().split(/\s*\|\s*/); + if (S.length > 1 || S.some((b) => b.length > 0)) { + o.__inJestEach = true; + let b = C.map(d, "expressions"); + o.__inJestEach = false; + let B = [], k = b.map((L) => "${" + c(L, Object.assign(Object.assign({}, o), {}, { printWidth: Number.POSITIVE_INFINITY, endOfLine: "lf" })).formatted + "}"), M = [{ hasLineBreak: false, cells: [] }]; + for (let L = 1; L < v.quasis.length; L++) { + let Q = t2(M), V = k[L - 1]; + Q.cells.push(V), V.includes(` +`) && (Q.hasLineBreak = true), v.quasis[L].value.raw.includes(` +`) && M.push({ hasLineBreak: false, cells: [] }); + } + let R = Math.max(S.length, ...M.map((L) => L.cells.length)), q = Array.from({ length: R }).fill(0), J = [{ cells: S }, ...M.filter((L) => L.cells.length > 0)]; + for (let { cells: L } of J.filter((Q) => !Q.hasLineBreak)) + for (let [Q, V] of L.entries()) + q[Q] = Math.max(q[Q], s(V)); + return B.push(h, "`", p2([u, n(u, J.map((L) => n(" | ", L.cells.map((Q, V) => L.hasLineBreak ? Q : Q + " ".repeat(q[V] - s(Q))))))]), u, "`"), B; + } + } + function $(C, o) { + let d = C.getValue(), v = o(); + return E(d) && (v = l([p2([i, v]), i])), ["${", v, h, "}"]; + } + function D(C, o) { + return C.map((d) => $(d, o), "expressions"); + } + function T(C, o) { + return f(C, (d) => typeof d == "string" ? o ? d.replace(/(\\*)`/g, "$1$1\\`") : m(d) : d); + } + function m(C) { + return C.replace(/([\\`]|\${)/g, "\\$1"); + } + r.exports = { printTemplateLiteral: I, printTemplateExpressions: D, escapeTemplateCharacters: T, uncookTemplateElementValue: m }; + } }), Ym = te({ "src/language-js/embed/markdown.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, softline: s, literalline: a, dedentToRoot: n } } = qe(), { escapeTemplateCharacters: u } = jt(); + function i(p2, y, h) { + let c = p2.getValue().quasis[0].value.raw.replace(/((?:\\\\)*)\\`/g, (w, E) => "\\".repeat(E.length / 2) + "`"), f = l(c), F = f !== ""; + F && (c = c.replace(new RegExp(`^${f}`, "gm"), "")); + let _ = u(h(c, { parser: "markdown", __inJsTemplate: true }, { stripTrailingHardline: true }), true); + return ["`", F ? t2([s, _]) : [a, n(_)], s, "`"]; + } + function l(p2) { + let y = p2.match(/^([^\S\n]*)\S/m); + return y === null ? "" : y[1]; + } + r.exports = i; + } }), Qm = te({ "src/language-js/embed/css.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { indent: s, hardline: a, softline: n }, utils: { mapDoc: u, replaceEndOfLine: i, cleanDoc: l } } = qe(), { printTemplateExpressions: p2 } = jt(); + function y(c, f, F) { + let _ = c.getValue(), w = _.quasis.map((P) => P.value.raw), E = 0, N = w.reduce((P, $, D) => D === 0 ? $ : P + "@prettier-placeholder-" + E++ + "-id" + $, ""), x = F(N, { parser: "scss" }, { stripTrailingHardline: true }), I = p2(c, f); + return h(x, _, I); + } + function h(c, f, F) { + if (f.quasis.length === 1 && !f.quasis[0].value.raw.trim()) + return "``"; + let w = g(c, F); + if (!w) + throw new Error("Couldn't insert all the expressions"); + return ["`", s([a, w]), n, "`"]; + } + function g(c, f) { + if (!t2(f)) + return c; + let F = 0, _ = u(l(c), (w) => typeof w != "string" || !w.includes("@prettier-placeholder") ? w : w.split(/@prettier-placeholder-(\d+)-id/).map((E, N) => N % 2 === 0 ? i(E) : (F++, f[E]))); + return f.length === F ? _ : null; + } + r.exports = y; + } }), Zm = te({ "src/language-js/embed/graphql.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, join: s, hardline: a } } = qe(), { escapeTemplateCharacters: n, printTemplateExpressions: u } = jt(); + function i(p2, y, h) { + let g = p2.getValue(), c = g.quasis.length; + if (c === 1 && g.quasis[0].value.raw.trim() === "") + return "``"; + let f = u(p2, y), F = []; + for (let _ = 0; _ < c; _++) { + let w = g.quasis[_], E = _ === 0, N = _ === c - 1, x = w.value.cooked, I = x.split(` +`), P = I.length, $ = f[_], D = P > 2 && I[0].trim() === "" && I[1].trim() === "", T = P > 2 && I[P - 1].trim() === "" && I[P - 2].trim() === "", m = I.every((o) => /^\s*(?:#[^\n\r]*)?$/.test(o)); + if (!N && /#[^\n\r]*$/.test(I[P - 1])) + return null; + let C = null; + m ? C = l(I) : C = h(x, { parser: "graphql" }, { stripTrailingHardline: true }), C ? (C = n(C, false), !E && D && F.push(""), F.push(C), !N && T && F.push("")) : !E && !N && D && F.push(""), $ && F.push($); + } + return ["`", t2([a, s(a, F)]), a, "`"]; + } + function l(p2) { + let y = [], h = false, g = p2.map((c) => c.trim()); + for (let [c, f] of g.entries()) + f !== "" && (g[c - 1] === "" && h ? y.push([a, f]) : y.push(f), h = true); + return y.length === 0 ? null : s(a, y); + } + r.exports = i; + } }), ed = te({ "src/language-js/embed/html.js"(e, r) { + "use strict"; + ne(); + var { builders: { indent: t2, line: s, hardline: a, group: n }, utils: { mapDoc: u } } = qe(), { printTemplateExpressions: i, uncookTemplateElementValue: l } = jt(), p2 = 0; + function y(h, g, c, f, F) { + let { parser: _ } = F, w = h.getValue(), E = p2; + p2 = p2 + 1 >>> 0; + let N = (d) => `PRETTIER_HTML_PLACEHOLDER_${d}_${E}_IN_JS`, x = w.quasis.map((d, v, S) => v === S.length - 1 ? d.value.cooked : d.value.cooked + N(v)).join(""), I = i(h, g); + if (I.length === 0 && x.trim().length === 0) + return "``"; + let P = new RegExp(N("(\\d+)"), "g"), $ = 0, D = c(x, { parser: _, __onHtmlRoot(d) { + $ = d.children.length; + } }, { stripTrailingHardline: true }), T = u(D, (d) => { + if (typeof d != "string") + return d; + let v = [], S = d.split(P); + for (let b = 0; b < S.length; b++) { + let B = S[b]; + if (b % 2 === 0) { + B && (B = l(B), f.__embeddedInHtml && (B = B.replace(/<\/(script)\b/gi, "<\\/$1")), v.push(B)); + continue; + } + let k = Number(B); + v.push(I[k]); + } + return v; + }), m = /^\s/.test(x) ? " " : "", C = /\s$/.test(x) ? " " : "", o = f.htmlWhitespaceSensitivity === "ignore" ? a : m && C ? s : null; + return n(o ? ["`", t2([o, n(T)]), o, "`"] : ["`", m, $ > 1 ? t2(n(T)) : n(T), C, "`"]); + } + r.exports = y; + } }), td = te({ "src/language-js/embed.js"(e, r) { + "use strict"; + ne(); + var { hasComment: t2, CommentCheckFlags: s, isObjectProperty: a } = Ke(), n = Ym(), u = Qm(), i = Zm(), l = ed(); + function p2(D) { + if (g(D) || _(D) || w(D) || c(D)) + return "css"; + if (x(D)) + return "graphql"; + if (P(D)) + return "html"; + if (f(D)) + return "angular"; + if (h(D)) + return "markdown"; + } + function y(D, T, m, C) { + let o = D.getValue(); + if (o.type !== "TemplateLiteral" || $(o)) + return; + let d = p2(D); + if (d) { + if (d === "markdown") + return n(D, T, m); + if (d === "css") + return u(D, T, m); + if (d === "graphql") + return i(D, T, m); + if (d === "html" || d === "angular") + return l(D, T, m, C, { parser: d }); + } + } + function h(D) { + let T = D.getValue(), m = D.getParentNode(); + return m && m.type === "TaggedTemplateExpression" && T.quasis.length === 1 && m.tag.type === "Identifier" && (m.tag.name === "md" || m.tag.name === "markdown"); + } + function g(D) { + let T = D.getValue(), m = D.getParentNode(), C = D.getParentNode(1); + return C && T.quasis && m.type === "JSXExpressionContainer" && C.type === "JSXElement" && C.openingElement.name.name === "style" && C.openingElement.attributes.some((o) => o.name.name === "jsx") || m && m.type === "TaggedTemplateExpression" && m.tag.type === "Identifier" && m.tag.name === "css" || m && m.type === "TaggedTemplateExpression" && m.tag.type === "MemberExpression" && m.tag.object.name === "css" && (m.tag.property.name === "global" || m.tag.property.name === "resolve"); + } + function c(D) { + return D.match((T) => T.type === "TemplateLiteral", (T, m) => T.type === "ArrayExpression" && m === "elements", (T, m) => a(T) && T.key.type === "Identifier" && T.key.name === "styles" && m === "value", ...F); + } + function f(D) { + return D.match((T) => T.type === "TemplateLiteral", (T, m) => a(T) && T.key.type === "Identifier" && T.key.name === "template" && m === "value", ...F); + } + var F = [(D, T) => D.type === "ObjectExpression" && T === "properties", (D, T) => D.type === "CallExpression" && D.callee.type === "Identifier" && D.callee.name === "Component" && T === "arguments", (D, T) => D.type === "Decorator" && T === "expression"]; + function _(D) { + let T = D.getParentNode(); + if (!T || T.type !== "TaggedTemplateExpression") + return false; + let m = T.tag.type === "ParenthesizedExpression" ? T.tag.expression : T.tag; + switch (m.type) { + case "MemberExpression": + return E(m.object) || N(m); + case "CallExpression": + return E(m.callee) || m.callee.type === "MemberExpression" && (m.callee.object.type === "MemberExpression" && (E(m.callee.object.object) || N(m.callee.object)) || m.callee.object.type === "CallExpression" && E(m.callee.object.callee)); + case "Identifier": + return m.name === "css"; + default: + return false; + } + } + function w(D) { + let T = D.getParentNode(), m = D.getParentNode(1); + return m && T.type === "JSXExpressionContainer" && m.type === "JSXAttribute" && m.name.type === "JSXIdentifier" && m.name.name === "css"; + } + function E(D) { + return D.type === "Identifier" && D.name === "styled"; + } + function N(D) { + return /^[A-Z]/.test(D.object.name) && D.property.name === "extend"; + } + function x(D) { + let T = D.getValue(), m = D.getParentNode(); + return I(T, "GraphQL") || m && (m.type === "TaggedTemplateExpression" && (m.tag.type === "MemberExpression" && m.tag.object.name === "graphql" && m.tag.property.name === "experimental" || m.tag.type === "Identifier" && (m.tag.name === "gql" || m.tag.name === "graphql")) || m.type === "CallExpression" && m.callee.type === "Identifier" && m.callee.name === "graphql"); + } + function I(D, T) { + return t2(D, s.Block | s.Leading, (m) => { + let { value: C } = m; + return C === ` ${T} `; + }); + } + function P(D) { + return I(D.getValue(), "HTML") || D.match((T) => T.type === "TemplateLiteral", (T, m) => T.type === "TaggedTemplateExpression" && T.tag.type === "Identifier" && T.tag.name === "html" && m === "quasi"); + } + function $(D) { + let { quasis: T } = D; + return T.some((m) => { + let { value: { cooked: C } } = m; + return C === null; + }); + } + r.exports = y; + } }), rd = te({ "src/language-js/clean.js"(e, r) { + "use strict"; + ne(); + var t2 = Pt(), s = /* @__PURE__ */ new Set(["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "loc", "flags", "errors", "tokens"]), a = (u) => { + for (let i of u.quasis) + delete i.value; + }; + function n(u, i, l) { + if (u.type === "Program" && delete i.sourceType, (u.type === "BigIntLiteral" || u.type === "BigIntLiteralTypeAnnotation") && i.value && (i.value = i.value.toLowerCase()), (u.type === "BigIntLiteral" || u.type === "Literal") && i.bigint && (i.bigint = i.bigint.toLowerCase()), u.type === "DecimalLiteral" && (i.value = Number(i.value)), u.type === "Literal" && i.decimal && (i.decimal = Number(i.decimal)), u.type === "EmptyStatement" || u.type === "JSXText" || u.type === "JSXExpressionContainer" && (u.expression.type === "Literal" || u.expression.type === "StringLiteral") && u.expression.value === " ") + return null; + if ((u.type === "Property" || u.type === "ObjectProperty" || u.type === "MethodDefinition" || u.type === "ClassProperty" || u.type === "ClassMethod" || u.type === "PropertyDefinition" || u.type === "TSDeclareMethod" || u.type === "TSPropertySignature" || u.type === "ObjectTypeProperty") && typeof u.key == "object" && u.key && (u.key.type === "Literal" || u.key.type === "NumericLiteral" || u.key.type === "StringLiteral" || u.key.type === "Identifier") && delete i.key, u.type === "JSXElement" && u.openingElement.name.name === "style" && u.openingElement.attributes.some((h) => h.name.name === "jsx")) + for (let { type: h, expression: g } of i.children) + h === "JSXExpressionContainer" && g.type === "TemplateLiteral" && a(g); + u.type === "JSXAttribute" && u.name.name === "css" && u.value.type === "JSXExpressionContainer" && u.value.expression.type === "TemplateLiteral" && a(i.value.expression), u.type === "JSXAttribute" && u.value && u.value.type === "Literal" && /["']|"|'/.test(u.value.value) && (i.value.value = i.value.value.replace(/["']|"|'/g, '"')); + let p2 = u.expression || u.callee; + if (u.type === "Decorator" && p2.type === "CallExpression" && p2.callee.name === "Component" && p2.arguments.length === 1) { + let h = u.expression.arguments[0].properties; + for (let [g, c] of i.expression.arguments[0].properties.entries()) + switch (h[g].key.name) { + case "styles": + c.value.type === "ArrayExpression" && a(c.value.elements[0]); + break; + case "template": + c.value.type === "TemplateLiteral" && a(c.value); + break; + } + } + if (u.type === "TaggedTemplateExpression" && (u.tag.type === "MemberExpression" || u.tag.type === "Identifier" && (u.tag.name === "gql" || u.tag.name === "graphql" || u.tag.name === "css" || u.tag.name === "md" || u.tag.name === "markdown" || u.tag.name === "html") || u.tag.type === "CallExpression") && a(i.quasi), u.type === "TemplateLiteral") { + var y; + (((y = u.leadingComments) === null || y === void 0 ? void 0 : y.some((g) => t2(g) && ["GraphQL", "HTML"].some((c) => g.value === ` ${c} `))) || l.type === "CallExpression" && l.callee.name === "graphql" || !u.leadingComments) && a(i); + } + if (u.type === "InterpreterDirective" && (i.value = i.value.trimEnd()), (u.type === "TSIntersectionType" || u.type === "TSUnionType") && u.types.length === 1) + return i.types[0]; + } + n.ignoredProperties = s, r.exports = n; + } }), io = {}; + Kt(io, { EOL: () => Wn, arch: () => nd, cpus: () => Do, default: () => vo, endianness: () => ao, freemem: () => po, getNetworkInterfaces: () => ho, hostname: () => oo, loadavg: () => lo, networkInterfaces: () => yo, platform: () => ud, release: () => go, tmpDir: () => $n, tmpdir: () => Vn, totalmem: () => fo, type: () => mo, uptime: () => co }); + function ao() { + if (typeof Tr > "u") { + var e = new ArrayBuffer(2), r = new Uint8Array(e), t2 = new Uint16Array(e); + if (r[0] = 1, r[1] = 2, t2[0] === 258) + Tr = "BE"; + else if (t2[0] === 513) + Tr = "LE"; + else + throw new Error("unable to figure out endianess"); + } + return Tr; + } + function oo() { + return typeof globalThis.location < "u" ? globalThis.location.hostname : ""; + } + function lo() { + return []; + } + function co() { + return 0; + } + function po() { + return Number.MAX_VALUE; + } + function fo() { + return Number.MAX_VALUE; + } + function Do() { + return []; + } + function mo() { + return "Browser"; + } + function go() { + return typeof globalThis.navigator < "u" ? globalThis.navigator.appVersion : ""; + } + function yo() { + } + function ho() { + } + function nd() { + return "javascript"; + } + function ud() { + return "browser"; + } + function $n() { + return "/tmp"; + } + var Tr, Vn, Wn, vo, sd = ht({ "node-modules-polyfills:os"() { + ne(), Vn = $n, Wn = ` +`, vo = { EOL: Wn, tmpdir: Vn, tmpDir: $n, networkInterfaces: yo, getNetworkInterfaces: ho, release: go, type: mo, cpus: Do, totalmem: fo, freemem: po, uptime: co, loadavg: lo, hostname: oo, endianness: ao }; + } }), id2 = te({ "node-modules-polyfills-commonjs:os"(e, r) { + ne(); + var t2 = (sd(), ft(io)); + if (t2 && t2.default) { + r.exports = t2.default; + for (let s in t2) + r.exports[s] = t2[s]; + } else + t2 && (r.exports = t2); + } }), ad = te({ "node_modules/detect-newline/index.js"(e, r) { + "use strict"; + ne(); + var t2 = (s) => { + if (typeof s != "string") + throw new TypeError("Expected a string"); + let a = s.match(/(?:\r?\n)/g) || []; + if (a.length === 0) + return; + let n = a.filter((i) => i === `\r +`).length, u = a.length - n; + return n > u ? `\r +` : ` +`; + }; + r.exports = t2, r.exports.graceful = (s) => typeof s == "string" && t2(s) || ` +`; + } }), od = te({ "node_modules/jest-docblock/build/index.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.extract = c, e.parse = F, e.parseWithComments = _, e.print = w, e.strip = f; + function r() { + let N = id2(); + return r = function() { + return N; + }, N; + } + function t2() { + let N = s(ad()); + return t2 = function() { + return N; + }, N; + } + function s(N) { + return N && N.__esModule ? N : { default: N }; + } + var a = /\*\/$/, n = /^\/\*\*?/, u = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, i = /(^|\s+)\/\/([^\r\n]*)/g, l = /^(\r?\n)+/, p2 = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g, y = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g, h = /(\r?\n|^) *\* ?/g, g = []; + function c(N) { + let x = N.match(u); + return x ? x[0].trimLeft() : ""; + } + function f(N) { + let x = N.match(u); + return x && x[0] ? N.substring(x[0].length) : N; + } + function F(N) { + return _(N).pragmas; + } + function _(N) { + let x = (0, t2().default)(N) || r().EOL; + N = N.replace(n, "").replace(a, "").replace(h, "$1"); + let I = ""; + for (; I !== N; ) + I = N, N = N.replace(p2, `${x}$1 $2${x}`); + N = N.replace(l, "").trimRight(); + let P = /* @__PURE__ */ Object.create(null), $ = N.replace(y, "").replace(l, "").trimRight(), D; + for (; D = y.exec(N); ) { + let T = D[2].replace(i, ""); + typeof P[D[1]] == "string" || Array.isArray(P[D[1]]) ? P[D[1]] = g.concat(P[D[1]], T) : P[D[1]] = T; + } + return { comments: $, pragmas: P }; + } + function w(N) { + let { comments: x = "", pragmas: I = {} } = N, P = (0, t2().default)(x) || r().EOL, $ = "/**", D = " *", T = " */", m = Object.keys(I), C = m.map((d) => E(d, I[d])).reduce((d, v) => d.concat(v), []).map((d) => `${D} ${d}${P}`).join(""); + if (!x) { + if (m.length === 0) + return ""; + if (m.length === 1 && !Array.isArray(I[m[0]])) { + let d = I[m[0]]; + return `${$} ${E(m[0], d)[0]}${T}`; + } + } + let o = x.split(P).map((d) => `${D} ${d}`).join(P) + P; + return $ + P + (x ? o : "") + (x && m.length ? D + P : "") + C + T; + } + function E(N, x) { + return g.concat(x).map((I) => `@${N} ${I}`.trim()); + } + } }), ld = te({ "src/language-js/utils/get-shebang.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + if (!s.startsWith("#!")) + return ""; + let a = s.indexOf(` +`); + return a === -1 ? s : s.slice(0, a); + } + r.exports = t2; + } }), Co = te({ "src/language-js/pragma.js"(e, r) { + "use strict"; + ne(); + var { parseWithComments: t2, strip: s, extract: a, print: n } = od(), { normalizeEndOfLine: u } = Jn(), i = ld(); + function l(h) { + let g = i(h); + g && (h = h.slice(g.length + 1)); + let c = a(h), { pragmas: f, comments: F } = t2(c); + return { shebang: g, text: h, pragmas: f, comments: F }; + } + function p2(h) { + let g = Object.keys(l(h).pragmas); + return g.includes("prettier") || g.includes("format"); + } + function y(h) { + let { shebang: g, text: c, pragmas: f, comments: F } = l(h), _ = s(c), w = n({ pragmas: Object.assign({ format: "" }, f), comments: F.trimStart() }); + return (g ? `${g} +` : "") + u(w) + (_.startsWith(` +`) ? ` +` : ` + +`) + _; + } + r.exports = { hasPragma: p2, insertPragma: y }; + } }), cd = te({ "src/language-js/utils/is-type-cast-comment.js"(e, r) { + "use strict"; + ne(); + var t2 = Pt(); + function s(a) { + return t2(a) && a.value[0] === "*" && /@(?:type|satisfies)\b/.test(a.value); + } + r.exports = s; + } }), Eo = te({ "src/language-js/comments.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2, hasNewline: s, getNextNonSpaceNonCommentCharacterIndexWithStartIndex: a, getNextNonSpaceNonCommentCharacter: n, hasNewlineInRange: u, addLeadingComment: i, addTrailingComment: l, addDanglingComment: p2, getNextNonSpaceNonCommentCharacterIndex: y, isNonEmptyArray: h } = Ue(), { getFunctionParameters: g, isPrettierIgnoreComment: c, isJsxNode: f, hasFlowShorthandAnnotationComment: F, hasFlowAnnotationComment: _, hasIgnoreComment: w, isCallLikeExpression: E, getCallArguments: N, isCallExpression: x, isMemberExpression: I, isObjectProperty: P, isLineComment: $, getComments: D, CommentCheckFlags: T, markerForIfWithoutBlockAndSameLineComment: m } = Ke(), { locStart: C, locEnd: o } = ut(), d = Pt(), v = cd(); + function S(De) { + return [H, Fe, Q, q, J, L, ie, he, se, ge, we, ke, ce, z, U].some((A) => A(De)); + } + function b(De) { + return [R, Fe, V, we, q, J, L, ie, z, Z, fe, ge, Pe, U, X].some((A) => A(De)); + } + function B(De) { + return [H, q, J, j, ue, ce, ge, de, K, pe, U, oe].some((A) => A(De)); + } + function k(De, A) { + let G = (De.body || De.properties).find((re) => { + let { type: ye } = re; + return ye !== "EmptyStatement"; + }); + G ? i(G, A) : p2(De, A); + } + function M(De, A) { + De.type === "BlockStatement" ? k(De, A) : i(De, A); + } + function R(De) { + let { comment: A, followingNode: G } = De; + return G && v(A) ? (i(G, A), true) : false; + } + function q(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + if ((re == null ? void 0 : re.type) !== "IfStatement" || !ye) + return false; + if (n(Ce, A, o) === ")") + return l(G, A), true; + if (G === re.consequent && ye === re.alternate) { + if (G.type === "BlockStatement") + l(G, A); + else { + let ve = A.type === "SingleLine" || A.loc.start.line === A.loc.end.line, ze = A.loc.start.line === G.loc.start.line; + ve && ze ? p2(G, A, m) : p2(re, A); + } + return true; + } + return ye.type === "BlockStatement" ? (k(ye, A), true) : ye.type === "IfStatement" ? (M(ye.consequent, A), true) : re.consequent === ye ? (i(ye, A), true) : false; + } + function J(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + return (re == null ? void 0 : re.type) !== "WhileStatement" || !ye ? false : n(Ce, A, o) === ")" ? (l(G, A), true) : ye.type === "BlockStatement" ? (k(ye, A), true) : re.body === ye ? (i(ye, A), true) : false; + } + function L(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) !== "TryStatement" && (re == null ? void 0 : re.type) !== "CatchClause" || !ye ? false : re.type === "CatchClause" && G ? (l(G, A), true) : ye.type === "BlockStatement" ? (k(ye, A), true) : ye.type === "TryStatement" ? (M(ye.finalizer, A), true) : ye.type === "CatchClause" ? (M(ye.body, A), true) : false; + } + function Q(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return I(G) && (re == null ? void 0 : re.type) === "Identifier" ? (i(G, A), true) : false; + } + function V(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De, Be = G && !u(Ce, o(G), C(A)); + return (!G || !Be) && ((re == null ? void 0 : re.type) === "ConditionalExpression" || (re == null ? void 0 : re.type) === "TSConditionalType") && ye ? (i(ye, A), true) : false; + } + function j(De) { + let { comment: A, precedingNode: G, enclosingNode: re } = De; + return P(re) && re.shorthand && re.key === G && re.value.type === "AssignmentPattern" ? (l(re.value.left, A), true) : false; + } + var Y = /* @__PURE__ */ new Set(["ClassDeclaration", "ClassExpression", "DeclareClass", "DeclareInterface", "InterfaceDeclaration", "TSInterfaceDeclaration"]); + function ie(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + if (Y.has(re == null ? void 0 : re.type)) { + if (h(re.decorators) && !(ye && ye.type === "Decorator")) + return l(t2(re.decorators), A), true; + if (re.body && ye === re.body) + return k(re.body, A), true; + if (ye) { + if (re.superClass && ye === re.superClass && G && (G === re.id || G === re.typeParameters)) + return l(G, A), true; + for (let Ce of ["implements", "extends", "mixins"]) + if (re[Ce] && ye === re[Ce][0]) + return G && (G === re.id || G === re.typeParameters || G === re.superClass) ? l(G, A) : p2(re, A, Ce), true; + } + } + return false; + } + var ee = /* @__PURE__ */ new Set(["ClassMethod", "ClassProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod", "MethodDefinition", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty"]); + function ce(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + return re && G && n(ye, A, o) === "(" && (re.type === "Property" || re.type === "TSDeclareMethod" || re.type === "TSAbstractMethodDefinition") && G.type === "Identifier" && re.key === G && n(ye, G, o) !== ":" || (G == null ? void 0 : G.type) === "Decorator" && ee.has(re == null ? void 0 : re.type) ? (l(G, A), true) : false; + } + var W = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]); + function K(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + return n(ye, A, o) !== "(" ? false : G && W.has(re == null ? void 0 : re.type) ? (l(G, A), true) : false; + } + function de(De) { + let { comment: A, enclosingNode: G, text: re } = De; + if ((G == null ? void 0 : G.type) !== "ArrowFunctionExpression") + return false; + let ye = y(re, A, o); + return ye !== false && re.slice(ye, ye + 2) === "=>" ? (p2(G, A), true) : false; + } + function ue(De) { + let { comment: A, enclosingNode: G, text: re } = De; + return n(re, A, o) !== ")" ? false : G && (le(G) && g(G).length === 0 || E(G) && N(G).length === 0) ? (p2(G, A), true) : ((G == null ? void 0 : G.type) === "MethodDefinition" || (G == null ? void 0 : G.type) === "TSAbstractMethodDefinition") && g(G.value).length === 0 ? (p2(G.value, A), true) : false; + } + function Fe(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye, text: Ce } = De; + if ((G == null ? void 0 : G.type) === "FunctionTypeParam" && (re == null ? void 0 : re.type) === "FunctionTypeAnnotation" && (ye == null ? void 0 : ye.type) !== "FunctionTypeParam" || ((G == null ? void 0 : G.type) === "Identifier" || (G == null ? void 0 : G.type) === "AssignmentPattern") && re && le(re) && n(Ce, A, o) === ")") + return l(G, A), true; + if ((re == null ? void 0 : re.type) === "FunctionDeclaration" && (ye == null ? void 0 : ye.type) === "BlockStatement") { + let Be = (() => { + let ve = g(re); + if (ve.length > 0) + return a(Ce, o(t2(ve))); + let ze = a(Ce, o(re.id)); + return ze !== false && a(Ce, ze + 1); + })(); + if (C(A) > Be) + return k(ye, A), true; + } + return false; + } + function z(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "LabeledStatement" ? (i(G, A), true) : false; + } + function U(De) { + let { comment: A, enclosingNode: G } = De; + return ((G == null ? void 0 : G.type) === "ContinueStatement" || (G == null ? void 0 : G.type) === "BreakStatement") && !G.label ? (l(G, A), true) : false; + } + function Z(De) { + let { comment: A, precedingNode: G, enclosingNode: re } = De; + return x(re) && G && re.callee === G && re.arguments.length > 0 ? (i(re.arguments[0], A), true) : false; + } + function se(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) === "UnionTypeAnnotation" || (re == null ? void 0 : re.type) === "TSUnionType" ? (c(A) && (ye.prettierIgnore = true, A.unignore = true), G ? (l(G, A), true) : false) : (((ye == null ? void 0 : ye.type) === "UnionTypeAnnotation" || (ye == null ? void 0 : ye.type) === "TSUnionType") && c(A) && (ye.types[0].prettierIgnore = true, A.unignore = true), false); + } + function fe(De) { + let { comment: A, enclosingNode: G } = De; + return P(G) ? (i(G, A), true) : false; + } + function ge(De) { + let { comment: A, enclosingNode: G, followingNode: re, ast: ye, isLastComment: Ce } = De; + return ye && ye.body && ye.body.length === 0 ? (Ce ? p2(ye, A) : i(ye, A), true) : (G == null ? void 0 : G.type) === "Program" && (G == null ? void 0 : G.body.length) === 0 && !h(G.directives) ? (Ce ? p2(G, A) : i(G, A), true) : (re == null ? void 0 : re.type) === "Program" && (re == null ? void 0 : re.body.length) === 0 && (G == null ? void 0 : G.type) === "ModuleExpression" ? (p2(re, A), true) : false; + } + function he(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "ForInStatement" || (G == null ? void 0 : G.type) === "ForOfStatement" ? (i(G, A), true) : false; + } + function we(De) { + let { comment: A, precedingNode: G, enclosingNode: re, text: ye } = De; + if ((re == null ? void 0 : re.type) === "ImportSpecifier" || (re == null ? void 0 : re.type) === "ExportSpecifier") + return i(re, A), true; + let Ce = (G == null ? void 0 : G.type) === "ImportSpecifier" && (re == null ? void 0 : re.type) === "ImportDeclaration", Be = (G == null ? void 0 : G.type) === "ExportSpecifier" && (re == null ? void 0 : re.type) === "ExportNamedDeclaration"; + return (Ce || Be) && s(ye, o(A)) ? (l(G, A), true) : false; + } + function ke(De) { + let { comment: A, enclosingNode: G } = De; + return (G == null ? void 0 : G.type) === "AssignmentPattern" ? (i(G, A), true) : false; + } + var Re = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]), Ne = /* @__PURE__ */ new Set(["ObjectExpression", "ArrayExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]); + function Pe(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return Re.has(G == null ? void 0 : G.type) && re && (Ne.has(re.type) || d(A)) ? (i(re, A), true) : false; + } + function oe(De) { + let { comment: A, enclosingNode: G, followingNode: re, text: ye } = De; + return !re && ((G == null ? void 0 : G.type) === "TSMethodSignature" || (G == null ? void 0 : G.type) === "TSDeclareFunction" || (G == null ? void 0 : G.type) === "TSAbstractMethodDefinition") && n(ye, A, o) === ";" ? (l(G, A), true) : false; + } + function H(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + if (c(A) && (G == null ? void 0 : G.type) === "TSMappedType" && (re == null ? void 0 : re.type) === "TSTypeParameter" && re.constraint) + return G.prettierIgnore = true, A.unignore = true, true; + } + function pe(De) { + let { comment: A, precedingNode: G, enclosingNode: re, followingNode: ye } = De; + return (re == null ? void 0 : re.type) !== "TSMappedType" ? false : (ye == null ? void 0 : ye.type) === "TSTypeParameter" && ye.name ? (i(ye.name, A), true) : (G == null ? void 0 : G.type) === "TSTypeParameter" && G.constraint ? (l(G.constraint, A), true) : false; + } + function X(De) { + let { comment: A, enclosingNode: G, followingNode: re } = De; + return !G || G.type !== "SwitchCase" || G.test || !re || re !== G.consequent[0] ? false : (re.type === "BlockStatement" && $(A) ? k(re, A) : p2(G, A), true); + } + function le(De) { + return De.type === "ArrowFunctionExpression" || De.type === "FunctionExpression" || De.type === "FunctionDeclaration" || De.type === "ObjectMethod" || De.type === "ClassMethod" || De.type === "TSDeclareFunction" || De.type === "TSCallSignatureDeclaration" || De.type === "TSConstructSignatureDeclaration" || De.type === "TSMethodSignature" || De.type === "TSConstructorType" || De.type === "TSFunctionType" || De.type === "TSDeclareMethod"; + } + function Ae(De, A) { + if ((A.parser === "typescript" || A.parser === "flow" || A.parser === "acorn" || A.parser === "espree" || A.parser === "meriyah" || A.parser === "__babel_estree") && De.type === "MethodDefinition" && De.value && De.value.type === "FunctionExpression" && g(De.value).length === 0 && !De.value.returnType && !h(De.value.typeParameters) && De.value.body) + return [...De.decorators || [], De.key, De.value.body]; + } + function Ee(De) { + let A = De.getValue(), G = De.getParentNode(), re = (ye) => _(D(ye, T.Leading)) || _(D(ye, T.Trailing)); + return (A && (f(A) || F(A) || x(G) && re(A)) || G && (G.type === "JSXSpreadAttribute" || G.type === "JSXSpreadChild" || G.type === "UnionTypeAnnotation" || G.type === "TSUnionType" || (G.type === "ClassDeclaration" || G.type === "ClassExpression") && G.superClass === A)) && (!w(De) || G.type === "UnionTypeAnnotation" || G.type === "TSUnionType"); + } + r.exports = { handleOwnLineComment: S, handleEndOfLineComment: b, handleRemainingComment: B, getCommentChildNodes: Ae, willPrintOwnComments: Ee }; + } }), qt = te({ "src/language-js/needs-parens.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), s = Kn(), { getFunctionParameters: a, getLeftSidePathName: n, hasFlowShorthandAnnotationComment: u, hasNakedLeftSide: i, hasNode: l, isBitwiseOperator: p2, startsWithNoLookaheadToken: y, shouldFlatten: h, getPrecedence: g, isCallExpression: c, isMemberExpression: f, isObjectProperty: F, isTSTypeExpression: _ } = Ke(); + function w(D, T) { + let m = D.getParentNode(); + if (!m) + return false; + let C = D.getName(), o = D.getNode(); + if (T.__isInHtmlInterpolation && !T.bracketSpacing && I(o) && P(D)) + return true; + if (E(o)) + return false; + if (T.parser !== "flow" && u(D.getValue())) + return true; + if (o.type === "Identifier") { + if (o.extra && o.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(o.name) || C === "left" && (o.name === "async" && !m.await || o.name === "let") && m.type === "ForOfStatement") + return true; + if (o.name === "let") { + var d; + let S = (d = D.findAncestor((b) => b.type === "ForOfStatement")) === null || d === void 0 ? void 0 : d.left; + if (S && y(S, (b) => b === o)) + return true; + } + if (C === "object" && o.name === "let" && m.type === "MemberExpression" && m.computed && !m.optional) { + let S = D.findAncestor((B) => B.type === "ExpressionStatement" || B.type === "ForStatement" || B.type === "ForInStatement"), b = S ? S.type === "ExpressionStatement" ? S.expression : S.type === "ForStatement" ? S.init : S.left : void 0; + if (b && y(b, (B) => B === o)) + return true; + } + return false; + } + if (o.type === "ObjectExpression" || o.type === "FunctionExpression" || o.type === "ClassExpression" || o.type === "DoExpression") { + var v; + let S = (v = D.findAncestor((b) => b.type === "ExpressionStatement")) === null || v === void 0 ? void 0 : v.expression; + if (S && y(S, (b) => b === o)) + return true; + } + switch (m.type) { + case "ParenthesizedExpression": + return false; + case "ClassDeclaration": + case "ClassExpression": { + if (C === "superClass" && (o.type === "ArrowFunctionExpression" || o.type === "AssignmentExpression" || o.type === "AwaitExpression" || o.type === "BinaryExpression" || o.type === "ConditionalExpression" || o.type === "LogicalExpression" || o.type === "NewExpression" || o.type === "ObjectExpression" || o.type === "SequenceExpression" || o.type === "TaggedTemplateExpression" || o.type === "UnaryExpression" || o.type === "UpdateExpression" || o.type === "YieldExpression" || o.type === "TSNonNullExpression")) + return true; + break; + } + case "ExportDefaultDeclaration": + return $(D, T) || o.type === "SequenceExpression"; + case "Decorator": { + if (C === "expression") { + if (f(o) && o.computed) + return true; + let S = false, b = false, B = o; + for (; B; ) + switch (B.type) { + case "MemberExpression": + b = true, B = B.object; + break; + case "CallExpression": + if (b || S) + return T.parser !== "typescript"; + S = true, B = B.callee; + break; + case "Identifier": + return false; + case "TaggedTemplateExpression": + return T.parser !== "typescript"; + default: + return true; + } + return true; + } + break; + } + case "ArrowFunctionExpression": { + if (C === "body" && o.type !== "SequenceExpression" && y(o, (S) => S.type === "ObjectExpression")) + return true; + break; + } + } + switch (o.type) { + case "UpdateExpression": + if (m.type === "UnaryExpression") + return o.prefix && (o.operator === "++" && m.operator === "+" || o.operator === "--" && m.operator === "-"); + case "UnaryExpression": + switch (m.type) { + case "UnaryExpression": + return o.operator === m.operator && (o.operator === "+" || o.operator === "-"); + case "BindExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "TaggedTemplateExpression": + return true; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "BinaryExpression": + return C === "left" && m.operator === "**"; + case "TSNonNullExpression": + return true; + default: + return false; + } + case "BinaryExpression": { + if (m.type === "UpdateExpression" || o.operator === "in" && N(D)) + return true; + if (o.operator === "|>" && o.extra && o.extra.parenthesized) { + let S = D.getParentNode(1); + if (S.type === "BinaryExpression" && S.operator === "|>") + return true; + } + } + case "TSTypeAssertion": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "LogicalExpression": + switch (m.type) { + case "TSSatisfiesExpression": + case "TSAsExpression": + return !_(o); + case "ConditionalExpression": + return _(o); + case "CallExpression": + case "NewExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ClassExpression": + case "ClassDeclaration": + return C === "superClass"; + case "TSTypeAssertion": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "JSXSpreadAttribute": + case "SpreadElement": + case "SpreadProperty": + case "BindExpression": + case "AwaitExpression": + case "TSNonNullExpression": + case "UpdateExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "AssignmentExpression": + case "AssignmentPattern": + return C === "left" && (o.type === "TSTypeAssertion" || _(o)); + case "LogicalExpression": + if (o.type === "LogicalExpression") + return m.operator !== o.operator; + case "BinaryExpression": { + let { operator: S, type: b } = o; + if (!S && b !== "TSTypeAssertion") + return true; + let B = g(S), k = m.operator, M = g(k); + return M > B || C === "right" && M === B || M === B && !h(k, S) ? true : M < B && S === "%" ? k === "+" || k === "-" : !!p2(k); + } + default: + return false; + } + case "SequenceExpression": + switch (m.type) { + case "ReturnStatement": + return false; + case "ForStatement": + return false; + case "ExpressionStatement": + return C !== "expression"; + case "ArrowFunctionExpression": + return C !== "body"; + default: + return true; + } + case "YieldExpression": + if (m.type === "UnaryExpression" || m.type === "AwaitExpression" || _(m) || m.type === "TSNonNullExpression") + return true; + case "AwaitExpression": + switch (m.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "SpreadProperty": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "BindExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ConditionalExpression": + return C === "test"; + case "BinaryExpression": + return !(!o.argument && m.operator === "|>"); + default: + return false; + } + case "TSConditionalType": + case "TSFunctionType": + case "TSConstructorType": + if (C === "extendsType" && m.type === "TSConditionalType") { + if (o.type === "TSConditionalType") + return true; + let { typeAnnotation: S } = o.returnType || o.typeAnnotation; + if (S.type === "TSTypePredicate" && S.typeAnnotation && (S = S.typeAnnotation.typeAnnotation), S.type === "TSInferType" && S.typeParameter.constraint) + return true; + } + if (C === "checkType" && m.type === "TSConditionalType") + return true; + case "TSUnionType": + case "TSIntersectionType": + if ((m.type === "TSUnionType" || m.type === "TSIntersectionType") && m.types.length > 1 && (!o.types || o.types.length > 1)) + return true; + case "TSInferType": + if (o.type === "TSInferType" && m.type === "TSRestType") + return false; + case "TSTypeOperator": + return m.type === "TSArrayType" || m.type === "TSOptionalType" || m.type === "TSRestType" || C === "objectType" && m.type === "TSIndexedAccessType" || m.type === "TSTypeOperator" || m.type === "TSTypeAnnotation" && D.getParentNode(1).type.startsWith("TSJSDoc"); + case "TSTypeQuery": + return C === "objectType" && m.type === "TSIndexedAccessType" || C === "elementType" && m.type === "TSArrayType"; + case "TypeofTypeAnnotation": + return C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType") || C === "elementType" && m.type === "ArrayTypeAnnotation"; + case "ArrayTypeAnnotation": + return m.type === "NullableTypeAnnotation"; + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": + return m.type === "ArrayTypeAnnotation" || m.type === "NullableTypeAnnotation" || m.type === "IntersectionTypeAnnotation" || m.type === "UnionTypeAnnotation" || C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType"); + case "NullableTypeAnnotation": + return m.type === "ArrayTypeAnnotation" || C === "objectType" && (m.type === "IndexedAccessType" || m.type === "OptionalIndexedAccessType"); + case "FunctionTypeAnnotation": { + let S = m.type === "NullableTypeAnnotation" ? D.getParentNode(1) : m; + return S.type === "UnionTypeAnnotation" || S.type === "IntersectionTypeAnnotation" || S.type === "ArrayTypeAnnotation" || C === "objectType" && (S.type === "IndexedAccessType" || S.type === "OptionalIndexedAccessType") || S.type === "NullableTypeAnnotation" || m.type === "FunctionTypeParam" && m.name === null && a(o).some((b) => b.typeAnnotation && b.typeAnnotation.type === "NullableTypeAnnotation"); + } + case "OptionalIndexedAccessType": + return C === "objectType" && m.type === "IndexedAccessType"; + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof o.value == "string" && m.type === "ExpressionStatement" && !m.directive) { + let S = D.getParentNode(1); + return S.type === "Program" || S.type === "BlockStatement"; + } + return C === "object" && m.type === "MemberExpression" && typeof o.value == "number"; + case "AssignmentExpression": { + let S = D.getParentNode(1); + return C === "body" && m.type === "ArrowFunctionExpression" ? true : C === "key" && (m.type === "ClassProperty" || m.type === "PropertyDefinition") && m.computed || (C === "init" || C === "update") && m.type === "ForStatement" ? false : m.type === "ExpressionStatement" ? o.left.type === "ObjectPattern" : !(C === "key" && m.type === "TSPropertySignature" || m.type === "AssignmentExpression" || m.type === "SequenceExpression" && S && S.type === "ForStatement" && (S.init === m || S.update === m) || C === "value" && m.type === "Property" && S && S.type === "ObjectPattern" && S.properties.includes(m) || m.type === "NGChainedExpression"); + } + case "ConditionalExpression": + switch (m.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertion": + case "TypeCastExpression": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + return true; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "ConditionalExpression": + return C === "test"; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + default: + return false; + } + case "FunctionExpression": + switch (m.type) { + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "TaggedTemplateExpression": + return true; + default: + return false; + } + case "ArrowFunctionExpression": + switch (m.type) { + case "BinaryExpression": + return m.operator !== "|>" || o.extra && o.extra.parenthesized; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": + return C === "callee"; + case "MemberExpression": + case "OptionalMemberExpression": + return C === "object"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "AwaitExpression": + case "TSTypeAssertion": + return true; + case "ConditionalExpression": + return C === "test"; + default: + return false; + } + case "ClassExpression": + if (s(o.decorators)) + return true; + switch (m.type) { + case "NewExpression": + return C === "callee"; + default: + return false; + } + case "OptionalMemberExpression": + case "OptionalCallExpression": { + let S = D.getParentNode(1); + if (C === "object" && m.type === "MemberExpression" || C === "callee" && (m.type === "CallExpression" || m.type === "NewExpression") || m.type === "TSNonNullExpression" && S.type === "MemberExpression" && S.object === m) + return true; + } + case "CallExpression": + case "MemberExpression": + case "TaggedTemplateExpression": + case "TSNonNullExpression": + if (C === "callee" && (m.type === "BindExpression" || m.type === "NewExpression")) { + let S = o; + for (; S; ) + switch (S.type) { + case "CallExpression": + case "OptionalCallExpression": + return true; + case "MemberExpression": + case "OptionalMemberExpression": + case "BindExpression": + S = S.object; + break; + case "TaggedTemplateExpression": + S = S.tag; + break; + case "TSNonNullExpression": + S = S.expression; + break; + default: + return false; + } + } + return false; + case "BindExpression": + return C === "callee" && (m.type === "BindExpression" || m.type === "NewExpression") || C === "object" && f(m); + case "NGPipeExpression": + return !(m.type === "NGRoot" || m.type === "NGMicrosyntaxExpression" || m.type === "ObjectProperty" && !(o.extra && o.extra.parenthesized) || m.type === "ArrayExpression" || c(m) && m.arguments[C] === o || C === "right" && m.type === "NGPipeExpression" || C === "property" && m.type === "MemberExpression" || m.type === "AssignmentExpression"); + case "JSXFragment": + case "JSXElement": + return C === "callee" || C === "left" && m.type === "BinaryExpression" && m.operator === "<" || m.type !== "ArrayExpression" && m.type !== "ArrowFunctionExpression" && m.type !== "AssignmentExpression" && m.type !== "AssignmentPattern" && m.type !== "BinaryExpression" && m.type !== "NewExpression" && m.type !== "ConditionalExpression" && m.type !== "ExpressionStatement" && m.type !== "JsExpressionRoot" && m.type !== "JSXAttribute" && m.type !== "JSXElement" && m.type !== "JSXExpressionContainer" && m.type !== "JSXFragment" && m.type !== "LogicalExpression" && !c(m) && !F(m) && m.type !== "ReturnStatement" && m.type !== "ThrowStatement" && m.type !== "TypeCastExpression" && m.type !== "VariableDeclarator" && m.type !== "YieldExpression"; + case "TypeAnnotation": + return C === "returnType" && m.type === "ArrowFunctionExpression" && x(o); + } + return false; + } + function E(D) { + return D.type === "BlockStatement" || D.type === "BreakStatement" || D.type === "ClassBody" || D.type === "ClassDeclaration" || D.type === "ClassMethod" || D.type === "ClassProperty" || D.type === "PropertyDefinition" || D.type === "ClassPrivateProperty" || D.type === "ContinueStatement" || D.type === "DebuggerStatement" || D.type === "DeclareClass" || D.type === "DeclareExportAllDeclaration" || D.type === "DeclareExportDeclaration" || D.type === "DeclareFunction" || D.type === "DeclareInterface" || D.type === "DeclareModule" || D.type === "DeclareModuleExports" || D.type === "DeclareVariable" || D.type === "DoWhileStatement" || D.type === "EnumDeclaration" || D.type === "ExportAllDeclaration" || D.type === "ExportDefaultDeclaration" || D.type === "ExportNamedDeclaration" || D.type === "ExpressionStatement" || D.type === "ForInStatement" || D.type === "ForOfStatement" || D.type === "ForStatement" || D.type === "FunctionDeclaration" || D.type === "IfStatement" || D.type === "ImportDeclaration" || D.type === "InterfaceDeclaration" || D.type === "LabeledStatement" || D.type === "MethodDefinition" || D.type === "ReturnStatement" || D.type === "SwitchStatement" || D.type === "ThrowStatement" || D.type === "TryStatement" || D.type === "TSDeclareFunction" || D.type === "TSEnumDeclaration" || D.type === "TSImportEqualsDeclaration" || D.type === "TSInterfaceDeclaration" || D.type === "TSModuleDeclaration" || D.type === "TSNamespaceExportDeclaration" || D.type === "TypeAlias" || D.type === "VariableDeclaration" || D.type === "WhileStatement" || D.type === "WithStatement"; + } + function N(D) { + let T = 0, m = D.getValue(); + for (; m; ) { + let C = D.getParentNode(T++); + if (C && C.type === "ForStatement" && C.init === m) + return true; + m = C; + } + return false; + } + function x(D) { + return l(D, (T) => T.type === "ObjectTypeAnnotation" && l(T, (m) => m.type === "FunctionTypeAnnotation" || void 0) || void 0); + } + function I(D) { + switch (D.type) { + case "ObjectExpression": + return true; + default: + return false; + } + } + function P(D) { + let T = D.getValue(), m = D.getParentNode(), C = D.getName(); + switch (m.type) { + case "NGPipeExpression": + if (typeof C == "number" && m.arguments[C] === T && m.arguments.length - 1 === C) + return D.callParent(P); + break; + case "ObjectProperty": + if (C === "value") { + let o = D.getParentNode(1); + return t2(o.properties) === m; + } + break; + case "BinaryExpression": + case "LogicalExpression": + if (C === "right") + return D.callParent(P); + break; + case "ConditionalExpression": + if (C === "alternate") + return D.callParent(P); + break; + case "UnaryExpression": + if (m.prefix) + return D.callParent(P); + break; + } + return false; + } + function $(D, T) { + let m = D.getValue(), C = D.getParentNode(); + return m.type === "FunctionExpression" || m.type === "ClassExpression" ? C.type === "ExportDefaultDeclaration" || !w(D, T) : !i(m) || C.type !== "ExportDefaultDeclaration" && w(D, T) ? false : D.call((o) => $(o, T), ...n(D, m)); + } + r.exports = w; + } }), Fo = te({ "src/language-js/print-preprocess.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + switch (a.parser) { + case "json": + case "json5": + case "json-stringify": + case "__js_expression": + case "__vue_expression": + case "__vue_ts_expression": + return Object.assign(Object.assign({}, s), {}, { type: a.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", node: s, comments: [], rootMarker: a.rootMarker }); + default: + return s; + } + } + r.exports = t2; + } }), pd = te({ "src/language-js/print/html-binding.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, line: s, group: a, softline: n, indent: u } } = qe(); + function i(p2, y, h) { + let g = p2.getValue(); + if (y.__onHtmlBindingRoot && p2.getName() === null && y.__onHtmlBindingRoot(g, y), g.type === "File") { + if (y.__isVueForBindingLeft) + return p2.call((c) => { + let f = t2([",", s], c.map(h, "params")), { params: F } = c.getValue(); + return F.length === 1 ? f : ["(", u([n, a(f)]), n, ")"]; + }, "program", "body", 0); + if (y.__isVueBindings) + return p2.call((c) => t2([",", s], c.map(h, "params")), "program", "body", 0); + } + } + function l(p2) { + switch (p2.type) { + case "MemberExpression": + switch (p2.property.type) { + case "Identifier": + case "NumericLiteral": + case "StringLiteral": + return l(p2.object); + } + return false; + case "Identifier": + return true; + default: + return false; + } + } + r.exports = { isVueEventBindingExpression: l, printHtmlBinding: i }; + } }), ru = te({ "src/language-js/print/binaryish.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { getLast: s } = Ue(), { builders: { join: a, line: n, softline: u, group: i, indent: l, align: p2, indentIfBreak: y }, utils: { cleanDoc: h, getDocParts: g, isConcat: c } } = qe(), { hasLeadingOwnLineComment: f, isBinaryish: F, isJsxNode: _, shouldFlatten: w, hasComment: E, CommentCheckFlags: N, isCallExpression: x, isMemberExpression: I, isObjectProperty: P, isEnabledHackPipeline: $ } = Ke(), D = 0; + function T(o, d, v) { + let S = o.getValue(), b = o.getParentNode(), B = o.getParentNode(1), k = S !== b.body && (b.type === "IfStatement" || b.type === "WhileStatement" || b.type === "SwitchStatement" || b.type === "DoWhileStatement"), M = $(d) && S.operator === "|>", R = m(o, v, d, false, k); + if (k) + return R; + if (M) + return i(R); + if (x(b) && b.callee === S || b.type === "UnaryExpression" || I(b) && !b.computed) + return i([l([u, ...R]), u]); + let q = b.type === "ReturnStatement" || b.type === "ThrowStatement" || b.type === "JSXExpressionContainer" && B.type === "JSXAttribute" || S.operator !== "|" && b.type === "JsExpressionRoot" || S.type !== "NGPipeExpression" && (b.type === "NGRoot" && d.parser === "__ng_binding" || b.type === "NGMicrosyntaxExpression" && B.type === "NGMicrosyntax" && B.body.length === 1) || S === b.body && b.type === "ArrowFunctionExpression" || S !== b.body && b.type === "ForStatement" || b.type === "ConditionalExpression" && B.type !== "ReturnStatement" && B.type !== "ThrowStatement" && !x(B) || b.type === "TemplateLiteral", J = b.type === "AssignmentExpression" || b.type === "VariableDeclarator" || b.type === "ClassProperty" || b.type === "PropertyDefinition" || b.type === "TSAbstractPropertyDefinition" || b.type === "ClassPrivateProperty" || P(b), L = F(S.left) && w(S.operator, S.left.operator); + if (q || C(S) && !L || !C(S) && J) + return i(R); + if (R.length === 0) + return ""; + let Q = _(S.right), V = R.findIndex((W) => typeof W != "string" && !Array.isArray(W) && W.type === "group"), j = R.slice(0, V === -1 ? 1 : V + 1), Y = R.slice(j.length, Q ? -1 : void 0), ie = Symbol("logicalChain-" + ++D), ee = i([...j, l(Y)], { id: ie }); + if (!Q) + return ee; + let ce = s(R); + return i([ee, y(ce, { groupId: ie })]); + } + function m(o, d, v, S, b) { + let B = o.getValue(); + if (!F(B)) + return [i(d())]; + let k = []; + w(B.operator, B.left.operator) ? k = o.call((Y) => m(Y, d, v, true, b), "left") : k.push(i(d("left"))); + let M = C(B), R = (B.operator === "|>" || B.type === "NGPipeExpression" || B.operator === "|" && v.parser === "__vue_expression") && !f(v.originalText, B.right), q = B.type === "NGPipeExpression" ? "|" : B.operator, J = B.type === "NGPipeExpression" && B.arguments.length > 0 ? i(l([n, ": ", a([n, ": "], o.map(d, "arguments").map((Y) => p2(2, i(Y))))])) : "", L; + if (M) + L = [q, " ", d("right"), J]; + else { + let ie = $(v) && q === "|>" ? o.call((ee) => m(ee, d, v, true, b), "right") : d("right"); + L = [R ? n : "", q, R ? " " : n, ie, J]; + } + let Q = o.getParentNode(), V = E(B.left, N.Trailing | N.Line), j = V || !(b && B.type === "LogicalExpression") && Q.type !== B.type && B.left.type !== B.type && B.right.type !== B.type; + if (k.push(R ? "" : " ", j ? i(L, { shouldBreak: V }) : L), S && E(B)) { + let Y = h(t2(o, k, v)); + return c(Y) || Y.type === "fill" ? g(Y) : [Y]; + } + return k; + } + function C(o) { + return o.type !== "LogicalExpression" ? false : !!(o.right.type === "ObjectExpression" && o.right.properties.length > 0 || o.right.type === "ArrayExpression" && o.right.elements.length > 0 || _(o.right)); + } + r.exports = { printBinaryishExpression: T, shouldInlineLogicalExpression: C }; + } }), fd = te({ "src/language-js/print/angular.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, line: s, group: a } } = qe(), { hasNode: n, hasComment: u, getComments: i } = Ke(), { printBinaryishExpression: l } = ru(); + function p2(g, c, f) { + let F = g.getValue(); + if (F.type.startsWith("NG")) + switch (F.type) { + case "NGRoot": + return [f("node"), u(F.node) ? " //" + i(F.node)[0].value.trimEnd() : ""]; + case "NGPipeExpression": + return l(g, c, f); + case "NGChainedExpression": + return a(t2([";", s], g.map((_) => h(_) ? f() : ["(", f(), ")"], "expressions"))); + case "NGEmptyExpression": + return ""; + case "NGQuotedExpression": + return [F.prefix, ": ", F.value.trim()]; + case "NGMicrosyntax": + return g.map((_, w) => [w === 0 ? "" : y(_.getValue(), w, F) ? " " : [";", s], f()], "body"); + case "NGMicrosyntaxKey": + return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(F.name) ? F.name : JSON.stringify(F.name); + case "NGMicrosyntaxExpression": + return [f("expression"), F.alias === null ? "" : [" as ", f("alias")]]; + case "NGMicrosyntaxKeyedExpression": { + let _ = g.getName(), w = g.getParentNode(), E = y(F, _, w) || (_ === 1 && (F.key.name === "then" || F.key.name === "else") || _ === 2 && F.key.name === "else" && w.body[_ - 1].type === "NGMicrosyntaxKeyedExpression" && w.body[_ - 1].key.name === "then") && w.body[0].type === "NGMicrosyntaxExpression"; + return [f("key"), E ? " " : ": ", f("expression")]; + } + case "NGMicrosyntaxLet": + return ["let ", f("key"), F.value === null ? "" : [" = ", f("value")]]; + case "NGMicrosyntaxAs": + return [f("key"), " as ", f("alias")]; + default: + throw new Error(`Unknown Angular node type: ${JSON.stringify(F.type)}.`); + } + } + function y(g, c, f) { + return g.type === "NGMicrosyntaxKeyedExpression" && g.key.name === "of" && c === 1 && f.body[0].type === "NGMicrosyntaxLet" && f.body[0].value === null; + } + function h(g) { + return n(g.getValue(), (c) => { + switch (c.type) { + case void 0: + return false; + case "CallExpression": + case "OptionalCallExpression": + case "AssignmentExpression": + return true; + } + }); + } + r.exports = { printAngular: p2 }; + } }), Dd = te({ "src/language-js/print/jsx.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2, printDanglingComments: s, printCommentsSeparately: a } = et(), { builders: { line: n, hardline: u, softline: i, group: l, indent: p2, conditionalGroup: y, fill: h, ifBreak: g, lineSuffixBoundary: c, join: f }, utils: { willBreak: F } } = qe(), { getLast: _, getPreferredQuote: w } = Ue(), { isJsxNode: E, rawText: N, isCallExpression: x, isStringLiteral: I, isBinaryish: P, hasComment: $, CommentCheckFlags: D, hasNodeIgnoreComment: T } = Ke(), m = qt(), { willPrintOwnComments: C } = Eo(), o = (U) => U === "" || U === n || U === u || U === i; + function d(U, Z, se) { + let fe = U.getValue(); + if (fe.type === "JSXElement" && de(fe)) + return [se("openingElement"), se("closingElement")]; + let ge = fe.type === "JSXElement" ? se("openingElement") : se("openingFragment"), he = fe.type === "JSXElement" ? se("closingElement") : se("closingFragment"); + if (fe.children.length === 1 && fe.children[0].type === "JSXExpressionContainer" && (fe.children[0].expression.type === "TemplateLiteral" || fe.children[0].expression.type === "TaggedTemplateExpression")) + return [ge, ...U.map(se, "children"), he]; + fe.children = fe.children.map((A) => Fe(A) ? { type: "JSXText", value: " ", raw: " " } : A); + let we = fe.children.some(E), ke = fe.children.filter((A) => A.type === "JSXExpressionContainer").length > 1, Re = fe.type === "JSXElement" && fe.openingElement.attributes.length > 1, Ne = F(ge) || we || Re || ke, Pe = U.getParentNode().rootMarker === "mdx", oe = Z.singleQuote ? "{' '}" : '{" "}', H = Pe ? " " : g([oe, i], " "), pe = fe.openingElement && fe.openingElement.name && fe.openingElement.name.name === "fbt", X = v(U, Z, se, H, pe), le = fe.children.some((A) => ue(A)); + for (let A = X.length - 2; A >= 0; A--) { + let G = X[A] === "" && X[A + 1] === "", re = X[A] === u && X[A + 1] === "" && X[A + 2] === u, ye = (X[A] === i || X[A] === u) && X[A + 1] === "" && X[A + 2] === H, Ce = X[A] === H && X[A + 1] === "" && (X[A + 2] === i || X[A + 2] === u), Be = X[A] === H && X[A + 1] === "" && X[A + 2] === H, ve = X[A] === i && X[A + 1] === "" && X[A + 2] === u || X[A] === u && X[A + 1] === "" && X[A + 2] === i; + re && le || G || ye || Be || ve ? X.splice(A, 2) : Ce && X.splice(A + 1, 2); + } + for (; X.length > 0 && o(_(X)); ) + X.pop(); + for (; X.length > 1 && o(X[0]) && o(X[1]); ) + X.shift(), X.shift(); + let Ae = []; + for (let [A, G] of X.entries()) { + if (G === H) { + if (A === 1 && X[A - 1] === "") { + if (X.length === 2) { + Ae.push(oe); + continue; + } + Ae.push([oe, u]); + continue; + } else if (A === X.length - 1) { + Ae.push(oe); + continue; + } else if (X[A - 1] === "" && X[A - 2] === u) { + Ae.push(oe); + continue; + } + } + Ae.push(G), F(G) && (Ne = true); + } + let Ee = le ? h(Ae) : l(Ae, { shouldBreak: true }); + if (Pe) + return Ee; + let De = l([ge, p2([u, Ee]), u, he]); + return Ne ? De : y([l([ge, ...X, he]), De]); + } + function v(U, Z, se, fe, ge) { + let he = []; + return U.each((we, ke, Re) => { + let Ne = we.getValue(); + if (Ne.type === "JSXText") { + let Pe = N(Ne); + if (ue(Ne)) { + let oe = Pe.split(ce); + if (oe[0] === "") { + if (he.push(""), oe.shift(), /\n/.test(oe[0])) { + let pe = Re[ke + 1]; + he.push(b(ge, oe[1], Ne, pe)); + } else + he.push(fe); + oe.shift(); + } + let H; + if (_(oe) === "" && (oe.pop(), H = oe.pop()), oe.length === 0) + return; + for (let [pe, X] of oe.entries()) + pe % 2 === 1 ? he.push(n) : he.push(X); + if (H !== void 0) + if (/\n/.test(H)) { + let pe = Re[ke + 1]; + he.push(b(ge, _(he), Ne, pe)); + } else + he.push(fe); + else { + let pe = Re[ke + 1]; + he.push(S(ge, _(he), Ne, pe)); + } + } else + /\n/.test(Pe) ? Pe.match(/\n/g).length > 1 && he.push("", u) : he.push("", fe); + } else { + let Pe = se(); + he.push(Pe); + let oe = Re[ke + 1]; + if (oe && ue(oe)) { + let pe = K(N(oe)).split(ce)[0]; + he.push(S(ge, pe, Ne, oe)); + } else + he.push(u); + } + }, "children"), he; + } + function S(U, Z, se, fe) { + return U ? "" : se.type === "JSXElement" && !se.closingElement || fe && fe.type === "JSXElement" && !fe.closingElement ? Z.length === 1 ? i : u : i; + } + function b(U, Z, se, fe) { + return U ? u : Z.length === 1 ? se.type === "JSXElement" && !se.closingElement || fe && fe.type === "JSXElement" && !fe.closingElement ? u : i : u; + } + function B(U, Z, se) { + let fe = U.getParentNode(); + if (!fe || { ArrayExpression: true, JSXAttribute: true, JSXElement: true, JSXExpressionContainer: true, JSXFragment: true, ExpressionStatement: true, CallExpression: true, OptionalCallExpression: true, ConditionalExpression: true, JsExpressionRoot: true }[fe.type]) + return Z; + let he = U.match(void 0, (ke) => ke.type === "ArrowFunctionExpression", x, (ke) => ke.type === "JSXExpressionContainer"), we = m(U, se); + return l([we ? "" : g("("), p2([i, Z]), i, we ? "" : g(")")], { shouldBreak: he }); + } + function k(U, Z, se) { + let fe = U.getValue(), ge = []; + if (ge.push(se("name")), fe.value) { + let he; + if (I(fe.value)) { + let ke = N(fe.value).slice(1, -1).replace(/'/g, "'").replace(/"/g, '"'), { escaped: Re, quote: Ne, regex: Pe } = w(ke, Z.jsxSingleQuote ? "'" : '"'); + ke = ke.replace(Pe, Re); + let { leading: oe, trailing: H } = U.call(() => a(U, Z), "value"); + he = [oe, Ne, ke, Ne, H]; + } else + he = se("value"); + ge.push("=", he); + } + return ge; + } + function M(U, Z, se) { + let fe = U.getValue(), ge = (he, we) => he.type === "JSXEmptyExpression" || !$(he) && (he.type === "ArrayExpression" || he.type === "ObjectExpression" || he.type === "ArrowFunctionExpression" || he.type === "AwaitExpression" && (ge(he.argument, he) || he.argument.type === "JSXElement") || x(he) || he.type === "FunctionExpression" || he.type === "TemplateLiteral" || he.type === "TaggedTemplateExpression" || he.type === "DoExpression" || E(we) && (he.type === "ConditionalExpression" || P(he))); + return ge(fe.expression, U.getParentNode(0)) ? l(["{", se("expression"), c, "}"]) : l(["{", p2([i, se("expression")]), i, c, "}"]); + } + function R(U, Z, se) { + let fe = U.getValue(), ge = fe.name && $(fe.name) || fe.typeParameters && $(fe.typeParameters); + if (fe.selfClosing && fe.attributes.length === 0 && !ge) + return ["<", se("name"), se("typeParameters"), " />"]; + if (fe.attributes && fe.attributes.length === 1 && fe.attributes[0].value && I(fe.attributes[0].value) && !fe.attributes[0].value.value.includes(` +`) && !ge && !$(fe.attributes[0])) + return l(["<", se("name"), se("typeParameters"), " ", ...U.map(se, "attributes"), fe.selfClosing ? " />" : ">"]); + let he = fe.attributes && fe.attributes.some((ke) => ke.value && I(ke.value) && ke.value.value.includes(` +`)), we = Z.singleAttributePerLine && fe.attributes.length > 1 ? u : n; + return l(["<", se("name"), se("typeParameters"), p2(U.map(() => [we, se()], "attributes")), ...q(fe, Z, ge)], { shouldBreak: he }); + } + function q(U, Z, se) { + return U.selfClosing ? [n, "/>"] : J(U, Z, se) ? [">"] : [i, ">"]; + } + function J(U, Z, se) { + let fe = U.attributes.length > 0 && $(_(U.attributes), D.Trailing); + return U.attributes.length === 0 && !se || (Z.bracketSameLine || Z.jsxBracketSameLine) && (!se || U.attributes.length > 0) && !fe; + } + function L(U, Z, se) { + let fe = U.getValue(), ge = []; + ge.push(""), ge; + } + function Q(U, Z) { + let se = U.getValue(), fe = $(se), ge = $(se, D.Line), he = se.type === "JSXOpeningFragment"; + return [he ? "<" : ""]; + } + function V(U, Z, se) { + let fe = t2(U, d(U, Z, se), Z); + return B(U, fe, Z); + } + function j(U, Z) { + let se = U.getValue(), fe = $(se, D.Line); + return [s(U, Z, !fe), fe ? u : ""]; + } + function Y(U, Z, se) { + let fe = U.getValue(); + return ["{", U.call((ge) => { + let he = ["...", se()], we = ge.getValue(); + return !$(we) || !C(ge) ? he : [p2([i, t2(ge, he, Z)]), i]; + }, fe.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]; + } + function ie(U, Z, se) { + let fe = U.getValue(); + if (fe.type.startsWith("JSX")) + switch (fe.type) { + case "JSXAttribute": + return k(U, Z, se); + case "JSXIdentifier": + return String(fe.name); + case "JSXNamespacedName": + return f(":", [se("namespace"), se("name")]); + case "JSXMemberExpression": + return f(".", [se("object"), se("property")]); + case "JSXSpreadAttribute": + return Y(U, Z, se); + case "JSXSpreadChild": + return Y(U, Z, se); + case "JSXExpressionContainer": + return M(U, Z, se); + case "JSXFragment": + case "JSXElement": + return V(U, Z, se); + case "JSXOpeningElement": + return R(U, Z, se); + case "JSXClosingElement": + return L(U, Z, se); + case "JSXOpeningFragment": + case "JSXClosingFragment": + return Q(U, Z); + case "JSXEmptyExpression": + return j(U, Z); + case "JSXText": + throw new Error("JSXText should be handled by JSXElement"); + default: + throw new Error(`Unknown JSX node type: ${JSON.stringify(fe.type)}.`); + } + } + var ee = ` +\r `, ce = new RegExp("([" + ee + "]+)"), W = new RegExp("[^" + ee + "]"), K = (U) => U.replace(new RegExp("(?:^" + ce.source + "|" + ce.source + "$)"), ""); + function de(U) { + if (U.children.length === 0) + return true; + if (U.children.length > 1) + return false; + let Z = U.children[0]; + return Z.type === "JSXText" && !ue(Z); + } + function ue(U) { + return U.type === "JSXText" && (W.test(N(U)) || !/\n/.test(N(U))); + } + function Fe(U) { + return U.type === "JSXExpressionContainer" && I(U.expression) && U.expression.value === " " && !$(U.expression); + } + function z(U) { + let Z = U.getValue(), se = U.getParentNode(); + if (!se || !Z || !E(Z) || !E(se)) + return false; + let fe = se.children.indexOf(Z), ge = null; + for (let he = fe; he > 0; he--) { + let we = se.children[he - 1]; + if (!(we.type === "JSXText" && !ue(we))) { + ge = we; + break; + } + } + return ge && ge.type === "JSXExpressionContainer" && ge.expression.type === "JSXEmptyExpression" && T(ge.expression); + } + r.exports = { hasJsxIgnoreComment: z, printJsx: ie }; + } }), ct = te({ "src/language-js/print/misc.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { indent: s, join: a, line: n } } = qe(), { isFlowAnnotationComment: u } = Ke(); + function i(_) { + let w = _.getValue(); + return !w.optional || w.type === "Identifier" && w === _.getParentNode().key ? "" : w.type === "OptionalCallExpression" || w.type === "OptionalMemberExpression" && w.computed ? "?." : "?"; + } + function l(_) { + return _.getValue().definite || _.match(void 0, (w, E) => E === "id" && w.type === "VariableDeclarator" && w.definite) ? "!" : ""; + } + function p2(_, w, E) { + let N = _.getValue(); + return N.typeArguments ? E("typeArguments") : N.typeParameters ? E("typeParameters") : ""; + } + function y(_, w, E) { + let N = _.getValue(); + if (!N.typeAnnotation) + return ""; + let x = _.getParentNode(), I = x.type === "DeclareFunction" && x.id === N; + return u(w.originalText, N.typeAnnotation) ? [" /*: ", E("typeAnnotation"), " */"] : [I ? "" : ": ", E("typeAnnotation")]; + } + function h(_, w, E) { + return ["::", E("callee")]; + } + function g(_, w, E) { + let N = _.getValue(); + return t2(N.modifiers) ? [a(" ", _.map(E, "modifiers")), " "] : ""; + } + function c(_, w, E) { + return _.type === "EmptyStatement" ? ";" : _.type === "BlockStatement" || E ? [" ", w] : s([n, w]); + } + function f(_, w, E) { + return ["...", E("argument"), y(_, w, E)]; + } + function F(_, w) { + let E = _.slice(1, -1); + if (E.includes('"') || E.includes("'")) + return _; + let N = w.singleQuote ? "'" : '"'; + return N + E + N; + } + r.exports = { printOptionalToken: i, printDefiniteToken: l, printFunctionTypeParameters: p2, printBindExpressionCallee: h, printTypeScriptModifiers: g, printTypeAnnotation: y, printRestSpread: f, adjustClause: c, printDirective: F }; + } }), er = te({ "src/language-js/print/array.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { line: s, softline: a, hardline: n, group: u, indent: i, ifBreak: l, fill: p2 } } = qe(), { getLast: y, hasNewline: h } = Ue(), { shouldPrintComma: g, hasComment: c, CommentCheckFlags: f, isNextLineEmpty: F, isNumericLiteral: _, isSignedNumericLiteral: w } = Ke(), { locStart: E } = ut(), { printOptionalToken: N, printTypeAnnotation: x } = ct(); + function I(T, m, C) { + let o = T.getValue(), d = [], v = o.type === "TupleExpression" ? "#[" : "[", S = "]"; + if (o.elements.length === 0) + c(o, f.Dangling) ? d.push(u([v, t2(T, m), a, S])) : d.push(v, S); + else { + let b = y(o.elements), B = !(b && b.type === "RestElement"), k = b === null, M = Symbol("array"), R = !m.__inJestEach && o.elements.length > 1 && o.elements.every((L, Q, V) => { + let j = L && L.type; + if (j !== "ArrayExpression" && j !== "ObjectExpression") + return false; + let Y = V[Q + 1]; + if (Y && j !== Y.type) + return false; + let ie = j === "ArrayExpression" ? "elements" : "properties"; + return L[ie] && L[ie].length > 1; + }), q = P(o, m), J = B ? k ? "," : g(m) ? q ? l(",", "", { groupId: M }) : l(",") : "" : ""; + d.push(u([v, i([a, q ? D(T, m, C, J) : [$(T, m, "elements", C), J], t2(T, m, true)]), a, S], { shouldBreak: R, id: M })); + } + return d.push(N(T), x(T, m, C)), d; + } + function P(T, m) { + return T.elements.length > 1 && T.elements.every((C) => C && (_(C) || w(C) && !c(C.argument)) && !c(C, f.Trailing | f.Line, (o) => !h(m.originalText, E(o), { backwards: true }))); + } + function $(T, m, C, o) { + let d = [], v = []; + return T.each((S) => { + d.push(v, u(o())), v = [",", s], S.getValue() && F(S.getValue(), m) && v.push(a); + }, C), d; + } + function D(T, m, C, o) { + let d = []; + return T.each((v, S, b) => { + let B = S === b.length - 1; + d.push([C(), B ? o : ","]), B || d.push(F(v.getValue(), m) ? [n, n] : c(b[S + 1], f.Leading | f.Line) ? n : s); + }, "elements"), p2(d); + } + r.exports = { printArray: I, printArrayItems: $, isConciselyPrintedArray: P }; + } }), Ao = te({ "src/language-js/print/call-arguments.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { getLast: s, getPenultimate: a } = Ue(), { getFunctionParameters: n, hasComment: u, CommentCheckFlags: i, isFunctionCompositionArgs: l, isJsxNode: p2, isLongCurriedCallExpression: y, shouldPrintComma: h, getCallArguments: g, iterateCallArgumentsPath: c, isNextLineEmpty: f, isCallExpression: F, isStringLiteral: _, isObjectProperty: w, isTSTypeExpression: E } = Ke(), { builders: { line: N, hardline: x, softline: I, group: P, indent: $, conditionalGroup: D, ifBreak: T, breakParent: m }, utils: { willBreak: C } } = qe(), { ArgExpansionBailout: o } = Qt(), { isConciselyPrintedArray: d } = er(); + function v(q, J, L) { + let Q = q.getValue(), V = Q.type === "ImportExpression", j = g(Q); + if (j.length === 0) + return ["(", t2(q, J, true), ")"]; + if (k(j)) + return ["(", L(["arguments", 0]), ", ", L(["arguments", 1]), ")"]; + let Y = false, ie = false, ee = j.length - 1, ce = []; + c(q, (z, U) => { + let Z = z.getNode(), se = [L()]; + U === ee || (f(Z, J) ? (U === 0 && (ie = true), Y = true, se.push(",", x, x)) : se.push(",", N)), ce.push(se); + }); + let W = !(V || Q.callee && Q.callee.type === "Import") && h(J, "all") ? "," : ""; + function K() { + return P(["(", $([N, ...ce]), W, N, ")"], { shouldBreak: true }); + } + if (Y || q.getParentNode().type !== "Decorator" && l(j)) + return K(); + let de = B(j), ue = b(j, J); + if (de || ue) { + if (de ? ce.slice(1).some(C) : ce.slice(0, -1).some(C)) + return K(); + let z = []; + try { + q.try(() => { + c(q, (U, Z) => { + de && Z === 0 && (z = [[L([], { expandFirstArg: true }), ce.length > 1 ? "," : "", ie ? x : N, ie ? x : ""], ...ce.slice(1)]), ue && Z === ee && (z = [...ce.slice(0, -1), L([], { expandLastArg: true })]); + }); + }); + } catch (U) { + if (U instanceof o) + return K(); + throw U; + } + return [ce.some(C) ? m : "", D([["(", ...z, ")"], de ? ["(", P(z[0], { shouldBreak: true }), ...z.slice(1), ")"] : ["(", ...ce.slice(0, -1), P(s(z), { shouldBreak: true }), ")"], K()])]; + } + let Fe = ["(", $([I, ...ce]), T(W), I, ")"]; + return y(q) ? Fe : P(Fe, { shouldBreak: ce.some(C) || Y }); + } + function S(q) { + let J = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + return q.type === "ObjectExpression" && (q.properties.length > 0 || u(q)) || q.type === "ArrayExpression" && (q.elements.length > 0 || u(q)) || q.type === "TSTypeAssertion" && S(q.expression) || E(q) && S(q.expression) || q.type === "FunctionExpression" || q.type === "ArrowFunctionExpression" && (!q.returnType || !q.returnType.typeAnnotation || q.returnType.typeAnnotation.type !== "TSTypeReference" || M(q.body)) && (q.body.type === "BlockStatement" || q.body.type === "ArrowFunctionExpression" && S(q.body, true) || q.body.type === "ObjectExpression" || q.body.type === "ArrayExpression" || !J && (F(q.body) || q.body.type === "ConditionalExpression") || p2(q.body)) || q.type === "DoExpression" || q.type === "ModuleExpression"; + } + function b(q, J) { + let L = s(q), Q = a(q); + return !u(L, i.Leading) && !u(L, i.Trailing) && S(L) && (!Q || Q.type !== L.type) && (q.length !== 2 || Q.type !== "ArrowFunctionExpression" || L.type !== "ArrayExpression") && !(q.length > 1 && L.type === "ArrayExpression" && d(L, J)); + } + function B(q) { + if (q.length !== 2) + return false; + let [J, L] = q; + return J.type === "ModuleExpression" && R(L) ? true : !u(J) && (J.type === "FunctionExpression" || J.type === "ArrowFunctionExpression" && J.body.type === "BlockStatement") && L.type !== "FunctionExpression" && L.type !== "ArrowFunctionExpression" && L.type !== "ConditionalExpression" && !S(L); + } + function k(q) { + return q.length === 2 && q[0].type === "ArrowFunctionExpression" && n(q[0]).length === 0 && q[0].body.type === "BlockStatement" && q[1].type === "ArrayExpression" && !q.some((J) => u(J)); + } + function M(q) { + return q.type === "BlockStatement" && (q.body.some((J) => J.type !== "EmptyStatement") || u(q, i.Dangling)); + } + function R(q) { + return q.type === "ObjectExpression" && q.properties.length === 1 && w(q.properties[0]) && q.properties[0].key.type === "Identifier" && q.properties[0].key.name === "type" && _(q.properties[0].value) && q.properties[0].value.value === "module"; + } + r.exports = v; + } }), So = te({ "src/language-js/print/member.js"(e, r) { + "use strict"; + ne(); + var { builders: { softline: t2, group: s, indent: a, label: n } } = qe(), { isNumericLiteral: u, isMemberExpression: i, isCallExpression: l } = Ke(), { printOptionalToken: p2 } = ct(); + function y(g, c, f) { + let F = g.getValue(), _ = g.getParentNode(), w, E = 0; + do + w = g.getParentNode(E), E++; + while (w && (i(w) || w.type === "TSNonNullExpression")); + let N = f("object"), x = h(g, c, f), I = w && (w.type === "NewExpression" || w.type === "BindExpression" || w.type === "AssignmentExpression" && w.left.type !== "Identifier") || F.computed || F.object.type === "Identifier" && F.property.type === "Identifier" && !i(_) || (_.type === "AssignmentExpression" || _.type === "VariableDeclarator") && (l(F.object) && F.object.arguments.length > 0 || F.object.type === "TSNonNullExpression" && l(F.object.expression) && F.object.expression.arguments.length > 0 || N.label === "member-chain"); + return n(N.label === "member-chain" ? "member-chain" : "member", [N, I ? x : s(a([t2, x]))]); + } + function h(g, c, f) { + let F = f("property"), _ = g.getValue(), w = p2(g); + return _.computed ? !_.property || u(_.property) ? [w, "[", F, "]"] : s([w, "[", a([t2, F]), t2, "]"]) : [w, ".", F]; + } + r.exports = { printMemberExpression: y, printMemberLookup: h }; + } }), md = te({ "src/language-js/print/member-chain.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { getLast: s, isNextLineEmptyAfterIndex: a, getNextNonSpaceNonCommentCharacterIndex: n } = Ue(), u = qt(), { isCallExpression: i, isMemberExpression: l, isFunctionOrArrowExpression: p2, isLongCurriedCallExpression: y, isMemberish: h, isNumericLiteral: g, isSimpleCallArgument: c, hasComment: f, CommentCheckFlags: F, isNextLineEmpty: _ } = Ke(), { locEnd: w } = ut(), { builders: { join: E, hardline: N, group: x, indent: I, conditionalGroup: P, breakParent: $, label: D }, utils: { willBreak: T } } = qe(), m = Ao(), { printMemberLookup: C } = So(), { printOptionalToken: o, printFunctionTypeParameters: d, printBindExpressionCallee: v } = ct(); + function S(b, B, k) { + let M = b.getParentNode(), R = !M || M.type === "ExpressionStatement", q = []; + function J(Ne) { + let { originalText: Pe } = B, oe = n(Pe, Ne, w); + return Pe.charAt(oe) === ")" ? oe !== false && a(Pe, oe + 1) : _(Ne, B); + } + function L(Ne) { + let Pe = Ne.getValue(); + i(Pe) && (h(Pe.callee) || i(Pe.callee)) ? (q.unshift({ node: Pe, printed: [t2(Ne, [o(Ne), d(Ne, B, k), m(Ne, B, k)], B), J(Pe) ? N : ""] }), Ne.call((oe) => L(oe), "callee")) : h(Pe) ? (q.unshift({ node: Pe, needsParens: u(Ne, B), printed: t2(Ne, l(Pe) ? C(Ne, B, k) : v(Ne, B, k), B) }), Ne.call((oe) => L(oe), "object")) : Pe.type === "TSNonNullExpression" ? (q.unshift({ node: Pe, printed: t2(Ne, "!", B) }), Ne.call((oe) => L(oe), "expression")) : q.unshift({ node: Pe, printed: k() }); + } + let Q = b.getValue(); + q.unshift({ node: Q, printed: [o(b), d(b, B, k), m(b, B, k)] }), Q.callee && b.call((Ne) => L(Ne), "callee"); + let V = [], j = [q[0]], Y = 1; + for (; Y < q.length && (q[Y].node.type === "TSNonNullExpression" || i(q[Y].node) || l(q[Y].node) && q[Y].node.computed && g(q[Y].node.property)); ++Y) + j.push(q[Y]); + if (!i(q[0].node)) + for (; Y + 1 < q.length && (h(q[Y].node) && h(q[Y + 1].node)); ++Y) + j.push(q[Y]); + V.push(j), j = []; + let ie = false; + for (; Y < q.length; ++Y) { + if (ie && h(q[Y].node)) { + if (q[Y].node.computed && g(q[Y].node.property)) { + j.push(q[Y]); + continue; + } + V.push(j), j = [], ie = false; + } + (i(q[Y].node) || q[Y].node.type === "ImportExpression") && (ie = true), j.push(q[Y]), f(q[Y].node, F.Trailing) && (V.push(j), j = [], ie = false); + } + j.length > 0 && V.push(j); + function ee(Ne) { + return /^[A-Z]|^[$_]+$/.test(Ne); + } + function ce(Ne) { + return Ne.length <= B.tabWidth; + } + function W(Ne) { + let Pe = Ne[1].length > 0 && Ne[1][0].node.computed; + if (Ne[0].length === 1) { + let H = Ne[0][0].node; + return H.type === "ThisExpression" || H.type === "Identifier" && (ee(H.name) || R && ce(H.name) || Pe); + } + let oe = s(Ne[0]).node; + return l(oe) && oe.property.type === "Identifier" && (ee(oe.property.name) || Pe); + } + let K = V.length >= 2 && !f(V[1][0].node) && W(V); + function de(Ne) { + let Pe = Ne.map((oe) => oe.printed); + return Ne.length > 0 && s(Ne).needsParens ? ["(", ...Pe, ")"] : Pe; + } + function ue(Ne) { + return Ne.length === 0 ? "" : I(x([N, E(N, Ne.map(de))])); + } + let Fe = V.map(de), z = Fe, U = K ? 3 : 2, Z = V.flat(), se = Z.slice(1, -1).some((Ne) => f(Ne.node, F.Leading)) || Z.slice(0, -1).some((Ne) => f(Ne.node, F.Trailing)) || V[U] && f(V[U][0].node, F.Leading); + if (V.length <= U && !se) + return y(b) ? z : x(z); + let fe = s(V[K ? 1 : 0]).node, ge = !i(fe) && J(fe), he = [de(V[0]), K ? V.slice(1, 2).map(de) : "", ge ? N : "", ue(V.slice(K ? 2 : 1))], we = q.map((Ne) => { + let { node: Pe } = Ne; + return Pe; + }).filter(i); + function ke() { + let Ne = s(s(V)).node, Pe = s(Fe); + return i(Ne) && T(Pe) && we.slice(0, -1).some((oe) => oe.arguments.some(p2)); + } + let Re; + return se || we.length > 2 && we.some((Ne) => !Ne.arguments.every((Pe) => c(Pe, 0))) || Fe.slice(0, -1).some(T) || ke() ? Re = x(he) : Re = [T(z) || ge ? $ : "", P([z, he])], D("member-chain", Re); + } + r.exports = S; + } }), xo = te({ "src/language-js/print/call-expression.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, group: s } } = qe(), a = qt(), { getCallArguments: n, hasFlowAnnotationComment: u, isCallExpression: i, isMemberish: l, isStringLiteral: p2, isTemplateOnItsOwnLine: y, isTestCall: h, iterateCallArgumentsPath: g } = Ke(), c = md(), f = Ao(), { printOptionalToken: F, printFunctionTypeParameters: _ } = ct(); + function w(N, x, I) { + let P = N.getValue(), $ = N.getParentNode(), D = P.type === "NewExpression", T = P.type === "ImportExpression", m = F(N), C = n(P); + if (C.length > 0 && (!T && !D && E(P, $) || C.length === 1 && y(C[0], x.originalText) || !D && h(P, $))) { + let v = []; + return g(N, () => { + v.push(I()); + }), [D ? "new " : "", I("callee"), m, _(N, x, I), "(", t2(", ", v), ")"]; + } + let o = (x.parser === "babel" || x.parser === "babel-flow") && P.callee && P.callee.type === "Identifier" && u(P.callee.trailingComments); + if (o && (P.callee.trailingComments[0].printed = true), !T && !D && l(P.callee) && !N.call((v) => a(v, x), "callee")) + return c(N, x, I); + let d = [D ? "new " : "", T ? "import" : I("callee"), m, o ? `/*:: ${P.callee.trailingComments[0].value.slice(2).trim()} */` : "", _(N, x, I), f(N, x, I)]; + return T || i(P.callee) ? s(d) : d; + } + function E(N, x) { + if (N.callee.type !== "Identifier") + return false; + if (N.callee.name === "require") + return true; + if (N.callee.name === "define") { + let I = n(N); + return x.type === "ExpressionStatement" && (I.length === 1 || I.length === 2 && I[0].type === "ArrayExpression" || I.length === 3 && p2(I[0]) && I[1].type === "ArrayExpression"); + } + return false; + } + r.exports = { printCallExpression: w }; + } }), tr = te({ "src/language-js/print/assignment.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, getStringWidth: s } = Ue(), { builders: { line: a, group: n, indent: u, indentIfBreak: i, lineSuffixBoundary: l }, utils: { cleanDoc: p2, willBreak: y, canBreak: h } } = qe(), { hasLeadingOwnLineComment: g, isBinaryish: c, isStringLiteral: f, isLiteral: F, isNumericLiteral: _, isCallExpression: w, isMemberExpression: E, getCallArguments: N, rawText: x, hasComment: I, isSignedNumericLiteral: P, isObjectProperty: $ } = Ke(), { shouldInlineLogicalExpression: D } = ru(), { printCallExpression: T } = xo(); + function m(W, K, de, ue, Fe, z) { + let U = d(W, K, de, ue, z), Z = de(z, { assignmentLayout: U }); + switch (U) { + case "break-after-operator": + return n([n(ue), Fe, n(u([a, Z]))]); + case "never-break-after-operator": + return n([n(ue), Fe, " ", Z]); + case "fluid": { + let se = Symbol("assignment"); + return n([n(ue), Fe, n(u(a), { id: se }), l, i(Z, { groupId: se })]); + } + case "break-lhs": + return n([ue, Fe, " ", n(Z)]); + case "chain": + return [n(ue), Fe, a, Z]; + case "chain-tail": + return [n(ue), Fe, u([a, Z])]; + case "chain-tail-arrow-chain": + return [n(ue), Fe, Z]; + case "only-left": + return ue; + } + } + function C(W, K, de) { + let ue = W.getValue(); + return m(W, K, de, de("left"), [" ", ue.operator], "right"); + } + function o(W, K, de) { + return m(W, K, de, de("id"), " =", "init"); + } + function d(W, K, de, ue, Fe) { + let z = W.getValue(), U = z[Fe]; + if (!U) + return "only-left"; + let Z = !b(U); + if (W.match(b, B, (he) => !Z || he.type !== "ExpressionStatement" && he.type !== "VariableDeclaration")) + return Z ? U.type === "ArrowFunctionExpression" && U.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain"; + if (!Z && b(U.right) || g(K.originalText, U)) + return "break-after-operator"; + if (U.type === "CallExpression" && U.callee.name === "require" || K.parser === "json5" || K.parser === "json") + return "never-break-after-operator"; + if (S(z) || k(z) || q(z) || J(z) && h(ue)) + return "break-lhs"; + let ge = ie(z, ue, K); + return W.call(() => v(W, K, de, ge), Fe) ? "break-after-operator" : ge || U.type === "TemplateLiteral" || U.type === "TaggedTemplateExpression" || U.type === "BooleanLiteral" || _(U) || U.type === "ClassExpression" ? "never-break-after-operator" : "fluid"; + } + function v(W, K, de, ue) { + let Fe = W.getValue(); + if (c(Fe) && !D(Fe)) + return true; + switch (Fe.type) { + case "StringLiteralTypeAnnotation": + case "SequenceExpression": + return true; + case "ConditionalExpression": { + let { test: Z } = Fe; + return c(Z) && !D(Z); + } + case "ClassExpression": + return t2(Fe.decorators); + } + if (ue) + return false; + let z = Fe, U = []; + for (; ; ) + if (z.type === "UnaryExpression") + z = z.argument, U.push("argument"); + else if (z.type === "TSNonNullExpression") + z = z.expression, U.push("expression"); + else + break; + return !!(f(z) || W.call(() => V(W, K, de), ...U)); + } + function S(W) { + if (B(W)) { + let K = W.left || W.id; + return K.type === "ObjectPattern" && K.properties.length > 2 && K.properties.some((de) => $(de) && (!de.shorthand || de.value && de.value.type === "AssignmentPattern")); + } + return false; + } + function b(W) { + return W.type === "AssignmentExpression"; + } + function B(W) { + return b(W) || W.type === "VariableDeclarator"; + } + function k(W) { + let K = M(W); + if (t2(K)) { + let de = W.type === "TSTypeAliasDeclaration" ? "constraint" : "bound"; + if (K.length > 1 && K.some((ue) => ue[de] || ue.default)) + return true; + } + return false; + } + function M(W) { + return R(W) && W.typeParameters && W.typeParameters.params ? W.typeParameters.params : null; + } + function R(W) { + return W.type === "TSTypeAliasDeclaration" || W.type === "TypeAlias"; + } + function q(W) { + if (W.type !== "VariableDeclarator") + return false; + let { typeAnnotation: K } = W.id; + if (!K || !K.typeAnnotation) + return false; + let de = L(K.typeAnnotation); + return t2(de) && de.length > 1 && de.some((ue) => t2(L(ue)) || ue.type === "TSConditionalType"); + } + function J(W) { + return W.type === "VariableDeclarator" && W.init && W.init.type === "ArrowFunctionExpression"; + } + function L(W) { + return Q(W) && W.typeParameters && W.typeParameters.params ? W.typeParameters.params : null; + } + function Q(W) { + return W.type === "TSTypeReference" || W.type === "GenericTypeAnnotation"; + } + function V(W, K, de) { + let ue = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, Fe = W.getValue(), z = () => V(W, K, de, true); + if (Fe.type === "TSNonNullExpression") + return W.call(z, "expression"); + if (w(Fe)) { + if (T(W, K, de).label === "member-chain") + return false; + let Z = N(Fe); + return !(Z.length === 0 || Z.length === 1 && Y(Z[0], K)) || ee(Fe, de) ? false : W.call(z, "callee"); + } + return E(Fe) ? W.call(z, "object") : ue && (Fe.type === "Identifier" || Fe.type === "ThisExpression"); + } + var j = 0.25; + function Y(W, K) { + let { printWidth: de } = K; + if (I(W)) + return false; + let ue = de * j; + if (W.type === "ThisExpression" || W.type === "Identifier" && W.name.length <= ue || P(W) && !I(W.argument)) + return true; + let Fe = W.type === "Literal" && "regex" in W && W.regex.pattern || W.type === "RegExpLiteral" && W.pattern; + return Fe ? Fe.length <= ue : f(W) ? x(W).length <= ue : W.type === "TemplateLiteral" ? W.expressions.length === 0 && W.quasis[0].value.raw.length <= ue && !W.quasis[0].value.raw.includes(` +`) : F(W); + } + function ie(W, K, de) { + if (!$(W)) + return false; + K = p2(K); + let ue = 3; + return typeof K == "string" && s(K) < de.tabWidth + ue; + } + function ee(W, K) { + let de = ce(W); + if (t2(de)) { + if (de.length > 1) + return true; + if (de.length === 1) { + let Fe = de[0]; + if (Fe.type === "TSUnionType" || Fe.type === "UnionTypeAnnotation" || Fe.type === "TSIntersectionType" || Fe.type === "IntersectionTypeAnnotation" || Fe.type === "TSTypeLiteral" || Fe.type === "ObjectTypeAnnotation") + return true; + } + let ue = W.typeParameters ? "typeParameters" : "typeArguments"; + if (y(K(ue))) + return true; + } + return false; + } + function ce(W) { + return W.typeParameters && W.typeParameters.params || W.typeArguments && W.typeArguments.params; + } + r.exports = { printVariableDeclarator: o, printAssignmentExpression: C, printAssignment: m, isArrowFunctionVariableDeclarator: J }; + } }), Lr = te({ "src/language-js/print/function-parameters.js"(e, r) { + "use strict"; + ne(); + var { getNextNonSpaceNonCommentCharacter: t2 } = Ue(), { printDanglingComments: s } = et(), { builders: { line: a, hardline: n, softline: u, group: i, indent: l, ifBreak: p2 }, utils: { removeLines: y, willBreak: h } } = qe(), { getFunctionParameters: g, iterateFunctionParametersPath: c, isSimpleType: f, isTestCall: F, isTypeAnnotationAFunction: _, isObjectType: w, isObjectTypePropertyAFunction: E, hasRestParameter: N, shouldPrintComma: x, hasComment: I, isNextLineEmpty: P } = Ke(), { locEnd: $ } = ut(), { ArgExpansionBailout: D } = Qt(), { printFunctionTypeParameters: T } = ct(); + function m(v, S, b, B, k) { + let M = v.getValue(), R = g(M), q = k ? T(v, b, S) : ""; + if (R.length === 0) + return [q, "(", s(v, b, true, (ie) => t2(b.originalText, ie, $) === ")"), ")"]; + let J = v.getParentNode(), L = F(J), Q = C(M), V = []; + if (c(v, (ie, ee) => { + let ce = ee === R.length - 1; + ce && M.rest && V.push("..."), V.push(S()), !ce && (V.push(","), L || Q ? V.push(" ") : P(R[ee], b) ? V.push(n, n) : V.push(a)); + }), B) { + if (h(q) || h(V)) + throw new D(); + return i([y(q), "(", y(V), ")"]); + } + let j = R.every((ie) => !ie.decorators); + return Q && j ? [q, "(", ...V, ")"] : L ? [q, "(", ...V, ")"] : (E(J) || _(J) || J.type === "TypeAlias" || J.type === "UnionTypeAnnotation" || J.type === "TSUnionType" || J.type === "IntersectionTypeAnnotation" || J.type === "FunctionTypeAnnotation" && J.returnType === M) && R.length === 1 && R[0].name === null && M.this !== R[0] && R[0].typeAnnotation && M.typeParameters === null && f(R[0].typeAnnotation) && !M.rest ? b.arrowParens === "always" ? ["(", ...V, ")"] : V : [q, "(", l([u, ...V]), p2(!N(M) && x(b, "all") ? "," : ""), u, ")"]; + } + function C(v) { + if (!v) + return false; + let S = g(v); + if (S.length !== 1) + return false; + let [b] = S; + return !I(b) && (b.type === "ObjectPattern" || b.type === "ArrayPattern" || b.type === "Identifier" && b.typeAnnotation && (b.typeAnnotation.type === "TypeAnnotation" || b.typeAnnotation.type === "TSTypeAnnotation") && w(b.typeAnnotation.typeAnnotation) || b.type === "FunctionTypeParam" && w(b.typeAnnotation) || b.type === "AssignmentPattern" && (b.left.type === "ObjectPattern" || b.left.type === "ArrayPattern") && (b.right.type === "Identifier" || b.right.type === "ObjectExpression" && b.right.properties.length === 0 || b.right.type === "ArrayExpression" && b.right.elements.length === 0)); + } + function o(v) { + let S; + return v.returnType ? (S = v.returnType, S.typeAnnotation && (S = S.typeAnnotation)) : v.typeAnnotation && (S = v.typeAnnotation), S; + } + function d(v, S) { + let b = o(v); + if (!b) + return false; + let B = v.typeParameters && v.typeParameters.params; + if (B) { + if (B.length > 1) + return false; + if (B.length === 1) { + let k = B[0]; + if (k.constraint || k.default) + return false; + } + } + return g(v).length === 1 && (w(b) || h(S)); + } + r.exports = { printFunctionParameters: m, shouldHugFunctionParameters: C, shouldGroupFunctionParameters: d }; + } }), Or = te({ "src/language-js/print/type-annotation.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2, printDanglingComments: s } = et(), { isNonEmptyArray: a } = Ue(), { builders: { group: n, join: u, line: i, softline: l, indent: p2, align: y, ifBreak: h } } = qe(), g = qt(), { locStart: c } = ut(), { isSimpleType: f, isObjectType: F, hasLeadingOwnLineComment: _, isObjectTypePropertyAFunction: w, shouldPrintComma: E } = Ke(), { printAssignment: N } = tr(), { printFunctionParameters: x, shouldGroupFunctionParameters: I } = Lr(), { printArrayItems: P } = er(); + function $(b) { + if (f(b) || F(b)) + return true; + if (b.type === "UnionTypeAnnotation" || b.type === "TSUnionType") { + let B = b.types.filter((M) => M.type === "VoidTypeAnnotation" || M.type === "TSVoidKeyword" || M.type === "NullLiteralTypeAnnotation" || M.type === "TSNullKeyword").length, k = b.types.some((M) => M.type === "ObjectTypeAnnotation" || M.type === "TSTypeLiteral" || M.type === "GenericTypeAnnotation" || M.type === "TSTypeReference"); + if (b.types.length - 1 === B && k) + return true; + } + return false; + } + function D(b, B, k) { + let M = B.semi ? ";" : "", R = b.getValue(), q = []; + return q.push("opaque type ", k("id"), k("typeParameters")), R.supertype && q.push(": ", k("supertype")), R.impltype && q.push(" = ", k("impltype")), q.push(M), q; + } + function T(b, B, k) { + let M = B.semi ? ";" : "", R = b.getValue(), q = []; + R.declare && q.push("declare "), q.push("type ", k("id"), k("typeParameters")); + let J = R.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right"; + return [N(b, B, k, q, " =", J), M]; + } + function m(b, B, k) { + let M = b.getValue(), R = b.map(k, "types"), q = [], J = false; + for (let L = 0; L < R.length; ++L) + L === 0 ? q.push(R[L]) : F(M.types[L - 1]) && F(M.types[L]) ? q.push([" & ", J ? p2(R[L]) : R[L]]) : !F(M.types[L - 1]) && !F(M.types[L]) ? q.push(p2([" &", i, R[L]])) : (L > 1 && (J = true), q.push(" & ", L > 1 ? p2(R[L]) : R[L])); + return n(q); + } + function C(b, B, k) { + let M = b.getValue(), R = b.getParentNode(), q = R.type !== "TypeParameterInstantiation" && R.type !== "TSTypeParameterInstantiation" && R.type !== "GenericTypeAnnotation" && R.type !== "TSTypeReference" && R.type !== "TSTypeAssertion" && R.type !== "TupleTypeAnnotation" && R.type !== "TSTupleType" && !(R.type === "FunctionTypeParam" && !R.name && b.getParentNode(1).this !== R) && !((R.type === "TypeAlias" || R.type === "VariableDeclarator" || R.type === "TSTypeAliasDeclaration") && _(B.originalText, M)), J = $(M), L = b.map((j) => { + let Y = k(); + return J || (Y = y(2, Y)), t2(j, Y, B); + }, "types"); + if (J) + return u(" | ", L); + let Q = q && !_(B.originalText, M), V = [h([Q ? i : "", "| "]), u([i, "| "], L)]; + return g(b, B) ? n([p2(V), l]) : R.type === "TupleTypeAnnotation" && R.types.length > 1 || R.type === "TSTupleType" && R.elementTypes.length > 1 ? n([p2([h(["(", l]), V]), l, h(")")]) : n(q ? p2(V) : V); + } + function o(b, B, k) { + let M = b.getValue(), R = [], q = b.getParentNode(0), J = b.getParentNode(1), L = b.getParentNode(2), Q = M.type === "TSFunctionType" || !((q.type === "ObjectTypeProperty" || q.type === "ObjectTypeInternalSlot") && !q.variance && !q.optional && c(q) === c(M) || q.type === "ObjectTypeCallProperty" || L && L.type === "DeclareFunction"), V = Q && (q.type === "TypeAnnotation" || q.type === "TSTypeAnnotation"), j = V && Q && (q.type === "TypeAnnotation" || q.type === "TSTypeAnnotation") && J.type === "ArrowFunctionExpression"; + w(q) && (Q = true, V = true), j && R.push("("); + let Y = x(b, k, B, false, true), ie = M.returnType || M.predicate || M.typeAnnotation ? [Q ? " => " : ": ", k("returnType"), k("predicate"), k("typeAnnotation")] : "", ee = I(M, ie); + return R.push(ee ? n(Y) : Y), ie && R.push(ie), j && R.push(")"), n(R); + } + function d(b, B, k) { + let M = b.getValue(), R = M.type === "TSTupleType" ? "elementTypes" : "types", q = M[R], J = a(q), L = J ? l : ""; + return n(["[", p2([L, P(b, B, R, k)]), h(J && E(B, "all") ? "," : ""), s(b, B, true), L, "]"]); + } + function v(b, B, k) { + let M = b.getValue(), R = M.type === "OptionalIndexedAccessType" && M.optional ? "?.[" : "["; + return [k("objectType"), R, k("indexType"), "]"]; + } + function S(b, B, k) { + let M = b.getValue(); + return [M.postfix ? "" : k, B("typeAnnotation"), M.postfix ? k : ""]; + } + r.exports = { printOpaqueType: D, printTypeAlias: T, printIntersectionType: m, printUnionType: C, printFunctionType: o, printTupleType: d, printIndexedAccessType: v, shouldHugType: $, printJSDocType: S }; + } }), jr = te({ "src/language-js/print/type-parameters.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { join: s, line: a, hardline: n, softline: u, group: i, indent: l, ifBreak: p2 } } = qe(), { isTestCall: y, hasComment: h, CommentCheckFlags: g, isTSXFile: c, shouldPrintComma: f, getFunctionParameters: F, isObjectType: _, getTypeScriptMappedTypeModifier: w } = Ke(), { createGroupIdMapper: E } = Ue(), { shouldHugType: N } = Or(), { isArrowFunctionVariableDeclarator: x } = tr(), I = E("typeParameters"); + function P(T, m, C, o) { + let d = T.getValue(); + if (!d[o]) + return ""; + if (!Array.isArray(d[o])) + return C(o); + let v = T.getNode(2), S = v && y(v), b = T.match((M) => !(M[o].length === 1 && _(M[o][0])), void 0, (M, R) => R === "typeAnnotation", (M) => M.type === "Identifier", x); + if (d[o].length === 0 || !b && (S || d[o].length === 1 && (d[o][0].type === "NullableTypeAnnotation" || N(d[o][0])))) + return ["<", s(", ", T.map(C, o)), $(T, m), ">"]; + let k = d.type === "TSTypeParameterInstantiation" ? "" : F(d).length === 1 && c(m) && !d[o][0].constraint && T.getParentNode().type === "ArrowFunctionExpression" ? "," : f(m, "all") ? p2(",") : ""; + return i(["<", l([u, s([",", a], T.map(C, o))]), k, u, ">"], { id: I(d) }); + } + function $(T, m) { + let C = T.getValue(); + if (!h(C, g.Dangling)) + return ""; + let o = !h(C, g.Line), d = t2(T, m, o); + return o ? d : [d, n]; + } + function D(T, m, C) { + let o = T.getValue(), d = [o.type === "TSTypeParameter" && o.const ? "const " : ""], v = T.getParentNode(); + return v.type === "TSMappedType" ? (v.readonly && d.push(w(v.readonly, "readonly"), " "), d.push("[", C("name")), o.constraint && d.push(" in ", C("constraint")), v.nameType && d.push(" as ", T.callParent(() => C("nameType"))), d.push("]"), d) : (o.variance && d.push(C("variance")), o.in && d.push("in "), o.out && d.push("out "), d.push(C("name")), o.bound && d.push(": ", C("bound")), o.constraint && d.push(" extends ", C("constraint")), o.default && d.push(" = ", C("default")), d); + } + r.exports = { printTypeParameter: D, printTypeParameters: P, getTypeParametersGroupId: I }; + } }), rr = te({ "src/language-js/print/property.js"(e, r) { + "use strict"; + ne(); + var { printComments: t2 } = et(), { printString: s, printNumber: a } = Ue(), { isNumericLiteral: n, isSimpleNumber: u, isStringLiteral: i, isStringPropSafeToUnquote: l, rawText: p2 } = Ke(), { printAssignment: y } = tr(), h = /* @__PURE__ */ new WeakMap(); + function g(f, F, _) { + let w = f.getNode(); + if (w.computed) + return ["[", _("key"), "]"]; + let E = f.getParentNode(), { key: N } = w; + if (F.quoteProps === "consistent" && !h.has(E)) { + let x = (E.properties || E.body || E.members).some((I) => !I.computed && I.key && i(I.key) && !l(I, F)); + h.set(E, x); + } + if ((N.type === "Identifier" || n(N) && u(a(p2(N))) && String(N.value) === a(p2(N)) && !(F.parser === "typescript" || F.parser === "babel-ts")) && (F.parser === "json" || F.quoteProps === "consistent" && h.get(E))) { + let x = s(JSON.stringify(N.type === "Identifier" ? N.name : N.value.toString()), F); + return f.call((I) => t2(I, x, F), "key"); + } + return l(w, F) && (F.quoteProps === "as-needed" || F.quoteProps === "consistent" && !h.get(E)) ? f.call((x) => t2(x, /^\d/.test(N.value) ? a(N.value) : N.value, F), "key") : _("key"); + } + function c(f, F, _) { + return f.getValue().shorthand ? _("value") : y(f, F, _, g(f, F, _), ":", "value"); + } + r.exports = { printProperty: c, printPropertyKey: g }; + } }), qr = te({ "src/language-js/print/function.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { printDanglingComments: s, printCommentsSeparately: a } = et(), n = lt(), { getNextNonSpaceNonCommentCharacterIndex: u } = Ue(), { builders: { line: i, softline: l, group: p2, indent: y, ifBreak: h, hardline: g, join: c, indentIfBreak: f }, utils: { removeLines: F, willBreak: _ } } = qe(), { ArgExpansionBailout: w } = Qt(), { getFunctionParameters: E, hasLeadingOwnLineComment: N, isFlowAnnotationComment: x, isJsxNode: I, isTemplateOnItsOwnLine: P, shouldPrintComma: $, startsWithNoLookaheadToken: D, isBinaryish: T, isLineComment: m, hasComment: C, getComments: o, CommentCheckFlags: d, isCallLikeExpression: v, isCallExpression: S, getCallArguments: b, hasNakedLeftSide: B, getLeftSide: k } = Ke(), { locEnd: M } = ut(), { printFunctionParameters: R, shouldGroupFunctionParameters: q } = Lr(), { printPropertyKey: J } = rr(), { printFunctionTypeParameters: L } = ct(); + function Q(U, Z, se, fe) { + let ge = U.getValue(), he = false; + if ((ge.type === "FunctionDeclaration" || ge.type === "FunctionExpression") && fe && fe.expandLastArg) { + let Pe = U.getParentNode(); + S(Pe) && b(Pe).length > 1 && (he = true); + } + let we = []; + ge.type === "TSDeclareFunction" && ge.declare && we.push("declare "), ge.async && we.push("async "), ge.generator ? we.push("function* ") : we.push("function "), ge.id && we.push(Z("id")); + let ke = R(U, Z, se, he), Re = K(U, Z, se), Ne = q(ge, Re); + return we.push(L(U, se, Z), p2([Ne ? p2(ke) : ke, Re]), ge.body ? " " : "", Z("body")), se.semi && (ge.declare || !ge.body) && we.push(";"), we; + } + function V(U, Z, se) { + let fe = U.getNode(), { kind: ge } = fe, he = fe.value || fe, we = []; + return !ge || ge === "init" || ge === "method" || ge === "constructor" ? he.async && we.push("async ") : (t2.ok(ge === "get" || ge === "set"), we.push(ge, " ")), he.generator && we.push("*"), we.push(J(U, Z, se), fe.optional || fe.key.optional ? "?" : ""), fe === he ? we.push(j(U, Z, se)) : he.type === "FunctionExpression" ? we.push(U.call((ke) => j(ke, Z, se), "value")) : we.push(se("value")), we; + } + function j(U, Z, se) { + let fe = U.getNode(), ge = R(U, se, Z), he = K(U, se, Z), we = q(fe, he), ke = [L(U, Z, se), p2([we ? p2(ge) : ge, he])]; + return fe.body ? ke.push(" ", se("body")) : ke.push(Z.semi ? ";" : ""), ke; + } + function Y(U, Z, se, fe) { + let ge = U.getValue(), he = []; + if (ge.async && he.push("async "), W(U, Z)) + he.push(se(["params", 0])); + else { + let ke = fe && (fe.expandLastArg || fe.expandFirstArg), Re = K(U, se, Z); + if (ke) { + if (_(Re)) + throw new w(); + Re = p2(F(Re)); + } + he.push(p2([R(U, se, Z, ke, true), Re])); + } + let we = s(U, Z, true, (ke) => { + let Re = u(Z.originalText, ke, M); + return Re !== false && Z.originalText.slice(Re, Re + 2) === "=>"; + }); + return we && he.push(" ", we), he; + } + function ie(U, Z, se, fe, ge, he) { + let we = U.getName(), ke = U.getParentNode(), Re = v(ke) && we === "callee", Ne = Boolean(Z && Z.assignmentLayout), Pe = he.body.type !== "BlockStatement" && he.body.type !== "ObjectExpression" && he.body.type !== "SequenceExpression", oe = Re && Pe || Z && Z.assignmentLayout === "chain-tail-arrow-chain", H = Symbol("arrow-chain"); + return he.body.type === "SequenceExpression" && (ge = p2(["(", y([l, ge]), l, ")"])), p2([p2(y([Re || Ne ? l : "", p2(c([" =>", i], se), { shouldBreak: fe })]), { id: H, shouldBreak: oe }), " =>", f(Pe ? y([i, ge]) : [" ", ge], { groupId: H }), Re ? h(l, "", { groupId: H }) : ""]); + } + function ee(U, Z, se, fe) { + let ge = U.getValue(), he = [], we = [], ke = false; + if (function H() { + let pe = Y(U, Z, se, fe); + if (he.length === 0) + he.push(pe); + else { + let { leading: X, trailing: le } = a(U, Z); + he.push([X, pe]), we.unshift(le); + } + ke = ke || ge.returnType && E(ge).length > 0 || ge.typeParameters || E(ge).some((X) => X.type !== "Identifier"), ge.body.type !== "ArrowFunctionExpression" || fe && fe.expandLastArg ? we.unshift(se("body", fe)) : (ge = ge.body, U.call(H, "body")); + }(), he.length > 1) + return ie(U, fe, he, ke, we, ge); + let Re = he; + if (Re.push(" =>"), !N(Z.originalText, ge.body) && (ge.body.type === "ArrayExpression" || ge.body.type === "ObjectExpression" || ge.body.type === "BlockStatement" || I(ge.body) || P(ge.body, Z.originalText) || ge.body.type === "ArrowFunctionExpression" || ge.body.type === "DoExpression")) + return p2([...Re, " ", we]); + if (ge.body.type === "SequenceExpression") + return p2([...Re, p2([" (", y([l, we]), l, ")"])]); + let Ne = (fe && fe.expandLastArg || U.getParentNode().type === "JSXExpressionContainer") && !C(ge), Pe = fe && fe.expandLastArg && $(Z, "all"), oe = ge.body.type === "ConditionalExpression" && !D(ge.body, (H) => H.type === "ObjectExpression"); + return p2([...Re, p2([y([i, oe ? h("", "(") : "", we, oe ? h("", ")") : ""]), Ne ? [h(Pe ? "," : ""), l] : ""])]); + } + function ce(U) { + let Z = E(U); + return Z.length === 1 && !U.typeParameters && !C(U, d.Dangling) && Z[0].type === "Identifier" && !Z[0].typeAnnotation && !C(Z[0]) && !Z[0].optional && !U.predicate && !U.returnType; + } + function W(U, Z) { + if (Z.arrowParens === "always") + return false; + if (Z.arrowParens === "avoid") { + let se = U.getValue(); + return ce(se); + } + return false; + } + function K(U, Z, se) { + let fe = U.getValue(), ge = Z("returnType"); + if (fe.returnType && x(se.originalText, fe.returnType)) + return [" /*: ", ge, " */"]; + let he = [ge]; + return fe.returnType && fe.returnType.typeAnnotation && he.unshift(": "), fe.predicate && he.push(fe.returnType ? " " : ": ", Z("predicate")), he; + } + function de(U, Z, se) { + let fe = U.getValue(), ge = Z.semi ? ";" : "", he = []; + fe.argument && (z(Z, fe.argument) ? he.push([" (", y([g, se("argument")]), g, ")"]) : T(fe.argument) || fe.argument.type === "SequenceExpression" ? he.push(p2([h(" (", " "), y([l, se("argument")]), l, h(")")])) : he.push(" ", se("argument"))); + let we = o(fe), ke = n(we), Re = ke && m(ke); + return Re && he.push(ge), C(fe, d.Dangling) && he.push(" ", s(U, Z, true)), Re || he.push(ge), he; + } + function ue(U, Z, se) { + return ["return", de(U, Z, se)]; + } + function Fe(U, Z, se) { + return ["throw", de(U, Z, se)]; + } + function z(U, Z) { + if (N(U.originalText, Z)) + return true; + if (B(Z)) { + let se = Z, fe; + for (; fe = k(se); ) + if (se = fe, N(U.originalText, se)) + return true; + } + return false; + } + r.exports = { printFunction: Q, printArrowFunction: ee, printMethod: V, printReturnStatement: ue, printThrowStatement: Fe, printMethodInternal: j, shouldPrintParamsWithoutParens: W }; + } }), nu = te({ "src/language-js/print/decorators.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, hasNewline: s } = Ue(), { builders: { line: a, hardline: n, join: u, breakParent: i, group: l } } = qe(), { locStart: p2, locEnd: y } = ut(), { getParentExportDeclaration: h } = Ke(); + function g(w, E, N) { + let x = w.getValue(); + return l([u(a, w.map(N, "decorators")), F(x, E) ? n : a]); + } + function c(w, E, N) { + return [u(n, w.map(N, "declaration", "decorators")), n]; + } + function f(w, E, N) { + let x = w.getValue(), { decorators: I } = x; + if (!t2(I) || _(w.getParentNode())) + return; + let P = x.type === "ClassExpression" || x.type === "ClassDeclaration" || F(x, E); + return [h(w) ? n : P ? i : "", u(a, w.map(N, "decorators")), a]; + } + function F(w, E) { + return w.decorators.some((N) => s(E.originalText, y(N))); + } + function _(w) { + if (w.type !== "ExportDefaultDeclaration" && w.type !== "ExportNamedDeclaration" && w.type !== "DeclareExportDeclaration") + return false; + let E = w.declaration && w.declaration.decorators; + return t2(E) && p2(w) === p2(E[0]); + } + r.exports = { printDecorators: f, printClassMemberDecorators: g, printDecoratorsBeforeExport: c, hasDecoratorsBeforeExport: _ }; + } }), nr = te({ "src/language-js/print/class.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2, createGroupIdMapper: s } = Ue(), { printComments: a, printDanglingComments: n } = et(), { builders: { join: u, line: i, hardline: l, softline: p2, group: y, indent: h, ifBreak: g } } = qe(), { hasComment: c, CommentCheckFlags: f } = Ke(), { getTypeParametersGroupId: F } = jr(), { printMethod: _ } = qr(), { printOptionalToken: w, printTypeAnnotation: E, printDefiniteToken: N } = ct(), { printPropertyKey: x } = rr(), { printAssignment: I } = tr(), { printClassMemberDecorators: P } = nu(); + function $(b, B, k) { + let M = b.getValue(), R = []; + M.declare && R.push("declare "), M.abstract && R.push("abstract "), R.push("class"); + let q = M.id && c(M.id, f.Trailing) || M.typeParameters && c(M.typeParameters, f.Trailing) || M.superClass && c(M.superClass) || t2(M.extends) || t2(M.mixins) || t2(M.implements), J = [], L = []; + if (M.id && J.push(" ", k("id")), J.push(k("typeParameters")), M.superClass) { + let Q = [d(b, B, k), k("superTypeParameters")], V = b.call((j) => ["extends ", a(j, Q, B)], "superClass"); + q ? L.push(i, y(V)) : L.push(" ", V); + } else + L.push(o(b, B, k, "extends")); + if (L.push(o(b, B, k, "mixins"), o(b, B, k, "implements")), q) { + let Q; + C(M) ? Q = [...J, h(L)] : Q = h([...J, L]), R.push(y(Q, { id: D(M) })); + } else + R.push(...J, ...L); + return R.push(" ", k("body")), R; + } + var D = s("heritageGroup"); + function T(b) { + return g(l, "", { groupId: D(b) }); + } + function m(b) { + return ["superClass", "extends", "mixins", "implements"].filter((B) => Boolean(b[B])).length > 1; + } + function C(b) { + return b.typeParameters && !c(b.typeParameters, f.Trailing | f.Line) && !m(b); + } + function o(b, B, k, M) { + let R = b.getValue(); + if (!t2(R[M])) + return ""; + let q = n(b, B, true, (J) => { + let { marker: L } = J; + return L === M; + }); + return [C(R) ? g(" ", i, { groupId: F(R.typeParameters) }) : i, q, q && l, M, y(h([i, u([",", i], b.map(k, M))]))]; + } + function d(b, B, k) { + let M = k("superClass"); + return b.getParentNode().type === "AssignmentExpression" ? y(g(["(", h([p2, M]), p2, ")"], M)) : M; + } + function v(b, B, k) { + let M = b.getValue(), R = []; + return t2(M.decorators) && R.push(P(b, B, k)), M.accessibility && R.push(M.accessibility + " "), M.readonly && R.push("readonly "), M.declare && R.push("declare "), M.static && R.push("static "), (M.type === "TSAbstractMethodDefinition" || M.abstract) && R.push("abstract "), M.override && R.push("override "), R.push(_(b, B, k)), R; + } + function S(b, B, k) { + let M = b.getValue(), R = [], q = B.semi ? ";" : ""; + return t2(M.decorators) && R.push(P(b, B, k)), M.accessibility && R.push(M.accessibility + " "), M.declare && R.push("declare "), M.static && R.push("static "), (M.type === "TSAbstractPropertyDefinition" || M.type === "TSAbstractAccessorProperty" || M.abstract) && R.push("abstract "), M.override && R.push("override "), M.readonly && R.push("readonly "), M.variance && R.push(k("variance")), (M.type === "ClassAccessorProperty" || M.type === "AccessorProperty" || M.type === "TSAbstractAccessorProperty") && R.push("accessor "), R.push(x(b, B, k), w(b), N(b), E(b, B, k)), [I(b, B, k, R, " =", "value"), q]; + } + r.exports = { printClass: $, printClassMethod: v, printClassProperty: S, printHardlineAfterHeritage: T }; + } }), bo = te({ "src/language-js/print/interface.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { join: s, line: a, group: n, indent: u, ifBreak: i } } = qe(), { hasComment: l, identity: p2, CommentCheckFlags: y } = Ke(), { getTypeParametersGroupId: h } = jr(), { printTypeScriptModifiers: g } = ct(); + function c(f, F, _) { + let w = f.getValue(), E = []; + w.declare && E.push("declare "), w.type === "TSInterfaceDeclaration" && E.push(w.abstract ? "abstract " : "", g(f, F, _)), E.push("interface"); + let N = [], x = []; + w.type !== "InterfaceTypeAnnotation" && N.push(" ", _("id"), _("typeParameters")); + let I = w.typeParameters && !l(w.typeParameters, y.Trailing | y.Line); + return t2(w.extends) && x.push(I ? i(" ", a, { groupId: h(w.typeParameters) }) : a, "extends ", (w.extends.length === 1 ? p2 : u)(s([",", a], f.map(_, "extends")))), w.id && l(w.id, y.Trailing) || t2(w.extends) ? I ? E.push(n([...N, u(x)])) : E.push(n(u([...N, ...x]))) : E.push(...N, ...x), E.push(" ", _("body")), n(E); + } + r.exports = { printInterface: c }; + } }), To = te({ "src/language-js/print/module.js"(e, r) { + "use strict"; + ne(); + var { isNonEmptyArray: t2 } = Ue(), { builders: { softline: s, group: a, indent: n, join: u, line: i, ifBreak: l, hardline: p2 } } = qe(), { printDanglingComments: y } = et(), { hasComment: h, CommentCheckFlags: g, shouldPrintComma: c, needsHardlineAfterDanglingComment: f, isStringLiteral: F, rawText: _ } = Ke(), { locStart: w, hasSameLoc: E } = ut(), { hasDecoratorsBeforeExport: N, printDecoratorsBeforeExport: x } = nu(); + function I(S, b, B) { + let k = S.getValue(), M = b.semi ? ";" : "", R = [], { importKind: q } = k; + return R.push("import"), q && q !== "value" && R.push(" ", q), R.push(m(S, b, B), T(S, b, B), o(S, b, B), M), R; + } + function P(S, b, B) { + let k = S.getValue(), M = []; + N(k) && M.push(x(S, b, B)); + let { type: R, exportKind: q, declaration: J } = k; + return M.push("export"), (k.default || R === "ExportDefaultDeclaration") && M.push(" default"), h(k, g.Dangling) && (M.push(" ", y(S, b, true)), f(k) && M.push(p2)), J ? M.push(" ", B("declaration")) : M.push(q === "type" ? " type" : "", m(S, b, B), T(S, b, B), o(S, b, B)), D(k, b) && M.push(";"), M; + } + function $(S, b, B) { + let k = S.getValue(), M = b.semi ? ";" : "", R = [], { exportKind: q, exported: J } = k; + return R.push("export"), q === "type" && R.push(" type"), R.push(" *"), J && R.push(" as ", B("exported")), R.push(T(S, b, B), o(S, b, B), M), R; + } + function D(S, b) { + if (!b.semi) + return false; + let { type: B, declaration: k } = S, M = S.default || B === "ExportDefaultDeclaration"; + if (!k) + return true; + let { type: R } = k; + return !!(M && R !== "ClassDeclaration" && R !== "FunctionDeclaration" && R !== "TSInterfaceDeclaration" && R !== "DeclareClass" && R !== "DeclareFunction" && R !== "TSDeclareFunction" && R !== "EnumDeclaration"); + } + function T(S, b, B) { + let k = S.getValue(); + if (!k.source) + return ""; + let M = []; + return C(k, b) || M.push(" from"), M.push(" ", B("source")), M; + } + function m(S, b, B) { + let k = S.getValue(); + if (C(k, b)) + return ""; + let M = [" "]; + if (t2(k.specifiers)) { + let R = [], q = []; + S.each(() => { + let J = S.getValue().type; + if (J === "ExportNamespaceSpecifier" || J === "ExportDefaultSpecifier" || J === "ImportNamespaceSpecifier" || J === "ImportDefaultSpecifier") + R.push(B()); + else if (J === "ExportSpecifier" || J === "ImportSpecifier") + q.push(B()); + else + throw new Error(`Unknown specifier type ${JSON.stringify(J)}`); + }, "specifiers"), M.push(u(", ", R)), q.length > 0 && (R.length > 0 && M.push(", "), q.length > 1 || R.length > 0 || k.specifiers.some((L) => h(L)) ? M.push(a(["{", n([b.bracketSpacing ? i : s, u([",", i], q)]), l(c(b) ? "," : ""), b.bracketSpacing ? i : s, "}"])) : M.push(["{", b.bracketSpacing ? " " : "", ...q, b.bracketSpacing ? " " : "", "}"])); + } else + M.push("{}"); + return M; + } + function C(S, b) { + let { type: B, importKind: k, source: M, specifiers: R } = S; + return B !== "ImportDeclaration" || t2(R) || k === "type" ? false : !/{\s*}/.test(b.originalText.slice(w(S), w(M))); + } + function o(S, b, B) { + let k = S.getNode(); + return t2(k.assertions) ? [" assert {", b.bracketSpacing ? " " : "", u(", ", S.map(B, "assertions")), b.bracketSpacing ? " " : "", "}"] : ""; + } + function d(S, b, B) { + let k = S.getNode(), { type: M } = k, R = [], q = M === "ImportSpecifier" ? k.importKind : k.exportKind; + q && q !== "value" && R.push(q, " "); + let J = M.startsWith("Import"), L = J ? "imported" : "local", Q = J ? "local" : "exported", V = k[L], j = k[Q], Y = "", ie = ""; + return M === "ExportNamespaceSpecifier" || M === "ImportNamespaceSpecifier" ? Y = "*" : V && (Y = B(L)), j && !v(k) && (ie = B(Q)), R.push(Y, Y && ie ? " as " : "", ie), R; + } + function v(S) { + if (S.type !== "ImportSpecifier" && S.type !== "ExportSpecifier") + return false; + let { local: b, [S.type === "ImportSpecifier" ? "imported" : "exported"]: B } = S; + if (b.type !== B.type || !E(b, B)) + return false; + if (F(b)) + return b.value === B.value && _(b) === _(B); + switch (b.type) { + case "Identifier": + return b.name === B.name; + default: + return false; + } + } + r.exports = { printImportDeclaration: I, printExportDeclaration: P, printExportAllDeclaration: $, printModuleSpecifier: d }; + } }), uu = te({ "src/language-js/print/object.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { builders: { line: s, softline: a, group: n, indent: u, ifBreak: i, hardline: l } } = qe(), { getLast: p2, hasNewlineInRange: y, hasNewline: h, isNonEmptyArray: g } = Ue(), { shouldPrintComma: c, hasComment: f, getComments: F, CommentCheckFlags: _, isNextLineEmpty: w } = Ke(), { locStart: E, locEnd: N } = ut(), { printOptionalToken: x, printTypeAnnotation: I } = ct(), { shouldHugFunctionParameters: P } = Lr(), { shouldHugType: $ } = Or(), { printHardlineAfterHeritage: D } = nr(); + function T(m, C, o) { + let d = C.semi ? ";" : "", v = m.getValue(), S; + v.type === "TSTypeLiteral" ? S = "members" : v.type === "TSInterfaceBody" ? S = "body" : S = "properties"; + let b = v.type === "ObjectTypeAnnotation", B = [S]; + b && B.push("indexers", "callProperties", "internalSlots"); + let k = B.map((W) => v[W][0]).sort((W, K) => E(W) - E(K))[0], M = m.getParentNode(0), R = b && M && (M.type === "InterfaceDeclaration" || M.type === "DeclareInterface" || M.type === "DeclareClass") && m.getName() === "body", q = v.type === "TSInterfaceBody" || R || v.type === "ObjectPattern" && M.type !== "FunctionDeclaration" && M.type !== "FunctionExpression" && M.type !== "ArrowFunctionExpression" && M.type !== "ObjectMethod" && M.type !== "ClassMethod" && M.type !== "ClassPrivateMethod" && M.type !== "AssignmentPattern" && M.type !== "CatchClause" && v.properties.some((W) => W.value && (W.value.type === "ObjectPattern" || W.value.type === "ArrayPattern")) || v.type !== "ObjectPattern" && k && y(C.originalText, E(v), E(k)), J = R ? ";" : v.type === "TSInterfaceBody" || v.type === "TSTypeLiteral" ? i(d, ";") : ",", L = v.type === "RecordExpression" ? "#{" : v.exact ? "{|" : "{", Q = v.exact ? "|}" : "}", V = []; + for (let W of B) + m.each((K) => { + let de = K.getValue(); + V.push({ node: de, printed: o(), loc: E(de) }); + }, W); + B.length > 1 && V.sort((W, K) => W.loc - K.loc); + let j = [], Y = V.map((W) => { + let K = [...j, n(W.printed)]; + return j = [J, s], (W.node.type === "TSPropertySignature" || W.node.type === "TSMethodSignature" || W.node.type === "TSConstructSignatureDeclaration") && f(W.node, _.PrettierIgnore) && j.shift(), w(W.node, C) && j.push(l), K; + }); + if (v.inexact) { + let W; + if (f(v, _.Dangling)) { + let K = f(v, _.Line); + W = [t2(m, C, true), K || h(C.originalText, N(p2(F(v)))) ? l : s, "..."]; + } else + W = ["..."]; + Y.push([...j, ...W]); + } + let ie = p2(v[S]), ee = !(v.inexact || ie && ie.type === "RestElement" || ie && (ie.type === "TSPropertySignature" || ie.type === "TSCallSignatureDeclaration" || ie.type === "TSMethodSignature" || ie.type === "TSConstructSignatureDeclaration") && f(ie, _.PrettierIgnore)), ce; + if (Y.length === 0) { + if (!f(v, _.Dangling)) + return [L, Q, I(m, C, o)]; + ce = n([L, t2(m, C), a, Q, x(m), I(m, C, o)]); + } else + ce = [R && g(v.properties) ? D(M) : "", L, u([C.bracketSpacing ? s : a, ...Y]), i(ee && (J !== "," || c(C)) ? J : ""), C.bracketSpacing ? s : a, Q, x(m), I(m, C, o)]; + return m.match((W) => W.type === "ObjectPattern" && !W.decorators, (W, K, de) => P(W) && (K === "params" || K === "parameters" || K === "this" || K === "rest") && de === 0) || m.match($, (W, K) => K === "typeAnnotation", (W, K) => K === "typeAnnotation", (W, K, de) => P(W) && (K === "params" || K === "parameters" || K === "this" || K === "rest") && de === 0) || !q && m.match((W) => W.type === "ObjectPattern", (W) => W.type === "AssignmentExpression" || W.type === "VariableDeclarator") ? ce : n(ce, { shouldBreak: q }); + } + r.exports = { printObject: T }; + } }), dd = te({ "src/language-js/print/flow.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { printDanglingComments: s } = et(), { printString: a, printNumber: n } = Ue(), { builders: { hardline: u, softline: i, group: l, indent: p2 } } = qe(), { getParentExportDeclaration: y, isFunctionNotation: h, isGetterOrSetter: g, rawText: c, shouldPrintComma: f } = Ke(), { locStart: F, locEnd: _ } = ut(), { replaceTextEndOfLine: w } = Yt(), { printClass: E } = nr(), { printOpaqueType: N, printTypeAlias: x, printIntersectionType: I, printUnionType: P, printFunctionType: $, printTupleType: D, printIndexedAccessType: T } = Or(), { printInterface: m } = bo(), { printTypeParameter: C, printTypeParameters: o } = jr(), { printExportDeclaration: d, printExportAllDeclaration: v } = To(), { printArrayItems: S } = er(), { printObject: b } = uu(), { printPropertyKey: B } = rr(), { printOptionalToken: k, printTypeAnnotation: M, printRestSpread: R } = ct(); + function q(L, Q, V) { + let j = L.getValue(), Y = Q.semi ? ";" : "", ie = []; + switch (j.type) { + case "DeclareClass": + return J(L, E(L, Q, V)); + case "DeclareFunction": + return J(L, ["function ", V("id"), j.predicate ? " " : "", V("predicate"), Y]); + case "DeclareModule": + return J(L, ["module ", V("id"), " ", V("body")]); + case "DeclareModuleExports": + return J(L, ["module.exports", ": ", V("typeAnnotation"), Y]); + case "DeclareVariable": + return J(L, ["var ", V("id"), Y]); + case "DeclareOpaqueType": + return J(L, N(L, Q, V)); + case "DeclareInterface": + return J(L, m(L, Q, V)); + case "DeclareTypeAlias": + return J(L, x(L, Q, V)); + case "DeclareExportDeclaration": + return J(L, d(L, Q, V)); + case "DeclareExportAllDeclaration": + return J(L, v(L, Q, V)); + case "OpaqueType": + return N(L, Q, V); + case "TypeAlias": + return x(L, Q, V); + case "IntersectionTypeAnnotation": + return I(L, Q, V); + case "UnionTypeAnnotation": + return P(L, Q, V); + case "FunctionTypeAnnotation": + return $(L, Q, V); + case "TupleTypeAnnotation": + return D(L, Q, V); + case "GenericTypeAnnotation": + return [V("id"), o(L, Q, V, "typeParameters")]; + case "IndexedAccessType": + case "OptionalIndexedAccessType": + return T(L, Q, V); + case "TypeAnnotation": + return V("typeAnnotation"); + case "TypeParameter": + return C(L, Q, V); + case "TypeofTypeAnnotation": + return ["typeof ", V("argument")]; + case "ExistsTypeAnnotation": + return "*"; + case "EmptyTypeAnnotation": + return "empty"; + case "MixedTypeAnnotation": + return "mixed"; + case "ArrayTypeAnnotation": + return [V("elementType"), "[]"]; + case "BooleanLiteralTypeAnnotation": + return String(j.value); + case "EnumDeclaration": + return ["enum ", V("id"), " ", V("body")]; + case "EnumBooleanBody": + case "EnumNumberBody": + case "EnumStringBody": + case "EnumSymbolBody": { + if (j.type === "EnumSymbolBody" || j.explicitType) { + let ee = null; + switch (j.type) { + case "EnumBooleanBody": + ee = "boolean"; + break; + case "EnumNumberBody": + ee = "number"; + break; + case "EnumStringBody": + ee = "string"; + break; + case "EnumSymbolBody": + ee = "symbol"; + break; + } + ie.push("of ", ee, " "); + } + if (j.members.length === 0 && !j.hasUnknownMembers) + ie.push(l(["{", s(L, Q), i, "}"])); + else { + let ee = j.members.length > 0 ? [u, S(L, Q, "members", V), j.hasUnknownMembers || f(Q) ? "," : ""] : []; + ie.push(l(["{", p2([...ee, ...j.hasUnknownMembers ? [u, "..."] : []]), s(L, Q, true), u, "}"])); + } + return ie; + } + case "EnumBooleanMember": + case "EnumNumberMember": + case "EnumStringMember": + return [V("id"), " = ", typeof j.init == "object" ? V("init") : String(j.init)]; + case "EnumDefaultedMember": + return V("id"); + case "FunctionTypeParam": { + let ee = j.name ? V("name") : L.getParentNode().this === j ? "this" : ""; + return [ee, k(L), ee ? ": " : "", V("typeAnnotation")]; + } + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": + return m(L, Q, V); + case "ClassImplements": + case "InterfaceExtends": + return [V("id"), V("typeParameters")]; + case "NullableTypeAnnotation": + return ["?", V("typeAnnotation")]; + case "Variance": { + let { kind: ee } = j; + return t2.ok(ee === "plus" || ee === "minus"), ee === "plus" ? "+" : "-"; + } + case "ObjectTypeCallProperty": + return j.static && ie.push("static "), ie.push(V("value")), ie; + case "ObjectTypeIndexer": + return [j.static ? "static " : "", j.variance ? V("variance") : "", "[", V("id"), j.id ? ": " : "", V("key"), "]: ", V("value")]; + case "ObjectTypeProperty": { + let ee = ""; + return j.proto ? ee = "proto " : j.static && (ee = "static "), [ee, g(j) ? j.kind + " " : "", j.variance ? V("variance") : "", B(L, Q, V), k(L), h(j) ? "" : ": ", V("value")]; + } + case "ObjectTypeAnnotation": + return b(L, Q, V); + case "ObjectTypeInternalSlot": + return [j.static ? "static " : "", "[[", V("id"), "]]", k(L), j.method ? "" : ": ", V("value")]; + case "ObjectTypeSpreadProperty": + return R(L, Q, V); + case "QualifiedTypeofIdentifier": + case "QualifiedTypeIdentifier": + return [V("qualification"), ".", V("id")]; + case "StringLiteralTypeAnnotation": + return w(a(c(j), Q)); + case "NumberLiteralTypeAnnotation": + t2.strictEqual(typeof j.value, "number"); + case "BigIntLiteralTypeAnnotation": + return j.extra ? n(j.extra.raw) : n(j.raw); + case "TypeCastExpression": + return ["(", V("expression"), M(L, Q, V), ")"]; + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": { + let ee = o(L, Q, V, "params"); + if (Q.parser === "flow") { + let ce = F(j), W = _(j), K = Q.originalText.lastIndexOf("/*", ce), de = Q.originalText.indexOf("*/", W); + if (K !== -1 && de !== -1) { + let ue = Q.originalText.slice(K + 2, de).trim(); + if (ue.startsWith("::") && !ue.includes("/*") && !ue.includes("*/")) + return ["/*:: ", ee, " */"]; + } + } + return ee; + } + case "InferredPredicate": + return "%checks"; + case "DeclaredPredicate": + return ["%checks(", V("value"), ")"]; + case "AnyTypeAnnotation": + return "any"; + case "BooleanTypeAnnotation": + return "boolean"; + case "BigIntTypeAnnotation": + return "bigint"; + case "NullLiteralTypeAnnotation": + return "null"; + case "NumberTypeAnnotation": + return "number"; + case "SymbolTypeAnnotation": + return "symbol"; + case "StringTypeAnnotation": + return "string"; + case "VoidTypeAnnotation": + return "void"; + case "ThisTypeAnnotation": + return "this"; + case "Node": + case "Printable": + case "SourceLocation": + case "Position": + case "Statement": + case "Function": + case "Pattern": + case "Expression": + case "Declaration": + case "Specifier": + case "NamedSpecifier": + case "Comment": + case "MemberTypeAnnotation": + case "Type": + throw new Error("unprintable type: " + JSON.stringify(j.type)); + } + } + function J(L, Q) { + let V = y(L); + return V ? (t2.strictEqual(V.type, "DeclareExportDeclaration"), Q) : ["declare ", Q]; + } + r.exports = { printFlow: q }; + } }), gd = te({ "src/language-js/utils/is-ts-keyword-type.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + let { type: a } = s; + return a.startsWith("TS") && a.endsWith("Keyword"); + } + r.exports = t2; + } }), Bo = te({ "src/language-js/print/ternary.js"(e, r) { + "use strict"; + ne(); + var { hasNewlineInRange: t2 } = Ue(), { isJsxNode: s, getComments: a, isCallExpression: n, isMemberExpression: u, isTSTypeExpression: i } = Ke(), { locStart: l, locEnd: p2 } = ut(), y = Pt(), { builders: { line: h, softline: g, group: c, indent: f, align: F, ifBreak: _, dedent: w, breakParent: E } } = qe(); + function N(D) { + let T = [D]; + for (let m = 0; m < T.length; m++) { + let C = T[m]; + for (let o of ["test", "consequent", "alternate"]) { + let d = C[o]; + if (s(d)) + return true; + d.type === "ConditionalExpression" && T.push(d); + } + } + return false; + } + function x(D, T, m) { + let C = D.getValue(), o = C.type === "ConditionalExpression", d = o ? "alternate" : "falseType", v = D.getParentNode(), S = o ? m("test") : [m("checkType"), " ", "extends", " ", m("extendsType")]; + return v.type === C.type && v[d] === C ? F(2, S) : S; + } + var I = /* @__PURE__ */ new Map([["AssignmentExpression", "right"], ["VariableDeclarator", "init"], ["ReturnStatement", "argument"], ["ThrowStatement", "argument"], ["UnaryExpression", "argument"], ["YieldExpression", "argument"]]); + function P(D) { + let T = D.getValue(); + if (T.type !== "ConditionalExpression") + return false; + let m, C = T; + for (let o = 0; !m; o++) { + let d = D.getParentNode(o); + if (n(d) && d.callee === C || u(d) && d.object === C || d.type === "TSNonNullExpression" && d.expression === C) { + C = d; + continue; + } + d.type === "NewExpression" && d.callee === C || i(d) && d.expression === C ? (m = D.getParentNode(o + 1), C = d) : m = d; + } + return C === T ? false : m[I.get(m.type)] === C; + } + function $(D, T, m) { + let C = D.getValue(), o = C.type === "ConditionalExpression", d = o ? "consequent" : "trueType", v = o ? "alternate" : "falseType", S = o ? ["test"] : ["checkType", "extendsType"], b = C[d], B = C[v], k = [], M = false, R = D.getParentNode(), q = R.type === C.type && S.some((ue) => R[ue] === C), J = R.type === C.type && !q, L, Q, V = 0; + do + Q = L || C, L = D.getParentNode(V), V++; + while (L && L.type === C.type && S.every((ue) => L[ue] !== Q)); + let j = L || R, Y = Q; + if (o && (s(C[S[0]]) || s(b) || s(B) || N(Y))) { + M = true, J = true; + let ue = (z) => [_("("), f([g, z]), g, _(")")], Fe = (z) => z.type === "NullLiteral" || z.type === "Literal" && z.value === null || z.type === "Identifier" && z.name === "undefined"; + k.push(" ? ", Fe(b) ? m(d) : ue(m(d)), " : ", B.type === C.type || Fe(B) ? m(v) : ue(m(v))); + } else { + let ue = [h, "? ", b.type === C.type ? _("", "(") : "", F(2, m(d)), b.type === C.type ? _("", ")") : "", h, ": ", B.type === C.type ? m(v) : F(2, m(v))]; + k.push(R.type !== C.type || R[v] === C || q ? ue : T.useTabs ? w(f(ue)) : F(Math.max(0, T.tabWidth - 2), ue)); + } + let ee = [...S.map((ue) => a(C[ue])), a(b), a(B)].flat().some((ue) => y(ue) && t2(T.originalText, l(ue), p2(ue))), ce = (ue) => R === j ? c(ue, { shouldBreak: ee }) : ee ? [ue, E] : ue, W = !M && (u(R) || R.type === "NGPipeExpression" && R.left === C) && !R.computed, K = P(D), de = ce([x(D, T, m), J ? k : f(k), o && W && !K ? g : ""]); + return q || K ? c([f([g, de]), g]) : de; + } + r.exports = { printTernary: $ }; + } }), No = te({ "src/language-js/print/statement.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2 } } = qe(), s = qt(), { getLeftSidePathName: a, hasNakedLeftSide: n, isJsxNode: u, isTheOnlyJsxElementInMarkdown: i, hasComment: l, CommentCheckFlags: p2, isNextLineEmpty: y } = Ke(), { shouldPrintParamsWithoutParens: h } = qr(); + function g(x, I, P, $) { + let D = x.getValue(), T = [], m = D.type === "ClassBody", C = c(D[$]); + return x.each((o, d, v) => { + let S = o.getValue(); + if (S.type === "EmptyStatement") + return; + let b = P(); + !I.semi && !m && !i(I, o) && f(o, I) ? l(S, p2.Leading) ? T.push(P([], { needsSemi: true })) : T.push(";", b) : T.push(b), !I.semi && m && E(S) && N(S, v[d + 1]) && T.push(";"), S !== C && (T.push(t2), y(S, I) && T.push(t2)); + }, $), T; + } + function c(x) { + for (let I = x.length - 1; I >= 0; I--) { + let P = x[I]; + if (P.type !== "EmptyStatement") + return P; + } + } + function f(x, I) { + return x.getNode().type !== "ExpressionStatement" ? false : x.call(($) => F($, I), "expression"); + } + function F(x, I) { + let P = x.getValue(); + switch (P.type) { + case "ParenthesizedExpression": + case "TypeCastExpression": + case "ArrayExpression": + case "ArrayPattern": + case "TemplateLiteral": + case "TemplateElement": + case "RegExpLiteral": + return true; + case "ArrowFunctionExpression": { + if (!h(x, I)) + return true; + break; + } + case "UnaryExpression": { + let { prefix: $, operator: D } = P; + if ($ && (D === "+" || D === "-")) + return true; + break; + } + case "BindExpression": { + if (!P.object) + return true; + break; + } + case "Literal": { + if (P.regex) + return true; + break; + } + default: + if (u(P)) + return true; + } + return s(x, I) ? true : n(P) ? x.call(($) => F($, I), ...a(x, P)) : false; + } + function _(x, I, P) { + return g(x, I, P, "body"); + } + function w(x, I, P) { + return g(x, I, P, "consequent"); + } + var E = (x) => { + let { type: I } = x; + return I === "ClassProperty" || I === "PropertyDefinition" || I === "ClassPrivateProperty" || I === "ClassAccessorProperty" || I === "AccessorProperty" || I === "TSAbstractPropertyDefinition" || I === "TSAbstractAccessorProperty"; + }; + function N(x, I) { + let { type: P, name: $ } = x.key; + if (!x.computed && P === "Identifier" && ($ === "static" || $ === "get" || $ === "set" || $ === "accessor") && !x.value && !x.typeAnnotation) + return true; + if (!I || I.static || I.accessibility) + return false; + if (!I.computed) { + let D = I.key && I.key.name; + if (D === "in" || D === "instanceof") + return true; + } + if (E(I) && I.variance && !I.static && !I.declare) + return true; + switch (I.type) { + case "ClassProperty": + case "PropertyDefinition": + case "TSAbstractPropertyDefinition": + return I.computed; + case "MethodDefinition": + case "TSAbstractMethodDefinition": + case "ClassMethod": + case "ClassPrivateMethod": { + if ((I.value ? I.value.async : I.async) || I.kind === "get" || I.kind === "set") + return false; + let T = I.value ? I.value.generator : I.generator; + return !!(I.computed || T); + } + case "TSIndexSignature": + return true; + } + return false; + } + r.exports = { printBody: _, printSwitchCaseConsequent: w }; + } }), wo = te({ "src/language-js/print/block.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { isNonEmptyArray: s } = Ue(), { builders: { hardline: a, indent: n } } = qe(), { hasComment: u, CommentCheckFlags: i, isNextLineEmpty: l } = Ke(), { printHardlineAfterHeritage: p2 } = nr(), { printBody: y } = No(); + function h(c, f, F) { + let _ = c.getValue(), w = []; + if (_.type === "StaticBlock" && w.push("static "), _.type === "ClassBody" && s(_.body)) { + let N = c.getParentNode(); + w.push(p2(N)); + } + w.push("{"); + let E = g(c, f, F); + if (E) + w.push(n([a, E]), a); + else { + let N = c.getParentNode(), x = c.getParentNode(1); + N.type === "ArrowFunctionExpression" || N.type === "FunctionExpression" || N.type === "FunctionDeclaration" || N.type === "ObjectMethod" || N.type === "ClassMethod" || N.type === "ClassPrivateMethod" || N.type === "ForStatement" || N.type === "WhileStatement" || N.type === "DoWhileStatement" || N.type === "DoExpression" || N.type === "CatchClause" && !x.finalizer || N.type === "TSModuleDeclaration" || N.type === "TSDeclareFunction" || _.type === "StaticBlock" || _.type === "ClassBody" || w.push(a); + } + return w.push("}"), w; + } + function g(c, f, F) { + let _ = c.getValue(), w = s(_.directives), E = _.body.some((I) => I.type !== "EmptyStatement"), N = u(_, i.Dangling); + if (!w && !E && !N) + return ""; + let x = []; + if (w && c.each((I, P, $) => { + x.push(F()), (P < $.length - 1 || E || N) && (x.push(a), l(I.getValue(), f) && x.push(a)); + }, "directives"), E && x.push(y(c, f, F)), N && x.push(t2(c, f, true)), _.type === "Program") { + let I = c.getParentNode(); + (!I || I.type !== "ModuleExpression") && x.push(a); + } + return x; + } + r.exports = { printBlock: h, printBlockBody: g }; + } }), yd = te({ "src/language-js/print/typescript.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { hasNewlineInRange: s } = Ue(), { builders: { join: a, line: n, hardline: u, softline: i, group: l, indent: p2, conditionalGroup: y, ifBreak: h } } = qe(), { isStringLiteral: g, getTypeScriptMappedTypeModifier: c, shouldPrintComma: f, isCallExpression: F, isMemberExpression: _ } = Ke(), w = gd(), { locStart: E, locEnd: N } = ut(), { printOptionalToken: x, printTypeScriptModifiers: I } = ct(), { printTernary: P } = Bo(), { printFunctionParameters: $, shouldGroupFunctionParameters: D } = Lr(), { printTemplateLiteral: T } = jt(), { printArrayItems: m } = er(), { printObject: C } = uu(), { printClassProperty: o, printClassMethod: d } = nr(), { printTypeParameter: v, printTypeParameters: S } = jr(), { printPropertyKey: b } = rr(), { printFunction: B, printMethodInternal: k } = qr(), { printInterface: M } = bo(), { printBlock: R } = wo(), { printTypeAlias: q, printIntersectionType: J, printUnionType: L, printFunctionType: Q, printTupleType: V, printIndexedAccessType: j, printJSDocType: Y } = Or(); + function ie(ee, ce, W) { + let K = ee.getValue(); + if (!K.type.startsWith("TS")) + return; + if (w(K)) + return K.type.slice(2, -7).toLowerCase(); + let de = ce.semi ? ";" : "", ue = []; + switch (K.type) { + case "TSThisType": + return "this"; + case "TSTypeAssertion": { + let Fe = !(K.expression.type === "ArrayExpression" || K.expression.type === "ObjectExpression"), z = l(["<", p2([i, W("typeAnnotation")]), i, ">"]), U = [h("("), p2([i, W("expression")]), i, h(")")]; + return Fe ? y([[z, W("expression")], [z, l(U, { shouldBreak: true })], [z, W("expression")]]) : l([z, W("expression")]); + } + case "TSDeclareFunction": + return B(ee, W, ce); + case "TSExportAssignment": + return ["export = ", W("expression"), de]; + case "TSModuleBlock": + return R(ee, ce, W); + case "TSInterfaceBody": + case "TSTypeLiteral": + return C(ee, ce, W); + case "TSTypeAliasDeclaration": + return q(ee, ce, W); + case "TSQualifiedName": + return a(".", [W("left"), W("right")]); + case "TSAbstractMethodDefinition": + case "TSDeclareMethod": + return d(ee, ce, W); + case "TSAbstractAccessorProperty": + case "TSAbstractPropertyDefinition": + return o(ee, ce, W); + case "TSInterfaceHeritage": + case "TSExpressionWithTypeArguments": + return ue.push(W("expression")), K.typeParameters && ue.push(W("typeParameters")), ue; + case "TSTemplateLiteralType": + return T(ee, W, ce); + case "TSNamedTupleMember": + return [W("label"), K.optional ? "?" : "", ": ", W("elementType")]; + case "TSRestType": + return ["...", W("typeAnnotation")]; + case "TSOptionalType": + return [W("typeAnnotation"), "?"]; + case "TSInterfaceDeclaration": + return M(ee, ce, W); + case "TSClassImplements": + return [W("expression"), W("typeParameters")]; + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": + return S(ee, ce, W, "params"); + case "TSTypeParameter": + return v(ee, ce, W); + case "TSSatisfiesExpression": + case "TSAsExpression": { + let Fe = K.type === "TSAsExpression" ? "as" : "satisfies"; + ue.push(W("expression"), ` ${Fe} `, W("typeAnnotation")); + let z = ee.getParentNode(); + return F(z) && z.callee === K || _(z) && z.object === K ? l([p2([i, ...ue]), i]) : ue; + } + case "TSArrayType": + return [W("elementType"), "[]"]; + case "TSPropertySignature": + return K.readonly && ue.push("readonly "), ue.push(b(ee, ce, W), x(ee)), K.typeAnnotation && ue.push(": ", W("typeAnnotation")), K.initializer && ue.push(" = ", W("initializer")), ue; + case "TSParameterProperty": + return K.accessibility && ue.push(K.accessibility + " "), K.export && ue.push("export "), K.static && ue.push("static "), K.override && ue.push("override "), K.readonly && ue.push("readonly "), ue.push(W("parameter")), ue; + case "TSTypeQuery": + return ["typeof ", W("exprName"), W("typeParameters")]; + case "TSIndexSignature": { + let Fe = ee.getParentNode(), z = K.parameters.length > 1 ? h(f(ce) ? "," : "") : "", U = l([p2([i, a([", ", i], ee.map(W, "parameters"))]), z, i]); + return [K.export ? "export " : "", K.accessibility ? [K.accessibility, " "] : "", K.static ? "static " : "", K.readonly ? "readonly " : "", K.declare ? "declare " : "", "[", K.parameters ? U : "", K.typeAnnotation ? "]: " : "]", K.typeAnnotation ? W("typeAnnotation") : "", Fe.type === "ClassBody" ? de : ""]; + } + case "TSTypePredicate": + return [K.asserts ? "asserts " : "", W("parameterName"), K.typeAnnotation ? [" is ", W("typeAnnotation")] : ""]; + case "TSNonNullExpression": + return [W("expression"), "!"]; + case "TSImportType": + return [K.isTypeOf ? "typeof " : "", "import(", W(K.parameter ? "parameter" : "argument"), ")", K.qualifier ? [".", W("qualifier")] : "", S(ee, ce, W, "typeParameters")]; + case "TSLiteralType": + return W("literal"); + case "TSIndexedAccessType": + return j(ee, ce, W); + case "TSConstructSignatureDeclaration": + case "TSCallSignatureDeclaration": + case "TSConstructorType": { + if (K.type === "TSConstructorType" && K.abstract && ue.push("abstract "), K.type !== "TSCallSignatureDeclaration" && ue.push("new "), ue.push(l($(ee, W, ce, false, true))), K.returnType || K.typeAnnotation) { + let Fe = K.type === "TSConstructorType"; + ue.push(Fe ? " => " : ": ", W("returnType"), W("typeAnnotation")); + } + return ue; + } + case "TSTypeOperator": + return [K.operator, " ", W("typeAnnotation")]; + case "TSMappedType": { + let Fe = s(ce.originalText, E(K), N(K)); + return l(["{", p2([ce.bracketSpacing ? n : i, W("typeParameter"), K.optional ? c(K.optional, "?") : "", K.typeAnnotation ? ": " : "", W("typeAnnotation"), h(de)]), t2(ee, ce, true), ce.bracketSpacing ? n : i, "}"], { shouldBreak: Fe }); + } + case "TSMethodSignature": { + let Fe = K.kind && K.kind !== "method" ? `${K.kind} ` : ""; + ue.push(K.accessibility ? [K.accessibility, " "] : "", Fe, K.export ? "export " : "", K.static ? "static " : "", K.readonly ? "readonly " : "", K.abstract ? "abstract " : "", K.declare ? "declare " : "", K.computed ? "[" : "", W("key"), K.computed ? "]" : "", x(ee)); + let z = $(ee, W, ce, false, true), U = K.returnType ? "returnType" : "typeAnnotation", Z = K[U], se = Z ? W(U) : "", fe = D(K, se); + return ue.push(fe ? l(z) : z), Z && ue.push(": ", l(se)), l(ue); + } + case "TSNamespaceExportDeclaration": + return ue.push("export as namespace ", W("id")), ce.semi && ue.push(";"), l(ue); + case "TSEnumDeclaration": + return K.declare && ue.push("declare "), K.modifiers && ue.push(I(ee, ce, W)), K.const && ue.push("const "), ue.push("enum ", W("id"), " "), K.members.length === 0 ? ue.push(l(["{", t2(ee, ce), i, "}"])) : ue.push(l(["{", p2([u, m(ee, ce, "members", W), f(ce, "es5") ? "," : ""]), t2(ee, ce, true), u, "}"])), ue; + case "TSEnumMember": + return K.computed ? ue.push("[", W("id"), "]") : ue.push(W("id")), K.initializer && ue.push(" = ", W("initializer")), ue; + case "TSImportEqualsDeclaration": + return K.isExport && ue.push("export "), ue.push("import "), K.importKind && K.importKind !== "value" && ue.push(K.importKind, " "), ue.push(W("id"), " = ", W("moduleReference")), ce.semi && ue.push(";"), l(ue); + case "TSExternalModuleReference": + return ["require(", W("expression"), ")"]; + case "TSModuleDeclaration": { + let Fe = ee.getParentNode(), z = g(K.id), U = Fe.type === "TSModuleDeclaration", Z = K.body && K.body.type === "TSModuleDeclaration"; + if (U) + ue.push("."); + else { + K.declare && ue.push("declare "), ue.push(I(ee, ce, W)); + let se = ce.originalText.slice(E(K), E(K.id)); + K.id.type === "Identifier" && K.id.name === "global" && !/namespace|module/.test(se) || ue.push(z || /(?:^|\s)module(?:\s|$)/.test(se) ? "module " : "namespace "); + } + return ue.push(W("id")), Z ? ue.push(W("body")) : K.body ? ue.push(" ", l(W("body"))) : ue.push(de), ue; + } + case "TSConditionalType": + return P(ee, ce, W); + case "TSInferType": + return ["infer", " ", W("typeParameter")]; + case "TSIntersectionType": + return J(ee, ce, W); + case "TSUnionType": + return L(ee, ce, W); + case "TSFunctionType": + return Q(ee, ce, W); + case "TSTupleType": + return V(ee, ce, W); + case "TSTypeReference": + return [W("typeName"), S(ee, ce, W, "typeParameters")]; + case "TSTypeAnnotation": + return W("typeAnnotation"); + case "TSEmptyBodyFunctionExpression": + return k(ee, ce, W); + case "TSJSDocAllType": + return "*"; + case "TSJSDocUnknownType": + return "?"; + case "TSJSDocNullableType": + return Y(ee, W, "?"); + case "TSJSDocNonNullableType": + return Y(ee, W, "!"); + case "TSInstantiationExpression": + return [W("expression"), W("typeParameters")]; + default: + throw new Error(`Unknown TypeScript node type: ${JSON.stringify(K.type)}.`); + } + } + r.exports = { printTypescript: ie }; + } }), hd = te({ "src/language-js/print/comment.js"(e, r) { + "use strict"; + ne(); + var { hasNewline: t2 } = Ue(), { builders: { join: s, hardline: a }, utils: { replaceTextEndOfLine: n } } = qe(), { isLineComment: u } = Ke(), { locStart: i, locEnd: l } = ut(), p2 = Pt(); + function y(c, f) { + let F = c.getValue(); + if (u(F)) + return f.originalText.slice(i(F), l(F)).trimEnd(); + if (p2(F)) { + if (h(F)) { + let E = g(F); + return F.trailing && !t2(f.originalText, i(F), { backwards: true }) ? [a, E] : E; + } + let _ = l(F), w = f.originalText.slice(_ - 3, _) === "*-/"; + return ["/*", n(F.value), w ? "*-/" : "*/"]; + } + throw new Error("Not a comment: " + JSON.stringify(F)); + } + function h(c) { + let f = `*${c.value}*`.split(` +`); + return f.length > 1 && f.every((F) => F.trim()[0] === "*"); + } + function g(c) { + let f = c.value.split(` +`); + return ["/*", s(a, f.map((F, _) => _ === 0 ? F.trimEnd() : " " + (_ < f.length - 1 ? F.trim() : F.trimStart()))), "*/"]; + } + r.exports = { printComment: y }; + } }), vd = te({ "src/language-js/print/literal.js"(e, r) { + "use strict"; + ne(); + var { printString: t2, printNumber: s } = Ue(), { replaceTextEndOfLine: a } = Yt(), { printDirective: n } = ct(); + function u(y, h) { + let g = y.getNode(); + switch (g.type) { + case "RegExpLiteral": + return p2(g); + case "BigIntLiteral": + return l(g.bigint || g.extra.raw); + case "NumericLiteral": + return s(g.extra.raw); + case "StringLiteral": + return a(t2(g.extra.raw, h)); + case "NullLiteral": + return "null"; + case "BooleanLiteral": + return String(g.value); + case "DecimalLiteral": + return s(g.value) + "m"; + case "Literal": { + if (g.regex) + return p2(g.regex); + if (g.bigint) + return l(g.raw); + if (g.decimal) + return s(g.decimal) + "m"; + let { value: c } = g; + return typeof c == "number" ? s(g.raw) : typeof c == "string" ? i(y) ? n(g.raw, h) : a(t2(g.raw, h)) : String(c); + } + } + } + function i(y) { + if (y.getName() !== "expression") + return; + let h = y.getParentNode(); + return h.type === "ExpressionStatement" && h.directive; + } + function l(y) { + return y.toLowerCase(); + } + function p2(y) { + let { pattern: h, flags: g } = y; + return g = [...g].sort().join(""), `/${h}/${g}`; + } + r.exports = { printLiteral: u }; + } }), Cd = te({ "src/language-js/printer-estree.js"(e, r) { + "use strict"; + ne(); + var { printDanglingComments: t2 } = et(), { hasNewline: s } = Ue(), { builders: { join: a, line: n, hardline: u, softline: i, group: l, indent: p2 }, utils: { replaceTextEndOfLine: y } } = qe(), h = td(), g = rd(), { insertPragma: c } = Co(), f = Eo(), F = qt(), _ = Fo(), { hasFlowShorthandAnnotationComment: w, hasComment: E, CommentCheckFlags: N, isTheOnlyJsxElementInMarkdown: x, isLineComment: I, isNextLineEmpty: P, needsHardlineAfterDanglingComment: $, hasIgnoreComment: D, isCallExpression: T, isMemberExpression: m, markerForIfWithoutBlockAndSameLineComment: C } = Ke(), { locStart: o, locEnd: d } = ut(), v = Pt(), { printHtmlBinding: S, isVueEventBindingExpression: b } = pd(), { printAngular: B } = fd(), { printJsx: k, hasJsxIgnoreComment: M } = Dd(), { printFlow: R } = dd(), { printTypescript: q } = yd(), { printOptionalToken: J, printBindExpressionCallee: L, printTypeAnnotation: Q, adjustClause: V, printRestSpread: j, printDefiniteToken: Y, printDirective: ie } = ct(), { printImportDeclaration: ee, printExportDeclaration: ce, printExportAllDeclaration: W, printModuleSpecifier: K } = To(), { printTernary: de } = Bo(), { printTemplateLiteral: ue } = jt(), { printArray: Fe } = er(), { printObject: z } = uu(), { printClass: U, printClassMethod: Z, printClassProperty: se } = nr(), { printProperty: fe } = rr(), { printFunction: ge, printArrowFunction: he, printMethod: we, printReturnStatement: ke, printThrowStatement: Re } = qr(), { printCallExpression: Ne } = xo(), { printVariableDeclarator: Pe, printAssignmentExpression: oe } = tr(), { printBinaryishExpression: H } = ru(), { printSwitchCaseConsequent: pe } = No(), { printMemberExpression: X } = So(), { printBlock: le, printBlockBody: Ae } = wo(), { printComment: Ee } = hd(), { printLiteral: De } = vd(), { printDecorators: A } = nu(); + function G(Ce, Be, ve, ze) { + let be = re(Ce, Be, ve, ze); + if (!be) + return ""; + let Ye = Ce.getValue(), { type: Se } = Ye; + if (Se === "ClassMethod" || Se === "ClassPrivateMethod" || Se === "ClassProperty" || Se === "ClassAccessorProperty" || Se === "AccessorProperty" || Se === "TSAbstractAccessorProperty" || Se === "PropertyDefinition" || Se === "TSAbstractPropertyDefinition" || Se === "ClassPrivateProperty" || Se === "MethodDefinition" || Se === "TSAbstractMethodDefinition" || Se === "TSDeclareMethod") + return be; + let Ie = [be], Oe = A(Ce, Be, ve), Je = Ye.type === "ClassExpression" && Oe; + if (Oe && (Ie = [...Oe, be], !Je)) + return l(Ie); + if (!F(Ce, Be)) + return ze && ze.needsSemi && Ie.unshift(";"), Ie.length === 1 && Ie[0] === be ? be : Ie; + if (Je && (Ie = [p2([n, ...Ie])]), Ie.unshift("("), ze && ze.needsSemi && Ie.unshift(";"), w(Ye)) { + let [je] = Ye.trailingComments; + Ie.push(" /*", je.value.trimStart(), "*/"), je.printed = true; + } + return Je && Ie.push(n), Ie.push(")"), Ie; + } + function re(Ce, Be, ve, ze) { + let be = Ce.getValue(), Ye = Be.semi ? ";" : ""; + if (!be) + return ""; + if (typeof be == "string") + return be; + for (let Ie of [De, S, B, k, R, q]) { + let Oe = Ie(Ce, Be, ve); + if (typeof Oe < "u") + return Oe; + } + let Se = []; + switch (be.type) { + case "JsExpressionRoot": + return ve("node"); + case "JsonRoot": + return [ve("node"), u]; + case "File": + return be.program && be.program.interpreter && Se.push(ve(["program", "interpreter"])), Se.push(ve("program")), Se; + case "Program": + return Ae(Ce, Be, ve); + case "EmptyStatement": + return ""; + case "ExpressionStatement": { + if (Be.parser === "__vue_event_binding" || Be.parser === "__vue_ts_event_binding") { + let Oe = Ce.getParentNode(); + if (Oe.type === "Program" && Oe.body.length === 1 && Oe.body[0] === be) + return [ve("expression"), b(be.expression) ? ";" : ""]; + } + let Ie = t2(Ce, Be, true, (Oe) => { + let { marker: Je } = Oe; + return Je === C; + }); + return [ve("expression"), x(Be, Ce) ? "" : Ye, Ie ? [" ", Ie] : ""]; + } + case "ParenthesizedExpression": + return !E(be.expression) && (be.expression.type === "ObjectExpression" || be.expression.type === "ArrayExpression") ? ["(", ve("expression"), ")"] : l(["(", p2([i, ve("expression")]), i, ")"]); + case "AssignmentExpression": + return oe(Ce, Be, ve); + case "VariableDeclarator": + return Pe(Ce, Be, ve); + case "BinaryExpression": + case "LogicalExpression": + return H(Ce, Be, ve); + case "AssignmentPattern": + return [ve("left"), " = ", ve("right")]; + case "OptionalMemberExpression": + case "MemberExpression": + return X(Ce, Be, ve); + case "MetaProperty": + return [ve("meta"), ".", ve("property")]; + case "BindExpression": + return be.object && Se.push(ve("object")), Se.push(l(p2([i, L(Ce, Be, ve)]))), Se; + case "Identifier": + return [be.name, J(Ce), Y(Ce), Q(Ce, Be, ve)]; + case "V8IntrinsicIdentifier": + return ["%", be.name]; + case "SpreadElement": + case "SpreadElementPattern": + case "SpreadProperty": + case "SpreadPropertyPattern": + case "RestElement": + return j(Ce, Be, ve); + case "FunctionDeclaration": + case "FunctionExpression": + return ge(Ce, ve, Be, ze); + case "ArrowFunctionExpression": + return he(Ce, Be, ve, ze); + case "YieldExpression": + return Se.push("yield"), be.delegate && Se.push("*"), be.argument && Se.push(" ", ve("argument")), Se; + case "AwaitExpression": { + if (Se.push("await"), be.argument) { + Se.push(" ", ve("argument")); + let Ie = Ce.getParentNode(); + if (T(Ie) && Ie.callee === be || m(Ie) && Ie.object === be) { + Se = [p2([i, ...Se]), i]; + let Oe = Ce.findAncestor((Je) => Je.type === "AwaitExpression" || Je.type === "BlockStatement"); + if (!Oe || Oe.type !== "AwaitExpression") + return l(Se); + } + } + return Se; + } + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + return ce(Ce, Be, ve); + case "ExportAllDeclaration": + return W(Ce, Be, ve); + case "ImportDeclaration": + return ee(Ce, Be, ve); + case "ImportSpecifier": + case "ExportSpecifier": + case "ImportNamespaceSpecifier": + case "ExportNamespaceSpecifier": + case "ImportDefaultSpecifier": + case "ExportDefaultSpecifier": + return K(Ce, Be, ve); + case "ImportAttribute": + return [ve("key"), ": ", ve("value")]; + case "Import": + return "import"; + case "BlockStatement": + case "StaticBlock": + case "ClassBody": + return le(Ce, Be, ve); + case "ThrowStatement": + return Re(Ce, Be, ve); + case "ReturnStatement": + return ke(Ce, Be, ve); + case "NewExpression": + case "ImportExpression": + case "OptionalCallExpression": + case "CallExpression": + return Ne(Ce, Be, ve); + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + return z(Ce, Be, ve); + case "ObjectProperty": + case "Property": + return be.method || be.kind === "get" || be.kind === "set" ? we(Ce, Be, ve) : fe(Ce, Be, ve); + case "ObjectMethod": + return we(Ce, Be, ve); + case "Decorator": + return ["@", ve("expression")]; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + return Fe(Ce, Be, ve); + case "SequenceExpression": { + let Ie = Ce.getParentNode(0); + if (Ie.type === "ExpressionStatement" || Ie.type === "ForStatement") { + let Oe = []; + return Ce.each((Je, Te) => { + Te === 0 ? Oe.push(ve()) : Oe.push(",", p2([n, ve()])); + }, "expressions"), l(Oe); + } + return l(a([",", n], Ce.map(ve, "expressions"))); + } + case "ThisExpression": + return "this"; + case "Super": + return "super"; + case "Directive": + return [ve("value"), Ye]; + case "DirectiveLiteral": + return ie(be.extra.raw, Be); + case "UnaryExpression": + return Se.push(be.operator), /[a-z]$/.test(be.operator) && Se.push(" "), E(be.argument) ? Se.push(l(["(", p2([i, ve("argument")]), i, ")"])) : Se.push(ve("argument")), Se; + case "UpdateExpression": + return Se.push(ve("argument"), be.operator), be.prefix && Se.reverse(), Se; + case "ConditionalExpression": + return de(Ce, Be, ve); + case "VariableDeclaration": { + let Ie = Ce.map(ve, "declarations"), Oe = Ce.getParentNode(), Je = Oe.type === "ForStatement" || Oe.type === "ForInStatement" || Oe.type === "ForOfStatement", Te = be.declarations.some((Me) => Me.init), je; + return Ie.length === 1 && !E(be.declarations[0]) ? je = Ie[0] : Ie.length > 0 && (je = p2(Ie[0])), Se = [be.declare ? "declare " : "", be.kind, je ? [" ", je] : "", p2(Ie.slice(1).map((Me) => [",", Te && !Je ? u : n, Me]))], Je && Oe.body !== be || Se.push(Ye), l(Se); + } + case "WithStatement": + return l(["with (", ve("object"), ")", V(be.body, ve("body"))]); + case "IfStatement": { + let Ie = V(be.consequent, ve("consequent")), Oe = l(["if (", l([p2([i, ve("test")]), i]), ")", Ie]); + if (Se.push(Oe), be.alternate) { + let Je = E(be.consequent, N.Trailing | N.Line) || $(be), Te = be.consequent.type === "BlockStatement" && !Je; + Se.push(Te ? " " : u), E(be, N.Dangling) && Se.push(t2(Ce, Be, true), Je ? u : " "), Se.push("else", l(V(be.alternate, ve("alternate"), be.alternate.type === "IfStatement"))); + } + return Se; + } + case "ForStatement": { + let Ie = V(be.body, ve("body")), Oe = t2(Ce, Be, true), Je = Oe ? [Oe, i] : ""; + return !be.init && !be.test && !be.update ? [Je, l(["for (;;)", Ie])] : [Je, l(["for (", l([p2([i, ve("init"), ";", n, ve("test"), ";", n, ve("update")]), i]), ")", Ie])]; + } + case "WhileStatement": + return l(["while (", l([p2([i, ve("test")]), i]), ")", V(be.body, ve("body"))]); + case "ForInStatement": + return l(["for (", ve("left"), " in ", ve("right"), ")", V(be.body, ve("body"))]); + case "ForOfStatement": + return l(["for", be.await ? " await" : "", " (", ve("left"), " of ", ve("right"), ")", V(be.body, ve("body"))]); + case "DoWhileStatement": { + let Ie = V(be.body, ve("body")); + return Se = [l(["do", Ie])], be.body.type === "BlockStatement" ? Se.push(" ") : Se.push(u), Se.push("while (", l([p2([i, ve("test")]), i]), ")", Ye), Se; + } + case "DoExpression": + return [be.async ? "async " : "", "do ", ve("body")]; + case "BreakStatement": + return Se.push("break"), be.label && Se.push(" ", ve("label")), Se.push(Ye), Se; + case "ContinueStatement": + return Se.push("continue"), be.label && Se.push(" ", ve("label")), Se.push(Ye), Se; + case "LabeledStatement": + return be.body.type === "EmptyStatement" ? [ve("label"), ":;"] : [ve("label"), ": ", ve("body")]; + case "TryStatement": + return ["try ", ve("block"), be.handler ? [" ", ve("handler")] : "", be.finalizer ? [" finally ", ve("finalizer")] : ""]; + case "CatchClause": + if (be.param) { + let Ie = E(be.param, (Je) => !v(Je) || Je.leading && s(Be.originalText, d(Je)) || Je.trailing && s(Be.originalText, o(Je), { backwards: true })), Oe = ve("param"); + return ["catch ", Ie ? ["(", p2([i, Oe]), i, ") "] : ["(", Oe, ") "], ve("body")]; + } + return ["catch ", ve("body")]; + case "SwitchStatement": + return [l(["switch (", p2([i, ve("discriminant")]), i, ")"]), " {", be.cases.length > 0 ? p2([u, a(u, Ce.map((Ie, Oe, Je) => { + let Te = Ie.getValue(); + return [ve(), Oe !== Je.length - 1 && P(Te, Be) ? u : ""]; + }, "cases"))]) : "", u, "}"]; + case "SwitchCase": { + be.test ? Se.push("case ", ve("test"), ":") : Se.push("default:"), E(be, N.Dangling) && Se.push(" ", t2(Ce, Be, true)); + let Ie = be.consequent.filter((Oe) => Oe.type !== "EmptyStatement"); + if (Ie.length > 0) { + let Oe = pe(Ce, Be, ve); + Se.push(Ie.length === 1 && Ie[0].type === "BlockStatement" ? [" ", Oe] : p2([u, Oe])); + } + return Se; + } + case "DebuggerStatement": + return ["debugger", Ye]; + case "ClassDeclaration": + case "ClassExpression": + return U(Ce, Be, ve); + case "ClassMethod": + case "ClassPrivateMethod": + case "MethodDefinition": + return Z(Ce, Be, ve); + case "ClassProperty": + case "PropertyDefinition": + case "ClassPrivateProperty": + case "ClassAccessorProperty": + case "AccessorProperty": + return se(Ce, Be, ve); + case "TemplateElement": + return y(be.value.raw); + case "TemplateLiteral": + return ue(Ce, ve, Be); + case "TaggedTemplateExpression": + return [ve("tag"), ve("typeParameters"), ve("quasi")]; + case "PrivateIdentifier": + return ["#", ve("name")]; + case "PrivateName": + return ["#", ve("id")]; + case "InterpreterDirective": + return Se.push("#!", be.value, u), P(be, Be) && Se.push(u), Se; + case "TopicReference": + return "%"; + case "ArgumentPlaceholder": + return "?"; + case "ModuleExpression": { + Se.push("module {"); + let Ie = ve("body"); + return Ie && Se.push(p2([u, Ie]), u), Se.push("}"), Se; + } + default: + throw new Error("unknown type: " + JSON.stringify(be.type)); + } + } + function ye(Ce) { + return Ce.type && !v(Ce) && !I(Ce) && Ce.type !== "EmptyStatement" && Ce.type !== "TemplateElement" && Ce.type !== "Import" && Ce.type !== "TSEmptyBodyFunctionExpression"; + } + r.exports = { preprocess: _, print: G, embed: h, insertPragma: c, massageAstNode: g, hasPrettierIgnore(Ce) { + return D(Ce) || M(Ce); + }, willPrintOwnComments: f.willPrintOwnComments, canAttachComment: ye, printComment: Ee, isBlockComment: v, handleComments: { avoidAstMutation: true, ownLine: f.handleOwnLineComment, endOfLine: f.handleEndOfLineComment, remaining: f.handleRemainingComment }, getCommentChildNodes: f.getCommentChildNodes }; + } }), Ed = te({ "src/language-js/printer-estree-json.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2, indent: s, join: a } } = qe(), n = Fo(); + function u(y, h, g) { + let c = y.getValue(); + switch (c.type) { + case "JsonRoot": + return [g("node"), t2]; + case "ArrayExpression": { + if (c.elements.length === 0) + return "[]"; + let f = y.map(() => y.getValue() === null ? "null" : g(), "elements"); + return ["[", s([t2, a([",", t2], f)]), t2, "]"]; + } + case "ObjectExpression": + return c.properties.length === 0 ? "{}" : ["{", s([t2, a([",", t2], y.map(g, "properties"))]), t2, "}"]; + case "ObjectProperty": + return [g("key"), ": ", g("value")]; + case "UnaryExpression": + return [c.operator === "+" ? "" : c.operator, g("argument")]; + case "NullLiteral": + return "null"; + case "BooleanLiteral": + return c.value ? "true" : "false"; + case "StringLiteral": + return JSON.stringify(c.value); + case "NumericLiteral": + return i(y) ? JSON.stringify(String(c.value)) : JSON.stringify(c.value); + case "Identifier": + return i(y) ? JSON.stringify(c.name) : c.name; + case "TemplateLiteral": + return g(["quasis", 0]); + case "TemplateElement": + return JSON.stringify(c.value.cooked); + default: + throw new Error("unknown type: " + JSON.stringify(c.type)); + } + } + function i(y) { + return y.getName() === "key" && y.getParentNode().type === "ObjectProperty"; + } + var l = /* @__PURE__ */ new Set(["start", "end", "extra", "loc", "comments", "leadingComments", "trailingComments", "innerComments", "errors", "range", "tokens"]); + function p2(y, h) { + let { type: g } = y; + if (g === "ObjectProperty") { + let { key: c } = y; + c.type === "Identifier" ? h.key = { type: "StringLiteral", value: c.name } : c.type === "NumericLiteral" && (h.key = { type: "StringLiteral", value: String(c.value) }); + return; + } + if (g === "UnaryExpression" && y.operator === "+") + return h.argument; + if (g === "ArrayExpression") { + for (let [c, f] of y.elements.entries()) + f === null && h.elements.splice(c, 0, { type: "NullLiteral" }); + return; + } + if (g === "TemplateLiteral") + return { type: "StringLiteral", value: y.quasis[0].value.cooked }; + } + p2.ignoredProperties = l, r.exports = { preprocess: n, print: u, massageAstNode: p2 }; + } }), Mt = te({ "src/common/common-options.js"(e, r) { + "use strict"; + ne(); + var t2 = "Common"; + r.exports = { bracketSpacing: { since: "0.0.0", category: t2, type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, singleQuote: { since: "0.0.0", category: t2, type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { since: "1.8.2", category: t2, type: "choice", default: [{ since: "1.8.2", value: true }, { since: "1.9.0", value: "preserve" }], description: "How to wrap prose.", choices: [{ since: "1.9.0", value: "always", description: "Wrap prose if it exceeds the print width." }, { since: "1.9.0", value: "never", description: "Do not wrap prose." }, { since: "1.9.0", value: "preserve", description: "Wrap prose as-is." }] }, bracketSameLine: { since: "2.4.0", category: t2, type: "boolean", default: false, description: "Put > of opening tags on the last line instead of on a new line." }, singleAttributePerLine: { since: "2.6.0", category: t2, type: "boolean", default: false, description: "Enforce single attribute per line in HTML, Vue and JSX." } }; + } }), Fd = te({ "src/language-js/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(), s = "JavaScript"; + r.exports = { arrowParens: { since: "1.9.0", category: s, type: "choice", default: [{ since: "1.9.0", value: "avoid" }, { since: "2.0.0", value: "always" }], description: "Include parentheses around a sole arrow function parameter.", choices: [{ value: "always", description: "Always include parens. Example: `(x) => x`" }, { value: "avoid", description: "Omit parens when possible. Example: `x => x`" }] }, bracketSameLine: t2.bracketSameLine, bracketSpacing: t2.bracketSpacing, jsxBracketSameLine: { since: "0.17.0", category: s, type: "boolean", description: "Put > on the last line instead of at a new line.", deprecated: "2.4.0" }, semi: { since: "1.0.0", category: s, type: "boolean", default: true, description: "Print semicolons.", oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." }, singleQuote: t2.singleQuote, jsxSingleQuote: { since: "1.15.0", category: s, type: "boolean", default: false, description: "Use single quotes in JSX." }, quoteProps: { since: "1.17.0", category: s, type: "choice", default: "as-needed", description: "Change when properties in objects are quoted.", choices: [{ value: "as-needed", description: "Only add quotes around object properties where required." }, { value: "consistent", description: "If at least one property in an object requires quotes, quote all properties." }, { value: "preserve", description: "Respect the input use of quotes in object properties." }] }, trailingComma: { since: "0.0.0", category: s, type: "choice", default: [{ since: "0.0.0", value: false }, { since: "0.19.0", value: "none" }, { since: "2.0.0", value: "es5" }], description: "Print trailing commas wherever possible when multi-line.", choices: [{ value: "es5", description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" }, { value: "none", description: "No trailing commas." }, { value: "all", description: "Trailing commas wherever possible (including function arguments)." }] }, singleAttributePerLine: t2.singleAttributePerLine }; + } }), Ad = te({ "src/language-js/parse/parsers.js"() { + ne(); + } }), Ln = te({ "node_modules/linguist-languages/data/JavaScript.json"(e, r) { + r.exports = { name: "JavaScript", type: "programming", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", color: "#f1e05a", aliases: ["js", "node"], extensions: [".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".javascript", ".jsb", ".jscad", ".jsfl", ".jslib", ".jsm", ".jspre", ".jss", ".jsx", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"], filenames: ["Jakefile"], interpreters: ["chakra", "d8", "gjs", "js", "node", "nodejs", "qjs", "rhino", "v8", "v8-shell"], languageId: 183 }; + } }), Sd = te({ "node_modules/linguist-languages/data/TypeScript.json"(e, r) { + r.exports = { name: "TypeScript", type: "programming", color: "#3178c6", aliases: ["ts"], interpreters: ["deno", "ts-node"], extensions: [".ts", ".cts", ".mts"], tmScope: "source.ts", aceMode: "typescript", codemirrorMode: "javascript", codemirrorMimeType: "application/typescript", languageId: 378 }; + } }), xd = te({ "node_modules/linguist-languages/data/TSX.json"(e, r) { + r.exports = { name: "TSX", type: "programming", color: "#3178c6", group: "TypeScript", extensions: [".tsx"], tmScope: "source.tsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", languageId: 94901924 }; + } }), wa = te({ "node_modules/linguist-languages/data/JSON.json"(e, r) { + r.exports = { name: "JSON", type: "data", color: "#292929", tmScope: "source.json", aceMode: "json", codemirrorMode: "javascript", codemirrorMimeType: "application/json", aliases: ["geojson", "jsonl", "topojson"], extensions: [".json", ".4DForm", ".4DProject", ".avsc", ".geojson", ".gltf", ".har", ".ice", ".JSON-tmLanguage", ".jsonl", ".mcmeta", ".tfstate", ".tfstate.backup", ".topojson", ".webapp", ".webmanifest", ".yy", ".yyp"], filenames: [".arcconfig", ".auto-changelog", ".c8rc", ".htmlhintrc", ".imgbotconfig", ".nycrc", ".tern-config", ".tern-project", ".watchmanconfig", "Pipfile.lock", "composer.lock", "mcmod.info"], languageId: 174 }; + } }), bd = te({ "node_modules/linguist-languages/data/JSON with Comments.json"(e, r) { + r.exports = { name: "JSON with Comments", type: "data", color: "#292929", group: "JSON", tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "text/javascript", aliases: ["jsonc"], extensions: [".jsonc", ".code-snippets", ".sublime-build", ".sublime-commands", ".sublime-completions", ".sublime-keymap", ".sublime-macro", ".sublime-menu", ".sublime-mousemap", ".sublime-project", ".sublime-settings", ".sublime-theme", ".sublime-workspace", ".sublime_metrics", ".sublime_session"], filenames: [".babelrc", ".devcontainer.json", ".eslintrc.json", ".jscsrc", ".jshintrc", ".jslintrc", "api-extractor.json", "devcontainer.json", "jsconfig.json", "language-configuration.json", "tsconfig.json", "tslint.json"], languageId: 423 }; + } }), Td = te({ "node_modules/linguist-languages/data/JSON5.json"(e, r) { + r.exports = { name: "JSON5", type: "data", color: "#267CB9", extensions: [".json5"], tmScope: "source.js", aceMode: "javascript", codemirrorMode: "javascript", codemirrorMimeType: "application/json", languageId: 175 }; + } }), Bd = te({ "src/language-js/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Cd(), a = Ed(), n = Fd(), u = Ad(), i = [t2(Ln(), (p2) => ({ since: "0.0.0", parsers: ["babel", "acorn", "espree", "meriyah", "babel-flow", "babel-ts", "flow", "typescript"], vscodeLanguageIds: ["javascript", "mongo"], interpreters: [...p2.interpreters, "zx"], extensions: [...p2.extensions.filter((y) => y !== ".jsx"), ".wxs"] })), t2(Ln(), () => ({ name: "Flow", since: "0.0.0", parsers: ["flow", "babel-flow"], vscodeLanguageIds: ["javascript"], aliases: [], filenames: [], extensions: [".js.flow"] })), t2(Ln(), () => ({ name: "JSX", since: "0.0.0", parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"], vscodeLanguageIds: ["javascriptreact"], aliases: void 0, filenames: void 0, extensions: [".jsx"], group: "JavaScript", interpreters: void 0, tmScope: "source.js.jsx", aceMode: "javascript", codemirrorMode: "jsx", codemirrorMimeType: "text/jsx", color: void 0 })), t2(Sd(), () => ({ since: "1.4.0", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescript"] })), t2(xd(), () => ({ since: "1.4.0", parsers: ["typescript", "babel-ts"], vscodeLanguageIds: ["typescriptreact"] })), t2(wa(), () => ({ name: "JSON.stringify", since: "1.13.0", parsers: ["json-stringify"], vscodeLanguageIds: ["json"], extensions: [".importmap"], filenames: ["package.json", "package-lock.json", "composer.json"] })), t2(wa(), (p2) => ({ since: "1.5.0", parsers: ["json"], vscodeLanguageIds: ["json"], extensions: p2.extensions.filter((y) => y !== ".jsonl") })), t2(bd(), (p2) => ({ since: "1.5.0", parsers: ["json"], vscodeLanguageIds: ["jsonc"], filenames: [...p2.filenames, ".eslintrc", ".swcrc"] })), t2(Td(), () => ({ since: "1.13.0", parsers: ["json5"], vscodeLanguageIds: ["json5"] }))], l = { estree: s, "estree-json": a }; + r.exports = { languages: i, options: n, printers: l, parsers: u }; + } }), Nd = te({ "src/language-css/clean.js"(e, r) { + "use strict"; + ne(); + var { isFrontMatterNode: t2 } = Ue(), s = lt(), a = /* @__PURE__ */ new Set(["raw", "raws", "sourceIndex", "source", "before", "after", "trailingComma"]); + function n(i, l, p2) { + if (t2(i) && i.lang === "yaml" && delete l.value, i.type === "css-comment" && p2.type === "css-root" && p2.nodes.length > 0 && ((p2.nodes[0] === i || t2(p2.nodes[0]) && p2.nodes[1] === i) && (delete l.text, /^\*\s*@(?:format|prettier)\s*$/.test(i.text)) || p2.type === "css-root" && s(p2.nodes) === i)) + return null; + if (i.type === "value-root" && delete l.text, (i.type === "media-query" || i.type === "media-query-list" || i.type === "media-feature-expression") && delete l.value, i.type === "css-rule" && delete l.params, i.type === "selector-combinator" && (l.value = l.value.replace(/\s+/g, " ")), i.type === "media-feature" && (l.value = l.value.replace(/ /g, "")), (i.type === "value-word" && (i.isColor && i.isHex || ["initial", "inherit", "unset", "revert"].includes(l.value.replace().toLowerCase())) || i.type === "media-feature" || i.type === "selector-root-invalid" || i.type === "selector-pseudo") && (l.value = l.value.toLowerCase()), i.type === "css-decl" && (l.prop = l.prop.toLowerCase()), (i.type === "css-atrule" || i.type === "css-import") && (l.name = l.name.toLowerCase()), i.type === "value-number" && (l.unit = l.unit.toLowerCase()), (i.type === "media-feature" || i.type === "media-keyword" || i.type === "media-type" || i.type === "media-unknown" || i.type === "media-url" || i.type === "media-value" || i.type === "selector-attribute" || i.type === "selector-string" || i.type === "selector-class" || i.type === "selector-combinator" || i.type === "value-string") && l.value && (l.value = u(l.value)), i.type === "selector-attribute" && (l.attribute = l.attribute.trim(), l.namespace && typeof l.namespace == "string" && (l.namespace = l.namespace.trim(), l.namespace.length === 0 && (l.namespace = true)), l.value && (l.value = l.value.trim().replace(/^["']|["']$/g, ""), delete l.quoted)), (i.type === "media-value" || i.type === "media-type" || i.type === "value-number" || i.type === "selector-root-invalid" || i.type === "selector-class" || i.type === "selector-combinator" || i.type === "selector-tag") && l.value && (l.value = l.value.replace(/([\d+.Ee-]+)([A-Za-z]*)/g, (y, h, g) => { + let c = Number(h); + return Number.isNaN(c) ? y : c + g.toLowerCase(); + })), i.type === "selector-tag") { + let y = i.value.toLowerCase(); + ["from", "to"].includes(y) && (l.value = y); + } + if (i.type === "css-atrule" && i.name.toLowerCase() === "supports" && delete l.value, i.type === "selector-unknown" && delete l.value, i.type === "value-comma_group") { + let y = i.groups.findIndex((h) => h.type === "value-number" && h.unit === "..."); + y !== -1 && (l.groups[y].unit = "", l.groups.splice(y + 1, 0, { type: "value-word", value: "...", isColor: false, isHex: false })); + } + if (i.type === "value-comma_group" && i.groups.some((y) => y.type === "value-atword" && y.value.endsWith("[") || y.type === "value-word" && y.value.startsWith("]"))) + return { type: "value-atword", value: i.groups.map((y) => y.value).join(""), group: { open: null, close: null, groups: [], type: "value-paren_group" } }; + } + n.ignoredProperties = a; + function u(i) { + return i.replace(/'/g, '"').replace(/\\([^\dA-Fa-f])/g, "$1"); + } + r.exports = n; + } }), su = te({ "src/utils/front-matter/print.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2, markAsRoot: s } } = qe(); + function a(n, u) { + if (n.lang === "yaml") { + let i = n.value.trim(), l = i ? u(i, { parser: "yaml" }, { stripTrailingHardline: true }) : ""; + return s([n.startDelimiter, t2, l, l ? t2 : "", n.endDelimiter]); + } + } + r.exports = a; + } }), wd = te({ "src/language-css/embed.js"(e, r) { + "use strict"; + ne(); + var { builders: { hardline: t2 } } = qe(), s = su(); + function a(n, u, i) { + let l = n.getValue(); + if (l.type === "front-matter") { + let p2 = s(l, i); + return p2 ? [p2, t2] : ""; + } + } + r.exports = a; + } }), _o = te({ "src/utils/front-matter/parse.js"(e, r) { + "use strict"; + ne(); + var t2 = new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)", "s"); + function s(a) { + let n = a.match(t2); + if (!n) + return { content: a }; + let { startDelimiter: u, language: i, value: l = "", endDelimiter: p2 } = n.groups, y = i.trim() || "yaml"; + if (u === "+++" && (y = "toml"), y !== "yaml" && u !== p2) + return { content: a }; + let [h] = n; + return { frontMatter: { type: "front-matter", lang: y, value: l, startDelimiter: u, endDelimiter: p2, raw: h.replace(/\n$/, "") }, content: h.replace(/[^\n]/g, " ") + a.slice(h.length) }; + } + r.exports = s; + } }), _d = te({ "src/language-css/pragma.js"(e, r) { + "use strict"; + ne(); + var t2 = Co(), s = _o(); + function a(u) { + return t2.hasPragma(s(u).content); + } + function n(u) { + let { frontMatter: i, content: l } = s(u); + return (i ? i.raw + ` + +` : "") + t2.insertPragma(l); + } + r.exports = { hasPragma: a, insertPragma: n }; + } }), Pd = te({ "src/language-css/utils/index.js"(e, r) { + "use strict"; + ne(); + var t2 = /* @__PURE__ */ new Set(["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]); + function s(z, U) { + let Z = Array.isArray(U) ? U : [U], se = -1, fe; + for (; fe = z.getParentNode(++se); ) + if (Z.includes(fe.type)) + return se; + return -1; + } + function a(z, U) { + let Z = s(z, U); + return Z === -1 ? null : z.getParentNode(Z); + } + function n(z) { + var U; + let Z = a(z, "css-decl"); + return Z == null || (U = Z.prop) === null || U === void 0 ? void 0 : U.toLowerCase(); + } + var u = /* @__PURE__ */ new Set(["initial", "inherit", "unset", "revert"]); + function i(z) { + return u.has(z.toLowerCase()); + } + function l(z, U) { + let Z = a(z, "css-atrule"); + return (Z == null ? void 0 : Z.name) && Z.name.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(U.toLowerCase()); + } + function p2(z) { + return z.includes("$") || z.includes("@") || z.includes("#") || z.startsWith("%") || z.startsWith("--") || z.startsWith(":--") || z.includes("(") && z.includes(")") ? z : z.toLowerCase(); + } + function y(z, U) { + var Z; + let se = a(z, "value-func"); + return (se == null || (Z = se.value) === null || Z === void 0 ? void 0 : Z.toLowerCase()) === U; + } + function h(z) { + var U; + let Z = a(z, "css-rule"), se = Z == null || (U = Z.raws) === null || U === void 0 ? void 0 : U.selector; + return se && (se.startsWith(":import") || se.startsWith(":export")); + } + function g(z, U) { + let Z = Array.isArray(U) ? U : [U], se = a(z, "css-atrule"); + return se && Z.includes(se.name.toLowerCase()); + } + function c(z) { + let U = z.getValue(), Z = a(z, "css-atrule"); + return (Z == null ? void 0 : Z.name) === "import" && U.groups[0].value === "url" && U.groups.length === 2; + } + function f(z) { + return z.type === "value-func" && z.value.toLowerCase() === "url"; + } + function F(z, U) { + var Z; + let se = (Z = z.getParentNode()) === null || Z === void 0 ? void 0 : Z.nodes; + return se && se.indexOf(U) === se.length - 1; + } + function _(z) { + let { selector: U } = z; + return U ? typeof U == "string" && /^@.+:.*$/.test(U) || U.value && /^@.+:.*$/.test(U.value) : false; + } + function w(z) { + return z.type === "value-word" && ["from", "through", "end"].includes(z.value); + } + function E(z) { + return z.type === "value-word" && ["and", "or", "not"].includes(z.value); + } + function N(z) { + return z.type === "value-word" && z.value === "in"; + } + function x(z) { + return z.type === "value-operator" && z.value === "*"; + } + function I(z) { + return z.type === "value-operator" && z.value === "/"; + } + function P(z) { + return z.type === "value-operator" && z.value === "+"; + } + function $(z) { + return z.type === "value-operator" && z.value === "-"; + } + function D(z) { + return z.type === "value-operator" && z.value === "%"; + } + function T(z) { + return x(z) || I(z) || P(z) || $(z) || D(z); + } + function m(z) { + return z.type === "value-word" && ["==", "!="].includes(z.value); + } + function C(z) { + return z.type === "value-word" && ["<", ">", "<=", ">="].includes(z.value); + } + function o(z) { + return z.type === "css-atrule" && ["if", "else", "for", "each", "while"].includes(z.name); + } + function d(z) { + var U; + return ((U = z.raws) === null || U === void 0 ? void 0 : U.params) && /^\(\s*\)$/.test(z.raws.params); + } + function v(z) { + return z.name.startsWith("prettier-placeholder"); + } + function S(z) { + return z.prop.startsWith("@prettier-placeholder"); + } + function b(z, U) { + return z.value === "$$" && z.type === "value-func" && (U == null ? void 0 : U.type) === "value-word" && !U.raws.before; + } + function B(z) { + var U, Z; + return ((U = z.value) === null || U === void 0 ? void 0 : U.type) === "value-root" && ((Z = z.value.group) === null || Z === void 0 ? void 0 : Z.type) === "value-value" && z.prop.toLowerCase() === "composes"; + } + function k(z) { + var U, Z, se; + return ((U = z.value) === null || U === void 0 || (Z = U.group) === null || Z === void 0 || (se = Z.group) === null || se === void 0 ? void 0 : se.type) === "value-paren_group" && z.value.group.group.open !== null && z.value.group.group.close !== null; + } + function M(z) { + var U; + return ((U = z.raws) === null || U === void 0 ? void 0 : U.before) === ""; + } + function R(z) { + var U, Z; + return z.type === "value-comma_group" && ((U = z.groups) === null || U === void 0 || (Z = U[1]) === null || Z === void 0 ? void 0 : Z.type) === "value-colon"; + } + function q(z) { + var U; + return z.type === "value-paren_group" && ((U = z.groups) === null || U === void 0 ? void 0 : U[0]) && R(z.groups[0]); + } + function J(z) { + var U; + let Z = z.getValue(); + if (Z.groups.length === 0) + return false; + let se = z.getParentNode(1); + if (!q(Z) && !(se && q(se))) + return false; + let fe = a(z, "css-decl"); + return !!(fe != null && (U = fe.prop) !== null && U !== void 0 && U.startsWith("$") || q(se) || se.type === "value-func"); + } + function L(z) { + return z.type === "value-comment" && z.inline; + } + function Q(z) { + return z.type === "value-word" && z.value === "#"; + } + function V(z) { + return z.type === "value-word" && z.value === "{"; + } + function j(z) { + return z.type === "value-word" && z.value === "}"; + } + function Y(z) { + return ["value-word", "value-atword"].includes(z.type); + } + function ie(z) { + return (z == null ? void 0 : z.type) === "value-colon"; + } + function ee(z, U) { + if (!R(U)) + return false; + let { groups: Z } = U, se = Z.indexOf(z); + return se === -1 ? false : ie(Z[se + 1]); + } + function ce(z) { + return z.value && ["not", "and", "or"].includes(z.value.toLowerCase()); + } + function W(z) { + return z.type !== "value-func" ? false : t2.has(z.value.toLowerCase()); + } + function K(z) { + return /\/\//.test(z.split(/[\n\r]/).pop()); + } + function de(z) { + return (z == null ? void 0 : z.type) === "value-atword" && z.value.startsWith("prettier-placeholder-"); + } + function ue(z, U) { + var Z, se; + if (((Z = z.open) === null || Z === void 0 ? void 0 : Z.value) !== "(" || ((se = z.close) === null || se === void 0 ? void 0 : se.value) !== ")" || z.groups.some((fe) => fe.type !== "value-comma_group")) + return false; + if (U.type === "value-comma_group") { + let fe = U.groups.indexOf(z) - 1, ge = U.groups[fe]; + if ((ge == null ? void 0 : ge.type) === "value-word" && ge.value === "with") + return true; + } + return false; + } + function Fe(z) { + var U, Z; + return z.type === "value-paren_group" && ((U = z.open) === null || U === void 0 ? void 0 : U.value) === "(" && ((Z = z.close) === null || Z === void 0 ? void 0 : Z.value) === ")"; + } + r.exports = { getAncestorCounter: s, getAncestorNode: a, getPropOfDeclNode: n, maybeToLowerCase: p2, insideValueFunctionNode: y, insideICSSRuleNode: h, insideAtRuleNode: g, insideURLFunctionInImportAtRuleNode: c, isKeyframeAtRuleKeywords: l, isWideKeywords: i, isLastNode: F, isSCSSControlDirectiveNode: o, isDetachedRulesetDeclarationNode: _, isRelationalOperatorNode: C, isEqualityOperatorNode: m, isMultiplicationNode: x, isDivisionNode: I, isAdditionNode: P, isSubtractionNode: $, isModuloNode: D, isMathOperatorNode: T, isEachKeywordNode: N, isForKeywordNode: w, isURLFunctionNode: f, isIfElseKeywordNode: E, hasComposesNode: B, hasParensAroundNode: k, hasEmptyRawBefore: M, isDetachedRulesetCallNode: d, isTemplatePlaceholderNode: v, isTemplatePropNode: S, isPostcssSimpleVarNode: b, isKeyValuePairNode: R, isKeyValuePairInParenGroupNode: q, isKeyInValuePairNode: ee, isSCSSMapItemNode: J, isInlineValueCommentNode: L, isHashNode: Q, isLeftCurlyBraceNode: V, isRightCurlyBraceNode: j, isWordNode: Y, isColonNode: ie, isMediaAndSupportsKeywords: ce, isColorAdjusterFuncNode: W, lastLineHasInlineComment: K, isAtWordPlaceholderNode: de, isConfigurationNode: ue, isParenGroupNode: Fe }; + } }), Id = te({ "src/utils/line-column-to-index.js"(e, r) { + "use strict"; + ne(), r.exports = function(t2, s) { + let a = 0; + for (let n = 0; n < t2.line - 1; ++n) + a = s.indexOf(` +`, a) + 1; + return a + t2.column; + }; + } }), kd = te({ "src/language-css/loc.js"(e, r) { + "use strict"; + ne(); + var { skipEverythingButNewLine: t2 } = Pr(), s = lt(), a = Id(); + function n(c, f) { + return typeof c.sourceIndex == "number" ? c.sourceIndex : c.source ? a(c.source.start, f) - 1 : null; + } + function u(c, f) { + if (c.type === "css-comment" && c.inline) + return t2(f, c.source.startOffset); + let F = c.nodes && s(c.nodes); + return F && c.source && !c.source.end && (c = F), c.source && c.source.end ? a(c.source.end, f) : null; + } + function i(c, f) { + c.source && (c.source.startOffset = n(c, f), c.source.endOffset = u(c, f)); + for (let F in c) { + let _ = c[F]; + F === "source" || !_ || typeof _ != "object" || (_.type === "value-root" || _.type === "value-unknown" ? l(_, p2(c), _.text || _.value) : i(_, f)); + } + } + function l(c, f, F) { + c.source && (c.source.startOffset = n(c, F) + f, c.source.endOffset = u(c, F) + f); + for (let _ in c) { + let w = c[_]; + _ === "source" || !w || typeof w != "object" || l(w, f, F); + } + } + function p2(c) { + let f = c.source.startOffset; + return typeof c.prop == "string" && (f += c.prop.length), c.type === "css-atrule" && typeof c.name == "string" && (f += 1 + c.name.length + c.raws.afterName.match(/^\s*:?\s*/)[0].length), c.type !== "css-atrule" && c.raws && typeof c.raws.between == "string" && (f += c.raws.between.length), f; + } + function y(c) { + let f = "initial", F = "initial", _, w = false, E = []; + for (let N = 0; N < c.length; N++) { + let x = c[N]; + switch (f) { + case "initial": + if (x === "'") { + f = "single-quotes"; + continue; + } + if (x === '"') { + f = "double-quotes"; + continue; + } + if ((x === "u" || x === "U") && c.slice(N, N + 4).toLowerCase() === "url(") { + f = "url", N += 3; + continue; + } + if (x === "*" && c[N - 1] === "/") { + f = "comment-block"; + continue; + } + if (x === "/" && c[N - 1] === "/") { + f = "comment-inline", _ = N - 1; + continue; + } + continue; + case "single-quotes": + if (x === "'" && c[N - 1] !== "\\" && (f = F, F = "initial"), x === ` +` || x === "\r") + return c; + continue; + case "double-quotes": + if (x === '"' && c[N - 1] !== "\\" && (f = F, F = "initial"), x === ` +` || x === "\r") + return c; + continue; + case "url": + if (x === ")" && (f = "initial"), x === ` +` || x === "\r") + return c; + if (x === "'") { + f = "single-quotes", F = "url"; + continue; + } + if (x === '"') { + f = "double-quotes", F = "url"; + continue; + } + continue; + case "comment-block": + x === "/" && c[N - 1] === "*" && (f = "initial"); + continue; + case "comment-inline": + (x === '"' || x === "'" || x === "*") && (w = true), (x === ` +` || x === "\r") && (w && E.push([_, N]), f = "initial", w = false); + continue; + } + } + for (let [N, x] of E) + c = c.slice(0, N) + c.slice(N, x).replace(/["'*]/g, " ") + c.slice(x); + return c; + } + function h(c) { + return c.source.startOffset; + } + function g(c) { + return c.source.endOffset; + } + r.exports = { locStart: h, locEnd: g, calculateLoc: i, replaceQuotesInInlineComments: y }; + } }), Ld = te({ "src/language-css/utils/is-less-parser.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return s.parser === "css" || s.parser === "less"; + } + r.exports = t2; + } }), Od = te({ "src/language-css/utils/is-scss.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + return s === "less" || s === "scss" ? s === "scss" : /(?:\w\s*:\s*[^:}]+|#){|@import[^\n]+(?:url|,)/.test(a); + } + r.exports = t2; + } }), jd = te({ "src/language-css/utils/css-units.evaluate.js"(e, r) { + r.exports = { em: "em", rem: "rem", ex: "ex", rex: "rex", cap: "cap", rcap: "rcap", ch: "ch", rch: "rch", ic: "ic", ric: "ric", lh: "lh", rlh: "rlh", vw: "vw", svw: "svw", lvw: "lvw", dvw: "dvw", vh: "vh", svh: "svh", lvh: "lvh", dvh: "dvh", vi: "vi", svi: "svi", lvi: "lvi", dvi: "dvi", vb: "vb", svb: "svb", lvb: "lvb", dvb: "dvb", vmin: "vmin", svmin: "svmin", lvmin: "lvmin", dvmin: "dvmin", vmax: "vmax", svmax: "svmax", lvmax: "lvmax", dvmax: "dvmax", cm: "cm", mm: "mm", q: "Q", in: "in", pt: "pt", pc: "pc", px: "px", deg: "deg", grad: "grad", rad: "rad", turn: "turn", s: "s", ms: "ms", hz: "Hz", khz: "kHz", dpi: "dpi", dpcm: "dpcm", dppx: "dppx", x: "x" }; + } }), qd = te({ "src/language-css/utils/print-unit.js"(e, r) { + "use strict"; + ne(); + var t2 = jd(); + function s(a) { + let n = a.toLowerCase(); + return Object.prototype.hasOwnProperty.call(t2, n) ? t2[n] : a; + } + r.exports = s; + } }), Md = te({ "src/language-css/printer-postcss.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { printNumber: s, printString: a, hasNewline: n, isFrontMatterNode: u, isNextLineEmpty: i, isNonEmptyArray: l } = Ue(), { builders: { join: p2, line: y, hardline: h, softline: g, group: c, fill: f, indent: F, dedent: _, ifBreak: w, breakParent: E }, utils: { removeLines: N, getDocParts: x } } = qe(), I = Nd(), P = wd(), { insertPragma: $ } = _d(), { getAncestorNode: D, getPropOfDeclNode: T, maybeToLowerCase: m, insideValueFunctionNode: C, insideICSSRuleNode: o, insideAtRuleNode: d, insideURLFunctionInImportAtRuleNode: v, isKeyframeAtRuleKeywords: S, isWideKeywords: b, isLastNode: B, isSCSSControlDirectiveNode: k, isDetachedRulesetDeclarationNode: M, isRelationalOperatorNode: R, isEqualityOperatorNode: q, isMultiplicationNode: J, isDivisionNode: L, isAdditionNode: Q, isSubtractionNode: V, isMathOperatorNode: j, isEachKeywordNode: Y, isForKeywordNode: ie, isURLFunctionNode: ee, isIfElseKeywordNode: ce, hasComposesNode: W, hasParensAroundNode: K, hasEmptyRawBefore: de, isKeyValuePairNode: ue, isKeyInValuePairNode: Fe, isDetachedRulesetCallNode: z, isTemplatePlaceholderNode: U, isTemplatePropNode: Z, isPostcssSimpleVarNode: se, isSCSSMapItemNode: fe, isInlineValueCommentNode: ge, isHashNode: he, isLeftCurlyBraceNode: we, isRightCurlyBraceNode: ke, isWordNode: Re, isColonNode: Ne, isMediaAndSupportsKeywords: Pe, isColorAdjusterFuncNode: oe, lastLineHasInlineComment: H, isAtWordPlaceholderNode: pe, isConfigurationNode: X, isParenGroupNode: le } = Pd(), { locStart: Ae, locEnd: Ee } = kd(), De = Ld(), A = Od(), G = qd(); + function re(Te) { + return Te.trailingComma === "es5" || Te.trailingComma === "all"; + } + function ye(Te, je, Me) { + let ae = Te.getValue(); + if (!ae) + return ""; + if (typeof ae == "string") + return ae; + switch (ae.type) { + case "front-matter": + return [ae.raw, h]; + case "css-root": { + let Ve = Ce(Te, je, Me), We = ae.raws.after.trim(); + return We.startsWith(";") && (We = We.slice(1).trim()), [Ve, We ? ` ${We}` : "", x(Ve).length > 0 ? h : ""]; + } + case "css-comment": { + let Ve = ae.inline || ae.raws.inline, We = je.originalText.slice(Ae(ae), Ee(ae)); + return Ve ? We.trimEnd() : We; + } + case "css-rule": + return [Me("selector"), ae.important ? " !important" : "", ae.nodes ? [ae.selector && ae.selector.type === "selector-unknown" && H(ae.selector.value) ? y : " ", "{", ae.nodes.length > 0 ? F([h, Ce(Te, je, Me)]) : "", h, "}", M(ae) ? ";" : ""] : ";"]; + case "css-decl": { + let Ve = Te.getParentNode(), { between: We } = ae.raws, Xe = We.trim(), st = Xe === ":", O = W(ae) ? N(Me("value")) : Me("value"); + return !st && H(Xe) && (O = F([h, _(O)])), [ae.raws.before.replace(/[\s;]/g, ""), Ve.type === "css-atrule" && Ve.variable || o(Te) ? ae.prop : m(ae.prop), Xe.startsWith("//") ? " " : "", Xe, ae.extend ? "" : " ", De(je) && ae.extend && ae.selector ? ["extend(", Me("selector"), ")"] : "", O, ae.raws.important ? ae.raws.important.replace(/\s*!\s*important/i, " !important") : ae.important ? " !important" : "", ae.raws.scssDefault ? ae.raws.scssDefault.replace(/\s*!default/i, " !default") : ae.scssDefault ? " !default" : "", ae.raws.scssGlobal ? ae.raws.scssGlobal.replace(/\s*!global/i, " !global") : ae.scssGlobal ? " !global" : "", ae.nodes ? [" {", F([g, Ce(Te, je, Me)]), g, "}"] : Z(ae) && !Ve.raws.semicolon && je.originalText[Ee(ae) - 1] !== ";" ? "" : je.__isHTMLStyleAttribute && B(Te, ae) ? w(";") : ";"]; + } + case "css-atrule": { + let Ve = Te.getParentNode(), We = U(ae) && !Ve.raws.semicolon && je.originalText[Ee(ae) - 1] !== ";"; + if (De(je)) { + if (ae.mixin) + return [Me("selector"), ae.important ? " !important" : "", We ? "" : ";"]; + if (ae.function) + return [ae.name, Me("params"), We ? "" : ";"]; + if (ae.variable) + return ["@", ae.name, ": ", ae.value ? Me("value") : "", ae.raws.between.trim() ? ae.raws.between.trim() + " " : "", ae.nodes ? ["{", F([ae.nodes.length > 0 ? g : "", Ce(Te, je, Me)]), g, "}"] : "", We ? "" : ";"]; + } + return ["@", z(ae) || ae.name.endsWith(":") ? ae.name : m(ae.name), ae.params ? [z(ae) ? "" : U(ae) ? ae.raws.afterName === "" ? "" : ae.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(ae.raws.afterName) ? [h, h] : /^\s*\n/.test(ae.raws.afterName) ? h : " " : " ", Me("params")] : "", ae.selector ? F([" ", Me("selector")]) : "", ae.value ? c([" ", Me("value"), k(ae) ? K(ae) ? " " : y : ""]) : ae.name === "else" ? " " : "", ae.nodes ? [k(ae) ? "" : ae.selector && !ae.selector.nodes && typeof ae.selector.value == "string" && H(ae.selector.value) || !ae.selector && typeof ae.params == "string" && H(ae.params) ? y : " ", "{", F([ae.nodes.length > 0 ? g : "", Ce(Te, je, Me)]), g, "}"] : We ? "" : ";"]; + } + case "media-query-list": { + let Ve = []; + return Te.each((We) => { + let Xe = We.getValue(); + Xe.type === "media-query" && Xe.value === "" || Ve.push(Me()); + }, "nodes"), c(F(p2(y, Ve))); + } + case "media-query": + return [p2(" ", Te.map(Me, "nodes")), B(Te, ae) ? "" : ","]; + case "media-type": + return Oe(Se(ae.value, je)); + case "media-feature-expression": + return ae.nodes ? ["(", ...Te.map(Me, "nodes"), ")"] : ae.value; + case "media-feature": + return m(Se(ae.value.replace(/ +/g, " "), je)); + case "media-colon": + return [ae.value, " "]; + case "media-value": + return Oe(Se(ae.value, je)); + case "media-keyword": + return Se(ae.value, je); + case "media-url": + return Se(ae.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/g, ")"), je); + case "media-unknown": + return ae.value; + case "selector-root": + return c([d(Te, "custom-selector") ? [D(Te, "css-atrule").customSelector, y] : "", p2([",", d(Te, ["extend", "custom-selector", "nest"]) ? y : h], Te.map(Me, "nodes"))]); + case "selector-selector": + return c(F(Te.map(Me, "nodes"))); + case "selector-comment": + return ae.value; + case "selector-string": + return Se(ae.value, je); + case "selector-tag": { + let Ve = Te.getParentNode(), We = Ve && Ve.nodes.indexOf(ae), Xe = We && Ve.nodes[We - 1]; + return [ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", Xe.type === "selector-nesting" ? ae.value : Oe(S(Te, ae.value) ? ae.value.toLowerCase() : ae.value)]; + } + case "selector-id": + return ["#", ae.value]; + case "selector-class": + return [".", Oe(Se(ae.value, je))]; + case "selector-attribute": { + var nt; + return ["[", ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", ae.attribute.trim(), (nt = ae.operator) !== null && nt !== void 0 ? nt : "", ae.value ? Ie(Se(ae.value.trim(), je), je) : "", ae.insensitive ? " i" : "", "]"]; + } + case "selector-combinator": { + if (ae.value === "+" || ae.value === ">" || ae.value === "~" || ae.value === ">>>") { + let Xe = Te.getParentNode(); + return [Xe.type === "selector-selector" && Xe.nodes[0] === ae ? "" : y, ae.value, B(Te, ae) ? "" : " "]; + } + let Ve = ae.value.trim().startsWith("(") ? y : "", We = Oe(Se(ae.value.trim(), je)) || y; + return [Ve, We]; + } + case "selector-universal": + return [ae.namespace ? [ae.namespace === true ? "" : ae.namespace.trim(), "|"] : "", ae.value]; + case "selector-pseudo": + return [m(ae.value), l(ae.nodes) ? c(["(", F([g, p2([",", y], Te.map(Me, "nodes"))]), g, ")"]) : ""]; + case "selector-nesting": + return ae.value; + case "selector-unknown": { + let Ve = D(Te, "css-rule"); + if (Ve && Ve.isSCSSNesterProperty) + return Oe(Se(m(ae.value), je)); + let We = Te.getParentNode(); + if (We.raws && We.raws.selector) { + let st = Ae(We), O = st + We.raws.selector.length; + return je.originalText.slice(st, O).trim(); + } + let Xe = Te.getParentNode(1); + if (We.type === "value-paren_group" && Xe && Xe.type === "value-func" && Xe.value === "selector") { + let st = Ee(We.open) + 1, O = Ae(We.close), me = je.originalText.slice(st, O).trim(); + return H(me) ? [E, me] : me; + } + return ae.value; + } + case "value-value": + case "value-root": + return Me("group"); + case "value-comment": + return je.originalText.slice(Ae(ae), Ee(ae)); + case "value-comma_group": { + let Ve = Te.getParentNode(), We = Te.getParentNode(1), Xe = T(Te), st = Xe && Ve.type === "value-value" && (Xe === "grid" || Xe.startsWith("grid-template")), O = D(Te, "css-atrule"), me = O && k(O), _e = ae.groups.some((at) => ge(at)), He = Te.map(Me, "groups"), Ge = [], it = C(Te, "url"), Qe = false, rt = false; + for (let at = 0; at < ae.groups.length; ++at) { + var tt; + Ge.push(He[at]); + let Ze = ae.groups[at - 1], Le = ae.groups[at], $e = ae.groups[at + 1], sr = ae.groups[at + 2]; + if (it) { + ($e && Q($e) || Q(Le)) && Ge.push(" "); + continue; + } + if (d(Te, "forward") && Le.type === "value-word" && Le.value && Ze !== void 0 && Ze.type === "value-word" && Ze.value === "as" && $e.type === "value-operator" && $e.value === "*" || !$e || Le.type === "value-word" && Le.value.endsWith("-") && pe($e)) + continue; + if (Le.type === "value-string" && Le.quoted) { + let $r = Le.value.lastIndexOf("#{"), Vr = Le.value.lastIndexOf("}"); + $r !== -1 && Vr !== -1 ? Qe = $r > Vr : $r !== -1 ? Qe = true : Vr !== -1 && (Qe = false); + } + if (Qe || Ne(Le) || Ne($e) || Le.type === "value-atword" && (Le.value === "" || Le.value.endsWith("[")) || $e.type === "value-word" && $e.value.startsWith("]") || Le.value === "~" || Le.value && Le.value.includes("\\") && $e && $e.type !== "value-comment" || Ze && Ze.value && Ze.value.indexOf("\\") === Ze.value.length - 1 && Le.type === "value-operator" && Le.value === "/" || Le.value === "\\" || se(Le, $e) || he(Le) || we(Le) || ke($e) || we($e) && de($e) || ke(Le) && de($e) || Le.value === "--" && he($e)) + continue; + let Rr = j(Le), ou = j($e); + if ((Rr && he($e) || ou && ke(Le)) && de($e) || !Ze && L(Le) || C(Te, "calc") && (Q(Le) || Q($e) || V(Le) || V($e)) && de($e)) + continue; + let qo = (Q(Le) || V(Le)) && at === 0 && ($e.type === "value-number" || $e.isHex) && We && oe(We) && !de($e), lu = sr && sr.type === "value-func" || sr && Re(sr) || Le.type === "value-func" || Re(Le), cu = $e.type === "value-func" || Re($e) || Ze && Ze.type === "value-func" || Ze && Re(Ze); + if (!(!(J($e) || J(Le)) && !C(Te, "calc") && !qo && (L($e) && !lu || L(Le) && !cu || Q($e) && !lu || Q(Le) && !cu || V($e) || V(Le)) && (de($e) || Rr && (!Ze || Ze && j(Ze)))) && !((je.parser === "scss" || je.parser === "less") && Rr && Le.value === "-" && le($e) && Ee(Le) === Ae($e.open) && $e.open.value === "(")) { + if (ge(Le)) { + if (Ve.type === "value-paren_group") { + Ge.push(_(h)); + continue; + } + Ge.push(h); + continue; + } + if (me && (q($e) || R($e) || ce($e) || Y(Le) || ie(Le))) { + Ge.push(" "); + continue; + } + if (O && O.name.toLowerCase() === "namespace") { + Ge.push(" "); + continue; + } + if (st) { + Le.source && $e.source && Le.source.start.line !== $e.source.start.line ? (Ge.push(h), rt = true) : Ge.push(" "); + continue; + } + if (ou) { + Ge.push(" "); + continue; + } + if (!($e && $e.value === "...") && !(pe(Le) && pe($e) && Ee(Le) === Ae($e))) { + if (pe(Le) && le($e) && Ee(Le) === Ae($e.open)) { + Ge.push(g); + continue; + } + if (Le.value === "with" && le($e)) { + Ge.push(" "); + continue; + } + (tt = Le.value) !== null && tt !== void 0 && tt.endsWith("#") && $e.value === "{" && le($e.group) || Ge.push(y); + } + } + } + return _e && Ge.push(E), rt && Ge.unshift(h), me ? c(F(Ge)) : v(Te) ? c(f(Ge)) : c(F(f(Ge))); + } + case "value-paren_group": { + let Ve = Te.getParentNode(); + if (Ve && ee(Ve) && (ae.groups.length === 1 || ae.groups.length > 0 && ae.groups[0].type === "value-comma_group" && ae.groups[0].groups.length > 0 && ae.groups[0].groups[0].type === "value-word" && ae.groups[0].groups[0].value.startsWith("data:"))) + return [ae.open ? Me("open") : "", p2(",", Te.map(Me, "groups")), ae.close ? Me("close") : ""]; + if (!ae.open) { + let it = Te.map(Me, "groups"), Qe = []; + for (let rt = 0; rt < it.length; rt++) + rt !== 0 && Qe.push([",", y]), Qe.push(it[rt]); + return c(F(f(Qe))); + } + let We = fe(Te), Xe = t2(ae.groups), st = Xe && Xe.type === "value-comment", O = Fe(ae, Ve), me = X(ae, Ve), _e = me || We && !O, He = me || O, Ge = c([ae.open ? Me("open") : "", F([g, p2([y], Te.map((it, Qe) => { + let rt = it.getValue(), at = Qe === ae.groups.length - 1, Ze = [Me(), at ? "" : ","]; + if (ue(rt) && rt.type === "value-comma_group" && rt.groups && rt.groups[0].type !== "value-paren_group" && rt.groups[2] && rt.groups[2].type === "value-paren_group") { + let Le = x(Ze[0].contents.contents); + Le[1] = c(Le[1]), Ze = [c(_(Ze))]; + } + if (!at && rt.type === "value-comma_group" && l(rt.groups)) { + let Le = t2(rt.groups); + !Le.source && Le.close && (Le = Le.close), Le.source && i(je.originalText, Le, Ee) && Ze.push(h); + } + return Ze; + }, "groups"))]), w(!st && A(je.parser, je.originalText) && We && re(je) ? "," : ""), g, ae.close ? Me("close") : ""], { shouldBreak: _e }); + return He ? _(Ge) : Ge; + } + case "value-func": + return [ae.value, d(Te, "supports") && Pe(ae) ? " " : "", Me("group")]; + case "value-paren": + return ae.value; + case "value-number": + return [Je(ae.value), G(ae.unit)]; + case "value-operator": + return ae.value; + case "value-word": + return ae.isColor && ae.isHex || b(ae.value) ? ae.value.toLowerCase() : ae.value; + case "value-colon": { + let Ve = Te.getParentNode(), We = Ve && Ve.groups.indexOf(ae), Xe = We && Ve.groups[We - 1]; + return [ae.value, Xe && typeof Xe.value == "string" && t2(Xe.value) === "\\" || C(Te, "url") ? "" : y]; + } + case "value-comma": + return [ae.value, " "]; + case "value-string": + return a(ae.raws.quote + ae.value + ae.raws.quote, je); + case "value-atword": + return ["@", ae.value]; + case "value-unicode-range": + return ae.value; + case "value-unknown": + return ae.value; + default: + throw new Error(`Unknown postcss type ${JSON.stringify(ae.type)}`); + } + } + function Ce(Te, je, Me) { + let ae = []; + return Te.each((nt, tt, Ve) => { + let We = Ve[tt - 1]; + if (We && We.type === "css-comment" && We.text.trim() === "prettier-ignore") { + let Xe = nt.getValue(); + ae.push(je.originalText.slice(Ae(Xe), Ee(Xe))); + } else + ae.push(Me()); + tt !== Ve.length - 1 && (Ve[tt + 1].type === "css-comment" && !n(je.originalText, Ae(Ve[tt + 1]), { backwards: true }) && !u(Ve[tt]) || Ve[tt + 1].type === "css-atrule" && Ve[tt + 1].name === "else" && Ve[tt].type !== "css-comment" ? ae.push(" ") : (ae.push(je.__isHTMLStyleAttribute ? y : h), i(je.originalText, nt.getValue(), Ee) && !u(Ve[tt]) && ae.push(h))); + }, "nodes"), ae; + } + var Be = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gs, ve = /(?:\d*\.\d+|\d+\.?)(?:[Ee][+-]?\d+)?/g, ze = /[A-Za-z]+/g, be = /[$@]?[A-Z_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/g, Ye = new RegExp(Be.source + `|(${be.source})?(${ve.source})(${ze.source})?`, "g"); + function Se(Te, je) { + return Te.replace(Be, (Me) => a(Me, je)); + } + function Ie(Te, je) { + let Me = je.singleQuote ? "'" : '"'; + return Te.includes('"') || Te.includes("'") ? Te : Me + Te + Me; + } + function Oe(Te) { + return Te.replace(Ye, (je, Me, ae, nt, tt) => !ae && nt ? Je(nt) + m(tt || "") : je); + } + function Je(Te) { + return s(Te).replace(/\.0(?=$|e)/, ""); + } + r.exports = { print: ye, embed: P, insertPragma: $, massageAstNode: I }; + } }), Rd = te({ "src/language-css/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { singleQuote: t2.singleQuote }; + } }), $d = te({ "src/language-css/parsers.js"() { + ne(); + } }), Vd = te({ "node_modules/linguist-languages/data/CSS.json"(e, r) { + r.exports = { name: "CSS", type: "markup", tmScope: "source.css", aceMode: "css", codemirrorMode: "css", codemirrorMimeType: "text/css", color: "#563d7c", extensions: [".css"], languageId: 50 }; + } }), Wd = te({ "node_modules/linguist-languages/data/PostCSS.json"(e, r) { + r.exports = { name: "PostCSS", type: "markup", color: "#dc3a0c", tmScope: "source.postcss", group: "CSS", extensions: [".pcss", ".postcss"], aceMode: "text", languageId: 262764437 }; + } }), Hd = te({ "node_modules/linguist-languages/data/Less.json"(e, r) { + r.exports = { name: "Less", type: "markup", color: "#1d365d", aliases: ["less-css"], extensions: [".less"], tmScope: "source.css.less", aceMode: "less", codemirrorMode: "css", codemirrorMimeType: "text/css", languageId: 198 }; + } }), Gd = te({ "node_modules/linguist-languages/data/SCSS.json"(e, r) { + r.exports = { name: "SCSS", type: "markup", color: "#c6538c", tmScope: "source.css.scss", aceMode: "scss", codemirrorMode: "css", codemirrorMimeType: "text/x-scss", extensions: [".scss"], languageId: 329 }; + } }), Ud = te({ "src/language-css/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Md(), a = Rd(), n = $d(), u = [t2(Vd(), (l) => ({ since: "1.4.0", parsers: ["css"], vscodeLanguageIds: ["css"], extensions: [...l.extensions, ".wxss"] })), t2(Wd(), () => ({ since: "1.4.0", parsers: ["css"], vscodeLanguageIds: ["postcss"] })), t2(Hd(), () => ({ since: "1.4.0", parsers: ["less"], vscodeLanguageIds: ["less"] })), t2(Gd(), () => ({ since: "1.4.0", parsers: ["scss"], vscodeLanguageIds: ["scss"] }))], i = { postcss: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), Jd = te({ "src/language-handlebars/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.loc.start.offset; + } + function s(a) { + return a.loc.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), zd = te({ "src/language-handlebars/clean.js"(e, r) { + "use strict"; + ne(); + function t2(s, a) { + if (s.type === "TextNode") { + let n = s.chars.trim(); + if (!n) + return null; + a.chars = n.replace(/[\t\n\f\r ]+/g, " "); + } + s.type === "AttrNode" && s.name.toLowerCase() === "class" && delete a.value; + } + t2.ignoredProperties = /* @__PURE__ */ new Set(["loc", "selfClosing"]), r.exports = t2; + } }), Xd = te({ "src/language-handlebars/html-void-elements.evaluate.js"(e, r) { + r.exports = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; + } }), Kd = te({ "src/language-handlebars/utils.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), s = Xd(); + function a(x) { + let I = x.getValue(), P = x.getParentNode(0); + return !!(g(x, ["ElementNode"]) && t2(P.children) === I || g(x, ["Block"]) && t2(P.body) === I); + } + function n(x) { + return x.toUpperCase() === x; + } + function u(x) { + return h(x, ["ElementNode"]) && typeof x.tag == "string" && !x.tag.startsWith(":") && (n(x.tag[0]) || x.tag.includes(".")); + } + var i = new Set(s); + function l(x) { + return i.has(x.toLowerCase()) && !n(x[0]); + } + function p2(x) { + return x.selfClosing === true || l(x.tag) || u(x) && x.children.every((I) => y(I)); + } + function y(x) { + return h(x, ["TextNode"]) && !/\S/.test(x.chars); + } + function h(x, I) { + return x && I.includes(x.type); + } + function g(x, I) { + let P = x.getParentNode(0); + return h(P, I); + } + function c(x, I) { + let P = _(x); + return h(P, I); + } + function f(x, I) { + let P = w(x); + return h(P, I); + } + function F(x, I) { + var P, $, D, T; + let m = x.getValue(), C = (P = x.getParentNode(0)) !== null && P !== void 0 ? P : {}, o = ($ = (D = (T = C.children) !== null && T !== void 0 ? T : C.body) !== null && D !== void 0 ? D : C.parts) !== null && $ !== void 0 ? $ : [], d = o.indexOf(m); + return d !== -1 && o[d + I]; + } + function _(x) { + let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; + return F(x, -I); + } + function w(x) { + return F(x, 1); + } + function E(x) { + return h(x, ["MustacheCommentStatement"]) && typeof x.value == "string" && x.value.trim() === "prettier-ignore"; + } + function N(x) { + let I = x.getValue(), P = _(x, 2); + return E(I) || E(P); + } + r.exports = { getNextNode: w, getPreviousNode: _, hasPrettierIgnore: N, isLastNodeOfSiblings: a, isNextNodeOfSomeType: f, isNodeOfSomeType: h, isParentOfSomeType: g, isPreviousNodeOfSomeType: c, isVoid: p2, isWhitespaceNode: y }; + } }), Yd = te({ "src/language-handlebars/printer-glimmer.js"(e, r) { + "use strict"; + ne(); + var { builders: { dedent: t2, fill: s, group: a, hardline: n, ifBreak: u, indent: i, join: l, line: p2, softline: y }, utils: { getDocParts: h, replaceTextEndOfLine: g } } = qe(), { getPreferredQuote: c, isNonEmptyArray: f } = Ue(), { locStart: F, locEnd: _ } = Jd(), w = zd(), { getNextNode: E, getPreviousNode: N, hasPrettierIgnore: x, isLastNodeOfSiblings: I, isNextNodeOfSomeType: P, isNodeOfSomeType: $, isParentOfSomeType: D, isPreviousNodeOfSomeType: T, isVoid: m, isWhitespaceNode: C } = Kd(), o = 2; + function d(H, pe, X) { + let le = H.getValue(); + if (!le) + return ""; + if (x(H)) + return pe.originalText.slice(F(le), _(le)); + let Ae = pe.singleQuote ? "'" : '"'; + switch (le.type) { + case "Block": + case "Program": + case "Template": + return a(H.map(X, "body")); + case "ElementNode": { + let Ee = a(S(H, X)), De = pe.htmlWhitespaceSensitivity === "ignore" && P(H, ["ElementNode"]) ? y : ""; + if (m(le)) + return [Ee, De]; + let A = [""]; + return le.children.length === 0 ? [Ee, i(A), De] : pe.htmlWhitespaceSensitivity === "ignore" ? [Ee, i(b(H, pe, X)), n, i(A), De] : [Ee, i(a(b(H, pe, X))), i(A), De]; + } + case "BlockStatement": { + let Ee = H.getParentNode(1); + return Ee && Ee.inverse && Ee.inverse.body.length === 1 && Ee.inverse.body[0] === le && Ee.inverse.body[0].path.parts[0] === Ee.path.parts[0] ? [ie(H, X, Ee.inverse.body[0].path.parts[0]), de(H, X, pe), ue(H, X, pe)] : [j(H, X), a([de(H, X, pe), ue(H, X, pe), ee(H, X, pe)])]; + } + case "ElementModifierStatement": + return a(["{{", Re(H, X), "}}"]); + case "MustacheStatement": + return a([k(le), Re(H, X), M(le)]); + case "SubExpression": + return a(["(", ke(H, X), y, ")"]); + case "AttrNode": { + let Ee = le.value.type === "TextNode"; + if (Ee && le.value.chars === "" && F(le.value) === _(le.value)) + return le.name; + let A = Ee ? c(le.value.chars, Ae).quote : le.value.type === "ConcatStatement" ? c(le.value.parts.filter((re) => re.type === "TextNode").map((re) => re.chars).join(""), Ae).quote : "", G = X("value"); + return [le.name, "=", A, le.name === "class" && A ? a(i(G)) : G, A]; + } + case "ConcatStatement": + return H.map(X, "parts"); + case "Hash": + return l(p2, H.map(X, "pairs")); + case "HashPair": + return [le.key, "=", X("value")]; + case "TextNode": { + let Ee = le.chars.replace(/{{/g, "\\{{"), De = U(H); + if (De) { + if (De === "class") { + let Ye = Ee.trim().split(/\s+/).join(" "), Se = false, Ie = false; + return D(H, ["ConcatStatement"]) && (T(H, ["MustacheStatement"]) && /^\s/.test(Ee) && (Se = true), P(H, ["MustacheStatement"]) && /\s$/.test(Ee) && Ye !== "" && (Ie = true)), [Se ? p2 : "", Ye, Ie ? p2 : ""]; + } + return g(Ee); + } + let G = /^[\t\n\f\r ]*$/.test(Ee), re = !N(H), ye = !E(H); + if (pe.htmlWhitespaceSensitivity !== "ignore") { + let Ye = /^[\t\n\f\r ]*/, Se = /[\t\n\f\r ]*$/, Ie = ye && D(H, ["Template"]), Oe = re && D(H, ["Template"]); + if (G) { + if (Oe || Ie) + return ""; + let ae = [p2], nt = Z(Ee); + return nt && (ae = ge(nt)), I(H) && (ae = ae.map((tt) => t2(tt))), ae; + } + let [Je] = Ee.match(Ye), [Te] = Ee.match(Se), je = []; + if (Je) { + je = [p2]; + let ae = Z(Je); + ae && (je = ge(ae)), Ee = Ee.replace(Ye, ""); + } + let Me = []; + if (Te) { + if (!Ie) { + Me = [p2]; + let ae = Z(Te); + ae && (Me = ge(ae)), I(H) && (Me = Me.map((nt) => t2(nt))); + } + Ee = Ee.replace(Se, ""); + } + return [...je, s(Fe(Ee)), ...Me]; + } + let Ce = Z(Ee), Be = se(Ee), ve = fe(Ee); + if ((re || ye) && G && D(H, ["Block", "ElementNode", "Template"])) + return ""; + G && Ce ? (Be = Math.min(Ce, o), ve = 0) : (P(H, ["BlockStatement", "ElementNode"]) && (ve = Math.max(ve, 1)), T(H, ["BlockStatement", "ElementNode"]) && (Be = Math.max(Be, 1))); + let ze = "", be = ""; + return ve === 0 && P(H, ["MustacheStatement"]) && (be = " "), Be === 0 && T(H, ["MustacheStatement"]) && (ze = " "), re && (Be = 0, ze = ""), ye && (ve = 0, be = ""), Ee = Ee.replace(/^[\t\n\f\r ]+/g, ze).replace(/[\t\n\f\r ]+$/, be), [...ge(Be), s(Fe(Ee)), ...ge(ve)]; + } + case "MustacheCommentStatement": { + let Ee = F(le), De = _(le), A = pe.originalText.charAt(Ee + 2) === "~", G = pe.originalText.charAt(De - 3) === "~", re = le.value.includes("}}") ? "--" : ""; + return ["{{", A ? "~" : "", "!", re, le.value, re, G ? "~" : "", "}}"]; + } + case "PathExpression": + return le.original; + case "BooleanLiteral": + return String(le.value); + case "CommentStatement": + return [""]; + case "StringLiteral": { + if (we(H)) { + let Ee = pe.singleQuote ? '"' : "'"; + return he(le.value, Ee); + } + return he(le.value, Ae); + } + case "NumberLiteral": + return String(le.value); + case "UndefinedLiteral": + return "undefined"; + case "NullLiteral": + return "null"; + default: + throw new Error("unknown glimmer type: " + JSON.stringify(le.type)); + } + } + function v(H, pe) { + return F(H) - F(pe); + } + function S(H, pe) { + let X = H.getValue(), le = ["attributes", "modifiers", "comments"].filter((Ee) => f(X[Ee])), Ae = le.flatMap((Ee) => X[Ee]).sort(v); + for (let Ee of le) + H.each((De) => { + let A = Ae.indexOf(De.getValue()); + Ae.splice(A, 1, [p2, pe()]); + }, Ee); + return f(X.blockParams) && Ae.push(p2, oe(X)), ["<", X.tag, i(Ae), B(X)]; + } + function b(H, pe, X) { + let Ae = H.getValue().children.every((Ee) => C(Ee)); + return pe.htmlWhitespaceSensitivity === "ignore" && Ae ? "" : H.map((Ee, De) => { + let A = X(); + return De === 0 && pe.htmlWhitespaceSensitivity === "ignore" ? [y, A] : A; + }, "children"); + } + function B(H) { + return m(H) ? u([y, "/>"], [" />", y]) : u([y, ">"], ">"); + } + function k(H) { + let pe = H.escaped === false ? "{{{" : "{{", X = H.strip && H.strip.open ? "~" : ""; + return [pe, X]; + } + function M(H) { + let pe = H.escaped === false ? "}}}" : "}}"; + return [H.strip && H.strip.close ? "~" : "", pe]; + } + function R(H) { + let pe = k(H), X = H.openStrip.open ? "~" : ""; + return [pe, X, "#"]; + } + function q(H) { + let pe = M(H); + return [H.openStrip.close ? "~" : "", pe]; + } + function J(H) { + let pe = k(H), X = H.closeStrip.open ? "~" : ""; + return [pe, X, "/"]; + } + function L(H) { + let pe = M(H); + return [H.closeStrip.close ? "~" : "", pe]; + } + function Q(H) { + let pe = k(H), X = H.inverseStrip.open ? "~" : ""; + return [pe, X]; + } + function V(H) { + let pe = M(H); + return [H.inverseStrip.close ? "~" : "", pe]; + } + function j(H, pe) { + let X = H.getValue(), le = [], Ae = Pe(H, pe); + return Ae && le.push(a(Ae)), f(X.program.blockParams) && le.push(oe(X.program)), a([R(X), Ne(H, pe), le.length > 0 ? i([p2, l(p2, le)]) : "", y, q(X)]); + } + function Y(H, pe) { + return [pe.htmlWhitespaceSensitivity === "ignore" ? n : "", Q(H), "else", V(H)]; + } + function ie(H, pe, X) { + let le = H.getValue(), Ae = H.getParentNode(1); + return a([Q(Ae), ["else", " ", X], i([p2, a(Pe(H, pe)), ...f(le.program.blockParams) ? [p2, oe(le.program)] : []]), y, V(Ae)]); + } + function ee(H, pe, X) { + let le = H.getValue(); + return X.htmlWhitespaceSensitivity === "ignore" ? [ce(le) ? y : n, J(le), pe("path"), L(le)] : [J(le), pe("path"), L(le)]; + } + function ce(H) { + return $(H, ["BlockStatement"]) && H.program.body.every((pe) => C(pe)); + } + function W(H) { + return K(H) && H.inverse.body.length === 1 && $(H.inverse.body[0], ["BlockStatement"]) && H.inverse.body[0].path.parts[0] === H.path.parts[0]; + } + function K(H) { + return $(H, ["BlockStatement"]) && H.inverse; + } + function de(H, pe, X) { + let le = H.getValue(); + if (ce(le)) + return ""; + let Ae = pe("program"); + return X.htmlWhitespaceSensitivity === "ignore" ? i([n, Ae]) : i(Ae); + } + function ue(H, pe, X) { + let le = H.getValue(), Ae = pe("inverse"), Ee = X.htmlWhitespaceSensitivity === "ignore" ? [n, Ae] : Ae; + return W(le) ? Ee : K(le) ? [Y(le, X), i(Ee)] : ""; + } + function Fe(H) { + return h(l(p2, z(H))); + } + function z(H) { + return H.split(/[\t\n\f\r ]+/); + } + function U(H) { + for (let pe = 0; pe < 2; pe++) { + let X = H.getParentNode(pe); + if (X && X.type === "AttrNode") + return X.name.toLowerCase(); + } + } + function Z(H) { + return H = typeof H == "string" ? H : "", H.split(` +`).length - 1; + } + function se(H) { + H = typeof H == "string" ? H : ""; + let pe = (H.match(/^([^\S\n\r]*[\n\r])+/g) || [])[0] || ""; + return Z(pe); + } + function fe(H) { + H = typeof H == "string" ? H : ""; + let pe = (H.match(/([\n\r][^\S\n\r]*)+$/g) || [])[0] || ""; + return Z(pe); + } + function ge() { + let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; + return Array.from({ length: Math.min(H, o) }).fill(n); + } + function he(H, pe) { + let { quote: X, regex: le } = c(H, pe); + return [X, H.replace(le, `\\${X}`), X]; + } + function we(H) { + let pe = 0, X = H.getParentNode(pe); + for (; X && $(X, ["SubExpression"]); ) + pe++, X = H.getParentNode(pe); + return !!(X && $(H.getParentNode(pe + 1), ["ConcatStatement"]) && $(H.getParentNode(pe + 2), ["AttrNode"])); + } + function ke(H, pe) { + let X = Ne(H, pe), le = Pe(H, pe); + return le ? i([X, p2, a(le)]) : X; + } + function Re(H, pe) { + let X = Ne(H, pe), le = Pe(H, pe); + return le ? [i([X, p2, le]), y] : X; + } + function Ne(H, pe) { + return pe("path"); + } + function Pe(H, pe) { + let X = H.getValue(), le = []; + if (X.params.length > 0) { + let Ae = H.map(pe, "params"); + le.push(...Ae); + } + if (X.hash && X.hash.pairs.length > 0) { + let Ae = pe("hash"); + le.push(Ae); + } + return le.length === 0 ? "" : l(p2, le); + } + function oe(H) { + return ["as |", H.blockParams.join(" "), "|"]; + } + r.exports = { print: d, massageAstNode: w }; + } }), Qd = te({ "src/language-handlebars/parsers.js"() { + ne(); + } }), Zd = te({ "node_modules/linguist-languages/data/Handlebars.json"(e, r) { + r.exports = { name: "Handlebars", type: "markup", color: "#f7931e", aliases: ["hbs", "htmlbars"], extensions: [".handlebars", ".hbs"], tmScope: "text.html.handlebars", aceMode: "handlebars", languageId: 155 }; + } }), eg = te({ "src/language-handlebars/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Yd(), a = Qd(), n = [t2(Zd(), () => ({ since: "2.3.0", parsers: ["glimmer"], vscodeLanguageIds: ["handlebars"] }))], u = { glimmer: s }; + r.exports = { languages: n, printers: u, parsers: a }; + } }), tg = te({ "src/language-graphql/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(a); + } + function s(a) { + return `# @format + +` + a; + } + r.exports = { hasPragma: t2, insertPragma: s }; + } }), rg = te({ "src/language-graphql/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return typeof a.start == "number" ? a.start : a.loc && a.loc.start; + } + function s(a) { + return typeof a.end == "number" ? a.end : a.loc && a.loc.end; + } + r.exports = { locStart: t2, locEnd: s }; + } }), ng = te({ "src/language-graphql/printer-graphql.js"(e, r) { + "use strict"; + ne(); + var { builders: { join: t2, hardline: s, line: a, softline: n, group: u, indent: i, ifBreak: l } } = qe(), { isNextLineEmpty: p2, isNonEmptyArray: y } = Ue(), { insertPragma: h } = tg(), { locStart: g, locEnd: c } = rg(); + function f(P, $, D) { + let T = P.getValue(); + if (!T) + return ""; + if (typeof T == "string") + return T; + switch (T.kind) { + case "Document": { + let m = []; + return P.each((C, o, d) => { + m.push(D()), o !== d.length - 1 && (m.push(s), p2($.originalText, C.getValue(), c) && m.push(s)); + }, "definitions"), [...m, s]; + } + case "OperationDefinition": { + let m = $.originalText[g(T)] !== "{", C = Boolean(T.name); + return [m ? T.operation : "", m && C ? [" ", D("name")] : "", m && !C && y(T.variableDefinitions) ? " " : "", y(T.variableDefinitions) ? u(["(", i([n, t2([l("", ", "), n], P.map(D, "variableDefinitions"))]), n, ")"]) : "", F(P, D, T), T.selectionSet ? !m && !C ? "" : " " : "", D("selectionSet")]; + } + case "FragmentDefinition": + return ["fragment ", D("name"), y(T.variableDefinitions) ? u(["(", i([n, t2([l("", ", "), n], P.map(D, "variableDefinitions"))]), n, ")"]) : "", " on ", D("typeCondition"), F(P, D, T), " ", D("selectionSet")]; + case "SelectionSet": + return ["{", i([s, t2(s, _(P, $, D, "selections"))]), s, "}"]; + case "Field": + return u([T.alias ? [D("alias"), ": "] : "", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", F(P, D, T), T.selectionSet ? " " : "", D("selectionSet")]); + case "Name": + return T.value; + case "StringValue": { + if (T.block) { + let m = T.value.replace(/"""/g, "\\$&").split(` +`); + return m.length === 1 && (m[0] = m[0].trim()), m.every((C) => C === "") && (m.length = 0), t2(s, ['"""', ...m, '"""']); + } + return ['"', T.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']; + } + case "IntValue": + case "FloatValue": + case "EnumValue": + return T.value; + case "BooleanValue": + return T.value ? "true" : "false"; + case "NullValue": + return "null"; + case "Variable": + return ["$", D("name")]; + case "ListValue": + return u(["[", i([n, t2([l("", ", "), n], P.map(D, "values"))]), n, "]"]); + case "ObjectValue": + return u(["{", $.bracketSpacing && T.fields.length > 0 ? " " : "", i([n, t2([l("", ", "), n], P.map(D, "fields"))]), n, l("", $.bracketSpacing && T.fields.length > 0 ? " " : ""), "}"]); + case "ObjectField": + case "Argument": + return [D("name"), ": ", D("value")]; + case "Directive": + return ["@", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : ""]; + case "NamedType": + return D("name"); + case "VariableDefinition": + return [D("variable"), ": ", D("type"), T.defaultValue ? [" = ", D("defaultValue")] : "", F(P, D, T)]; + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "ObjectTypeExtension" ? "extend " : "", "type ", D("name"), T.interfaces.length > 0 ? [" implements ", ...N(P, $, D)] : "", F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "FieldDefinition": + return [D("description"), T.description ? s : "", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", ": ", D("type"), F(P, D, T)]; + case "DirectiveDefinition": + return [D("description"), T.description ? s : "", "directive ", "@", D("name"), T.arguments.length > 0 ? u(["(", i([n, t2([l("", ", "), n], _(P, $, D, "arguments"))]), n, ")"]) : "", T.repeatable ? " repeatable" : "", " on ", t2(" | ", P.map(D, "locations"))]; + case "EnumTypeExtension": + case "EnumTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "EnumTypeExtension" ? "extend " : "", "enum ", D("name"), F(P, D, T), T.values.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "values"))]), s, "}"] : ""]; + case "EnumValueDefinition": + return [D("description"), T.description ? s : "", D("name"), F(P, D, T)]; + case "InputValueDefinition": + return [D("description"), T.description ? T.description.block ? s : a : "", D("name"), ": ", D("type"), T.defaultValue ? [" = ", D("defaultValue")] : "", F(P, D, T)]; + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", D("name"), F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "SchemaExtension": + return ["extend schema", F(P, D, T), ...T.operationTypes.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "operationTypes"))]), s, "}"] : []]; + case "SchemaDefinition": + return [D("description"), T.description ? s : "", "schema", F(P, D, T), " {", T.operationTypes.length > 0 ? i([s, t2(s, _(P, $, D, "operationTypes"))]) : "", s, "}"]; + case "OperationTypeDefinition": + return [D("operation"), ": ", D("type")]; + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", D("name"), T.interfaces.length > 0 ? [" implements ", ...N(P, $, D)] : "", F(P, D, T), T.fields.length > 0 ? [" {", i([s, t2(s, _(P, $, D, "fields"))]), s, "}"] : ""]; + case "FragmentSpread": + return ["...", D("name"), F(P, D, T)]; + case "InlineFragment": + return ["...", T.typeCondition ? [" on ", D("typeCondition")] : "", F(P, D, T), " ", D("selectionSet")]; + case "UnionTypeExtension": + case "UnionTypeDefinition": + return u([D("description"), T.description ? s : "", u([T.kind === "UnionTypeExtension" ? "extend " : "", "union ", D("name"), F(P, D, T), T.types.length > 0 ? [" =", l("", " "), i([l([a, " "]), t2([a, "| "], P.map(D, "types"))])] : ""])]); + case "ScalarTypeExtension": + case "ScalarTypeDefinition": + return [D("description"), T.description ? s : "", T.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", D("name"), F(P, D, T)]; + case "NonNullType": + return [D("type"), "!"]; + case "ListType": + return ["[", D("type"), "]"]; + default: + throw new Error("unknown graphql type: " + JSON.stringify(T.kind)); + } + } + function F(P, $, D) { + if (D.directives.length === 0) + return ""; + let T = t2(a, P.map($, "directives")); + return D.kind === "FragmentDefinition" || D.kind === "OperationDefinition" ? u([a, T]) : [" ", u(i([n, T]))]; + } + function _(P, $, D, T) { + return P.map((m, C, o) => { + let d = D(); + return C < o.length - 1 && p2($.originalText, m.getValue(), c) ? [d, s] : d; + }, T); + } + function w(P) { + return P.kind && P.kind !== "Comment"; + } + function E(P) { + let $ = P.getValue(); + if ($.kind === "Comment") + return "#" + $.value.trimEnd(); + throw new Error("Not a comment: " + JSON.stringify($)); + } + function N(P, $, D) { + let T = P.getNode(), m = [], { interfaces: C } = T, o = P.map((d) => D(d), "interfaces"); + for (let d = 0; d < C.length; d++) { + let v = C[d]; + m.push(o[d]); + let S = C[d + 1]; + if (S) { + let b = $.originalText.slice(v.loc.end, S.loc.start), B = b.includes("#"), k = b.replace(/#.*/g, "").trim(); + m.push(k === "," ? "," : " &", B ? a : " "); + } + } + return m; + } + function x(P, $) { + P.kind === "StringValue" && P.block && !P.value.includes(` +`) && ($.value = $.value.trim()); + } + x.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]); + function I(P) { + var $; + let D = P.getValue(); + return D == null || ($ = D.comments) === null || $ === void 0 ? void 0 : $.some((T) => T.value.trim() === "prettier-ignore"); + } + r.exports = { print: f, massageAstNode: x, hasPrettierIgnore: I, insertPragma: h, printComment: E, canAttachComment: w }; + } }), ug = te({ "src/language-graphql/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { bracketSpacing: t2.bracketSpacing }; + } }), sg = te({ "src/language-graphql/parsers.js"() { + ne(); + } }), ig = te({ "node_modules/linguist-languages/data/GraphQL.json"(e, r) { + r.exports = { name: "GraphQL", type: "data", color: "#e10098", extensions: [".graphql", ".gql", ".graphqls"], tmScope: "source.graphql", aceMode: "text", languageId: 139 }; + } }), ag = te({ "src/language-graphql/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = ng(), a = ug(), n = sg(), u = [t2(ig(), () => ({ since: "1.5.0", parsers: ["graphql"], vscodeLanguageIds: ["graphql"] }))], i = { graphql: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), Po = te({ "node_modules/collapse-white-space/index.js"(e, r) { + "use strict"; + ne(), r.exports = t2; + function t2(s) { + return String(s).replace(/\s+/g, " "); + } + } }), Io = te({ "src/language-markdown/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.position.start.offset; + } + function s(a) { + return a.position.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), og = te({ "src/language-markdown/constants.evaluate.js"(e, r) { + r.exports = { cjkPattern: "(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u2ff0-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?", kPattern: "[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]", punctuationPattern: "[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]" }; + } }), iu = te({ "src/language-markdown/utils.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2 } = Ue(), { locStart: s, locEnd: a } = Io(), { cjkPattern: n, kPattern: u, punctuationPattern: i } = og(), l = ["liquidNode", "inlineCode", "emphasis", "esComment", "strong", "delete", "wikiLink", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"], p2 = [...l, "tableCell", "paragraph", "heading"], y = new RegExp(u), h = new RegExp(i); + function g(E, N) { + let x = "non-cjk", I = "cj-letter", P = "k-letter", $ = "cjk-punctuation", D = [], T = (N.proseWrap === "preserve" ? E : E.replace(new RegExp(`(${n}) +(${n})`, "g"), "$1$2")).split(/([\t\n ]+)/); + for (let [C, o] of T.entries()) { + if (C % 2 === 1) { + D.push({ type: "whitespace", value: /\n/.test(o) ? ` +` : " " }); + continue; + } + if ((C === 0 || C === T.length - 1) && o === "") + continue; + let d = o.split(new RegExp(`(${n})`)); + for (let [v, S] of d.entries()) + if (!((v === 0 || v === d.length - 1) && S === "")) { + if (v % 2 === 0) { + S !== "" && m({ type: "word", value: S, kind: x, hasLeadingPunctuation: h.test(S[0]), hasTrailingPunctuation: h.test(t2(S)) }); + continue; + } + m(h.test(S) ? { type: "word", value: S, kind: $, hasLeadingPunctuation: true, hasTrailingPunctuation: true } : { type: "word", value: S, kind: y.test(S) ? P : I, hasLeadingPunctuation: false, hasTrailingPunctuation: false }); + } + } + return D; + function m(C) { + let o = t2(D); + o && o.type === "word" && (o.kind === x && C.kind === I && !o.hasTrailingPunctuation || o.kind === I && C.kind === x && !C.hasLeadingPunctuation ? D.push({ type: "whitespace", value: " " }) : !d(x, $) && ![o.value, C.value].some((v) => /\u3000/.test(v)) && D.push({ type: "whitespace", value: "" })), D.push(C); + function d(v, S) { + return o.kind === v && C.kind === S || o.kind === S && C.kind === v; + } + } + } + function c(E, N) { + let [, x, I, P] = N.slice(E.position.start.offset, E.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/); + return { numberText: x, marker: I, leadingSpaces: P }; + } + function f(E, N) { + if (!E.ordered || E.children.length < 2) + return false; + let x = Number(c(E.children[0], N.originalText).numberText), I = Number(c(E.children[1], N.originalText).numberText); + if (x === 0 && E.children.length > 2) { + let P = Number(c(E.children[2], N.originalText).numberText); + return I === 1 && P === 1; + } + return I === 1; + } + function F(E, N) { + let { value: x } = E; + return E.position.end.offset === N.length && x.endsWith(` +`) && N.endsWith(` +`) ? x.slice(0, -1) : x; + } + function _(E, N) { + return function x(I, P, $) { + let D = Object.assign({}, N(I, P, $)); + return D.children && (D.children = D.children.map((T, m) => x(T, m, [D, ...$]))), D; + }(E, null, []); + } + function w(E) { + if ((E == null ? void 0 : E.type) !== "link" || E.children.length !== 1) + return false; + let [N] = E.children; + return s(E) === s(N) && a(E) === a(N); + } + r.exports = { mapAst: _, splitText: g, punctuationPattern: i, getFencedCodeBlockValue: F, getOrderedListItemInfo: c, hasGitDiffFriendlyOrderedList: f, INLINE_NODE_TYPES: l, INLINE_NODE_WRAPPER_TYPES: p2, isAutolink: w }; + } }), lg = te({ "src/language-markdown/embed.js"(e, r) { + "use strict"; + ne(); + var { inferParserByLanguage: t2, getMaxContinuousCount: s } = Ue(), { builders: { hardline: a, markAsRoot: n }, utils: { replaceEndOfLine: u } } = qe(), i = su(), { getFencedCodeBlockValue: l } = iu(); + function p2(y, h, g, c) { + let f = y.getValue(); + if (f.type === "code" && f.lang !== null) { + let F = t2(f.lang, c); + if (F) { + let _ = c.__inJsTemplate ? "~" : "`", w = _.repeat(Math.max(3, s(f.value, _) + 1)), E = { parser: F }; + f.lang === "tsx" && (E.filepath = "dummy.tsx"); + let N = g(l(f, c.originalText), E, { stripTrailingHardline: true }); + return n([w, f.lang, f.meta ? " " + f.meta : "", a, u(N), a, w]); + } + } + switch (f.type) { + case "front-matter": + return i(f, g); + case "importExport": + return [g(f.value, { parser: "babel" }, { stripTrailingHardline: true }), a]; + case "jsx": + return g(`<$>${f.value}`, { parser: "__js_expression", rootMarker: "mdx" }, { stripTrailingHardline: true }); + } + return null; + } + r.exports = p2; + } }), ko = te({ "src/language-markdown/pragma.js"(e, r) { + "use strict"; + ne(); + var t2 = _o(), s = ["format", "prettier"]; + function a(n) { + let u = `@(${s.join("|")})`, i = new RegExp([``, `{\\s*\\/\\*\\s*${u}\\s*\\*\\/\\s*}`, ``].join("|"), "m"), l = n.match(i); + return (l == null ? void 0 : l.index) === 0; + } + r.exports = { startWithPragma: a, hasPragma: (n) => a(t2(n).content.trimStart()), insertPragma: (n) => { + let u = t2(n), i = ``; + return u.frontMatter ? `${u.frontMatter.raw} + +${i} + +${u.content}` : `${i} + +${u.content}`; + } }; + } }), cg = te({ "src/language-markdown/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var t2 = lt(), { getOrderedListItemInfo: s, mapAst: a, splitText: n } = iu(), u = /^.$/su; + function i(w, E) { + return w = y(w, E), w = c(w), w = p2(w, E), w = F(w, E), w = _(w, E), w = f(w, E), w = l(w), w = h(w), w; + } + function l(w) { + return a(w, (E) => E.type !== "import" && E.type !== "export" ? E : Object.assign(Object.assign({}, E), {}, { type: "importExport" })); + } + function p2(w, E) { + return a(w, (N) => N.type !== "inlineCode" || E.proseWrap === "preserve" ? N : Object.assign(Object.assign({}, N), {}, { value: N.value.replace(/\s+/g, " ") })); + } + function y(w, E) { + return a(w, (N) => N.type !== "text" || N.value === "*" || N.value === "_" || !u.test(N.value) || N.position.end.offset - N.position.start.offset === N.value.length ? N : Object.assign(Object.assign({}, N), {}, { value: E.originalText.slice(N.position.start.offset, N.position.end.offset) })); + } + function h(w) { + return g(w, (E, N) => E.type === "importExport" && N.type === "importExport", (E, N) => ({ type: "importExport", value: E.value + ` + +` + N.value, position: { start: E.position.start, end: N.position.end } })); + } + function g(w, E, N) { + return a(w, (x) => { + if (!x.children) + return x; + let I = x.children.reduce((P, $) => { + let D = t2(P); + return D && E(D, $) ? P.splice(-1, 1, N(D, $)) : P.push($), P; + }, []); + return Object.assign(Object.assign({}, x), {}, { children: I }); + }); + } + function c(w) { + return g(w, (E, N) => E.type === "text" && N.type === "text", (E, N) => ({ type: "text", value: E.value + N.value, position: { start: E.position.start, end: N.position.end } })); + } + function f(w, E) { + return a(w, (N, x, I) => { + let [P] = I; + if (N.type !== "text") + return N; + let { value: $ } = N; + return P.type === "paragraph" && (x === 0 && ($ = $.trimStart()), x === P.children.length - 1 && ($ = $.trimEnd())), { type: "sentence", position: N.position, children: n($, E) }; + }); + } + function F(w, E) { + return a(w, (N, x, I) => { + if (N.type === "code") { + let P = /^\n?(?: {4,}|\t)/.test(E.originalText.slice(N.position.start.offset, N.position.end.offset)); + if (N.isIndented = P, P) + for (let $ = 0; $ < I.length; $++) { + let D = I[$]; + if (D.hasIndentedCodeblock) + break; + D.type === "list" && (D.hasIndentedCodeblock = true); + } + } + return N; + }); + } + function _(w, E) { + return a(w, (I, P, $) => { + if (I.type === "list" && I.children.length > 0) { + for (let D = 0; D < $.length; D++) { + let T = $[D]; + if (T.type === "list" && !T.isAligned) + return I.isAligned = false, I; + } + I.isAligned = x(I); + } + return I; + }); + function N(I) { + return I.children.length === 0 ? -1 : I.children[0].position.start.column - 1; + } + function x(I) { + if (!I.ordered) + return true; + let [P, $] = I.children; + if (s(P, E.originalText).leadingSpaces.length > 1) + return true; + let T = N(P); + if (T === -1) + return false; + if (I.children.length === 1) + return T % E.tabWidth === 0; + let m = N($); + return T !== m ? false : T % E.tabWidth === 0 ? true : s($, E.originalText).leadingSpaces.length > 1; + } + } + r.exports = i; + } }), pg = te({ "src/language-markdown/clean.js"(e, r) { + "use strict"; + ne(); + var t2 = Po(), { isFrontMatterNode: s } = Ue(), { startWithPragma: a } = ko(), n = /* @__PURE__ */ new Set(["position", "raw"]); + function u(i, l, p2) { + if ((i.type === "front-matter" || i.type === "code" || i.type === "yaml" || i.type === "import" || i.type === "export" || i.type === "jsx") && delete l.value, i.type === "list" && delete l.isAligned, (i.type === "list" || i.type === "listItem") && (delete l.spread, delete l.loose), i.type === "text" || (i.type === "inlineCode" && (l.value = i.value.replace(/[\t\n ]+/g, " ")), i.type === "wikiLink" && (l.value = i.value.trim().replace(/[\t\n]+/g, " ")), (i.type === "definition" || i.type === "linkReference" || i.type === "imageReference") && (l.label = t2(i.label)), (i.type === "definition" || i.type === "link" || i.type === "image") && i.title && (l.title = i.title.replace(/\\(["')])/g, "$1")), p2 && p2.type === "root" && p2.children.length > 0 && (p2.children[0] === i || s(p2.children[0]) && p2.children[1] === i) && i.type === "html" && a(i.value))) + return null; + } + u.ignoredProperties = n, r.exports = u; + } }), fg = te({ "src/language-markdown/printer-markdown.js"(e, r) { + "use strict"; + ne(); + var t2 = Po(), { getLast: s, getMinNotPresentContinuousCount: a, getMaxContinuousCount: n, getStringWidth: u, isNonEmptyArray: i } = Ue(), { builders: { breakParent: l, join: p2, line: y, literalline: h, markAsRoot: g, hardline: c, softline: f, ifBreak: F, fill: _, align: w, indent: E, group: N, hardlineWithoutBreakParent: x }, utils: { normalizeDoc: I, replaceTextEndOfLine: P }, printer: { printDocToString: $ } } = qe(), D = lg(), { insertPragma: T } = ko(), { locStart: m, locEnd: C } = Io(), o = cg(), d = pg(), { getFencedCodeBlockValue: v, hasGitDiffFriendlyOrderedList: S, splitText: b, punctuationPattern: B, INLINE_NODE_TYPES: k, INLINE_NODE_WRAPPER_TYPES: M, isAutolink: R } = iu(), q = /* @__PURE__ */ new Set(["importExport"]), J = ["heading", "tableCell", "link", "wikiLink"], L = /* @__PURE__ */ new Set(["listItem", "definition", "footnoteDefinition"]); + function Q(oe, H, pe) { + let X = oe.getValue(); + if (ge(oe)) + return b(H.originalText.slice(X.position.start.offset, X.position.end.offset), H).map((le) => le.type === "word" ? le.value : le.value === "" ? "" : W(oe, le.value, H)); + switch (X.type) { + case "front-matter": + return H.originalText.slice(X.position.start.offset, X.position.end.offset); + case "root": + return X.children.length === 0 ? "" : [I(de(oe, H, pe)), q.has(z(X).type) ? "" : c]; + case "paragraph": + return ue(oe, H, pe, { postprocessor: _ }); + case "sentence": + return ue(oe, H, pe); + case "word": { + let le = X.value.replace(/\*/g, "\\$&").replace(new RegExp([`(^|${B})(_+)`, `(_+)(${B}|$)`].join("|"), "g"), (De, A, G, re, ye) => (G ? `${A}${G}` : `${re}${ye}`).replace(/_/g, "\\_")), Ae = (De, A, G) => De.type === "sentence" && G === 0, Ee = (De, A, G) => R(De.children[G - 1]); + return le !== X.value && (oe.match(void 0, Ae, Ee) || oe.match(void 0, Ae, (De, A, G) => De.type === "emphasis" && G === 0, Ee)) && (le = le.replace(/^(\\?[*_])+/, (De) => De.replace(/\\/g, ""))), le; + } + case "whitespace": { + let le = oe.getParentNode(), Ae = le.children.indexOf(X), Ee = le.children[Ae + 1], De = Ee && /^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(Ee.value) ? "never" : H.proseWrap; + return W(oe, X.value, { proseWrap: De }); + } + case "emphasis": { + let le; + if (R(X.children[0])) + le = H.originalText[X.position.start.offset]; + else { + let Ae = oe.getParentNode(), Ee = Ae.children.indexOf(X), De = Ae.children[Ee - 1], A = Ae.children[Ee + 1]; + le = De && De.type === "sentence" && De.children.length > 0 && s(De.children).type === "word" && !s(De.children).hasTrailingPunctuation || A && A.type === "sentence" && A.children.length > 0 && A.children[0].type === "word" && !A.children[0].hasLeadingPunctuation || ce(oe, "emphasis") ? "*" : "_"; + } + return [le, ue(oe, H, pe), le]; + } + case "strong": + return ["**", ue(oe, H, pe), "**"]; + case "delete": + return ["~~", ue(oe, H, pe), "~~"]; + case "inlineCode": { + let le = a(X.value, "`"), Ae = "`".repeat(le || 1), Ee = le && !/^\s/.test(X.value) ? " " : ""; + return [Ae, Ee, X.value, Ee, Ae]; + } + case "wikiLink": { + let le = ""; + return H.proseWrap === "preserve" ? le = X.value : le = X.value.replace(/[\t\n]+/g, " "), ["[[", le, "]]"]; + } + case "link": + switch (H.originalText[X.position.start.offset]) { + case "<": { + let le = "mailto:"; + return ["<", X.url.startsWith(le) && H.originalText.slice(X.position.start.offset + 1, X.position.start.offset + 1 + le.length) !== le ? X.url.slice(le.length) : X.url, ">"]; + } + case "[": + return ["[", ue(oe, H, pe), "](", he(X.url, ")"), we(X.title, H), ")"]; + default: + return H.originalText.slice(X.position.start.offset, X.position.end.offset); + } + case "image": + return ["![", X.alt || "", "](", he(X.url, ")"), we(X.title, H), ")"]; + case "blockquote": + return ["> ", w("> ", ue(oe, H, pe))]; + case "heading": + return ["#".repeat(X.depth) + " ", ue(oe, H, pe)]; + case "code": { + if (X.isIndented) { + let Ee = " ".repeat(4); + return w(Ee, [Ee, ...P(X.value, c)]); + } + let le = H.__inJsTemplate ? "~" : "`", Ae = le.repeat(Math.max(3, n(X.value, le) + 1)); + return [Ae, X.lang || "", X.meta ? " " + X.meta : "", c, ...P(v(X, H.originalText), c), c, Ae]; + } + case "html": { + let le = oe.getParentNode(), Ae = le.type === "root" && s(le.children) === X ? X.value.trimEnd() : X.value, Ee = /^$/s.test(Ae); + return P(Ae, Ee ? c : g(h)); + } + case "list": { + let le = Y(X, oe.getParentNode()), Ae = S(X, H); + return ue(oe, H, pe, { processor: (Ee, De) => { + let A = re(), G = Ee.getValue(); + if (G.children.length === 2 && G.children[1].type === "html" && G.children[0].position.start.column !== G.children[1].position.start.column) + return [A, V(Ee, H, pe, A)]; + return [A, w(" ".repeat(A.length), V(Ee, H, pe, A))]; + function re() { + let ye = X.ordered ? (De === 0 ? X.start : Ae ? 1 : X.start + De) + (le % 2 === 0 ? ". " : ") ") : le % 2 === 0 ? "- " : "* "; + return X.isAligned || X.hasIndentedCodeblock ? j(ye, H) : ye; + } + } }); + } + case "thematicBreak": { + let le = ee(oe, "list"); + return le === -1 ? "---" : Y(oe.getParentNode(le), oe.getParentNode(le + 1)) % 2 === 0 ? "***" : "---"; + } + case "linkReference": + return ["[", ue(oe, H, pe), "]", X.referenceType === "full" ? Ne(X) : X.referenceType === "collapsed" ? "[]" : ""]; + case "imageReference": + switch (X.referenceType) { + case "full": + return ["![", X.alt || "", "]", Ne(X)]; + default: + return ["![", X.alt, "]", X.referenceType === "collapsed" ? "[]" : ""]; + } + case "definition": { + let le = H.proseWrap === "always" ? y : " "; + return N([Ne(X), ":", E([le, he(X.url), X.title === null ? "" : [le, we(X.title, H, false)]])]); + } + case "footnote": + return ["[^", ue(oe, H, pe), "]"]; + case "footnoteReference": + return Pe(X); + case "footnoteDefinition": { + let le = oe.getParentNode().children[oe.getName() + 1], Ae = X.children.length === 1 && X.children[0].type === "paragraph" && (H.proseWrap === "never" || H.proseWrap === "preserve" && X.children[0].position.start.line === X.children[0].position.end.line); + return [Pe(X), ": ", Ae ? ue(oe, H, pe) : N([w(" ".repeat(4), ue(oe, H, pe, { processor: (Ee, De) => De === 0 ? N([f, pe()]) : pe() })), le && le.type === "footnoteDefinition" ? f : ""])]; + } + case "table": + return K(oe, H, pe); + case "tableCell": + return ue(oe, H, pe); + case "break": + return /\s/.test(H.originalText[X.position.start.offset]) ? [" ", g(h)] : ["\\", c]; + case "liquidNode": + return P(X.value, c); + case "importExport": + return [X.value, c]; + case "esComment": + return ["{/* ", X.value, " */}"]; + case "jsx": + return X.value; + case "math": + return ["$$", c, X.value ? [...P(X.value, c), c] : "", "$$"]; + case "inlineMath": + return H.originalText.slice(m(X), C(X)); + case "tableRow": + case "listItem": + default: + throw new Error(`Unknown markdown type ${JSON.stringify(X.type)}`); + } + } + function V(oe, H, pe, X) { + let le = oe.getValue(), Ae = le.checked === null ? "" : le.checked ? "[x] " : "[ ] "; + return [Ae, ue(oe, H, pe, { processor: (Ee, De) => { + if (De === 0 && Ee.getValue().type !== "list") + return w(" ".repeat(Ae.length), pe()); + let A = " ".repeat(ke(H.tabWidth - X.length, 0, 3)); + return [A, w(A, pe())]; + } })]; + } + function j(oe, H) { + let pe = X(); + return oe + " ".repeat(pe >= 4 ? 0 : pe); + function X() { + let le = oe.length % H.tabWidth; + return le === 0 ? 0 : H.tabWidth - le; + } + } + function Y(oe, H) { + return ie(oe, H, (pe) => pe.ordered === oe.ordered); + } + function ie(oe, H, pe) { + let X = -1; + for (let le of H.children) + if (le.type === oe.type && pe(le) ? X++ : X = -1, le === oe) + return X; + } + function ee(oe, H) { + let pe = Array.isArray(H) ? H : [H], X = -1, le; + for (; le = oe.getParentNode(++X); ) + if (pe.includes(le.type)) + return X; + return -1; + } + function ce(oe, H) { + let pe = ee(oe, H); + return pe === -1 ? null : oe.getParentNode(pe); + } + function W(oe, H, pe) { + if (pe.proseWrap === "preserve" && H === ` +`) + return c; + let X = pe.proseWrap === "always" && !ce(oe, J); + return H !== "" ? X ? y : " " : X ? f : ""; + } + function K(oe, H, pe) { + let X = oe.getValue(), le = [], Ae = oe.map((ye) => ye.map((Ce, Be) => { + let ve = $(pe(), H).formatted, ze = u(ve); + return le[Be] = Math.max(le[Be] || 3, ze), { text: ve, width: ze }; + }, "children"), "children"), Ee = A(false); + if (H.proseWrap !== "never") + return [l, Ee]; + let De = A(true); + return [l, N(F(De, Ee))]; + function A(ye) { + let Ce = [re(Ae[0], ye), G(ye)]; + return Ae.length > 1 && Ce.push(p2(x, Ae.slice(1).map((Be) => re(Be, ye)))), p2(x, Ce); + } + function G(ye) { + return `| ${le.map((Be, ve) => { + let ze = X.align[ve], be = ze === "center" || ze === "left" ? ":" : "-", Ye = ze === "center" || ze === "right" ? ":" : "-", Se = ye ? "-" : "-".repeat(Be - 2); + return `${be}${Se}${Ye}`; + }).join(" | ")} |`; + } + function re(ye, Ce) { + return `| ${ye.map((ve, ze) => { + let { text: be, width: Ye } = ve; + if (Ce) + return be; + let Se = le[ze] - Ye, Ie = X.align[ze], Oe = 0; + Ie === "right" ? Oe = Se : Ie === "center" && (Oe = Math.floor(Se / 2)); + let Je = Se - Oe; + return `${" ".repeat(Oe)}${be}${" ".repeat(Je)}`; + }).join(" | ")} |`; + } + } + function de(oe, H, pe) { + let X = [], le = null, { children: Ae } = oe.getValue(); + for (let [Ee, De] of Ae.entries()) + switch (U(De)) { + case "start": + le === null && (le = { index: Ee, offset: De.position.end.offset }); + break; + case "end": + le !== null && (X.push({ start: le, end: { index: Ee, offset: De.position.start.offset } }), le = null); + break; + default: + break; + } + return ue(oe, H, pe, { processor: (Ee, De) => { + if (X.length > 0) { + let A = X[0]; + if (De === A.start.index) + return [Fe(Ae[A.start.index]), H.originalText.slice(A.start.offset, A.end.offset), Fe(Ae[A.end.index])]; + if (A.start.index < De && De < A.end.index) + return false; + if (De === A.end.index) + return X.shift(), false; + } + return pe(); + } }); + } + function ue(oe, H, pe) { + let X = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, { postprocessor: le } = X, Ae = X.processor || (() => pe()), Ee = oe.getValue(), De = [], A; + return oe.each((G, re) => { + let ye = G.getValue(), Ce = Ae(G, re); + if (Ce !== false) { + let Be = { parts: De, prevNode: A, parentNode: Ee, options: H }; + Z(ye, Be) && (De.push(c), A && q.has(A.type) || (se(ye, Be) || fe(ye, Be)) && De.push(c), fe(ye, Be) && De.push(c)), De.push(Ce), A = ye; + } + }, "children"), le ? le(De) : De; + } + function Fe(oe) { + if (oe.type === "html") + return oe.value; + if (oe.type === "paragraph" && Array.isArray(oe.children) && oe.children.length === 1 && oe.children[0].type === "esComment") + return ["{/* ", oe.children[0].value, " */}"]; + } + function z(oe) { + let H = oe; + for (; i(H.children); ) + H = s(H.children); + return H; + } + function U(oe) { + let H; + if (oe.type === "html") + H = oe.value.match(/^$/); + else { + let pe; + oe.type === "esComment" ? pe = oe : oe.type === "paragraph" && oe.children.length === 1 && oe.children[0].type === "esComment" && (pe = oe.children[0]), pe && (H = pe.value.match(/^prettier-ignore(?:-(start|end))?$/)); + } + return H ? H[1] || "next" : false; + } + function Z(oe, H) { + let pe = H.parts.length === 0, X = k.includes(oe.type), le = oe.type === "html" && M.includes(H.parentNode.type); + return !pe && !X && !le; + } + function se(oe, H) { + var pe, X, le; + let Ee = (H.prevNode && H.prevNode.type) === oe.type && L.has(oe.type), De = H.parentNode.type === "listItem" && !H.parentNode.loose, A = ((pe = H.prevNode) === null || pe === void 0 ? void 0 : pe.type) === "listItem" && H.prevNode.loose, G = U(H.prevNode) === "next", re = oe.type === "html" && ((X = H.prevNode) === null || X === void 0 ? void 0 : X.type) === "html" && H.prevNode.position.end.line + 1 === oe.position.start.line, ye = oe.type === "html" && H.parentNode.type === "listItem" && ((le = H.prevNode) === null || le === void 0 ? void 0 : le.type) === "paragraph" && H.prevNode.position.end.line + 1 === oe.position.start.line; + return A || !(Ee || De || G || re || ye); + } + function fe(oe, H) { + let pe = H.prevNode && H.prevNode.type === "list", X = oe.type === "code" && oe.isIndented; + return pe && X; + } + function ge(oe) { + let H = ce(oe, ["linkReference", "imageReference"]); + return H && (H.type !== "linkReference" || H.referenceType !== "full"); + } + function he(oe) { + let H = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], pe = [" ", ...Array.isArray(H) ? H : [H]]; + return new RegExp(pe.map((X) => `\\${X}`).join("|")).test(oe) ? `<${oe}>` : oe; + } + function we(oe, H) { + let pe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + if (!oe) + return ""; + if (pe) + return " " + we(oe, H, false); + if (oe = oe.replace(/\\(["')])/g, "$1"), oe.includes('"') && oe.includes("'") && !oe.includes(")")) + return `(${oe})`; + let X = oe.split("'").length - 1, le = oe.split('"').length - 1, Ae = X > le ? '"' : le > X || H.singleQuote ? "'" : '"'; + return oe = oe.replace(/\\/, "\\\\"), oe = oe.replace(new RegExp(`(${Ae})`, "g"), "\\$1"), `${Ae}${oe}${Ae}`; + } + function ke(oe, H, pe) { + return oe < H ? H : oe > pe ? pe : oe; + } + function Re(oe) { + let H = Number(oe.getName()); + if (H === 0) + return false; + let pe = oe.getParentNode().children[H - 1]; + return U(pe) === "next"; + } + function Ne(oe) { + return `[${t2(oe.label)}]`; + } + function Pe(oe) { + return `[^${oe.label}]`; + } + r.exports = { preprocess: o, print: Q, embed: D, massageAstNode: d, hasPrettierIgnore: Re, insertPragma: T }; + } }), Dg = te({ "src/language-markdown/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { proseWrap: t2.proseWrap, singleQuote: t2.singleQuote }; + } }), mg = te({ "src/language-markdown/parsers.js"() { + ne(); + } }), _a3 = te({ "node_modules/linguist-languages/data/Markdown.json"(e, r) { + r.exports = { name: "Markdown", type: "prose", color: "#083fa1", aliases: ["pandoc"], aceMode: "markdown", codemirrorMode: "gfm", codemirrorMimeType: "text/x-gfm", wrap: true, extensions: [".md", ".livemd", ".markdown", ".mdown", ".mdwn", ".mdx", ".mkd", ".mkdn", ".mkdown", ".ronn", ".scd", ".workbook"], filenames: ["contents.lr"], tmScope: "source.gfm", languageId: 222 }; + } }), dg = te({ "src/language-markdown/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = fg(), a = Dg(), n = mg(), u = [t2(_a3(), (l) => ({ since: "1.8.0", parsers: ["markdown"], vscodeLanguageIds: ["markdown"], filenames: [...l.filenames, "README"], extensions: l.extensions.filter((p2) => p2 !== ".mdx") })), t2(_a3(), () => ({ name: "MDX", since: "1.15.0", parsers: ["mdx"], vscodeLanguageIds: ["mdx"], filenames: [], extensions: [".mdx"] }))], i = { mdast: s }; + r.exports = { languages: u, options: a, printers: i, parsers: n }; + } }), gg = te({ "src/language-html/clean.js"(e, r) { + "use strict"; + ne(); + var { isFrontMatterNode: t2 } = Ue(), s = /* @__PURE__ */ new Set(["sourceSpan", "startSourceSpan", "endSourceSpan", "nameSpan", "valueSpan"]); + function a(n, u) { + if (n.type === "text" || n.type === "comment" || t2(n) || n.type === "yaml" || n.type === "toml") + return null; + n.type === "attribute" && delete u.value, n.type === "docType" && delete u.value; + } + a.ignoredProperties = s, r.exports = a; + } }), yg = te({ "src/language-html/constants.evaluate.js"(e, r) { + r.exports = { CSS_DISPLAY_TAGS: { area: "none", base: "none", basefont: "none", datalist: "none", head: "none", link: "none", meta: "none", noembed: "none", noframes: "none", param: "block", rp: "none", script: "block", source: "block", style: "none", template: "inline", track: "block", title: "none", html: "block", body: "block", address: "block", blockquote: "block", center: "block", div: "block", figure: "block", figcaption: "block", footer: "block", form: "block", header: "block", hr: "block", legend: "block", listing: "block", main: "block", p: "block", plaintext: "block", pre: "block", xmp: "block", slot: "contents", ruby: "ruby", rt: "ruby-text", article: "block", aside: "block", h1: "block", h2: "block", h3: "block", h4: "block", h5: "block", h6: "block", hgroup: "block", nav: "block", section: "block", dir: "block", dd: "block", dl: "block", dt: "block", ol: "block", ul: "block", li: "list-item", table: "table", caption: "table-caption", colgroup: "table-column-group", col: "table-column", thead: "table-header-group", tbody: "table-row-group", tfoot: "table-footer-group", tr: "table-row", td: "table-cell", th: "table-cell", fieldset: "block", button: "inline-block", details: "block", summary: "block", dialog: "block", meter: "inline-block", progress: "inline-block", object: "inline-block", video: "inline-block", audio: "inline-block", select: "inline-block", option: "block", optgroup: "block" }, CSS_DISPLAY_DEFAULT: "inline", CSS_WHITE_SPACE_TAGS: { listing: "pre", plaintext: "pre", pre: "pre", xmp: "pre", nobr: "nowrap", table: "initial", textarea: "pre-wrap" }, CSS_WHITE_SPACE_DEFAULT: "normal" }; + } }), hg = te({ "src/language-html/utils/is-unknown-namespace.js"(e, r) { + "use strict"; + ne(); + function t2(s) { + return s.type === "element" && !s.hasExplicitNamespace && !["html", "svg"].includes(s.namespace); + } + r.exports = t2; + } }), Rt = te({ "src/language-html/utils/index.js"(e, r) { + "use strict"; + ne(); + var { inferParserByLanguage: t2, isFrontMatterNode: s } = Ue(), { builders: { line: a, hardline: n, join: u }, utils: { getDocParts: i, replaceTextEndOfLine: l } } = qe(), { CSS_DISPLAY_TAGS: p2, CSS_DISPLAY_DEFAULT: y, CSS_WHITE_SPACE_TAGS: h, CSS_WHITE_SPACE_DEFAULT: g } = yg(), c = hg(), f = /* @__PURE__ */ new Set([" ", ` +`, "\f", "\r", " "]), F = (A) => A.replace(/^[\t\n\f\r ]+/, ""), _ = (A) => A.replace(/[\t\n\f\r ]+$/, ""), w = (A) => F(_(A)), E = (A) => A.replace(/^[\t\f\r ]*\n/g, ""), N = (A) => E(_(A)), x = (A) => A.split(/[\t\n\f\r ]+/), I = (A) => A.match(/^[\t\n\f\r ]*/)[0], P = (A) => { + let [, G, re, ye] = A.match(/^([\t\n\f\r ]*)(.*?)([\t\n\f\r ]*)$/s); + return { leadingWhitespace: G, trailingWhitespace: ye, text: re }; + }, $ = (A) => /[\t\n\f\r ]/.test(A); + function D(A, G) { + return !!(A.type === "ieConditionalComment" && A.lastChild && !A.lastChild.isSelfClosing && !A.lastChild.endSourceSpan || A.type === "ieConditionalComment" && !A.complete || se(A) && A.children.some((re) => re.type !== "text" && re.type !== "interpolation") || X(A, G) && !o(A) && A.type !== "interpolation"); + } + function T(A) { + return A.type === "attribute" || !A.parent || !A.prev ? false : m(A.prev); + } + function m(A) { + return A.type === "comment" && A.value.trim() === "prettier-ignore"; + } + function C(A) { + return A.type === "text" || A.type === "comment"; + } + function o(A) { + return A.type === "element" && (A.fullName === "script" || A.fullName === "style" || A.fullName === "svg:style" || c(A) && (A.name === "script" || A.name === "style")); + } + function d(A) { + return A.children && !o(A); + } + function v(A) { + return o(A) || A.type === "interpolation" || S(A); + } + function S(A) { + return we(A).startsWith("pre"); + } + function b(A, G) { + let re = ye(); + if (re && !A.prev && A.parent && A.parent.tagDefinition && A.parent.tagDefinition.ignoreFirstLf) + return A.type === "interpolation"; + return re; + function ye() { + return s(A) ? false : (A.type === "text" || A.type === "interpolation") && A.prev && (A.prev.type === "text" || A.prev.type === "interpolation") ? true : !A.parent || A.parent.cssDisplay === "none" ? false : se(A.parent) ? true : !(!A.prev && (A.parent.type === "root" || se(A) && A.parent || o(A.parent) || H(A.parent, G) || !ue(A.parent.cssDisplay)) || A.prev && !U(A.prev.cssDisplay)); + } + } + function B(A, G) { + return s(A) ? false : (A.type === "text" || A.type === "interpolation") && A.next && (A.next.type === "text" || A.next.type === "interpolation") ? true : !A.parent || A.parent.cssDisplay === "none" ? false : se(A.parent) ? true : !(!A.next && (A.parent.type === "root" || se(A) && A.parent || o(A.parent) || H(A.parent, G) || !Fe(A.parent.cssDisplay)) || A.next && !z(A.next.cssDisplay)); + } + function k(A) { + return Z(A.cssDisplay) && !o(A); + } + function M(A) { + return s(A) || A.next && A.sourceSpan.end && A.sourceSpan.end.line + 1 < A.next.sourceSpan.start.line; + } + function R(A) { + return q(A) || A.type === "element" && A.children.length > 0 && (["body", "script", "style"].includes(A.name) || A.children.some((G) => ee(G))) || A.firstChild && A.firstChild === A.lastChild && A.firstChild.type !== "text" && V(A.firstChild) && (!A.lastChild.isTrailingSpaceSensitive || j(A.lastChild)); + } + function q(A) { + return A.type === "element" && A.children.length > 0 && (["html", "head", "ul", "ol", "select"].includes(A.name) || A.cssDisplay.startsWith("table") && A.cssDisplay !== "table-cell"); + } + function J(A) { + return Y(A) || A.prev && L(A.prev) || Q(A); + } + function L(A) { + return Y(A) || A.type === "element" && A.fullName === "br" || Q(A); + } + function Q(A) { + return V(A) && j(A); + } + function V(A) { + return A.hasLeadingSpaces && (A.prev ? A.prev.sourceSpan.end.line < A.sourceSpan.start.line : A.parent.type === "root" || A.parent.startSourceSpan.end.line < A.sourceSpan.start.line); + } + function j(A) { + return A.hasTrailingSpaces && (A.next ? A.next.sourceSpan.start.line > A.sourceSpan.end.line : A.parent.type === "root" || A.parent.endSourceSpan && A.parent.endSourceSpan.start.line > A.sourceSpan.end.line); + } + function Y(A) { + switch (A.type) { + case "ieConditionalComment": + case "comment": + case "directive": + return true; + case "element": + return ["script", "select"].includes(A.name); + } + return false; + } + function ie(A) { + return A.lastChild ? ie(A.lastChild) : A; + } + function ee(A) { + return A.children && A.children.some((G) => G.type !== "text"); + } + function ce(A) { + let { type: G, lang: re } = A.attrMap; + if (G === "module" || G === "text/javascript" || G === "text/babel" || G === "application/javascript" || re === "jsx") + return "babel"; + if (G === "application/x-typescript" || re === "ts" || re === "tsx") + return "typescript"; + if (G === "text/markdown") + return "markdown"; + if (G === "text/html") + return "html"; + if (G && (G.endsWith("json") || G.endsWith("importmap")) || G === "speculationrules") + return "json"; + if (G === "text/x-handlebars-template") + return "glimmer"; + } + function W(A, G) { + let { lang: re } = A.attrMap; + if (!re || re === "postcss" || re === "css") + return "css"; + if (re === "scss") + return "scss"; + if (re === "less") + return "less"; + if (re === "stylus") + return t2("stylus", G); + } + function K(A, G) { + if (A.name === "script" && !A.attrMap.src) + return !A.attrMap.lang && !A.attrMap.type ? "babel" : ce(A); + if (A.name === "style") + return W(A, G); + if (G && X(A, G)) + return ce(A) || !("src" in A.attrMap) && t2(A.attrMap.lang, G); + } + function de(A) { + return A === "block" || A === "list-item" || A.startsWith("table"); + } + function ue(A) { + return !de(A) && A !== "inline-block"; + } + function Fe(A) { + return !de(A) && A !== "inline-block"; + } + function z(A) { + return !de(A); + } + function U(A) { + return !de(A); + } + function Z(A) { + return !de(A) && A !== "inline-block"; + } + function se(A) { + return we(A).startsWith("pre"); + } + function fe(A, G) { + let re = 0; + for (let ye = A.stack.length - 1; ye >= 0; ye--) { + let Ce = A.stack[ye]; + Ce && typeof Ce == "object" && !Array.isArray(Ce) && G(Ce) && re++; + } + return re; + } + function ge(A, G) { + let re = A; + for (; re; ) { + if (G(re)) + return true; + re = re.parent; + } + return false; + } + function he(A, G) { + if (A.prev && A.prev.type === "comment") { + let ye = A.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/); + if (ye) + return ye[1]; + } + let re = false; + if (A.type === "element" && A.namespace === "svg") + if (ge(A, (ye) => ye.fullName === "svg:foreignObject")) + re = true; + else + return A.name === "svg" ? "inline-block" : "block"; + switch (G.htmlWhitespaceSensitivity) { + case "strict": + return "inline"; + case "ignore": + return "block"; + default: + return G.parser === "vue" && A.parent && A.parent.type === "root" ? "block" : A.type === "element" && (!A.namespace || re || c(A)) && p2[A.name] || y; + } + } + function we(A) { + return A.type === "element" && (!A.namespace || c(A)) && h[A.name] || g; + } + function ke(A) { + let G = Number.POSITIVE_INFINITY; + for (let re of A.split(` +`)) { + if (re.length === 0) + continue; + if (!f.has(re[0])) + return 0; + let ye = I(re).length; + re.length !== ye && ye < G && (G = ye); + } + return G === Number.POSITIVE_INFINITY ? 0 : G; + } + function Re(A) { + let G = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ke(A); + return G === 0 ? A : A.split(` +`).map((re) => re.slice(G)).join(` +`); + } + function Ne(A, G) { + let re = 0; + for (let ye = 0; ye < A.length; ye++) + A[ye] === G && re++; + return re; + } + function Pe(A) { + return A.replace(/'/g, "'").replace(/"/g, '"'); + } + var oe = /* @__PURE__ */ new Set(["template", "style", "script"]); + function H(A, G) { + return pe(A, G) && !oe.has(A.fullName); + } + function pe(A, G) { + return G.parser === "vue" && A.type === "element" && A.parent.type === "root" && A.fullName.toLowerCase() !== "html"; + } + function X(A, G) { + return pe(A, G) && (H(A, G) || A.attrMap.lang && A.attrMap.lang !== "html"); + } + function le(A) { + let G = A.fullName; + return G.charAt(0) === "#" || G === "slot-scope" || G === "v-slot" || G.startsWith("v-slot:"); + } + function Ae(A, G) { + let re = A.parent; + if (!pe(re, G)) + return false; + let ye = re.fullName, Ce = A.fullName; + return ye === "script" && Ce === "setup" || ye === "style" && Ce === "vars"; + } + function Ee(A) { + let G = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : A.value; + return A.parent.isWhitespaceSensitive ? A.parent.isIndentationSensitive ? l(G) : l(Re(N(G)), n) : i(u(a, x(G))); + } + function De(A, G) { + return pe(A, G) && A.name === "script"; + } + r.exports = { htmlTrim: w, htmlTrimPreserveIndentation: N, hasHtmlWhitespace: $, getLeadingAndTrailingHtmlWhitespace: P, canHaveInterpolation: d, countChars: Ne, countParents: fe, dedentString: Re, forceBreakChildren: q, forceBreakContent: R, forceNextEmptyLine: M, getLastDescendant: ie, getNodeCssStyleDisplay: he, getNodeCssStyleWhiteSpace: we, hasPrettierIgnore: T, inferScriptParser: K, isVueCustomBlock: H, isVueNonHtmlBlock: X, isVueScriptTag: De, isVueSlotAttribute: le, isVueSfcBindingsAttribute: Ae, isVueSfcBlock: pe, isDanglingSpaceSensitiveNode: k, isIndentationSensitiveNode: S, isLeadingSpaceSensitiveNode: b, isPreLikeNode: se, isScriptLikeTag: o, isTextLikeNode: C, isTrailingSpaceSensitiveNode: B, isWhitespaceSensitiveNode: v, isUnknownNamespace: c, preferHardlineAsLeadingSpaces: J, preferHardlineAsTrailingSpaces: L, shouldPreserveContent: D, unescapeQuoteEntities: Pe, getTextValueParts: Ee }; + } }), vg = te({ "node_modules/angular-html-parser/lib/compiler/src/chars.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }), e.$EOF = 0, e.$BSPACE = 8, e.$TAB = 9, e.$LF = 10, e.$VTAB = 11, e.$FF = 12, e.$CR = 13, e.$SPACE = 32, e.$BANG = 33, e.$DQ = 34, e.$HASH = 35, e.$$ = 36, e.$PERCENT = 37, e.$AMPERSAND = 38, e.$SQ = 39, e.$LPAREN = 40, e.$RPAREN = 41, e.$STAR = 42, e.$PLUS = 43, e.$COMMA = 44, e.$MINUS = 45, e.$PERIOD = 46, e.$SLASH = 47, e.$COLON = 58, e.$SEMICOLON = 59, e.$LT = 60, e.$EQ = 61, e.$GT = 62, e.$QUESTION = 63, e.$0 = 48, e.$7 = 55, e.$9 = 57, e.$A = 65, e.$E = 69, e.$F = 70, e.$X = 88, e.$Z = 90, e.$LBRACKET = 91, e.$BACKSLASH = 92, e.$RBRACKET = 93, e.$CARET = 94, e.$_ = 95, e.$a = 97, e.$b = 98, e.$e = 101, e.$f = 102, e.$n = 110, e.$r = 114, e.$t = 116, e.$u = 117, e.$v = 118, e.$x = 120, e.$z = 122, e.$LBRACE = 123, e.$BAR = 124, e.$RBRACE = 125, e.$NBSP = 160, e.$PIPE = 124, e.$TILDA = 126, e.$AT = 64, e.$BT = 96; + function r(i) { + return i >= e.$TAB && i <= e.$SPACE || i == e.$NBSP; + } + e.isWhitespace = r; + function t2(i) { + return e.$0 <= i && i <= e.$9; + } + e.isDigit = t2; + function s(i) { + return i >= e.$a && i <= e.$z || i >= e.$A && i <= e.$Z; + } + e.isAsciiLetter = s; + function a(i) { + return i >= e.$a && i <= e.$f || i >= e.$A && i <= e.$F || t2(i); + } + e.isAsciiHexDigit = a; + function n(i) { + return i === e.$LF || i === e.$CR; + } + e.isNewLine = n; + function u(i) { + return e.$0 <= i && i <= e.$7; + } + e.isOctalDigit = u; + } }), Cg = te({ "node_modules/angular-html-parser/lib/compiler/src/aot/static_symbol.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = class { + constructor(s, a, n) { + this.filePath = s, this.name = a, this.members = n; + } + assertNoMembers() { + if (this.members.length) + throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`); + } + }; + e.StaticSymbol = r; + var t2 = class { + constructor() { + this.cache = /* @__PURE__ */ new Map(); + } + get(s, a, n) { + n = n || []; + let u = n.length ? `.${n.join(".")}` : "", i = `"${s}".${a}${u}`, l = this.cache.get(i); + return l || (l = new r(s, a, n), this.cache.set(i, l)), l; + } + }; + e.StaticSymbolCache = t2; + } }), Eg = te({ "node_modules/angular-html-parser/lib/compiler/src/util.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = /-+([a-z0-9])/g; + function t2(o) { + return o.replace(r, function() { + for (var d = arguments.length, v = new Array(d), S = 0; S < d; S++) + v[S] = arguments[S]; + return v[1].toUpperCase(); + }); + } + e.dashCaseToCamelCase = t2; + function s(o, d) { + return n(o, ":", d); + } + e.splitAtColon = s; + function a(o, d) { + return n(o, ".", d); + } + e.splitAtPeriod = a; + function n(o, d, v) { + let S = o.indexOf(d); + return S == -1 ? v : [o.slice(0, S).trim(), o.slice(S + 1).trim()]; + } + function u(o, d, v) { + return Array.isArray(o) ? d.visitArray(o, v) : E(o) ? d.visitStringMap(o, v) : o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? d.visitPrimitive(o, v) : d.visitOther(o, v); + } + e.visitValue = u; + function i(o) { + return o != null; + } + e.isDefined = i; + function l(o) { + return o === void 0 ? null : o; + } + e.noUndefined = l; + var p2 = class { + visitArray(o, d) { + return o.map((v) => u(v, this, d)); + } + visitStringMap(o, d) { + let v = {}; + return Object.keys(o).forEach((S) => { + v[S] = u(o[S], this, d); + }), v; + } + visitPrimitive(o, d) { + return o; + } + visitOther(o, d) { + return o; + } + }; + e.ValueTransformer = p2, e.SyncAsync = { assertSync: (o) => { + if (P(o)) + throw new Error("Illegal state: value cannot be a promise"); + return o; + }, then: (o, d) => P(o) ? o.then(d) : d(o), all: (o) => o.some(P) ? Promise.all(o) : o }; + function y(o) { + throw new Error(`Internal Error: ${o}`); + } + e.error = y; + function h(o, d) { + let v = Error(o); + return v[g] = true, d && (v[c] = d), v; + } + e.syntaxError = h; + var g = "ngSyntaxError", c = "ngParseErrors"; + function f(o) { + return o[g]; + } + e.isSyntaxError = f; + function F(o) { + return o[c] || []; + } + e.getParseErrors = F; + function _(o) { + return o.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); + } + e.escapeRegExp = _; + var w = Object.getPrototypeOf({}); + function E(o) { + return typeof o == "object" && o !== null && Object.getPrototypeOf(o) === w; + } + function N(o) { + let d = ""; + for (let v = 0; v < o.length; v++) { + let S = o.charCodeAt(v); + if (S >= 55296 && S <= 56319 && o.length > v + 1) { + let b = o.charCodeAt(v + 1); + b >= 56320 && b <= 57343 && (v++, S = (S - 55296 << 10) + b - 56320 + 65536); + } + S <= 127 ? d += String.fromCharCode(S) : S <= 2047 ? d += String.fromCharCode(S >> 6 & 31 | 192, S & 63 | 128) : S <= 65535 ? d += String.fromCharCode(S >> 12 | 224, S >> 6 & 63 | 128, S & 63 | 128) : S <= 2097151 && (d += String.fromCharCode(S >> 18 & 7 | 240, S >> 12 & 63 | 128, S >> 6 & 63 | 128, S & 63 | 128)); + } + return d; + } + e.utf8Encode = N; + function x(o) { + if (typeof o == "string") + return o; + if (o instanceof Array) + return "[" + o.map(x).join(", ") + "]"; + if (o == null) + return "" + o; + if (o.overriddenName) + return `${o.overriddenName}`; + if (o.name) + return `${o.name}`; + if (!o.toString) + return "object"; + let d = o.toString(); + if (d == null) + return "" + d; + let v = d.indexOf(` +`); + return v === -1 ? d : d.substring(0, v); + } + e.stringify = x; + function I(o) { + return typeof o == "function" && o.hasOwnProperty("__forward_ref__") ? o() : o; + } + e.resolveForwardRef = I; + function P(o) { + return !!o && typeof o.then == "function"; + } + e.isPromise = P; + var $ = class { + constructor(o) { + this.full = o; + let d = o.split("."); + this.major = d[0], this.minor = d[1], this.patch = d.slice(2).join("."); + } + }; + e.Version = $; + var D = typeof window < "u" && window, T = typeof self < "u" && typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && self, m = typeof globalThis < "u" && globalThis, C = m || D || T; + e.global = C; + } }), Fg = te({ "node_modules/angular-html-parser/lib/compiler/src/compile_metadata.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = Cg(), t2 = Eg(), s = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/; + function a(v) { + return v.replace(/\W/g, "_"); + } + e.sanitizeIdentifier = a; + var n = 0; + function u(v) { + if (!v || !v.reference) + return null; + let S = v.reference; + if (S instanceof r.StaticSymbol) + return S.name; + if (S.__anonymousType) + return S.__anonymousType; + let b = t2.stringify(S); + return b.indexOf("(") >= 0 ? (b = `anonymous_${n++}`, S.__anonymousType = b) : b = a(b), b; + } + e.identifierName = u; + function i(v) { + let S = v.reference; + return S instanceof r.StaticSymbol ? S.filePath : `./${t2.stringify(S)}`; + } + e.identifierModuleUrl = i; + function l(v, S) { + return `View_${u({ reference: v })}_${S}`; + } + e.viewClassName = l; + function p2(v) { + return `RenderType_${u({ reference: v })}`; + } + e.rendererTypeName = p2; + function y(v) { + return `HostView_${u({ reference: v })}`; + } + e.hostViewClassName = y; + function h(v) { + return `${u({ reference: v })}NgFactory`; + } + e.componentFactoryName = h; + var g; + (function(v) { + v[v.Pipe = 0] = "Pipe", v[v.Directive = 1] = "Directive", v[v.NgModule = 2] = "NgModule", v[v.Injectable = 3] = "Injectable"; + })(g = e.CompileSummaryKind || (e.CompileSummaryKind = {})); + function c(v) { + return v.value != null ? a(v.value) : u(v.identifier); + } + e.tokenName = c; + function f(v) { + return v.identifier != null ? v.identifier.reference : v.value; + } + e.tokenReference = f; + var F = class { + constructor() { + let { moduleUrl: v, styles: S, styleUrls: b } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + this.moduleUrl = v || null, this.styles = P(S), this.styleUrls = P(b); + } + }; + e.CompileStylesheetMetadata = F; + var _ = class { + constructor(v) { + let { encapsulation: S, template: b, templateUrl: B, htmlAst: k, styles: M, styleUrls: R, externalStylesheets: q, animations: J, ngContentSelectors: L, interpolation: Q, isInline: V, preserveWhitespaces: j } = v; + if (this.encapsulation = S, this.template = b, this.templateUrl = B, this.htmlAst = k, this.styles = P(M), this.styleUrls = P(R), this.externalStylesheets = P(q), this.animations = J ? D(J) : [], this.ngContentSelectors = L || [], Q && Q.length != 2) + throw new Error("'interpolation' should have a start and an end symbol."); + this.interpolation = Q, this.isInline = V, this.preserveWhitespaces = j; + } + toSummary() { + return { ngContentSelectors: this.ngContentSelectors, encapsulation: this.encapsulation, styles: this.styles, animations: this.animations }; + } + }; + e.CompileTemplateMetadata = _; + var w = class { + static create(v) { + let { isHost: S, type: b, isComponent: B, selector: k, exportAs: M, changeDetection: R, inputs: q, outputs: J, host: L, providers: Q, viewProviders: V, queries: j, guards: Y, viewQueries: ie, entryComponents: ee, template: ce, componentViewType: W, rendererType: K, componentFactory: de } = v, ue = {}, Fe = {}, z = {}; + L != null && Object.keys(L).forEach((se) => { + let fe = L[se], ge = se.match(s); + ge === null ? z[se] = fe : ge[1] != null ? Fe[ge[1]] = fe : ge[2] != null && (ue[ge[2]] = fe); + }); + let U = {}; + q != null && q.forEach((se) => { + let fe = t2.splitAtColon(se, [se, se]); + U[fe[0]] = fe[1]; + }); + let Z = {}; + return J != null && J.forEach((se) => { + let fe = t2.splitAtColon(se, [se, se]); + Z[fe[0]] = fe[1]; + }), new w({ isHost: S, type: b, isComponent: !!B, selector: k, exportAs: M, changeDetection: R, inputs: U, outputs: Z, hostListeners: ue, hostProperties: Fe, hostAttributes: z, providers: Q, viewProviders: V, queries: j, guards: Y, viewQueries: ie, entryComponents: ee, template: ce, componentViewType: W, rendererType: K, componentFactory: de }); + } + constructor(v) { + let { isHost: S, type: b, isComponent: B, selector: k, exportAs: M, changeDetection: R, inputs: q, outputs: J, hostListeners: L, hostProperties: Q, hostAttributes: V, providers: j, viewProviders: Y, queries: ie, guards: ee, viewQueries: ce, entryComponents: W, template: K, componentViewType: de, rendererType: ue, componentFactory: Fe } = v; + this.isHost = !!S, this.type = b, this.isComponent = B, this.selector = k, this.exportAs = M, this.changeDetection = R, this.inputs = q, this.outputs = J, this.hostListeners = L, this.hostProperties = Q, this.hostAttributes = V, this.providers = P(j), this.viewProviders = P(Y), this.queries = P(ie), this.guards = ee, this.viewQueries = P(ce), this.entryComponents = P(W), this.template = K, this.componentViewType = de, this.rendererType = ue, this.componentFactory = Fe; + } + toSummary() { + return { summaryKind: g.Directive, type: this.type, isComponent: this.isComponent, selector: this.selector, exportAs: this.exportAs, inputs: this.inputs, outputs: this.outputs, hostListeners: this.hostListeners, hostProperties: this.hostProperties, hostAttributes: this.hostAttributes, providers: this.providers, viewProviders: this.viewProviders, queries: this.queries, guards: this.guards, viewQueries: this.viewQueries, entryComponents: this.entryComponents, changeDetection: this.changeDetection, template: this.template && this.template.toSummary(), componentViewType: this.componentViewType, rendererType: this.rendererType, componentFactory: this.componentFactory }; + } + }; + e.CompileDirectiveMetadata = w; + var E = class { + constructor(v) { + let { type: S, name: b, pure: B } = v; + this.type = S, this.name = b, this.pure = !!B; + } + toSummary() { + return { summaryKind: g.Pipe, type: this.type, name: this.name, pure: this.pure }; + } + }; + e.CompilePipeMetadata = E; + var N = class { + }; + e.CompileShallowModuleMetadata = N; + var x = class { + constructor(v) { + let { type: S, providers: b, declaredDirectives: B, exportedDirectives: k, declaredPipes: M, exportedPipes: R, entryComponents: q, bootstrapComponents: J, importedModules: L, exportedModules: Q, schemas: V, transitiveModule: j, id: Y } = v; + this.type = S || null, this.declaredDirectives = P(B), this.exportedDirectives = P(k), this.declaredPipes = P(M), this.exportedPipes = P(R), this.providers = P(b), this.entryComponents = P(q), this.bootstrapComponents = P(J), this.importedModules = P(L), this.exportedModules = P(Q), this.schemas = P(V), this.id = Y || null, this.transitiveModule = j || null; + } + toSummary() { + let v = this.transitiveModule; + return { summaryKind: g.NgModule, type: this.type, entryComponents: v.entryComponents, providers: v.providers, modules: v.modules, exportedDirectives: v.exportedDirectives, exportedPipes: v.exportedPipes }; + } + }; + e.CompileNgModuleMetadata = x; + var I = class { + constructor() { + this.directivesSet = /* @__PURE__ */ new Set(), this.directives = [], this.exportedDirectivesSet = /* @__PURE__ */ new Set(), this.exportedDirectives = [], this.pipesSet = /* @__PURE__ */ new Set(), this.pipes = [], this.exportedPipesSet = /* @__PURE__ */ new Set(), this.exportedPipes = [], this.modulesSet = /* @__PURE__ */ new Set(), this.modules = [], this.entryComponentsSet = /* @__PURE__ */ new Set(), this.entryComponents = [], this.providers = []; + } + addProvider(v, S) { + this.providers.push({ provider: v, module: S }); + } + addDirective(v) { + this.directivesSet.has(v.reference) || (this.directivesSet.add(v.reference), this.directives.push(v)); + } + addExportedDirective(v) { + this.exportedDirectivesSet.has(v.reference) || (this.exportedDirectivesSet.add(v.reference), this.exportedDirectives.push(v)); + } + addPipe(v) { + this.pipesSet.has(v.reference) || (this.pipesSet.add(v.reference), this.pipes.push(v)); + } + addExportedPipe(v) { + this.exportedPipesSet.has(v.reference) || (this.exportedPipesSet.add(v.reference), this.exportedPipes.push(v)); + } + addModule(v) { + this.modulesSet.has(v.reference) || (this.modulesSet.add(v.reference), this.modules.push(v)); + } + addEntryComponent(v) { + this.entryComponentsSet.has(v.componentType) || (this.entryComponentsSet.add(v.componentType), this.entryComponents.push(v)); + } + }; + e.TransitiveCompileNgModuleMetadata = I; + function P(v) { + return v || []; + } + var $ = class { + constructor(v, S) { + let { useClass: b, useValue: B, useExisting: k, useFactory: M, deps: R, multi: q } = S; + this.token = v, this.useClass = b || null, this.useValue = B, this.useExisting = k, this.useFactory = M || null, this.dependencies = R || null, this.multi = !!q; + } + }; + e.ProviderMeta = $; + function D(v) { + return v.reduce((S, b) => { + let B = Array.isArray(b) ? D(b) : b; + return S.concat(B); + }, []); + } + e.flatten = D; + function T(v) { + return v.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/, "ng:///"); + } + function m(v, S, b) { + let B; + return b.isInline ? S.type.reference instanceof r.StaticSymbol ? B = `${S.type.reference.filePath}.${S.type.reference.name}.html` : B = `${u(v)}/${u(S.type)}.html` : B = b.templateUrl, S.type.reference instanceof r.StaticSymbol ? B : T(B); + } + e.templateSourceUrl = m; + function C(v, S) { + let b = v.moduleUrl.split(/\/\\/g), B = b[b.length - 1]; + return T(`css/${S}${B}.ngstyle.js`); + } + e.sharedStylesheetJitUrl = C; + function o(v) { + return T(`${u(v.type)}/module.ngfactory.js`); + } + e.ngModuleJitUrl = o; + function d(v, S) { + return T(`${u(v)}/${u(S.type)}.ngfactory.js`); + } + e.templateJitUrl = d; + } }), Ag = te({ "node_modules/angular-html-parser/lib/compiler/src/parse_util.js"(e) { + "use strict"; + ne(), Object.defineProperty(e, "__esModule", { value: true }); + var r = vg(), t2 = Fg(), s = class { + constructor(y, h, g, c) { + this.file = y, this.offset = h, this.line = g, this.col = c; + } + toString() { + return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url; + } + moveBy(y) { + let h = this.file.content, g = h.length, c = this.offset, f = this.line, F = this.col; + for (; c > 0 && y < 0; ) + if (c--, y++, h.charCodeAt(c) == r.$LF) { + f--; + let w = h.substr(0, c - 1).lastIndexOf(String.fromCharCode(r.$LF)); + F = w > 0 ? c - w : c; + } else + F--; + for (; c < g && y > 0; ) { + let _ = h.charCodeAt(c); + c++, y--, _ == r.$LF ? (f++, F = 0) : F++; + } + return new s(this.file, c, f, F); + } + getContext(y, h) { + let g = this.file.content, c = this.offset; + if (c != null) { + c > g.length - 1 && (c = g.length - 1); + let f = c, F = 0, _ = 0; + for (; F < y && c > 0 && (c--, F++, !(g[c] == ` +` && ++_ == h)); ) + ; + for (F = 0, _ = 0; F < y && f < g.length - 1 && (f++, F++, !(g[f] == ` +` && ++_ == h)); ) + ; + return { before: g.substring(c, this.offset), after: g.substring(this.offset, f + 1) }; + } + return null; + } + }; + e.ParseLocation = s; + var a = class { + constructor(y, h) { + this.content = y, this.url = h; + } + }; + e.ParseSourceFile = a; + var n = class { + constructor(y, h) { + let g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + this.start = y, this.end = h, this.details = g; + } + toString() { + return this.start.file.content.substring(this.start.offset, this.end.offset); + } + }; + e.ParseSourceSpan = n, e.EMPTY_PARSE_LOCATION = new s(new a("", ""), 0, 0, 0), e.EMPTY_SOURCE_SPAN = new n(e.EMPTY_PARSE_LOCATION, e.EMPTY_PARSE_LOCATION); + var u; + (function(y) { + y[y.WARNING = 0] = "WARNING", y[y.ERROR = 1] = "ERROR"; + })(u = e.ParseErrorLevel || (e.ParseErrorLevel = {})); + var i = class { + constructor(y, h) { + let g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : u.ERROR; + this.span = y, this.msg = h, this.level = g; + } + contextualMessage() { + let y = this.span.start.getContext(100, 3); + return y ? `${this.msg} ("${y.before}[${u[this.level]} ->]${y.after}")` : this.msg; + } + toString() { + let y = this.span.details ? `, ${this.span.details}` : ""; + return `${this.contextualMessage()}: ${this.span.start}${y}`; + } + }; + e.ParseError = i; + function l(y, h) { + let g = t2.identifierModuleUrl(h), c = g != null ? `in ${y} ${t2.identifierName(h)} in ${g}` : `in ${y} ${t2.identifierName(h)}`, f = new a("", c); + return new n(new s(f, -1, -1, -1), new s(f, -1, -1, -1)); + } + e.typeSourceSpan = l; + function p2(y, h, g) { + let c = `in ${y} ${h} in ${g}`, f = new a("", c); + return new n(new s(f, -1, -1, -1), new s(f, -1, -1, -1)); + } + e.r3JitTypeSourceSpan = p2; + } }), Sg = te({ "src/language-html/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var { ParseSourceSpan: t2 } = Ag(), { htmlTrim: s, getLeadingAndTrailingHtmlWhitespace: a, hasHtmlWhitespace: n, canHaveInterpolation: u, getNodeCssStyleDisplay: i, isDanglingSpaceSensitiveNode: l, isIndentationSensitiveNode: p2, isLeadingSpaceSensitiveNode: y, isTrailingSpaceSensitiveNode: h, isWhitespaceSensitiveNode: g, isVueScriptTag: c } = Rt(), f = [_, w, N, I, P, T, $, D, m, x, C]; + function F(o, d) { + for (let v of f) + v(o, d); + return o; + } + function _(o) { + o.walk((d) => { + if (d.type === "element" && d.tagDefinition.ignoreFirstLf && d.children.length > 0 && d.children[0].type === "text" && d.children[0].value[0] === ` +`) { + let v = d.children[0]; + v.value.length === 1 ? d.removeChild(v) : v.value = v.value.slice(1); + } + }); + } + function w(o) { + let d = (v) => v.type === "element" && v.prev && v.prev.type === "ieConditionalStartComment" && v.prev.sourceSpan.end.offset === v.startSourceSpan.start.offset && v.firstChild && v.firstChild.type === "ieConditionalEndComment" && v.firstChild.sourceSpan.start.offset === v.startSourceSpan.end.offset; + o.walk((v) => { + if (v.children) + for (let S = 0; S < v.children.length; S++) { + let b = v.children[S]; + if (!d(b)) + continue; + let B = b.prev, k = b.firstChild; + v.removeChild(B), S--; + let M = new t2(B.sourceSpan.start, k.sourceSpan.end), R = new t2(M.start, b.sourceSpan.end); + b.condition = B.condition, b.sourceSpan = R, b.startSourceSpan = M, b.removeChild(k); + } + }); + } + function E(o, d, v) { + o.walk((S) => { + if (S.children) + for (let b = 0; b < S.children.length; b++) { + let B = S.children[b]; + if (B.type !== "text" && !d(B)) + continue; + B.type !== "text" && (B.type = "text", B.value = v(B)); + let k = B.prev; + !k || k.type !== "text" || (k.value += B.value, k.sourceSpan = new t2(k.sourceSpan.start, B.sourceSpan.end), S.removeChild(B), b--); + } + }); + } + function N(o) { + return E(o, (d) => d.type === "cdata", (d) => ``); + } + function x(o) { + let d = (v) => v.type === "element" && v.attrs.length === 0 && v.children.length === 1 && v.firstChild.type === "text" && !n(v.children[0].value) && !v.firstChild.hasLeadingSpaces && !v.firstChild.hasTrailingSpaces && v.isLeadingSpaceSensitive && !v.hasLeadingSpaces && v.isTrailingSpaceSensitive && !v.hasTrailingSpaces && v.prev && v.prev.type === "text" && v.next && v.next.type === "text"; + o.walk((v) => { + if (v.children) + for (let S = 0; S < v.children.length; S++) { + let b = v.children[S]; + if (!d(b)) + continue; + let B = b.prev, k = b.next; + B.value += `<${b.rawName}>` + b.firstChild.value + `` + k.value, B.sourceSpan = new t2(B.sourceSpan.start, k.sourceSpan.end), B.isTrailingSpaceSensitive = k.isTrailingSpaceSensitive, B.hasTrailingSpaces = k.hasTrailingSpaces, v.removeChild(b), S--, v.removeChild(k); + } + }); + } + function I(o, d) { + if (d.parser === "html") + return; + let v = /{{(.+?)}}/s; + o.walk((S) => { + if (u(S)) + for (let b of S.children) { + if (b.type !== "text") + continue; + let B = b.sourceSpan.start, k = null, M = b.value.split(v); + for (let R = 0; R < M.length; R++, B = k) { + let q = M[R]; + if (R % 2 === 0) { + k = B.moveBy(q.length), q.length > 0 && S.insertChildBefore(b, { type: "text", value: q, sourceSpan: new t2(B, k) }); + continue; + } + k = B.moveBy(q.length + 4), S.insertChildBefore(b, { type: "interpolation", sourceSpan: new t2(B, k), children: q.length === 0 ? [] : [{ type: "text", value: q, sourceSpan: new t2(B.moveBy(2), k.moveBy(-2)) }] }); + } + S.removeChild(b); + } + }); + } + function P(o) { + o.walk((d) => { + if (!d.children) + return; + if (d.children.length === 0 || d.children.length === 1 && d.children[0].type === "text" && s(d.children[0].value).length === 0) { + d.hasDanglingSpaces = d.children.length > 0, d.children = []; + return; + } + let v = g(d), S = p2(d); + if (!v) + for (let b = 0; b < d.children.length; b++) { + let B = d.children[b]; + if (B.type !== "text") + continue; + let { leadingWhitespace: k, text: M, trailingWhitespace: R } = a(B.value), q = B.prev, J = B.next; + M ? (B.value = M, B.sourceSpan = new t2(B.sourceSpan.start.moveBy(k.length), B.sourceSpan.end.moveBy(-R.length)), k && (q && (q.hasTrailingSpaces = true), B.hasLeadingSpaces = true), R && (B.hasTrailingSpaces = true, J && (J.hasLeadingSpaces = true))) : (d.removeChild(B), b--, (k || R) && (q && (q.hasTrailingSpaces = true), J && (J.hasLeadingSpaces = true))); + } + d.isWhitespaceSensitive = v, d.isIndentationSensitive = S; + }); + } + function $(o) { + o.walk((d) => { + d.isSelfClosing = !d.children || d.type === "element" && (d.tagDefinition.isVoid || d.startSourceSpan === d.endSourceSpan); + }); + } + function D(o, d) { + o.walk((v) => { + v.type === "element" && (v.hasHtmComponentClosingTag = v.endSourceSpan && /^<\s*\/\s*\/\s*>$/.test(d.originalText.slice(v.endSourceSpan.start.offset, v.endSourceSpan.end.offset))); + }); + } + function T(o, d) { + o.walk((v) => { + v.cssDisplay = i(v, d); + }); + } + function m(o, d) { + o.walk((v) => { + let { children: S } = v; + if (S) { + if (S.length === 0) { + v.isDanglingSpaceSensitive = l(v); + return; + } + for (let b of S) + b.isLeadingSpaceSensitive = y(b, d), b.isTrailingSpaceSensitive = h(b, d); + for (let b = 0; b < S.length; b++) { + let B = S[b]; + B.isLeadingSpaceSensitive = (b === 0 || B.prev.isTrailingSpaceSensitive) && B.isLeadingSpaceSensitive, B.isTrailingSpaceSensitive = (b === S.length - 1 || B.next.isLeadingSpaceSensitive) && B.isTrailingSpaceSensitive; + } + } + }); + } + function C(o, d) { + if (d.parser === "vue") { + let v = o.children.find((b) => c(b, d)); + if (!v) + return; + let { lang: S } = v.attrMap; + (S === "ts" || S === "typescript") && (d.__should_parse_vue_template_with_ts = true); + } + } + r.exports = F; + } }), xg = te({ "src/language-html/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return /^\s*/.test(a); + } + function s(a) { + return ` + +` + a.replace(/^\s*\n/, ""); + } + r.exports = { hasPragma: t2, insertPragma: s }; + } }), au = te({ "src/language-html/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.sourceSpan.start.offset; + } + function s(a) { + return a.sourceSpan.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), ur = te({ "src/language-html/print/tag.js"(e, r) { + "use strict"; + ne(); + var t2 = Zt(), { isNonEmptyArray: s } = Ue(), { builders: { indent: a, join: n, line: u, softline: i, hardline: l }, utils: { replaceTextEndOfLine: p2 } } = qe(), { locStart: y, locEnd: h } = au(), { isTextLikeNode: g, getLastDescendant: c, isPreLikeNode: f, hasPrettierIgnore: F, shouldPreserveContent: _, isVueSfcBlock: w } = Rt(); + function E(L, Q) { + return [L.isSelfClosing ? "" : N(L, Q), x(L, Q)]; + } + function N(L, Q) { + return L.lastChild && o(L.lastChild) ? "" : [I(L, Q), $(L, Q)]; + } + function x(L, Q) { + return (L.next ? m(L.next) : C(L.parent)) ? "" : [D(L, Q), P(L, Q)]; + } + function I(L, Q) { + return C(L) ? D(L.lastChild, Q) : ""; + } + function P(L, Q) { + return o(L) ? $(L.parent, Q) : d(L) ? q(L.next) : ""; + } + function $(L, Q) { + if (t2(!L.isSelfClosing), T(L, Q)) + return ""; + switch (L.type) { + case "ieConditionalComment": + return ""; + case "ieConditionalStartComment": + return "]>"; + case "interpolation": + return "}}"; + case "element": + if (L.isSelfClosing) + return "/>"; + default: + return ">"; + } + } + function T(L, Q) { + return !L.isSelfClosing && !L.endSourceSpan && (F(L) || _(L.parent, Q)); + } + function m(L) { + return L.prev && L.prev.type !== "docType" && !g(L.prev) && L.isLeadingSpaceSensitive && !L.hasLeadingSpaces; + } + function C(L) { + return L.lastChild && L.lastChild.isTrailingSpaceSensitive && !L.lastChild.hasTrailingSpaces && !g(c(L.lastChild)) && !f(L); + } + function o(L) { + return !L.next && !L.hasTrailingSpaces && L.isTrailingSpaceSensitive && g(c(L)); + } + function d(L) { + return L.next && !g(L.next) && g(L) && L.isTrailingSpaceSensitive && !L.hasTrailingSpaces; + } + function v(L) { + let Q = L.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s); + return Q ? Q[1] ? Q[1].split(/\s+/) : true : false; + } + function S(L) { + return !L.prev && L.isLeadingSpaceSensitive && !L.hasLeadingSpaces; + } + function b(L, Q, V) { + let j = L.getValue(); + if (!s(j.attrs)) + return j.isSelfClosing ? " " : ""; + let Y = j.prev && j.prev.type === "comment" && v(j.prev.value), ie = typeof Y == "boolean" ? () => Y : Array.isArray(Y) ? (ue) => Y.includes(ue.rawName) : () => false, ee = L.map((ue) => { + let Fe = ue.getValue(); + return ie(Fe) ? p2(Q.originalText.slice(y(Fe), h(Fe))) : V(); + }, "attrs"), ce = j.type === "element" && j.fullName === "script" && j.attrs.length === 1 && j.attrs[0].fullName === "src" && j.children.length === 0, K = Q.singleAttributePerLine && j.attrs.length > 1 && !w(j, Q) ? l : u, de = [a([ce ? " " : u, n(K, ee)])]; + return j.firstChild && S(j.firstChild) || j.isSelfClosing && C(j.parent) || ce ? de.push(j.isSelfClosing ? " " : "") : de.push(Q.bracketSameLine ? j.isSelfClosing ? " " : "" : j.isSelfClosing ? u : i), de; + } + function B(L) { + return L.firstChild && S(L.firstChild) ? "" : J(L); + } + function k(L, Q, V) { + let j = L.getValue(); + return [M(j, Q), b(L, Q, V), j.isSelfClosing ? "" : B(j)]; + } + function M(L, Q) { + return L.prev && d(L.prev) ? "" : [R(L, Q), q(L)]; + } + function R(L, Q) { + return S(L) ? J(L.parent) : m(L) ? D(L.prev, Q) : ""; + } + function q(L) { + switch (L.type) { + case "ieConditionalComment": + case "ieConditionalStartComment": + return `<${L.rawName}`; + default: + return `<${L.rawName}`; + } + } + function J(L) { + switch (t2(!L.isSelfClosing), L.type) { + case "ieConditionalComment": + return "]>"; + case "element": + if (L.condition) + return ">"; + default: + return ">"; + } + } + r.exports = { printClosingTag: E, printClosingTagStart: N, printClosingTagStartMarker: $, printClosingTagEndMarker: D, printClosingTagSuffix: P, printClosingTagEnd: x, needsToBorrowLastChildClosingTagEndMarker: C, needsToBorrowParentClosingTagStartMarker: o, needsToBorrowPrevClosingTagEndMarker: m, printOpeningTag: k, printOpeningTagStart: M, printOpeningTagPrefix: R, printOpeningTagStartMarker: q, printOpeningTagEndMarker: J, needsToBorrowNextOpeningTagStartMarker: d, needsToBorrowParentOpeningTagEndMarker: S }; + } }), bg = te({ "node_modules/parse-srcset/src/parse-srcset.js"(e, r) { + ne(), function(t2, s) { + typeof define == "function" && define.amd ? define([], s) : typeof r == "object" && r.exports ? r.exports = s() : t2.parseSrcset = s(); + }(e, function() { + return function(t2, s) { + var a = s && s.logger || console; + function n($) { + return $ === " " || $ === " " || $ === ` +` || $ === "\f" || $ === "\r"; + } + function u($) { + var D, T = $.exec(t2.substring(N)); + if (T) + return D = T[0], N += D.length, D; + } + for (var i = t2.length, l = /^[ \t\n\r\u000c]+/, p2 = /^[, \t\n\r\u000c]+/, y = /^[^ \t\n\r\u000c]+/, h = /[,]+$/, g = /^\d+$/, c = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, f, F, _, w, E, N = 0, x = []; ; ) { + if (u(p2), N >= i) + return x; + f = u(y), F = [], f.slice(-1) === "," ? (f = f.replace(h, ""), P()) : I(); + } + function I() { + for (u(l), _ = "", w = "in descriptor"; ; ) { + if (E = t2.charAt(N), w === "in descriptor") + if (n(E)) + _ && (F.push(_), _ = "", w = "after descriptor"); + else if (E === ",") { + N += 1, _ && F.push(_), P(); + return; + } else if (E === "(") + _ = _ + E, w = "in parens"; + else if (E === "") { + _ && F.push(_), P(); + return; + } else + _ = _ + E; + else if (w === "in parens") + if (E === ")") + _ = _ + E, w = "in descriptor"; + else if (E === "") { + F.push(_), P(); + return; + } else + _ = _ + E; + else if (w === "after descriptor" && !n(E)) + if (E === "") { + P(); + return; + } else + w = "in descriptor", N -= 1; + N += 1; + } + } + function P() { + var $ = false, D, T, m, C, o = {}, d, v, S, b, B; + for (C = 0; C < F.length; C++) + d = F[C], v = d[d.length - 1], S = d.substring(0, d.length - 1), b = parseInt(S, 10), B = parseFloat(S), g.test(S) && v === "w" ? ((D || T) && ($ = true), b === 0 ? $ = true : D = b) : c.test(S) && v === "x" ? ((D || T || m) && ($ = true), B < 0 ? $ = true : T = B) : g.test(S) && v === "h" ? ((m || T) && ($ = true), b === 0 ? $ = true : m = b) : $ = true; + $ ? a && a.error && a.error("Invalid srcset descriptor found in '" + t2 + "' at '" + d + "'.") : (o.url = f, D && (o.w = D), T && (o.d = T), m && (o.h = m), x.push(o)); + } + }; + }); + } }), Tg = te({ "src/language-html/syntax-attribute.js"(e, r) { + "use strict"; + ne(); + var t2 = bg(), { builders: { ifBreak: s, join: a, line: n } } = qe(); + function u(l) { + let p2 = t2(l, { logger: { error(I) { + throw new Error(I); + } } }), y = p2.some((I) => { + let { w: P } = I; + return P; + }), h = p2.some((I) => { + let { h: P } = I; + return P; + }), g = p2.some((I) => { + let { d: P } = I; + return P; + }); + if (y + h + g > 1) + throw new Error("Mixed descriptor in srcset is not supported"); + let c = y ? "w" : h ? "h" : "d", f = y ? "w" : h ? "h" : "x", F = (I) => Math.max(...I), _ = p2.map((I) => I.url), w = F(_.map((I) => I.length)), E = p2.map((I) => I[c]).map((I) => I ? I.toString() : ""), N = E.map((I) => { + let P = I.indexOf("."); + return P === -1 ? I.length : P; + }), x = F(N); + return a([",", n], _.map((I, P) => { + let $ = [I], D = E[P]; + if (D) { + let T = w - I.length + 1, m = x - N[P], C = " ".repeat(T + m); + $.push(s(C, " "), D + f); + } + return $; + })); + } + function i(l) { + return l.trim().split(/\s+/).join(" "); + } + r.exports = { printImgSrcset: u, printClassNames: i }; + } }), Bg = te({ "src/language-html/syntax-vue.js"(e, r) { + "use strict"; + ne(); + var { builders: { group: t2 } } = qe(); + function s(i, l) { + let { left: p2, operator: y, right: h } = a(i); + return [t2(l(`function _(${p2}) {}`, { parser: "babel", __isVueForBindingLeft: true })), " ", y, " ", l(h, { parser: "__js_expression" }, { stripTrailingHardline: true })]; + } + function a(i) { + let l = /(.*?)\s+(in|of)\s+(.*)/s, p2 = /,([^,\]}]*)(?:,([^,\]}]*))?$/, y = /^\(|\)$/g, h = i.match(l); + if (!h) + return; + let g = {}; + if (g.for = h[3].trim(), !g.for) + return; + let c = h[1].trim().replace(y, ""), f = c.match(p2); + f ? (g.alias = c.replace(p2, ""), g.iterator1 = f[1].trim(), f[2] && (g.iterator2 = f[2].trim())) : g.alias = c; + let F = [g.alias, g.iterator1, g.iterator2]; + if (!F.some((_, w) => !_ && (w === 0 || F.slice(w + 1).some(Boolean)))) + return { left: F.filter(Boolean).join(","), operator: h[2], right: g.for }; + } + function n(i, l) { + return l(`function _(${i}) {}`, { parser: "babel", __isVueBindings: true }); + } + function u(i) { + let l = /^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/, p2 = /^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/, y = i.trim(); + return l.test(y) || p2.test(y); + } + r.exports = { isVueEventBindingExpression: u, printVueFor: s, printVueBindings: n }; + } }), Lo = te({ "src/language-html/get-node-content.js"(e, r) { + "use strict"; + ne(); + var { needsToBorrowParentClosingTagStartMarker: t2, printClosingTagStartMarker: s, needsToBorrowLastChildClosingTagEndMarker: a, printClosingTagEndMarker: n, needsToBorrowParentOpeningTagEndMarker: u, printOpeningTagEndMarker: i } = ur(); + function l(p2, y) { + let h = p2.startSourceSpan.end.offset; + p2.firstChild && u(p2.firstChild) && (h -= i(p2).length); + let g = p2.endSourceSpan.start.offset; + return p2.lastChild && t2(p2.lastChild) ? g += s(p2, y).length : a(p2) && (g -= n(p2.lastChild, y).length), y.originalText.slice(h, g); + } + r.exports = l; + } }), Ng = te({ "src/language-html/embed.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, group: s, hardline: a, indent: n, line: u, fill: i, softline: l }, utils: { mapDoc: p2, replaceTextEndOfLine: y } } = qe(), h = su(), { printClosingTag: g, printClosingTagSuffix: c, needsToBorrowPrevClosingTagEndMarker: f, printOpeningTagPrefix: F, printOpeningTag: _ } = ur(), { printImgSrcset: w, printClassNames: E } = Tg(), { printVueFor: N, printVueBindings: x, isVueEventBindingExpression: I } = Bg(), { isScriptLikeTag: P, isVueNonHtmlBlock: $, inferScriptParser: D, htmlTrimPreserveIndentation: T, dedentString: m, unescapeQuoteEntities: C, isVueSlotAttribute: o, isVueSfcBindingsAttribute: d, getTextValueParts: v } = Rt(), S = Lo(); + function b(k, M, R) { + let q = (ee) => new RegExp(ee.join("|")).test(k.fullName), J = () => C(k.value), L = false, Q = (ee, ce) => { + let W = ee.type === "NGRoot" ? ee.node.type === "NGMicrosyntax" && ee.node.body.length === 1 && ee.node.body[0].type === "NGMicrosyntaxExpression" ? ee.node.body[0].expression : ee.node : ee.type === "JsExpressionRoot" ? ee.node : ee; + W && (W.type === "ObjectExpression" || W.type === "ArrayExpression" || ce.parser === "__vue_expression" && (W.type === "TemplateLiteral" || W.type === "StringLiteral")) && (L = true); + }, V = (ee) => s(ee), j = function(ee) { + let ce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return s([n([l, ee]), ce ? l : ""]); + }, Y = (ee) => L ? V(ee) : j(ee), ie = (ee, ce) => M(ee, Object.assign({ __onHtmlBindingRoot: Q, __embeddedInHtml: true }, ce)); + if (k.fullName === "srcset" && (k.parent.fullName === "img" || k.parent.fullName === "source")) + return j(w(J())); + if (k.fullName === "class" && !R.parentParser) { + let ee = J(); + if (!ee.includes("{{")) + return E(ee); + } + if (k.fullName === "style" && !R.parentParser) { + let ee = J(); + if (!ee.includes("{{")) + return j(ie(ee, { parser: "css", __isHTMLStyleAttribute: true })); + } + if (R.parser === "vue") { + if (k.fullName === "v-for") + return N(J(), ie); + if (o(k) || d(k, R)) + return x(J(), ie); + let ee = ["^@", "^v-on:"], ce = ["^:", "^v-bind:"], W = ["^v-"]; + if (q(ee)) { + let K = J(), de = I(K) ? "__js_expression" : R.__should_parse_vue_template_with_ts ? "__vue_ts_event_binding" : "__vue_event_binding"; + return Y(ie(K, { parser: de })); + } + if (q(ce)) + return Y(ie(J(), { parser: "__vue_expression" })); + if (q(W)) + return Y(ie(J(), { parser: "__js_expression" })); + } + if (R.parser === "angular") { + let ee = (z, U) => ie(z, Object.assign(Object.assign({}, U), {}, { trailingComma: "none" })), ce = ["^\\*"], W = ["^\\(.+\\)$", "^on-"], K = ["^\\[.+\\]$", "^bind(on)?-", "^ng-(if|show|hide|class|style)$"], de = ["^i18n(-.+)?$"]; + if (q(W)) + return Y(ee(J(), { parser: "__ng_action" })); + if (q(K)) + return Y(ee(J(), { parser: "__ng_binding" })); + if (q(de)) { + let z = J().trim(); + return j(i(v(k, z)), !z.includes("@@")); + } + if (q(ce)) + return Y(ee(J(), { parser: "__ng_directive" })); + let ue = /{{(.+?)}}/s, Fe = J(); + if (ue.test(Fe)) { + let z = []; + for (let [U, Z] of Fe.split(ue).entries()) + if (U % 2 === 0) + z.push(y(Z)); + else + try { + z.push(s(["{{", n([u, ee(Z, { parser: "__ng_interpolation", __isInHtmlInterpolation: true })]), u, "}}"])); + } catch { + z.push("{{", y(Z), "}}"); + } + return s(z); + } + } + return null; + } + function B(k, M, R, q) { + let J = k.getValue(); + switch (J.type) { + case "element": { + if (P(J) || J.type === "interpolation") + return; + if (!J.isSelfClosing && $(J, q)) { + let L = D(J, q); + if (!L) + return; + let Q = S(J, q), V = /^\s*$/.test(Q), j = ""; + return V || (j = R(T(Q), { parser: L, __embeddedInHtml: true }, { stripTrailingHardline: true }), V = j === ""), [F(J, q), s(_(k, q, M)), V ? "" : a, j, V ? "" : a, g(J, q), c(J, q)]; + } + break; + } + case "text": { + if (P(J.parent)) { + let L = D(J.parent, q); + if (L) { + let Q = L === "markdown" ? m(J.value.replace(/^[^\S\n]*\n/, "")) : J.value, V = { parser: L, __embeddedInHtml: true }; + if (q.parser === "html" && L === "babel") { + let j = "script", { attrMap: Y } = J.parent; + Y && (Y.type === "module" || Y.type === "text/babel" && Y["data-type"] === "module") && (j = "module"), V.__babelSourceType = j; + } + return [t2, F(J, q), R(Q, V, { stripTrailingHardline: true }), c(J, q)]; + } + } else if (J.parent.type === "interpolation") { + let L = { __isInHtmlInterpolation: true, __embeddedInHtml: true }; + return q.parser === "angular" ? (L.parser = "__ng_interpolation", L.trailingComma = "none") : q.parser === "vue" ? L.parser = q.__should_parse_vue_template_with_ts ? "__vue_ts_expression" : "__vue_expression" : L.parser = "__js_expression", [n([u, R(J.value, L, { stripTrailingHardline: true })]), J.parent.next && f(J.parent.next) ? " " : u]; + } + break; + } + case "attribute": { + if (!J.value) + break; + if (/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(q.originalText.slice(J.valueSpan.start.offset, J.valueSpan.end.offset))) + return [J.rawName, "=", J.value]; + if (q.parser === "lwc" && /^{.*}$/s.test(q.originalText.slice(J.valueSpan.start.offset, J.valueSpan.end.offset))) + return [J.rawName, "=", J.value]; + let L = b(J, (Q, V) => R(Q, Object.assign({ __isInHtmlAttribute: true, __embeddedInHtml: true }, V), { stripTrailingHardline: true }), q); + if (L) + return [J.rawName, '="', s(p2(L, (Q) => typeof Q == "string" ? Q.replace(/"/g, """) : Q)), '"']; + break; + } + case "front-matter": + return h(J, R); + } + } + r.exports = B; + } }), Oo = te({ "src/language-html/print/children.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, group: s, ifBreak: a, line: n, softline: u, hardline: i }, utils: { replaceTextEndOfLine: l } } = qe(), { locStart: p2, locEnd: y } = au(), { forceBreakChildren: h, forceNextEmptyLine: g, isTextLikeNode: c, hasPrettierIgnore: f, preferHardlineAsLeadingSpaces: F } = Rt(), { printOpeningTagPrefix: _, needsToBorrowNextOpeningTagStartMarker: w, printOpeningTagStartMarker: E, needsToBorrowPrevClosingTagEndMarker: N, printClosingTagEndMarker: x, printClosingTagSuffix: I, needsToBorrowParentClosingTagStartMarker: P } = ur(); + function $(m, C, o) { + let d = m.getValue(); + return f(d) ? [_(d, C), ...l(C.originalText.slice(p2(d) + (d.prev && w(d.prev) ? E(d).length : 0), y(d) - (d.next && N(d.next) ? x(d, C).length : 0))), I(d, C)] : o(); + } + function D(m, C) { + return c(m) && c(C) ? m.isTrailingSpaceSensitive ? m.hasTrailingSpaces ? F(C) ? i : n : "" : F(C) ? i : u : w(m) && (f(C) || C.firstChild || C.isSelfClosing || C.type === "element" && C.attrs.length > 0) || m.type === "element" && m.isSelfClosing && N(C) ? "" : !C.isLeadingSpaceSensitive || F(C) || N(C) && m.lastChild && P(m.lastChild) && m.lastChild.lastChild && P(m.lastChild.lastChild) ? i : C.hasLeadingSpaces ? n : u; + } + function T(m, C, o) { + let d = m.getValue(); + if (h(d)) + return [t2, ...m.map((S) => { + let b = S.getValue(), B = b.prev ? D(b.prev, b) : ""; + return [B ? [B, g(b.prev) ? i : ""] : "", $(S, C, o)]; + }, "children")]; + let v = d.children.map(() => Symbol("")); + return m.map((S, b) => { + let B = S.getValue(); + if (c(B)) { + if (B.prev && c(B.prev)) { + let Q = D(B.prev, B); + if (Q) + return g(B.prev) ? [i, i, $(S, C, o)] : [Q, $(S, C, o)]; + } + return $(S, C, o); + } + let k = [], M = [], R = [], q = [], J = B.prev ? D(B.prev, B) : "", L = B.next ? D(B, B.next) : ""; + return J && (g(B.prev) ? k.push(i, i) : J === i ? k.push(i) : c(B.prev) ? M.push(J) : M.push(a("", u, { groupId: v[b - 1] }))), L && (g(B) ? c(B.next) && q.push(i, i) : L === i ? c(B.next) && q.push(i) : R.push(L)), [...k, s([...M, s([$(S, C, o), ...R], { id: v[b] })]), ...q]; + }, "children"); + } + r.exports = { printChildren: T }; + } }), wg = te({ "src/language-html/print/element.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, dedentToRoot: s, group: a, ifBreak: n, indentIfBreak: u, indent: i, line: l, softline: p2 }, utils: { replaceTextEndOfLine: y } } = qe(), h = Lo(), { shouldPreserveContent: g, isScriptLikeTag: c, isVueCustomBlock: f, countParents: F, forceBreakContent: _ } = Rt(), { printOpeningTagPrefix: w, printOpeningTag: E, printClosingTagSuffix: N, printClosingTag: x, needsToBorrowPrevClosingTagEndMarker: I, needsToBorrowLastChildClosingTagEndMarker: P } = ur(), { printChildren: $ } = Oo(); + function D(T, m, C) { + let o = T.getValue(); + if (g(o, m)) + return [w(o, m), a(E(T, m, C)), ...y(h(o, m)), ...x(o, m), N(o, m)]; + let d = o.children.length === 1 && o.firstChild.type === "interpolation" && o.firstChild.isLeadingSpaceSensitive && !o.firstChild.hasLeadingSpaces && o.lastChild.isTrailingSpaceSensitive && !o.lastChild.hasTrailingSpaces, v = Symbol("element-attr-group-id"), S = (M) => a([a(E(T, m, C), { id: v }), M, x(o, m)]), b = (M) => d ? u(M, { groupId: v }) : (c(o) || f(o, m)) && o.parent.type === "root" && m.parser === "vue" && !m.vueIndentScriptAndStyle ? M : i(M), B = () => d ? n(p2, "", { groupId: v }) : o.firstChild.hasLeadingSpaces && o.firstChild.isLeadingSpaceSensitive ? l : o.firstChild.type === "text" && o.isWhitespaceSensitive && o.isIndentationSensitive ? s(p2) : p2, k = () => (o.next ? I(o.next) : P(o.parent)) ? o.lastChild.hasTrailingSpaces && o.lastChild.isTrailingSpaceSensitive ? " " : "" : d ? n(p2, "", { groupId: v }) : o.lastChild.hasTrailingSpaces && o.lastChild.isTrailingSpaceSensitive ? l : (o.lastChild.type === "comment" || o.lastChild.type === "text" && o.isWhitespaceSensitive && o.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${m.tabWidth * F(T, (R) => R.parent && R.parent.type !== "root")}}$`).test(o.lastChild.value) ? "" : p2; + return o.children.length === 0 ? S(o.hasDanglingSpaces && o.isDanglingSpaceSensitive ? l : "") : S([_(o) ? t2 : "", b([B(), $(T, m, C)]), k()]); + } + r.exports = { printElement: D }; + } }), _g = te({ "src/language-html/printer-html.js"(e, r) { + "use strict"; + ne(); + var { builders: { fill: t2, group: s, hardline: a, literalline: n }, utils: { cleanDoc: u, getDocParts: i, isConcat: l, replaceTextEndOfLine: p2 } } = qe(), y = gg(), { countChars: h, unescapeQuoteEntities: g, getTextValueParts: c } = Rt(), f = Sg(), { insertPragma: F } = xg(), { locStart: _, locEnd: w } = au(), E = Ng(), { printClosingTagSuffix: N, printClosingTagEnd: x, printOpeningTagPrefix: I, printOpeningTagStart: P } = ur(), { printElement: $ } = wg(), { printChildren: D } = Oo(); + function T(m, C, o) { + let d = m.getValue(); + switch (d.type) { + case "front-matter": + return p2(d.raw); + case "root": + return C.__onHtmlRoot && C.__onHtmlRoot(d), [s(D(m, C, o)), a]; + case "element": + case "ieConditionalComment": + return $(m, C, o); + case "ieConditionalStartComment": + case "ieConditionalEndComment": + return [P(d), x(d)]; + case "interpolation": + return [P(d, C), ...m.map(o, "children"), x(d, C)]; + case "text": { + if (d.parent.type === "interpolation") { + let S = /\n[^\S\n]*$/, b = S.test(d.value), B = b ? d.value.replace(S, "") : d.value; + return [...p2(B), b ? a : ""]; + } + let v = u([I(d, C), ...c(d), N(d, C)]); + return l(v) || v.type === "fill" ? t2(i(v)) : v; + } + case "docType": + return [s([P(d, C), " ", d.value.replace(/^html\b/i, "html").replace(/\s+/g, " ")]), x(d, C)]; + case "comment": + return [I(d, C), ...p2(C.originalText.slice(_(d), w(d)), n), N(d, C)]; + case "attribute": { + if (d.value === null) + return d.rawName; + let v = g(d.value), S = h(v, "'"), b = h(v, '"'), B = S < b ? "'" : '"'; + return [d.rawName, "=", B, ...p2(B === '"' ? v.replace(/"/g, """) : v.replace(/'/g, "'")), B]; + } + default: + throw new Error(`Unexpected node type ${d.type}`); + } + } + r.exports = { preprocess: f, print: T, insertPragma: F, massageAstNode: y, embed: E }; + } }), Pg = te({ "src/language-html/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(), s = "HTML"; + r.exports = { bracketSameLine: t2.bracketSameLine, htmlWhitespaceSensitivity: { since: "1.15.0", category: s, type: "choice", default: "css", description: "How to handle whitespaces in HTML.", choices: [{ value: "css", description: "Respect the default value of CSS display property." }, { value: "strict", description: "Whitespaces are considered sensitive." }, { value: "ignore", description: "Whitespaces are considered insensitive." }] }, singleAttributePerLine: t2.singleAttributePerLine, vueIndentScriptAndStyle: { since: "1.19.0", category: s, type: "boolean", default: false, description: "Indent script and style tags in Vue files." } }; + } }), Ig = te({ "src/language-html/parsers.js"() { + ne(); + } }), On = te({ "node_modules/linguist-languages/data/HTML.json"(e, r) { + r.exports = { name: "HTML", type: "markup", tmScope: "text.html.basic", aceMode: "html", codemirrorMode: "htmlmixed", codemirrorMimeType: "text/html", color: "#e34c26", aliases: ["xhtml"], extensions: [".html", ".hta", ".htm", ".html.hl", ".inc", ".xht", ".xhtml"], languageId: 146 }; + } }), kg = te({ "node_modules/linguist-languages/data/Vue.json"(e, r) { + r.exports = { name: "Vue", type: "markup", color: "#41b883", extensions: [".vue"], tmScope: "text.html.vue", aceMode: "html", languageId: 391 }; + } }), Lg = te({ "src/language-html/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = _g(), a = Pg(), n = Ig(), u = [t2(On(), () => ({ name: "Angular", since: "1.15.0", parsers: ["angular"], vscodeLanguageIds: ["html"], extensions: [".component.html"], filenames: [] })), t2(On(), (l) => ({ since: "1.15.0", parsers: ["html"], vscodeLanguageIds: ["html"], extensions: [...l.extensions, ".mjml"] })), t2(On(), () => ({ name: "Lightning Web Components", since: "1.17.0", parsers: ["lwc"], vscodeLanguageIds: ["html"], extensions: [], filenames: [] })), t2(kg(), () => ({ since: "1.10.0", parsers: ["vue"], vscodeLanguageIds: ["vue"] }))], i = { html: s }; + r.exports = { languages: u, printers: i, options: a, parsers: n }; + } }), Og = te({ "src/language-yaml/pragma.js"(e, r) { + "use strict"; + ne(); + function t2(n) { + return /^\s*@(?:prettier|format)\s*$/.test(n); + } + function s(n) { + return /^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(n); + } + function a(n) { + return `# @format + +${n}`; + } + r.exports = { isPragma: t2, hasPragma: s, insertPragma: a }; + } }), jg = te({ "src/language-yaml/loc.js"(e, r) { + "use strict"; + ne(); + function t2(a) { + return a.position.start.offset; + } + function s(a) { + return a.position.end.offset; + } + r.exports = { locStart: t2, locEnd: s }; + } }), qg = te({ "src/language-yaml/embed.js"(e, r) { + "use strict"; + ne(); + function t2(s, a, n, u) { + if (s.getValue().type === "root" && u.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(u.filepath)) + return n(u.originalText, Object.assign(Object.assign({}, u), {}, { parser: "json" })); + } + r.exports = t2; + } }), $t = te({ "src/language-yaml/utils.js"(e, r) { + "use strict"; + ne(); + var { getLast: t2, isNonEmptyArray: s } = Ue(); + function a(D, T) { + let m = 0, C = D.stack.length - 1; + for (let o = 0; o < C; o++) { + let d = D.stack[o]; + n(d) && T(d) && m++; + } + return m; + } + function n(D, T) { + return D && typeof D.type == "string" && (!T || T.includes(D.type)); + } + function u(D, T, m) { + return T("children" in D ? Object.assign(Object.assign({}, D), {}, { children: D.children.map((C) => u(C, T, D)) }) : D, m); + } + function i(D, T, m) { + Object.defineProperty(D, T, { get: m, enumerable: false }); + } + function l(D, T) { + let m = 0, C = T.length; + for (let o = D.position.end.offset - 1; o < C; o++) { + let d = T[o]; + if (d === ` +` && m++, m === 1 && /\S/.test(d)) + return false; + if (m === 2) + return true; + } + return false; + } + function p2(D) { + switch (D.getValue().type) { + case "tag": + case "anchor": + case "comment": + return false; + } + let m = D.stack.length; + for (let C = 1; C < m; C++) { + let o = D.stack[C], d = D.stack[C - 1]; + if (Array.isArray(d) && typeof o == "number" && o !== d.length - 1) + return false; + } + return true; + } + function y(D) { + return s(D.children) ? y(t2(D.children)) : D; + } + function h(D) { + return D.value.trim() === "prettier-ignore"; + } + function g(D) { + let T = D.getValue(); + if (T.type === "documentBody") { + let m = D.getParentNode(); + return N(m.head) && h(t2(m.head.endComments)); + } + return F(T) && h(t2(T.leadingComments)); + } + function c(D) { + return !s(D.children) && !f(D); + } + function f(D) { + return F(D) || _(D) || w(D) || E(D) || N(D); + } + function F(D) { + return s(D == null ? void 0 : D.leadingComments); + } + function _(D) { + return s(D == null ? void 0 : D.middleComments); + } + function w(D) { + return D == null ? void 0 : D.indicatorComment; + } + function E(D) { + return D == null ? void 0 : D.trailingComment; + } + function N(D) { + return s(D == null ? void 0 : D.endComments); + } + function x(D) { + let T = [], m; + for (let C of D.split(/( +)/)) + C !== " " ? m === " " ? T.push(C) : T.push((T.pop() || "") + C) : m === void 0 && T.unshift(""), m = C; + return m === " " && T.push((T.pop() || "") + " "), T[0] === "" && (T.shift(), T.unshift(" " + (T.shift() || ""))), T; + } + function I(D, T, m) { + let C = T.split(` +`).map((o, d, v) => d === 0 && d === v.length - 1 ? o : d !== 0 && d !== v.length - 1 ? o.trim() : d === 0 ? o.trimEnd() : o.trimStart()); + return m.proseWrap === "preserve" ? C.map((o) => o.length === 0 ? [] : [o]) : C.map((o) => o.length === 0 ? [] : x(o)).reduce((o, d, v) => v !== 0 && C[v - 1].length > 0 && d.length > 0 && !(D === "quoteDouble" && t2(t2(o)).endsWith("\\")) ? [...o.slice(0, -1), [...t2(o), ...d]] : [...o, d], []).map((o) => m.proseWrap === "never" ? [o.join(" ")] : o); + } + function P(D, T) { + let { parentIndent: m, isLastDescendant: C, options: o } = T, d = D.position.start.line === D.position.end.line ? "" : o.originalText.slice(D.position.start.offset, D.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1], v; + if (D.indent === null) { + let B = d.match(/^(? *)[^\n\r ]/m); + v = B ? B.groups.leadingSpace.length : Number.POSITIVE_INFINITY; + } else + v = D.indent - 1 + m; + let S = d.split(` +`).map((B) => B.slice(v)); + if (o.proseWrap === "preserve" || D.type === "blockLiteral") + return b(S.map((B) => B.length === 0 ? [] : [B])); + return b(S.map((B) => B.length === 0 ? [] : x(B)).reduce((B, k, M) => M !== 0 && S[M - 1].length > 0 && k.length > 0 && !/^\s/.test(k[0]) && !/^\s|\s$/.test(t2(B)) ? [...B.slice(0, -1), [...t2(B), ...k]] : [...B, k], []).map((B) => B.reduce((k, M) => k.length > 0 && /\s$/.test(t2(k)) ? [...k.slice(0, -1), t2(k) + " " + M] : [...k, M], [])).map((B) => o.proseWrap === "never" ? [B.join(" ")] : B)); + function b(B) { + if (D.chomping === "keep") + return t2(B).length === 0 ? B.slice(0, -1) : B; + let k = 0; + for (let M = B.length - 1; M >= 0 && B[M].length === 0; M--) + k++; + return k === 0 ? B : k >= 2 && !C ? B.slice(0, -(k - 1)) : B.slice(0, -k); + } + } + function $(D) { + if (!D) + return true; + switch (D.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": + return true; + default: + return false; + } + } + r.exports = { getLast: t2, getAncestorCount: a, isNode: n, isEmptyNode: c, isInlineNode: $, mapNode: u, defineShortcut: i, isNextLineEmpty: l, isLastDescendantNode: p2, getBlockValueLineContents: P, getFlowScalarLineContents: I, getLastDescendantNode: y, hasPrettierIgnore: g, hasLeadingComments: F, hasMiddleComments: _, hasIndicatorComment: w, hasTrailingComment: E, hasEndComments: N }; + } }), Mg = te({ "src/language-yaml/print-preprocess.js"(e, r) { + "use strict"; + ne(); + var { defineShortcut: t2, mapNode: s } = $t(); + function a(u) { + return s(u, n); + } + function n(u) { + switch (u.type) { + case "document": + t2(u, "head", () => u.children[0]), t2(u, "body", () => u.children[1]); + break; + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + t2(u, "content", () => u.children[0]); + break; + case "mappingItem": + case "flowMappingItem": + t2(u, "key", () => u.children[0]), t2(u, "value", () => u.children[1]); + break; + } + return u; + } + r.exports = a; + } }), Mr = te({ "src/language-yaml/print/misc.js"(e, r) { + "use strict"; + ne(); + var { builders: { softline: t2, align: s } } = qe(), { hasEndComments: a, isNextLineEmpty: n, isNode: u } = $t(), i = /* @__PURE__ */ new WeakMap(); + function l(h, g) { + let c = h.getValue(), f = h.stack[0], F; + return i.has(f) ? F = i.get(f) : (F = /* @__PURE__ */ new Set(), i.set(f, F)), !F.has(c.position.end.line) && (F.add(c.position.end.line), n(c, g) && !p2(h.getParentNode())) ? t2 : ""; + } + function p2(h) { + return a(h) && !u(h, ["documentHead", "documentBody", "flowMapping", "flowSequence"]); + } + function y(h, g) { + return s(" ".repeat(h), g); + } + r.exports = { alignWithSpaces: y, shouldPrintEndComments: p2, printNextEmptyLine: l }; + } }), Rg = te({ "src/language-yaml/print/flow-mapping-sequence.js"(e, r) { + "use strict"; + ne(); + var { builders: { ifBreak: t2, line: s, softline: a, hardline: n, join: u } } = qe(), { isEmptyNode: i, getLast: l, hasEndComments: p2 } = $t(), { printNextEmptyLine: y, alignWithSpaces: h } = Mr(); + function g(f, F, _) { + let w = f.getValue(), E = w.type === "flowMapping", N = E ? "{" : "[", x = E ? "}" : "]", I = a; + E && w.children.length > 0 && _.bracketSpacing && (I = s); + let P = l(w.children), $ = P && P.type === "flowMappingItem" && i(P.key) && i(P.value); + return [N, h(_.tabWidth, [I, c(f, F, _), _.trailingComma === "none" ? "" : t2(","), p2(w) ? [n, u(n, f.map(F, "endComments"))] : ""]), $ ? "" : I, x]; + } + function c(f, F, _) { + let w = f.getValue(); + return f.map((N, x) => [F(), x === w.children.length - 1 ? "" : [",", s, w.children[x].position.start.line !== w.children[x + 1].position.start.line ? y(N, _.originalText) : ""]], "children"); + } + r.exports = { printFlowMapping: g, printFlowSequence: g }; + } }), $g = te({ "src/language-yaml/print/mapping-item.js"(e, r) { + "use strict"; + ne(); + var { builders: { conditionalGroup: t2, group: s, hardline: a, ifBreak: n, join: u, line: i } } = qe(), { hasLeadingComments: l, hasMiddleComments: p2, hasTrailingComment: y, hasEndComments: h, isNode: g, isEmptyNode: c, isInlineNode: f } = $t(), { alignWithSpaces: F } = Mr(); + function _(x, I, P, $, D) { + let { key: T, value: m } = x, C = c(T), o = c(m); + if (C && o) + return ": "; + let d = $("key"), v = E(x) ? " " : ""; + if (o) + return x.type === "flowMappingItem" && I.type === "flowMapping" ? d : x.type === "mappingItem" && w(T.content, D) && !y(T.content) && (!I.tag || I.tag.value !== "tag:yaml.org,2002:set") ? [d, v, ":"] : ["? ", F(2, d)]; + let S = $("value"); + if (C) + return [": ", F(2, S)]; + if (l(m) || !f(T.content)) + return ["? ", F(2, d), a, u("", P.map($, "value", "leadingComments").map((q) => [q, a])), ": ", F(2, S)]; + if (N(T.content) && !l(T.content) && !p2(T.content) && !y(T.content) && !h(T) && !l(m.content) && !p2(m.content) && !h(m) && w(m.content, D)) + return [d, v, ": ", S]; + let b = Symbol("mappingKey"), B = s([n("? "), s(F(2, d), { id: b })]), k = [a, ": ", F(2, S)], M = [v, ":"]; + l(m.content) || h(m) && m.content && !g(m.content, ["mapping", "sequence"]) || I.type === "mapping" && y(T.content) && f(m.content) || g(m.content, ["mapping", "sequence"]) && m.content.tag === null && m.content.anchor === null ? M.push(a) : m.content && M.push(i), M.push(S); + let R = F(D.tabWidth, M); + return w(T.content, D) && !l(T.content) && !p2(T.content) && !h(T) ? t2([[d, R]]) : t2([[B, n(k, R, { groupId: b })]]); + } + function w(x, I) { + if (!x) + return true; + switch (x.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": + break; + case "alias": + return true; + default: + return false; + } + if (I.proseWrap === "preserve") + return x.position.start.line === x.position.end.line; + if (/\\$/m.test(I.originalText.slice(x.position.start.offset, x.position.end.offset))) + return false; + switch (I.proseWrap) { + case "never": + return !x.value.includes(` +`); + case "always": + return !/[\n ]/.test(x.value); + default: + return false; + } + } + function E(x) { + return x.key.content && x.key.content.type === "alias"; + } + function N(x) { + if (!x) + return true; + switch (x.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + return x.position.start.line === x.position.end.line; + case "alias": + return true; + default: + return false; + } + } + r.exports = _; + } }), Vg = te({ "src/language-yaml/print/block.js"(e, r) { + "use strict"; + ne(); + var { builders: { dedent: t2, dedentToRoot: s, fill: a, hardline: n, join: u, line: i, literalline: l, markAsRoot: p2 }, utils: { getDocParts: y } } = qe(), { getAncestorCount: h, getBlockValueLineContents: g, hasIndicatorComment: c, isLastDescendantNode: f, isNode: F } = $t(), { alignWithSpaces: _ } = Mr(); + function w(E, N, x) { + let I = E.getValue(), P = h(E, (C) => F(C, ["sequence", "mapping"])), $ = f(E), D = [I.type === "blockFolded" ? ">" : "|"]; + I.indent !== null && D.push(I.indent.toString()), I.chomping !== "clip" && D.push(I.chomping === "keep" ? "+" : "-"), c(I) && D.push(" ", N("indicatorComment")); + let T = g(I, { parentIndent: P, isLastDescendant: $, options: x }), m = []; + for (let [C, o] of T.entries()) + C === 0 && m.push(n), m.push(a(y(u(i, o)))), C !== T.length - 1 ? m.push(o.length === 0 ? n : p2(l)) : I.chomping === "keep" && $ && m.push(s(o.length === 0 ? n : l)); + return I.indent === null ? D.push(t2(_(x.tabWidth, m))) : D.push(s(_(I.indent - 1 + P, m))), D; + } + r.exports = w; + } }), Wg = te({ "src/language-yaml/printer-yaml.js"(e, r) { + "use strict"; + ne(); + var { builders: { breakParent: t2, fill: s, group: a, hardline: n, join: u, line: i, lineSuffix: l, literalline: p2 }, utils: { getDocParts: y, replaceTextEndOfLine: h } } = qe(), { isPreviousLineEmpty: g } = Ue(), { insertPragma: c, isPragma: f } = Og(), { locStart: F } = jg(), _ = qg(), { getFlowScalarLineContents: w, getLastDescendantNode: E, hasLeadingComments: N, hasMiddleComments: x, hasTrailingComment: I, hasEndComments: P, hasPrettierIgnore: $, isLastDescendantNode: D, isNode: T, isInlineNode: m } = $t(), C = Mg(), { alignWithSpaces: o, printNextEmptyLine: d, shouldPrintEndComments: v } = Mr(), { printFlowMapping: S, printFlowSequence: b } = Rg(), B = $g(), k = Vg(); + function M(j, Y, ie) { + let ee = j.getValue(), ce = []; + ee.type !== "mappingValue" && N(ee) && ce.push([u(n, j.map(ie, "leadingComments")), n]); + let { tag: W, anchor: K } = ee; + W && ce.push(ie("tag")), W && K && ce.push(" "), K && ce.push(ie("anchor")); + let de = ""; + T(ee, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !D(j) && (de = d(j, Y.originalText)), (W || K) && (T(ee, ["sequence", "mapping"]) && !x(ee) ? ce.push(n) : ce.push(" ")), x(ee) && ce.push([ee.middleComments.length === 1 ? "" : n, u(n, j.map(ie, "middleComments")), n]); + let ue = j.getParentNode(); + return $(j) ? ce.push(h(Y.originalText.slice(ee.position.start.offset, ee.position.end.offset).trimEnd(), p2)) : ce.push(a(R(ee, ue, j, Y, ie))), I(ee) && !T(ee, ["document", "documentHead"]) && ce.push(l([ee.type === "mappingValue" && !ee.content ? "" : " ", ue.type === "mappingKey" && j.getParentNode(2).type === "mapping" && m(ee) ? "" : t2, ie("trailingComment")])), v(ee) && ce.push(o(ee.type === "sequenceItem" ? 2 : 0, [n, u(n, j.map((Fe) => [g(Y.originalText, Fe.getValue(), F) ? n : "", ie()], "endComments"))])), ce.push(de), ce; + } + function R(j, Y, ie, ee, ce) { + switch (j.type) { + case "root": { + let { children: W } = j, K = []; + ie.each((ue, Fe) => { + let z = W[Fe], U = W[Fe + 1]; + Fe !== 0 && K.push(n), K.push(ce()), J(z, U) ? (K.push(n, "..."), I(z) && K.push(" ", ce("trailingComment"))) : U && !I(U.head) && K.push(n, "---"); + }, "children"); + let de = E(j); + return (!T(de, ["blockLiteral", "blockFolded"]) || de.chomping !== "keep") && K.push(n), K; + } + case "document": { + let W = Y.children[ie.getName() + 1], K = []; + return L(j, W, Y, ee) === "head" && ((j.head.children.length > 0 || j.head.endComments.length > 0) && K.push(ce("head")), I(j.head) ? K.push(["---", " ", ce(["head", "trailingComment"])]) : K.push("---")), q(j) && K.push(ce("body")), u(n, K); + } + case "documentHead": + return u(n, [...ie.map(ce, "children"), ...ie.map(ce, "endComments")]); + case "documentBody": { + let { children: W, endComments: K } = j, de = ""; + if (W.length > 0 && K.length > 0) { + let ue = E(j); + T(ue, ["blockFolded", "blockLiteral"]) ? ue.chomping !== "keep" && (de = [n, n]) : de = n; + } + return [u(n, ie.map(ce, "children")), de, u(n, ie.map(ce, "endComments"))]; + } + case "directive": + return ["%", u(" ", [j.name, ...j.parameters])]; + case "comment": + return ["#", j.value]; + case "alias": + return ["*", j.value]; + case "tag": + return ee.originalText.slice(j.position.start.offset, j.position.end.offset); + case "anchor": + return ["&", j.value]; + case "plain": + return Q(j.type, ee.originalText.slice(j.position.start.offset, j.position.end.offset), ee); + case "quoteDouble": + case "quoteSingle": { + let W = "'", K = '"', de = ee.originalText.slice(j.position.start.offset + 1, j.position.end.offset - 1); + if (j.type === "quoteSingle" && de.includes("\\") || j.type === "quoteDouble" && /\\[^"]/.test(de)) { + let Fe = j.type === "quoteDouble" ? K : W; + return [Fe, Q(j.type, de, ee), Fe]; + } + if (de.includes(K)) + return [W, Q(j.type, j.type === "quoteDouble" ? de.replace(/\\"/g, K).replace(/'/g, W.repeat(2)) : de, ee), W]; + if (de.includes(W)) + return [K, Q(j.type, j.type === "quoteSingle" ? de.replace(/''/g, W) : de, ee), K]; + let ue = ee.singleQuote ? W : K; + return [ue, Q(j.type, de, ee), ue]; + } + case "blockFolded": + case "blockLiteral": + return k(ie, ce, ee); + case "mapping": + case "sequence": + return u(n, ie.map(ce, "children")); + case "sequenceItem": + return ["- ", o(2, j.content ? ce("content") : "")]; + case "mappingKey": + case "mappingValue": + return j.content ? ce("content") : ""; + case "mappingItem": + case "flowMappingItem": + return B(j, Y, ie, ce, ee); + case "flowMapping": + return S(ie, ce, ee); + case "flowSequence": + return b(ie, ce, ee); + case "flowSequenceItem": + return ce("content"); + default: + throw new Error(`Unexpected node type ${j.type}`); + } + } + function q(j) { + return j.body.children.length > 0 || P(j.body); + } + function J(j, Y) { + return I(j) || Y && (Y.head.children.length > 0 || P(Y.head)); + } + function L(j, Y, ie, ee) { + return ie.children[0] === j && /---(?:\s|$)/.test(ee.originalText.slice(F(j), F(j) + 4)) || j.head.children.length > 0 || P(j.head) || I(j.head) ? "head" : J(j, Y) ? false : Y ? "root" : false; + } + function Q(j, Y, ie) { + let ee = w(j, Y, ie); + return u(n, ee.map((ce) => s(y(u(i, ce))))); + } + function V(j, Y) { + if (T(Y)) + switch (delete Y.position, Y.type) { + case "comment": + if (f(Y.value)) + return null; + break; + case "quoteDouble": + case "quoteSingle": + Y.type = "quote"; + break; + } + } + r.exports = { preprocess: C, embed: _, print: M, massageAstNode: V, insertPragma: c }; + } }), Hg = te({ "src/language-yaml/options.js"(e, r) { + "use strict"; + ne(); + var t2 = Mt(); + r.exports = { bracketSpacing: t2.bracketSpacing, singleQuote: t2.singleQuote, proseWrap: t2.proseWrap }; + } }), Gg = te({ "src/language-yaml/parsers.js"() { + ne(); + } }), Ug = te({ "node_modules/linguist-languages/data/YAML.json"(e, r) { + r.exports = { name: "YAML", type: "data", color: "#cb171e", tmScope: "source.yaml", aliases: ["yml"], extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"], filenames: [".clang-format", ".clang-tidy", ".gemrc", "CITATION.cff", "glide.lock", "yarn.lock"], aceMode: "yaml", codemirrorMode: "yaml", codemirrorMimeType: "text/x-yaml", languageId: 407 }; + } }), Jg = te({ "src/language-yaml/index.js"(e, r) { + "use strict"; + ne(); + var t2 = _t(), s = Wg(), a = Hg(), n = Gg(), u = [t2(Ug(), (i) => ({ since: "1.14.0", parsers: ["yaml"], vscodeLanguageIds: ["yaml", "ansible", "home-assistant"], filenames: [...i.filenames.filter((l) => l !== "yarn.lock"), ".prettierrc", ".stylelintrc", ".lintstagedrc"] }))]; + r.exports = { languages: u, printers: { yaml: s }, options: a, parsers: n }; + } }), zg = te({ "src/languages.js"(e, r) { + "use strict"; + ne(), r.exports = [Bd(), Ud(), eg(), ag(), dg(), Lg(), Jg()]; + } }); + ne(); + var { version: Xg } = Ia(), Ot = Gm(), { getSupportInfo: Kg } = Xn(), Yg = Um(), Qg = zg(), Zg = qe(); + function Nt(e) { + let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; + return function() { + for (var t2 = arguments.length, s = new Array(t2), a = 0; a < t2; a++) + s[a] = arguments[a]; + let n = s[r] || {}, u = n.plugins || []; + return s[r] = Object.assign(Object.assign({}, n), {}, { plugins: [...Qg, ...Array.isArray(u) ? u : Object.values(u)] }), e(...s); + }; + } + var jn = Nt(Ot.formatWithCursor); + jo.exports = { formatWithCursor: jn, format(e, r) { + return jn(e, r).formatted; + }, check(e, r) { + let { formatted: t2 } = jn(e, r); + return t2 === e; + }, doc: Zg, getSupportInfo: Nt(Kg, 0), version: Xg, util: Yg, __debug: { parse: Nt(Ot.parse), formatAST: Nt(Ot.formatAST), formatDoc: Nt(Ot.formatDoc), printToDoc: Nt(Ot.printToDoc), printDocToString: Nt(Ot.printDocToString) } }; + }); + return e0(); + }); + } + }); + + // node_modules/prettier/parser-graphql.js + var require_parser_graphql = __commonJS({ + "node_modules/prettier/parser-graphql.js"(exports, module) { + (function(e) { + if (typeof exports == "object" && typeof module == "object") + module.exports = e(); + else if (typeof define == "function" && define.amd) + define(e); + else { + var i = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : this || {}; + i.prettierPlugins = i.prettierPlugins || {}, i.prettierPlugins.graphql = e(); + } + })(function() { + "use strict"; + var oe = (a, d) => () => (d || a((d = { exports: {} }).exports, d), d.exports); + var be = oe((Ce, ae) => { + var H = Object.getOwnPropertyNames, se = (a, d) => function() { + return a && (d = (0, a[H(a)[0]])(a = 0)), d; + }, L = (a, d) => function() { + return d || (0, a[H(a)[0]])((d = { exports: {} }).exports, d), d.exports; + }, K = se({ ""() { + } }), ce = L({ "src/common/parser-create-error.js"(a, d) { + "use strict"; + K(); + function i(c, r) { + let _ = new SyntaxError(c + " (" + r.start.line + ":" + r.start.column + ")"); + return _.loc = r, _; + } + d.exports = i; + } }), ue = L({ "src/utils/try-combinations.js"(a, d) { + "use strict"; + K(); + function i() { + let c; + for (var r = arguments.length, _ = new Array(r), E = 0; E < r; E++) + _[E] = arguments[E]; + for (let [k, O] of _.entries()) + try { + return { result: O() }; + } catch (A) { + k === 0 && (c = A); + } + return { error: c }; + } + d.exports = i; + } }), le = L({ "src/language-graphql/pragma.js"(a, d) { + "use strict"; + K(); + function i(r) { + return /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(r); + } + function c(r) { + return `# @format + +` + r; + } + d.exports = { hasPragma: i, insertPragma: c }; + } }), pe = L({ "src/language-graphql/loc.js"(a, d) { + "use strict"; + K(); + function i(r) { + return typeof r.start == "number" ? r.start : r.loc && r.loc.start; + } + function c(r) { + return typeof r.end == "number" ? r.end : r.loc && r.loc.end; + } + d.exports = { locStart: i, locEnd: c }; + } }), fe = L({ "node_modules/graphql/jsutils/isObjectLike.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = i; + function d(c) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(_) { + return typeof _; + } : d = function(_) { + return _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _; + }, d(c); + } + function i(c) { + return d(c) == "object" && c !== null; + } + } }), z = L({ "node_modules/graphql/polyfills/symbols.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.SYMBOL_TO_STRING_TAG = a.SYMBOL_ASYNC_ITERATOR = a.SYMBOL_ITERATOR = void 0; + var d = typeof Symbol == "function" && Symbol.iterator != null ? Symbol.iterator : "@@iterator"; + a.SYMBOL_ITERATOR = d; + var i = typeof Symbol == "function" && Symbol.asyncIterator != null ? Symbol.asyncIterator : "@@asyncIterator"; + a.SYMBOL_ASYNC_ITERATOR = i; + var c = typeof Symbol == "function" && Symbol.toStringTag != null ? Symbol.toStringTag : "@@toStringTag"; + a.SYMBOL_TO_STRING_TAG = c; + } }), $ = L({ "node_modules/graphql/language/location.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.getLocation = d; + function d(i, c) { + for (var r = /\r\n|[\n\r]/g, _ = 1, E = c + 1, k; (k = r.exec(i.body)) && k.index < c; ) + _ += 1, E = c + 1 - (k.index + k[0].length); + return { line: _, column: E }; + } + } }), de = L({ "node_modules/graphql/language/printLocation.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.printLocation = i, a.printSourceLocation = c; + var d = $(); + function i(k) { + return c(k.source, (0, d.getLocation)(k.source, k.start)); + } + function c(k, O) { + var A = k.locationOffset.column - 1, N = _(A) + k.body, g = O.line - 1, D = k.locationOffset.line - 1, v = O.line + D, I = O.line === 1 ? A : 0, s = O.column + I, p2 = "".concat(k.name, ":").concat(v, ":").concat(s, ` +`), e = N.split(/\r\n|[\n\r]/g), n = e[g]; + if (n.length > 120) { + for (var t2 = Math.floor(s / 80), u = s % 80, y = [], f = 0; f < n.length; f += 80) + y.push(n.slice(f, f + 80)); + return p2 + r([["".concat(v), y[0]]].concat(y.slice(1, t2 + 1).map(function(m) { + return ["", m]; + }), [[" ", _(u - 1) + "^"], ["", y[t2 + 1]]])); + } + return p2 + r([["".concat(v - 1), e[g - 1]], ["".concat(v), n], ["", _(s - 1) + "^"], ["".concat(v + 1), e[g + 1]]]); + } + function r(k) { + var O = k.filter(function(N) { + var g = N[0], D = N[1]; + return D !== void 0; + }), A = Math.max.apply(Math, O.map(function(N) { + var g = N[0]; + return g.length; + })); + return O.map(function(N) { + var g = N[0], D = N[1]; + return E(A, g) + (D ? " | " + D : " |"); + }).join(` +`); + } + function _(k) { + return Array(k + 1).join(" "); + } + function E(k, O) { + return _(k - O.length) + O; + } + } }), W = L({ "node_modules/graphql/error/GraphQLError.js"(a) { + "use strict"; + K(); + function d(f) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(o) { + return typeof o; + } : d = function(o) { + return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, d(f); + } + Object.defineProperty(a, "__esModule", { value: true }), a.printError = y, a.GraphQLError = void 0; + var i = E(fe()), c = z(), r = $(), _ = de(); + function E(f) { + return f && f.__esModule ? f : { default: f }; + } + function k(f, m) { + if (!(f instanceof m)) + throw new TypeError("Cannot call a class as a function"); + } + function O(f, m) { + for (var o = 0; o < m.length; o++) { + var h = m[o]; + h.enumerable = h.enumerable || false, h.configurable = true, "value" in h && (h.writable = true), Object.defineProperty(f, h.key, h); + } + } + function A(f, m, o) { + return m && O(f.prototype, m), o && O(f, o), f; + } + function N(f, m) { + if (typeof m != "function" && m !== null) + throw new TypeError("Super expression must either be null or a function"); + f.prototype = Object.create(m && m.prototype, { constructor: { value: f, writable: true, configurable: true } }), m && n(f, m); + } + function g(f) { + var m = p2(); + return function() { + var h = t2(f), l; + if (m) { + var T = t2(this).constructor; + l = Reflect.construct(h, arguments, T); + } else + l = h.apply(this, arguments); + return D(this, l); + }; + } + function D(f, m) { + return m && (d(m) === "object" || typeof m == "function") ? m : v(f); + } + function v(f) { + if (f === void 0) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return f; + } + function I(f) { + var m = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; + return I = function(h) { + if (h === null || !e(h)) + return h; + if (typeof h != "function") + throw new TypeError("Super expression must either be null or a function"); + if (typeof m < "u") { + if (m.has(h)) + return m.get(h); + m.set(h, l); + } + function l() { + return s(h, arguments, t2(this).constructor); + } + return l.prototype = Object.create(h.prototype, { constructor: { value: l, enumerable: false, writable: true, configurable: true } }), n(l, h); + }, I(f); + } + function s(f, m, o) { + return p2() ? s = Reflect.construct : s = function(l, T, S) { + var x = [null]; + x.push.apply(x, T); + var b = Function.bind.apply(l, x), M = new b(); + return S && n(M, S.prototype), M; + }, s.apply(null, arguments); + } + function p2() { + if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) + return false; + if (typeof Proxy == "function") + return true; + try { + return Date.prototype.toString.call(Reflect.construct(Date, [], function() { + })), true; + } catch { + return false; + } + } + function e(f) { + return Function.toString.call(f).indexOf("[native code]") !== -1; + } + function n(f, m) { + return n = Object.setPrototypeOf || function(h, l) { + return h.__proto__ = l, h; + }, n(f, m); + } + function t2(f) { + return t2 = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }, t2(f); + } + var u = function(f) { + N(o, f); + var m = g(o); + function o(h, l, T, S, x, b, M) { + var U, V, q, G, C; + k(this, o), C = m.call(this, h); + var R = Array.isArray(l) ? l.length !== 0 ? l : void 0 : l ? [l] : void 0, Y = T; + if (!Y && R) { + var J; + Y = (J = R[0].loc) === null || J === void 0 ? void 0 : J.source; + } + var F = S; + !F && R && (F = R.reduce(function(w, P) { + return P.loc && w.push(P.loc.start), w; + }, [])), F && F.length === 0 && (F = void 0); + var B; + S && T ? B = S.map(function(w) { + return (0, r.getLocation)(T, w); + }) : R && (B = R.reduce(function(w, P) { + return P.loc && w.push((0, r.getLocation)(P.loc.source, P.loc.start)), w; + }, [])); + var j = M; + if (j == null && b != null) { + var Q = b.extensions; + (0, i.default)(Q) && (j = Q); + } + return Object.defineProperties(v(C), { name: { value: "GraphQLError" }, message: { value: h, enumerable: true, writable: true }, locations: { value: (U = B) !== null && U !== void 0 ? U : void 0, enumerable: B != null }, path: { value: x != null ? x : void 0, enumerable: x != null }, nodes: { value: R != null ? R : void 0 }, source: { value: (V = Y) !== null && V !== void 0 ? V : void 0 }, positions: { value: (q = F) !== null && q !== void 0 ? q : void 0 }, originalError: { value: b }, extensions: { value: (G = j) !== null && G !== void 0 ? G : void 0, enumerable: j != null } }), b != null && b.stack ? (Object.defineProperty(v(C), "stack", { value: b.stack, writable: true, configurable: true }), D(C)) : (Error.captureStackTrace ? Error.captureStackTrace(v(C), o) : Object.defineProperty(v(C), "stack", { value: Error().stack, writable: true, configurable: true }), C); + } + return A(o, [{ key: "toString", value: function() { + return y(this); + } }, { key: c.SYMBOL_TO_STRING_TAG, get: function() { + return "Object"; + } }]), o; + }(I(Error)); + a.GraphQLError = u; + function y(f) { + var m = f.message; + if (f.nodes) + for (var o = 0, h = f.nodes; o < h.length; o++) { + var l = h[o]; + l.loc && (m += ` + +` + (0, _.printLocation)(l.loc)); + } + else if (f.source && f.locations) + for (var T = 0, S = f.locations; T < S.length; T++) { + var x = S[T]; + m += ` + +` + (0, _.printSourceLocation)(f.source, x); + } + return m; + } + } }), Z = L({ "node_modules/graphql/error/syntaxError.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.syntaxError = i; + var d = W(); + function i(c, r, _) { + return new d.GraphQLError("Syntax Error: ".concat(_), void 0, c, [r]); + } + } }), he = L({ "node_modules/graphql/language/kinds.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.Kind = void 0; + var d = Object.freeze({ NAME: "Name", DOCUMENT: "Document", OPERATION_DEFINITION: "OperationDefinition", VARIABLE_DEFINITION: "VariableDefinition", SELECTION_SET: "SelectionSet", FIELD: "Field", ARGUMENT: "Argument", FRAGMENT_SPREAD: "FragmentSpread", INLINE_FRAGMENT: "InlineFragment", FRAGMENT_DEFINITION: "FragmentDefinition", VARIABLE: "Variable", INT: "IntValue", FLOAT: "FloatValue", STRING: "StringValue", BOOLEAN: "BooleanValue", NULL: "NullValue", ENUM: "EnumValue", LIST: "ListValue", OBJECT: "ObjectValue", OBJECT_FIELD: "ObjectField", DIRECTIVE: "Directive", NAMED_TYPE: "NamedType", LIST_TYPE: "ListType", NON_NULL_TYPE: "NonNullType", SCHEMA_DEFINITION: "SchemaDefinition", OPERATION_TYPE_DEFINITION: "OperationTypeDefinition", SCALAR_TYPE_DEFINITION: "ScalarTypeDefinition", OBJECT_TYPE_DEFINITION: "ObjectTypeDefinition", FIELD_DEFINITION: "FieldDefinition", INPUT_VALUE_DEFINITION: "InputValueDefinition", INTERFACE_TYPE_DEFINITION: "InterfaceTypeDefinition", UNION_TYPE_DEFINITION: "UnionTypeDefinition", ENUM_TYPE_DEFINITION: "EnumTypeDefinition", ENUM_VALUE_DEFINITION: "EnumValueDefinition", INPUT_OBJECT_TYPE_DEFINITION: "InputObjectTypeDefinition", DIRECTIVE_DEFINITION: "DirectiveDefinition", SCHEMA_EXTENSION: "SchemaExtension", SCALAR_TYPE_EXTENSION: "ScalarTypeExtension", OBJECT_TYPE_EXTENSION: "ObjectTypeExtension", INTERFACE_TYPE_EXTENSION: "InterfaceTypeExtension", UNION_TYPE_EXTENSION: "UnionTypeExtension", ENUM_TYPE_EXTENSION: "EnumTypeExtension", INPUT_OBJECT_TYPE_EXTENSION: "InputObjectTypeExtension" }); + a.Kind = d; + } }), ve = L({ "node_modules/graphql/jsutils/invariant.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = d; + function d(i, c) { + var r = Boolean(i); + if (!r) + throw new Error(c != null ? c : "Unexpected invariant triggered."); + } + } }), ee = L({ "node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = void 0; + var d = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : void 0, i = d; + a.default = i; + } }), Te = L({ "node_modules/graphql/jsutils/defineInspect.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = r; + var d = c(ve()), i = c(ee()); + function c(_) { + return _ && _.__esModule ? _ : { default: _ }; + } + function r(_) { + var E = _.prototype.toJSON; + typeof E == "function" || (0, d.default)(0), _.prototype.inspect = E, i.default && (_.prototype[i.default] = E); + } + } }), te = L({ "node_modules/graphql/language/ast.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isNode = _, a.Token = a.Location = void 0; + var d = i(Te()); + function i(E) { + return E && E.__esModule ? E : { default: E }; + } + var c = function() { + function E(O, A, N) { + this.start = O.start, this.end = A.end, this.startToken = O, this.endToken = A, this.source = N; + } + var k = E.prototype; + return k.toJSON = function() { + return { start: this.start, end: this.end }; + }, E; + }(); + a.Location = c, (0, d.default)(c); + var r = function() { + function E(O, A, N, g, D, v, I) { + this.kind = O, this.start = A, this.end = N, this.line = g, this.column = D, this.value = I, this.prev = v, this.next = null; + } + var k = E.prototype; + return k.toJSON = function() { + return { kind: this.kind, value: this.value, line: this.line, column: this.column }; + }, E; + }(); + a.Token = r, (0, d.default)(r); + function _(E) { + return E != null && typeof E.kind == "string"; + } + } }), ne = L({ "node_modules/graphql/language/tokenKind.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.TokenKind = void 0; + var d = Object.freeze({ SOF: "", EOF: "", BANG: "!", DOLLAR: "$", AMP: "&", PAREN_L: "(", PAREN_R: ")", SPREAD: "...", COLON: ":", EQUALS: "=", AT: "@", BRACKET_L: "[", BRACKET_R: "]", BRACE_L: "{", PIPE: "|", BRACE_R: "}", NAME: "Name", INT: "Int", FLOAT: "Float", STRING: "String", BLOCK_STRING: "BlockString", COMMENT: "Comment" }); + a.TokenKind = d; + } }), re = L({ "node_modules/graphql/jsutils/inspect.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = E; + var d = i(ee()); + function i(v) { + return v && v.__esModule ? v : { default: v }; + } + function c(v) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? c = function(s) { + return typeof s; + } : c = function(s) { + return s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s; + }, c(v); + } + var r = 10, _ = 2; + function E(v) { + return k(v, []); + } + function k(v, I) { + switch (c(v)) { + case "string": + return JSON.stringify(v); + case "function": + return v.name ? "[function ".concat(v.name, "]") : "[function]"; + case "object": + return v === null ? "null" : O(v, I); + default: + return String(v); + } + } + function O(v, I) { + if (I.indexOf(v) !== -1) + return "[Circular]"; + var s = [].concat(I, [v]), p2 = g(v); + if (p2 !== void 0) { + var e = p2.call(v); + if (e !== v) + return typeof e == "string" ? e : k(e, s); + } else if (Array.isArray(v)) + return N(v, s); + return A(v, s); + } + function A(v, I) { + var s = Object.keys(v); + if (s.length === 0) + return "{}"; + if (I.length > _) + return "[" + D(v) + "]"; + var p2 = s.map(function(e) { + var n = k(v[e], I); + return e + ": " + n; + }); + return "{ " + p2.join(", ") + " }"; + } + function N(v, I) { + if (v.length === 0) + return "[]"; + if (I.length > _) + return "[Array]"; + for (var s = Math.min(r, v.length), p2 = v.length - s, e = [], n = 0; n < s; ++n) + e.push(k(v[n], I)); + return p2 === 1 ? e.push("... 1 more item") : p2 > 1 && e.push("... ".concat(p2, " more items")), "[" + e.join(", ") + "]"; + } + function g(v) { + var I = v[String(d.default)]; + if (typeof I == "function") + return I; + if (typeof v.inspect == "function") + return v.inspect; + } + function D(v) { + var I = Object.prototype.toString.call(v).replace(/^\[object /, "").replace(/]$/, ""); + if (I === "Object" && typeof v.constructor == "function") { + var s = v.constructor.name; + if (typeof s == "string" && s !== "") + return s; + } + return I; + } + } }), _e = L({ "node_modules/graphql/jsutils/devAssert.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = d; + function d(i, c) { + var r = Boolean(i); + if (!r) + throw new Error(c); + } + } }), Ee = L({ "node_modules/graphql/jsutils/instanceOf.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.default = void 0; + var d = i(re()); + function i(r) { + return r && r.__esModule ? r : { default: r }; + } + var c = function(_, E) { + return _ instanceof E; + }; + a.default = c; + } }), me = L({ "node_modules/graphql/language/source.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isSource = A, a.Source = void 0; + var d = z(), i = _(re()), c = _(_e()), r = _(Ee()); + function _(N) { + return N && N.__esModule ? N : { default: N }; + } + function E(N, g) { + for (var D = 0; D < g.length; D++) { + var v = g[D]; + v.enumerable = v.enumerable || false, v.configurable = true, "value" in v && (v.writable = true), Object.defineProperty(N, v.key, v); + } + } + function k(N, g, D) { + return g && E(N.prototype, g), D && E(N, D), N; + } + var O = function() { + function N(g) { + var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "GraphQL request", v = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { line: 1, column: 1 }; + typeof g == "string" || (0, c.default)(0, "Body must be a string. Received: ".concat((0, i.default)(g), ".")), this.body = g, this.name = D, this.locationOffset = v, this.locationOffset.line > 0 || (0, c.default)(0, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || (0, c.default)(0, "column in locationOffset is 1-indexed and must be positive."); + } + return k(N, [{ key: d.SYMBOL_TO_STRING_TAG, get: function() { + return "Source"; + } }]), N; + }(); + a.Source = O; + function A(N) { + return (0, r.default)(N, O); + } + } }), ye = L({ "node_modules/graphql/language/directiveLocation.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.DirectiveLocation = void 0; + var d = Object.freeze({ QUERY: "QUERY", MUTATION: "MUTATION", SUBSCRIPTION: "SUBSCRIPTION", FIELD: "FIELD", FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION", FRAGMENT_SPREAD: "FRAGMENT_SPREAD", INLINE_FRAGMENT: "INLINE_FRAGMENT", VARIABLE_DEFINITION: "VARIABLE_DEFINITION", SCHEMA: "SCHEMA", SCALAR: "SCALAR", OBJECT: "OBJECT", FIELD_DEFINITION: "FIELD_DEFINITION", ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION", INTERFACE: "INTERFACE", UNION: "UNION", ENUM: "ENUM", ENUM_VALUE: "ENUM_VALUE", INPUT_OBJECT: "INPUT_OBJECT", INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION" }); + a.DirectiveLocation = d; + } }), ke = L({ "node_modules/graphql/language/blockString.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.dedentBlockStringValue = d, a.getBlockStringIndentation = c, a.printBlockString = r; + function d(_) { + var E = _.split(/\r\n|[\n\r]/g), k = c(_); + if (k !== 0) + for (var O = 1; O < E.length; O++) + E[O] = E[O].slice(k); + for (var A = 0; A < E.length && i(E[A]); ) + ++A; + for (var N = E.length; N > A && i(E[N - 1]); ) + --N; + return E.slice(A, N).join(` +`); + } + function i(_) { + for (var E = 0; E < _.length; ++E) + if (_[E] !== " " && _[E] !== " ") + return false; + return true; + } + function c(_) { + for (var E, k = true, O = true, A = 0, N = null, g = 0; g < _.length; ++g) + switch (_.charCodeAt(g)) { + case 13: + _.charCodeAt(g + 1) === 10 && ++g; + case 10: + k = false, O = true, A = 0; + break; + case 9: + case 32: + ++A; + break; + default: + O && !k && (N === null || A < N) && (N = A), O = false; + } + return (E = N) !== null && E !== void 0 ? E : 0; + } + function r(_) { + var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, O = _.indexOf(` +`) === -1, A = _[0] === " " || _[0] === " ", N = _[_.length - 1] === '"', g = _[_.length - 1] === "\\", D = !O || N || g || k, v = ""; + return D && !(O && A) && (v += ` +` + E), v += E ? _.replace(/\n/g, ` +` + E) : _, D && (v += ` +`), '"""' + v.replace(/"""/g, '\\"""') + '"""'; + } + } }), Ne = L({ "node_modules/graphql/language/lexer.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.isPunctuatorTokenKind = E, a.Lexer = void 0; + var d = Z(), i = te(), c = ne(), r = ke(), _ = function() { + function t2(y) { + var f = new i.Token(c.TokenKind.SOF, 0, 0, 0, 0, null); + this.source = y, this.lastToken = f, this.token = f, this.line = 1, this.lineStart = 0; + } + var u = t2.prototype; + return u.advance = function() { + this.lastToken = this.token; + var f = this.token = this.lookahead(); + return f; + }, u.lookahead = function() { + var f = this.token; + if (f.kind !== c.TokenKind.EOF) + do { + var m; + f = (m = f.next) !== null && m !== void 0 ? m : f.next = O(this, f); + } while (f.kind === c.TokenKind.COMMENT); + return f; + }, t2; + }(); + a.Lexer = _; + function E(t2) { + return t2 === c.TokenKind.BANG || t2 === c.TokenKind.DOLLAR || t2 === c.TokenKind.AMP || t2 === c.TokenKind.PAREN_L || t2 === c.TokenKind.PAREN_R || t2 === c.TokenKind.SPREAD || t2 === c.TokenKind.COLON || t2 === c.TokenKind.EQUALS || t2 === c.TokenKind.AT || t2 === c.TokenKind.BRACKET_L || t2 === c.TokenKind.BRACKET_R || t2 === c.TokenKind.BRACE_L || t2 === c.TokenKind.PIPE || t2 === c.TokenKind.BRACE_R; + } + function k(t2) { + return isNaN(t2) ? c.TokenKind.EOF : t2 < 127 ? JSON.stringify(String.fromCharCode(t2)) : '"\\u'.concat(("00" + t2.toString(16).toUpperCase()).slice(-4), '"'); + } + function O(t2, u) { + for (var y = t2.source, f = y.body, m = f.length, o = u.end; o < m; ) { + var h = f.charCodeAt(o), l = t2.line, T = 1 + o - t2.lineStart; + switch (h) { + case 65279: + case 9: + case 32: + case 44: + ++o; + continue; + case 10: + ++o, ++t2.line, t2.lineStart = o; + continue; + case 13: + f.charCodeAt(o + 1) === 10 ? o += 2 : ++o, ++t2.line, t2.lineStart = o; + continue; + case 33: + return new i.Token(c.TokenKind.BANG, o, o + 1, l, T, u); + case 35: + return N(y, o, l, T, u); + case 36: + return new i.Token(c.TokenKind.DOLLAR, o, o + 1, l, T, u); + case 38: + return new i.Token(c.TokenKind.AMP, o, o + 1, l, T, u); + case 40: + return new i.Token(c.TokenKind.PAREN_L, o, o + 1, l, T, u); + case 41: + return new i.Token(c.TokenKind.PAREN_R, o, o + 1, l, T, u); + case 46: + if (f.charCodeAt(o + 1) === 46 && f.charCodeAt(o + 2) === 46) + return new i.Token(c.TokenKind.SPREAD, o, o + 3, l, T, u); + break; + case 58: + return new i.Token(c.TokenKind.COLON, o, o + 1, l, T, u); + case 61: + return new i.Token(c.TokenKind.EQUALS, o, o + 1, l, T, u); + case 64: + return new i.Token(c.TokenKind.AT, o, o + 1, l, T, u); + case 91: + return new i.Token(c.TokenKind.BRACKET_L, o, o + 1, l, T, u); + case 93: + return new i.Token(c.TokenKind.BRACKET_R, o, o + 1, l, T, u); + case 123: + return new i.Token(c.TokenKind.BRACE_L, o, o + 1, l, T, u); + case 124: + return new i.Token(c.TokenKind.PIPE, o, o + 1, l, T, u); + case 125: + return new i.Token(c.TokenKind.BRACE_R, o, o + 1, l, T, u); + case 34: + return f.charCodeAt(o + 1) === 34 && f.charCodeAt(o + 2) === 34 ? I(y, o, l, T, u, t2) : v(y, o, l, T, u); + case 45: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return g(y, o, h, l, T, u); + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 95: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + return e(y, o, l, T, u); + } + throw (0, d.syntaxError)(y, o, A(h)); + } + var S = t2.line, x = 1 + o - t2.lineStart; + return new i.Token(c.TokenKind.EOF, m, m, S, x, u); + } + function A(t2) { + return t2 < 32 && t2 !== 9 && t2 !== 10 && t2 !== 13 ? "Cannot contain the invalid character ".concat(k(t2), ".") : t2 === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : "Cannot parse the unexpected character ".concat(k(t2), "."); + } + function N(t2, u, y, f, m) { + var o = t2.body, h, l = u; + do + h = o.charCodeAt(++l); + while (!isNaN(h) && (h > 31 || h === 9)); + return new i.Token(c.TokenKind.COMMENT, u, l, y, f, m, o.slice(u + 1, l)); + } + function g(t2, u, y, f, m, o) { + var h = t2.body, l = y, T = u, S = false; + if (l === 45 && (l = h.charCodeAt(++T)), l === 48) { + if (l = h.charCodeAt(++T), l >= 48 && l <= 57) + throw (0, d.syntaxError)(t2, T, "Invalid number, unexpected digit after 0: ".concat(k(l), ".")); + } else + T = D(t2, T, l), l = h.charCodeAt(T); + if (l === 46 && (S = true, l = h.charCodeAt(++T), T = D(t2, T, l), l = h.charCodeAt(T)), (l === 69 || l === 101) && (S = true, l = h.charCodeAt(++T), (l === 43 || l === 45) && (l = h.charCodeAt(++T)), T = D(t2, T, l), l = h.charCodeAt(T)), l === 46 || n(l)) + throw (0, d.syntaxError)(t2, T, "Invalid number, expected digit but got: ".concat(k(l), ".")); + return new i.Token(S ? c.TokenKind.FLOAT : c.TokenKind.INT, u, T, f, m, o, h.slice(u, T)); + } + function D(t2, u, y) { + var f = t2.body, m = u, o = y; + if (o >= 48 && o <= 57) { + do + o = f.charCodeAt(++m); + while (o >= 48 && o <= 57); + return m; + } + throw (0, d.syntaxError)(t2, m, "Invalid number, expected digit but got: ".concat(k(o), ".")); + } + function v(t2, u, y, f, m) { + for (var o = t2.body, h = u + 1, l = h, T = 0, S = ""; h < o.length && !isNaN(T = o.charCodeAt(h)) && T !== 10 && T !== 13; ) { + if (T === 34) + return S += o.slice(l, h), new i.Token(c.TokenKind.STRING, u, h + 1, y, f, m, S); + if (T < 32 && T !== 9) + throw (0, d.syntaxError)(t2, h, "Invalid character within String: ".concat(k(T), ".")); + if (++h, T === 92) { + switch (S += o.slice(l, h - 1), T = o.charCodeAt(h), T) { + case 34: + S += '"'; + break; + case 47: + S += "/"; + break; + case 92: + S += "\\"; + break; + case 98: + S += "\b"; + break; + case 102: + S += "\f"; + break; + case 110: + S += ` +`; + break; + case 114: + S += "\r"; + break; + case 116: + S += " "; + break; + case 117: { + var x = s(o.charCodeAt(h + 1), o.charCodeAt(h + 2), o.charCodeAt(h + 3), o.charCodeAt(h + 4)); + if (x < 0) { + var b = o.slice(h + 1, h + 5); + throw (0, d.syntaxError)(t2, h, "Invalid character escape sequence: \\u".concat(b, ".")); + } + S += String.fromCharCode(x), h += 4; + break; + } + default: + throw (0, d.syntaxError)(t2, h, "Invalid character escape sequence: \\".concat(String.fromCharCode(T), ".")); + } + ++h, l = h; + } + } + throw (0, d.syntaxError)(t2, h, "Unterminated string."); + } + function I(t2, u, y, f, m, o) { + for (var h = t2.body, l = u + 3, T = l, S = 0, x = ""; l < h.length && !isNaN(S = h.charCodeAt(l)); ) { + if (S === 34 && h.charCodeAt(l + 1) === 34 && h.charCodeAt(l + 2) === 34) + return x += h.slice(T, l), new i.Token(c.TokenKind.BLOCK_STRING, u, l + 3, y, f, m, (0, r.dedentBlockStringValue)(x)); + if (S < 32 && S !== 9 && S !== 10 && S !== 13) + throw (0, d.syntaxError)(t2, l, "Invalid character within String: ".concat(k(S), ".")); + S === 10 ? (++l, ++o.line, o.lineStart = l) : S === 13 ? (h.charCodeAt(l + 1) === 10 ? l += 2 : ++l, ++o.line, o.lineStart = l) : S === 92 && h.charCodeAt(l + 1) === 34 && h.charCodeAt(l + 2) === 34 && h.charCodeAt(l + 3) === 34 ? (x += h.slice(T, l) + '"""', l += 4, T = l) : ++l; + } + throw (0, d.syntaxError)(t2, l, "Unterminated string."); + } + function s(t2, u, y, f) { + return p2(t2) << 12 | p2(u) << 8 | p2(y) << 4 | p2(f); + } + function p2(t2) { + return t2 >= 48 && t2 <= 57 ? t2 - 48 : t2 >= 65 && t2 <= 70 ? t2 - 55 : t2 >= 97 && t2 <= 102 ? t2 - 87 : -1; + } + function e(t2, u, y, f, m) { + for (var o = t2.body, h = o.length, l = u + 1, T = 0; l !== h && !isNaN(T = o.charCodeAt(l)) && (T === 95 || T >= 48 && T <= 57 || T >= 65 && T <= 90 || T >= 97 && T <= 122); ) + ++l; + return new i.Token(c.TokenKind.NAME, u, l, y, f, m, o.slice(u, l)); + } + function n(t2) { + return t2 === 95 || t2 >= 65 && t2 <= 90 || t2 >= 97 && t2 <= 122; + } + } }), Oe = L({ "node_modules/graphql/language/parser.js"(a) { + "use strict"; + K(), Object.defineProperty(a, "__esModule", { value: true }), a.parse = O, a.parseValue = A, a.parseType = N, a.Parser = void 0; + var d = Z(), i = he(), c = te(), r = ne(), _ = me(), E = ye(), k = Ne(); + function O(I, s) { + var p2 = new g(I, s); + return p2.parseDocument(); + } + function A(I, s) { + var p2 = new g(I, s); + p2.expectToken(r.TokenKind.SOF); + var e = p2.parseValueLiteral(false); + return p2.expectToken(r.TokenKind.EOF), e; + } + function N(I, s) { + var p2 = new g(I, s); + p2.expectToken(r.TokenKind.SOF); + var e = p2.parseTypeReference(); + return p2.expectToken(r.TokenKind.EOF), e; + } + var g = function() { + function I(p2, e) { + var n = (0, _.isSource)(p2) ? p2 : new _.Source(p2); + this._lexer = new k.Lexer(n), this._options = e; + } + var s = I.prototype; + return s.parseName = function() { + var e = this.expectToken(r.TokenKind.NAME); + return { kind: i.Kind.NAME, value: e.value, loc: this.loc(e) }; + }, s.parseDocument = function() { + var e = this._lexer.token; + return { kind: i.Kind.DOCUMENT, definitions: this.many(r.TokenKind.SOF, this.parseDefinition, r.TokenKind.EOF), loc: this.loc(e) }; + }, s.parseDefinition = function() { + if (this.peek(r.TokenKind.NAME)) + switch (this._lexer.token.value) { + case "query": + case "mutation": + case "subscription": + return this.parseOperationDefinition(); + case "fragment": + return this.parseFragmentDefinition(); + case "schema": + case "scalar": + case "type": + case "interface": + case "union": + case "enum": + case "input": + case "directive": + return this.parseTypeSystemDefinition(); + case "extend": + return this.parseTypeSystemExtension(); + } + else { + if (this.peek(r.TokenKind.BRACE_L)) + return this.parseOperationDefinition(); + if (this.peekDescription()) + return this.parseTypeSystemDefinition(); + } + throw this.unexpected(); + }, s.parseOperationDefinition = function() { + var e = this._lexer.token; + if (this.peek(r.TokenKind.BRACE_L)) + return { kind: i.Kind.OPERATION_DEFINITION, operation: "query", name: void 0, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + var n = this.parseOperationType(), t2; + return this.peek(r.TokenKind.NAME) && (t2 = this.parseName()), { kind: i.Kind.OPERATION_DEFINITION, operation: n, name: t2, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + }, s.parseOperationType = function() { + var e = this.expectToken(r.TokenKind.NAME); + switch (e.value) { + case "query": + return "query"; + case "mutation": + return "mutation"; + case "subscription": + return "subscription"; + } + throw this.unexpected(e); + }, s.parseVariableDefinitions = function() { + return this.optionalMany(r.TokenKind.PAREN_L, this.parseVariableDefinition, r.TokenKind.PAREN_R); + }, s.parseVariableDefinition = function() { + var e = this._lexer.token; + return { kind: i.Kind.VARIABLE_DEFINITION, variable: this.parseVariable(), type: (this.expectToken(r.TokenKind.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(r.TokenKind.EQUALS) ? this.parseValueLiteral(true) : void 0, directives: this.parseDirectives(true), loc: this.loc(e) }; + }, s.parseVariable = function() { + var e = this._lexer.token; + return this.expectToken(r.TokenKind.DOLLAR), { kind: i.Kind.VARIABLE, name: this.parseName(), loc: this.loc(e) }; + }, s.parseSelectionSet = function() { + var e = this._lexer.token; + return { kind: i.Kind.SELECTION_SET, selections: this.many(r.TokenKind.BRACE_L, this.parseSelection, r.TokenKind.BRACE_R), loc: this.loc(e) }; + }, s.parseSelection = function() { + return this.peek(r.TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + }, s.parseField = function() { + var e = this._lexer.token, n = this.parseName(), t2, u; + return this.expectOptionalToken(r.TokenKind.COLON) ? (t2 = n, u = this.parseName()) : u = n, { kind: i.Kind.FIELD, alias: t2, name: u, arguments: this.parseArguments(false), directives: this.parseDirectives(false), selectionSet: this.peek(r.TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0, loc: this.loc(e) }; + }, s.parseArguments = function(e) { + var n = e ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(r.TokenKind.PAREN_L, n, r.TokenKind.PAREN_R); + }, s.parseArgument = function() { + var e = this._lexer.token, n = this.parseName(); + return this.expectToken(r.TokenKind.COLON), { kind: i.Kind.ARGUMENT, name: n, value: this.parseValueLiteral(false), loc: this.loc(e) }; + }, s.parseConstArgument = function() { + var e = this._lexer.token; + return { kind: i.Kind.ARGUMENT, name: this.parseName(), value: (this.expectToken(r.TokenKind.COLON), this.parseValueLiteral(true)), loc: this.loc(e) }; + }, s.parseFragment = function() { + var e = this._lexer.token; + this.expectToken(r.TokenKind.SPREAD); + var n = this.expectOptionalKeyword("on"); + return !n && this.peek(r.TokenKind.NAME) ? { kind: i.Kind.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(false), loc: this.loc(e) } : { kind: i.Kind.INLINE_FRAGMENT, typeCondition: n ? this.parseNamedType() : void 0, directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(e) }; + }, s.parseFragmentDefinition = function() { + var e, n = this._lexer.token; + return this.expectKeyword("fragment"), ((e = this._options) === null || e === void 0 ? void 0 : e.experimentalFragmentVariables) === true ? { kind: i.Kind.FRAGMENT_DEFINITION, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(n) } : { kind: i.Kind.FRAGMENT_DEFINITION, name: this.parseFragmentName(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), loc: this.loc(n) }; + }, s.parseFragmentName = function() { + if (this._lexer.token.value === "on") + throw this.unexpected(); + return this.parseName(); + }, s.parseValueLiteral = function(e) { + var n = this._lexer.token; + switch (n.kind) { + case r.TokenKind.BRACKET_L: + return this.parseList(e); + case r.TokenKind.BRACE_L: + return this.parseObject(e); + case r.TokenKind.INT: + return this._lexer.advance(), { kind: i.Kind.INT, value: n.value, loc: this.loc(n) }; + case r.TokenKind.FLOAT: + return this._lexer.advance(), { kind: i.Kind.FLOAT, value: n.value, loc: this.loc(n) }; + case r.TokenKind.STRING: + case r.TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + case r.TokenKind.NAME: + switch (this._lexer.advance(), n.value) { + case "true": + return { kind: i.Kind.BOOLEAN, value: true, loc: this.loc(n) }; + case "false": + return { kind: i.Kind.BOOLEAN, value: false, loc: this.loc(n) }; + case "null": + return { kind: i.Kind.NULL, loc: this.loc(n) }; + default: + return { kind: i.Kind.ENUM, value: n.value, loc: this.loc(n) }; + } + case r.TokenKind.DOLLAR: + if (!e) + return this.parseVariable(); + break; + } + throw this.unexpected(); + }, s.parseStringLiteral = function() { + var e = this._lexer.token; + return this._lexer.advance(), { kind: i.Kind.STRING, value: e.value, block: e.kind === r.TokenKind.BLOCK_STRING, loc: this.loc(e) }; + }, s.parseList = function(e) { + var n = this, t2 = this._lexer.token, u = function() { + return n.parseValueLiteral(e); + }; + return { kind: i.Kind.LIST, values: this.any(r.TokenKind.BRACKET_L, u, r.TokenKind.BRACKET_R), loc: this.loc(t2) }; + }, s.parseObject = function(e) { + var n = this, t2 = this._lexer.token, u = function() { + return n.parseObjectField(e); + }; + return { kind: i.Kind.OBJECT, fields: this.any(r.TokenKind.BRACE_L, u, r.TokenKind.BRACE_R), loc: this.loc(t2) }; + }, s.parseObjectField = function(e) { + var n = this._lexer.token, t2 = this.parseName(); + return this.expectToken(r.TokenKind.COLON), { kind: i.Kind.OBJECT_FIELD, name: t2, value: this.parseValueLiteral(e), loc: this.loc(n) }; + }, s.parseDirectives = function(e) { + for (var n = []; this.peek(r.TokenKind.AT); ) + n.push(this.parseDirective(e)); + return n; + }, s.parseDirective = function(e) { + var n = this._lexer.token; + return this.expectToken(r.TokenKind.AT), { kind: i.Kind.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(e), loc: this.loc(n) }; + }, s.parseTypeReference = function() { + var e = this._lexer.token, n; + return this.expectOptionalToken(r.TokenKind.BRACKET_L) ? (n = this.parseTypeReference(), this.expectToken(r.TokenKind.BRACKET_R), n = { kind: i.Kind.LIST_TYPE, type: n, loc: this.loc(e) }) : n = this.parseNamedType(), this.expectOptionalToken(r.TokenKind.BANG) ? { kind: i.Kind.NON_NULL_TYPE, type: n, loc: this.loc(e) } : n; + }, s.parseNamedType = function() { + var e = this._lexer.token; + return { kind: i.Kind.NAMED_TYPE, name: this.parseName(), loc: this.loc(e) }; + }, s.parseTypeSystemDefinition = function() { + var e = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token; + if (e.kind === r.TokenKind.NAME) + switch (e.value) { + case "schema": + return this.parseSchemaDefinition(); + case "scalar": + return this.parseScalarTypeDefinition(); + case "type": + return this.parseObjectTypeDefinition(); + case "interface": + return this.parseInterfaceTypeDefinition(); + case "union": + return this.parseUnionTypeDefinition(); + case "enum": + return this.parseEnumTypeDefinition(); + case "input": + return this.parseInputObjectTypeDefinition(); + case "directive": + return this.parseDirectiveDefinition(); + } + throw this.unexpected(e); + }, s.peekDescription = function() { + return this.peek(r.TokenKind.STRING) || this.peek(r.TokenKind.BLOCK_STRING); + }, s.parseDescription = function() { + if (this.peekDescription()) + return this.parseStringLiteral(); + }, s.parseSchemaDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("schema"); + var t2 = this.parseDirectives(true), u = this.many(r.TokenKind.BRACE_L, this.parseOperationTypeDefinition, r.TokenKind.BRACE_R); + return { kind: i.Kind.SCHEMA_DEFINITION, description: n, directives: t2, operationTypes: u, loc: this.loc(e) }; + }, s.parseOperationTypeDefinition = function() { + var e = this._lexer.token, n = this.parseOperationType(); + this.expectToken(r.TokenKind.COLON); + var t2 = this.parseNamedType(); + return { kind: i.Kind.OPERATION_TYPE_DEFINITION, operation: n, type: t2, loc: this.loc(e) }; + }, s.parseScalarTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("scalar"); + var t2 = this.parseName(), u = this.parseDirectives(true); + return { kind: i.Kind.SCALAR_TYPE_DEFINITION, description: n, name: t2, directives: u, loc: this.loc(e) }; + }, s.parseObjectTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("type"); + var t2 = this.parseName(), u = this.parseImplementsInterfaces(), y = this.parseDirectives(true), f = this.parseFieldsDefinition(); + return { kind: i.Kind.OBJECT_TYPE_DEFINITION, description: n, name: t2, interfaces: u, directives: y, fields: f, loc: this.loc(e) }; + }, s.parseImplementsInterfaces = function() { + var e; + if (!this.expectOptionalKeyword("implements")) + return []; + if (((e = this._options) === null || e === void 0 ? void 0 : e.allowLegacySDLImplementsInterfaces) === true) { + var n = []; + this.expectOptionalToken(r.TokenKind.AMP); + do + n.push(this.parseNamedType()); + while (this.expectOptionalToken(r.TokenKind.AMP) || this.peek(r.TokenKind.NAME)); + return n; + } + return this.delimitedMany(r.TokenKind.AMP, this.parseNamedType); + }, s.parseFieldsDefinition = function() { + var e; + return ((e = this._options) === null || e === void 0 ? void 0 : e.allowLegacySDLEmptyFields) === true && this.peek(r.TokenKind.BRACE_L) && this._lexer.lookahead().kind === r.TokenKind.BRACE_R ? (this._lexer.advance(), this._lexer.advance(), []) : this.optionalMany(r.TokenKind.BRACE_L, this.parseFieldDefinition, r.TokenKind.BRACE_R); + }, s.parseFieldDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(), u = this.parseArgumentDefs(); + this.expectToken(r.TokenKind.COLON); + var y = this.parseTypeReference(), f = this.parseDirectives(true); + return { kind: i.Kind.FIELD_DEFINITION, description: n, name: t2, arguments: u, type: y, directives: f, loc: this.loc(e) }; + }, s.parseArgumentDefs = function() { + return this.optionalMany(r.TokenKind.PAREN_L, this.parseInputValueDef, r.TokenKind.PAREN_R); + }, s.parseInputValueDef = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(); + this.expectToken(r.TokenKind.COLON); + var u = this.parseTypeReference(), y; + this.expectOptionalToken(r.TokenKind.EQUALS) && (y = this.parseValueLiteral(true)); + var f = this.parseDirectives(true); + return { kind: i.Kind.INPUT_VALUE_DEFINITION, description: n, name: t2, type: u, defaultValue: y, directives: f, loc: this.loc(e) }; + }, s.parseInterfaceTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("interface"); + var t2 = this.parseName(), u = this.parseImplementsInterfaces(), y = this.parseDirectives(true), f = this.parseFieldsDefinition(); + return { kind: i.Kind.INTERFACE_TYPE_DEFINITION, description: n, name: t2, interfaces: u, directives: y, fields: f, loc: this.loc(e) }; + }, s.parseUnionTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("union"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseUnionMemberTypes(); + return { kind: i.Kind.UNION_TYPE_DEFINITION, description: n, name: t2, directives: u, types: y, loc: this.loc(e) }; + }, s.parseUnionMemberTypes = function() { + return this.expectOptionalToken(r.TokenKind.EQUALS) ? this.delimitedMany(r.TokenKind.PIPE, this.parseNamedType) : []; + }, s.parseEnumTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("enum"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseEnumValuesDefinition(); + return { kind: i.Kind.ENUM_TYPE_DEFINITION, description: n, name: t2, directives: u, values: y, loc: this.loc(e) }; + }, s.parseEnumValuesDefinition = function() { + return this.optionalMany(r.TokenKind.BRACE_L, this.parseEnumValueDefinition, r.TokenKind.BRACE_R); + }, s.parseEnumValueDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(), t2 = this.parseName(), u = this.parseDirectives(true); + return { kind: i.Kind.ENUM_VALUE_DEFINITION, description: n, name: t2, directives: u, loc: this.loc(e) }; + }, s.parseInputObjectTypeDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("input"); + var t2 = this.parseName(), u = this.parseDirectives(true), y = this.parseInputFieldsDefinition(); + return { kind: i.Kind.INPUT_OBJECT_TYPE_DEFINITION, description: n, name: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseInputFieldsDefinition = function() { + return this.optionalMany(r.TokenKind.BRACE_L, this.parseInputValueDef, r.TokenKind.BRACE_R); + }, s.parseTypeSystemExtension = function() { + var e = this._lexer.lookahead(); + if (e.kind === r.TokenKind.NAME) + switch (e.value) { + case "schema": + return this.parseSchemaExtension(); + case "scalar": + return this.parseScalarTypeExtension(); + case "type": + return this.parseObjectTypeExtension(); + case "interface": + return this.parseInterfaceTypeExtension(); + case "union": + return this.parseUnionTypeExtension(); + case "enum": + return this.parseEnumTypeExtension(); + case "input": + return this.parseInputObjectTypeExtension(); + } + throw this.unexpected(e); + }, s.parseSchemaExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("schema"); + var n = this.parseDirectives(true), t2 = this.optionalMany(r.TokenKind.BRACE_L, this.parseOperationTypeDefinition, r.TokenKind.BRACE_R); + if (n.length === 0 && t2.length === 0) + throw this.unexpected(); + return { kind: i.Kind.SCHEMA_EXTENSION, directives: n, operationTypes: t2, loc: this.loc(e) }; + }, s.parseScalarTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("scalar"); + var n = this.parseName(), t2 = this.parseDirectives(true); + if (t2.length === 0) + throw this.unexpected(); + return { kind: i.Kind.SCALAR_TYPE_EXTENSION, name: n, directives: t2, loc: this.loc(e) }; + }, s.parseObjectTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("type"); + var n = this.parseName(), t2 = this.parseImplementsInterfaces(), u = this.parseDirectives(true), y = this.parseFieldsDefinition(); + if (t2.length === 0 && u.length === 0 && y.length === 0) + throw this.unexpected(); + return { kind: i.Kind.OBJECT_TYPE_EXTENSION, name: n, interfaces: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseInterfaceTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("interface"); + var n = this.parseName(), t2 = this.parseImplementsInterfaces(), u = this.parseDirectives(true), y = this.parseFieldsDefinition(); + if (t2.length === 0 && u.length === 0 && y.length === 0) + throw this.unexpected(); + return { kind: i.Kind.INTERFACE_TYPE_EXTENSION, name: n, interfaces: t2, directives: u, fields: y, loc: this.loc(e) }; + }, s.parseUnionTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("union"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseUnionMemberTypes(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.UNION_TYPE_EXTENSION, name: n, directives: t2, types: u, loc: this.loc(e) }; + }, s.parseEnumTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("enum"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseEnumValuesDefinition(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.ENUM_TYPE_EXTENSION, name: n, directives: t2, values: u, loc: this.loc(e) }; + }, s.parseInputObjectTypeExtension = function() { + var e = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("input"); + var n = this.parseName(), t2 = this.parseDirectives(true), u = this.parseInputFieldsDefinition(); + if (t2.length === 0 && u.length === 0) + throw this.unexpected(); + return { kind: i.Kind.INPUT_OBJECT_TYPE_EXTENSION, name: n, directives: t2, fields: u, loc: this.loc(e) }; + }, s.parseDirectiveDefinition = function() { + var e = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("directive"), this.expectToken(r.TokenKind.AT); + var t2 = this.parseName(), u = this.parseArgumentDefs(), y = this.expectOptionalKeyword("repeatable"); + this.expectKeyword("on"); + var f = this.parseDirectiveLocations(); + return { kind: i.Kind.DIRECTIVE_DEFINITION, description: n, name: t2, arguments: u, repeatable: y, locations: f, loc: this.loc(e) }; + }, s.parseDirectiveLocations = function() { + return this.delimitedMany(r.TokenKind.PIPE, this.parseDirectiveLocation); + }, s.parseDirectiveLocation = function() { + var e = this._lexer.token, n = this.parseName(); + if (E.DirectiveLocation[n.value] !== void 0) + return n; + throw this.unexpected(e); + }, s.loc = function(e) { + var n; + if (((n = this._options) === null || n === void 0 ? void 0 : n.noLocation) !== true) + return new c.Location(e, this._lexer.lastToken, this._lexer.source); + }, s.peek = function(e) { + return this._lexer.token.kind === e; + }, s.expectToken = function(e) { + var n = this._lexer.token; + if (n.kind === e) + return this._lexer.advance(), n; + throw (0, d.syntaxError)(this._lexer.source, n.start, "Expected ".concat(v(e), ", found ").concat(D(n), ".")); + }, s.expectOptionalToken = function(e) { + var n = this._lexer.token; + if (n.kind === e) + return this._lexer.advance(), n; + }, s.expectKeyword = function(e) { + var n = this._lexer.token; + if (n.kind === r.TokenKind.NAME && n.value === e) + this._lexer.advance(); + else + throw (0, d.syntaxError)(this._lexer.source, n.start, 'Expected "'.concat(e, '", found ').concat(D(n), ".")); + }, s.expectOptionalKeyword = function(e) { + var n = this._lexer.token; + return n.kind === r.TokenKind.NAME && n.value === e ? (this._lexer.advance(), true) : false; + }, s.unexpected = function(e) { + var n = e != null ? e : this._lexer.token; + return (0, d.syntaxError)(this._lexer.source, n.start, "Unexpected ".concat(D(n), ".")); + }, s.any = function(e, n, t2) { + this.expectToken(e); + for (var u = []; !this.expectOptionalToken(t2); ) + u.push(n.call(this)); + return u; + }, s.optionalMany = function(e, n, t2) { + if (this.expectOptionalToken(e)) { + var u = []; + do + u.push(n.call(this)); + while (!this.expectOptionalToken(t2)); + return u; + } + return []; + }, s.many = function(e, n, t2) { + this.expectToken(e); + var u = []; + do + u.push(n.call(this)); + while (!this.expectOptionalToken(t2)); + return u; + }, s.delimitedMany = function(e, n) { + this.expectOptionalToken(e); + var t2 = []; + do + t2.push(n.call(this)); + while (this.expectOptionalToken(e)); + return t2; + }, I; + }(); + a.Parser = g; + function D(I) { + var s = I.value; + return v(I.kind) + (s != null ? ' "'.concat(s, '"') : ""); + } + function v(I) { + return (0, k.isPunctuatorTokenKind)(I) ? '"'.concat(I, '"') : I; + } + } }); + K(); + var Ie = ce(), ge = ue(), { hasPragma: Se } = le(), { locStart: Ae, locEnd: De } = pe(); + function Ke(a) { + let d = [], { startToken: i } = a.loc, { next: c } = i; + for (; c.kind !== ""; ) + c.kind === "Comment" && (Object.assign(c, { column: c.column - 1 }), d.push(c)), c = c.next; + return d; + } + function ie(a) { + if (a && typeof a == "object") { + delete a.startToken, delete a.endToken, delete a.prev, delete a.next; + for (let d in a) + ie(a[d]); + } + return a; + } + var X = { allowLegacySDLImplementsInterfaces: false, experimentalFragmentVariables: true }; + function Le(a) { + let { GraphQLError: d } = W(); + if (a instanceof d) { + let { message: i, locations: [c] } = a; + return Ie(i, { start: c }); + } + return a; + } + function xe(a) { + let { parse: d } = Oe(), { result: i, error: c } = ge(() => d(a, Object.assign({}, X)), () => d(a, Object.assign(Object.assign({}, X), {}, { allowLegacySDLImplementsInterfaces: true }))); + if (!i) + throw Le(c); + return i.comments = Ke(i), ie(i), i; + } + ae.exports = { parsers: { graphql: { parse: xe, astFormat: "graphql", hasPragma: Se, locStart: Ae, locEnd: De } } }; + }); + return be(); + }); + } + }); + + // node_modules/monaco-editor/esm/vs/base/common/errors.js + var 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); + }; + } + addListener(listener) { + this.listeners.push(listener); + return () => { + this._removeListener(listener); + }; + } + emit(e) { + this.listeners.forEach((listener) => { + listener(e); + }); + } + _removeListener(listener) { + this.listeners.splice(this.listeners.indexOf(listener), 1); + } + setUnexpectedErrorHandler(newUnexpectedErrorHandler) { + this.unexpectedErrorHandler = newUnexpectedErrorHandler; + } + getUnexpectedErrorHandler() { + return this.unexpectedErrorHandler; + } + onUnexpectedError(e) { + this.unexpectedErrorHandler(e); + this.emit(e); + } + // For external errors, we don't want the listeners to be called + onUnexpectedExternalError(e) { + this.unexpectedErrorHandler(e); + } + }; + var errorHandler = new ErrorHandler(); + function onUnexpectedError(e) { + if (!isCancellationError(e)) { + errorHandler.onUnexpectedError(e); + } + return void 0; + } + function transformErrorForSerialization(error) { + if (error instanceof Error) { + const { name: name2, message } = error; + const stack = error.stacktrace || error.stack; + return { + $isError: true, + name: name2, + message, + stack, + noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error) + }; + } + return error; + } + var canceledName = "Canceled"; + function isCancellationError(error) { + if (error instanceof CancellationError) { + return true; + } + return error instanceof Error && error.name === canceledName && error.message === canceledName; + } + var CancellationError = class extends Error { + constructor() { + super(canceledName); + this.name = this.message; + } + }; + var ErrorNoTelemetry = class _ErrorNoTelemetry 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"; + } + }; + var BugIndicatingError = class _BugIndicatingError extends Error { + constructor(message) { + super(message || "An unexpected bug occurred."); + Object.setPrototypeOf(this, _BugIndicatingError.prototype); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/functional.js + 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; + }; + } + + // node_modules/monaco-editor/esm/vs/base/common/iterator.js + var Iterable; + (function(Iterable2) { + function is(thing) { + return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function"; + } + Iterable2.is = is; + const _empty2 = Object.freeze([]); + function empty() { + return _empty2; + } + Iterable2.empty = empty; + function* single(element) { + yield element; + } + Iterable2.single = single; + function wrap2(iterableOrElement) { + if (is(iterableOrElement)) { + return iterableOrElement; + } else { + return single(iterableOrElement); + } + } + Iterable2.wrap = wrap2; + function from(iterable) { + return iterable || _empty2; + } + Iterable2.from = from; + function isEmpty(iterable) { + return !iterable || iterable[Symbol.iterator]().next().done === true; + } + Iterable2.isEmpty = isEmpty; + function first(iterable) { + return iterable[Symbol.iterator]().next().value; + } + Iterable2.first = first; + 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* concat(...iterables) { + for (const iterable of iterables) { + for (const element of iterable) { + yield element; + } + } + } + Iterable2.concat = concat; + 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 < to; from2++) { + yield arr[from2]; + } + } + Iterable2.slice = slice; + function consume(iterable, atMost = Number.POSITIVE_INFINITY) { + const consumed = []; + if (atMost === 0) { + return [consumed, iterable]; + } + const iterator = iterable[Symbol.iterator](); + for (let i = 0; i < atMost; i++) { + const next = iterator.next(); + if (next.done) { + return [consumed, Iterable2.empty()]; + } + consumed.push(next.value); + } + return [consumed, { [Symbol.iterator]() { + return iterator; + } }]; + } + Iterable2.consume = consume; + })(Iterable || (Iterable = {})); + + // node_modules/monaco-editor/esm/vs/base/common/lifecycle.js + var TRACK_DISPOSABLES = false; + var disposableTracker = null; + function setDisposableTracker(tracker) { + disposableTracker = tracker; + } + 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 (_a3) { + } + } + } + markAsDisposed(disposable) { + if (disposable && disposable !== Disposable.None) { + try { + disposable[__is_disposable_tracked__] = true; + } catch (_a3) { + } + } + } + markAsSingleton(disposable) { + } + }()); + } + 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 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 DisposableStore = class _DisposableStore { + constructor() { + this._toDispose = /* @__PURE__ */ new Set(); + this._isDisposed = false; + trackDisposable(this); + } + /** + * Dispose of all registered disposables and mark this object as disposed. + * + * Any future disposables added to this object will be disposed of on `add`. + */ + dispose() { + if (this._isDisposed) { + return; + } + markAsDisposed(this); + this._isDisposed = true; + this.clear(); + } + /** + * @return `true` if this object has been disposed of. + */ + get isDisposed() { + return this._isDisposed; + } + /** + * Dispose of all registered disposables but do not mark this object as disposed. + */ + clear() { + if (this._toDispose.size === 0) { + return; + } + try { + dispose(this._toDispose); + } finally { + this._toDispose.clear(); + } + } + /** + * Add a new {@link IDisposable disposable} to the collection. + */ + 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; + var Disposable = class { + constructor() { + this._store = new DisposableStore(); + trackDisposable(this); + setParentOfDisposable(this._store, this); + } + dispose() { + markAsDisposed(this); + this._store.dispose(); + } + /** + * Adds `o` to the collection of disposables managed by this object. + */ + _register(o) { + if (o === this) { + throw new Error("Cannot register a disposable on itself!"); + } + return this._store.add(o); + } + }; + Disposable.None = Object.freeze({ dispose() { + } }); + var DisposableMap = class { + constructor() { + this._store = /* @__PURE__ */ new Map(); + this._isDisposed = false; + trackDisposable(this); + } + /** + * Disposes of all stored values and mark this object as disposed. + * + * Trying to use this object after it has been disposed of is an error. + */ + dispose() { + markAsDisposed(this); + this._isDisposed = true; + this.clearAndDisposeAll(); + } + /** + * Disposes of all stored values and clear the map, but DO NOT mark this object as disposed. + */ + clearAndDisposeAll() { + if (!this._store.size) { + return; + } + try { + dispose(this._store.values()); + } finally { + this._store.clear(); + } + } + has(key) { + return this._store.has(key); + } + get(key) { + return this._store.get(key); + } + set(key, value, skipDisposeOnOverwrite = false) { + var _a3; + 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) { + (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + } + this._store.set(key, value); + } + /** + * Delete the value stored for `key` from this map and also dispose of it. + */ + deleteAndDispose(key) { + var _a3; + (_a3 = this._store.get(key)) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + this._store.delete(key); + } + [Symbol.iterator]() { + return this._store[Symbol.iterator](); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/linkedList.js + var Node = class _Node { + constructor(element) { + this.element = element; + this.next = _Node.Undefined; + this.prev = _Node.Undefined; + } + }; + Node.Undefined = new Node(void 0); + var LinkedList = class { + constructor() { + this._first = Node.Undefined; + this._last = Node.Undefined; + this._size = 0; + } + get size() { + return this._size; + } + isEmpty() { + return this._first === Node.Undefined; + } + clear() { + let node = this._first; + while (node !== Node.Undefined) { + const next = node.next; + node.prev = Node.Undefined; + node.next = Node.Undefined; + node = next; + } + this._first = Node.Undefined; + this._last = Node.Undefined; + this._size = 0; + } + unshift(element) { + return this._insert(element, false); + } + push(element) { + return this._insert(element, true); + } + _insert(element, atTheEnd) { + const newNode = new Node(element); + if (this._first === Node.Undefined) { + this._first = newNode; + this._last = newNode; + } else if (atTheEnd) { + const oldLast = this._last; + this._last = newNode; + newNode.prev = oldLast; + oldLast.next = newNode; + } else { + const oldFirst = this._first; + this._first = newNode; + newNode.next = oldFirst; + oldFirst.prev = newNode; + } + this._size += 1; + let didRemove = false; + return () => { + if (!didRemove) { + didRemove = true; + this._remove(newNode); + } + }; + } + shift() { + if (this._first === Node.Undefined) { + return void 0; + } else { + const res = this._first.element; + this._remove(this._first); + return res; + } + } + pop() { + if (this._last === Node.Undefined) { + return void 0; + } else { + const res = this._last.element; + this._remove(this._last); + return res; + } + } + _remove(node) { + if (node.prev !== Node.Undefined && node.next !== Node.Undefined) { + const anchor = node.prev; + anchor.next = node.next; + node.next.prev = anchor; + } else if (node.prev === Node.Undefined && node.next === Node.Undefined) { + this._first = Node.Undefined; + this._last = Node.Undefined; + } else if (node.next === Node.Undefined) { + this._last = this._last.prev; + this._last.next = Node.Undefined; + } else if (node.prev === Node.Undefined) { + this._first = this._first.next; + this._first.prev = Node.Undefined; + } + this._size -= 1; + } + *[Symbol.iterator]() { + let node = this._first; + while (node !== Node.Undefined) { + yield node.element; + node = node.next; + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/stopwatch.js + var hasPerformanceNow = globalThis.performance && typeof globalThis.performance.now === "function"; + var StopWatch = class _StopWatch { + 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(); + } + reset() { + this._startTime = this._now(); + this._stopTime = -1; + } + elapsed() { + if (this._stopTime !== -1) { + return this._stopTime - this._startTime; + } + return this._now() - this._startTime; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/event.js + var _enableDisposeWithListenerWarning = false; + var _enableSnapshotPotentialLeakWarning = false; + var Event; + (function(Event2) { + Event2.None = () => Disposable.None; + function _addLeakageTraceLogic(options) { + if (_enableSnapshotPotentialLeakWarning) { + const { onDidAddListener: origListenerDidAdd } = options; + const stack = Stacktrace.create(); + let count = 0; + options.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 options = { + onWillAddFirstListener() { + listener = event(emitter.fire, emitter); + }, + onDidRemoveLastListener() { + listener === null || listener === void 0 ? void 0 : listener.dispose(); + } + }; + if (!disposable) { + _addLeakageTraceLogic(options); + } + const emitter = new Emitter(options); + 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 options = { + 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(options); + } + const emitter = new Emitter(options); + 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, equals3 = (a, b) => a === b, disposable) { + let firstCall = true; + let cache; + return filter(event, (value) => { + const shouldEmit = firstCall || !equals3(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(); + } + /** @see {@link Event.map} */ + map(fn) { + return new ChainableEvent(map(this.event, fn, this.disposables)); + } + /** @see {@link Event.forEach} */ + forEach(fn) { + return new ChainableEvent(forEach(this.event, fn, this.disposables)); + } + filter(fn) { + return new ChainableEvent(filter(this.event, fn, this.disposables)); + } + /** @see {@link Event.reduce} */ + reduce(merge, initial) { + return new ChainableEvent(reduce(this.event, merge, initial, this.disposables)); + } + /** @see {@link Event.reduce} */ + 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)); + } + /** + * Attach a listener to the event. + */ + on(listener, thisArgs, disposables) { + return this.event(listener, thisArgs, disposables); + } + /** @see {@link Event.once} */ + 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 = (id2) => id2) { + 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 = (id2) => id2) { + 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 options = { + onWillAddFirstListener: () => { + _observable.addObserver(this); + }, + onDidRemoveLastListener: () => { + _observable.removeObserver(this); + } + }; + if (!store) { + _addLeakageTraceLogic(options); + } + this.emitter = new Emitter(options); + 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 = {})); + var EventProfiling = class _EventProfiling { + constructor(name2) { + this.listenerCount = 0; + this.invocationCount = 0; + this.elapsedOverall = 0; + this.durations = []; + this.name = `${name2}_${_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 = /* @__PURE__ */ new Set(); + EventProfiling._idPool = 0; + var _globalLeakWarningThreshold = -1; + var LeakageMonitor = class { + constructor(threshold, name2 = Math.random().toString(18).slice(2, 5)) { + this.threshold = threshold; + this.name = name2; + this._warnCountdown = 0; + } + dispose() { + var _a3; + (_a3 = this._stacks) === null || _a3 === void 0 ? void 0 : _a3.clear(); + } + check(stack, listenerCount) { + const threshold = this.threshold; + if (threshold <= 0 || listenerCount < threshold) { + return void 0; + } + if (!this._stacks) { + this._stacks = /* @__PURE__ */ new Map(); + } + const count = this._stacks.get(stack.value) || 0; + this._stacks.set(stack.value, count + 1); + this._warnCountdown -= 1; + if (this._warnCountdown <= 0) { + this._warnCountdown = threshold * 0.5; + let topStack; + let topCount = 0; + for (const [stack2, count2] of this._stacks) { + if (!topStack || topCount < count2) { + topStack = stack2; + topCount = count2; + } + } + console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`); + console.warn(topStack); + } + return () => { + const count2 = this._stacks.get(stack.value) || 0; + this._stacks.set(stack.value, count2 - 1); + }; + } + }; + var Stacktrace = class _Stacktrace { + static create() { + var _a3; + return new _Stacktrace((_a3 = new Error().stack) !== null && _a3 !== void 0 ? _a3 : ""); + } + constructor(value) { + this.value = value; + } + print() { + console.warn(this.value.split("\n").slice(2).join("\n")); + } + }; + var id = 0; + var UniqueContainer = class { + constructor(value) { + this.value = value; + this.id = id++; + } + }; + var compactionThreshold = 2; + var forEachListener = (listeners, fn) => { + if (listeners instanceof UniqueContainer) { + fn(listeners); + } else { + for (let i = 0; i < listeners.length; i++) { + const l = listeners[i]; + if (l) { + fn(l); + } + } + } + }; + var Emitter = class { + constructor(options) { + var _a3, _b, _c, _d, _e; + this._size = 0; + this._options = options; + this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.leakWarningThreshold) ? new LeakageMonitor((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : void 0; + this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : void 0; + this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue; + } + dispose() { + var _a3, _b, _c, _d; + if (!this._disposed) { + this._disposed = true; + if (((_a3 = this._deliveryQueue) === null || _a3 === void 0 ? void 0 : _a3.current) === this) { + this._deliveryQueue.reset(); + } + if (this._listeners) { + if (_enableDisposeWithListenerWarning) { + const listeners = this._listeners; + queueMicrotask(() => { + forEachListener(listeners, (l) => { + var _a4; + return (_a4 = l.stack) === null || _a4 === void 0 ? void 0 : _a4.print(); + }); + }); + } + this._listeners = void 0; + this._size = 0; + } + (_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b); + (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose(); + } + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + var _a3; + (_a3 = this._event) !== null && _a3 !== void 0 ? _a3 : this._event = (callback, thisArgs, disposables) => { + var _a4, _b, _c, _d, _e; + 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 * 0.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) { + (_b = (_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.onWillAddFirstListener) === null || _b === void 0 ? void 0 : _b.call(_a4, this); + this._listeners = contained; + (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); + } else if (this._listeners instanceof UniqueContainer) { + (_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : 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 _a3, _b, _c, _d; + (_b = (_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onWillRemoveListener) === null || _b === void 0 ? void 0 : _b.call(_a3, this); + if (!this._listeners) { + return; + } + if (this._size === 1) { + this._listeners = void 0; + (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, 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; i < listeners.length; i++) { + if (listeners[i]) { + listeners[n++] = listeners[i]; + } else if (adjustDeliveryQueue) { + this._deliveryQueue.end--; + if (n < this._deliveryQueue.i) { + this._deliveryQueue.i--; + } + } + } + listeners.length = n; + } + } + _deliver(listener, value) { + var _a3; + if (!listener) { + return; + } + const errorHandler2 = ((_a3 = this._options) === null || _a3 === void 0 ? void 0 : _a3.onListenerError) || onUnexpectedError; + if (!errorHandler2) { + listener.value(value); + return; + } + try { + listener.value(value); + } catch (e) { + errorHandler2(e); + } + } + /** Delivers items in the queue. Assumes the queue is ready to go. */ + _deliverQueue(dq) { + const listeners = dq.current._listeners; + while (dq.i < dq.end) { + this._deliver(listeners[dq.i++], dq.value); + } + dq.reset(); + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + var _a3, _b, _c, _d; + if ((_a3 = this._deliveryQueue) === null || _a3 === void 0 ? void 0 : _a3.current) { + this._deliverQueue(this._deliveryQueue); + (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop(); + } + (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size); + if (!this._listeners) { + } else if (this._listeners instanceof UniqueContainer) { + this._deliver(this._listeners, event); + } else { + const dq = this._deliveryQueue; + dq.enqueue(this, event, this._listeners.length); + this._deliverQueue(dq); + } + (_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop(); + } + hasListeners() { + return this._size > 0; + } + }; + var 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; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/types.js + function isString(str) { + return typeof str === "string"; + } + + // node_modules/monaco-editor/esm/vs/base/common/objects.js + function getAllPropertyNames(obj) { + let res = []; + while (Object.prototype !== obj) { + res = res.concat(Object.getOwnPropertyNames(obj)); + obj = Object.getPrototypeOf(obj); + } + return res; + } + function getAllMethodNames(obj) { + const methods = []; + for (const prop of getAllPropertyNames(obj)) { + if (typeof obj[prop] === "function") { + methods.push(prop); + } + } + return methods; + } + function createProxyObject(methodNames, invoke) { + const createProxyMethod = (method) => { + return function() { + 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; + } + + // node_modules/monaco-editor/esm/vs/nls.js + var isPseudo = typeof document !== "undefined" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; + function _format(message, args) { + let result; + if (args.length === 0) { + result = message; + } else { + result = message.replace(/\{(\d+)\}/g, (match, rest) => { + const index = rest[0]; + const arg = args[index]; + let result2 = match; + 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 = "\uFF3B" + result.replace(/[aouei]/g, "$&$&") + "\uFF3D"; + } + return result; + } + function localize(data, message, ...args) { + return _format(message, args); + } + function getConfiguredDefaultLocale(_) { + return void 0; + } + + // node_modules/monaco-editor/esm/vs/base/common/platform.js + var _a; + var LANGUAGE_DEFAULT = "en"; + var _isWindows = false; + var _isMacintosh = false; + var _isLinux = false; + var _isLinuxSnap = false; + var _isNative = false; + var _isWeb = false; + var _isElectron = false; + var _isIOS = false; + var _isCI = false; + var _isMobile = false; + var _locale = void 0; + var _language = LANGUAGE_DEFAULT; + var _platformLocale = LANGUAGE_DEFAULT; + var _translationsConfigFile = void 0; + var _userAgent = void 0; + var globals = typeof self === "object" ? self : typeof global === "object" ? global : {}; + var nodeProcess = void 0; + if (typeof globals.vscode !== "undefined" && typeof globals.vscode.process !== "undefined") { + nodeProcess = globals.vscode.process; + } else if (typeof process !== "undefined") { + nodeProcess = process; + } + var isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === "string"; + var 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( + // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` + // to ensure that the NLS AMD Loader plugin has been loaded and configured. + // This is because the loader plugin decides what the default locale is based on + // how it's able to resolve the strings. + 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."); + } + var _platform = 0; + if (_isMacintosh) { + _platform = 1; + } else if (_isWindows) { + _platform = 3; + } else if (_isLinux) { + _platform = 2; + } + var isWindows = _isWindows; + var isMacintosh = _isMacintosh; + var isWebWorker = _isWeb && typeof globals.importScripts === "function"; + var userAgent = _userAgent; + var language = _language; + var Language; + (function(Language2) { + function value() { + return language; + } + Language2.value = value; + function isDefaultVariant() { + if (language.length === 2) { + return language === "en"; + } else if (language.length >= 3) { + return language[0] === "e" && language[1] === "n" && language[2] === "-"; + } else { + return false; + } + } + Language2.isDefaultVariant = isDefaultVariant; + function isDefault() { + return language === "en"; + } + Language2.isDefault = isDefault; + })(Language || (Language = {})); + var setTimeout0IsFaster = typeof globals.postMessage === "function" && !globals.importScripts; + var setTimeout0 = (() => { + if (setTimeout0IsFaster) { + const pending = []; + globals.addEventListener("message", (e) => { + if (e.data && e.data.vscodeScheduleAsyncWork) { + for (let i = 0, len = pending.length; i < len; i++) { + const candidate = pending[i]; + if (candidate.id === e.data.vscodeScheduleAsyncWork) { + pending.splice(i, 1); + candidate.callback(); + return; + } + } + } + }); + let lastId = 0; + return (callback) => { + const myId = ++lastId; + pending.push({ + id: myId, + callback + }); + globals.postMessage({ vscodeScheduleAsyncWork: myId }, "*"); + }; + } + return (callback) => setTimeout(callback); + })(); + var isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0); + var isFirefox = !!(userAgent && userAgent.indexOf("Firefox") >= 0); + var isSafari = !!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0)); + var isEdge = !!(userAgent && userAgent.indexOf("Edg/") >= 0); + var isAndroid = !!(userAgent && userAgent.indexOf("Android") >= 0); + + // node_modules/monaco-editor/esm/vs/base/common/cancellation.js + var shortcutEvent = Object.freeze(function(callback, context) { + const handle = setTimeout(callback.bind(context), 0); + return { dispose() { + clearTimeout(handle); + } }; + }); + var CancellationToken; + (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 = {})); + var 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; + } + } + }; + var 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 _a3; + if (cancel) { + this.cancel(); + } + (_a3 = this._parentListener) === null || _a3 === void 0 ? void 0 : _a3.dispose(); + if (!this._token) { + this._token = CancellationToken.None; + } else if (this._token instanceof MutableToken) { + this._token.dispose(); + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/cache.js + var 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; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/lazy.js + var Lazy = class { + constructor(executor) { + this.executor = executor; + this._didRun = false; + } + /** + * True if the lazy value has been resolved. + */ + get hasValue() { + return this._didRun; + } + /** + * Get the wrapped value. + * + * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only + * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value + */ + 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 the wrapped value without forcing evaluation. + */ + get rawValue() { + return this._value; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/strings.js + var _a2; + function escapeRegExpCharacters(value) { + return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); + } + function splitLines(str) { + return str.split(/\r\n|\r|\n/); + } + function firstNonWhitespaceIndex(str) { + for (let i = 0, len = str.length; i < len; i++) { + const chCode = str.charCodeAt(i); + if (chCode !== 32 && chCode !== 9) { + return i; + } + } + return -1; + } + function lastNonWhitespaceIndex(str, startIndex = str.length - 1) { + for (let i = startIndex; i >= 0; i--) { + const chCode = str.charCodeAt(i); + if (chCode !== 32 && chCode !== 9) { + return i; + } + } + return -1; + } + function isUpperAsciiLetter(code) { + return code >= 65 && code <= 90; + } + function isHighSurrogate(charCode) { + return 55296 <= charCode && charCode <= 56319; + } + function isLowSurrogate(charCode) { + return 56320 <= charCode && charCode <= 57343; + } + function computeCodePoint(highSurrogate, lowSurrogate) { + return (highSurrogate - 55296 << 10) + (lowSurrogate - 56320) + 65536; + } + function getNextCodePoint(str, len, offset) { + const charCode = str.charCodeAt(offset); + if (isHighSurrogate(charCode) && offset + 1 < len) { + const nextCharCode = str.charCodeAt(offset + 1); + if (isLowSurrogate(nextCharCode)) { + return computeCodePoint(charCode, nextCharCode); + } + } + return charCode; + } + var IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; + function isBasicASCII(str) { + return IS_BASIC_ASCII.test(str); + } + var UTF8_BOM_CHARACTER = String.fromCharCode( + 65279 + /* CharCode.UTF8_BOM */ + ); + var GraphemeBreakTree = class _GraphemeBreakTree { + 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 (codePoint < data[3 * nodeIndex]) { + nodeIndex = 2 * nodeIndex; + } else if (codePoint > data[3 * nodeIndex + 1]) { + nodeIndex = 2 * nodeIndex + 1; + } else { + return data[3 * nodeIndex + 2]; + } + } + return 0; + } + }; + GraphemeBreakTree._INSTANCE = null; + function getGraphemeBreakRawData() { + return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]"); + } + var 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); + } + /** + * Returns the non basic ASCII code point that the given code point can be confused, + * or undefined if such code point does note exist. + */ + getPrimaryConfusable(codePoint) { + return this.confusableDictionary.get(codePoint); + } + getConfusableCodePoints() { + return new Set(this.confusableDictionary.keys()); + } + }; + _a2 = AmbiguousCharacters; + AmbiguousCharacters.ambiguousCharacterData = new Lazy(() => { + return 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 = /* @__PURE__ */ new Map(); + for (let i = 0; i < arr.length; i += 2) { + result.set(arr[i], arr[i + 1]); + } + return result; + } + function mergeMaps(map1, map2) { + const result = new Map(map1); + for (const [key, value] of map2) { + result.set(key, value); + } + return result; + } + function intersectMaps(map1, map2) { + if (!map1) { + return map2; + } + const result = /* @__PURE__ */ new Map(); + for (const [key, value] of map1) { + if (map2.has(key)) { + result.set(key, value); + } + } + return result; + } + const data = _a2.ambiguousCharacterData.value; + let filteredLocales = locales.filter((l) => !l.startsWith("_") && l in data); + if (filteredLocales.length === 0) { + filteredLocales = ["_default"]; + } + let languageSpecificMap = void 0; + for (const locale of filteredLocales) { + const map2 = arrayToMap(data[locale]); + 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("_"))); + var InvisibleCharacters = class _InvisibleCharacters { + 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; + + // node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js + var INITIALIZE = "$initialize"; + var RequestMessage = class { + constructor(vsWorker, req, method, args) { + this.vsWorker = vsWorker; + this.req = req; + this.method = method; + this.args = args; + this.type = 0; + } + }; + var ReplyMessage = class { + constructor(vsWorker, seq, res, err) { + this.vsWorker = vsWorker; + this.seq = seq; + this.res = res; + this.err = err; + this.type = 1; + } + }; + var SubscribeEventMessage = class { + constructor(vsWorker, req, eventName, arg) { + this.vsWorker = vsWorker; + this.req = req; + this.eventName = eventName; + this.arg = arg; + this.type = 2; + } + }; + var EventMessage = class { + constructor(vsWorker, req, event) { + this.vsWorker = vsWorker; + this.req = req; + this.event = event; + this.type = 3; + } + }; + var UnsubscribeEventMessage = class { + constructor(vsWorker, req) { + this.vsWorker = vsWorker; + this.req = req; + this.type = 4; + } + }; + var SimpleWorkerProtocol = class { + constructor(handler) { + this._workerId = -1; + this._handler = handler; + this._lastSentReq = 0; + this._pendingReplies = /* @__PURE__ */ Object.create(null); + this._pendingEmitters = /* @__PURE__ */ new Map(); + this._pendingEvents = /* @__PURE__ */ 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 + }; + 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 < msg.args.length; i++) { + if (msg.args[i] instanceof ArrayBuffer) { + transfer.push(msg.args[i]); + } + } + } else if (msg.type === 1) { + if (msg.res instanceof ArrayBuffer) { + transfer.push(msg.res); + } + } + this._handler.sendMessage(msg, transfer); + } + }; + function propertyIsEvent(name2) { + return name2[0] === "o" && name2[1] === "n" && isUpperAsciiLetter(name2.charCodeAt(2)); + } + function propertyIsDynamicEvent(name2) { + return /^onDynamic/.test(name2) && isUpperAsciiLetter(name2.charCodeAt(9)); + } + function createProxyObject2(methodNames, invoke, proxyListen) { + const createProxyMethod = (method) => { + return function() { + const args = Array.prototype.slice.call(arguments, 0); + return invoke(method, args); + }; + }; + const createProxyDynamicEvent = (eventName) => { + return 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 SimpleWorkerServer = class { + constructor(postMessage, requestHandlerFactory) { + this._requestHandlerFactory = requestHandlerFactory; + this._requestHandler = null; + this._protocol = new SimpleWorkerProtocol({ + sendMessage: (msg, transfer) => { + postMessage(msg, transfer); + }, + handleMessage: (method, args) => this._handleMessage(method, args), + handleEvent: (eventName, arg) => this._handleEvent(eventName, arg) + }); + } + onmessage(msg) { + this._protocol.handleMessage(msg); + } + _handleMessage(method, args) { + if (method === INITIALIZE) { + return this.initialize(args[0], args[1], args[2], args[3]); + } + if (!this._requestHandler || typeof this._requestHandler[method] !== "function") { + return Promise.reject(new Error("Missing requestHandler or method: " + method)); + } + try { + return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args)); + } catch (e) { + return Promise.reject(e); + } + } + _handleEvent(eventName, arg) { + if (!this._requestHandler) { + throw new Error(`Missing requestHandler`); + } + if (propertyIsDynamicEvent(eventName)) { + const event = this._requestHandler[eventName].call(this._requestHandler, arg); + if (typeof event !== "function") { + throw new Error(`Missing dynamic event ${eventName} on request handler.`); + } + return event; + } + if (propertyIsEvent(eventName)) { + const event = this._requestHandler[eventName]; + if (typeof event !== "function") { + throw new Error(`Missing event ${eventName} on request handler.`); + } + return event; + } + throw new Error(`Malformed event name ${eventName}`); + } + initialize(workerId, loaderConfig, moduleId, hostMethods) { + this._protocol.setWorkerId(workerId); + const proxyMethodRequest = (method, args) => { + return this._protocol.sendMessage(method, args); + }; + const proxyListen = (eventName, arg) => { + return this._protocol.listen(eventName, arg); + }; + const hostProxy = createProxyObject2(hostMethods, proxyMethodRequest, proxyListen); + if (this._requestHandlerFactory) { + this._requestHandler = this._requestHandlerFactory(hostProxy); + return Promise.resolve(getAllMethodNames(this._requestHandler)); + } + if (loaderConfig) { + if (typeof loaderConfig.baseUrl !== "undefined") { + delete loaderConfig["baseUrl"]; + } + if (typeof loaderConfig.paths !== "undefined") { + if (typeof loaderConfig.paths.vs !== "undefined") { + delete loaderConfig.paths["vs"]; + } + } + if (typeof loaderConfig.trustedTypesPolicy !== void 0) { + delete loaderConfig["trustedTypesPolicy"]; + } + loaderConfig.catchError = true; + globalThis.require.config(loaderConfig); + } + return new Promise((resolve2, reject) => { + const req = globalThis.require; + req([moduleId], (module) => { + this._requestHandler = module.create(hostProxy); + if (!this._requestHandler) { + reject(new Error(`No RequestHandler!`)); + return; + } + resolve2(getAllMethodNames(this._requestHandler)); + }, reject); + }); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js + var DiffChange = class { + /** + * Constructs a new DiffChange with the given sequence information + * and content. + */ + constructor(originalStart, originalLength, modifiedStart, modifiedLength) { + this.originalStart = originalStart; + this.originalLength = originalLength; + this.modifiedStart = modifiedStart; + this.modifiedLength = modifiedLength; + } + /** + * The end point (exclusive) of the change in the original sequence. + */ + getOriginalEnd() { + return this.originalStart + this.originalLength; + } + /** + * The end point (exclusive) of the change in the modified sequence. + */ + getModifiedEnd() { + return this.modifiedStart + this.modifiedLength; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/hash.js + function numberHash(val, initialHashVal) { + return (initialHashVal << 5) - initialHashVal + val | 0; + } + function stringHash(s, hashVal) { + hashVal = numberHash(149417, hashVal); + for (let i = 0, length = s.length; i < length; i++) { + hashVal = numberHash(s.charCodeAt(i), hashVal); + } + return hashVal; + } + function leftRotate(value, bits, totalBits = 32) { + const delta = totalBits - bits; + const mask = ~((1 << delta) - 1); + return (value << bits | (mask & value) >>> delta) >>> 0; + } + function fill(dest, index = 0, count = dest.byteLength, value = 0) { + for (let i = 0; i < count; i++) { + dest[index + i] = value; + } + } + function leftPad(value, length, char = "0") { + while (value.length < length) { + value = char + value; + } + return value; + } + function toHexString(bufferOrValue, bitsize = 32) { + if (bufferOrValue instanceof ArrayBuffer) { + return Array.from(new Uint8Array(bufferOrValue)).map((b) => b.toString(16).padStart(2, "0")).join(""); + } + return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4); + } + var StringSHA1 = class _StringSHA1 { + constructor() { + this._h0 = 1732584193; + this._h1 = 4023233417; + this._h2 = 2562383102; + this._h3 = 271733878; + this._h4 = 3285377520; + this._buff = new Uint8Array( + 64 + 3 + /* to fit any utf-8 */ + ); + 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 < strLen) { + const nextCharCode = str.charCodeAt(offset + 1); + if (isLowSurrogate(nextCharCode)) { + offset++; + codePoint = computeCodePoint(charCode, nextCharCode); + } else { + codePoint = 65533; + } + } else { + leftoverHighSurrogate = charCode; + break; + } + } else if (isLowSurrogate(charCode)) { + codePoint = 65533; + } + buffLen = this._push(buff, buffLen, codePoint); + offset++; + if (offset < strLen) { + charCode = str.charCodeAt(offset); + } else { + break; + } + } + this._buffLen = buffLen; + this._leftoverHighSurrogate = leftoverHighSurrogate; + } + _push(buff, buffLen, codePoint) { + if (codePoint < 128) { + buff[buffLen++] = codePoint; + } else if (codePoint < 2048) { + buff[buffLen++] = 192 | (codePoint & 1984) >>> 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 + /* SHA1Constant.UNICODE_REPLACEMENT */ + ); + } + 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)); + + // node_modules/monaco-editor/esm/vs/base/common/diff/diff.js + var 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; i < len; i++) { + characters[i] = source.charCodeAt(i); + } + return characters; + } + }; + function stringDiff(original, modified, pretty) { + return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes; + } + var Debug = class { + static Assert(condition, message) { + if (!condition) { + throw new Error(message); + } + } + }; + var MyArray = class { + /** + * Copies a range of elements from an Array starting at the specified source index and pastes + * them to another Array starting at the specified destination index. The length and the indexes + * are specified as 64-bit integers. + * sourceArray: + * The Array that contains the data to copy. + * sourceIndex: + * A 64-bit integer that represents the index in the sourceArray at which copying begins. + * destinationArray: + * The Array that receives the data. + * destinationIndex: + * A 64-bit integer that represents the index in the destinationArray at which storing begins. + * length: + * A 64-bit integer that represents the number of elements to copy. + */ + static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { + for (let i = 0; i < length; i++) { + destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; + } + } + static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { + for (let i = 0; i < length; i++) { + destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; + } + } + }; + var DiffChangeHelper = class { + /** + * Constructs a new DiffChangeHelper for the given DiffSequences. + */ + constructor() { + this.m_changes = []; + this.m_originalStart = 1073741824; + this.m_modifiedStart = 1073741824; + this.m_originalCount = 0; + this.m_modifiedCount = 0; + } + /** + * Marks the beginning of the next change in the set of differences. + */ + MarkNextChange() { + if (this.m_originalCount > 0 || 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; + } + /** + * Adds the original element at the given position to the elements + * affected by the current change. The modified index gives context + * to the change position with respect to the original sequence. + * @param originalIndex The index of the original element to add. + * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence. + */ + AddOriginalElement(originalIndex, modifiedIndex) { + this.m_originalStart = Math.min(this.m_originalStart, originalIndex); + this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); + this.m_originalCount++; + } + /** + * Adds the modified element at the given position to the elements + * affected by the current change. The original index gives context + * to the change position with respect to the modified sequence. + * @param originalIndex The index of the original element that provides corresponding position in the original sequence. + * @param modifiedIndex The index of the modified element to add. + */ + AddModifiedElement(originalIndex, modifiedIndex) { + this.m_originalStart = Math.min(this.m_originalStart, originalIndex); + this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); + this.m_modifiedCount++; + } + /** + * Retrieves all of the changes marked by the class. + */ + getChanges() { + if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { + this.MarkNextChange(); + } + return this.m_changes; + } + /** + * Retrieves all of the changes marked by the class in the reverse order + */ + getReverseChanges() { + if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { + this.MarkNextChange(); + } + this.m_changes.reverse(); + return this.m_changes; + } + }; + var LcsDiff = class _LcsDiff { + /** + * Constructs the DiffFinder + */ + 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 < len; i++) { + hashes[i] = stringHash(elements[i], 0); + } + return [elements, hashes, true]; + } + if (elements instanceof Int32Array) { + return [[], elements, false]; + } + return [[], new Int32Array(elements), false]; + } + ElementsAreEqual(originalIndex, newIndex) { + if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) { + return false; + } + return this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true; + } + ElementsAreStrictEqual(originalIndex, newIndex) { + if (!this.ElementsAreEqual(originalIndex, newIndex)) { + return false; + } + const originalElement = _LcsDiff._getStrictElement(this._originalSequence, originalIndex); + const modifiedElement = _LcsDiff._getStrictElement(this._modifiedSequence, newIndex); + return originalElement === modifiedElement; + } + static _getStrictElement(sequence, index) { + if (typeof sequence.getStrictElement === "function") { + return sequence.getStrictElement(index); + } + return null; + } + OriginalElementsAreEqual(index1, index2) { + if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) { + return false; + } + return this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true; + } + ModifiedElementsAreEqual(index1, index2) { + if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) { + return false; + } + return this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true; + } + ComputeDiff(pretty) { + return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty); + } + /** + * Computes the differences between the original and modified input + * sequences on the bounded range. + * @returns An array of the differences between the two input sequences. + */ + _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) { + const quitEarlyArr = [false]; + let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr); + if (pretty) { + changes = this.PrettifyChanges(changes); + } + return { + quitEarly: quitEarlyArr[0], + changes + }; + } + /** + * Private helper method which computes the differences on the bounded range + * recursively. + * @returns An array of the differences between the two input sequences. + */ + ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) { + quitEarlyArr[0] = false; + while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) { + originalStart++; + modifiedStart++; + } + while (originalEnd >= 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 < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { + originalIndex = forwardPoints[diagonal + 1]; + modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; + if (originalIndex < lastOriginalIndex) { + changeHelper.MarkNextChange(); + } + lastOriginalIndex = originalIndex; + changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex); + diagonalRelative = diagonal + 1 - diagonalForwardBase; + } else { + originalIndex = forwardPoints[diagonal - 1] + 1; + modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; + if (originalIndex < lastOriginalIndex) { + changeHelper.MarkNextChange(); + } + lastOriginalIndex = originalIndex - 1; + changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1); + diagonalRelative = diagonal - 1 - diagonalForwardBase; + } + if (historyIndex >= 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 < diagonalMax && reversePoints[diagonal - 1] >= 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); + } + /** + * Given the range to compute the diff on, this method finds the point: + * (midOriginal, midModified) + * that exists in the middle of the LCS of the two sequences and + * is the point at which the LCS problem may be broken down recursively. + * This method will try to keep the LCS trace in memory. If the LCS recursion + * point is calculated and the full trace is available in memory, then this method + * will return the change list. + * @param originalStart The start bound of the original sequence range + * @param originalEnd The end bound of the original sequence range + * @param modifiedStart The start bound of the modified sequence range + * @param modifiedEnd The end bound of the modified sequence range + * @param midOriginal The middle point of the original sequence range + * @param midModified The middle point of the modified sequence range + * @returns The diff changes, if available, otherwise null + */ + 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 || diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { + originalIndex = forwardPoints[diagonal + 1]; + } else { + originalIndex = forwardPoints[diagonal - 1] + 1; + } + modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset; + const tempOriginalIndex = originalIndex; + while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) { + originalIndex++; + modifiedIndex++; + } + forwardPoints[diagonal] = originalIndex; + if (originalIndex + modifiedIndex > furthestOriginalIndex + 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 < diagonalReverseEnd && reversePoints[diagonal - 1] >= 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); + } + /** + * Shifts the given changes to provide a more intuitive diff. + * While the first element in a diff matches the first element after the diff, + * we shift the diff down. + * + * @param changes The list of changes to shift + * @returns The shifted changes + */ + PrettifyChanges(changes) { + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; + const originalStop = i < changes.length - 1 ? changes[i + 1].originalStart : this._originalElementsOrHash.length; + const modifiedStop = i < changes.length - 1 ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length; + const checkOriginal = change.originalLength > 0; + const checkModified = change.modifiedLength > 0; + while (change.originalStart + change.originalLength < originalStop && change.modifiedStart + change.modifiedLength < modifiedStop && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) { + const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart); + const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength); + if (endStrictEqual && !startStrictEqual) { + break; + } + change.originalStart++; + change.modifiedStart++; + } + const mergedChangeArr = [null]; + if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) { + changes[i] = mergedChangeArr[0]; + changes.splice(i + 1, 1); + i--; + continue; + } + } + for (let i = changes.length - 1; i >= 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 (originalStart < originalStop || modifiedStart < modifiedStop) { + break; + } + if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) { + break; + } + if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) { + break; + } + const touchingPreviousChange = originalStart === originalStop && modifiedStart === modifiedStop; + const score2 = (touchingPreviousChange ? 5 : 0) + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength); + if (score2 > bestScore) { + bestScore = score2; + 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; i < len; i++) { + const aChange = changes[i - 1]; + const bChange = changes[i]; + const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength; + const aOriginalStart = aChange.originalStart; + const bOriginalEnd = bChange.originalStart + bChange.originalLength; + const abOriginalLength = bOriginalEnd - aOriginalStart; + const aModifiedStart = aChange.modifiedStart; + const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength; + const abModifiedLength = bModifiedEnd - aModifiedStart; + if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) { + const t2 = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength); + if (t2) { + const [originalMatchStart, modifiedMatchStart] = t2; + if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) { + aChange.originalLength = originalMatchStart - aChange.originalStart; + aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart; + bChange.originalStart = originalMatchStart + matchedLength; + bChange.modifiedStart = modifiedMatchStart + matchedLength; + bChange.originalLength = bOriginalEnd - bChange.originalStart; + bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart; + } + } + } + } + } + return changes; + } + _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) { + if (originalLength < desiredLength || modifiedLength < desiredLength) { + return null; + } + const originalMax = originalStart + originalLength - desiredLength + 1; + const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1; + let bestScore = 0; + let bestOriginalStart = 0; + let bestModifiedStart = 0; + for (let i = originalStart; i < originalMax; i++) { + for (let j = modifiedStart; j < modifiedMax; j++) { + const score2 = this._contiguousSequenceScore(i, j, desiredLength); + if (score2 > 0 && score2 > bestScore) { + bestScore = score2; + bestOriginalStart = i; + bestModifiedStart = j; + } + } + } + if (bestScore > 0) { + return [bestOriginalStart, bestModifiedStart]; + } + return null; + } + _contiguousSequenceScore(originalStart, modifiedStart, length) { + let score2 = 0; + for (let l = 0; l < length; l++) { + if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) { + return 0; + } + score2 += this._originalStringElements[originalStart + l].length; + } + return score2; + } + _OriginalIsBoundary(index) { + if (index <= 0 || index >= 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; + } + /** + * Concatenates the two input DiffChange lists and returns the resulting + * list. + * @param The left changes + * @param The right changes + * @returns The concatenated list + */ + 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; + } + } + /** + * Returns true if the two changes overlap and can be merged into a single + * change + * @param left The left change + * @param right The right change + * @param mergedChange The merged change if the two overlap, null otherwise + * @returns True if the two changes overlap + */ + 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; + } + } + /** + * Helper method used to clip a diagonal index to the range of valid + * diagonals. This also decides whether or not the diagonal index, + * if it exceeds the boundary, should be clipped to the boundary or clipped + * one inside the boundary depending on the Even/Odd status of the boundary + * and numDifferences. + * @param diagonal The index of the diagonal to clip. + * @param numDifferences The current number of differences being iterated upon. + * @param diagonalBaseIndex The base reference diagonal. + * @param numDiagonals The total number of diagonals. + * @returns The clipped diagonal index. + */ + ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) { + if (diagonal >= 0 && diagonal < numDiagonals) { + return diagonal; + } + const diagonalsBelow = diagonalBaseIndex; + const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1; + const diffEven = numDifferences % 2 === 0; + if (diagonal < 0) { + const lowerBoundEven = diagonalsBelow % 2 === 0; + return diffEven === lowerBoundEven ? 0 : 1; + } else { + const upperBoundEven = diagonalsAbove % 2 === 0; + return diffEven === upperBoundEven ? numDiagonals - 1 : numDiagonals - 2; + } + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/process.js + var safeProcess; + 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 = { + // Supported + get platform() { + return isWindows ? "win32" : isMacintosh ? "darwin" : "linux"; + }, + get arch() { + return void 0; + }, + // Unsupported + get env() { + return {}; + }, + cwd() { + return "/"; + } + }; + } + var cwd = safeProcess.cwd; + var env = safeProcess.env; + var platform = safeProcess.platform; + var arch = safeProcess.arch; + + // node_modules/monaco-editor/esm/vs/base/common/path.js + var CHAR_UPPERCASE_A = 65; + var CHAR_LOWERCASE_A = 97; + var CHAR_UPPERCASE_Z = 90; + var CHAR_LOWERCASE_Z = 122; + var CHAR_DOT = 46; + var CHAR_FORWARD_SLASH = 47; + var CHAR_BACKWARD_SLASH = 92; + var CHAR_COLON = 58; + var CHAR_QUESTION_MARK = 63; + var ErrorInvalidArgType = class extends Error { + constructor(name2, 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 type2 = name2.indexOf(".") !== -1 ? "property" : "argument"; + let msg = `The "${name2}" ${type2} ${determiner} of type ${expected}`; + msg += `. Received type ${typeof actual}`; + super(msg); + this.code = "ERR_INVALID_ARG_TYPE"; + } + }; + function validateObject(pathObject, name2) { + if (pathObject === null || typeof pathObject !== "object") { + throw new ErrorInvalidArgType(name2, "Object", pathObject); + } + } + function validateString(value, name2) { + if (typeof value !== "string") { + throw new ErrorInvalidArgType(name2, "string", value); + } + } + var platformIsWin32 = platform === "win32"; + 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, isPathSeparator2) { + let res = ""; + let lastSegmentLength = 0; + let lastSlash = -1; + let dots = 0; + let code = 0; + for (let i = 0; i <= path.length; ++i) { + if (i < path.length) { + code = path.charCodeAt(i); + } else if (isPathSeparator2(code)) { + break; + } else { + code = CHAR_FORWARD_SLASH; + } + if (isPathSeparator2(code)) { + if (lastSlash === i - 1 || dots === 1) { + } else if (dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { + if (res.length > 2) { + 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 win32 = { + // path.resolve([from ...], to) + 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 isAbsolute2 = false; + const code = path.charCodeAt(0); + if (len === 1) { + if (isPathSeparator(code)) { + rootEnd = 1; + isAbsolute2 = true; + } + } else if (isPathSeparator(code)) { + isAbsolute2 = true; + if (isPathSeparator(path.charCodeAt(1))) { + let j = 2; + let last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len || j !== last) { + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + isAbsolute2 = 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 = isAbsolute2; + if (isAbsolute2 && 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 isAbsolute2 = false; + const code = path.charCodeAt(0); + if (len === 1) { + return isPosixPathSeparator(code) ? "\\" : path; + } + if (isPathSeparator(code)) { + isAbsolute2 = true; + if (isPathSeparator(path.charCodeAt(1))) { + let j = 2; + let last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + const firstPart = path.slice(last, j); + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + return `\\\\${firstPart}\\${path.slice(last)}\\`; + } + if (j !== last) { + device = `\\\\${firstPart}\\${path.slice(last, j)}`; + rootEnd = j; + } + } + } + } else { + rootEnd = 1; + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + device = path.slice(0, 2); + rootEnd = 2; + if (len > 2 && isPathSeparator(path.charCodeAt(2))) { + isAbsolute2 = true; + rootEnd = 3; + } + } + let tail = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute2, "\\", isPathSeparator) : ""; + if (tail.length === 0 && !isAbsolute2) { + tail = "."; + } + if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { + tail += "\\"; + } + if (device === void 0) { + return isAbsolute2 ? `\\${tail}` : tail; + } + return isAbsolute2 ? `${device}\\${tail}` : `${device}${tail}`; + }, + isAbsolute(path) { + validateString(path, "path"); + const len = path.length; + if (len === 0) { + return false; + } + const code = path.charCodeAt(0); + return isPathSeparator(code) || // Possible device root + 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; i < paths.length; ++i) { + const arg = paths[i]; + validateString(arg, "path"); + if (arg.length > 0) { + 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 < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) { + slashCount++; + } + if (slashCount >= 2) { + joined = `\\${joined.slice(slashCount)}`; + } + } + return win32.normalize(joined); + }, + // It will solve the relative path from `from` to `to`, for instance: + // from = 'C:\\orandea\\test\\aaa' + // to = 'C:\\orandea\\impl\\bbb' + // The output of the function should be: '..\\..\\impl\\bbb' + 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 (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { + fromStart++; + } + let fromEnd = from.length; + while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { + fromEnd--; + } + const fromLen = fromEnd - fromStart; + let toStart = 0; + while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { + toStart++; + } + let toEnd = to.length; + while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { + toEnd--; + } + const toLen = toEnd - toStart; + const length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for (; i < length; i++) { + const fromCode = from.charCodeAt(fromStart + i); + if (fromCode !== to.charCodeAt(toStart + i)) { + break; + } else if (fromCode === CHAR_BACKWARD_SLASH) { + lastCommonSep = i; + } + } + if (i !== length) { + if (lastCommonSep === -1) { + return toOrig; + } + } else { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { + return toOrig.slice(toStart + i + 1); + } + if (i === 2) { + return toOrig.slice(toStart + i); + } + } + if (fromLen > length) { + 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 (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + return path; + } + if (j !== last) { + rootEnd = offset = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + rootEnd = len > 2 && 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j < len && j !== last) { + last = j; + while (j < len && !isPathSeparator(path.charCodeAt(j))) { + j++; + } + if (j === len) { + rootEnd = j; + } else if (j !== last) { + rootEnd = j + 1; + } + } + } + } + } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { + if (len <= 2) { + ret.root = ret.dir = path; + return ret; + } + rootEnd = 2; + if (isPathSeparator(path.charCodeAt(2))) { + if (len === 3) { + ret.root = ret.dir = path; + return ret; + } + rootEnd = 3; + } + } + if (rootEnd > 0) { + 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 + }; + var posixCwd = (() => { + if (platformIsWin32) { + const regexp = /\\/g; + return () => { + const cwd2 = cwd().replace(regexp, "/"); + return cwd2.slice(cwd2.indexOf("/")); + }; + } + return () => cwd(); + })(); + var posix = { + // path.resolve([from ...], to) + 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 isAbsolute2 = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; + path = normalizeString(path, !isAbsolute2, "/", isPosixPathSeparator); + if (path.length === 0) { + if (isAbsolute2) { + return "/"; + } + return trailingSeparator ? "./" : "."; + } + if (trailingSeparator) { + path += "/"; + } + return isAbsolute2 ? `/${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; i < paths.length; ++i) { + const arg = paths[i]; + validateString(arg, "path"); + if (arg.length > 0) { + 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 length = fromLen < toLen ? fromLen : toLen; + let lastCommonSep = -1; + let i = 0; + for (; i < length; i++) { + const fromCode = from.charCodeAt(fromStart + i); + if (fromCode !== to.charCodeAt(toStart + i)) { + break; + } else if (fromCode === CHAR_FORWARD_SLASH) { + lastCommonSep = i; + } + } + if (i === length) { + if (toLen > length) { + 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 > length) { + 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 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 isAbsolute2 = path.charCodeAt(0) === CHAR_FORWARD_SLASH; + let start; + if (isAbsolute2) { + 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 && isAbsolute2 ? 1 : startPart; + if (startDot === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + 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 (isAbsolute2) { + ret.dir = "/"; + } + return ret; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + posix.win32 = win32.win32 = win32; + posix.posix = win32.posix = posix; + var normalize = platformIsWin32 ? win32.normalize : posix.normalize; + var isAbsolute = platformIsWin32 ? win32.isAbsolute : posix.isAbsolute; + var join = platformIsWin32 ? win32.join : posix.join; + var resolve = platformIsWin32 ? win32.resolve : posix.resolve; + var relative = platformIsWin32 ? win32.relative : posix.relative; + var dirname = platformIsWin32 ? win32.dirname : posix.dirname; + var basename = platformIsWin32 ? win32.basename : posix.basename; + var extname = platformIsWin32 ? win32.extname : posix.extname; + var format = platformIsWin32 ? win32.format : posix.format; + var parse = platformIsWin32 ? win32.parse : posix.parse; + var toNamespacedPath = platformIsWin32 ? win32.toNamespacedPath : posix.toNamespacedPath; + var sep = platformIsWin32 ? win32.sep : posix.sep; + var delimiter = platformIsWin32 ? win32.delimiter : posix.delimiter; + + // node_modules/monaco-editor/esm/vs/base/common/uri.js + var _schemePattern = /^\w[\w\d+.-]*$/; + var _singleSlashStart = /^\//; + var _doubleSlashStart = /^\/\//; + 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; + } + var _empty = ""; + var _slash = "/"; + var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; + var URI = class _URI { + 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"; + } + /** + * @internal + */ + 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); + } + } + // ---- filesystem path ----------------------- + /** + * Returns a string representing the corresponding file system path of this URI. + * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the + * platform specific path separator. + * + * * Will *not* validate the path for invalid characters and semantics. + * * Will *not* look at the scheme of this URI. + * * The result shall *not* be used for display purposes but for accessing a file on disk. + * + * + * The *difference* to `URI#path` is the use of the platform specific separator and the handling + * of UNC paths. See the below sample of a file-uri with an authority (UNC path). + * + * ```ts + const u = URI.parse('file://server/c$/folder/file.txt') + u.authority === 'server' + u.path === '/shares/c$/file.txt' + u.fsPath === '\\server\c$\folder\file.txt' + ``` + * + * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, + * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working + * with URIs that represent files on disk (`file` scheme). + */ + get fsPath() { + return uriToFsPath(this, false); + } + // ---- modify to new ------------------------- + with(change) { + if (!change) { + return this; + } + let { scheme, authority, path, query, 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); + } + // ---- parse & validate ------------------------ + /** + * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, + * `file:///usr/home`, or `scheme:with/path`. + * + * @param value A string which represents an URI (see `URI#toString`). + */ + static parse(value, _strict = false) { + const match = _regexp.exec(value); + if (!match) { + return new Uri(_empty, _empty, _empty, _empty, _empty); + } + return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); + } + /** + * Creates a new URI from a file system path, e.g. `c:\my\files`, + * `/usr/home`, or `\\server\share\some\path`. + * + * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument + * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** + * `URI.parse('file://' + path)` because the path might contain characters that are + * interpreted (# and ?). See the following sample: + * ```ts + const good = URI.file('/coding/c#/project1'); + good.scheme === 'file'; + good.path === '/coding/c#/project1'; + good.fragment === ''; + const bad = URI.parse('file://' + '/coding/c#/project1'); + bad.scheme === 'file'; + bad.path === '/coding/c'; // path is now broken + bad.fragment === '/project1'; + ``` + * + * @param path A file system path (see `URI#fsPath`) + */ + 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); + } + /** + * Creates new URI from uri components. + * + * Unless `strict` is `true` the scheme is defaults to be `file`. This function performs + * validation and should be used for untrusted uri components retrieved from storage, + * user input, command arguments etc + */ + static from(components, strict) { + const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment, strict); + return result; + } + /** + * Join a URI path with path fragments and normalizes the resulting path. + * + * @param uri The input URI. + * @param pathFragment The path fragment to add to the URI path. + * @returns The resulting URI. + */ + 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 }); + } + // ---- printing/externalize --------------------------- + /** + * Creates a string representation for this URI. It's guaranteed that calling + * `URI.parse` with the result of this function creates an URI which is equal + * to this URI. + * + * * The result shall *not* be used for display purposes but for externalization or transport. + * * The result will be encoded using the percentage encoding and encoding happens mostly + * ignore the scheme-specific encoding rules. + * + * @param skipEncoding Do not encode the result, default is `false` + */ + toString(skipEncoding = false) { + return _asFormatted(this, skipEncoding); + } + toJSON() { + return this; + } + static revive(data) { + var _a3, _b; + if (!data) { + return data; + } else if (data instanceof _URI) { + return data; + } else { + const result = new Uri(data); + result._formatted = (_a3 = data.external) !== null && _a3 !== void 0 ? _a3 : null; + result._fsPath = data._sep === _pathSepMarker ? (_b = data.fsPath) !== null && _b !== void 0 ? _b : null : null; + return result; + } + } + }; + var _pathSepMarker = isWindows ? 1 : void 0; + var 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 + /* MarshalledId.Uri */ + }; + 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; + } + }; + var encodeTable = { + [ + 58 + /* CharCode.Colon */ + ]: "%3A", + [ + 47 + /* CharCode.Slash */ + ]: "%2F", + [ + 63 + /* CharCode.QuestionMark */ + ]: "%3F", + [ + 35 + /* CharCode.Hash */ + ]: "%23", + [ + 91 + /* CharCode.OpenSquareBracket */ + ]: "%5B", + [ + 93 + /* CharCode.CloseSquareBracket */ + ]: "%5D", + [ + 64 + /* CharCode.AtSign */ + ]: "%40", + [ + 33 + /* CharCode.ExclamationMark */ + ]: "%21", + [ + 36 + /* CharCode.DollarSign */ + ]: "%24", + [ + 38 + /* CharCode.Ampersand */ + ]: "%26", + [ + 39 + /* CharCode.SingleQuote */ + ]: "%27", + [ + 40 + /* CharCode.OpenParen */ + ]: "%28", + [ + 41 + /* CharCode.CloseParen */ + ]: "%29", + [ + 42 + /* CharCode.Asterisk */ + ]: "%2A", + [ + 43 + /* CharCode.Plus */ + ]: "%2B", + [ + 44 + /* CharCode.Comma */ + ]: "%2C", + [ + 59 + /* CharCode.Semicolon */ + ]: "%3B", + [ + 61 + /* CharCode.Equals */ + ]: "%3D", + [ + 32 + /* CharCode.Space */ + ]: "%20" + }; + function encodeURIComponentFast(uriComponent, isPath, isAuthority) { + let res = void 0; + let nativeEncodePos = -1; + for (let pos = 0; pos < uriComponent.length; pos++) { + const code = uriComponent.charCodeAt(pos); + if (code >= 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; pos < path.length; pos++) { + const code = path.charCodeAt(pos); + if (code === 35 || code === 63) { + if (res === void 0) { + res = path.substr(0, pos); + } + res += encodeTable[code]; + } else { + if (res !== void 0) { + res += path[pos]; + } + } + } + return res !== void 0 ? res : path; + } + function uriToFsPath(uri, keepDriveLetterCasing) { + let value; + if (uri.authority && uri.path.length > 1 && 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, authority, path, query, 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 (_a3) { + if (str.length > 3) { + return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); + } else { + return str; + } + } + } + var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + function percentDecode(str) { + if (!str.match(_rEncodedAsHex)) { + return str; + } + return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/position.js + var Position = class _Position { + constructor(lineNumber, column) { + this.lineNumber = lineNumber; + this.column = column; + } + /** + * Create a new position from this position. + * + * @param newLineNumber new line number + * @param newColumn new column + */ + with(newLineNumber = this.lineNumber, newColumn = this.column) { + if (newLineNumber === this.lineNumber && newColumn === this.column) { + return this; + } else { + return new _Position(newLineNumber, newColumn); + } + } + /** + * Derive a new position from this position. + * + * @param deltaLineNumber line number delta + * @param deltaColumn column delta + */ + delta(deltaLineNumber = 0, deltaColumn = 0) { + return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn); + } + /** + * Test if this position equals other position + */ + equals(other) { + return _Position.equals(this, other); + } + /** + * Test if position `a` equals position `b` + */ + static equals(a, b) { + if (!a && !b) { + return true; + } + return !!a && !!b && a.lineNumber === b.lineNumber && a.column === b.column; + } + /** + * Test if this position is before other position. + * If the two positions are equal, the result will be false. + */ + isBefore(other) { + return _Position.isBefore(this, other); + } + /** + * Test if position `a` is before position `b`. + * If the two positions are equal, the result will be false. + */ + static isBefore(a, b) { + if (a.lineNumber < b.lineNumber) { + return true; + } + if (b.lineNumber < a.lineNumber) { + return false; + } + return a.column < b.column; + } + /** + * Test if this position is before other position. + * If the two positions are equal, the result will be true. + */ + isBeforeOrEqual(other) { + return _Position.isBeforeOrEqual(this, other); + } + /** + * Test if position `a` is before position `b`. + * If the two positions are equal, the result will be true. + */ + static isBeforeOrEqual(a, b) { + if (a.lineNumber < b.lineNumber) { + return true; + } + if (b.lineNumber < a.lineNumber) { + return false; + } + return a.column <= b.column; + } + /** + * A function that compares positions, useful for sorting + */ + static compare(a, b) { + const aLineNumber = a.lineNumber | 0; + const bLineNumber = b.lineNumber | 0; + if (aLineNumber === bLineNumber) { + const aColumn = a.column | 0; + const bColumn = b.column | 0; + return aColumn - bColumn; + } + return aLineNumber - bLineNumber; + } + /** + * Clone this position. + */ + clone() { + return new _Position(this.lineNumber, this.column); + } + /** + * Convert to a human-readable representation. + */ + toString() { + return "(" + this.lineNumber + "," + this.column + ")"; + } + // --- + /** + * Create a `Position` from an `IPosition`. + */ + static lift(pos) { + return new _Position(pos.lineNumber, pos.column); + } + /** + * Test if `obj` is an `IPosition`. + */ + static isIPosition(obj) { + return obj && typeof obj.lineNumber === "number" && typeof obj.column === "number"; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/range.js + var Range = class _Range { + constructor(startLineNumber, startColumn, endLineNumber, endColumn) { + if (startLineNumber > endLineNumber || 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; + } + } + /** + * Test if this range is empty. + */ + isEmpty() { + return _Range.isEmpty(this); + } + /** + * Test if `range` is empty. + */ + static isEmpty(range) { + return range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn; + } + /** + * Test if position is in this range. If the position is at the edges, will return true. + */ + containsPosition(position) { + return _Range.containsPosition(this, position); + } + /** + * Test if `position` is in `range`. If the position is at the edges, will return true. + */ + static containsPosition(range, position) { + if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { + return false; + } + if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) { + return false; + } + if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) { + return false; + } + return true; + } + /** + * Test if `position` is in `range`. If the position is at the edges, will return false. + * @internal + */ + static strictContainsPosition(range, position) { + if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { + return false; + } + if (position.lineNumber === range.startLineNumber && position.column <= range.startColumn) { + return false; + } + if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) { + return false; + } + return true; + } + /** + * Test if range is in this range. If the range is equal to this range, will return true. + */ + containsRange(range) { + return _Range.containsRange(this, range); + } + /** + * Test if `otherRange` is in `range`. If the ranges are equal, will return true. + */ + static containsRange(range, otherRange) { + if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { + return false; + } + if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { + return false; + } + if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) { + return false; + } + if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) { + return false; + } + return true; + } + /** + * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. + */ + strictContainsRange(range) { + return _Range.strictContainsRange(this, range); + } + /** + * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false. + */ + static strictContainsRange(range, otherRange) { + if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { + return false; + } + if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { + return false; + } + if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { + return false; + } + if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { + return false; + } + return true; + } + /** + * A reunion of the two ranges. + * The smallest position will be used as the start point, and the largest one as the end point. + */ + plusRange(range) { + return _Range.plusRange(this, range); + } + /** + * A reunion of the two ranges. + * The smallest position will be used as the start point, and the largest one as the end point. + */ + static plusRange(a, b) { + let startLineNumber; + let startColumn; + let endLineNumber; + let endColumn; + if (b.startLineNumber < a.startLineNumber) { + startLineNumber = b.startLineNumber; + startColumn = b.startColumn; + } else if (b.startLineNumber === a.startLineNumber) { + startLineNumber = b.startLineNumber; + startColumn = Math.min(b.startColumn, a.startColumn); + } else { + startLineNumber = a.startLineNumber; + startColumn = a.startColumn; + } + if (b.endLineNumber > a.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); + } + /** + * A intersection of the two ranges. + */ + intersectRanges(range) { + return _Range.intersectRanges(this, range); + } + /** + * A intersection of the two ranges. + */ + 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 (resultStartLineNumber < otherStartLineNumber) { + resultStartLineNumber = otherStartLineNumber; + resultStartColumn = otherStartColumn; + } else if (resultStartLineNumber === otherStartLineNumber) { + resultStartColumn = Math.max(resultStartColumn, otherStartColumn); + } + if (resultEndLineNumber > otherEndLineNumber) { + 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); + } + /** + * Test if this range equals other. + */ + equalsRange(other) { + return _Range.equalsRange(this, other); + } + /** + * Test if range `a` equals `b`. + */ + 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; + } + /** + * Return the end position (which will be after or equal to the start position) + */ + getEndPosition() { + return _Range.getEndPosition(this); + } + /** + * Return the end position (which will be after or equal to the start position) + */ + static getEndPosition(range) { + return new Position(range.endLineNumber, range.endColumn); + } + /** + * Return the start position (which will be before or equal to the end position) + */ + getStartPosition() { + return _Range.getStartPosition(this); + } + /** + * Return the start position (which will be before or equal to the end position) + */ + static getStartPosition(range) { + return new Position(range.startLineNumber, range.startColumn); + } + /** + * Transform to a user presentable string representation. + */ + toString() { + return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"; + } + /** + * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position. + */ + setEndPosition(endLineNumber, endColumn) { + return new _Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn); + } + /** + * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. + */ + setStartPosition(startLineNumber, startColumn) { + return new _Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn); + } + /** + * Create a new empty range using this range's start position. + */ + collapseToStart() { + return _Range.collapseToStart(this); + } + /** + * Create a new empty range using this range's start position. + */ + static collapseToStart(range) { + return new _Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); + } + /** + * Create a new empty range using this range's end position. + */ + collapseToEnd() { + return _Range.collapseToEnd(this); + } + /** + * Create a new empty range using this range's end position. + */ + static collapseToEnd(range) { + return new _Range(range.endLineNumber, range.endColumn, range.endLineNumber, range.endColumn); + } + /** + * Moves the range by the given amount of lines. + */ + 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(range) { + if (!range) { + return null; + } + return new _Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); + } + /** + * Test if `obj` is an `IRange`. + */ + static isIRange(obj) { + return obj && typeof obj.startLineNumber === "number" && typeof obj.startColumn === "number" && typeof obj.endLineNumber === "number" && typeof obj.endColumn === "number"; + } + /** + * Test if the two ranges are touching in any way. + */ + static areIntersectingOrTouching(a, b) { + if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn) { + return false; + } + if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn) { + return false; + } + return true; + } + /** + * Test if the two ranges are intersecting. If the ranges are touching it returns true. + */ + static areIntersecting(a, b) { + if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn) { + return false; + } + if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn) { + return false; + } + return true; + } + /** + * A function that compares ranges, useful for sorting ranges + * It will first compare ranges on the startPosition and then on the endPosition + */ + static compareRangesUsingStarts(a, b) { + if (a && b) { + const aStartLineNumber = a.startLineNumber | 0; + const bStartLineNumber = b.startLineNumber | 0; + if (aStartLineNumber === bStartLineNumber) { + const aStartColumn = a.startColumn | 0; + const bStartColumn = b.startColumn | 0; + if (aStartColumn === bStartColumn) { + const aEndLineNumber = a.endLineNumber | 0; + const bEndLineNumber = b.endLineNumber | 0; + if (aEndLineNumber === bEndLineNumber) { + const aEndColumn = a.endColumn | 0; + const bEndColumn = b.endColumn | 0; + return aEndColumn - bEndColumn; + } + return aEndLineNumber - bEndLineNumber; + } + return aStartColumn - bStartColumn; + } + return aStartLineNumber - bStartLineNumber; + } + const aExists = a ? 1 : 0; + const bExists = b ? 1 : 0; + return aExists - bExists; + } + /** + * A function that compares ranges, useful for sorting ranges + * It will first compare ranges on the endPosition and then on the startPosition + */ + static compareRangesUsingEnds(a, b) { + if (a.endLineNumber === b.endLineNumber) { + if (a.endColumn === b.endColumn) { + if (a.startLineNumber === b.startLineNumber) { + return a.startColumn - b.startColumn; + } + return a.startLineNumber - b.startLineNumber; + } + return a.endColumn - b.endColumn; + } + return a.endLineNumber - b.endLineNumber; + } + /** + * Test if the range spans multiple lines. + */ + static spansMultipleLines(range) { + return range.endLineNumber > range.startLineNumber; + } + toJSON() { + return this; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/arrays.js + 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; i < len; i++) { + if (!itemEquals(one[i], other[i])) { + return false; + } + } + return true; + } + function findLastIndex(array, fn) { + for (let i = array.length - 1; i >= 0; i--) { + const element = array[i]; + if (fn(element)) { + return i; + } + } + return -1; + } + var CompareResult; + (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 = {})); + function compareBy(selector, comparator) { + return (a, b) => comparator(selector(a), selector(b)); + } + var numberComparator = (a, b) => a - b; + function reverseOrder(comparator) { + return (a, b) => -comparator(a, b); + } + var CallbackIterable = class _CallbackIterable { + constructor(iterate) { + this.iterate = iterate; + } + forEach(handler) { + this.iterate((item) => { + handler(item); + return true; + }); + } + 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)))); + } + some(predicate) { + let result = false; + this.iterate((item) => { + result = predicate(item); + return !result; + }); + return result; + } + findFirst(predicate) { + let result; + this.iterate((item) => { + if (predicate(item)) { + result = item; + return false; + } + return true; + }); + return result; + } + findLast(predicate) { + let result; + this.iterate((item) => { + if (predicate(item)) { + result = item; + } + return true; + }); + return result; + } + findLastMaxBy(comparator) { + let result; + let first = true; + this.iterate((item) => { + if (first || CompareResult.isGreaterThan(comparator(item, result))) { + first = false; + result = item; + } + return true; + }); + return result; + } + }; + CallbackIterable.empty = new CallbackIterable((_callback) => { + }); + + // node_modules/monaco-editor/esm/vs/base/common/uint.js + function toUint8(v) { + if (v < 0) { + return 0; + } + if (v > 255) { + return 255; + } + return v | 0; + } + function toUint32(v) { + if (v < 0) { + return 0; + } + if (v > 4294967295) { + return 4294967295; + } + return v | 0; + } + + // node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js + var PrefixSumComputer = class { + constructor(values) { + this.values = values; + this.prefixSum = new Uint32Array(values.length); + this.prefixSumValidIndex = new Int32Array(1); + this.prefixSumValidIndex[0] = -1; + } + getCount() { + return this.values.length; + } + 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = insertIndex - 1; + } + this.prefixSum = new Uint32Array(this.values.length); + if (this.prefixSumValidIndex[0] >= 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = index - 1; + } + return true; + } + removeValues(startIndex, count) { + startIndex = toUint32(startIndex); + count = toUint32(count); + const oldValues = this.values; + const oldPrefixSum = this.prefixSum; + if (startIndex >= 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 < this.prefixSumValidIndex[0]) { + this.prefixSumValidIndex[0] = startIndex - 1; + } + if (this.prefixSumValidIndex[0] >= 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); + } + /** + * Returns the sum of the first `index + 1` many items. + * @returns `SUM(0 <= j <= index, values[j])`. + */ + 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 < midStart) { + high = mid - 1; + } else if (sum >= midStop) { + low = mid + 1; + } else { + break; + } + } + return new PrefixSumIndexOfResult(mid, sum - midStart); + } + }; + var PrefixSumIndexOfResult = class { + constructor(index, remainder) { + this.index = index; + this.remainder = remainder; + this._prefixSumIndexOfResultBrand = void 0; + this.index = index; + this.remainder = remainder; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js + var MirrorTextModel = class { + constructor(uri, lines, eol, versionId) { + this._uri = uri; + this._lines = lines; + this._eol = eol; + this._versionId = versionId; + this._lineStarts = null; + this._cachedTextValue = null; + } + dispose() { + this._lines.length = 0; + } + get version() { + return this._versionId; + } + getText() { + if (this._cachedTextValue === null) { + this._cachedTextValue = this._lines.join(this._eol); + } + return this._cachedTextValue; + } + onEvents(e) { + if (e.eol && e.eol !== this._eol) { + this._eol = e.eol; + this._lineStarts = null; + } + const changes = e.changes; + for (const change of changes) { + this._acceptDeleteRange(change.range); + this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text); + } + this._versionId = e.versionId; + this._cachedTextValue = null; + } + _ensureLineStarts() { + if (!this._lineStarts) { + const eolLength = this._eol.length; + const linesLength = this._lines.length; + const lineStartValues = new Uint32Array(linesLength); + for (let i = 0; i < linesLength; i++) { + lineStartValues[i] = this._lines[i].length + eolLength; + } + this._lineStarts = new PrefixSumComputer(lineStartValues); + } + } + /** + * All changes to a line's text go through this method + */ + _setLineText(lineIndex, newValue) { + this._lines[lineIndex] = newValue; + if (this._lineStarts) { + this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length); + } + } + _acceptDeleteRange(range) { + if (range.startLineNumber === range.endLineNumber) { + if (range.startColumn === range.endColumn) { + return; + } + this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1)); + return; + } + this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1)); + this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); + if (this._lineStarts) { + this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber); + } + } + _acceptInsertText(position, insertText) { + if (insertText.length === 0) { + return; + } + const insertLines = splitLines(insertText); + if (insertLines.length === 1) { + this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0] + this._lines[position.lineNumber - 1].substring(position.column - 1)); + return; + } + insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1); + this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0]); + const newLengths = new Uint32Array(insertLines.length - 1); + for (let i = 1; i < insertLines.length; i++) { + this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]); + newLengths[i - 1] = insertLines[i].length + this._eol.length; + } + if (this._lineStarts) { + this._lineStarts.insertValues(position.lineNumber, newLengths); + } + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js + var USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; + 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"); + } + var DEFAULT_WORD_REGEXP = createWordRegExp(); + 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; + } + var _defaultConfig = new LinkedList(); + _defaultConfig.unshift({ + maxLen: 1e3, + windowSize: 15, + timeBudget: 150 + }); + function getWordAtText(column, wordDefinition, text3, textOffset, config) { + if (!config) { + config = Iterable.first(_defaultConfig); + } + if (text3.length > config.maxLen) { + let start = column - config.maxLen / 2; + if (start < 0) { + start = 0; + } else { + textOffset += start; + } + text3 = text3.substring(start, column + config.maxLen / 2); + return getWordAtText(column, wordDefinition, text3, textOffset, config); + } + const t1 = Date.now(); + const pos = column - 1 - textOffset; + let prevRegexIndex = -1; + let match = 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, text3, pos, prevRegexIndex); + if (!thisMatch && match) { + break; + } + match = thisMatch; + if (regexIndex <= 0) { + break; + } + prevRegexIndex = regexIndex; + } + if (match) { + const result = { + word: match[0], + startColumn: textOffset + 1 + match.index, + endColumn: textOffset + 1 + match.index + match[0].length + }; + wordDefinition.lastIndex = 0; + return result; + } + return null; + } + function _findRegexMatchEnclosingPosition(wordDefinition, text3, pos, stopPos) { + let match; + while (match = wordDefinition.exec(text3)) { + const matchIndex = match.index || 0; + if (matchIndex <= pos && wordDefinition.lastIndex >= pos) { + return match; + } else if (stopPos > 0 && matchIndex > stopPos) { + return null; + } + } + return null; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js + var CharacterClassifier = class _CharacterClassifier { + constructor(_defaultValue) { + const defaultValue = toUint8(_defaultValue); + this._defaultValue = defaultValue; + this._asciiMap = _CharacterClassifier._createAsciiMap(defaultValue); + this._map = /* @__PURE__ */ new Map(); + } + static _createAsciiMap(defaultValue) { + const asciiMap = new Uint8Array(256); + asciiMap.fill(defaultValue); + return asciiMap; + } + set(charCode, _value) { + const value = toUint8(_value); + if (charCode >= 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(); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/languages/linkComputer.js + var Uint8Matrix = class { + constructor(rows, cols, defaultValue) { + const data = new Uint8Array(rows * cols); + for (let i = 0, len = rows * cols; i < len; i++) { + data[i] = defaultValue; + } + this._data = data; + this.rows = rows; + this.cols = cols; + } + get(row, col) { + return this._data[row * this.cols + col]; + } + set(row, col, value) { + this._data[row * this.cols + col] = value; + } + }; + var StateMachine = class { + constructor(edges) { + let maxCharCode = 0; + let maxState = 0; + for (let i = 0, len = edges.length; i < len; i++) { + const [from, chCode, to] = edges[i]; + if (chCode > maxCharCode) { + maxCharCode = chCode; + } + if (from > maxState) { + maxState = from; + } + if (to > maxState) { + maxState = to; + } + } + maxCharCode++; + maxState++; + const states = new Uint8Matrix( + maxState, + maxCharCode, + 0 + /* State.Invalid */ + ); + for (let i = 0, len = edges.length; i < len; i++) { + const [from, chCode, to] = edges[i]; + states.set(from, chCode, to); + } + this._states = states; + this._maxCharCode = maxCharCode; + } + nextState(currentState, chCode) { + if (chCode < 0 || chCode >= this._maxCharCode) { + return 0; + } + return this._states.get(currentState, chCode); + } + }; + var _stateMachine = null; + function getStateMachine() { + if (_stateMachine === null) { + _stateMachine = new StateMachine([ + [ + 1, + 104, + 2 + /* State.H */ + ], + [ + 1, + 72, + 2 + /* State.H */ + ], + [ + 1, + 102, + 6 + /* State.F */ + ], + [ + 1, + 70, + 6 + /* State.F */ + ], + [ + 2, + 116, + 3 + /* State.HT */ + ], + [ + 2, + 84, + 3 + /* State.HT */ + ], + [ + 3, + 116, + 4 + /* State.HTT */ + ], + [ + 3, + 84, + 4 + /* State.HTT */ + ], + [ + 4, + 112, + 5 + /* State.HTTP */ + ], + [ + 4, + 80, + 5 + /* State.HTTP */ + ], + [ + 5, + 115, + 9 + /* State.BeforeColon */ + ], + [ + 5, + 83, + 9 + /* State.BeforeColon */ + ], + [ + 5, + 58, + 10 + /* State.AfterColon */ + ], + [ + 6, + 105, + 7 + /* State.FI */ + ], + [ + 6, + 73, + 7 + /* State.FI */ + ], + [ + 7, + 108, + 8 + /* State.FIL */ + ], + [ + 7, + 76, + 8 + /* State.FIL */ + ], + [ + 8, + 101, + 9 + /* State.BeforeColon */ + ], + [ + 8, + 69, + 9 + /* State.BeforeColon */ + ], + [ + 9, + 58, + 10 + /* State.AfterColon */ + ], + [ + 10, + 47, + 11 + /* State.AlmostThere */ + ], + [ + 11, + 47, + 12 + /* State.End */ + ] + ]); + } + return _stateMachine; + } + var _classifier = null; + function getClassifier() { + if (_classifier === null) { + _classifier = new CharacterClassifier( + 0 + /* CharacterClass.None */ + ); + const FORCE_TERMINATION_CHARACTERS = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`; + for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) { + _classifier.set( + FORCE_TERMINATION_CHARACTERS.charCodeAt(i), + 1 + /* CharacterClass.ForceTermination */ + ); + } + const CANNOT_END_WITH_CHARACTERS = ".,;:"; + for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) { + _classifier.set( + CANNOT_END_WITH_CHARACTERS.charCodeAt(i), + 2 + /* CharacterClass.CannotEndIn */ + ); + } + } + return _classifier; + } + var LinkComputer = class _LinkComputer { + 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 < len) { + let resetStateMachine = false; + const chCode = line.charCodeAt(j); + if (state === 13) { + let chClass; + switch (chCode) { + case 40: + hasOpenParens = true; + chClass = 0; + break; + case 41: + chClass = hasOpenParens ? 0 : 1; + break; + case 91: + inSquareBrackets = true; + hasOpenSquareBracket = true; + chClass = 0; + break; + case 93: + inSquareBrackets = false; + chClass = hasOpenSquareBracket ? 0 : 1; + break; + case 123: + hasOpenCurlyBracket = true; + chClass = 0; + break; + case 125: + chClass = hasOpenCurlyBracket ? 0 : 1; + break; + case 39: + case 34: + case 96: + if (linkBeginChCode === chCode) { + chClass = 1; + } else if (linkBeginChCode === 39 || linkBeginChCode === 34 || linkBeginChCode === 96) { + chClass = 0; + } else { + chClass = 1; + } + break; + case 42: + chClass = linkBeginChCode === 42 ? 1 : 0; + break; + case 124: + chClass = linkBeginChCode === 124 ? 1 : 0; + break; + case 32: + chClass = inSquareBrackets ? 0 : 1; + break; + default: + chClass = classifier.get(chCode); + } + if (chClass === 1) { + result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, j)); + resetStateMachine = true; + } + } else if (state === 12) { + let chClass; + if (chCode === 91) { + hasOpenSquareBracket = true; + chClass = 0; + } else { + chClass = classifier.get(chCode); + } + if (chClass === 1) { + resetStateMachine = true; + } else { + state = 13; + } + } else { + state = stateMachine.nextState(state, chCode); + if (state === 0) { + resetStateMachine = true; + } + } + if (resetStateMachine) { + state = 1; + hasOpenParens = false; + hasOpenSquareBracket = false; + hasOpenCurlyBracket = false; + linkBeginIndex = j + 1; + linkBeginChCode = chCode; + } + j++; + } + if (state === 13) { + result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, len)); + } + } + return result; + } + }; + function computeLinks(model) { + if (!model || typeof model.getLineCount !== "function" || typeof model.getLineContent !== "function") { + return []; + } + return LinkComputer.computeLinks(model); + } + + // node_modules/monaco-editor/esm/vs/editor/common/languages/supports/inplaceReplaceSupport.js + var BasicInplaceReplace = class { + constructor() { + this._defaultValueSet = [ + ["true", "false"], + ["True", "False"], + ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], + ["public", "protected", "private"] + ]; + } + navigateValueSet(range1, text1, range2, text22, up) { + if (range1 && text1) { + const result = this.doNavigateValueSet(text1, up); + if (result) { + return { + range: range1, + value: result + }; + } + } + if (range2 && text22) { + const result = this.doNavigateValueSet(text22, up); + if (result) { + return { + range: range2, + value: result + }; + } + } + return null; + } + doNavigateValueSet(text3, up) { + const numberResult = this.numberReplace(text3, up); + if (numberResult !== null) { + return numberResult; + } + return this.textReplace(text3, up); + } + numberReplace(value, up) { + const precision = Math.pow(10, value.length - (value.lastIndexOf(".") + 1)); + let n1 = Number(value); + const n2 = parseFloat(value); + if (!isNaN(n1) && !isNaN(n2) && n1 === n2) { + if (n1 === 0 && !up) { + return null; + } else { + n1 = Math.floor(n1 * precision); + n1 += up ? precision : -precision; + return String(n1 / precision); + } + } + return null; + } + textReplace(value, up) { + return this.valueSetsReplace(this._defaultValueSet, value, up); + } + valueSetsReplace(valueSets, value, up) { + let result = null; + for (let i = 0, len = valueSets.length; result === null && i < len; i++) { + result = this.valueSetReplace(valueSets[i], value, up); + } + return result; + } + valueSetReplace(valueSet, value, up) { + let idx = valueSet.indexOf(value); + if (idx >= 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(); + + // node_modules/monaco-editor/esm/vs/base/common/keyCodes.js + var KeyCodeStrMap = class { + constructor() { + this._keyCodeToStr = []; + this._strToKeyCode = /* @__PURE__ */ 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; + } + }; + var uiMap = new KeyCodeStrMap(); + var userSettingsUSMap = new KeyCodeStrMap(); + var userSettingsGeneralMap = new KeyCodeStrMap(); + var EVENT_KEY_CODE_MAP = new Array(230); + var NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {}; + var scanCodeIntToStr = []; + var scanCodeStrToInt = /* @__PURE__ */ Object.create(null); + var scanCodeLowerCaseStrToInt = /* @__PURE__ */ Object.create(null); + var IMMUTABLE_CODE_TO_KEY_CODE = []; + var 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 empty = ""; + const mappings = [ + // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel + [1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", empty, empty], + [1, 1, "Hyper", 0, empty, 0, empty, empty, empty], + [1, 2, "Super", 0, empty, 0, empty, empty, empty], + [1, 3, "Fn", 0, empty, 0, empty, empty, empty], + [1, 4, "FnLock", 0, empty, 0, empty, empty, empty], + [1, 5, "Suspend", 0, empty, 0, empty, empty, empty], + [1, 6, "Resume", 0, empty, 0, empty, empty, empty], + [1, 7, "Turbo", 0, empty, 0, empty, empty, empty], + [1, 8, "Sleep", 0, empty, 0, "VK_SLEEP", empty, empty], + [1, 9, "WakeUp", 0, empty, 0, empty, empty, empty], + [0, 10, "KeyA", 31, "A", 65, "VK_A", empty, empty], + [0, 11, "KeyB", 32, "B", 66, "VK_B", empty, empty], + [0, 12, "KeyC", 33, "C", 67, "VK_C", empty, empty], + [0, 13, "KeyD", 34, "D", 68, "VK_D", empty, empty], + [0, 14, "KeyE", 35, "E", 69, "VK_E", empty, empty], + [0, 15, "KeyF", 36, "F", 70, "VK_F", empty, empty], + [0, 16, "KeyG", 37, "G", 71, "VK_G", empty, empty], + [0, 17, "KeyH", 38, "H", 72, "VK_H", empty, empty], + [0, 18, "KeyI", 39, "I", 73, "VK_I", empty, empty], + [0, 19, "KeyJ", 40, "J", 74, "VK_J", empty, empty], + [0, 20, "KeyK", 41, "K", 75, "VK_K", empty, empty], + [0, 21, "KeyL", 42, "L", 76, "VK_L", empty, empty], + [0, 22, "KeyM", 43, "M", 77, "VK_M", empty, empty], + [0, 23, "KeyN", 44, "N", 78, "VK_N", empty, empty], + [0, 24, "KeyO", 45, "O", 79, "VK_O", empty, empty], + [0, 25, "KeyP", 46, "P", 80, "VK_P", empty, empty], + [0, 26, "KeyQ", 47, "Q", 81, "VK_Q", empty, empty], + [0, 27, "KeyR", 48, "R", 82, "VK_R", empty, empty], + [0, 28, "KeyS", 49, "S", 83, "VK_S", empty, empty], + [0, 29, "KeyT", 50, "T", 84, "VK_T", empty, empty], + [0, 30, "KeyU", 51, "U", 85, "VK_U", empty, empty], + [0, 31, "KeyV", 52, "V", 86, "VK_V", empty, empty], + [0, 32, "KeyW", 53, "W", 87, "VK_W", empty, empty], + [0, 33, "KeyX", 54, "X", 88, "VK_X", empty, empty], + [0, 34, "KeyY", 55, "Y", 89, "VK_Y", empty, empty], + [0, 35, "KeyZ", 56, "Z", 90, "VK_Z", empty, empty], + [0, 36, "Digit1", 22, "1", 49, "VK_1", empty, empty], + [0, 37, "Digit2", 23, "2", 50, "VK_2", empty, empty], + [0, 38, "Digit3", 24, "3", 51, "VK_3", empty, empty], + [0, 39, "Digit4", 25, "4", 52, "VK_4", empty, empty], + [0, 40, "Digit5", 26, "5", 53, "VK_5", empty, empty], + [0, 41, "Digit6", 27, "6", 54, "VK_6", empty, empty], + [0, 42, "Digit7", 28, "7", 55, "VK_7", empty, empty], + [0, 43, "Digit8", 29, "8", 56, "VK_8", empty, empty], + [0, 44, "Digit9", 30, "9", 57, "VK_9", empty, empty], + [0, 45, "Digit0", 21, "0", 48, "VK_0", empty, empty], + [1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", empty, empty], + [1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", empty, empty], + [1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", empty, empty], + [1, 49, "Tab", 2, "Tab", 9, "VK_TAB", empty, empty], + [1, 50, "Space", 10, "Space", 32, "VK_SPACE", empty, empty], + [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, empty, 0, empty, empty, empty], + [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", empty, empty], + [1, 64, "F1", 59, "F1", 112, "VK_F1", empty, empty], + [1, 65, "F2", 60, "F2", 113, "VK_F2", empty, empty], + [1, 66, "F3", 61, "F3", 114, "VK_F3", empty, empty], + [1, 67, "F4", 62, "F4", 115, "VK_F4", empty, empty], + [1, 68, "F5", 63, "F5", 116, "VK_F5", empty, empty], + [1, 69, "F6", 64, "F6", 117, "VK_F6", empty, empty], + [1, 70, "F7", 65, "F7", 118, "VK_F7", empty, empty], + [1, 71, "F8", 66, "F8", 119, "VK_F8", empty, empty], + [1, 72, "F9", 67, "F9", 120, "VK_F9", empty, empty], + [1, 73, "F10", 68, "F10", 121, "VK_F10", empty, empty], + [1, 74, "F11", 69, "F11", 122, "VK_F11", empty, empty], + [1, 75, "F12", 70, "F12", 123, "VK_F12", empty, empty], + [1, 76, "PrintScreen", 0, empty, 0, empty, empty, empty], + [1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", empty, empty], + [1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", empty, empty], + [1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", empty, empty], + [1, 80, "Home", 14, "Home", 36, "VK_HOME", empty, empty], + [1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", empty, empty], + [1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", empty, empty], + [1, 83, "End", 13, "End", 35, "VK_END", empty, empty], + [1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", empty, empty], + [1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", empty], + [1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", empty], + [1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", empty], + [1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", empty], + [1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", empty, empty], + [1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", empty, empty], + [1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", empty, empty], + [1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", empty, empty], + [1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", empty, empty], + [1, 94, "NumpadEnter", 3, empty, 0, empty, empty, empty], + [1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", empty, empty], + [1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", empty, empty], + [1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", empty, empty], + [1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", empty, empty], + [1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", empty, empty], + [1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", empty, empty], + [1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", empty, empty], + [1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", empty, empty], + [1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", empty, empty], + [1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", empty, empty], + [1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", empty, empty], + [0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", empty, empty], + [1, 107, "ContextMenu", 58, "ContextMenu", 93, empty, empty, empty], + [1, 108, "Power", 0, empty, 0, empty, empty, empty], + [1, 109, "NumpadEqual", 0, empty, 0, empty, empty, empty], + [1, 110, "F13", 71, "F13", 124, "VK_F13", empty, empty], + [1, 111, "F14", 72, "F14", 125, "VK_F14", empty, empty], + [1, 112, "F15", 73, "F15", 126, "VK_F15", empty, empty], + [1, 113, "F16", 74, "F16", 127, "VK_F16", empty, empty], + [1, 114, "F17", 75, "F17", 128, "VK_F17", empty, empty], + [1, 115, "F18", 76, "F18", 129, "VK_F18", empty, empty], + [1, 116, "F19", 77, "F19", 130, "VK_F19", empty, empty], + [1, 117, "F20", 78, "F20", 131, "VK_F20", empty, empty], + [1, 118, "F21", 79, "F21", 132, "VK_F21", empty, empty], + [1, 119, "F22", 80, "F22", 133, "VK_F22", empty, empty], + [1, 120, "F23", 81, "F23", 134, "VK_F23", empty, empty], + [1, 121, "F24", 82, "F24", 135, "VK_F24", empty, empty], + [1, 122, "Open", 0, empty, 0, empty, empty, empty], + [1, 123, "Help", 0, empty, 0, empty, empty, empty], + [1, 124, "Select", 0, empty, 0, empty, empty, empty], + [1, 125, "Again", 0, empty, 0, empty, empty, empty], + [1, 126, "Undo", 0, empty, 0, empty, empty, empty], + [1, 127, "Cut", 0, empty, 0, empty, empty, empty], + [1, 128, "Copy", 0, empty, 0, empty, empty, empty], + [1, 129, "Paste", 0, empty, 0, empty, empty, empty], + [1, 130, "Find", 0, empty, 0, empty, empty, empty], + [1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", empty, empty], + [1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", empty, empty], + [1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", empty, empty], + [1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", empty, empty], + [0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", empty, empty], + [1, 136, "KanaMode", 0, empty, 0, empty, empty, empty], + [0, 137, "IntlYen", 0, empty, 0, empty, empty, empty], + [1, 138, "Convert", 0, empty, 0, empty, empty, empty], + [1, 139, "NonConvert", 0, empty, 0, empty, empty, empty], + [1, 140, "Lang1", 0, empty, 0, empty, empty, empty], + [1, 141, "Lang2", 0, empty, 0, empty, empty, empty], + [1, 142, "Lang3", 0, empty, 0, empty, empty, empty], + [1, 143, "Lang4", 0, empty, 0, empty, empty, empty], + [1, 144, "Lang5", 0, empty, 0, empty, empty, empty], + [1, 145, "Abort", 0, empty, 0, empty, empty, empty], + [1, 146, "Props", 0, empty, 0, empty, empty, empty], + [1, 147, "NumpadParenLeft", 0, empty, 0, empty, empty, empty], + [1, 148, "NumpadParenRight", 0, empty, 0, empty, empty, empty], + [1, 149, "NumpadBackspace", 0, empty, 0, empty, empty, empty], + [1, 150, "NumpadMemoryStore", 0, empty, 0, empty, empty, empty], + [1, 151, "NumpadMemoryRecall", 0, empty, 0, empty, empty, empty], + [1, 152, "NumpadMemoryClear", 0, empty, 0, empty, empty, empty], + [1, 153, "NumpadMemoryAdd", 0, empty, 0, empty, empty, empty], + [1, 154, "NumpadMemorySubtract", 0, empty, 0, empty, empty, empty], + [1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", empty, empty], + [1, 156, "NumpadClearEntry", 0, empty, 0, empty, empty, empty], + [1, 0, empty, 5, "Ctrl", 17, "VK_CONTROL", empty, empty], + [1, 0, empty, 4, "Shift", 16, "VK_SHIFT", empty, empty], + [1, 0, empty, 6, "Alt", 18, "VK_MENU", empty, empty], + [1, 0, empty, 57, "Meta", 91, "VK_COMMAND", empty, empty], + [1, 157, "ControlLeft", 5, empty, 0, "VK_LCONTROL", empty, empty], + [1, 158, "ShiftLeft", 4, empty, 0, "VK_LSHIFT", empty, empty], + [1, 159, "AltLeft", 6, empty, 0, "VK_LMENU", empty, empty], + [1, 160, "MetaLeft", 57, empty, 0, "VK_LWIN", empty, empty], + [1, 161, "ControlRight", 5, empty, 0, "VK_RCONTROL", empty, empty], + [1, 162, "ShiftRight", 4, empty, 0, "VK_RSHIFT", empty, empty], + [1, 163, "AltRight", 6, empty, 0, "VK_RMENU", empty, empty], + [1, 164, "MetaRight", 57, empty, 0, "VK_RWIN", empty, empty], + [1, 165, "BrightnessUp", 0, empty, 0, empty, empty, empty], + [1, 166, "BrightnessDown", 0, empty, 0, empty, empty, empty], + [1, 167, "MediaPlay", 0, empty, 0, empty, empty, empty], + [1, 168, "MediaRecord", 0, empty, 0, empty, empty, empty], + [1, 169, "MediaFastForward", 0, empty, 0, empty, empty, empty], + [1, 170, "MediaRewind", 0, empty, 0, empty, empty, empty], + [1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", empty, empty], + [1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", empty, empty], + [1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", empty, empty], + [1, 174, "Eject", 0, empty, 0, empty, empty, empty], + [1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", empty, empty], + [1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", empty, empty], + [1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", empty, empty], + [1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", empty, empty], + [1, 179, "LaunchApp1", 0, empty, 0, "VK_MEDIA_LAUNCH_APP1", empty, empty], + [1, 180, "SelectTask", 0, empty, 0, empty, empty, empty], + [1, 181, "LaunchScreenSaver", 0, empty, 0, empty, empty, empty], + [1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", empty, empty], + [1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", empty, empty], + [1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", empty, empty], + [1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", empty, empty], + [1, 186, "BrowserStop", 0, empty, 0, "VK_BROWSER_STOP", empty, empty], + [1, 187, "BrowserRefresh", 0, empty, 0, "VK_BROWSER_REFRESH", empty, empty], + [1, 188, "BrowserFavorites", 0, empty, 0, "VK_BROWSER_FAVORITES", empty, empty], + [1, 189, "ZoomToggle", 0, empty, 0, empty, empty, empty], + [1, 190, "MailReply", 0, empty, 0, empty, empty, empty], + [1, 191, "MailForward", 0, empty, 0, empty, empty, empty], + [1, 192, "MailSend", 0, empty, 0, empty, empty, empty], + // See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html + // If an Input Method Editor is processing key input and the event is keydown, return 229. + [1, 0, empty, 114, "KeyInComposition", 229, empty, empty, empty], + [1, 0, empty, 116, "ABNT_C2", 194, "VK_ABNT_C2", empty, empty], + [1, 0, empty, 96, "OEM_8", 223, "VK_OEM_8", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_KANA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HANGUL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_JUNJA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_FINAL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HANJA", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_KANJI", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_CONVERT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_NONCONVERT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ACCEPT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_MODECHANGE", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_SELECT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PRINT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EXECUTE", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_SNAPSHOT", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_HELP", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_APPS", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PROCESSKEY", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PACKET", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_DBE_SBCSCHAR", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_DBE_DBCSCHAR", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ATTN", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_CRSEL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EXSEL", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_EREOF", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PLAY", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_ZOOM", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_NONAME", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_PA1", empty, empty], + [1, 0, empty, 0, empty, 0, "VK_OEM_CLEAR", empty, empty] + ]; + 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 + /* KeyCode.Enter */ + ] = 46; + })(); + var KeyCodeUtils; + (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 = {})); + function KeyChord(firstPart, secondPart) { + const chordPart = (secondPart & 65535) << 16 >>> 0; + return (firstPart | chordPart) >>> 0; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/selection.js + var Selection = class _Selection extends Range { + constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { + super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn); + this.selectionStartLineNumber = selectionStartLineNumber; + this.selectionStartColumn = selectionStartColumn; + this.positionLineNumber = positionLineNumber; + this.positionColumn = positionColumn; + } + /** + * Transform to a human-readable representation. + */ + toString() { + return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; + } + /** + * Test if equals other selection. + */ + equalsSelection(other) { + return _Selection.selectionsEqual(this, other); + } + /** + * Test if the two selections are equal. + */ + static selectionsEqual(a, b) { + return a.selectionStartLineNumber === b.selectionStartLineNumber && a.selectionStartColumn === b.selectionStartColumn && a.positionLineNumber === b.positionLineNumber && a.positionColumn === b.positionColumn; + } + /** + * Get directions (LTR or RTL). + */ + getDirection() { + if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { + return 0; + } + return 1; + } + /** + * Create a new selection with a different `positionLineNumber` and `positionColumn`. + */ + 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); + } + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + getPosition() { + return new Position(this.positionLineNumber, this.positionColumn); + } + /** + * Get the position at the start of the selection. + */ + getSelectionStart() { + return new Position(this.selectionStartLineNumber, this.selectionStartColumn); + } + /** + * Create a new selection with a different `selectionStartLineNumber` and `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); + } + // ---- + /** + * Create a `Selection` from one or two positions + */ + static fromPositions(start, end = start) { + return new _Selection(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** + * Creates a `Selection` from a range, given a direction. + */ + static fromRange(range, direction) { + if (direction === 0) { + return new _Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); + } else { + return new _Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); + } + } + /** + * Create a `Selection` from an `ISelection`. + */ + static liftSelection(sel) { + return new _Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); + } + /** + * `a` equals `b`. + */ + 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 < len; i++) { + if (!this.selectionsEqual(a[i], b[i])) { + return false; + } + } + return true; + } + /** + * Test if `obj` is an `ISelection`. + */ + static isISelection(obj) { + return obj && typeof obj.selectionStartLineNumber === "number" && typeof obj.selectionStartColumn === "number" && typeof obj.positionLineNumber === "number" && typeof obj.positionColumn === "number"; + } + /** + * Create with a direction. + */ + static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) { + if (direction === 0) { + return new _Selection(startLineNumber, startColumn, endLineNumber, endColumn); + } + return new _Selection(endLineNumber, endColumn, startLineNumber, startColumn); + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/codicons.js + var _codiconFontCharacters = /* @__PURE__ */ Object.create(null); + function register(id2, fontCharacter) { + if (isString(fontCharacter)) { + const val = _codiconFontCharacters[fontCharacter]; + if (val === void 0) { + throw new Error(`${id2} references an unknown codicon: ${fontCharacter}`); + } + fontCharacter = val; + } + _codiconFontCharacters[id2] = fontCharacter; + return { id: id2 }; + } + var Codicon = { + // built-in icons, with image name + add: register("add", 6e4), + plus: register("plus", 6e4), + gistNew: register("gist-new", 6e4), + repoCreate: register("repo-create", 6e4), + lightbulb: register("lightbulb", 60001), + lightBulb: register("light-bulb", 60001), + repo: register("repo", 60002), + repoDelete: register("repo-delete", 60002), + gistFork: register("gist-fork", 60003), + repoForked: register("repo-forked", 60003), + gitPullRequest: register("git-pull-request", 60004), + gitPullRequestAbandoned: register("git-pull-request-abandoned", 60004), + recordKeys: register("record-keys", 60005), + keyboard: register("keyboard", 60005), + tag: register("tag", 60006), + tagAdd: register("tag-add", 60006), + tagRemove: register("tag-remove", 60006), + gitPullRequestLabel: register("git-pull-request-label", 60006), + person: register("person", 60007), + personFollow: register("person-follow", 60007), + personOutline: register("person-outline", 60007), + personFilled: register("person-filled", 60007), + gitBranch: register("git-branch", 60008), + gitBranchCreate: register("git-branch-create", 60008), + gitBranchDelete: register("git-branch-delete", 60008), + sourceControl: register("source-control", 60008), + mirror: register("mirror", 60009), + mirrorPublic: register("mirror-public", 60009), + star: register("star", 60010), + starAdd: register("star-add", 60010), + starDelete: register("star-delete", 60010), + starEmpty: register("star-empty", 60010), + comment: register("comment", 60011), + commentAdd: register("comment-add", 60011), + alert: register("alert", 60012), + warning: register("warning", 60012), + search: register("search", 60013), + searchSave: register("search-save", 60013), + logOut: register("log-out", 60014), + signOut: register("sign-out", 60014), + logIn: register("log-in", 60015), + signIn: register("sign-in", 60015), + eye: register("eye", 60016), + eyeUnwatch: register("eye-unwatch", 60016), + eyeWatch: register("eye-watch", 60016), + circleFilled: register("circle-filled", 60017), + primitiveDot: register("primitive-dot", 60017), + closeDirty: register("close-dirty", 60017), + debugBreakpoint: register("debug-breakpoint", 60017), + debugBreakpointDisabled: register("debug-breakpoint-disabled", 60017), + debugHint: register("debug-hint", 60017), + primitiveSquare: register("primitive-square", 60018), + edit: register("edit", 60019), + pencil: register("pencil", 60019), + info: register("info", 60020), + issueOpened: register("issue-opened", 60020), + gistPrivate: register("gist-private", 60021), + gitForkPrivate: register("git-fork-private", 60021), + lock: register("lock", 60021), + mirrorPrivate: register("mirror-private", 60021), + close: register("close", 60022), + removeClose: register("remove-close", 60022), + x: register("x", 60022), + repoSync: register("repo-sync", 60023), + sync: register("sync", 60023), + clone: register("clone", 60024), + desktopDownload: register("desktop-download", 60024), + beaker: register("beaker", 60025), + microscope: register("microscope", 60025), + vm: register("vm", 60026), + deviceDesktop: register("device-desktop", 60026), + file: register("file", 60027), + fileText: register("file-text", 60027), + more: register("more", 60028), + ellipsis: register("ellipsis", 60028), + kebabHorizontal: register("kebab-horizontal", 60028), + mailReply: register("mail-reply", 60029), + reply: register("reply", 60029), + organization: register("organization", 60030), + organizationFilled: register("organization-filled", 60030), + organizationOutline: register("organization-outline", 60030), + newFile: register("new-file", 60031), + fileAdd: register("file-add", 60031), + newFolder: register("new-folder", 60032), + fileDirectoryCreate: register("file-directory-create", 60032), + trash: register("trash", 60033), + trashcan: register("trashcan", 60033), + history: register("history", 60034), + clock: register("clock", 60034), + folder: register("folder", 60035), + fileDirectory: register("file-directory", 60035), + symbolFolder: register("symbol-folder", 60035), + logoGithub: register("logo-github", 60036), + markGithub: register("mark-github", 60036), + github: register("github", 60036), + terminal: register("terminal", 60037), + console: register("console", 60037), + repl: register("repl", 60037), + zap: register("zap", 60038), + symbolEvent: register("symbol-event", 60038), + error: register("error", 60039), + stop: register("stop", 60039), + variable: register("variable", 60040), + symbolVariable: register("symbol-variable", 60040), + array: register("array", 60042), + symbolArray: register("symbol-array", 60042), + symbolModule: register("symbol-module", 60043), + symbolPackage: register("symbol-package", 60043), + symbolNamespace: register("symbol-namespace", 60043), + symbolObject: register("symbol-object", 60043), + symbolMethod: register("symbol-method", 60044), + symbolFunction: register("symbol-function", 60044), + symbolConstructor: register("symbol-constructor", 60044), + symbolBoolean: register("symbol-boolean", 60047), + symbolNull: register("symbol-null", 60047), + symbolNumeric: register("symbol-numeric", 60048), + symbolNumber: register("symbol-number", 60048), + symbolStructure: register("symbol-structure", 60049), + symbolStruct: register("symbol-struct", 60049), + symbolParameter: register("symbol-parameter", 60050), + symbolTypeParameter: register("symbol-type-parameter", 60050), + symbolKey: register("symbol-key", 60051), + symbolText: register("symbol-text", 60051), + symbolReference: register("symbol-reference", 60052), + goToFile: register("go-to-file", 60052), + symbolEnum: register("symbol-enum", 60053), + symbolValue: register("symbol-value", 60053), + symbolRuler: register("symbol-ruler", 60054), + symbolUnit: register("symbol-unit", 60054), + activateBreakpoints: register("activate-breakpoints", 60055), + archive: register("archive", 60056), + arrowBoth: register("arrow-both", 60057), + arrowDown: register("arrow-down", 60058), + arrowLeft: register("arrow-left", 60059), + arrowRight: register("arrow-right", 60060), + arrowSmallDown: register("arrow-small-down", 60061), + arrowSmallLeft: register("arrow-small-left", 60062), + arrowSmallRight: register("arrow-small-right", 60063), + arrowSmallUp: register("arrow-small-up", 60064), + arrowUp: register("arrow-up", 60065), + bell: register("bell", 60066), + bold: register("bold", 60067), + book: register("book", 60068), + bookmark: register("bookmark", 60069), + debugBreakpointConditionalUnverified: register("debug-breakpoint-conditional-unverified", 60070), + debugBreakpointConditional: register("debug-breakpoint-conditional", 60071), + debugBreakpointConditionalDisabled: register("debug-breakpoint-conditional-disabled", 60071), + debugBreakpointDataUnverified: register("debug-breakpoint-data-unverified", 60072), + debugBreakpointData: register("debug-breakpoint-data", 60073), + debugBreakpointDataDisabled: register("debug-breakpoint-data-disabled", 60073), + debugBreakpointLogUnverified: register("debug-breakpoint-log-unverified", 60074), + debugBreakpointLog: register("debug-breakpoint-log", 60075), + debugBreakpointLogDisabled: register("debug-breakpoint-log-disabled", 60075), + briefcase: register("briefcase", 60076), + broadcast: register("broadcast", 60077), + browser: register("browser", 60078), + bug: register("bug", 60079), + calendar: register("calendar", 60080), + caseSensitive: register("case-sensitive", 60081), + check: register("check", 60082), + checklist: register("checklist", 60083), + chevronDown: register("chevron-down", 60084), + dropDownButton: register("drop-down-button", 60084), + chevronLeft: register("chevron-left", 60085), + chevronRight: register("chevron-right", 60086), + chevronUp: register("chevron-up", 60087), + chromeClose: register("chrome-close", 60088), + chromeMaximize: register("chrome-maximize", 60089), + chromeMinimize: register("chrome-minimize", 60090), + chromeRestore: register("chrome-restore", 60091), + circle: register("circle", 60092), + circleOutline: register("circle-outline", 60092), + debugBreakpointUnverified: register("debug-breakpoint-unverified", 60092), + circleSlash: register("circle-slash", 60093), + circuitBoard: register("circuit-board", 60094), + clearAll: register("clear-all", 60095), + clippy: register("clippy", 60096), + closeAll: register("close-all", 60097), + cloudDownload: register("cloud-download", 60098), + cloudUpload: register("cloud-upload", 60099), + code: register("code", 60100), + collapseAll: register("collapse-all", 60101), + colorMode: register("color-mode", 60102), + commentDiscussion: register("comment-discussion", 60103), + compareChanges: register("compare-changes", 60157), + creditCard: register("credit-card", 60105), + dash: register("dash", 60108), + dashboard: register("dashboard", 60109), + database: register("database", 60110), + debugContinue: register("debug-continue", 60111), + debugDisconnect: register("debug-disconnect", 60112), + debugPause: register("debug-pause", 60113), + debugRestart: register("debug-restart", 60114), + debugStart: register("debug-start", 60115), + debugStepInto: register("debug-step-into", 60116), + debugStepOut: register("debug-step-out", 60117), + debugStepOver: register("debug-step-over", 60118), + debugStop: register("debug-stop", 60119), + debug: register("debug", 60120), + deviceCameraVideo: register("device-camera-video", 60121), + deviceCamera: register("device-camera", 60122), + deviceMobile: register("device-mobile", 60123), + diffAdded: register("diff-added", 60124), + diffIgnored: register("diff-ignored", 60125), + diffModified: register("diff-modified", 60126), + diffRemoved: register("diff-removed", 60127), + diffRenamed: register("diff-renamed", 60128), + diff: register("diff", 60129), + discard: register("discard", 60130), + editorLayout: register("editor-layout", 60131), + emptyWindow: register("empty-window", 60132), + exclude: register("exclude", 60133), + extensions: register("extensions", 60134), + eyeClosed: register("eye-closed", 60135), + fileBinary: register("file-binary", 60136), + fileCode: register("file-code", 60137), + fileMedia: register("file-media", 60138), + filePdf: register("file-pdf", 60139), + fileSubmodule: register("file-submodule", 60140), + fileSymlinkDirectory: register("file-symlink-directory", 60141), + fileSymlinkFile: register("file-symlink-file", 60142), + fileZip: register("file-zip", 60143), + files: register("files", 60144), + filter: register("filter", 60145), + flame: register("flame", 60146), + foldDown: register("fold-down", 60147), + foldUp: register("fold-up", 60148), + fold: register("fold", 60149), + folderActive: register("folder-active", 60150), + folderOpened: register("folder-opened", 60151), + gear: register("gear", 60152), + gift: register("gift", 60153), + gistSecret: register("gist-secret", 60154), + gist: register("gist", 60155), + gitCommit: register("git-commit", 60156), + gitCompare: register("git-compare", 60157), + gitMerge: register("git-merge", 60158), + githubAction: register("github-action", 60159), + githubAlt: register("github-alt", 60160), + globe: register("globe", 60161), + grabber: register("grabber", 60162), + graph: register("graph", 60163), + gripper: register("gripper", 60164), + heart: register("heart", 60165), + home: register("home", 60166), + horizontalRule: register("horizontal-rule", 60167), + hubot: register("hubot", 60168), + inbox: register("inbox", 60169), + issueClosed: register("issue-closed", 60324), + issueReopened: register("issue-reopened", 60171), + issues: register("issues", 60172), + italic: register("italic", 60173), + jersey: register("jersey", 60174), + json: register("json", 60175), + bracket: register("bracket", 60175), + kebabVertical: register("kebab-vertical", 60176), + key: register("key", 60177), + law: register("law", 60178), + lightbulbAutofix: register("lightbulb-autofix", 60179), + linkExternal: register("link-external", 60180), + link: register("link", 60181), + listOrdered: register("list-ordered", 60182), + listUnordered: register("list-unordered", 60183), + liveShare: register("live-share", 60184), + loading: register("loading", 60185), + location: register("location", 60186), + mailRead: register("mail-read", 60187), + mail: register("mail", 60188), + markdown: register("markdown", 60189), + megaphone: register("megaphone", 60190), + mention: register("mention", 60191), + milestone: register("milestone", 60192), + gitPullRequestMilestone: register("git-pull-request-milestone", 60192), + mortarBoard: register("mortar-board", 60193), + move: register("move", 60194), + multipleWindows: register("multiple-windows", 60195), + mute: register("mute", 60196), + noNewline: register("no-newline", 60197), + note: register("note", 60198), + octoface: register("octoface", 60199), + openPreview: register("open-preview", 60200), + package_: register("package", 60201), + paintcan: register("paintcan", 60202), + pin: register("pin", 60203), + play: register("play", 60204), + run: register("run", 60204), + plug: register("plug", 60205), + preserveCase: register("preserve-case", 60206), + preview: register("preview", 60207), + project: register("project", 60208), + pulse: register("pulse", 60209), + question: register("question", 60210), + quote: register("quote", 60211), + radioTower: register("radio-tower", 60212), + reactions: register("reactions", 60213), + references: register("references", 60214), + refresh: register("refresh", 60215), + regex: register("regex", 60216), + remoteExplorer: register("remote-explorer", 60217), + remote: register("remote", 60218), + remove: register("remove", 60219), + replaceAll: register("replace-all", 60220), + replace: register("replace", 60221), + repoClone: register("repo-clone", 60222), + repoForcePush: register("repo-force-push", 60223), + repoPull: register("repo-pull", 60224), + repoPush: register("repo-push", 60225), + report: register("report", 60226), + requestChanges: register("request-changes", 60227), + rocket: register("rocket", 60228), + rootFolderOpened: register("root-folder-opened", 60229), + rootFolder: register("root-folder", 60230), + rss: register("rss", 60231), + ruby: register("ruby", 60232), + saveAll: register("save-all", 60233), + saveAs: register("save-as", 60234), + save: register("save", 60235), + screenFull: register("screen-full", 60236), + screenNormal: register("screen-normal", 60237), + searchStop: register("search-stop", 60238), + server: register("server", 60240), + settingsGear: register("settings-gear", 60241), + settings: register("settings", 60242), + shield: register("shield", 60243), + smiley: register("smiley", 60244), + sortPrecedence: register("sort-precedence", 60245), + splitHorizontal: register("split-horizontal", 60246), + splitVertical: register("split-vertical", 60247), + squirrel: register("squirrel", 60248), + starFull: register("star-full", 60249), + starHalf: register("star-half", 60250), + symbolClass: register("symbol-class", 60251), + symbolColor: register("symbol-color", 60252), + symbolCustomColor: register("symbol-customcolor", 60252), + symbolConstant: register("symbol-constant", 60253), + symbolEnumMember: register("symbol-enum-member", 60254), + symbolField: register("symbol-field", 60255), + symbolFile: register("symbol-file", 60256), + symbolInterface: register("symbol-interface", 60257), + symbolKeyword: register("symbol-keyword", 60258), + symbolMisc: register("symbol-misc", 60259), + symbolOperator: register("symbol-operator", 60260), + symbolProperty: register("symbol-property", 60261), + wrench: register("wrench", 60261), + wrenchSubaction: register("wrench-subaction", 60261), + symbolSnippet: register("symbol-snippet", 60262), + tasklist: register("tasklist", 60263), + telescope: register("telescope", 60264), + textSize: register("text-size", 60265), + threeBars: register("three-bars", 60266), + thumbsdown: register("thumbsdown", 60267), + thumbsup: register("thumbsup", 60268), + tools: register("tools", 60269), + triangleDown: register("triangle-down", 60270), + triangleLeft: register("triangle-left", 60271), + triangleRight: register("triangle-right", 60272), + triangleUp: register("triangle-up", 60273), + twitter: register("twitter", 60274), + unfold: register("unfold", 60275), + unlock: register("unlock", 60276), + unmute: register("unmute", 60277), + unverified: register("unverified", 60278), + verified: register("verified", 60279), + versions: register("versions", 60280), + vmActive: register("vm-active", 60281), + vmOutline: register("vm-outline", 60282), + vmRunning: register("vm-running", 60283), + watch: register("watch", 60284), + whitespace: register("whitespace", 60285), + wholeWord: register("whole-word", 60286), + window: register("window", 60287), + wordWrap: register("word-wrap", 60288), + zoomIn: register("zoom-in", 60289), + zoomOut: register("zoom-out", 60290), + listFilter: register("list-filter", 60291), + listFlat: register("list-flat", 60292), + listSelection: register("list-selection", 60293), + selection: register("selection", 60293), + listTree: register("list-tree", 60294), + debugBreakpointFunctionUnverified: register("debug-breakpoint-function-unverified", 60295), + debugBreakpointFunction: register("debug-breakpoint-function", 60296), + debugBreakpointFunctionDisabled: register("debug-breakpoint-function-disabled", 60296), + debugStackframeActive: register("debug-stackframe-active", 60297), + circleSmallFilled: register("circle-small-filled", 60298), + debugStackframeDot: register("debug-stackframe-dot", 60298), + debugStackframe: register("debug-stackframe", 60299), + debugStackframeFocused: register("debug-stackframe-focused", 60299), + debugBreakpointUnsupported: register("debug-breakpoint-unsupported", 60300), + symbolString: register("symbol-string", 60301), + debugReverseContinue: register("debug-reverse-continue", 60302), + debugStepBack: register("debug-step-back", 60303), + debugRestartFrame: register("debug-restart-frame", 60304), + callIncoming: register("call-incoming", 60306), + callOutgoing: register("call-outgoing", 60307), + menu: register("menu", 60308), + expandAll: register("expand-all", 60309), + feedback: register("feedback", 60310), + gitPullRequestReviewer: register("git-pull-request-reviewer", 60310), + groupByRefType: register("group-by-ref-type", 60311), + ungroupByRefType: register("ungroup-by-ref-type", 60312), + account: register("account", 60313), + gitPullRequestAssignee: register("git-pull-request-assignee", 60313), + bellDot: register("bell-dot", 60314), + debugConsole: register("debug-console", 60315), + library: register("library", 60316), + output: register("output", 60317), + runAll: register("run-all", 60318), + syncIgnored: register("sync-ignored", 60319), + pinned: register("pinned", 60320), + githubInverted: register("github-inverted", 60321), + debugAlt: register("debug-alt", 60305), + serverProcess: register("server-process", 60322), + serverEnvironment: register("server-environment", 60323), + pass: register("pass", 60324), + stopCircle: register("stop-circle", 60325), + playCircle: register("play-circle", 60326), + record: register("record", 60327), + debugAltSmall: register("debug-alt-small", 60328), + vmConnect: register("vm-connect", 60329), + cloud: register("cloud", 60330), + merge: register("merge", 60331), + exportIcon: register("export", 60332), + graphLeft: register("graph-left", 60333), + magnet: register("magnet", 60334), + notebook: register("notebook", 60335), + redo: register("redo", 60336), + checkAll: register("check-all", 60337), + pinnedDirty: register("pinned-dirty", 60338), + passFilled: register("pass-filled", 60339), + circleLargeFilled: register("circle-large-filled", 60340), + circleLarge: register("circle-large", 60341), + circleLargeOutline: register("circle-large-outline", 60341), + combine: register("combine", 60342), + gather: register("gather", 60342), + table: register("table", 60343), + variableGroup: register("variable-group", 60344), + typeHierarchy: register("type-hierarchy", 60345), + typeHierarchySub: register("type-hierarchy-sub", 60346), + typeHierarchySuper: register("type-hierarchy-super", 60347), + gitPullRequestCreate: register("git-pull-request-create", 60348), + runAbove: register("run-above", 60349), + runBelow: register("run-below", 60350), + notebookTemplate: register("notebook-template", 60351), + debugRerun: register("debug-rerun", 60352), + workspaceTrusted: register("workspace-trusted", 60353), + workspaceUntrusted: register("workspace-untrusted", 60354), + workspaceUnspecified: register("workspace-unspecified", 60355), + terminalCmd: register("terminal-cmd", 60356), + terminalDebian: register("terminal-debian", 60357), + terminalLinux: register("terminal-linux", 60358), + terminalPowershell: register("terminal-powershell", 60359), + terminalTmux: register("terminal-tmux", 60360), + terminalUbuntu: register("terminal-ubuntu", 60361), + terminalBash: register("terminal-bash", 60362), + arrowSwap: register("arrow-swap", 60363), + copy: register("copy", 60364), + personAdd: register("person-add", 60365), + filterFilled: register("filter-filled", 60366), + wand: register("wand", 60367), + debugLineByLine: register("debug-line-by-line", 60368), + inspect: register("inspect", 60369), + layers: register("layers", 60370), + layersDot: register("layers-dot", 60371), + layersActive: register("layers-active", 60372), + compass: register("compass", 60373), + compassDot: register("compass-dot", 60374), + compassActive: register("compass-active", 60375), + azure: register("azure", 60376), + issueDraft: register("issue-draft", 60377), + gitPullRequestClosed: register("git-pull-request-closed", 60378), + gitPullRequestDraft: register("git-pull-request-draft", 60379), + debugAll: register("debug-all", 60380), + debugCoverage: register("debug-coverage", 60381), + runErrors: register("run-errors", 60382), + folderLibrary: register("folder-library", 60383), + debugContinueSmall: register("debug-continue-small", 60384), + beakerStop: register("beaker-stop", 60385), + graphLine: register("graph-line", 60386), + graphScatter: register("graph-scatter", 60387), + pieChart: register("pie-chart", 60388), + bracketDot: register("bracket-dot", 60389), + bracketError: register("bracket-error", 60390), + lockSmall: register("lock-small", 60391), + azureDevops: register("azure-devops", 60392), + verifiedFilled: register("verified-filled", 60393), + newLine: register("newline", 60394), + layout: register("layout", 60395), + layoutActivitybarLeft: register("layout-activitybar-left", 60396), + layoutActivitybarRight: register("layout-activitybar-right", 60397), + layoutPanelLeft: register("layout-panel-left", 60398), + layoutPanelCenter: register("layout-panel-center", 60399), + layoutPanelJustify: register("layout-panel-justify", 60400), + layoutPanelRight: register("layout-panel-right", 60401), + layoutPanel: register("layout-panel", 60402), + layoutSidebarLeft: register("layout-sidebar-left", 60403), + layoutSidebarRight: register("layout-sidebar-right", 60404), + layoutStatusbar: register("layout-statusbar", 60405), + layoutMenubar: register("layout-menubar", 60406), + layoutCentered: register("layout-centered", 60407), + layoutSidebarRightOff: register("layout-sidebar-right-off", 60416), + layoutPanelOff: register("layout-panel-off", 60417), + layoutSidebarLeftOff: register("layout-sidebar-left-off", 60418), + target: register("target", 60408), + indent: register("indent", 60409), + recordSmall: register("record-small", 60410), + errorSmall: register("error-small", 60411), + arrowCircleDown: register("arrow-circle-down", 60412), + arrowCircleLeft: register("arrow-circle-left", 60413), + arrowCircleRight: register("arrow-circle-right", 60414), + arrowCircleUp: register("arrow-circle-up", 60415), + heartFilled: register("heart-filled", 60420), + map: register("map", 60421), + mapFilled: register("map-filled", 60422), + circleSmall: register("circle-small", 60423), + bellSlash: register("bell-slash", 60424), + bellSlashDot: register("bell-slash-dot", 60425), + commentUnresolved: register("comment-unresolved", 60426), + gitPullRequestGoToChanges: register("git-pull-request-go-to-changes", 60427), + gitPullRequestNewChanges: register("git-pull-request-new-changes", 60428), + searchFuzzy: register("search-fuzzy", 60429), + commentDraft: register("comment-draft", 60430), + send: register("send", 60431), + sparkle: register("sparkle", 60432), + insert: register("insert", 60433), + mic: register("mic", 60434), + // derived icons, that could become separate icons + dialogError: register("dialog-error", "error"), + dialogWarning: register("dialog-warning", "warning"), + dialogInfo: register("dialog-info", "info"), + dialogClose: register("dialog-close", "close"), + treeItemExpanded: register("tree-item-expanded", "chevron-down"), + treeFilterOnTypeOn: register("tree-filter-on-type-on", "list-filter"), + treeFilterOnTypeOff: register("tree-filter-on-type-off", "list-selection"), + treeFilterClear: register("tree-filter-clear", "close"), + treeItemLoading: register("tree-item-loading", "loading"), + menuSelection: register("menu-selection", "check"), + menuSubmenu: register("menu-submenu", "chevron-right"), + menuBarMore: register("menubar-more", "more"), + scrollbarButtonLeft: register("scrollbar-button-left", "triangle-left"), + scrollbarButtonRight: register("scrollbar-button-right", "triangle-right"), + scrollbarButtonUp: register("scrollbar-button-up", "triangle-up"), + scrollbarButtonDown: register("scrollbar-button-down", "triangle-down"), + toolBarMore: register("toolbar-more", "more"), + quickInputBack: register("quick-input-back", "arrow-left") + }; + + // node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js + var __awaiter = 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()); + }); + }; + var TokenizationRegistry = class { + constructor() { + this._tokenizationSupports = /* @__PURE__ */ new Map(); + this._factories = /* @__PURE__ */ new Map(); + this._onDidChange = new Emitter(); + this.onDidChange = this._onDidChange.event; + this._colorMap = null; + } + handleChange(languageIds) { + this._onDidChange.fire({ + changedLanguages: languageIds, + changedColorMap: false + }); + } + register(languageId, support) { + this._tokenizationSupports.set(languageId, support); + this.handleChange([languageId]); + return toDisposable(() => { + 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 _a3; + (_a3 = this._factories.get(languageId)) === null || _a3 === void 0 ? void 0 : _a3.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 + /* ColorId.DefaultBackground */ + ]; + } + return null; + } + }; + var TokenizationSupportFactoryData = class extends Disposable { + get isResolved() { + return this._isResolved; + } + constructor(_registry, _languageId, _factory) { + super(); + this._registry = _registry; + 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)); + } + }); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/languages.js + var Token = class { + constructor(offset, type2, language2) { + this.offset = offset; + this.type = type2; + this.language = language2; + this._tokenBrand = void 0; + } + toString() { + return "(" + this.offset + ", " + this.type + ")"; + } + }; + var CompletionItemKinds; + (function(CompletionItemKinds2) { + const byKind = /* @__PURE__ */ 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 = /* @__PURE__ */ new Map(); + data.set( + "method", + 0 + /* CompletionItemKind.Method */ + ); + data.set( + "function", + 1 + /* CompletionItemKind.Function */ + ); + data.set( + "constructor", + 2 + /* CompletionItemKind.Constructor */ + ); + data.set( + "field", + 3 + /* CompletionItemKind.Field */ + ); + data.set( + "variable", + 4 + /* CompletionItemKind.Variable */ + ); + data.set( + "class", + 5 + /* CompletionItemKind.Class */ + ); + data.set( + "struct", + 6 + /* CompletionItemKind.Struct */ + ); + data.set( + "interface", + 7 + /* CompletionItemKind.Interface */ + ); + data.set( + "module", + 8 + /* CompletionItemKind.Module */ + ); + data.set( + "property", + 9 + /* CompletionItemKind.Property */ + ); + data.set( + "event", + 10 + /* CompletionItemKind.Event */ + ); + data.set( + "operator", + 11 + /* CompletionItemKind.Operator */ + ); + data.set( + "unit", + 12 + /* CompletionItemKind.Unit */ + ); + data.set( + "value", + 13 + /* CompletionItemKind.Value */ + ); + data.set( + "constant", + 14 + /* CompletionItemKind.Constant */ + ); + data.set( + "enum", + 15 + /* CompletionItemKind.Enum */ + ); + data.set( + "enum-member", + 16 + /* CompletionItemKind.EnumMember */ + ); + data.set( + "enumMember", + 16 + /* CompletionItemKind.EnumMember */ + ); + data.set( + "keyword", + 17 + /* CompletionItemKind.Keyword */ + ); + data.set( + "snippet", + 27 + /* CompletionItemKind.Snippet */ + ); + data.set( + "text", + 18 + /* CompletionItemKind.Text */ + ); + data.set( + "color", + 19 + /* CompletionItemKind.Color */ + ); + data.set( + "file", + 20 + /* CompletionItemKind.File */ + ); + data.set( + "reference", + 21 + /* CompletionItemKind.Reference */ + ); + data.set( + "customcolor", + 22 + /* CompletionItemKind.Customcolor */ + ); + data.set( + "folder", + 23 + /* CompletionItemKind.Folder */ + ); + data.set( + "type-parameter", + 24 + /* CompletionItemKind.TypeParameter */ + ); + data.set( + "typeParameter", + 24 + /* CompletionItemKind.TypeParameter */ + ); + data.set( + "account", + 25 + /* CompletionItemKind.User */ + ); + data.set( + "issue", + 26 + /* CompletionItemKind.Issue */ + ); + function fromString(value, strict) { + let res = data.get(value); + if (typeof res === "undefined" && !strict) { + res = 9; + } + return res; + } + CompletionItemKinds2.fromString = fromString; + })(CompletionItemKinds || (CompletionItemKinds = {})); + var InlineCompletionTriggerKind; + (function(InlineCompletionTriggerKind3) { + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; + })(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); + var SignatureHelpTriggerKind; + (function(SignatureHelpTriggerKind3) { + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; + })(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); + var DocumentHighlightKind; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4[DocumentHighlightKind4["Text"] = 0] = "Text"; + DocumentHighlightKind4[DocumentHighlightKind4["Read"] = 1] = "Read"; + DocumentHighlightKind4[DocumentHighlightKind4["Write"] = 2] = "Write"; + })(DocumentHighlightKind || (DocumentHighlightKind = {})); + var symbolKindNames = { + [ + 17 + /* SymbolKind.Array */ + ]: localize("Array", "array"), + [ + 16 + /* SymbolKind.Boolean */ + ]: localize("Boolean", "boolean"), + [ + 4 + /* SymbolKind.Class */ + ]: localize("Class", "class"), + [ + 13 + /* SymbolKind.Constant */ + ]: localize("Constant", "constant"), + [ + 8 + /* SymbolKind.Constructor */ + ]: localize("Constructor", "constructor"), + [ + 9 + /* SymbolKind.Enum */ + ]: localize("Enum", "enumeration"), + [ + 21 + /* SymbolKind.EnumMember */ + ]: localize("EnumMember", "enumeration member"), + [ + 23 + /* SymbolKind.Event */ + ]: localize("Event", "event"), + [ + 7 + /* SymbolKind.Field */ + ]: localize("Field", "field"), + [ + 0 + /* SymbolKind.File */ + ]: localize("File", "file"), + [ + 11 + /* SymbolKind.Function */ + ]: localize("Function", "function"), + [ + 10 + /* SymbolKind.Interface */ + ]: localize("Interface", "interface"), + [ + 19 + /* SymbolKind.Key */ + ]: localize("Key", "key"), + [ + 5 + /* SymbolKind.Method */ + ]: localize("Method", "method"), + [ + 1 + /* SymbolKind.Module */ + ]: localize("Module", "module"), + [ + 2 + /* SymbolKind.Namespace */ + ]: localize("Namespace", "namespace"), + [ + 20 + /* SymbolKind.Null */ + ]: localize("Null", "null"), + [ + 15 + /* SymbolKind.Number */ + ]: localize("Number", "number"), + [ + 18 + /* SymbolKind.Object */ + ]: localize("Object", "object"), + [ + 24 + /* SymbolKind.Operator */ + ]: localize("Operator", "operator"), + [ + 3 + /* SymbolKind.Package */ + ]: localize("Package", "package"), + [ + 6 + /* SymbolKind.Property */ + ]: localize("Property", "property"), + [ + 14 + /* SymbolKind.String */ + ]: localize("String", "string"), + [ + 22 + /* SymbolKind.Struct */ + ]: localize("Struct", "struct"), + [ + 25 + /* SymbolKind.TypeParameter */ + ]: localize("TypeParameter", "type parameter"), + [ + 12 + /* SymbolKind.Variable */ + ]: localize("Variable", "variable") + }; + var SymbolKinds; + (function(SymbolKinds2) { + const byKind = /* @__PURE__ */ 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 = {})); + var FoldingRangeKind = class _FoldingRangeKind { + /** + * Returns a {@link FoldingRangeKind} for the given value. + * + * @param value of the kind. + */ + static fromValue(value) { + switch (value) { + case "comment": + return _FoldingRangeKind.Comment; + case "imports": + return _FoldingRangeKind.Imports; + case "region": + return _FoldingRangeKind.Region; + } + return new _FoldingRangeKind(value); + } + /** + * Creates a new {@link FoldingRangeKind}. + * + * @param value of the kind. + */ + constructor(value) { + this.value = value; + } + }; + FoldingRangeKind.Comment = new FoldingRangeKind("comment"); + FoldingRangeKind.Imports = new FoldingRangeKind("imports"); + FoldingRangeKind.Region = new FoldingRangeKind("region"); + var Command; + (function(Command3) { + function is(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + return typeof obj.id === "string" && typeof obj.title === "string"; + } + Command3.is = is; + })(Command || (Command = {})); + var CommentThreadCollapsibleState; + (function(CommentThreadCollapsibleState2) { + CommentThreadCollapsibleState2[CommentThreadCollapsibleState2["Collapsed"] = 0] = "Collapsed"; + CommentThreadCollapsibleState2[CommentThreadCollapsibleState2["Expanded"] = 1] = "Expanded"; + })(CommentThreadCollapsibleState || (CommentThreadCollapsibleState = {})); + var CommentThreadState; + (function(CommentThreadState2) { + CommentThreadState2[CommentThreadState2["Unresolved"] = 0] = "Unresolved"; + CommentThreadState2[CommentThreadState2["Resolved"] = 1] = "Resolved"; + })(CommentThreadState || (CommentThreadState = {})); + var CommentMode; + (function(CommentMode2) { + CommentMode2[CommentMode2["Editing"] = 0] = "Editing"; + CommentMode2[CommentMode2["Preview"] = 1] = "Preview"; + })(CommentMode || (CommentMode = {})); + var CommentState; + (function(CommentState2) { + CommentState2[CommentState2["Published"] = 0] = "Published"; + CommentState2[CommentState2["Draft"] = 1] = "Draft"; + })(CommentState || (CommentState = {})); + var InlayHintKind; + (function(InlayHintKind4) { + InlayHintKind4[InlayHintKind4["Type"] = 1] = "Type"; + InlayHintKind4[InlayHintKind4["Parameter"] = 2] = "Parameter"; + })(InlayHintKind || (InlayHintKind = {})); + var TokenizationRegistry2 = new TokenizationRegistry(); + var ExternalUriOpenerPriority; + (function(ExternalUriOpenerPriority2) { + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["None"] = 0] = "None"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Option"] = 1] = "Option"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Default"] = 2] = "Default"; + ExternalUriOpenerPriority2[ExternalUriOpenerPriority2["Preferred"] = 3] = "Preferred"; + })(ExternalUriOpenerPriority || (ExternalUriOpenerPriority = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js + var AccessibilitySupport; + (function(AccessibilitySupport2) { + AccessibilitySupport2[AccessibilitySupport2["Unknown"] = 0] = "Unknown"; + AccessibilitySupport2[AccessibilitySupport2["Disabled"] = 1] = "Disabled"; + AccessibilitySupport2[AccessibilitySupport2["Enabled"] = 2] = "Enabled"; + })(AccessibilitySupport || (AccessibilitySupport = {})); + var CodeActionTriggerType; + (function(CodeActionTriggerType2) { + CodeActionTriggerType2[CodeActionTriggerType2["Invoke"] = 1] = "Invoke"; + CodeActionTriggerType2[CodeActionTriggerType2["Auto"] = 2] = "Auto"; + })(CodeActionTriggerType || (CodeActionTriggerType = {})); + var CompletionItemInsertTextRule; + (function(CompletionItemInsertTextRule2) { + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["None"] = 0] = "None"; + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"] = 1] = "KeepWhitespace"; + CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"] = 4] = "InsertAsSnippet"; + })(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {})); + var CompletionItemKind; + (function(CompletionItemKind4) { + CompletionItemKind4[CompletionItemKind4["Method"] = 0] = "Method"; + CompletionItemKind4[CompletionItemKind4["Function"] = 1] = "Function"; + CompletionItemKind4[CompletionItemKind4["Constructor"] = 2] = "Constructor"; + CompletionItemKind4[CompletionItemKind4["Field"] = 3] = "Field"; + CompletionItemKind4[CompletionItemKind4["Variable"] = 4] = "Variable"; + CompletionItemKind4[CompletionItemKind4["Class"] = 5] = "Class"; + CompletionItemKind4[CompletionItemKind4["Struct"] = 6] = "Struct"; + CompletionItemKind4[CompletionItemKind4["Interface"] = 7] = "Interface"; + CompletionItemKind4[CompletionItemKind4["Module"] = 8] = "Module"; + CompletionItemKind4[CompletionItemKind4["Property"] = 9] = "Property"; + CompletionItemKind4[CompletionItemKind4["Event"] = 10] = "Event"; + CompletionItemKind4[CompletionItemKind4["Operator"] = 11] = "Operator"; + CompletionItemKind4[CompletionItemKind4["Unit"] = 12] = "Unit"; + CompletionItemKind4[CompletionItemKind4["Value"] = 13] = "Value"; + CompletionItemKind4[CompletionItemKind4["Constant"] = 14] = "Constant"; + CompletionItemKind4[CompletionItemKind4["Enum"] = 15] = "Enum"; + CompletionItemKind4[CompletionItemKind4["EnumMember"] = 16] = "EnumMember"; + CompletionItemKind4[CompletionItemKind4["Keyword"] = 17] = "Keyword"; + CompletionItemKind4[CompletionItemKind4["Text"] = 18] = "Text"; + CompletionItemKind4[CompletionItemKind4["Color"] = 19] = "Color"; + CompletionItemKind4[CompletionItemKind4["File"] = 20] = "File"; + CompletionItemKind4[CompletionItemKind4["Reference"] = 21] = "Reference"; + CompletionItemKind4[CompletionItemKind4["Customcolor"] = 22] = "Customcolor"; + CompletionItemKind4[CompletionItemKind4["Folder"] = 23] = "Folder"; + CompletionItemKind4[CompletionItemKind4["TypeParameter"] = 24] = "TypeParameter"; + CompletionItemKind4[CompletionItemKind4["User"] = 25] = "User"; + CompletionItemKind4[CompletionItemKind4["Issue"] = 26] = "Issue"; + CompletionItemKind4[CompletionItemKind4["Snippet"] = 27] = "Snippet"; + })(CompletionItemKind || (CompletionItemKind = {})); + var CompletionItemTag; + (function(CompletionItemTag3) { + CompletionItemTag3[CompletionItemTag3["Deprecated"] = 1] = "Deprecated"; + })(CompletionItemTag || (CompletionItemTag = {})); + var CompletionTriggerKind; + (function(CompletionTriggerKind2) { + CompletionTriggerKind2[CompletionTriggerKind2["Invoke"] = 0] = "Invoke"; + CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 1] = "TriggerCharacter"; + CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions"; + })(CompletionTriggerKind || (CompletionTriggerKind = {})); + var ContentWidgetPositionPreference; + (function(ContentWidgetPositionPreference2) { + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"] = 0] = "EXACT"; + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"] = 1] = "ABOVE"; + ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"] = 2] = "BELOW"; + })(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {})); + var CursorChangeReason; + (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 = {})); + var DefaultEndOfLine; + (function(DefaultEndOfLine2) { + DefaultEndOfLine2[DefaultEndOfLine2["LF"] = 1] = "LF"; + DefaultEndOfLine2[DefaultEndOfLine2["CRLF"] = 2] = "CRLF"; + })(DefaultEndOfLine || (DefaultEndOfLine = {})); + var DocumentHighlightKind2; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4[DocumentHighlightKind4["Text"] = 0] = "Text"; + DocumentHighlightKind4[DocumentHighlightKind4["Read"] = 1] = "Read"; + DocumentHighlightKind4[DocumentHighlightKind4["Write"] = 2] = "Write"; + })(DocumentHighlightKind2 || (DocumentHighlightKind2 = {})); + var EditorAutoIndentStrategy; + (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 = {})); + var EditorOption; + (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 = {})); + var EndOfLinePreference; + (function(EndOfLinePreference2) { + EndOfLinePreference2[EndOfLinePreference2["TextDefined"] = 0] = "TextDefined"; + EndOfLinePreference2[EndOfLinePreference2["LF"] = 1] = "LF"; + EndOfLinePreference2[EndOfLinePreference2["CRLF"] = 2] = "CRLF"; + })(EndOfLinePreference || (EndOfLinePreference = {})); + var EndOfLineSequence; + (function(EndOfLineSequence2) { + EndOfLineSequence2[EndOfLineSequence2["LF"] = 0] = "LF"; + EndOfLineSequence2[EndOfLineSequence2["CRLF"] = 1] = "CRLF"; + })(EndOfLineSequence || (EndOfLineSequence = {})); + var GlyphMarginLane; + (function(GlyphMarginLane3) { + GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; + GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right"; + })(GlyphMarginLane || (GlyphMarginLane = {})); + var IndentAction; + (function(IndentAction2) { + IndentAction2[IndentAction2["None"] = 0] = "None"; + IndentAction2[IndentAction2["Indent"] = 1] = "Indent"; + IndentAction2[IndentAction2["IndentOutdent"] = 2] = "IndentOutdent"; + IndentAction2[IndentAction2["Outdent"] = 3] = "Outdent"; + })(IndentAction || (IndentAction = {})); + var InjectedTextCursorStops; + (function(InjectedTextCursorStops3) { + InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; + InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; + })(InjectedTextCursorStops || (InjectedTextCursorStops = {})); + var InlayHintKind2; + (function(InlayHintKind4) { + InlayHintKind4[InlayHintKind4["Type"] = 1] = "Type"; + InlayHintKind4[InlayHintKind4["Parameter"] = 2] = "Parameter"; + })(InlayHintKind2 || (InlayHintKind2 = {})); + var InlineCompletionTriggerKind2; + (function(InlineCompletionTriggerKind3) { + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; + InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; + })(InlineCompletionTriggerKind2 || (InlineCompletionTriggerKind2 = {})); + var KeyCode; + (function(KeyCode2) { + KeyCode2[KeyCode2["DependsOnKbLayout"] = -1] = "DependsOnKbLayout"; + KeyCode2[KeyCode2["Unknown"] = 0] = "Unknown"; + KeyCode2[KeyCode2["Backspace"] = 1] = "Backspace"; + KeyCode2[KeyCode2["Tab"] = 2] = "Tab"; + KeyCode2[KeyCode2["Enter"] = 3] = "Enter"; + KeyCode2[KeyCode2["Shift"] = 4] = "Shift"; + KeyCode2[KeyCode2["Ctrl"] = 5] = "Ctrl"; + KeyCode2[KeyCode2["Alt"] = 6] = "Alt"; + KeyCode2[KeyCode2["PauseBreak"] = 7] = "PauseBreak"; + KeyCode2[KeyCode2["CapsLock"] = 8] = "CapsLock"; + KeyCode2[KeyCode2["Escape"] = 9] = "Escape"; + KeyCode2[KeyCode2["Space"] = 10] = "Space"; + KeyCode2[KeyCode2["PageUp"] = 11] = "PageUp"; + KeyCode2[KeyCode2["PageDown"] = 12] = "PageDown"; + KeyCode2[KeyCode2["End"] = 13] = "End"; + KeyCode2[KeyCode2["Home"] = 14] = "Home"; + KeyCode2[KeyCode2["LeftArrow"] = 15] = "LeftArrow"; + KeyCode2[KeyCode2["UpArrow"] = 16] = "UpArrow"; + KeyCode2[KeyCode2["RightArrow"] = 17] = "RightArrow"; + KeyCode2[KeyCode2["DownArrow"] = 18] = "DownArrow"; + KeyCode2[KeyCode2["Insert"] = 19] = "Insert"; + KeyCode2[KeyCode2["Delete"] = 20] = "Delete"; + KeyCode2[KeyCode2["Digit0"] = 21] = "Digit0"; + KeyCode2[KeyCode2["Digit1"] = 22] = "Digit1"; + KeyCode2[KeyCode2["Digit2"] = 23] = "Digit2"; + KeyCode2[KeyCode2["Digit3"] = 24] = "Digit3"; + KeyCode2[KeyCode2["Digit4"] = 25] = "Digit4"; + KeyCode2[KeyCode2["Digit5"] = 26] = "Digit5"; + KeyCode2[KeyCode2["Digit6"] = 27] = "Digit6"; + KeyCode2[KeyCode2["Digit7"] = 28] = "Digit7"; + KeyCode2[KeyCode2["Digit8"] = 29] = "Digit8"; + KeyCode2[KeyCode2["Digit9"] = 30] = "Digit9"; + KeyCode2[KeyCode2["KeyA"] = 31] = "KeyA"; + KeyCode2[KeyCode2["KeyB"] = 32] = "KeyB"; + KeyCode2[KeyCode2["KeyC"] = 33] = "KeyC"; + KeyCode2[KeyCode2["KeyD"] = 34] = "KeyD"; + KeyCode2[KeyCode2["KeyE"] = 35] = "KeyE"; + KeyCode2[KeyCode2["KeyF"] = 36] = "KeyF"; + KeyCode2[KeyCode2["KeyG"] = 37] = "KeyG"; + KeyCode2[KeyCode2["KeyH"] = 38] = "KeyH"; + KeyCode2[KeyCode2["KeyI"] = 39] = "KeyI"; + KeyCode2[KeyCode2["KeyJ"] = 40] = "KeyJ"; + KeyCode2[KeyCode2["KeyK"] = 41] = "KeyK"; + KeyCode2[KeyCode2["KeyL"] = 42] = "KeyL"; + KeyCode2[KeyCode2["KeyM"] = 43] = "KeyM"; + KeyCode2[KeyCode2["KeyN"] = 44] = "KeyN"; + KeyCode2[KeyCode2["KeyO"] = 45] = "KeyO"; + KeyCode2[KeyCode2["KeyP"] = 46] = "KeyP"; + KeyCode2[KeyCode2["KeyQ"] = 47] = "KeyQ"; + KeyCode2[KeyCode2["KeyR"] = 48] = "KeyR"; + KeyCode2[KeyCode2["KeyS"] = 49] = "KeyS"; + KeyCode2[KeyCode2["KeyT"] = 50] = "KeyT"; + KeyCode2[KeyCode2["KeyU"] = 51] = "KeyU"; + KeyCode2[KeyCode2["KeyV"] = 52] = "KeyV"; + KeyCode2[KeyCode2["KeyW"] = 53] = "KeyW"; + KeyCode2[KeyCode2["KeyX"] = 54] = "KeyX"; + KeyCode2[KeyCode2["KeyY"] = 55] = "KeyY"; + KeyCode2[KeyCode2["KeyZ"] = 56] = "KeyZ"; + KeyCode2[KeyCode2["Meta"] = 57] = "Meta"; + KeyCode2[KeyCode2["ContextMenu"] = 58] = "ContextMenu"; + KeyCode2[KeyCode2["F1"] = 59] = "F1"; + KeyCode2[KeyCode2["F2"] = 60] = "F2"; + KeyCode2[KeyCode2["F3"] = 61] = "F3"; + KeyCode2[KeyCode2["F4"] = 62] = "F4"; + KeyCode2[KeyCode2["F5"] = 63] = "F5"; + KeyCode2[KeyCode2["F6"] = 64] = "F6"; + KeyCode2[KeyCode2["F7"] = 65] = "F7"; + KeyCode2[KeyCode2["F8"] = 66] = "F8"; + KeyCode2[KeyCode2["F9"] = 67] = "F9"; + KeyCode2[KeyCode2["F10"] = 68] = "F10"; + KeyCode2[KeyCode2["F11"] = 69] = "F11"; + KeyCode2[KeyCode2["F12"] = 70] = "F12"; + KeyCode2[KeyCode2["F13"] = 71] = "F13"; + KeyCode2[KeyCode2["F14"] = 72] = "F14"; + KeyCode2[KeyCode2["F15"] = 73] = "F15"; + KeyCode2[KeyCode2["F16"] = 74] = "F16"; + KeyCode2[KeyCode2["F17"] = 75] = "F17"; + KeyCode2[KeyCode2["F18"] = 76] = "F18"; + KeyCode2[KeyCode2["F19"] = 77] = "F19"; + KeyCode2[KeyCode2["F20"] = 78] = "F20"; + KeyCode2[KeyCode2["F21"] = 79] = "F21"; + KeyCode2[KeyCode2["F22"] = 80] = "F22"; + KeyCode2[KeyCode2["F23"] = 81] = "F23"; + KeyCode2[KeyCode2["F24"] = 82] = "F24"; + KeyCode2[KeyCode2["NumLock"] = 83] = "NumLock"; + KeyCode2[KeyCode2["ScrollLock"] = 84] = "ScrollLock"; + KeyCode2[KeyCode2["Semicolon"] = 85] = "Semicolon"; + KeyCode2[KeyCode2["Equal"] = 86] = "Equal"; + KeyCode2[KeyCode2["Comma"] = 87] = "Comma"; + KeyCode2[KeyCode2["Minus"] = 88] = "Minus"; + KeyCode2[KeyCode2["Period"] = 89] = "Period"; + KeyCode2[KeyCode2["Slash"] = 90] = "Slash"; + KeyCode2[KeyCode2["Backquote"] = 91] = "Backquote"; + KeyCode2[KeyCode2["BracketLeft"] = 92] = "BracketLeft"; + KeyCode2[KeyCode2["Backslash"] = 93] = "Backslash"; + KeyCode2[KeyCode2["BracketRight"] = 94] = "BracketRight"; + KeyCode2[KeyCode2["Quote"] = 95] = "Quote"; + KeyCode2[KeyCode2["OEM_8"] = 96] = "OEM_8"; + KeyCode2[KeyCode2["IntlBackslash"] = 97] = "IntlBackslash"; + KeyCode2[KeyCode2["Numpad0"] = 98] = "Numpad0"; + KeyCode2[KeyCode2["Numpad1"] = 99] = "Numpad1"; + KeyCode2[KeyCode2["Numpad2"] = 100] = "Numpad2"; + KeyCode2[KeyCode2["Numpad3"] = 101] = "Numpad3"; + KeyCode2[KeyCode2["Numpad4"] = 102] = "Numpad4"; + KeyCode2[KeyCode2["Numpad5"] = 103] = "Numpad5"; + KeyCode2[KeyCode2["Numpad6"] = 104] = "Numpad6"; + KeyCode2[KeyCode2["Numpad7"] = 105] = "Numpad7"; + KeyCode2[KeyCode2["Numpad8"] = 106] = "Numpad8"; + KeyCode2[KeyCode2["Numpad9"] = 107] = "Numpad9"; + KeyCode2[KeyCode2["NumpadMultiply"] = 108] = "NumpadMultiply"; + KeyCode2[KeyCode2["NumpadAdd"] = 109] = "NumpadAdd"; + KeyCode2[KeyCode2["NUMPAD_SEPARATOR"] = 110] = "NUMPAD_SEPARATOR"; + KeyCode2[KeyCode2["NumpadSubtract"] = 111] = "NumpadSubtract"; + KeyCode2[KeyCode2["NumpadDecimal"] = 112] = "NumpadDecimal"; + KeyCode2[KeyCode2["NumpadDivide"] = 113] = "NumpadDivide"; + KeyCode2[KeyCode2["KEY_IN_COMPOSITION"] = 114] = "KEY_IN_COMPOSITION"; + KeyCode2[KeyCode2["ABNT_C1"] = 115] = "ABNT_C1"; + KeyCode2[KeyCode2["ABNT_C2"] = 116] = "ABNT_C2"; + KeyCode2[KeyCode2["AudioVolumeMute"] = 117] = "AudioVolumeMute"; + KeyCode2[KeyCode2["AudioVolumeUp"] = 118] = "AudioVolumeUp"; + KeyCode2[KeyCode2["AudioVolumeDown"] = 119] = "AudioVolumeDown"; + KeyCode2[KeyCode2["BrowserSearch"] = 120] = "BrowserSearch"; + KeyCode2[KeyCode2["BrowserHome"] = 121] = "BrowserHome"; + KeyCode2[KeyCode2["BrowserBack"] = 122] = "BrowserBack"; + KeyCode2[KeyCode2["BrowserForward"] = 123] = "BrowserForward"; + KeyCode2[KeyCode2["MediaTrackNext"] = 124] = "MediaTrackNext"; + KeyCode2[KeyCode2["MediaTrackPrevious"] = 125] = "MediaTrackPrevious"; + KeyCode2[KeyCode2["MediaStop"] = 126] = "MediaStop"; + KeyCode2[KeyCode2["MediaPlayPause"] = 127] = "MediaPlayPause"; + KeyCode2[KeyCode2["LaunchMediaPlayer"] = 128] = "LaunchMediaPlayer"; + KeyCode2[KeyCode2["LaunchMail"] = 129] = "LaunchMail"; + KeyCode2[KeyCode2["LaunchApp2"] = 130] = "LaunchApp2"; + KeyCode2[KeyCode2["Clear"] = 131] = "Clear"; + KeyCode2[KeyCode2["MAX_VALUE"] = 132] = "MAX_VALUE"; + })(KeyCode || (KeyCode = {})); + var MarkerSeverity; + (function(MarkerSeverity2) { + MarkerSeverity2[MarkerSeverity2["Hint"] = 1] = "Hint"; + MarkerSeverity2[MarkerSeverity2["Info"] = 2] = "Info"; + MarkerSeverity2[MarkerSeverity2["Warning"] = 4] = "Warning"; + MarkerSeverity2[MarkerSeverity2["Error"] = 8] = "Error"; + })(MarkerSeverity || (MarkerSeverity = {})); + var MarkerTag; + (function(MarkerTag2) { + MarkerTag2[MarkerTag2["Unnecessary"] = 1] = "Unnecessary"; + MarkerTag2[MarkerTag2["Deprecated"] = 2] = "Deprecated"; + })(MarkerTag || (MarkerTag = {})); + var MinimapPosition; + (function(MinimapPosition3) { + MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; + MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; + })(MinimapPosition || (MinimapPosition = {})); + var MouseTargetType; + (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 = {})); + var OverlayWidgetPositionPreference; + (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 = {})); + var OverviewRulerLane; + (function(OverviewRulerLane3) { + OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; + OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; + OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; + OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; + })(OverviewRulerLane || (OverviewRulerLane = {})); + var PositionAffinity; + (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 = {})); + var RenderLineNumbersType; + (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 = {})); + var RenderMinimap; + (function(RenderMinimap2) { + RenderMinimap2[RenderMinimap2["None"] = 0] = "None"; + RenderMinimap2[RenderMinimap2["Text"] = 1] = "Text"; + RenderMinimap2[RenderMinimap2["Blocks"] = 2] = "Blocks"; + })(RenderMinimap || (RenderMinimap = {})); + var ScrollType; + (function(ScrollType2) { + ScrollType2[ScrollType2["Smooth"] = 0] = "Smooth"; + ScrollType2[ScrollType2["Immediate"] = 1] = "Immediate"; + })(ScrollType || (ScrollType = {})); + var ScrollbarVisibility; + (function(ScrollbarVisibility2) { + ScrollbarVisibility2[ScrollbarVisibility2["Auto"] = 1] = "Auto"; + ScrollbarVisibility2[ScrollbarVisibility2["Hidden"] = 2] = "Hidden"; + ScrollbarVisibility2[ScrollbarVisibility2["Visible"] = 3] = "Visible"; + })(ScrollbarVisibility || (ScrollbarVisibility = {})); + var SelectionDirection; + (function(SelectionDirection2) { + SelectionDirection2[SelectionDirection2["LTR"] = 0] = "LTR"; + SelectionDirection2[SelectionDirection2["RTL"] = 1] = "RTL"; + })(SelectionDirection || (SelectionDirection = {})); + var SignatureHelpTriggerKind2; + (function(SignatureHelpTriggerKind3) { + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; + SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; + })(SignatureHelpTriggerKind2 || (SignatureHelpTriggerKind2 = {})); + var SymbolKind; + (function(SymbolKind3) { + SymbolKind3[SymbolKind3["File"] = 0] = "File"; + SymbolKind3[SymbolKind3["Module"] = 1] = "Module"; + SymbolKind3[SymbolKind3["Namespace"] = 2] = "Namespace"; + SymbolKind3[SymbolKind3["Package"] = 3] = "Package"; + SymbolKind3[SymbolKind3["Class"] = 4] = "Class"; + SymbolKind3[SymbolKind3["Method"] = 5] = "Method"; + SymbolKind3[SymbolKind3["Property"] = 6] = "Property"; + SymbolKind3[SymbolKind3["Field"] = 7] = "Field"; + SymbolKind3[SymbolKind3["Constructor"] = 8] = "Constructor"; + SymbolKind3[SymbolKind3["Enum"] = 9] = "Enum"; + SymbolKind3[SymbolKind3["Interface"] = 10] = "Interface"; + SymbolKind3[SymbolKind3["Function"] = 11] = "Function"; + SymbolKind3[SymbolKind3["Variable"] = 12] = "Variable"; + SymbolKind3[SymbolKind3["Constant"] = 13] = "Constant"; + SymbolKind3[SymbolKind3["String"] = 14] = "String"; + SymbolKind3[SymbolKind3["Number"] = 15] = "Number"; + SymbolKind3[SymbolKind3["Boolean"] = 16] = "Boolean"; + SymbolKind3[SymbolKind3["Array"] = 17] = "Array"; + SymbolKind3[SymbolKind3["Object"] = 18] = "Object"; + SymbolKind3[SymbolKind3["Key"] = 19] = "Key"; + SymbolKind3[SymbolKind3["Null"] = 20] = "Null"; + SymbolKind3[SymbolKind3["EnumMember"] = 21] = "EnumMember"; + SymbolKind3[SymbolKind3["Struct"] = 22] = "Struct"; + SymbolKind3[SymbolKind3["Event"] = 23] = "Event"; + SymbolKind3[SymbolKind3["Operator"] = 24] = "Operator"; + SymbolKind3[SymbolKind3["TypeParameter"] = 25] = "TypeParameter"; + })(SymbolKind || (SymbolKind = {})); + var SymbolTag; + (function(SymbolTag3) { + SymbolTag3[SymbolTag3["Deprecated"] = 1] = "Deprecated"; + })(SymbolTag || (SymbolTag = {})); + var TextEditorCursorBlinkingStyle; + (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 = {})); + var TextEditorCursorStyle; + (function(TextEditorCursorStyle2) { + TextEditorCursorStyle2[TextEditorCursorStyle2["Line"] = 1] = "Line"; + TextEditorCursorStyle2[TextEditorCursorStyle2["Block"] = 2] = "Block"; + TextEditorCursorStyle2[TextEditorCursorStyle2["Underline"] = 3] = "Underline"; + TextEditorCursorStyle2[TextEditorCursorStyle2["LineThin"] = 4] = "LineThin"; + TextEditorCursorStyle2[TextEditorCursorStyle2["BlockOutline"] = 5] = "BlockOutline"; + TextEditorCursorStyle2[TextEditorCursorStyle2["UnderlineThin"] = 6] = "UnderlineThin"; + })(TextEditorCursorStyle || (TextEditorCursorStyle = {})); + var TrackedRangeStickiness; + (function(TrackedRangeStickiness2) { + TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges"; + TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges"; + TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore"; + TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter"; + })(TrackedRangeStickiness || (TrackedRangeStickiness = {})); + var WrappingIndent; + (function(WrappingIndent2) { + WrappingIndent2[WrappingIndent2["None"] = 0] = "None"; + WrappingIndent2[WrappingIndent2["Same"] = 1] = "Same"; + WrappingIndent2[WrappingIndent2["Indent"] = 2] = "Indent"; + WrappingIndent2[WrappingIndent2["DeepIndent"] = 3] = "DeepIndent"; + })(WrappingIndent || (WrappingIndent = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js + var KeyMod = class { + static chord(firstPart, secondPart) { + return KeyChord(firstPart, secondPart); + } + }; + KeyMod.CtrlCmd = 2048; + KeyMod.Shift = 1024; + KeyMod.Alt = 512; + KeyMod.WinCtrl = 256; + function createMonacoBaseAPI() { + return { + editor: void 0, + languages: void 0, + CancellationTokenSource, + Emitter, + KeyCode, + KeyMod, + Position, + Range, + Selection, + SelectionDirection, + MarkerSeverity, + MarkerTag, + Uri: URI, + Token + }; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js + var WordCharacterClassifier = class extends CharacterClassifier { + constructor(wordSeparators) { + super( + 0 + /* WordCharacterClass.Regular */ + ); + for (let i = 0, len = wordSeparators.length; i < len; i++) { + this.set( + wordSeparators.charCodeAt(i), + 2 + /* WordCharacterClass.WordSeparator */ + ); + } + this.set( + 32, + 1 + /* WordCharacterClass.Whitespace */ + ); + this.set( + 9, + 1 + /* WordCharacterClass.Whitespace */ + ); + } + }; + function once2(computeFn) { + const cache = {}; + return (input) => { + if (!cache.hasOwnProperty(input)) { + cache[input] = computeFn(input); + } + return cache[input]; + }; + } + var getMapForWordSeparators = once2((input) => new WordCharacterClassifier(input)); + + // node_modules/monaco-editor/esm/vs/editor/common/model.js + var OverviewRulerLane2; + (function(OverviewRulerLane3) { + OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; + OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; + OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; + OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; + })(OverviewRulerLane2 || (OverviewRulerLane2 = {})); + var GlyphMarginLane2; + (function(GlyphMarginLane3) { + GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; + GlyphMarginLane3[GlyphMarginLane3["Right"] = 2] = "Right"; + })(GlyphMarginLane2 || (GlyphMarginLane2 = {})); + var MinimapPosition2; + (function(MinimapPosition3) { + MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; + MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; + })(MinimapPosition2 || (MinimapPosition2 = {})); + var InjectedTextCursorStops2; + (function(InjectedTextCursorStops3) { + InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; + InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; + InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; + })(InjectedTextCursorStops2 || (InjectedTextCursorStops2 = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js + function leftIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + if (matchStartIndex === 0) { + return true; + } + const charBefore = text3.charCodeAt(matchStartIndex - 1); + if (wordSeparators.get(charBefore) !== 0) { + return true; + } + if (charBefore === 13 || charBefore === 10) { + return true; + } + if (matchLength > 0) { + const firstCharInMatch = text3.charCodeAt(matchStartIndex); + if (wordSeparators.get(firstCharInMatch) !== 0) { + return true; + } + } + return false; + } + function rightIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + if (matchStartIndex + matchLength === textLength) { + return true; + } + const charAfter = text3.charCodeAt(matchStartIndex + matchLength); + if (wordSeparators.get(charAfter) !== 0) { + return true; + } + if (charAfter === 13 || charAfter === 10) { + return true; + } + if (matchLength > 0) { + const lastCharInMatch = text3.charCodeAt(matchStartIndex + matchLength - 1); + if (wordSeparators.get(lastCharInMatch) !== 0) { + return true; + } + } + return false; + } + function isValidMatch(wordSeparators, text3, textLength, matchStartIndex, matchLength) { + return leftIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength) && rightIsWordBounday(wordSeparators, text3, textLength, matchStartIndex, matchLength); + } + var Searcher = class { + constructor(wordSeparators, searchRegex) { + this._wordSeparators = wordSeparators; + this._searchRegex = searchRegex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + reset(lastIndex) { + this._searchRegex.lastIndex = lastIndex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + next(text3) { + const textLength = text3.length; + let m; + do { + if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { + return null; + } + m = this._searchRegex.exec(text3); + 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(text3, 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, text3, textLength, matchStartIndex, matchLength)) { + return m; + } + } while (m); + return null; + } + }; + + // node_modules/monaco-editor/esm/vs/base/common/assert.js + 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 < items.length - 1) { + const a = items[i]; + const b = items[i + 1]; + if (!predicate(a, b)) { + return false; + } + i++; + } + return true; + } + + // node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js + var UnicodeTextModelHighlighter = class { + static computeUnicodeHighlights(model, options, range) { + const startLine = range ? range.startLineNumber : 1; + const endLine = range ? range.endLineNumber : model.getLineCount(); + const codePointHighlighter = new CodePointHighlighter(options); + 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 < lineLength) { + const charCodeBefore = lineContent.charCodeAt(endIndex - 1); + if (isHighSurrogate(charCodeBefore)) { + endIndex++; + } + } + const str = lineContent.substring(startIndex, endIndex); + let word2 = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0); + if (word2 && word2.endColumn <= startIndex + 1) { + word2 = null; + } + const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word2 ? word2.word : null); + if (highlightReason !== 0) { + if (highlightReason === 3) { + ambiguousCharacterCount++; + } else if (highlightReason === 2) { + invisibleCharacterCount++; + } else if (highlightReason === 1) { + nonBasicAsciiCharacterCount++; + } else { + assertNever(highlightReason); + } + const MAX_RESULT_LENGTH = 1e3; + if (ranges.length >= MAX_RESULT_LENGTH) { + hasMore = true; + break forLoop; + } + ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1)); + } + } + } while (m); + } + return { + ranges, + hasMore, + ambiguousCharacterCount, + invisibleCharacterCount, + nonBasicAsciiCharacterCount + }; + } + static computeUnicodeHighlightReason(char, options) { + const codePointHighlighter = new CodePointHighlighter(options); + const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null); + switch (reason) { + case 0: + return null; + case 2: + return { + kind: 1 + /* UnicodeHighlighterReasonKind.Invisible */ + }; + case 3: { + const codePoint = char.codePointAt(0); + const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint); + const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(/* @__PURE__ */ new Set([...options.allowedLocales, l])).isAmbiguous(codePoint)); + return { kind: 0, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales }; + } + case 1: + return { + kind: 2 + /* UnicodeHighlighterReasonKind.NonBasicAscii */ + }; + } + } + }; + function buildRegExpCharClassExpr(codePoints, flags) { + const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(""))}]`; + return src; + } + var CodePointHighlighter = class { + constructor(options) { + this.options = options; + this.allowedCodePoints = new Set(options.allowedCodePoints); + this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales)); + } + getCandidateCodePoints() { + if (this.options.nonBasicASCII) { + return "allNonBasicAscii"; + } + const set = /* @__PURE__ */ 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 ( + /* Don't allow mixing weird looking characters with ASCII */ + !hasBasicASCIICharacters && /* Is there an obviously weird looking character? */ + 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; + } + }; + function isAllowedInvisibleCharacter(character) { + return character === " " || character === "\n" || character === " "; + } + + // node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js + var OffsetRange = class _OffsetRange { + static addRange(range, sortedRanges) { + let i = 0; + while (i < sortedRanges.length && sortedRanges[i].endExclusive < range.start) { + i++; + } + let j = i; + while (j < sortedRanges.length && sortedRanges[j].start <= range.endExclusive) { + j++; + } + if (i === j) { + sortedRanges.splice(i, 0, range); + } else { + const start = Math.min(range.start, sortedRanges[i].start); + const end = Math.max(range.endExclusive, sortedRanges[j - 1].endExclusive); + sortedRanges.splice(i, j - i, new _OffsetRange(start, end)); + } + } + static tryCreate(start, endExclusive) { + if (start > endExclusive) { + return void 0; + } + return new _OffsetRange(start, endExclusive); + } + static ofLength(length) { + return new _OffsetRange(0, length); + } + 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; + } + /** + * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n) + * The joined range is the smallest range that contains both ranges. + */ + join(other) { + return new _OffsetRange(Math.min(this.start, other.start), Math.max(this.endExclusive, other.endExclusive)); + } + /** + * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n) + * + * The resulting range is empty if the ranges do not intersect, but touch. + * If the ranges don't even touch, the result is undefined. + */ + intersect(other) { + const start = Math.max(this.start, other.start); + const end = Math.min(this.endExclusive, other.endExclusive); + if (start <= end) { + return new _OffsetRange(start, end); + } + return void 0; + } + slice(arr) { + return arr.slice(this.start, this.endExclusive); + } + /** + * Returns the given value if it is contained in this instance, otherwise the closest value that is contained. + * The range must not be empty. + */ + clip(value) { + if (this.isEmpty) { + throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); + } + return Math.max(this.start, Math.min(this.endExclusive - 1, value)); + } + /** + * Returns `r := value + k * length` such that `r` is contained in this range. + * The range must not be empty. + * + * E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`. + */ + clipCyclic(value) { + if (this.isEmpty) { + throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); + } + if (value < this.start) { + return this.endExclusive - (this.start - value) % this.length; + } + if (value >= this.endExclusive) { + return this.start + (value - this.start) % this.length; + } + return value; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js + var LineRange = class _LineRange { + static fromRange(range) { + return new _LineRange(range.startLineNumber, range.endLineNumber); + } + static subtract(a, b) { + if (!b) { + return [a]; + } + if (a.startLineNumber < b.startLineNumber && b.endLineNumberExclusive < a.endLineNumberExclusive) { + return [ + new _LineRange(a.startLineNumber, b.startLineNumber), + new _LineRange(b.endLineNumberExclusive, a.endLineNumberExclusive) + ]; + } else if (b.startLineNumber <= a.startLineNumber && a.endLineNumberExclusive <= b.endLineNumberExclusive) { + return []; + } else if (b.endLineNumberExclusive < a.endLineNumberExclusive) { + return [new _LineRange(Math.max(b.endLineNumberExclusive, a.startLineNumber), a.endLineNumberExclusive)]; + } else { + return [new _LineRange(a.startLineNumber, Math.min(b.startLineNumber, a.endLineNumberExclusive))]; + } + } + /** + * @param lineRanges An array of sorted line ranges. + */ + static joinMany(lineRanges) { + if (lineRanges.length === 0) { + return []; + } + let result = lineRanges[0]; + for (let i = 1; i < lineRanges.length; i++) { + result = this.join(result, lineRanges[i]); + } + return result; + } + /** + * @param lineRanges1 Must be sorted. + * @param lineRanges2 Must be sorted. + */ + static join(lineRanges1, lineRanges2) { + if (lineRanges1.length === 0) { + return lineRanges2; + } + if (lineRanges2.length === 0) { + return lineRanges1; + } + const result = []; + let i1 = 0; + let i2 = 0; + let current = null; + while (i1 < lineRanges1.length || i2 < lineRanges2.length) { + let next = null; + if (i1 < lineRanges1.length && i2 < lineRanges2.length) { + const lineRange1 = lineRanges1[i1]; + const lineRange2 = lineRanges2[i2]; + if (lineRange1.startLineNumber < lineRange2.startLineNumber) { + next = lineRange1; + i1++; + } else { + next = lineRange2; + i2++; + } + } else if (i1 < lineRanges1.length) { + next = lineRanges1[i1]; + i1++; + } else { + next = lineRanges2[i2]; + i2++; + } + if (current === null) { + current = next; + } else { + if (current.endLineNumberExclusive >= 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, length) { + return new _LineRange(startLineNumber, startLineNumber + length); + } + /** + * @internal + */ + 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; + } + /** + * Indicates if this line range contains the given line number. + */ + contains(lineNumber) { + return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; + } + /** + * Indicates if this line range is empty. + */ + get isEmpty() { + return this.startLineNumber === this.endLineNumberExclusive; + } + /** + * Moves this line range by the given offset of line numbers. + */ + delta(offset) { + return new _LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset); + } + deltaLength(offset) { + return new _LineRange(this.startLineNumber, this.endLineNumberExclusive + offset); + } + /** + * The number of lines this line range spans. + */ + get length() { + return this.endLineNumberExclusive - this.startLineNumber; + } + /** + * Creates a line range that combines this and the given line range. + */ + join(other) { + return new _LineRange(Math.min(this.startLineNumber, other.startLineNumber), Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive)); + } + toString() { + return `[${this.startLineNumber},${this.endLineNumberExclusive})`; + } + /** + * The resulting range is empty if the ranges do not intersect, but touch. + * If the ranges don't even touch, the result is undefined. + */ + intersect(other) { + const startLineNumber = Math.max(this.startLineNumber, other.startLineNumber); + const endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive); + if (startLineNumber <= endLineNumberExclusive) { + return new _LineRange(startLineNumber, endLineNumberExclusive); + } + return void 0; + } + intersectsStrict(other) { + return this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive; + } + overlapOrTouch(other) { + return this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive; + } + equals(b) { + return this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive; + } + toInclusiveRange() { + if (this.isEmpty) { + return null; + } + return new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER); + } + toExclusiveRange() { + return new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1); + } + mapToLineArray(f) { + const result = []; + for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { + result.push(f(lineNumber)); + } + return result; + } + forEach(f) { + for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { + f(lineNumber); + } + } + /** + * @internal + */ + serialize() { + return [this.startLineNumber, this.endLineNumberExclusive]; + } + includes(lineNumber) { + return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; + } + /** + * Converts this 1-based line range to a 0-based offset range (subtracts 1!). + * @internal + */ + toOffsetRange() { + return new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputer.js + var LinesDiff = class { + constructor(changes, moves, hitTimeout) { + this.changes = changes; + this.moves = moves; + this.hitTimeout = hitTimeout; + } + }; + var LineRangeMapping = class _LineRangeMapping { + static inverse(mapping, originalLineCount, modifiedLineCount) { + const result = []; + let lastOriginalEndLineNumber = 1; + let lastModifiedEndLineNumber = 1; + for (const m of mapping) { + const r2 = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, m.originalRange.startLineNumber), new LineRange(lastModifiedEndLineNumber, m.modifiedRange.startLineNumber), void 0); + if (!r2.modifiedRange.isEmpty) { + result.push(r2); + } + lastOriginalEndLineNumber = m.originalRange.endLineNumberExclusive; + lastModifiedEndLineNumber = m.modifiedRange.endLineNumberExclusive; + } + const r = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, originalLineCount + 1), new LineRange(lastModifiedEndLineNumber, modifiedLineCount + 1), void 0); + if (!r.modifiedRange.isEmpty) { + result.push(r); + } + return result; + } + constructor(originalRange, modifiedRange, innerChanges) { + this.originalRange = originalRange; + this.modifiedRange = modifiedRange; + this.innerChanges = innerChanges; + } + toString() { + return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + } + get changedLineCount() { + return Math.max(this.originalRange.length, this.modifiedRange.length); + } + flip() { + var _a3; + return new _LineRangeMapping(this.modifiedRange, this.originalRange, (_a3 = this.innerChanges) === null || _a3 === void 0 ? void 0 : _a3.map((c) => c.flip())); + } + }; + var RangeMapping = class _RangeMapping { + 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); + } + }; + var SimpleLineRangeMapping = class _SimpleLineRangeMapping { + 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)); + } + }; + var MovedText = class _MovedText { + constructor(lineRangeMapping, changes) { + this.lineRangeMapping = lineRangeMapping; + this.changes = changes; + } + flip() { + return new _MovedText(this.lineRangeMapping.flip(), this.changes.map((c) => c.flip())); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/legacyLinesDiffComputer.js + var MINIMUM_MATCHING_CHARACTER_LENGTH = 3; + var LegacyLinesDiffComputer = class { + computeDiff(originalLines, modifiedLines, options) { + var _a3; + const diffComputer = new DiffComputer(originalLines, modifiedLines, { + maxComputationTime: options.maxComputationTimeMs, + shouldIgnoreTrimWhitespace: options.ignoreTrimWhitespace, + shouldComputeCharChanges: true, + shouldMakePrettyDiff: true, + shouldPostProcessCharChanges: true + }); + const result = diffComputer.computeDiff(); + const changes = []; + let lastChange = null; + for (const c of result.changes) { + let originalRange; + if (c.originalEndLineNumber === 0) { + originalRange = new LineRange(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1); + } else { + originalRange = new LineRange(c.originalStartLineNumber, c.originalEndLineNumber + 1); + } + let modifiedRange; + if (c.modifiedEndLineNumber === 0) { + modifiedRange = new LineRange(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1); + } else { + modifiedRange = new LineRange(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); + } + let change = new LineRangeMapping(originalRange, modifiedRange, (_a3 = c.charChanges) === null || _a3 === void 0 ? void 0 : _a3.map((c2) => new 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(() => { + return checkAdjacentItems(changes, (m1, m2) => m2.originalRange.startLineNumber - m1.originalRange.endLineNumberExclusive === m2.modifiedRange.startLineNumber - m1.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber); + }); + return new LinesDiff(changes, [], result.quitEarly); + } + }; + function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) { + const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate); + return diffAlgo.ComputeDiff(pretty); + } + var LineSequence = class { + constructor(lines) { + const startColumns = []; + const endColumns = []; + for (let i = 0, length = lines.length; i < length; i++) { + startColumns[i] = getFirstNonBlankColumn(lines[i], 1); + endColumns[i] = getLastNonBlankColumn(lines[i], 1); + } + this.lines = lines; + this._startColumns = startColumns; + this._endColumns = endColumns; + } + getElements() { + const elements = []; + for (let i = 0, len = this.lines.length; i < len; i++) { + elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1); + } + return elements; + } + getStrictElement(index) { + return this.lines[index]; + } + getStartLineNumber(i) { + return i + 1; + } + getEndLineNumber(i) { + return i + 1; + } + createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) { + const charCodes = []; + const lineNumbers = []; + const columns = []; + let len = 0; + for (let index = startIndex; index <= endIndex; index++) { + const lineContent = this.lines[index]; + const startColumn = shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1; + const endColumn = shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1; + for (let col = startColumn; col < endColumn; col++) { + charCodes[len] = lineContent.charCodeAt(col - 1); + lineNumbers[len] = index + 1; + columns[len] = col; + len++; + } + if (!shouldIgnoreTrimWhitespace && index < endIndex) { + charCodes[len] = 10; + lineNumbers[len] = index + 1; + columns[len] = lineContent.length + 1; + len++; + } + } + return new CharSequence(charCodes, lineNumbers, columns); + } + }; + var CharSequence = class { + constructor(charCodes, lineNumbers, columns) { + this._charCodes = charCodes; + this._lineNumbers = lineNumbers; + this._columns = columns; + } + toString() { + return "[" + this._charCodes.map((s, idx) => (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; + } + }; + var CharChange = class _CharChange { + 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); + } + }; + function postProcessCharChanges(rawChanges) { + if (rawChanges.length <= 1) { + return rawChanges; + } + const result = [rawChanges[0]]; + let prevChange = result[0]; + for (let i = 1, len = rawChanges.length; i < len; i++) { + const currChange = rawChanges[i]; + const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength); + const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength); + const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength); + if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) { + prevChange.originalLength = currChange.originalStart + currChange.originalLength - prevChange.originalStart; + prevChange.modifiedLength = currChange.modifiedStart + currChange.modifiedLength - prevChange.modifiedStart; + } else { + result.push(currChange); + prevChange = currChange; + } + } + return result; + } + var LineChange = class _LineChange { + 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, length = rawChanges.length; i < length; i++) { + charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence)); + } + } + } + return new _LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges); + } + }; + var DiffComputer = class { + constructor(originalLines, modifiedLines, opts) { + this.shouldComputeCharChanges = opts.shouldComputeCharChanges; + this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges; + this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace; + this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff; + this.originalLines = originalLines; + this.modifiedLines = modifiedLines; + this.original = new LineSequence(originalLines); + this.modified = new LineSequence(modifiedLines); + this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime); + this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5e3)); + } + computeDiff() { + if (this.original.lines.length === 1 && this.original.lines[0].length === 0) { + if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { + return { + quitEarly: false, + changes: [] + }; + } + return { + quitEarly: false, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: 1, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: this.modified.lines.length, + charChanges: void 0 + }] + }; + } + if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { + return { + quitEarly: false, + changes: [{ + originalStartLineNumber: 1, + originalEndLineNumber: this.original.lines.length, + modifiedStartLineNumber: 1, + modifiedEndLineNumber: 1, + charChanges: void 0 + }] + }; + } + const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff); + const rawChanges = diffResult.changes; + const quitEarly = diffResult.quitEarly; + if (this.shouldIgnoreTrimWhitespace) { + const lineChanges = []; + for (let i = 0, length = rawChanges.length; i < length; i++) { + lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); + } + return { + quitEarly, + changes: lineChanges + }; + } + const result = []; + let originalLineIndex = 0; + let modifiedLineIndex = 0; + for (let i = -1, len = rawChanges.length; i < len; i++) { + const nextChange = i + 1 < len ? rawChanges[i + 1] : null; + const originalStop = nextChange ? nextChange.originalStart : this.originalLines.length; + const modifiedStop = nextChange ? nextChange.modifiedStart : this.modifiedLines.length; + while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) { + const originalLine = this.originalLines[originalLineIndex]; + const modifiedLine = this.modifiedLines[modifiedLineIndex]; + if (originalLine !== modifiedLine) { + { + let originalStartColumn = getFirstNonBlankColumn(originalLine, 1); + let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1); + while (originalStartColumn > 1 && 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 < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) { + const originalChar = originalLine.charCodeAt(originalEndColumn - 1); + const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1); + if (originalChar !== modifiedChar) { + break; + } + originalEndColumn++; + modifiedEndColumn++; + } + if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) { + this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn); + } + } + } + originalLineIndex++; + modifiedLineIndex++; + } + if (nextChange) { + result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); + originalLineIndex += nextChange.originalLength; + modifiedLineIndex += nextChange.modifiedLength; + } + } + return { + quitEarly, + changes: result + }; + } + _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { + if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) { + return; + } + let charChanges = void 0; + if (this.shouldComputeCharChanges) { + charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)]; + } + result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges)); + } + _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { + const len = result.length; + if (len === 0) { + return false; + } + const prevChange = result[len - 1]; + if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) { + return false; + } + if (prevChange.originalEndLineNumber === originalLineNumber && prevChange.modifiedEndLineNumber === modifiedLineNumber) { + if (this.shouldComputeCharChanges && prevChange.charChanges) { + prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); + } + return true; + } + if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) { + prevChange.originalEndLineNumber = originalLineNumber; + prevChange.modifiedEndLineNumber = modifiedLineNumber; + if (this.shouldComputeCharChanges && prevChange.charChanges) { + prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); + } + return true; + } + return false; + } + }; + function getFirstNonBlankColumn(txt, defaultValue) { + const r = firstNonWhitespaceIndex(txt); + if (r === -1) { + return defaultValue; + } + return r + 1; + } + function getLastNonBlankColumn(txt, defaultValue) { + const r = lastNonWhitespaceIndex(txt); + if (r === -1) { + return defaultValue; + } + return r + 2; + } + function createContinueProcessingPredicate(maximumRuntime) { + if (maximumRuntime === 0) { + return () => true; + } + const startTime = Date.now(); + return () => { + return Date.now() - startTime < maximumRuntime; + }; + } + + // node_modules/monaco-editor/esm/vs/base/common/collections.js + var SetMap = class { + constructor() { + this.map = /* @__PURE__ */ new Map(); + } + add(key, value) { + let values = this.map.get(key); + if (!values) { + values = /* @__PURE__ */ new Set(); + this.map.set(key, values); + } + values.add(value); + } + delete(key, value) { + const values = this.map.get(key); + if (!values) { + return; + } + values.delete(value); + if (values.size === 0) { + this.map.delete(key); + } + } + forEach(key, fn) { + const values = this.map.get(key); + if (!values) { + return; + } + values.forEach(fn); + } + get(key) { + const values = this.map.get(key); + if (!values) { + return /* @__PURE__ */ new Set(); + } + return values; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/diffAlgorithm.js + var DiffAlgorithmResult = class _DiffAlgorithmResult { + static trivial(seq1, seq2) { + return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], false); + } + static trivialTimedOut(seq1, seq2) { + return new _DiffAlgorithmResult([new SequenceDiff(new OffsetRange(0, seq1.length), new OffsetRange(0, seq2.length))], true); + } + constructor(diffs, hitTimeout) { + this.diffs = diffs; + this.hitTimeout = hitTimeout; + } + }; + var SequenceDiff = class _SequenceDiff { + constructor(seq1Range, seq2Range) { + this.seq1Range = seq1Range; + this.seq2Range = seq2Range; + } + reverse() { + return new _SequenceDiff(this.seq2Range, this.seq1Range); + } + toString() { + return `${this.seq1Range} <-> ${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)); + } + }; + var InfiniteTimeout = class { + isValid() { + return true; + } + }; + InfiniteTimeout.instance = new InfiniteTimeout(); + var DateTimeout = class { + constructor(timeout) { + this.timeout = timeout; + this.startTime = Date.now(); + this.valid = true; + if (timeout <= 0) { + throw new BugIndicatingError("timeout must be positive"); + } + } + // Recommendation: Set a log-point `{this.disable()}` in the body + isValid() { + const valid = Date.now() - this.startTime < this.timeout; + if (!valid && this.valid) { + this.valid = false; + debugger; + } + return this.valid; + } + disable() { + this.timeout = Number.MAX_SAFE_INTEGER; + this.isValid = () => true; + this.valid = true; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/utils.js + var Array2D = class { + constructor(width, height) { + this.width = width; + this.height = height; + this.array = []; + this.array = new Array(width * height); + } + get(x, y) { + return this.array[x + y * this.width]; + } + set(x, y, value) { + this.array[x + y * this.width] = value; + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/dynamicProgrammingDiffing.js + var DynamicProgrammingDiffing = class { + compute(sequence1, sequence2, timeout = InfiniteTimeout.instance, equalityScore) { + if (sequence1.length === 0 || sequence2.length === 0) { + return DiffAlgorithmResult.trivial(sequence1, sequence2); + } + const lcsLengths = new Array2D(sequence1.length, sequence2.length); + const directions = new Array2D(sequence1.length, sequence2.length); + const lengths = new Array2D(sequence1.length, sequence2.length); + for (let s12 = 0; s12 < sequence1.length; s12++) { + for (let s22 = 0; s22 < sequence2.length; s22++) { + if (!timeout.isValid()) { + return DiffAlgorithmResult.trivialTimedOut(sequence1, sequence2); + } + const horizontalLen = s12 === 0 ? 0 : lcsLengths.get(s12 - 1, s22); + const verticalLen = s22 === 0 ? 0 : lcsLengths.get(s12, s22 - 1); + let extendedSeqScore; + if (sequence1.getElement(s12) === sequence2.getElement(s22)) { + if (s12 === 0 || s22 === 0) { + extendedSeqScore = 0; + } else { + extendedSeqScore = lcsLengths.get(s12 - 1, s22 - 1); + } + if (s12 > 0 && 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); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/joinSequenceDiffs.js + 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; i < diffs.length; i++) { + let shouldJoinDiffs = function(before, after) { + const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); + const unchangedText = sequence1.getText(unchangedRange); + const unchangedTextWithoutWs = unchangedText.replace(/\s/g, ""); + if (unchangedTextWithoutWs.length <= 4 && (before.seq1Range.length + before.seq2Range.length > 5 || 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; i < diffs.length; i++) { + let shouldJoinDiffs = function(before, after) { + const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); + const unchangedLineCount = sequence1.countLinesIn(unchangedRange); + if (unchangedLineCount > 5 || 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; i < diffs.length; i++) { + const cur = diffs[i]; + let range1 = cur.seq1Range; + let range2 = cur.seq2Range; + const fullRange1 = sequence1.extendToFullLines(cur.seq1Range); + const prefix = sequence1.getText(new OffsetRange(fullRange1.start, cur.seq1Range.start)); + if (prefix.length > 0 && 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; i < sequenceDiffs.length; i++) { + const prevResult = result[result.length - 1]; + let cur = sequenceDiffs[i]; + if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { + const length = cur.seq1Range.start - prevResult.seq1Range.endExclusive; + let d; + for (d = 1; d <= length; d++) { + if (sequence1.getElement(cur.seq1Range.start - d) !== sequence1.getElement(cur.seq1Range.endExclusive - d) || sequence2.getElement(cur.seq2Range.start - d) !== sequence2.getElement(cur.seq2Range.endExclusive - d)) { + break; + } + } + d--; + if (d === length) { + result[result.length - 1] = new SequenceDiff(new OffsetRange(prevResult.seq1Range.start, cur.seq1Range.endExclusive - length), new OffsetRange(prevResult.seq2Range.start, cur.seq2Range.endExclusive - length)); + continue; + } + cur = cur.delta(-d); + } + result.push(cur); + } + const result2 = []; + for (let i = 0; i < result.length - 1; i++) { + const nextResult = result[i + 1]; + let cur = result[i]; + if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { + const length = nextResult.seq1Range.start - cur.seq1Range.endExclusive; + let d; + for (d = 0; d < length; d++) { + if (sequence1.getElement(cur.seq1Range.start + d) !== sequence1.getElement(cur.seq1Range.endExclusive + d) || sequence2.getElement(cur.seq2Range.start + d) !== sequence2.getElement(cur.seq2Range.endExclusive + d)) { + break; + } + } + if (d === length) { + result[i + 1] = new SequenceDiff(new OffsetRange(cur.seq1Range.start + length, nextResult.seq1Range.endExclusive), new OffsetRange(cur.seq2Range.start + length, nextResult.seq2Range.endExclusive)); + continue; + } + if (d > 0) { + 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; i < sequenceDiffs.length; i++) { + const prevDiff = i > 0 ? sequenceDiffs[i - 1] : void 0; + const diff = sequenceDiffs[i]; + const nextDiff = i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1] : void 0; + const seq1ValidRange = new OffsetRange(prevDiff ? prevDiff.seq1Range.start + 1 : 0, nextDiff ? nextDiff.seq1Range.endExclusive - 1 : sequence1.length); + const seq2ValidRange = new OffsetRange(prevDiff ? prevDiff.seq2Range.start + 1 : 0, nextDiff ? nextDiff.seq2Range.endExclusive - 1 : sequence2.length); + if (diff.seq1Range.isEmpty) { + sequenceDiffs[i] = shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange); + } else if (diff.seq2Range.isEmpty) { + sequenceDiffs[i] = shiftDiffToBetterPosition(diff.reverse(), sequence2, sequence1, seq2ValidRange, seq1ValidRange).reverse(); + } + } + return sequenceDiffs; + } + function shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange) { + const maxShiftLimit = 100; + let deltaBefore = 1; + while (diff.seq1Range.start - deltaBefore >= seq1ValidRange.start && diff.seq2Range.start - deltaBefore >= seq2ValidRange.start && sequence2.isStronglyEqual(diff.seq2Range.start - deltaBefore, diff.seq2Range.endExclusive - deltaBefore) && deltaBefore < maxShiftLimit) { + deltaBefore++; + } + deltaBefore--; + let deltaAfter = 0; + while (diff.seq1Range.start + deltaAfter < seq1ValidRange.endExclusive && diff.seq2Range.endExclusive + deltaAfter < seq2ValidRange.endExclusive && sequence2.isStronglyEqual(diff.seq2Range.start + deltaAfter, diff.seq2Range.endExclusive + deltaAfter) && deltaAfter < maxShiftLimit) { + deltaAfter++; + } + if (deltaBefore === 0 && deltaAfter === 0) { + return diff; + } + let bestDelta = 0; + let bestScore = -1; + for (let delta = -deltaBefore; delta <= deltaAfter; delta++) { + const seq2OffsetStart = diff.seq2Range.start + delta; + const seq2OffsetEndExclusive = diff.seq2Range.endExclusive + delta; + const seq1Offset = diff.seq1Range.start + delta; + const score2 = sequence1.getBoundaryScore(seq1Offset) + sequence2.getBoundaryScore(seq2OffsetStart) + sequence2.getBoundaryScore(seq2OffsetEndExclusive); + if (score2 > bestScore) { + bestScore = score2; + bestDelta = delta; + } + } + return diff.delta(bestDelta); + } + + // node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/myersDiffAlgorithm.js + var MyersDiffAlgorithm = class { + compute(seq1, seq2, timeout = InfiniteTimeout.instance) { + if (seq1.length === 0 || seq2.length === 0) { + return DiffAlgorithmResult.trivial(seq1, seq2); + } + function getXAfterSnake(x, y) { + while (x < seq1.length && y < seq2.length && seq1.getElement(x) === seq2.getElement(y)) { + x++; + y++; + } + return x; + } + let d = 0; + const V = new FastInt32Array(); + V.set(0, getXAfterSnake(0, 0)); + const paths = new FastArrayNegativeIndices(); + paths.set(0, V.get(0) === 0 ? null : new SnakePath(null, 0, 0, V.get(0))); + let k = 0; + loop: + while (true) { + d++; + if (!timeout.isValid()) { + return DiffAlgorithmResult.trivialTimedOut(seq1, seq2); + } + const lowerBound = -Math.min(d, seq2.length + d % 2); + const upperBound = Math.min(d, seq1.length + d % 2); + for (k = lowerBound; k <= upperBound; k += 2) { + const maxXofDLineTop = k === upperBound ? -1 : V.get(k + 1); + const maxXofDLineLeft = k === lowerBound ? -1 : V.get(k - 1) + 1; + const x = Math.min(Math.max(maxXofDLineTop, maxXofDLineLeft), seq1.length); + const y = x - k; + if (x > seq1.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); + } + }; + var SnakePath = class { + constructor(prev, x, y, length) { + this.prev = prev; + this.x = x; + this.y = y; + this.length = length; + } + }; + var 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; + } + } + }; + var 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; + } + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/advancedLinesDiffComputer.js + var AdvancedLinesDiffComputer = class { + constructor() { + this.dynamicProgrammingDiffing = new DynamicProgrammingDiffing(); + this.myersDiffingAlgorithm = new MyersDiffAlgorithm(); + } + computeDiff(originalLines, modifiedLines, options) { + 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 timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs); + const considerWhitespaceChanges = !options.ignoreTrimWhitespace; + const perfectHashes = /* @__PURE__ */ new Map(); + function getOrCreateHash(text3) { + let hash = perfectHashes.get(text3); + if (hash === void 0) { + hash = perfectHashes.size; + perfectHashes.set(text3, hash); + } + return hash; + } + 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, timeout, (offset1, offset2) => originalLines[offset1] === modifiedLines[offset2] ? modifiedLines[offset2].length === 0 ? 0.1 : 1 + Math.log(1 + modifiedLines[offset2].length) : 0.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; i < equalLinesCount; i++) { + const seq1Offset = seq1LastStart + i; + const seq2Offset = seq2LastStart + i; + if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) { + const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges); + for (const a of characterDiffs.mappings) { + alignments.push(a); + } + if (characterDiffs.hitTimeout) { + hitTimeout = true; + } + } + } + }; + let seq1LastStart = 0; + let seq2LastStart = 0; + for (const diff of lineAlignments) { + assertFn(() => diff.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, timeout, 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 (options.computeMoves) { + moves = this.computeMoves(changes, originalLines, modifiedLines, srcDocLines, tgtDocLines, timeout, 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(range, lines) { + if (range.startLineNumber < 1 || range.startLineNumber > lines.length + 1) { + return false; + } + if (range.endLineNumberExclusive < 1 || range.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, timeout, 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 = /* @__PURE__ */ 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 > 0.9 && best) { + insertions.delete(best); + moves.push(new SimpleLineRangeMapping(deletion.range, best.range)); + excludedChanges.add(deletion.source); + excludedChanges.add(best.source); + } + if (!timeout.isValid()) { + return []; + } + } + const original3LineHashes = new SetMap(); + for (const change of changes) { + if (excludedChanges.has(change)) { + continue; + } + for (let i = change.originalRange.startLineNumber; i < change.originalRange.endLineNumberExclusive - 2; i++) { + const key = `${hashedOriginalLines[i - 1]}:${hashedOriginalLines[i + 1 - 1]}:${hashedOriginalLines[i + 2 - 1]}`; + original3LineHashes.add(key, { range: new LineRange(i, i + 3) }); + } + } + const possibleMappings = []; + changes.sort(compareBy((c) => c.modifiedRange.startLineNumber, numberComparator)); + for (const change of changes) { + if (excludedChanges.has(change)) { + continue; + } + let lastMappings = []; + for (let i = change.modifiedRange.startLineNumber; i < change.modifiedRange.endLineNumberExclusive - 2; i++) { + const key = `${hashedModifiedLines[i - 1]}:${hashedModifiedLines[i + 1 - 1]}:${hashedModifiedLines[i + 2 - 1]}`; + const currentModifiedRange = new LineRange(i, i + 3); + const nextMappings = []; + original3LineHashes.forEach(key, ({ range }) => { + for (const lastMapping of lastMappings) { + if (lastMapping.originalLineRange.endLineNumberExclusive + 1 === range.endLineNumberExclusive && lastMapping.modifiedLineRange.endLineNumberExclusive + 1 === currentModifiedRange.endLineNumberExclusive) { + lastMapping.originalLineRange = new LineRange(lastMapping.originalLineRange.startLineNumber, range.endLineNumberExclusive); + lastMapping.modifiedLineRange = new LineRange(lastMapping.modifiedLineRange.startLineNumber, currentModifiedRange.endLineNumberExclusive); + nextMappings.push(lastMapping); + return; + } + } + const mapping = { + modifiedLineRange: currentModifiedRange, + originalLineRange: range + }; + possibleMappings.push(mapping); + nextMappings.push(mapping); + }); + lastMappings = nextMappings; + } + if (!timeout.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 < moves.length; i++) { + const last = joinedMoves[joinedMoves.length - 1]; + const current = moves[i]; + const originalDist = current.original.startLineNumber - last.original.endLineNumberExclusive; + const modifiedDist = current.modified.startLineNumber - last.modified.endLineNumberExclusive; + const currentMoveAfterLast = originalDist >= 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()), timeout, considerWhitespaceChanges); + const mappings = lineRangeMappingFromRangeMappings(moveChanges.mappings, originalLines, modifiedLines, true); + return new MovedText(m, mappings); + }); + return fullMoves; + } + refineDiff(originalLines, modifiedLines, diff, timeout, 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, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout); + 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 + }; + } + }; + var MonotonousFinder = class _MonotonousFinder { + static create(items, itemToDomain, domainComparator) { + items.sort((a, b) => domainComparator(itemToDomain(a), itemToDomain(b))); + return new _MonotonousFinder(items, itemToDomain, domainComparator); + } + 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; + } + /** + * Assumes the values are monotonously increasing. + */ + findLastItemBeforeOrEqual(value) { + if (this._hasLastValue && CompareResult.isLessThan(this._domainComparator(value, this._lastValue))) { + throw new BugIndicatingError(); + } + this._lastValue = value; + this._hasLastValue = true; + while (this._currentIdx < this._items.length && CompareResult.isLessThanOrEqual(this._domainComparator(this._itemToDomain(this._items[this._currentIdx]), value))) { + this._currentIdx++; + } + return this._currentIdx === 0 ? void 0 : this._items[this._currentIdx - 1]; + } + }; + function intersectRanges(ranges1, ranges2) { + const result = []; + let i1 = 0; + let i2 = 0; + while (i1 < ranges1.length && i2 < ranges2.length) { + const r1 = ranges1[i1]; + const r2 = ranges2[i2]; + const i = r1.intersect(r2); + if (i && !i.isEmpty) { + result.push(i); + } + if (r1.endLineNumberExclusive < r2.endLineNumberExclusive) { + i1++; + } else { + i2++; + } + } + return result; + } + var LineRangeSet = class { + constructor() { + this._normalizedRanges = []; + } + addRange(range) { + const joinRangeStartIdx = mapMinusOne(this._normalizedRanges.findIndex((r) => r.endLineNumberExclusive >= range.startLineNumber), this._normalizedRanges.length); + const joinRangeEndIdxExclusive = findLastIndex(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; + if (joinRangeStartIdx === joinRangeEndIdxExclusive) { + this._normalizedRanges.splice(joinRangeStartIdx, 0, range); + } else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) { + const joinRange = this._normalizedRanges[joinRangeStartIdx]; + this._normalizedRanges[joinRangeStartIdx] = joinRange.join(range); + } else { + const joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range); + this._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange); + } + } + intersects(range) { + for (const r of this._normalizedRanges) { + if (r.intersectsStrict(range)) { + return true; + } + } + return false; + } + /** + * Subtracts all ranges in this set from `range` and returns the result. + */ + subtractFrom(range) { + const joinRangeStartIdx = mapMinusOne(this._normalizedRanges.findIndex((r) => r.endLineNumberExclusive >= range.startLineNumber), this._normalizedRanges.length); + const joinRangeEndIdxExclusive = findLastIndex(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; + if (joinRangeStartIdx === joinRangeEndIdxExclusive) { + return [range]; + } + const result = []; + let startLineNumber = range.startLineNumber; + for (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) { + const r = this._normalizedRanges[i]; + if (r.startLineNumber > startLineNumber) { + result.push(new LineRange(startLineNumber, r.startLineNumber)); + } + startLineNumber = r.endLineNumberExclusive; + } + if (startLineNumber < range.endLineNumberExclusive) { + result.push(new LineRange(startLineNumber, range.endLineNumberExclusive)); + } + return result; + } + }; + function mapMinusOne(idx, mapTo) { + return idx === -1 ? mapTo : idx; + } + function coverFullWords(sequence1, sequence2, sequenceDiffs) { + const additional = []; + let lastModifiedWord = void 0; + function maybePushWordToAdditional() { + if (!lastModifiedWord) { + return; + } + const originalLength1 = lastModifiedWord.s1Range.length - lastModifiedWord.deleted; + const originalLength2 = lastModifiedWord.s2Range.length - lastModifiedWord.added; + if (originalLength1 !== originalLength2) { + } + if (Math.max(lastModifiedWord.deleted, lastModifiedWord.added) + (lastModifiedWord.count - 1) > originalLength1) { + additional.push(new SequenceDiff(lastModifiedWord.s1Range, lastModifiedWord.s2Range)); + } + lastModifiedWord = void 0; + } + for (const s of sequenceDiffs) { + let processWord = function(s1Range, s2Range) { + var _a3, _b, _c, _d; + if (!lastModifiedWord || !lastModifiedWord.s1Range.containsRange(s1Range) || !lastModifiedWord.s2Range.containsRange(s2Range)) { + if (lastModifiedWord && !(lastModifiedWord.s1Range.endExclusive < s1Range.start && lastModifiedWord.s2Range.endExclusive < s2Range.start)) { + const s1Added = OffsetRange.tryCreate(lastModifiedWord.s1Range.endExclusive, s1Range.start); + const s2Added = OffsetRange.tryCreate(lastModifiedWord.s2Range.endExclusive, s2Range.start); + lastModifiedWord.deleted += (_a3 = s1Added === null || s1Added === void 0 ? void 0 : s1Added.length) !== null && _a3 !== void 0 ? _a3 : 0; + lastModifiedWord.added += (_b = s2Added === null || s2Added === void 0 ? void 0 : s2Added.length) !== null && _b !== void 0 ? _b : 0; + lastModifiedWord.s1Range = lastModifiedWord.s1Range.join(s1Range); + lastModifiedWord.s2Range = lastModifiedWord.s2Range.join(s2Range); + } else { + maybePushWordToAdditional(); + lastModifiedWord = { added: 0, deleted: 0, count: 0, s1Range, s2Range }; + } + } + const changedS1 = s1Range.intersect(s.seq1Range); + const changedS2 = s2Range.intersect(s.seq2Range); + lastModifiedWord.count++; + lastModifiedWord.deleted += (_c = changedS1 === null || changedS1 === void 0 ? void 0 : changedS1.length) !== null && _c !== void 0 ? _c : 0; + lastModifiedWord.added += (_d = changedS2 === null || changedS2 === void 0 ? void 0 : changedS2.length) !== null && _d !== void 0 ? _d : 0; + }; + const w1Before = sequence1.findWordContaining(s.seq1Range.start - 1); + const w2Before = sequence2.findWordContaining(s.seq2Range.start - 1); + const w1After = sequence1.findWordContaining(s.seq1Range.endExclusive); + const w2After = sequence2.findWordContaining(s.seq2Range.endExclusive); + if (w1Before && w1After && w2Before && w2After && w1Before.equals(w1After) && w2Before.equals(w2After)) { + processWord(w1Before, w2Before); + } else { + if (w1Before && w2Before) { + processWord(w1Before, w2Before); + } + if (w1After && w2After) { + processWord(w1After, w2After); + } + } + } + maybePushWordToAdditional(); + const merged = mergeSequenceDiffs(sequenceDiffs, additional); + return merged; + } + function mergeSequenceDiffs(sequenceDiffs1, sequenceDiffs2) { + const result = []; + while (sequenceDiffs1.length > 0 || sequenceDiffs2.length > 0) { + const sd1 = sequenceDiffs1[0]; + const sd2 = sequenceDiffs2[0]; + let next; + if (sd1 && (!sd2 || sd1.seq1Range.start < sd2.seq1Range.start)) { + next = sequenceDiffs1.shift(); + } else { + next = sequenceDiffs2.shift(); + } + if (result.length > 0 && 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 first = g[0]; + const last = g[g.length - 1]; + changes.push(new LineRangeMapping(first.originalRange.join(last.originalRange), first.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 && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + m1.originalRange.endLineNumberExclusive < m2.originalRange.startLineNumber && m1.modifiedRange.endLineNumberExclusive < m2.modifiedRange.startLineNumber); + }); + return changes; + } + function getLineRangeMapping(rangeMapping, originalLines, modifiedLines) { + let lineStartDelta = 0; + let lineEndDelta = 0; + if (rangeMapping.modifiedRange.endColumn === 1 && rangeMapping.originalRange.endColumn === 1 && rangeMapping.originalRange.startLineNumber + lineStartDelta <= rangeMapping.originalRange.endLineNumber && rangeMapping.modifiedRange.startLineNumber + lineStartDelta <= rangeMapping.modifiedRange.endLineNumber) { + lineEndDelta = -1; + } + if (rangeMapping.modifiedRange.startColumn - 1 >= 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; + } + } + var LineSequence2 = class { + constructor(trimmedHash, lines) { + this.trimmedHash = trimmedHash; + this.lines = lines; + } + getElement(offset) { + return this.trimmedHash[offset]; + } + get length() { + return this.trimmedHash.length; + } + getBoundaryScore(length) { + const indentationBefore = length === 0 ? 0 : getIndentation(this.lines[length - 1]); + const indentationAfter = length === this.lines.length ? 0 : getIndentation(this.lines[length]); + return 1e3 - (indentationBefore + indentationAfter); + } + getText(range) { + return this.lines.slice(range.start, range.endExclusive).join("\n"); + } + isStronglyEqual(offset1, offset2) { + return this.lines[offset1] === this.lines[offset2]; + } + }; + function getIndentation(str) { + let i = 0; + while (i < str.length && (str.charCodeAt(i) === 32 || str.charCodeAt(i) === 9)) { + i++; + } + return i; + } + var LinesSliceCharSequence = class { + constructor(lines, lineRange, considerWhitespaceChanges) { + this.lines = lines; + this.considerWhitespaceChanges = considerWhitespaceChanges; + this.elements = []; + this.firstCharOffsetByLineMinusOne = []; + this.additionalOffsetByLine = []; + let trimFirstLineFully = false; + if (lineRange.start > 0 && lineRange.endExclusive >= lines.length) { + lineRange = new OffsetRange(lineRange.start - 1, lineRange.endExclusive); + trimFirstLineFully = true; + } + this.lineRange = lineRange; + for (let i = this.lineRange.start; i < this.lineRange.endExclusive; i++) { + let line = lines[i]; + let offset = 0; + if (trimFirstLineFully) { + offset = line.length; + line = ""; + trimFirstLineFully = false; + } else if (!considerWhitespaceChanges) { + const trimmedStartLine = line.trimStart(); + offset = line.length - trimmedStartLine.length; + line = trimmedStartLine.trimEnd(); + } + this.additionalOffsetByLine.push(offset); + for (let i2 = 0; i2 < line.length; i2++) { + this.elements.push(line.charCodeAt(i2)); + } + if (i < lines.length - 1) { + this.elements.push("\n".charCodeAt(0)); + this.firstCharOffsetByLineMinusOne[i - this.lineRange.start] = this.elements.length; + } + } + this.additionalOffsetByLine.push(0); + } + toString() { + return `Slice: "${this.text}"`; + } + get text() { + return this.getText(new OffsetRange(0, this.length)); + } + getText(range) { + return this.elements.slice(range.start, range.endExclusive).map((e) => String.fromCharCode(e)).join(""); + } + getElement(offset) { + return this.elements[offset]; + } + get length() { + return this.elements.length; + } + getBoundaryScore(length) { + const prevCategory = getCategory(length > 0 ? this.elements[length - 1] : -1); + const nextCategory = getCategory(length < this.elements.length ? this.elements[length] : -1); + if (prevCategory === 6 && nextCategory === 7) { + return 0; + } + let score2 = 0; + if (prevCategory !== nextCategory) { + score2 += 10; + if (nextCategory === 1) { + score2 += 1; + } + } + score2 += getCategoryBoundaryScore(prevCategory); + score2 += getCategoryBoundaryScore(nextCategory); + return score2; + } + translateOffset(offset) { + if (this.lineRange.isEmpty) { + return new Position(this.lineRange.start + 1, 1); + } + let i = 0; + let j = this.firstCharOffsetByLineMinusOne.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (this.firstCharOffsetByLineMinusOne[k] > offset) { + 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(range) { + return Range.fromPositions(this.translateOffset(range.start), this.translateOffset(range.endExclusive)); + } + /** + * Finds the word that contains the character at the given offset + */ + 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 (end < this.elements.length && isWordChar(this.elements[end])) { + end++; + } + return new OffsetRange(start, end); + } + countLinesIn(range) { + return this.translateOffset(range.endExclusive).lineNumber - this.translateOffset(range.start).lineNumber; + } + isStronglyEqual(offset1, offset2) { + return this.elements[offset1] === this.elements[offset2]; + } + extendToFullLines(range) { + var _a3, _b; + const start = (_a3 = findLastMonotonous(this.firstCharOffsetByLineMinusOne, (x) => x <= range.start)) !== null && _a3 !== void 0 ? _a3 : 0; + const end = (_b = findFirstMonotonous(this.firstCharOffsetByLineMinusOne, (x) => range.endExclusive <= x)) !== null && _b !== void 0 ? _b : this.elements.length; + return new OffsetRange(start, end); + } + }; + function findLastIdxMonotonous(arr, predicate) { + let i = 0; + let j = arr.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (predicate(arr[k])) { + i = k + 1; + } else { + j = k; + } + } + return i - 1; + } + function findLastMonotonous(arr, predicate) { + const idx = findLastIdxMonotonous(arr, predicate); + return idx === -1 ? void 0 : arr[idx]; + } + function findFirstIdxMonotonous(arr, predicate) { + let i = 0; + let j = arr.length; + while (i < j) { + const k = Math.floor((i + j) / 2); + if (predicate(arr[k])) { + j = k; + } else { + i = k + 1; + } + } + return i; + } + function findFirstMonotonous(arr, predicate) { + const idx = findFirstIdxMonotonous(arr, predicate); + return idx === arr.length ? void 0 : arr[idx]; + } + function isWordChar(charCode) { + return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90 || charCode >= 48 && charCode <= 57; + } + var score = { + [ + 0 + /* CharBoundaryCategory.WordLower */ + ]: 0, + [ + 1 + /* CharBoundaryCategory.WordUpper */ + ]: 0, + [ + 2 + /* CharBoundaryCategory.WordNumber */ + ]: 0, + [ + 3 + /* CharBoundaryCategory.End */ + ]: 10, + [ + 4 + /* CharBoundaryCategory.Other */ + ]: 2, + [ + 5 + /* CharBoundaryCategory.Space */ + ]: 3, + [ + 6 + /* CharBoundaryCategory.LineBreakCR */ + ]: 10, + [ + 7 + /* CharBoundaryCategory.LineBreakLF */ + ]: 10 + }; + 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; + } + var chrKeys = /* @__PURE__ */ new Map(); + function getKey(chr) { + let key = chrKeys.get(chr); + if (key === void 0) { + key = chrKeys.size; + chrKeys.set(chr, key); + } + return key; + } + var LineRangeFragment = class { + constructor(range, lines, source) { + this.range = range; + this.lines = lines; + this.source = source; + this.histogram = []; + let counter = 0; + for (let i = range.startLineNumber - 1; i < range.endLineNumberExclusive - 1; i++) { + const line = lines[i]; + for (let j = 0; j < line.length; j++) { + counter++; + const chr = line[j]; + const key2 = getKey(chr); + this.histogram[key2] = (this.histogram[key2] || 0) + 1; + } + counter++; + const key = getKey("\n"); + this.histogram[key] = (this.histogram[key] || 0) + 1; + } + this.totalCount = counter; + } + computeSimilarity(other) { + var _a3, _b; + let sumDifferences = 0; + const maxLength = Math.max(this.histogram.length, other.histogram.length); + for (let i = 0; i < maxLength; i++) { + sumDifferences += Math.abs(((_a3 = this.histogram[i]) !== null && _a3 !== void 0 ? _a3 : 0) - ((_b = other.histogram[i]) !== null && _b !== void 0 ? _b : 0)); + } + return 1 - sumDifferences / (this.totalCount + other.totalCount); + } + }; + + // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputers.js + var linesDiffComputers = { + getLegacy: () => new LegacyLinesDiffComputer(), + getAdvanced: () => new AdvancedLinesDiffComputer() + }; + + // node_modules/monaco-editor/esm/vs/base/common/color.js + function roundFloat(number, decimalPoints) { + const decimal = Math.pow(10, decimalPoints); + return Math.round(number * decimal) / decimal; + } + var 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; + } + }; + var HSLA = class _HSLA { + constructor(h, s, l, a) { + this._hslaBrand = void 0; + this.h = Math.max(Math.min(360, h), 0) | 0; + this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); + this.l = roundFloat(Math.max(Math.min(1, l), 0), 3); + this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); + } + static equals(a, b) { + return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a; + } + /** + * Converts an RGB color value to HSL. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes r, g, and b are contained in the set [0, 255] and + * returns h in the set [0, 360], s, and l in the set [0, 1]. + */ + 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 h = 0; + let s = 0; + const l = (min + max) / 2; + const chroma = max - min; + if (chroma > 0) { + s = Math.min(l <= 0.5 ? chroma / (2 * l) : chroma / (2 - 2 * l), 1); + switch (max) { + case r: + h = (g - b) / chroma + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / chroma + 2; + break; + case b: + h = (r - g) / chroma + 4; + break; + } + h *= 60; + h = Math.round(h); + } + return new _HSLA(h, s, l, a); + } + static _hue2rgb(p2, q, t2) { + if (t2 < 0) { + t2 += 1; + } + if (t2 > 1) { + t2 -= 1; + } + if (t2 < 1 / 6) { + return p2 + (q - p2) * 6 * t2; + } + if (t2 < 1 / 2) { + return q; + } + if (t2 < 2 / 3) { + return p2 + (q - p2) * (2 / 3 - t2) * 6; + } + return p2; + } + /** + * Converts an HSL color value to RGB. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and + * returns r, g, and b in the set [0, 255]. + */ + static toRGBA(hsla) { + const h = hsla.h / 360; + const { s, l, a } = hsla; + let r, g, b; + if (s === 0) { + r = g = b = l; + } else { + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p2 = 2 * l - q; + r = _HSLA._hue2rgb(p2, q, h + 1 / 3); + g = _HSLA._hue2rgb(p2, q, h); + b = _HSLA._hue2rgb(p2, q, h - 1 / 3); + } + return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a); + } + }; + var HSVA = class _HSVA { + constructor(h, s, v, a) { + this._hsvaBrand = void 0; + this.h = Math.max(Math.min(360, h), 0) | 0; + this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); + this.v = roundFloat(Math.max(Math.min(1, v), 0), 3); + this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); + } + static equals(a, b) { + return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a; + } + // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm + 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); + } + // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm + static toRGBA(hsva) { + const { h, s, v, a } = hsva; + const c = v * s; + const x = c * (1 - Math.abs(h / 60 % 2 - 1)); + const m = v - c; + let [r, g, b] = [0, 0, 0]; + if (h < 60) { + r = c; + g = x; + } else if (h < 120) { + r = x; + g = c; + } else if (h < 180) { + g = c; + b = x; + } else if (h < 240) { + g = x; + b = c; + } else if (h < 300) { + r = x; + b = c; + } else if (h <= 360) { + r = c; + b = x; + } + r = Math.round((r + m) * 255); + g = Math.round((g + m) * 255); + b = Math.round((b + m) * 255); + return new RGBA(r, g, b, a); + } + }; + var Color = class _Color { + 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); + } + /** + * http://www.w3.org/TR/WCAG20/#relativeluminancedef + * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. + */ + getRelativeLuminance() { + const R = _Color._relativeLuminanceForComponent(this.rgba.r); + const G = _Color._relativeLuminanceForComponent(this.rgba.g); + const B = _Color._relativeLuminanceForComponent(this.rgba.b); + const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B; + return roundFloat(luminance, 4); + } + static _relativeLuminanceForComponent(color) { + const c = color / 255; + return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); + } + /** + * http://www.w3.org/TR/WCAG20/#contrast-ratiodef + * Returns the contrast ration number in the set [1, 21]. + */ + getContrastRatio(another) { + const lum1 = this.getRelativeLuminance(); + const lum2 = another.getRelativeLuminance(); + return lum1 > lum2 ? (lum1 + 0.05) / (lum2 + 0.05) : (lum2 + 0.05) / (lum1 + 0.05); + } + /** + * http://24ways.org/2010/calculating-color-contrast + * Return 'true' if darker color otherwise 'false' + */ + isDarker() { + const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3; + return yiq < 128; + } + /** + * http://24ways.org/2010/calculating-color-contrast + * Return 'true' if lighter color otherwise 'false' + */ + 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 lum1 < lum2; + } + lighten(factor) { + return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a)); + } + darken(factor) { + return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a)); + } + transparent(factor) { + const { r, g, b, a } = this.rgba; + return new _Color(new RGBA(r, g, b, a * factor)); + } + isTransparent() { + return this.rgba.a === 0; + } + isOpaque() { + return this.rgba.a === 1; + } + opposite() { + return new _Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); + } + blend(c) { + const rgba = c.rgba; + const thisA = this.rgba.a; + const colorA = rgba.a; + const a = thisA + colorA * (1 - thisA); + if (a < 1e-6) { + return _Color.transparent; + } + const r = this.rgba.r * thisA / a + rgba.r * colorA * (1 - thisA) / a; + const g = this.rgba.g * thisA / a + rgba.g * colorA * (1 - thisA) / a; + const b = this.rgba.b * thisA / a + rgba.b * colorA * (1 - thisA) / a; + return new _Color(new RGBA(r, g, b, a)); + } + makeOpaque(opaqueBackground) { + if (this.isOpaque() || opaqueBackground.rgba.a !== 1) { + return this; + } + const { r, g, b, a } = this.rgba; + return new _Color(new RGBA(opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r), opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g), opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b), 1)); + } + flatten(...backgrounds) { + const background = backgrounds.reduceRight((accumulator, color) => { + return _Color._flatten(color, accumulator); + }); + return _Color._flatten(this, background); + } + static _flatten(foreground, background) { + const backgroundAlpha = 1 - foreground.rgba.a; + return new _Color(new RGBA(backgroundAlpha * background.rgba.r + foreground.rgba.a * foreground.rgba.r, backgroundAlpha * background.rgba.g + foreground.rgba.a * foreground.rgba.g, backgroundAlpha * background.rgba.b + foreground.rgba.a * foreground.rgba.b)); + } + toString() { + if (!this._toString) { + this._toString = _Color.Format.CSS.format(this); + } + return this._toString; + } + static getLighterColor(of, relative2, factor) { + if (of.isLighterThan(relative2)) { + return of; + } + factor = factor ? factor : 0.5; + const lum1 = of.getRelativeLuminance(); + const lum2 = relative2.getRelativeLuminance(); + factor = factor * (lum2 - lum1) / lum2; + return of.lighten(factor); + } + static getDarkerColor(of, relative2, factor) { + if (of.isDarkerThan(relative2)) { + return of; + } + factor = factor ? factor : 0.5; + const lum1 = of.getRelativeLuminance(); + const lum2 = relative2.getRelativeLuminance(); + factor = factor * (lum1 - lum2) / lum1; + return of.darken(factor); + } + }; + Color.white = new Color(new RGBA(255, 255, 255, 1)); + Color.black = new Color(new RGBA(0, 0, 0, 1)); + Color.red = new Color(new RGBA(255, 0, 0, 1)); + Color.blue = new Color(new RGBA(0, 0, 255, 1)); + Color.green = new Color(new RGBA(0, 255, 0, 1)); + Color.cyan = new Color(new RGBA(0, 255, 255, 1)); + Color.lightgrey = new Color(new RGBA(211, 211, 211, 1)); + Color.transparent = new Color(new RGBA(0, 0, 0, 0)); + (function(Color3) { + let Format; + (function(Format2) { + let CSS; + (function(CSS2) { + function formatRGB(color) { + if (color.rgba.a === 1) { + return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`; + } + return Color3.Format.CSS.formatRGBA(color); + } + CSS2.formatRGB = formatRGB; + function formatRGBA(color) { + return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+color.rgba.a.toFixed(2)})`; + } + CSS2.formatRGBA = formatRGBA; + function formatHSL(color) { + if (color.hsla.a === 1) { + return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`; + } + return Color3.Format.CSS.formatHSLA(color); + } + CSS2.formatHSL = formatHSL; + function formatHSLA(color) { + return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`; + } + CSS2.formatHSLA = formatHSLA; + function _toTwoDigitHex(n) { + const r = n.toString(16); + return r.length !== 2 ? "0" + r : r; + } + function formatHex(color) { + return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`; + } + CSS2.formatHex = formatHex; + function formatHexA(color, compact = false) { + if (compact && color.rgba.a === 1) { + return Color3.Format.CSS.formatHex(color); + } + return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`; + } + CSS2.formatHexA = formatHexA; + function format2(color) { + if (color.isOpaque()) { + return Color3.Format.CSS.formatHex(color); + } + return Color3.Format.CSS.formatRGBA(color); + } + CSS2.format = format2; + function parseHex(hex) { + const length = hex.length; + if (length === 0) { + return null; + } + if (hex.charCodeAt(0) !== 35) { + return null; + } + if (length === 7) { + const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); + const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); + const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); + return new Color3(new RGBA(r, g, b, 1)); + } + if (length === 9) { + const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); + const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); + const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); + const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8)); + return new Color3(new RGBA(r, g, b, a / 255)); + } + if (length === 4) { + const r = _parseHexDigit(hex.charCodeAt(1)); + const g = _parseHexDigit(hex.charCodeAt(2)); + const b = _parseHexDigit(hex.charCodeAt(3)); + return new Color3(new RGBA(16 * r + r, 16 * g + g, 16 * b + b)); + } + if (length === 5) { + const r = _parseHexDigit(hex.charCodeAt(1)); + const g = _parseHexDigit(hex.charCodeAt(2)); + const b = _parseHexDigit(hex.charCodeAt(3)); + const a = _parseHexDigit(hex.charCodeAt(4)); + return new Color3(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255)); + } + return null; + } + CSS2.parseHex = parseHex; + function _parseHexDigit(charCode) { + switch (charCode) { + case 48: + return 0; + case 49: + return 1; + case 50: + return 2; + case 51: + return 3; + case 52: + return 4; + case 53: + return 5; + case 54: + return 6; + case 55: + return 7; + case 56: + return 8; + case 57: + return 9; + case 97: + return 10; + case 65: + return 10; + case 98: + return 11; + case 66: + return 11; + case 99: + return 12; + case 67: + return 12; + case 100: + return 13; + case 68: + return 13; + case 101: + return 14; + case 69: + return 14; + case 102: + return 15; + case 70: + return 15; + } + return 0; + } + })(CSS = Format2.CSS || (Format2.CSS = {})); + })(Format = Color3.Format || (Color3.Format = {})); + })(Color || (Color = {})); + + // node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js + function _parseCaptureGroups(captureGroups) { + const values = []; + for (const captureGroup of captureGroups) { + const parsedNumber = Number(captureGroup); + if (parsedNumber || parsedNumber === 0 && captureGroup.replace(/\s/g, "") !== "") { + values.push(parsedNumber); + } + } + return values; + } + function _toIColor(r, g, b, a) { + return { + red: r / 255, + blue: b / 255, + green: g / 255, + alpha: a + }; + } + function _findRange(model, match) { + const index = match.index; + const length = match[0].length; + if (!index) { + return; + } + const startPosition = model.positionAt(index); + const range = { + startLineNumber: startPosition.lineNumber, + startColumn: startPosition.column, + endLineNumber: startPosition.lineNumber, + endColumn: startPosition.column + length + }; + return range; + } + function _findHexColorInformation(range, hexValue) { + if (!range) { + return; + } + const parsedHexColor = Color.Format.CSS.parseHex(hexValue); + if (!parsedHexColor) { + return; + } + return { + range, + color: _toIColor(parsedHexColor.rgba.r, parsedHexColor.rgba.g, parsedHexColor.rgba.b, parsedHexColor.rgba.a) + }; + } + function _findRGBColorInformation(range, matches, isAlpha) { + if (!range || matches.length !== 1) { + return; + } + const match = matches[0]; + const captureGroups = match.values(); + const parsedRegex = _parseCaptureGroups(captureGroups); + return { + range, + color: _toIColor(parsedRegex[0], parsedRegex[1], parsedRegex[2], isAlpha ? parsedRegex[3] : 1) + }; + } + function _findHSLColorInformation(range, matches, isAlpha) { + if (!range || matches.length !== 1) { + return; + } + const match = matches[0]; + const captureGroups = match.values(); + const parsedRegex = _parseCaptureGroups(captureGroups); + const colorEquivalent = new Color(new HSLA(parsedRegex[0], parsedRegex[1] / 100, parsedRegex[2] / 100, isAlpha ? parsedRegex[3] : 1)); + return { + range, + color: _toIColor(colorEquivalent.rgba.r, colorEquivalent.rgba.g, colorEquivalent.rgba.b, colorEquivalent.rgba.a) + }; + } + function _findMatches(model, regex) { + if (typeof model === "string") { + return [...model.matchAll(regex)]; + } else { + return model.findMatches(regex); + } + } + function computeColors(model) { + const result = []; + const initialValidationRegex = /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm; + const initialValidationMatches = _findMatches(model, initialValidationRegex); + if (initialValidationMatches.length > 0) { + 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); + } + + // node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js + var __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()); + }); + }; + var 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; i < this._lines.length; i++) { + const line = this._lines[i]; + const offsetToAdd = this.offsetAt(new Position(i + 1, 1)); + const iteratorOverMatches = line.matchAll(regex); + for (const match of iteratorOverMatches) { + if (match.index || match.index === 0) { + match.index = match.index + offsetToAdd; + } + matches.push(match); + } + } + return matches; + } + getLinesContent() { + return this._lines.slice(0); + } + getLineCount() { + return this._lines.length; + } + getLineContent(lineNumber) { + return this._lines[lineNumber - 1]; + } + getWordAtPosition(position, wordDefinition) { + const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0); + if (wordAtText) { + return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn); + } + return null; + } + getWordUntilPosition(position, wordDefinition) { + const wordAtPosition = this.getWordAtPosition(position, wordDefinition); + if (!wordAtPosition) { + return { + word: "", + startColumn: position.column, + endColumn: position.column + }; + } + return { + word: this._lines[position.lineNumber - 1].substring(wordAtPosition.startColumn - 1, position.column - 1), + startColumn: wordAtPosition.startColumn, + endColumn: position.column + }; + } + words(wordDefinition) { + const lines = this._lines; + const wordenize = this._wordenize.bind(this); + let lineNumber = 0; + let lineText = ""; + let wordRangesIdx = 0; + let wordRanges = []; + return { + *[Symbol.iterator]() { + while (true) { + if (wordRangesIdx < wordRanges.length) { + const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end); + wordRangesIdx += 1; + yield value; + } else { + if (lineNumber < lines.length) { + lineText = lines[lineNumber]; + wordRanges = wordenize(lineText, wordDefinition); + wordRangesIdx = 0; + lineNumber += 1; + } else { + break; + } + } + } + } + }; + } + getLineWords(lineNumber, wordDefinition) { + const content = this._lines[lineNumber - 1]; + const ranges = this._wordenize(content, wordDefinition); + const words = []; + for (const range of ranges) { + words.push({ + word: content.substring(range.start, range.end), + startColumn: range.start + 1, + endColumn: range.end + 1 + }); + } + return words; + } + _wordenize(content, wordDefinition) { + const result = []; + let match; + wordDefinition.lastIndex = 0; + while (match = wordDefinition.exec(content)) { + if (match[0].length === 0) { + break; + } + result.push({ start: match.index, end: match.index + match[0].length }); + } + return result; + } + getValueInRange(range) { + range = this._validateRange(range); + if (range.startLineNumber === range.endLineNumber) { + return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); + } + const lineEnding = this._eol; + const startLineIndex = range.startLineNumber - 1; + const endLineIndex = range.endLineNumber - 1; + const resultLines = []; + resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); + for (let i = startLineIndex + 1; i < endLineIndex; i++) { + resultLines.push(this._lines[i]); + } + resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); + return resultLines.join(lineEnding); + } + offsetAt(position) { + position = this._validatePosition(position); + this._ensureLineStarts(); + return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1); + } + positionAt(offset) { + offset = Math.floor(offset); + offset = Math.max(0, offset); + this._ensureLineStarts(); + const out = this._lineStarts.getIndexOf(offset); + const lineLength = this._lines[out.index].length; + return { + lineNumber: 1 + out.index, + column: 1 + Math.min(out.remainder, lineLength) + }; + } + _validateRange(range) { + const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn }); + const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn }); + if (start.lineNumber !== range.startLineNumber || start.column !== range.startColumn || end.lineNumber !== range.endLineNumber || end.column !== range.endColumn) { + return { + startLineNumber: start.lineNumber, + startColumn: start.column, + endLineNumber: end.lineNumber, + endColumn: end.column + }; + } + return range; + } + _validatePosition(position) { + if (!Position.isIPosition(position)) { + throw new Error("bad position"); + } + let { lineNumber, column } = position; + let hasChanged = false; + if (lineNumber < 1) { + lineNumber = 1; + column = 1; + hasChanged = true; + } else if (lineNumber > this._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, column }; + } + } + }; + var EditorSimpleWorker = class _EditorSimpleWorker { + constructor(host, foreignModuleFactory) { + this._host = host; + this._models = /* @__PURE__ */ Object.create(null); + this._foreignModuleFactory = foreignModuleFactory; + this._foreignModule = null; + } + dispose() { + this._models = /* @__PURE__ */ 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, options, range) { + return __awaiter2(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, options, range); + }); + } + // ---- BEGIN diff -------------------------------------------------------------------------- + computeDiff(originalUrl, modifiedUrl, options, algorithm) { + return __awaiter2(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, options, algorithm); + }); + } + static computeDiff(originalTextModel, modifiedTextModel, options, algorithm) { + const diffAlgorithm = algorithm === "advanced" ? linesDiffComputers.getAdvanced() : linesDiffComputers.getLegacy(); + const originalLines = originalTextModel.getLinesContent(); + const modifiedLines = modifiedTextModel.getLinesContent(); + const result = diffAlgorithm.computeDiff(originalLines, modifiedLines, options); + const identical = result.changes.length > 0 ? false : this._modelsAreIdentical(originalTextModel, modifiedTextModel); + function getLineChanges(changes) { + return changes.map((m) => { + var _a3; + return [m.originalRange.startLineNumber, m.originalRange.endLineNumberExclusive, m.modifiedRange.startLineNumber, m.modifiedRange.endLineNumberExclusive, (_a3 = m.innerChanges) === null || _a3 === void 0 ? void 0 : _a3.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, + 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; + } + computeDirtyDiff(originalUrl, modifiedUrl, ignoreTrimWhitespace) { + return __awaiter2(this, void 0, void 0, function* () { + const original = this._getModel(originalUrl); + const modified = this._getModel(modifiedUrl); + if (!original || !modified) { + return null; + } + const originalLines = original.getLinesContent(); + const modifiedLines = modified.getLinesContent(); + const diffComputer = new DiffComputer(originalLines, modifiedLines, { + shouldComputeCharChanges: false, + shouldPostProcessCharChanges: false, + shouldIgnoreTrimWhitespace: ignoreTrimWhitespace, + shouldMakePrettyDiff: true, + maxComputationTime: 1e3 + }); + return diffComputer.computeDiff().changes; + }); + } + computeMoreMinimalEdits(modelUrl, edits, pretty) { + return __awaiter2(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, text: text3, eol } of edits) { + if (typeof eol === "number") { + lastEol = eol; + } + if (Range.isEmpty(range) && !text3) { + continue; + } + const original = model.getValueInRange(range); + text3 = text3.replace(/\r\n|\n|\r/g, model.eol); + if (original === text3) { + continue; + } + if (Math.max(text3.length, original.length) > _EditorSimpleWorker._diffLimit) { + result.push({ range, text: text3 }); + continue; + } + const changes = stringDiff(original, text3, pretty); + const editOffset = model.offsetAt(Range.lift(range).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: text3.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; + }); + } + computeHumanReadableDiff(modelUrl, edits, options) { + return __awaiter2(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, text: text3, eol } of edits) { + let addPositions = function(pos1, pos2) { + return new Position(pos1.lineNumber + pos2.lineNumber - 1, pos2.lineNumber === 1 ? pos1.column + pos2.column - 1 : pos2.column); + }, getText = function(lines, range2) { + const result2 = []; + for (let i = range2.startLineNumber; i <= range2.endLineNumber; i++) { + const line = lines[i - 1]; + if (i === range2.startLineNumber && i === range2.endLineNumber) { + result2.push(line.substring(range2.startColumn - 1, range2.endColumn - 1)); + } else if (i === range2.startLineNumber) { + result2.push(line.substring(range2.startColumn - 1)); + } else if (i === range2.endLineNumber) { + result2.push(line.substring(0, range2.endColumn - 1)); + } else { + result2.push(line); + } + } + return result2; + }; + if (typeof eol === "number") { + lastEol = eol; + } + if (Range.isEmpty(range) && !text3) { + continue; + } + const original = model.getValueInRange(range); + text3 = text3.replace(/\r\n|\n|\r/g, model.eol); + if (original === text3) { + continue; + } + if (Math.max(text3.length, original.length) > _EditorSimpleWorker._diffLimit) { + result.push({ range, text: text3 }); + continue; + } + const originalLines = original.split(/\r\n|\n|\r/); + const modifiedLines = text3.split(/\r\n|\n|\r/); + const diff = linesDiffComputers.getAdvanced().computeDiff(originalLines, modifiedLines, options); + const start = Range.lift(range).getStartPosition(); + for (const c of diff.changes) { + if (c.innerChanges) { + for (const x of c.innerChanges) { + result.push({ + range: Range.fromPositions(addPositions(start, x.originalRange.getStartPosition()), addPositions(start, x.originalRange.getEndPosition())), + text: getText(modifiedLines, x.modifiedRange).join(model.eol) + }); + } + } else { + throw new BugIndicatingError("The experimental diff algorithm always produces inner changes"); + } + } + } + if (typeof lastEol === "number") { + result.push({ eol: lastEol, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }); + } + return result; + }); + } + // ---- END minimal edits --------------------------------------------------------------- + computeLinks(modelUrl) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + return computeLinks(model); + }); + } + // --- BEGIN default document colors ----------------------------------------------------------- + computeDefaultDocumentColors(modelUrl) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + return computeDefaultDocumentColors(model); + }); + } + textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const sw = new StopWatch(); + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + const seen = /* @__PURE__ */ new Set(); + outer: + for (const url of modelUrls) { + const model = this._getModel(url); + if (!model) { + continue; + } + for (const word2 of model.words(wordDefRegExp)) { + if (word2 === leadingWord || !isNaN(Number(word2))) { + continue; + } + seen.add(word2); + if (seen.size > _EditorSimpleWorker._suggestionsLimit) { + break outer; + } + } + } + return { words: Array.from(seen), duration: sw.elapsed() }; + }); + } + // ---- END suggest -------------------------------------------------------------------------- + //#region -- word ranges -- + computeWordRanges(modelUrl, range, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return /* @__PURE__ */ Object.create(null); + } + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + const result = /* @__PURE__ */ Object.create(null); + for (let line = range.startLineNumber; line < range.endLineNumber; line++) { + const words = model.getLineWords(line, wordDefRegExp); + for (const word2 of words) { + if (!isNaN(Number(word2.word))) { + continue; + } + let array = result[word2.word]; + if (!array) { + array = []; + result[word2.word] = array; + } + array.push({ + startLineNumber: line, + startColumn: word2.startColumn, + endLineNumber: line, + endColumn: word2.endColumn + }); + } + } + return result; + }); + } + //#endregion + navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) { + return __awaiter2(this, void 0, void 0, function* () { + const model = this._getModel(modelUrl); + if (!model) { + return null; + } + const wordDefRegExp = new RegExp(wordDef, wordDefFlags); + if (range.startColumn === range.endColumn) { + range = { + startLineNumber: range.startLineNumber, + startColumn: range.startColumn, + endLineNumber: range.endLineNumber, + endColumn: range.endColumn + 1 + }; + } + const selectionText = model.getValueInRange(range); + const wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp); + if (!wordRange) { + return null; + } + const word2 = model.getValueInRange(wordRange); + const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word2, up); + return result; + }); + } + // ---- BEGIN foreign module support -------------------------------------------------------------------------- + loadForeignModule(moduleId, createData, foreignHostMethods) { + const proxyMethodRequest = (method, args) => { + return this._host.fhr(method, args); + }; + const foreignHost = createProxyObject(foreignHostMethods, proxyMethodRequest); + const ctx = { + host: foreignHost, + getMirrorModels: () => { + return this._getModels(); + } + }; + if (this._foreignModuleFactory) { + this._foreignModule = this._foreignModuleFactory(ctx, createData); + return Promise.resolve(getAllMethodNames(this._foreignModule)); + } + return Promise.reject(new Error(`Unexpected usage`)); + } + // foreign method request + 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(); + } + + // node_modules/monaco-editor/esm/vs/editor/editor.worker.js + var initialized = false; + function initialize(foreignModule) { + if (initialized) { + return; + } + initialized = true; + const simpleWorker = new SimpleWorkerServer((msg) => { + globalThis.postMessage(msg); + }, (host) => new EditorSimpleWorker(host, foreignModule)); + globalThis.onmessage = (e) => { + simpleWorker.onmessage(e.data); + }; + } + globalThis.onmessage = (e) => { + if (!initialized) { + initialize(null); + } + }; + + // node_modules/graphql/jsutils/devAssert.mjs + function devAssert(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error(message); + } + } + + // node_modules/graphql/jsutils/isObjectLike.mjs + function isObjectLike(value) { + return typeof value == "object" && value !== null; + } + + // node_modules/graphql/jsutils/invariant.mjs + function invariant(condition, message) { + const booleanCondition = Boolean(condition); + if (!booleanCondition) { + throw new Error( + message != null ? message : "Unexpected invariant triggered." + ); + } + } + + // node_modules/graphql/language/location.mjs + var LineRegExp = /\r\n|[\n\r]/g; + function getLocation(source, position) { + let lastLineStart = 0; + let line = 1; + for (const match of source.body.matchAll(LineRegExp)) { + typeof match.index === "number" || invariant(false); + if (match.index >= position) { + break; + } + lastLineStart = match.index + match[0].length; + line += 1; + } + return { + line, + column: position + 1 - lastLineStart + }; + } + + // node_modules/graphql/language/printLocation.mjs + function printLocation(location) { + return printSourceLocation( + location.source, + getLocation(location.source, location.start) + ); + } + function printSourceLocation(source, sourceLocation) { + const firstLineColumnOffset = source.locationOffset.column - 1; + const body = "".padStart(firstLineColumnOffset) + source.body; + const lineIndex = sourceLocation.line - 1; + const lineOffset = source.locationOffset.line - 1; + const lineNum = sourceLocation.line + lineOffset; + const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; + const columnNum = sourceLocation.column + columnOffset; + const locationStr = `${source.name}:${lineNum}:${columnNum} +`; + const lines = body.split(/\r\n|[\n\r]/g); + const locationLine = lines[lineIndex]; + if (locationLine.length > 120) { + const subLineIndex = Math.floor(columnNum / 80); + const subLineColumnNum = columnNum % 80; + const subLines = []; + for (let i = 0; i < locationLine.length; i += 80) { + subLines.push(locationLine.slice(i, i + 80)); + } + return locationStr + printPrefixedLines([ + [`${lineNum} |`, subLines[0]], + ...subLines.slice(1, subLineIndex + 1).map((subLine) => ["|", subLine]), + ["|", "^".padStart(subLineColumnNum)], + ["|", subLines[subLineIndex + 1]] + ]); + } + return locationStr + printPrefixedLines([ + // Lines specified like this: ["prefix", "string"], + [`${lineNum - 1} |`, lines[lineIndex - 1]], + [`${lineNum} |`, locationLine], + ["|", "^".padStart(columnNum)], + [`${lineNum + 1} |`, lines[lineIndex + 1]] + ]); + } + function printPrefixedLines(lines) { + const existingLines = lines.filter(([_, line]) => line !== void 0); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + return existingLines.map(([prefix, line]) => prefix.padStart(padLen) + (line ? " " + line : "")).join("\n"); + } + + // node_modules/graphql/error/GraphQLError.mjs + function toNormalizedOptions(args) { + const firstArg = args[0]; + if (firstArg == null || "kind" in firstArg || "length" in firstArg) { + return { + nodes: firstArg, + source: args[1], + positions: args[2], + path: args[3], + originalError: args[4], + extensions: args[5] + }; + } + return firstArg; + } + var GraphQLError = class _GraphQLError extends Error { + /** + * An array of `{ line, column }` locations within the source GraphQL document + * which correspond to this error. + * + * Errors during validation often contain multiple locations, for example to + * point out two things with the same name. Errors during execution include a + * single location, the field which produced the error. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array describing the JSON-path into the execution response which + * corresponds to this error. Only included for errors during execution. + * + * Enumerable, and appears in the result of JSON.stringify(). + */ + /** + * An array of GraphQL AST Nodes corresponding to this error. + */ + /** + * The source GraphQL document for the first location of this error. + * + * Note that if this Error represents more than one node, the source may not + * represent nodes after the first node. + */ + /** + * An array of character offsets within the source GraphQL document + * which correspond to this error. + */ + /** + * The original error thrown from a field resolver during execution. + */ + /** + * Extension fields to add to the formatted error. + */ + /** + * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. + */ + constructor(message, ...rawArgs) { + var _this$nodes, _nodeLocations$, _ref; + const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs); + super(message); + this.name = "GraphQLError"; + this.path = path !== null && path !== void 0 ? path : void 0; + this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0; + this.nodes = undefinedIfEmpty( + Array.isArray(nodes) ? nodes : nodes ? [nodes] : void 0 + ); + const nodeLocations = undefinedIfEmpty( + (_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null) + ); + this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; + this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start); + this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start)); + const originalExtensions = isObjectLike( + originalError === null || originalError === void 0 ? void 0 : originalError.extensions + ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0; + this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : /* @__PURE__ */ Object.create(null); + Object.defineProperties(this, { + message: { + writable: true, + enumerable: true + }, + name: { + enumerable: false + }, + nodes: { + enumerable: false + }, + source: { + enumerable: false + }, + positions: { + enumerable: false + }, + originalError: { + enumerable: false + } + }); + if (originalError !== null && originalError !== void 0 && originalError.stack) { + Object.defineProperty(this, "stack", { + value: originalError.stack, + writable: true, + configurable: true + }); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, _GraphQLError); + } else { + Object.defineProperty(this, "stack", { + value: Error().stack, + writable: true, + configurable: true + }); + } + } + get [Symbol.toStringTag]() { + return "GraphQLError"; + } + toString() { + let output = this.message; + if (this.nodes) { + for (const node of this.nodes) { + if (node.loc) { + output += "\n\n" + printLocation(node.loc); + } + } + } else if (this.source && this.locations) { + for (const location of this.locations) { + output += "\n\n" + printSourceLocation(this.source, location); + } + } + return output; + } + toJSON() { + const formattedError = { + message: this.message + }; + if (this.locations != null) { + formattedError.locations = this.locations; + } + if (this.path != null) { + formattedError.path = this.path; + } + if (this.extensions != null && Object.keys(this.extensions).length > 0) { + formattedError.extensions = this.extensions; + } + return formattedError; + } + }; + function undefinedIfEmpty(array) { + return array === void 0 || array.length === 0 ? void 0 : array; + } + + // node_modules/graphql/error/syntaxError.mjs + function syntaxError(source, position, description) { + return new GraphQLError(`Syntax Error: ${description}`, { + source, + positions: [position] + }); + } + + // node_modules/graphql/language/ast.mjs + var Location = class { + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The Token at which this Node begins. + */ + /** + * The Token at which this Node ends. + */ + /** + * The Source document the AST represents. + */ + constructor(startToken, endToken, source) { + this.start = startToken.start; + this.end = endToken.end; + this.startToken = startToken; + this.endToken = endToken; + this.source = source; + } + get [Symbol.toStringTag]() { + return "Location"; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } + }; + var Token2 = class { + /** + * The kind of Token. + */ + /** + * The character offset at which this Node begins. + */ + /** + * The character offset at which this Node ends. + */ + /** + * The 1-indexed line number on which this Token appears. + */ + /** + * The 1-indexed column number at which this Token begins. + */ + /** + * For non-punctuation tokens, represents the interpreted value of the token. + * + * Note: is undefined for punctuation tokens, but typed as string for + * convenience in the parser. + */ + /** + * Tokens exist as nodes in a double-linked-list amongst all tokens + * including ignored tokens. is always the first node and + * the last. + */ + constructor(kind, start, end, line, column, value) { + this.kind = kind; + this.start = start; + this.end = end; + this.line = line; + this.column = column; + this.value = value; + this.prev = null; + this.next = null; + } + get [Symbol.toStringTag]() { + return "Token"; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } + }; + var QueryDocumentKeys = { + Name: [], + Document: ["definitions"], + OperationDefinition: [ + "name", + "variableDefinitions", + "directives", + "selectionSet" + ], + VariableDefinition: ["variable", "type", "defaultValue", "directives"], + Variable: ["name"], + SelectionSet: ["selections"], + Field: ["alias", "name", "arguments", "directives", "selectionSet"], + Argument: ["name", "value"], + FragmentSpread: ["name", "directives"], + InlineFragment: ["typeCondition", "directives", "selectionSet"], + FragmentDefinition: [ + "name", + // Note: fragment variable definitions are deprecated and will removed in v17.0.0 + "variableDefinitions", + "typeCondition", + "directives", + "selectionSet" + ], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ["values"], + ObjectValue: ["fields"], + ObjectField: ["name", "value"], + Directive: ["name", "arguments"], + NamedType: ["name"], + ListType: ["type"], + NonNullType: ["type"], + SchemaDefinition: ["description", "directives", "operationTypes"], + OperationTypeDefinition: ["type"], + ScalarTypeDefinition: ["description", "name", "directives"], + ObjectTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + FieldDefinition: ["description", "name", "arguments", "type", "directives"], + InputValueDefinition: [ + "description", + "name", + "type", + "defaultValue", + "directives" + ], + InterfaceTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeDefinition: ["description", "name", "directives", "types"], + EnumTypeDefinition: ["description", "name", "directives", "values"], + EnumValueDefinition: ["description", "name", "directives"], + InputObjectTypeDefinition: ["description", "name", "directives", "fields"], + DirectiveDefinition: ["description", "name", "arguments", "locations"], + SchemaExtension: ["directives", "operationTypes"], + ScalarTypeExtension: ["name", "directives"], + ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], + InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], + UnionTypeExtension: ["name", "directives", "types"], + EnumTypeExtension: ["name", "directives", "values"], + InputObjectTypeExtension: ["name", "directives", "fields"] + }; + var kindValues = new Set(Object.keys(QueryDocumentKeys)); + function isNode(maybeNode) { + const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; + return typeof maybeKind === "string" && kindValues.has(maybeKind); + } + var OperationTypeNode; + (function(OperationTypeNode2) { + OperationTypeNode2["QUERY"] = "query"; + OperationTypeNode2["MUTATION"] = "mutation"; + OperationTypeNode2["SUBSCRIPTION"] = "subscription"; + })(OperationTypeNode || (OperationTypeNode = {})); + + // node_modules/graphql/language/directiveLocation.mjs + var DirectiveLocation; + (function(DirectiveLocation2) { + DirectiveLocation2["QUERY"] = "QUERY"; + DirectiveLocation2["MUTATION"] = "MUTATION"; + DirectiveLocation2["SUBSCRIPTION"] = "SUBSCRIPTION"; + DirectiveLocation2["FIELD"] = "FIELD"; + DirectiveLocation2["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION"; + DirectiveLocation2["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD"; + DirectiveLocation2["INLINE_FRAGMENT"] = "INLINE_FRAGMENT"; + DirectiveLocation2["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION"; + DirectiveLocation2["SCHEMA"] = "SCHEMA"; + DirectiveLocation2["SCALAR"] = "SCALAR"; + DirectiveLocation2["OBJECT"] = "OBJECT"; + DirectiveLocation2["FIELD_DEFINITION"] = "FIELD_DEFINITION"; + DirectiveLocation2["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION"; + DirectiveLocation2["INTERFACE"] = "INTERFACE"; + DirectiveLocation2["UNION"] = "UNION"; + DirectiveLocation2["ENUM"] = "ENUM"; + DirectiveLocation2["ENUM_VALUE"] = "ENUM_VALUE"; + DirectiveLocation2["INPUT_OBJECT"] = "INPUT_OBJECT"; + DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION"; + })(DirectiveLocation || (DirectiveLocation = {})); + + // node_modules/graphql/language/kinds.mjs + var Kind; + (function(Kind2) { + Kind2["NAME"] = "Name"; + Kind2["DOCUMENT"] = "Document"; + Kind2["OPERATION_DEFINITION"] = "OperationDefinition"; + Kind2["VARIABLE_DEFINITION"] = "VariableDefinition"; + Kind2["SELECTION_SET"] = "SelectionSet"; + Kind2["FIELD"] = "Field"; + Kind2["ARGUMENT"] = "Argument"; + Kind2["FRAGMENT_SPREAD"] = "FragmentSpread"; + Kind2["INLINE_FRAGMENT"] = "InlineFragment"; + Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition"; + Kind2["VARIABLE"] = "Variable"; + Kind2["INT"] = "IntValue"; + Kind2["FLOAT"] = "FloatValue"; + Kind2["STRING"] = "StringValue"; + Kind2["BOOLEAN"] = "BooleanValue"; + Kind2["NULL"] = "NullValue"; + Kind2["ENUM"] = "EnumValue"; + Kind2["LIST"] = "ListValue"; + Kind2["OBJECT"] = "ObjectValue"; + Kind2["OBJECT_FIELD"] = "ObjectField"; + Kind2["DIRECTIVE"] = "Directive"; + Kind2["NAMED_TYPE"] = "NamedType"; + Kind2["LIST_TYPE"] = "ListType"; + Kind2["NON_NULL_TYPE"] = "NonNullType"; + Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition"; + Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition"; + Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition"; + Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition"; + Kind2["FIELD_DEFINITION"] = "FieldDefinition"; + Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition"; + Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition"; + Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition"; + Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition"; + Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition"; + Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition"; + Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition"; + Kind2["SCHEMA_EXTENSION"] = "SchemaExtension"; + Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension"; + Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension"; + Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension"; + Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension"; + Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension"; + Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension"; + })(Kind || (Kind = {})); + + // node_modules/graphql/language/characterClasses.mjs + function isWhiteSpace(code) { + return code === 9 || code === 32; + } + function isDigit(code) { + return code >= 48 && code <= 57; + } + function isLetter(code) { + return code >= 97 && code <= 122 || // A-Z + code >= 65 && code <= 90; + } + function isNameStart(code) { + return isLetter(code) || code === 95; + } + function isNameContinue(code) { + return isLetter(code) || isDigit(code) || code === 95; + } + + // node_modules/graphql/language/blockString.mjs + function dedentBlockStringLines(lines) { + var _firstNonEmptyLine2; + let commonIndent = Number.MAX_SAFE_INTEGER; + let firstNonEmptyLine = null; + let lastNonEmptyLine = -1; + for (let i = 0; i < lines.length; ++i) { + var _firstNonEmptyLine; + const line = lines[i]; + const indent2 = leadingWhitespace(line); + if (indent2 === line.length) { + continue; + } + firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; + lastNonEmptyLine = i; + if (i !== 0 && indent2 < commonIndent) { + commonIndent = indent2; + } + } + return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice( + (_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, + lastNonEmptyLine + 1 + ); + } + function leadingWhitespace(str) { + let i = 0; + while (i < str.length && isWhiteSpace(str.charCodeAt(i))) { + ++i; + } + return i; + } + function printBlockString(value, options) { + const escapedValue = value.replace(/"""/g, '\\"""'); + const lines = escapedValue.split(/\r\n|[\n\r]/g); + const isSingleLine = lines.length === 1; + const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every((line) => line.length === 0 || isWhiteSpace(line.charCodeAt(0))); + const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); + const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; + const hasTrailingSlash = value.endsWith("\\"); + const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; + const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability + (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); + let result = ""; + const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0)); + if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) { + result += "\n"; + } + result += escapedValue; + if (printAsMultipleLines || forceTrailingNewline) { + result += "\n"; + } + return '"""' + result + '"""'; + } + + // node_modules/graphql/language/tokenKind.mjs + var TokenKind; + (function(TokenKind2) { + TokenKind2["SOF"] = ""; + TokenKind2["EOF"] = ""; + TokenKind2["BANG"] = "!"; + TokenKind2["DOLLAR"] = "$"; + TokenKind2["AMP"] = "&"; + TokenKind2["PAREN_L"] = "("; + TokenKind2["PAREN_R"] = ")"; + TokenKind2["SPREAD"] = "..."; + TokenKind2["COLON"] = ":"; + TokenKind2["EQUALS"] = "="; + TokenKind2["AT"] = "@"; + TokenKind2["BRACKET_L"] = "["; + TokenKind2["BRACKET_R"] = "]"; + TokenKind2["BRACE_L"] = "{"; + TokenKind2["PIPE"] = "|"; + TokenKind2["BRACE_R"] = "}"; + TokenKind2["NAME"] = "Name"; + TokenKind2["INT"] = "Int"; + TokenKind2["FLOAT"] = "Float"; + TokenKind2["STRING"] = "String"; + TokenKind2["BLOCK_STRING"] = "BlockString"; + TokenKind2["COMMENT"] = "Comment"; + })(TokenKind || (TokenKind = {})); + + // node_modules/graphql/language/lexer.mjs + var Lexer = class { + /** + * The previously focused non-ignored token. + */ + /** + * The currently focused non-ignored token. + */ + /** + * The (1-indexed) line containing the current token. + */ + /** + * The character offset at which the current line begins. + */ + constructor(source) { + const startOfFileToken = new Token2(TokenKind.SOF, 0, 0, 0, 0); + this.source = source; + this.lastToken = startOfFileToken; + this.token = startOfFileToken; + this.line = 1; + this.lineStart = 0; + } + get [Symbol.toStringTag]() { + return "Lexer"; + } + /** + * Advances the token stream to the next non-ignored token. + */ + advance() { + this.lastToken = this.token; + const token = this.token = this.lookahead(); + return token; + } + /** + * Looks ahead and returns the next non-ignored token, but does not change + * the state of Lexer. + */ + lookahead() { + let token = this.token; + if (token.kind !== TokenKind.EOF) { + do { + if (token.next) { + token = token.next; + } else { + const nextToken = readNextToken(this, token.end); + token.next = nextToken; + nextToken.prev = token; + token = nextToken; + } + } while (token.kind === TokenKind.COMMENT); + } + return token; + } + }; + function isPunctuatorTokenKind(kind) { + return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R; + } + function isUnicodeScalarValue(code) { + return code >= 0 && code <= 55295 || code >= 57344 && code <= 1114111; + } + function isSupplementaryCodePoint(body, location) { + return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1)); + } + function isLeadingSurrogate(code) { + return code >= 55296 && code <= 56319; + } + function isTrailingSurrogate(code) { + return code >= 56320 && code <= 57343; + } + function printCodePointAt(lexer, location) { + const code = lexer.source.body.codePointAt(location); + if (code === void 0) { + return TokenKind.EOF; + } else if (code >= 32 && code <= 126) { + const char = String.fromCodePoint(code); + return char === '"' ? `'"'` : `"${char}"`; + } + return "U+" + code.toString(16).toUpperCase().padStart(4, "0"); + } + function createToken(lexer, kind, start, end, value) { + const line = lexer.line; + const col = 1 + start - lexer.lineStart; + return new Token2(kind, start, end, line, col, value); + } + function readNextToken(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start; + while (position < bodyLength) { + const code = body.charCodeAt(position); + switch (code) { + case 65279: + case 9: + case 32: + case 44: + ++position; + continue; + case 10: + ++position; + ++lexer.line; + lexer.lineStart = position; + continue; + case 13: + if (body.charCodeAt(position + 1) === 10) { + position += 2; + } else { + ++position; + } + ++lexer.line; + lexer.lineStart = position; + continue; + case 35: + return readComment(lexer, position); + case 33: + return createToken(lexer, TokenKind.BANG, position, position + 1); + case 36: + return createToken(lexer, TokenKind.DOLLAR, position, position + 1); + case 38: + return createToken(lexer, TokenKind.AMP, position, position + 1); + case 40: + return createToken(lexer, TokenKind.PAREN_L, position, position + 1); + case 41: + return createToken(lexer, TokenKind.PAREN_R, position, position + 1); + case 46: + if (body.charCodeAt(position + 1) === 46 && body.charCodeAt(position + 2) === 46) { + return createToken(lexer, TokenKind.SPREAD, position, position + 3); + } + break; + case 58: + return createToken(lexer, TokenKind.COLON, position, position + 1); + case 61: + return createToken(lexer, TokenKind.EQUALS, position, position + 1); + case 64: + return createToken(lexer, TokenKind.AT, position, position + 1); + case 91: + return createToken(lexer, TokenKind.BRACKET_L, position, position + 1); + case 93: + return createToken(lexer, TokenKind.BRACKET_R, position, position + 1); + case 123: + return createToken(lexer, TokenKind.BRACE_L, position, position + 1); + case 124: + return createToken(lexer, TokenKind.PIPE, position, position + 1); + case 125: + return createToken(lexer, TokenKind.BRACE_R, position, position + 1); + case 34: + if (body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) { + return readBlockString(lexer, position); + } + return readString(lexer, position); + } + if (isDigit(code) || code === 45) { + return readNumber(lexer, position, code); + } + if (isNameStart(code)) { + return readName(lexer, position); + } + throw syntaxError( + lexer.source, + position, + code === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.` + ); + } + return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength); + } + function readComment(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 10 || code === 13) { + break; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + break; + } + } + return createToken( + lexer, + TokenKind.COMMENT, + start, + position, + body.slice(start + 1, position) + ); + } + function readNumber(lexer, start, firstCode) { + const body = lexer.source.body; + let position = start; + let code = firstCode; + let isFloat = false; + if (code === 45) { + code = body.charCodeAt(++position); + } + if (code === 48) { + code = body.charCodeAt(++position); + if (isDigit(code)) { + throw syntaxError( + lexer.source, + position, + `Invalid number, unexpected digit after 0: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } else { + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 46) { + isFloat = true; + code = body.charCodeAt(++position); + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 69 || code === 101) { + isFloat = true; + code = body.charCodeAt(++position); + if (code === 43 || code === 45) { + code = body.charCodeAt(++position); + } + position = readDigits(lexer, position, code); + code = body.charCodeAt(position); + } + if (code === 46 || isNameStart(code)) { + throw syntaxError( + lexer.source, + position, + `Invalid number, expected digit but got: ${printCodePointAt( + lexer, + position + )}.` + ); + } + return createToken( + lexer, + isFloat ? TokenKind.FLOAT : TokenKind.INT, + start, + position, + body.slice(start, position) + ); + } + function readDigits(lexer, start, firstCode) { + if (!isDigit(firstCode)) { + throw syntaxError( + lexer.source, + start, + `Invalid number, expected digit but got: ${printCodePointAt( + lexer, + start + )}.` + ); + } + const body = lexer.source.body; + let position = start + 1; + while (isDigit(body.charCodeAt(position))) { + ++position; + } + return position; + } + function readString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + let chunkStart = position; + let value = ""; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 34) { + value += body.slice(chunkStart, position); + return createToken(lexer, TokenKind.STRING, start, position + 1, value); + } + if (code === 92) { + value += body.slice(chunkStart, position); + const escape = body.charCodeAt(position + 1) === 117 ? body.charCodeAt(position + 2) === 123 ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position); + value += escape.value; + position += escape.size; + chunkStart = position; + continue; + } + if (code === 10 || code === 13) { + break; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw syntaxError( + lexer.source, + position, + `Invalid character within String: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } + throw syntaxError(lexer.source, position, "Unterminated string."); + } + function readEscapedUnicodeVariableWidth(lexer, position) { + const body = lexer.source.body; + let point = 0; + let size = 3; + while (size < 12) { + const code = body.charCodeAt(position + size++); + if (code === 125) { + if (size < 5 || !isUnicodeScalarValue(point)) { + break; + } + return { + value: String.fromCodePoint(point), + size + }; + } + point = point << 4 | readHexDigit(code); + if (point < 0) { + break; + } + } + throw syntaxError( + lexer.source, + position, + `Invalid Unicode escape sequence: "${body.slice( + position, + position + size + )}".` + ); + } + function readEscapedUnicodeFixedWidth(lexer, position) { + const body = lexer.source.body; + const code = read16BitHexCode(body, position + 2); + if (isUnicodeScalarValue(code)) { + return { + value: String.fromCodePoint(code), + size: 6 + }; + } + if (isLeadingSurrogate(code)) { + if (body.charCodeAt(position + 6) === 92 && body.charCodeAt(position + 7) === 117) { + const trailingCode = read16BitHexCode(body, position + 8); + if (isTrailingSurrogate(trailingCode)) { + return { + value: String.fromCodePoint(code, trailingCode), + size: 12 + }; + } + } + } + throw syntaxError( + lexer.source, + position, + `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".` + ); + } + function read16BitHexCode(body, position) { + return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3)); + } + function readHexDigit(code) { + return code >= 48 && code <= 57 ? code - 48 : code >= 65 && code <= 70 ? code - 55 : code >= 97 && code <= 102 ? code - 87 : -1; + } + function readEscapedCharacter(lexer, position) { + const body = lexer.source.body; + const code = body.charCodeAt(position + 1); + switch (code) { + case 34: + return { + value: '"', + size: 2 + }; + case 92: + return { + value: "\\", + size: 2 + }; + case 47: + return { + value: "/", + size: 2 + }; + case 98: + return { + value: "\b", + size: 2 + }; + case 102: + return { + value: "\f", + size: 2 + }; + case 110: + return { + value: "\n", + size: 2 + }; + case 114: + return { + value: "\r", + size: 2 + }; + case 116: + return { + value: " ", + size: 2 + }; + } + throw syntaxError( + lexer.source, + position, + `Invalid character escape sequence: "${body.slice( + position, + position + 2 + )}".` + ); + } + function readBlockString(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let lineStart = lexer.lineStart; + let position = start + 3; + let chunkStart = position; + let currentLine = ""; + const blockLines = []; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + const token = createToken( + lexer, + TokenKind.BLOCK_STRING, + start, + position + 3, + // Return a string of the lines joined with U+000A. + dedentBlockStringLines(blockLines).join("\n") + ); + lexer.line += blockLines.length - 1; + lexer.lineStart = lineStart; + return token; + } + if (code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) { + currentLine += body.slice(chunkStart, position); + chunkStart = position + 1; + position += 4; + continue; + } + if (code === 10 || code === 13) { + currentLine += body.slice(chunkStart, position); + blockLines.push(currentLine); + if (code === 13 && body.charCodeAt(position + 1) === 10) { + position += 2; + } else { + ++position; + } + currentLine = ""; + chunkStart = position; + lineStart = position; + continue; + } + if (isUnicodeScalarValue(code)) { + ++position; + } else if (isSupplementaryCodePoint(body, position)) { + position += 2; + } else { + throw syntaxError( + lexer.source, + position, + `Invalid character within String: ${printCodePointAt( + lexer, + position + )}.` + ); + } + } + throw syntaxError(lexer.source, position, "Unterminated string."); + } + function readName(lexer, start) { + const body = lexer.source.body; + const bodyLength = body.length; + let position = start + 1; + while (position < bodyLength) { + const code = body.charCodeAt(position); + if (isNameContinue(code)) { + ++position; + } else { + break; + } + } + return createToken( + lexer, + TokenKind.NAME, + start, + position, + body.slice(start, position) + ); + } + + // node_modules/graphql/jsutils/inspect.mjs + var MAX_ARRAY_LENGTH = 10; + var MAX_RECURSIVE_DEPTH = 2; + function inspect(value) { + return formatValue(value, []); + } + function formatValue(value, seenValues) { + switch (typeof value) { + case "string": + return JSON.stringify(value); + case "function": + return value.name ? `[function ${value.name}]` : "[function]"; + case "object": + return formatObjectValue(value, seenValues); + default: + return String(value); + } + } + function formatObjectValue(value, previouslySeenValues) { + if (value === null) { + return "null"; + } + if (previouslySeenValues.includes(value)) { + return "[Circular]"; + } + const seenValues = [...previouslySeenValues, value]; + if (isJSONable(value)) { + const jsonValue = value.toJSON(); + if (jsonValue !== value) { + return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues); + } + } else if (Array.isArray(value)) { + return formatArray(value, seenValues); + } + return formatObject(value, seenValues); + } + function isJSONable(value) { + return typeof value.toJSON === "function"; + } + function formatObject(object, seenValues) { + const entries = Object.entries(object); + if (entries.length === 0) { + return "{}"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return "[" + getObjectTag(object) + "]"; + } + const properties = entries.map( + ([key, value]) => key + ": " + formatValue(value, seenValues) + ); + return "{ " + properties.join(", ") + " }"; + } + function formatArray(array, seenValues) { + if (array.length === 0) { + return "[]"; + } + if (seenValues.length > MAX_RECURSIVE_DEPTH) { + return "[Array]"; + } + const len = Math.min(MAX_ARRAY_LENGTH, array.length); + const remaining = array.length - len; + const items = []; + for (let i = 0; i < len; ++i) { + items.push(formatValue(array[i], seenValues)); + } + if (remaining === 1) { + items.push("... 1 more item"); + } else if (remaining > 1) { + items.push(`... ${remaining} more items`); + } + return "[" + items.join(", ") + "]"; + } + function getObjectTag(object) { + const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, ""); + if (tag === "Object" && typeof object.constructor === "function") { + const name2 = object.constructor.name; + if (typeof name2 === "string" && name2 !== "") { + return name2; + } + } + return tag; + } + + // node_modules/graphql/jsutils/instanceOf.mjs + var instanceOf = ( + /* c8 ignore next 6 */ + // FIXME: https://github.com/graphql/graphql-js/issues/2317 + globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function instanceOf2(value, constructor) { + return value instanceof constructor; + } : function instanceOf3(value, constructor) { + if (value instanceof constructor) { + return true; + } + if (typeof value === "object" && value !== null) { + var _value$constructor; + const className = constructor.prototype[Symbol.toStringTag]; + const valueClassName = ( + // We still need to support constructor's name to detect conflicts with older versions of this library. + Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name + ); + if (className === valueClassName) { + const stringifiedValue = inspect(value); + throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); + } + } + return false; + } + ); + + // node_modules/graphql/language/source.mjs + var Source = class { + constructor(body, name2 = "GraphQL request", locationOffset = { + line: 1, + column: 1 + }) { + typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`); + this.body = body; + this.name = name2; + this.locationOffset = locationOffset; + this.locationOffset.line > 0 || devAssert( + false, + "line in locationOffset is 1-indexed and must be positive." + ); + this.locationOffset.column > 0 || devAssert( + false, + "column in locationOffset is 1-indexed and must be positive." + ); + } + get [Symbol.toStringTag]() { + return "Source"; + } + }; + function isSource(source) { + return instanceOf(source, Source); + } + + // node_modules/graphql/language/parser.mjs + function parse2(source, options) { + const parser = new Parser(source, options); + return parser.parseDocument(); + } + function parseValue(source, options) { + const parser = new Parser(source, options); + parser.expectToken(TokenKind.SOF); + const value = parser.parseValueLiteral(false); + parser.expectToken(TokenKind.EOF); + return value; + } + var Parser = class { + constructor(source, options = {}) { + const sourceObj = isSource(source) ? source : new Source(source); + this._lexer = new Lexer(sourceObj); + this._options = options; + this._tokenCounter = 0; + } + /** + * Converts a name lex token into a name parse node. + */ + parseName() { + const token = this.expectToken(TokenKind.NAME); + return this.node(token, { + kind: Kind.NAME, + value: token.value + }); + } + // Implements the parsing rules in the Document section. + /** + * Document : Definition+ + */ + parseDocument() { + return this.node(this._lexer.token, { + kind: Kind.DOCUMENT, + definitions: this.many( + TokenKind.SOF, + this.parseDefinition, + TokenKind.EOF + ) + }); + } + /** + * Definition : + * - ExecutableDefinition + * - TypeSystemDefinition + * - TypeSystemExtension + * + * ExecutableDefinition : + * - OperationDefinition + * - FragmentDefinition + * + * TypeSystemDefinition : + * - SchemaDefinition + * - TypeDefinition + * - DirectiveDefinition + * + * TypeDefinition : + * - ScalarTypeDefinition + * - ObjectTypeDefinition + * - InterfaceTypeDefinition + * - UnionTypeDefinition + * - EnumTypeDefinition + * - InputObjectTypeDefinition + */ + parseDefinition() { + if (this.peek(TokenKind.BRACE_L)) { + return this.parseOperationDefinition(); + } + const hasDescription = this.peekDescription(); + const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token; + if (keywordToken.kind === TokenKind.NAME) { + switch (keywordToken.value) { + case "schema": + return this.parseSchemaDefinition(); + case "scalar": + return this.parseScalarTypeDefinition(); + case "type": + return this.parseObjectTypeDefinition(); + case "interface": + return this.parseInterfaceTypeDefinition(); + case "union": + return this.parseUnionTypeDefinition(); + case "enum": + return this.parseEnumTypeDefinition(); + case "input": + return this.parseInputObjectTypeDefinition(); + case "directive": + return this.parseDirectiveDefinition(); + } + if (hasDescription) { + throw syntaxError( + this._lexer.source, + this._lexer.token.start, + "Unexpected description, descriptions are supported only on type definitions." + ); + } + switch (keywordToken.value) { + case "query": + case "mutation": + case "subscription": + return this.parseOperationDefinition(); + case "fragment": + return this.parseFragmentDefinition(); + case "extend": + return this.parseTypeSystemExtension(); + } + } + throw this.unexpected(keywordToken); + } + // Implements the parsing rules in the Operations section. + /** + * OperationDefinition : + * - SelectionSet + * - OperationType Name? VariableDefinitions? Directives? SelectionSet + */ + parseOperationDefinition() { + const start = this._lexer.token; + if (this.peek(TokenKind.BRACE_L)) { + return this.node(start, { + kind: Kind.OPERATION_DEFINITION, + operation: OperationTypeNode.QUERY, + name: void 0, + variableDefinitions: [], + directives: [], + selectionSet: this.parseSelectionSet() + }); + } + const operation = this.parseOperationType(); + let name2; + if (this.peek(TokenKind.NAME)) { + name2 = this.parseName(); + } + return this.node(start, { + kind: Kind.OPERATION_DEFINITION, + operation, + name: name2, + variableDefinitions: this.parseVariableDefinitions(), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * OperationType : one of query mutation subscription + */ + parseOperationType() { + const operationToken = this.expectToken(TokenKind.NAME); + switch (operationToken.value) { + case "query": + return OperationTypeNode.QUERY; + case "mutation": + return OperationTypeNode.MUTATION; + case "subscription": + return OperationTypeNode.SUBSCRIPTION; + } + throw this.unexpected(operationToken); + } + /** + * VariableDefinitions : ( VariableDefinition+ ) + */ + parseVariableDefinitions() { + return this.optionalMany( + TokenKind.PAREN_L, + this.parseVariableDefinition, + TokenKind.PAREN_R + ); + } + /** + * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? + */ + parseVariableDefinition() { + return this.node(this._lexer.token, { + kind: Kind.VARIABLE_DEFINITION, + variable: this.parseVariable(), + type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()), + defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseConstValueLiteral() : void 0, + directives: this.parseConstDirectives() + }); + } + /** + * Variable : $ Name + */ + parseVariable() { + const start = this._lexer.token; + this.expectToken(TokenKind.DOLLAR); + return this.node(start, { + kind: Kind.VARIABLE, + name: this.parseName() + }); + } + /** + * ``` + * SelectionSet : { Selection+ } + * ``` + */ + parseSelectionSet() { + return this.node(this._lexer.token, { + kind: Kind.SELECTION_SET, + selections: this.many( + TokenKind.BRACE_L, + this.parseSelection, + TokenKind.BRACE_R + ) + }); + } + /** + * Selection : + * - Field + * - FragmentSpread + * - InlineFragment + */ + parseSelection() { + return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField(); + } + /** + * Field : Alias? Name Arguments? Directives? SelectionSet? + * + * Alias : Name : + */ + parseField() { + const start = this._lexer.token; + const nameOrAlias = this.parseName(); + let alias; + let name2; + if (this.expectOptionalToken(TokenKind.COLON)) { + alias = nameOrAlias; + name2 = this.parseName(); + } else { + name2 = nameOrAlias; + } + return this.node(start, { + kind: Kind.FIELD, + alias, + name: name2, + arguments: this.parseArguments(false), + directives: this.parseDirectives(false), + selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0 + }); + } + /** + * Arguments[Const] : ( Argument[?Const]+ ) + */ + parseArguments(isConst) { + const item = isConst ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R); + } + /** + * Argument[Const] : Name : Value[?Const] + */ + parseArgument(isConst = false) { + const start = this._lexer.token; + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + return this.node(start, { + kind: Kind.ARGUMENT, + name: name2, + value: this.parseValueLiteral(isConst) + }); + } + parseConstArgument() { + return this.parseArgument(true); + } + // Implements the parsing rules in the Fragments section. + /** + * Corresponds to both FragmentSpread and InlineFragment in the spec. + * + * FragmentSpread : ... FragmentName Directives? + * + * InlineFragment : ... TypeCondition? Directives? SelectionSet + */ + parseFragment() { + const start = this._lexer.token; + this.expectToken(TokenKind.SPREAD); + const hasTypeCondition = this.expectOptionalKeyword("on"); + if (!hasTypeCondition && this.peek(TokenKind.NAME)) { + return this.node(start, { + kind: Kind.FRAGMENT_SPREAD, + name: this.parseFragmentName(), + directives: this.parseDirectives(false) + }); + } + return this.node(start, { + kind: Kind.INLINE_FRAGMENT, + typeCondition: hasTypeCondition ? this.parseNamedType() : void 0, + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * FragmentDefinition : + * - fragment FragmentName on TypeCondition Directives? SelectionSet + * + * TypeCondition : NamedType + */ + parseFragmentDefinition() { + const start = this._lexer.token; + this.expectKeyword("fragment"); + if (this._options.allowLegacyFragmentVariables === true) { + return this.node(start, { + kind: Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + variableDefinitions: this.parseVariableDefinitions(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + return this.node(start, { + kind: Kind.FRAGMENT_DEFINITION, + name: this.parseFragmentName(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(false), + selectionSet: this.parseSelectionSet() + }); + } + /** + * FragmentName : Name but not `on` + */ + parseFragmentName() { + if (this._lexer.token.value === "on") { + throw this.unexpected(); + } + return this.parseName(); + } + // Implements the parsing rules in the Values section. + /** + * Value[Const] : + * - [~Const] Variable + * - IntValue + * - FloatValue + * - StringValue + * - BooleanValue + * - NullValue + * - EnumValue + * - ListValue[?Const] + * - ObjectValue[?Const] + * + * BooleanValue : one of `true` `false` + * + * NullValue : `null` + * + * EnumValue : Name but not `true`, `false` or `null` + */ + parseValueLiteral(isConst) { + const token = this._lexer.token; + switch (token.kind) { + case TokenKind.BRACKET_L: + return this.parseList(isConst); + case TokenKind.BRACE_L: + return this.parseObject(isConst); + case TokenKind.INT: + this.advanceLexer(); + return this.node(token, { + kind: Kind.INT, + value: token.value + }); + case TokenKind.FLOAT: + this.advanceLexer(); + return this.node(token, { + kind: Kind.FLOAT, + value: token.value + }); + case TokenKind.STRING: + case TokenKind.BLOCK_STRING: + return this.parseStringLiteral(); + case TokenKind.NAME: + this.advanceLexer(); + switch (token.value) { + case "true": + return this.node(token, { + kind: Kind.BOOLEAN, + value: true + }); + case "false": + return this.node(token, { + kind: Kind.BOOLEAN, + value: false + }); + case "null": + return this.node(token, { + kind: Kind.NULL + }); + default: + return this.node(token, { + kind: Kind.ENUM, + value: token.value + }); + } + case TokenKind.DOLLAR: + if (isConst) { + this.expectToken(TokenKind.DOLLAR); + if (this._lexer.token.kind === TokenKind.NAME) { + const varName = this._lexer.token.value; + throw syntaxError( + this._lexer.source, + token.start, + `Unexpected variable "$${varName}" in constant value.` + ); + } else { + throw this.unexpected(token); + } + } + return this.parseVariable(); + default: + throw this.unexpected(); + } + } + parseConstValueLiteral() { + return this.parseValueLiteral(true); + } + parseStringLiteral() { + const token = this._lexer.token; + this.advanceLexer(); + return this.node(token, { + kind: Kind.STRING, + value: token.value, + block: token.kind === TokenKind.BLOCK_STRING + }); + } + /** + * ListValue[Const] : + * - [ ] + * - [ Value[?Const]+ ] + */ + parseList(isConst) { + const item = () => this.parseValueLiteral(isConst); + return this.node(this._lexer.token, { + kind: Kind.LIST, + values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R) + }); + } + /** + * ``` + * ObjectValue[Const] : + * - { } + * - { ObjectField[?Const]+ } + * ``` + */ + parseObject(isConst) { + const item = () => this.parseObjectField(isConst); + return this.node(this._lexer.token, { + kind: Kind.OBJECT, + fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R) + }); + } + /** + * ObjectField[Const] : Name : Value[?Const] + */ + parseObjectField(isConst) { + const start = this._lexer.token; + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + return this.node(start, { + kind: Kind.OBJECT_FIELD, + name: name2, + value: this.parseValueLiteral(isConst) + }); + } + // Implements the parsing rules in the Directives section. + /** + * Directives[Const] : Directive[?Const]+ + */ + parseDirectives(isConst) { + const directives = []; + while (this.peek(TokenKind.AT)) { + directives.push(this.parseDirective(isConst)); + } + return directives; + } + parseConstDirectives() { + return this.parseDirectives(true); + } + /** + * ``` + * Directive[Const] : @ Name Arguments[?Const]? + * ``` + */ + parseDirective(isConst) { + const start = this._lexer.token; + this.expectToken(TokenKind.AT); + return this.node(start, { + kind: Kind.DIRECTIVE, + name: this.parseName(), + arguments: this.parseArguments(isConst) + }); + } + // Implements the parsing rules in the Types section. + /** + * Type : + * - NamedType + * - ListType + * - NonNullType + */ + parseTypeReference() { + const start = this._lexer.token; + let type2; + if (this.expectOptionalToken(TokenKind.BRACKET_L)) { + const innerType = this.parseTypeReference(); + this.expectToken(TokenKind.BRACKET_R); + type2 = this.node(start, { + kind: Kind.LIST_TYPE, + type: innerType + }); + } else { + type2 = this.parseNamedType(); + } + if (this.expectOptionalToken(TokenKind.BANG)) { + return this.node(start, { + kind: Kind.NON_NULL_TYPE, + type: type2 + }); + } + return type2; + } + /** + * NamedType : Name + */ + parseNamedType() { + return this.node(this._lexer.token, { + kind: Kind.NAMED_TYPE, + name: this.parseName() + }); + } + // Implements the parsing rules in the Type Definition section. + peekDescription() { + return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING); + } + /** + * Description : StringValue + */ + parseDescription() { + if (this.peekDescription()) { + return this.parseStringLiteral(); + } + } + /** + * ``` + * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } + * ``` + */ + parseSchemaDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("schema"); + const directives = this.parseConstDirectives(); + const operationTypes = this.many( + TokenKind.BRACE_L, + this.parseOperationTypeDefinition, + TokenKind.BRACE_R + ); + return this.node(start, { + kind: Kind.SCHEMA_DEFINITION, + description, + directives, + operationTypes + }); + } + /** + * OperationTypeDefinition : OperationType : NamedType + */ + parseOperationTypeDefinition() { + const start = this._lexer.token; + const operation = this.parseOperationType(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseNamedType(); + return this.node(start, { + kind: Kind.OPERATION_TYPE_DEFINITION, + operation, + type: type2 + }); + } + /** + * ScalarTypeDefinition : Description? scalar Name Directives[Const]? + */ + parseScalarTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("scalar"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.SCALAR_TYPE_DEFINITION, + description, + name: name2, + directives + }); + } + /** + * ObjectTypeDefinition : + * Description? + * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? + */ + parseObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("type"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: Kind.OBJECT_TYPE_DEFINITION, + description, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * ImplementsInterfaces : + * - implements `&`? NamedType + * - ImplementsInterfaces & NamedType + */ + parseImplementsInterfaces() { + return this.expectOptionalKeyword("implements") ? this.delimitedMany(TokenKind.AMP, this.parseNamedType) : []; + } + /** + * ``` + * FieldsDefinition : { FieldDefinition+ } + * ``` + */ + parseFieldsDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseFieldDefinition, + TokenKind.BRACE_R + ); + } + /** + * FieldDefinition : + * - Description? Name ArgumentsDefinition? : Type Directives[Const]? + */ + parseFieldDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseName(); + const args = this.parseArgumentDefs(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseTypeReference(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.FIELD_DEFINITION, + description, + name: name2, + arguments: args, + type: type2, + directives + }); + } + /** + * ArgumentsDefinition : ( InputValueDefinition+ ) + */ + parseArgumentDefs() { + return this.optionalMany( + TokenKind.PAREN_L, + this.parseInputValueDef, + TokenKind.PAREN_R + ); + } + /** + * InputValueDefinition : + * - Description? Name : Type DefaultValue? Directives[Const]? + */ + parseInputValueDef() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseName(); + this.expectToken(TokenKind.COLON); + const type2 = this.parseTypeReference(); + let defaultValue; + if (this.expectOptionalToken(TokenKind.EQUALS)) { + defaultValue = this.parseConstValueLiteral(); + } + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.INPUT_VALUE_DEFINITION, + description, + name: name2, + type: type2, + defaultValue, + directives + }); + } + /** + * InterfaceTypeDefinition : + * - Description? interface Name Directives[Const]? FieldsDefinition? + */ + parseInterfaceTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("interface"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + return this.node(start, { + kind: Kind.INTERFACE_TYPE_DEFINITION, + description, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeDefinition : + * - Description? union Name Directives[Const]? UnionMemberTypes? + */ + parseUnionTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("union"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + return this.node(start, { + kind: Kind.UNION_TYPE_DEFINITION, + description, + name: name2, + directives, + types + }); + } + /** + * UnionMemberTypes : + * - = `|`? NamedType + * - UnionMemberTypes | NamedType + */ + parseUnionMemberTypes() { + return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : []; + } + /** + * EnumTypeDefinition : + * - Description? enum Name Directives[Const]? EnumValuesDefinition? + */ + parseEnumTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("enum"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + return this.node(start, { + kind: Kind.ENUM_TYPE_DEFINITION, + description, + name: name2, + directives, + values + }); + } + /** + * ``` + * EnumValuesDefinition : { EnumValueDefinition+ } + * ``` + */ + parseEnumValuesDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseEnumValueDefinition, + TokenKind.BRACE_R + ); + } + /** + * EnumValueDefinition : Description? EnumValue Directives[Const]? + */ + parseEnumValueDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + const name2 = this.parseEnumValueName(); + const directives = this.parseConstDirectives(); + return this.node(start, { + kind: Kind.ENUM_VALUE_DEFINITION, + description, + name: name2, + directives + }); + } + /** + * EnumValue : Name but not `true`, `false` or `null` + */ + parseEnumValueName() { + if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") { + throw syntaxError( + this._lexer.source, + this._lexer.token.start, + `${getTokenDesc( + this._lexer.token + )} is reserved and cannot be used for an enum value.` + ); + } + return this.parseName(); + } + /** + * InputObjectTypeDefinition : + * - Description? input Name Directives[Const]? InputFieldsDefinition? + */ + parseInputObjectTypeDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("input"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + return this.node(start, { + kind: Kind.INPUT_OBJECT_TYPE_DEFINITION, + description, + name: name2, + directives, + fields + }); + } + /** + * ``` + * InputFieldsDefinition : { InputValueDefinition+ } + * ``` + */ + parseInputFieldsDefinition() { + return this.optionalMany( + TokenKind.BRACE_L, + this.parseInputValueDef, + TokenKind.BRACE_R + ); + } + /** + * TypeSystemExtension : + * - SchemaExtension + * - TypeExtension + * + * TypeExtension : + * - ScalarTypeExtension + * - ObjectTypeExtension + * - InterfaceTypeExtension + * - UnionTypeExtension + * - EnumTypeExtension + * - InputObjectTypeDefinition + */ + parseTypeSystemExtension() { + const keywordToken = this._lexer.lookahead(); + if (keywordToken.kind === TokenKind.NAME) { + switch (keywordToken.value) { + case "schema": + return this.parseSchemaExtension(); + case "scalar": + return this.parseScalarTypeExtension(); + case "type": + return this.parseObjectTypeExtension(); + case "interface": + return this.parseInterfaceTypeExtension(); + case "union": + return this.parseUnionTypeExtension(); + case "enum": + return this.parseEnumTypeExtension(); + case "input": + return this.parseInputObjectTypeExtension(); + } + } + throw this.unexpected(keywordToken); + } + /** + * ``` + * SchemaExtension : + * - extend schema Directives[Const]? { OperationTypeDefinition+ } + * - extend schema Directives[Const] + * ``` + */ + parseSchemaExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("schema"); + const directives = this.parseConstDirectives(); + const operationTypes = this.optionalMany( + TokenKind.BRACE_L, + this.parseOperationTypeDefinition, + TokenKind.BRACE_R + ); + if (directives.length === 0 && operationTypes.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.SCHEMA_EXTENSION, + directives, + operationTypes + }); + } + /** + * ScalarTypeExtension : + * - extend scalar Name Directives[Const] + */ + parseScalarTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("scalar"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + if (directives.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.SCALAR_TYPE_EXTENSION, + name: name2, + directives + }); + } + /** + * ObjectTypeExtension : + * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend type Name ImplementsInterfaces? Directives[Const] + * - extend type Name ImplementsInterfaces + */ + parseObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("type"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.OBJECT_TYPE_EXTENSION, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * InterfaceTypeExtension : + * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition + * - extend interface Name ImplementsInterfaces? Directives[Const] + * - extend interface Name ImplementsInterfaces + */ + parseInterfaceTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("interface"); + const name2 = this.parseName(); + const interfaces = this.parseImplementsInterfaces(); + const directives = this.parseConstDirectives(); + const fields = this.parseFieldsDefinition(); + if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.INTERFACE_TYPE_EXTENSION, + name: name2, + interfaces, + directives, + fields + }); + } + /** + * UnionTypeExtension : + * - extend union Name Directives[Const]? UnionMemberTypes + * - extend union Name Directives[Const] + */ + parseUnionTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("union"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const types = this.parseUnionMemberTypes(); + if (directives.length === 0 && types.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.UNION_TYPE_EXTENSION, + name: name2, + directives, + types + }); + } + /** + * EnumTypeExtension : + * - extend enum Name Directives[Const]? EnumValuesDefinition + * - extend enum Name Directives[Const] + */ + parseEnumTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("enum"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const values = this.parseEnumValuesDefinition(); + if (directives.length === 0 && values.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.ENUM_TYPE_EXTENSION, + name: name2, + directives, + values + }); + } + /** + * InputObjectTypeExtension : + * - extend input Name Directives[Const]? InputFieldsDefinition + * - extend input Name Directives[Const] + */ + parseInputObjectTypeExtension() { + const start = this._lexer.token; + this.expectKeyword("extend"); + this.expectKeyword("input"); + const name2 = this.parseName(); + const directives = this.parseConstDirectives(); + const fields = this.parseInputFieldsDefinition(); + if (directives.length === 0 && fields.length === 0) { + throw this.unexpected(); + } + return this.node(start, { + kind: Kind.INPUT_OBJECT_TYPE_EXTENSION, + name: name2, + directives, + fields + }); + } + /** + * ``` + * DirectiveDefinition : + * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations + * ``` + */ + parseDirectiveDefinition() { + const start = this._lexer.token; + const description = this.parseDescription(); + this.expectKeyword("directive"); + this.expectToken(TokenKind.AT); + const name2 = this.parseName(); + const args = this.parseArgumentDefs(); + const repeatable = this.expectOptionalKeyword("repeatable"); + this.expectKeyword("on"); + const locations = this.parseDirectiveLocations(); + return this.node(start, { + kind: Kind.DIRECTIVE_DEFINITION, + description, + name: name2, + arguments: args, + repeatable, + locations + }); + } + /** + * DirectiveLocations : + * - `|`? DirectiveLocation + * - DirectiveLocations | DirectiveLocation + */ + parseDirectiveLocations() { + return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation); + } + /* + * DirectiveLocation : + * - ExecutableDirectiveLocation + * - TypeSystemDirectiveLocation + * + * ExecutableDirectiveLocation : one of + * `QUERY` + * `MUTATION` + * `SUBSCRIPTION` + * `FIELD` + * `FRAGMENT_DEFINITION` + * `FRAGMENT_SPREAD` + * `INLINE_FRAGMENT` + * + * TypeSystemDirectiveLocation : one of + * `SCHEMA` + * `SCALAR` + * `OBJECT` + * `FIELD_DEFINITION` + * `ARGUMENT_DEFINITION` + * `INTERFACE` + * `UNION` + * `ENUM` + * `ENUM_VALUE` + * `INPUT_OBJECT` + * `INPUT_FIELD_DEFINITION` + */ + parseDirectiveLocation() { + const start = this._lexer.token; + const name2 = this.parseName(); + if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name2.value)) { + return name2; + } + throw this.unexpected(start); + } + // Core parsing utility functions + /** + * Returns a node that, if configured to do so, sets a "loc" field as a + * location object, used to identify the place in the source that created a + * given parsed object. + */ + node(startToken, node) { + if (this._options.noLocation !== true) { + node.loc = new Location( + startToken, + this._lexer.lastToken, + this._lexer.source + ); + } + return node; + } + /** + * Determines if the next token is of a given kind + */ + peek(kind) { + return this._lexer.token.kind === kind; + } + /** + * If the next token is of the given kind, return that token after advancing the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + expectToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return token; + } + throw syntaxError( + this._lexer.source, + token.start, + `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.` + ); + } + /** + * If the next token is of the given kind, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ + expectOptionalToken(kind) { + const token = this._lexer.token; + if (token.kind === kind) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * If the next token is a given keyword, advance the lexer. + * Otherwise, do not change the parser state and throw an error. + */ + expectKeyword(value) { + const token = this._lexer.token; + if (token.kind === TokenKind.NAME && token.value === value) { + this.advanceLexer(); + } else { + throw syntaxError( + this._lexer.source, + token.start, + `Expected "${value}", found ${getTokenDesc(token)}.` + ); + } + } + /** + * If the next token is a given keyword, return "true" after advancing the lexer. + * Otherwise, do not change the parser state and return "false". + */ + expectOptionalKeyword(value) { + const token = this._lexer.token; + if (token.kind === TokenKind.NAME && token.value === value) { + this.advanceLexer(); + return true; + } + return false; + } + /** + * Helper function for creating an error when an unexpected lexed token is encountered. + */ + unexpected(atToken) { + const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; + return syntaxError( + this._lexer.source, + token.start, + `Unexpected ${getTokenDesc(token)}.` + ); + } + /** + * Returns a possibly empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + any(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + while (!this.expectOptionalToken(closeKind)) { + nodes.push(parseFn.call(this)); + } + return nodes; + } + /** + * Returns a list of parse nodes, determined by the parseFn. + * It can be empty only if open token is missing otherwise it will always return non-empty list + * that begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + optionalMany(openKind, parseFn, closeKind) { + if (this.expectOptionalToken(openKind)) { + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + return []; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list begins with a lex token of openKind and ends with a lex token of closeKind. + * Advances the parser to the next lex token after the closing token. + */ + many(openKind, parseFn, closeKind) { + this.expectToken(openKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (!this.expectOptionalToken(closeKind)); + return nodes; + } + /** + * Returns a non-empty list of parse nodes, determined by the parseFn. + * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. + * Advances the parser to the next lex token after last item in the list. + */ + delimitedMany(delimiterKind, parseFn) { + this.expectOptionalToken(delimiterKind); + const nodes = []; + do { + nodes.push(parseFn.call(this)); + } while (this.expectOptionalToken(delimiterKind)); + return nodes; + } + advanceLexer() { + const { maxTokens } = this._options; + const token = this._lexer.advance(); + if (maxTokens !== void 0 && token.kind !== TokenKind.EOF) { + ++this._tokenCounter; + if (this._tokenCounter > maxTokens) { + throw syntaxError( + this._lexer.source, + token.start, + `Document contains more that ${maxTokens} tokens. Parsing aborted.` + ); + } + } + } + }; + function getTokenDesc(token) { + const value = token.value; + return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : ""); + } + function getTokenKindDesc(kind) { + return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind; + } + + // node_modules/graphql/jsutils/didYouMean.mjs + var MAX_SUGGESTIONS = 5; + function didYouMean(firstArg, secondArg) { + const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg]; + let message = " Did you mean "; + if (subMessage) { + message += subMessage + " "; + } + const suggestions = suggestionsArg.map((x) => `"${x}"`); + switch (suggestions.length) { + case 0: + return ""; + case 1: + return message + suggestions[0] + "?"; + case 2: + return message + suggestions[0] + " or " + suggestions[1] + "?"; + } + const selected = suggestions.slice(0, MAX_SUGGESTIONS); + const lastItem = selected.pop(); + return message + selected.join(", ") + ", or " + lastItem + "?"; + } + + // node_modules/graphql/jsutils/identityFunc.mjs + function identityFunc(x) { + return x; + } + + // node_modules/graphql/jsutils/keyMap.mjs + function keyMap(list2, keyFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = item; + } + return result; + } + + // node_modules/graphql/jsutils/keyValMap.mjs + function keyValMap(list2, keyFn, valFn) { + const result = /* @__PURE__ */ Object.create(null); + for (const item of list2) { + result[keyFn(item)] = valFn(item); + } + return result; + } + + // node_modules/graphql/jsutils/mapValue.mjs + function mapValue(map, fn) { + const result = /* @__PURE__ */ Object.create(null); + for (const key of Object.keys(map)) { + result[key] = fn(map[key], key); + } + return result; + } + + // node_modules/graphql/jsutils/naturalCompare.mjs + function naturalCompare(aStr, bStr) { + let aIndex = 0; + let bIndex = 0; + while (aIndex < aStr.length && bIndex < bStr.length) { + let aChar = aStr.charCodeAt(aIndex); + let bChar = bStr.charCodeAt(bIndex); + if (isDigit2(aChar) && isDigit2(bChar)) { + let aNum = 0; + do { + ++aIndex; + aNum = aNum * 10 + aChar - DIGIT_0; + aChar = aStr.charCodeAt(aIndex); + } while (isDigit2(aChar) && aNum > 0); + let bNum = 0; + do { + ++bIndex; + bNum = bNum * 10 + bChar - DIGIT_0; + bChar = bStr.charCodeAt(bIndex); + } while (isDigit2(bChar) && bNum > 0); + if (aNum < bNum) { + return -1; + } + if (aNum > bNum) { + return 1; + } + } else { + if (aChar < bChar) { + return -1; + } + if (aChar > bChar) { + return 1; + } + ++aIndex; + ++bIndex; + } + } + return aStr.length - bStr.length; + } + var DIGIT_0 = 48; + var DIGIT_9 = 57; + function isDigit2(code) { + return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9; + } + + // node_modules/graphql/jsutils/suggestionList.mjs + function suggestionList(input, options) { + const optionsByDistance = /* @__PURE__ */ Object.create(null); + const lexicalDistance2 = new LexicalDistance(input); + const threshold = Math.floor(input.length * 0.4) + 1; + for (const option of options) { + const distance = lexicalDistance2.measure(option, threshold); + if (distance !== void 0) { + optionsByDistance[option] = distance; + } + } + return Object.keys(optionsByDistance).sort((a, b) => { + const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; + return distanceDiff !== 0 ? distanceDiff : naturalCompare(a, b); + }); + } + var LexicalDistance = class { + constructor(input) { + this._input = input; + this._inputLowerCase = input.toLowerCase(); + this._inputArray = stringToArray(this._inputLowerCase); + this._rows = [ + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0), + new Array(input.length + 1).fill(0) + ]; + } + measure(option, threshold) { + if (this._input === option) { + return 0; + } + const optionLowerCase = option.toLowerCase(); + if (this._inputLowerCase === optionLowerCase) { + return 1; + } + let a = stringToArray(optionLowerCase); + let b = this._inputArray; + if (a.length < b.length) { + const tmp = a; + a = b; + b = tmp; + } + const aLength = a.length; + const bLength = b.length; + if (aLength - bLength > threshold) { + return void 0; + } + const rows = this._rows; + for (let j = 0; j <= bLength; j++) { + rows[0][j] = j; + } + for (let i = 1; i <= aLength; i++) { + const upRow = rows[(i - 1) % 3]; + const currentRow = rows[i % 3]; + let smallestCell = currentRow[0] = i; + for (let j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + let currentCell = Math.min( + upRow[j] + 1, + // delete + currentRow[j - 1] + 1, + // insert + upRow[j - 1] + cost + // substitute + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; + currentCell = Math.min(currentCell, doubleDiagonalCell + 1); + } + if (currentCell < smallestCell) { + smallestCell = currentCell; + } + currentRow[j] = currentCell; + } + if (smallestCell > threshold) { + return void 0; + } + } + const distance = rows[aLength % 3][bLength]; + return distance <= threshold ? distance : void 0; + } + }; + function stringToArray(str) { + const strLength = str.length; + const array = new Array(strLength); + for (let i = 0; i < strLength; ++i) { + array[i] = str.charCodeAt(i); + } + return array; + } + + // node_modules/graphql/jsutils/toObjMap.mjs + function toObjMap(obj) { + if (obj == null) { + return /* @__PURE__ */ Object.create(null); + } + if (Object.getPrototypeOf(obj) === null) { + return obj; + } + const map = /* @__PURE__ */ Object.create(null); + for (const [key, value] of Object.entries(obj)) { + map[key] = value; + } + return map; + } + + // node_modules/graphql/language/printString.mjs + function printString(str) { + return `"${str.replace(escapedRegExp, escapedReplacer)}"`; + } + var escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; + function escapedReplacer(str) { + return escapeSequences[str.charCodeAt(0)]; + } + var escapeSequences = [ + "\\u0000", + "\\u0001", + "\\u0002", + "\\u0003", + "\\u0004", + "\\u0005", + "\\u0006", + "\\u0007", + "\\b", + "\\t", + "\\n", + "\\u000B", + "\\f", + "\\r", + "\\u000E", + "\\u000F", + "\\u0010", + "\\u0011", + "\\u0012", + "\\u0013", + "\\u0014", + "\\u0015", + "\\u0016", + "\\u0017", + "\\u0018", + "\\u0019", + "\\u001A", + "\\u001B", + "\\u001C", + "\\u001D", + "\\u001E", + "\\u001F", + "", + "", + '\\"', + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 2F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 3F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 4F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\\\", + "", + "", + "", + // 5F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + // 6F + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\\u007F", + "\\u0080", + "\\u0081", + "\\u0082", + "\\u0083", + "\\u0084", + "\\u0085", + "\\u0086", + "\\u0087", + "\\u0088", + "\\u0089", + "\\u008A", + "\\u008B", + "\\u008C", + "\\u008D", + "\\u008E", + "\\u008F", + "\\u0090", + "\\u0091", + "\\u0092", + "\\u0093", + "\\u0094", + "\\u0095", + "\\u0096", + "\\u0097", + "\\u0098", + "\\u0099", + "\\u009A", + "\\u009B", + "\\u009C", + "\\u009D", + "\\u009E", + "\\u009F" + ]; + + // node_modules/graphql/language/visitor.mjs + var BREAK = Object.freeze({}); + function visit(root, visitor, visitorKeys = QueryDocumentKeys) { + const enterLeaveMap = /* @__PURE__ */ new Map(); + for (const kind of Object.values(Kind)) { + enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind)); + } + let stack = void 0; + let inArray = Array.isArray(root); + let keys = [root]; + let index = -1; + let edits = []; + let node = root; + let key = void 0; + let parent = void 0; + const path = []; + const ancestors = []; + do { + index++; + const isLeaving = index === keys.length; + const isEdited = isLeaving && edits.length !== 0; + if (isLeaving) { + key = ancestors.length === 0 ? void 0 : path[path.length - 1]; + node = parent; + parent = ancestors.pop(); + if (isEdited) { + if (inArray) { + node = node.slice(); + let editOffset = 0; + for (const [editKey, editValue] of edits) { + const arrayKey = editKey - editOffset; + if (editValue === null) { + node.splice(arrayKey, 1); + editOffset++; + } else { + node[arrayKey] = editValue; + } + } + } else { + node = Object.defineProperties( + {}, + Object.getOwnPropertyDescriptors(node) + ); + for (const [editKey, editValue] of edits) { + node[editKey] = editValue; + } + } + } + index = stack.index; + keys = stack.keys; + edits = stack.edits; + inArray = stack.inArray; + stack = stack.prev; + } else if (parent) { + key = inArray ? index : keys[index]; + node = parent[key]; + if (node === null || node === void 0) { + continue; + } + path.push(key); + } + let result; + if (!Array.isArray(node)) { + var _enterLeaveMap$get, _enterLeaveMap$get2; + isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`); + const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; + result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); + if (result === BREAK) { + break; + } + if (result === false) { + if (!isLeaving) { + path.pop(); + continue; + } + } else if (result !== void 0) { + edits.push([key, result]); + if (!isLeaving) { + if (isNode(result)) { + node = result; + } else { + path.pop(); + continue; + } + } + } + } + if (result === void 0 && isEdited) { + edits.push([key, node]); + } + if (isLeaving) { + path.pop(); + } else { + var _node$kind; + stack = { + inArray, + index, + keys, + edits, + prev: stack + }; + inArray = Array.isArray(node); + keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; + index = -1; + edits = []; + if (parent) { + ancestors.push(parent); + } + parent = node; + } + } while (stack !== void 0); + if (edits.length !== 0) { + return edits[edits.length - 1][1]; + } + return root; + } + function visitInParallel(visitors) { + const skipping = new Array(visitors.length).fill(null); + const mergedVisitor = /* @__PURE__ */ Object.create(null); + for (const kind of Object.values(Kind)) { + let hasVisitor = false; + const enterList = new Array(visitors.length).fill(void 0); + const leaveList = new Array(visitors.length).fill(void 0); + for (let i = 0; i < visitors.length; ++i) { + const { enter, leave } = getEnterLeaveForKind(visitors[i], kind); + hasVisitor || (hasVisitor = enter != null || leave != null); + enterList[i] = enter; + leaveList[i] = leave; + } + if (!hasVisitor) { + continue; + } + const mergedEnterLeave = { + enter(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _enterList$i; + const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); + if (result === false) { + skipping[i] = node; + } else if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== void 0) { + return result; + } + } + } + }, + leave(...args) { + const node = args[0]; + for (let i = 0; i < visitors.length; i++) { + if (skipping[i] === null) { + var _leaveList$i; + const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); + if (result === BREAK) { + skipping[i] = BREAK; + } else if (result !== void 0 && result !== false) { + return result; + } + } else if (skipping[i] === node) { + skipping[i] = null; + } + } + } + }; + mergedVisitor[kind] = mergedEnterLeave; + } + return mergedVisitor; + } + function getEnterLeaveForKind(visitor, kind) { + const kindVisitor = visitor[kind]; + if (typeof kindVisitor === "object") { + return kindVisitor; + } else if (typeof kindVisitor === "function") { + return { + enter: kindVisitor, + leave: void 0 + }; + } + return { + enter: visitor.enter, + leave: visitor.leave + }; + } + + // node_modules/graphql/language/printer.mjs + function print(ast) { + return visit(ast, printDocASTReducer); + } + var MAX_LINE_LENGTH = 80; + var printDocASTReducer = { + Name: { + leave: (node) => node.value + }, + Variable: { + leave: (node) => "$" + node.name + }, + // Document + Document: { + leave: (node) => join2(node.definitions, "\n\n") + }, + OperationDefinition: { + leave(node) { + const varDefs = wrap("(", join2(node.variableDefinitions, ", "), ")"); + const prefix = join2( + [ + node.operation, + join2([node.name, varDefs]), + join2(node.directives, " ") + ], + " " + ); + return (prefix === "query" ? "" : prefix + " ") + node.selectionSet; + } + }, + VariableDefinition: { + leave: ({ variable, type: type2, defaultValue, directives }) => variable + ": " + type2 + wrap(" = ", defaultValue) + wrap(" ", join2(directives, " ")) + }, + SelectionSet: { + leave: ({ selections }) => block(selections) + }, + Field: { + leave({ alias, name: name2, arguments: args, directives, selectionSet }) { + const prefix = wrap("", alias, ": ") + name2; + let argsLine = prefix + wrap("(", join2(args, ", "), ")"); + if (argsLine.length > MAX_LINE_LENGTH) { + argsLine = prefix + wrap("(\n", indent(join2(args, "\n")), "\n)"); + } + return join2([argsLine, join2(directives, " "), selectionSet], " "); + } + }, + Argument: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Fragments + FragmentSpread: { + leave: ({ name: name2, directives }) => "..." + name2 + wrap(" ", join2(directives, " ")) + }, + InlineFragment: { + leave: ({ typeCondition, directives, selectionSet }) => join2( + [ + "...", + wrap("on ", typeCondition), + join2(directives, " "), + selectionSet + ], + " " + ) + }, + FragmentDefinition: { + leave: ({ name: name2, typeCondition, variableDefinitions, directives, selectionSet }) => ( + // or removed in the future. + `fragment ${name2}${wrap("(", join2(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join2(directives, " "), " ")}` + selectionSet + ) + }, + // Value + IntValue: { + leave: ({ value }) => value + }, + FloatValue: { + leave: ({ value }) => value + }, + StringValue: { + leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value) + }, + BooleanValue: { + leave: ({ value }) => value ? "true" : "false" + }, + NullValue: { + leave: () => "null" + }, + EnumValue: { + leave: ({ value }) => value + }, + ListValue: { + leave: ({ values }) => "[" + join2(values, ", ") + "]" + }, + ObjectValue: { + leave: ({ fields }) => "{" + join2(fields, ", ") + "}" + }, + ObjectField: { + leave: ({ name: name2, value }) => name2 + ": " + value + }, + // Directive + Directive: { + leave: ({ name: name2, arguments: args }) => "@" + name2 + wrap("(", join2(args, ", "), ")") + }, + // Type + NamedType: { + leave: ({ name: name2 }) => name2 + }, + ListType: { + leave: ({ type: type2 }) => "[" + type2 + "]" + }, + NonNullType: { + leave: ({ type: type2 }) => type2 + "!" + }, + // Type System Definitions + SchemaDefinition: { + leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join2(["schema", join2(directives, " "), block(operationTypes)], " ") + }, + OperationTypeDefinition: { + leave: ({ operation, type: type2 }) => operation + ": " + type2 + }, + ScalarTypeDefinition: { + leave: ({ description, name: name2, directives }) => wrap("", description, "\n") + join2(["scalar", name2, join2(directives, " ")], " ") + }, + ObjectTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap("", description, "\n") + join2( + [ + "type", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + FieldDefinition: { + leave: ({ description, name: name2, arguments: args, type: type2, directives }) => wrap("", description, "\n") + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join2(args, "\n")), "\n)") : wrap("(", join2(args, ", "), ")")) + ": " + type2 + wrap(" ", join2(directives, " ")) + }, + InputValueDefinition: { + leave: ({ description, name: name2, type: type2, defaultValue, directives }) => wrap("", description, "\n") + join2( + [name2 + ": " + type2, wrap("= ", defaultValue), join2(directives, " ")], + " " + ) + }, + InterfaceTypeDefinition: { + leave: ({ description, name: name2, interfaces, directives, fields }) => wrap("", description, "\n") + join2( + [ + "interface", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + UnionTypeDefinition: { + leave: ({ description, name: name2, directives, types }) => wrap("", description, "\n") + join2( + ["union", name2, join2(directives, " "), wrap("= ", join2(types, " | "))], + " " + ) + }, + EnumTypeDefinition: { + leave: ({ description, name: name2, directives, values }) => wrap("", description, "\n") + join2(["enum", name2, join2(directives, " "), block(values)], " ") + }, + EnumValueDefinition: { + leave: ({ description, name: name2, directives }) => wrap("", description, "\n") + join2([name2, join2(directives, " ")], " ") + }, + InputObjectTypeDefinition: { + leave: ({ description, name: name2, directives, fields }) => wrap("", description, "\n") + join2(["input", name2, join2(directives, " "), block(fields)], " ") + }, + DirectiveDefinition: { + leave: ({ description, name: name2, arguments: args, repeatable, locations }) => wrap("", description, "\n") + "directive @" + name2 + (hasMultilineItems(args) ? wrap("(\n", indent(join2(args, "\n")), "\n)") : wrap("(", join2(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join2(locations, " | ") + }, + SchemaExtension: { + leave: ({ directives, operationTypes }) => join2( + ["extend schema", join2(directives, " "), block(operationTypes)], + " " + ) + }, + ScalarTypeExtension: { + leave: ({ name: name2, directives }) => join2(["extend scalar", name2, join2(directives, " ")], " ") + }, + ObjectTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join2( + [ + "extend type", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + InterfaceTypeExtension: { + leave: ({ name: name2, interfaces, directives, fields }) => join2( + [ + "extend interface", + name2, + wrap("implements ", join2(interfaces, " & ")), + join2(directives, " "), + block(fields) + ], + " " + ) + }, + UnionTypeExtension: { + leave: ({ name: name2, directives, types }) => join2( + [ + "extend union", + name2, + join2(directives, " "), + wrap("= ", join2(types, " | ")) + ], + " " + ) + }, + EnumTypeExtension: { + leave: ({ name: name2, directives, values }) => join2(["extend enum", name2, join2(directives, " "), block(values)], " ") + }, + InputObjectTypeExtension: { + leave: ({ name: name2, directives, fields }) => join2(["extend input", name2, join2(directives, " "), block(fields)], " ") + } + }; + function join2(maybeArray, separator = "") { + var _maybeArray$filter$jo; + return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : ""; + } + function block(array) { + return wrap("{\n", indent(join2(array, "\n")), "\n}"); + } + function wrap(start, maybeString, end = "") { + return maybeString != null && maybeString !== "" ? start + maybeString + end : ""; + } + function indent(str) { + return wrap(" ", str.replace(/\n/g, "\n ")); + } + function hasMultilineItems(maybeArray) { + var _maybeArray$some; + return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false; + } + + // node_modules/graphql/utilities/valueFromASTUntyped.mjs + function valueFromASTUntyped(valueNode, variables) { + switch (valueNode.kind) { + case Kind.NULL: + return null; + case Kind.INT: + return parseInt(valueNode.value, 10); + case Kind.FLOAT: + return parseFloat(valueNode.value); + case Kind.STRING: + case Kind.ENUM: + case Kind.BOOLEAN: + return valueNode.value; + case Kind.LIST: + return valueNode.values.map( + (node) => valueFromASTUntyped(node, variables) + ); + case Kind.OBJECT: + return keyValMap( + valueNode.fields, + (field) => field.name.value, + (field) => valueFromASTUntyped(field.value, variables) + ); + case Kind.VARIABLE: + return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; + } + } + + // node_modules/graphql/type/assertName.mjs + function assertName(name2) { + name2 != null || devAssert(false, "Must provide name."); + typeof name2 === "string" || devAssert(false, "Expected name to be a string."); + if (name2.length === 0) { + throw new GraphQLError("Expected name to be a non-empty string."); + } + for (let i = 1; i < name2.length; ++i) { + if (!isNameContinue(name2.charCodeAt(i))) { + throw new GraphQLError( + `Names must only contain [_a-zA-Z0-9] but "${name2}" does not.` + ); + } + } + if (!isNameStart(name2.charCodeAt(0))) { + throw new GraphQLError( + `Names must start with [_a-zA-Z] but "${name2}" does not.` + ); + } + return name2; + } + function assertEnumValueName(name2) { + if (name2 === "true" || name2 === "false" || name2 === "null") { + throw new GraphQLError(`Enum values cannot be named: ${name2}`); + } + return assertName(name2); + } + + // node_modules/graphql/type/definition.mjs + function isType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isInputObjectType(type2) || isListType(type2) || isNonNullType(type2); + } + function isScalarType(type2) { + return instanceOf(type2, GraphQLScalarType); + } + function isObjectType(type2) { + return instanceOf(type2, GraphQLObjectType); + } + function assertObjectType(type2) { + if (!isObjectType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL Object type.`); + } + return type2; + } + function isInterfaceType(type2) { + return instanceOf(type2, GraphQLInterfaceType); + } + function assertInterfaceType(type2) { + if (!isInterfaceType(type2)) { + throw new Error( + `Expected ${inspect(type2)} to be a GraphQL Interface type.` + ); + } + return type2; + } + function isUnionType(type2) { + return instanceOf(type2, GraphQLUnionType); + } + function isEnumType(type2) { + return instanceOf(type2, GraphQLEnumType); + } + function isInputObjectType(type2) { + return instanceOf(type2, GraphQLInputObjectType); + } + function isListType(type2) { + return instanceOf(type2, GraphQLList); + } + function isNonNullType(type2) { + return instanceOf(type2, GraphQLNonNull); + } + function isInputType(type2) { + return isScalarType(type2) || isEnumType(type2) || isInputObjectType(type2) || isWrappingType(type2) && isInputType(type2.ofType); + } + function isOutputType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isWrappingType(type2) && isOutputType(type2.ofType); + } + function isLeafType(type2) { + return isScalarType(type2) || isEnumType(type2); + } + function isCompositeType(type2) { + return isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2); + } + function isAbstractType(type2) { + return isInterfaceType(type2) || isUnionType(type2); + } + function assertAbstractType(type2) { + if (!isAbstractType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL abstract type.`); + } + return type2; + } + var GraphQLList = class { + constructor(ofType) { + isType(ofType) || devAssert(false, `Expected ${inspect(ofType)} to be a GraphQL type.`); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLList"; + } + toString() { + return "[" + String(this.ofType) + "]"; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLNonNull = class { + constructor(ofType) { + isNullableType(ofType) || devAssert( + false, + `Expected ${inspect(ofType)} to be a GraphQL nullable type.` + ); + this.ofType = ofType; + } + get [Symbol.toStringTag]() { + return "GraphQLNonNull"; + } + toString() { + return String(this.ofType) + "!"; + } + toJSON() { + return this.toString(); + } + }; + function isWrappingType(type2) { + return isListType(type2) || isNonNullType(type2); + } + function isNullableType(type2) { + return isType(type2) && !isNonNullType(type2); + } + function assertNullableType(type2) { + if (!isNullableType(type2)) { + throw new Error(`Expected ${inspect(type2)} to be a GraphQL nullable type.`); + } + return type2; + } + function getNullableType(type2) { + if (type2) { + return isNonNullType(type2) ? type2.ofType : type2; + } + } + function isNamedType(type2) { + return isScalarType(type2) || isObjectType(type2) || isInterfaceType(type2) || isUnionType(type2) || isEnumType(type2) || isInputObjectType(type2); + } + function getNamedType(type2) { + if (type2) { + let unwrappedType = type2; + while (isWrappingType(unwrappedType)) { + unwrappedType = unwrappedType.ofType; + } + return unwrappedType; + } + } + function resolveReadonlyArrayThunk(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + function resolveObjMapThunk(thunk) { + return typeof thunk === "function" ? thunk() : thunk; + } + var GraphQLScalarType = class { + constructor(config) { + var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; + const parseValue2 = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc; + this.name = assertName(config.name); + this.description = config.description; + this.specifiedByURL = config.specifiedByURL; + this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc; + this.parseValue = parseValue2; + this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue2(valueFromASTUntyped(node, variables)); + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + config.specifiedByURL == null || typeof config.specifiedByURL === "string" || devAssert( + false, + `${this.name} must provide "specifiedByURL" as a string, but got: ${inspect(config.specifiedByURL)}.` + ); + config.serialize == null || typeof config.serialize === "function" || devAssert( + false, + `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.` + ); + if (config.parseLiteral) { + typeof config.parseValue === "function" && typeof config.parseLiteral === "function" || devAssert( + false, + `${this.name} must provide both "parseValue" and "parseLiteral" functions.` + ); + } + } + get [Symbol.toStringTag]() { + return "GraphQLScalarType"; + } + toConfig() { + return { + name: this.name, + description: this.description, + specifiedByURL: this.specifiedByURL, + serialize: this.serialize, + parseValue: this.parseValue, + parseLiteral: this.parseLiteral, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLObjectType = class { + constructor(config) { + var _config$extensionASTN2; + this.name = assertName(config.name); + this.description = config.description; + this.isTypeOf = config.isTypeOf; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; + this._fields = () => defineFieldMap(config); + this._interfaces = () => defineInterfaces(config); + config.isTypeOf == null || typeof config.isTypeOf === "function" || devAssert( + false, + `${this.name} must provide "isTypeOf" as a function, but got: ${inspect(config.isTypeOf)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + isTypeOf: this.isTypeOf, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineInterfaces(config) { + var _config$interfaces; + const interfaces = resolveReadonlyArrayThunk( + (_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : [] + ); + Array.isArray(interfaces) || devAssert( + false, + `${config.name} interfaces must be an Array or a function which returns an Array.` + ); + return interfaces; + } + function defineFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || devAssert( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return mapValue(fieldMap, (fieldConfig, fieldName) => { + var _fieldConfig$args; + isPlainObj(fieldConfig) || devAssert( + false, + `${config.name}.${fieldName} field config must be an object.` + ); + fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || devAssert( + false, + `${config.name}.${fieldName} field resolver must be a function if provided, but got: ${inspect(fieldConfig.resolve)}.` + ); + const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; + isPlainObj(argsConfig) || devAssert( + false, + `${config.name}.${fieldName} args must be an object with argument names as keys.` + ); + return { + name: assertName(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + args: defineArguments(argsConfig), + resolve: fieldConfig.resolve, + subscribe: fieldConfig.subscribe, + deprecationReason: fieldConfig.deprecationReason, + extensions: toObjMap(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function defineArguments(config) { + return Object.entries(config).map(([argName, argConfig]) => ({ + name: assertName(argName), + description: argConfig.description, + type: argConfig.type, + defaultValue: argConfig.defaultValue, + deprecationReason: argConfig.deprecationReason, + extensions: toObjMap(argConfig.extensions), + astNode: argConfig.astNode + })); + } + function isPlainObj(obj) { + return isObjectLike(obj) && !Array.isArray(obj); + } + function fieldsToFieldsConfig(fields) { + return mapValue(fields, (field) => ({ + description: field.description, + type: field.type, + args: argsToArgsConfig(field.args), + resolve: field.resolve, + subscribe: field.subscribe, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + } + function argsToArgsConfig(args) { + return keyValMap( + args, + (arg) => arg.name, + (arg) => ({ + description: arg.description, + type: arg.type, + defaultValue: arg.defaultValue, + deprecationReason: arg.deprecationReason, + extensions: arg.extensions, + astNode: arg.astNode + }) + ); + } + function isRequiredArgument(arg) { + return isNonNullType(arg.type) && arg.defaultValue === void 0; + } + var GraphQLInterfaceType = class { + constructor(config) { + var _config$extensionASTN3; + this.name = assertName(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; + this._fields = defineFieldMap.bind(void 0, config); + this._interfaces = defineInterfaces.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || devAssert( + false, + `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLInterfaceType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + getInterfaces() { + if (typeof this._interfaces === "function") { + this._interfaces = this._interfaces(); + } + return this._interfaces; + } + toConfig() { + return { + name: this.name, + description: this.description, + interfaces: this.getInterfaces(), + fields: fieldsToFieldsConfig(this.getFields()), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLUnionType = class { + constructor(config) { + var _config$extensionASTN4; + this.name = assertName(config.name); + this.description = config.description; + this.resolveType = config.resolveType; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; + this._types = defineTypes.bind(void 0, config); + config.resolveType == null || typeof config.resolveType === "function" || devAssert( + false, + `${this.name} must provide "resolveType" as a function, but got: ${inspect(config.resolveType)}.` + ); + } + get [Symbol.toStringTag]() { + return "GraphQLUnionType"; + } + getTypes() { + if (typeof this._types === "function") { + this._types = this._types(); + } + return this._types; + } + toConfig() { + return { + name: this.name, + description: this.description, + types: this.getTypes(), + resolveType: this.resolveType, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineTypes(config) { + const types = resolveReadonlyArrayThunk(config.types); + Array.isArray(types) || devAssert( + false, + `Must provide Array of types or a function which returns such an array for Union ${config.name}.` + ); + return types; + } + var GraphQLEnumType = class { + /* */ + constructor(config) { + var _config$extensionASTN5; + this.name = assertName(config.name); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; + this._values = defineEnumValues(this.name, config.values); + this._valueLookup = new Map( + this._values.map((enumValue) => [enumValue.value, enumValue]) + ); + this._nameLookup = keyMap(this._values, (value) => value.name); + } + get [Symbol.toStringTag]() { + return "GraphQLEnumType"; + } + getValues() { + return this._values; + } + getValue(name2) { + return this._nameLookup[name2]; + } + serialize(outputValue) { + const enumValue = this._valueLookup.get(outputValue); + if (enumValue === void 0) { + throw new GraphQLError( + `Enum "${this.name}" cannot represent value: ${inspect(outputValue)}` + ); + } + return enumValue.name; + } + parseValue(inputValue) { + if (typeof inputValue !== "string") { + const valueStr = inspect(inputValue); + throw new GraphQLError( + `Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr) + ); + } + const enumValue = this.getValue(inputValue); + if (enumValue == null) { + throw new GraphQLError( + `Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue) + ); + } + return enumValue.value; + } + parseLiteral(valueNode, _variables) { + if (valueNode.kind !== Kind.ENUM) { + const valueStr = print(valueNode); + throw new GraphQLError( + `Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), + { + nodes: valueNode + } + ); + } + const enumValue = this.getValue(valueNode.value); + if (enumValue == null) { + const valueStr = print(valueNode); + throw new GraphQLError( + `Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), + { + nodes: valueNode + } + ); + } + return enumValue.value; + } + toConfig() { + const values = keyValMap( + this.getValues(), + (value) => value.name, + (value) => ({ + description: value.description, + value: value.value, + deprecationReason: value.deprecationReason, + extensions: value.extensions, + astNode: value.astNode + }) + ); + return { + name: this.name, + description: this.description, + values, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function didYouMeanEnumValue(enumType, unknownValueStr) { + const allNames = enumType.getValues().map((value) => value.name); + const suggestedValues = suggestionList(unknownValueStr, allNames); + return didYouMean("the enum value", suggestedValues); + } + function defineEnumValues(typeName, valueMap) { + isPlainObj(valueMap) || devAssert( + false, + `${typeName} values must be an object with value names as keys.` + ); + return Object.entries(valueMap).map(([valueName, valueConfig]) => { + isPlainObj(valueConfig) || devAssert( + false, + `${typeName}.${valueName} must refer to an object with a "value" key representing an internal value but got: ${inspect(valueConfig)}.` + ); + return { + name: assertEnumValueName(valueName), + description: valueConfig.description, + value: valueConfig.value !== void 0 ? valueConfig.value : valueName, + deprecationReason: valueConfig.deprecationReason, + extensions: toObjMap(valueConfig.extensions), + astNode: valueConfig.astNode + }; + }); + } + var GraphQLInputObjectType = class { + constructor(config) { + var _config$extensionASTN6; + this.name = assertName(config.name); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; + this._fields = defineInputFieldMap.bind(void 0, config); + } + get [Symbol.toStringTag]() { + return "GraphQLInputObjectType"; + } + getFields() { + if (typeof this._fields === "function") { + this._fields = this._fields(); + } + return this._fields; + } + toConfig() { + const fields = mapValue(this.getFields(), (field) => ({ + description: field.description, + type: field.type, + defaultValue: field.defaultValue, + deprecationReason: field.deprecationReason, + extensions: field.extensions, + astNode: field.astNode + })); + return { + name: this.name, + description: this.description, + fields, + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes + }; + } + toString() { + return this.name; + } + toJSON() { + return this.toString(); + } + }; + function defineInputFieldMap(config) { + const fieldMap = resolveObjMapThunk(config.fields); + isPlainObj(fieldMap) || devAssert( + false, + `${config.name} fields must be an object with field names as keys or a function which returns such an object.` + ); + return mapValue(fieldMap, (fieldConfig, fieldName) => { + !("resolve" in fieldConfig) || devAssert( + false, + `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.` + ); + return { + name: assertName(fieldName), + description: fieldConfig.description, + type: fieldConfig.type, + defaultValue: fieldConfig.defaultValue, + deprecationReason: fieldConfig.deprecationReason, + extensions: toObjMap(fieldConfig.extensions), + astNode: fieldConfig.astNode + }; + }); + } + function isRequiredInputField(field) { + return isNonNullType(field.type) && field.defaultValue === void 0; + } + + // node_modules/graphql/utilities/typeComparators.mjs + function isEqualType(typeA, typeB) { + if (typeA === typeB) { + return true; + } + if (isNonNullType(typeA) && isNonNullType(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } + if (isListType(typeA) && isListType(typeB)) { + return isEqualType(typeA.ofType, typeB.ofType); + } + return false; + } + function isTypeSubTypeOf(schema, maybeSubType, superType) { + if (maybeSubType === superType) { + return true; + } + if (isNonNullType(superType)) { + if (isNonNullType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + return false; + } + if (isNonNullType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); + } + if (isListType(superType)) { + if (isListType(maybeSubType)) { + return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); + } + return false; + } + if (isListType(maybeSubType)) { + return false; + } + return isAbstractType(superType) && (isInterfaceType(maybeSubType) || isObjectType(maybeSubType)) && schema.isSubType(superType, maybeSubType); + } + function doTypesOverlap(schema, typeA, typeB) { + if (typeA === typeB) { + return true; + } + if (isAbstractType(typeA)) { + if (isAbstractType(typeB)) { + return schema.getPossibleTypes(typeA).some((type2) => schema.isSubType(typeB, type2)); + } + return schema.isSubType(typeA, typeB); + } + if (isAbstractType(typeB)) { + return schema.isSubType(typeB, typeA); + } + return false; + } + + // node_modules/graphql/type/scalars.mjs + var GRAPHQL_MAX_INT = 2147483647; + var GRAPHQL_MIN_INT = -2147483648; + var GraphQLInt = new GraphQLScalarType({ + name: "Int", + description: "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isInteger(num)) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${inspect(coercedValue)}` + ); + } + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new GraphQLError( + "Int cannot represent non 32-bit signed integer value: " + inspect(coercedValue) + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isInteger(inputValue)) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${inspect(inputValue)}` + ); + } + if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) { + throw new GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${inputValue}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.INT) { + throw new GraphQLError( + `Int cannot represent non-integer value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + const num = parseInt(valueNode.value, 10); + if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { + throw new GraphQLError( + `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, + { + nodes: valueNode + } + ); + } + return num; + } + }); + var GraphQLFloat = new GraphQLScalarType({ + name: "Float", + description: "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue ? 1 : 0; + } + let num = coercedValue; + if (typeof coercedValue === "string" && coercedValue !== "") { + num = Number(coercedValue); + } + if (typeof num !== "number" || !Number.isFinite(num)) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${inspect(coercedValue)}` + ); + } + return num; + }, + parseValue(inputValue) { + if (typeof inputValue !== "number" || !Number.isFinite(inputValue)) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) { + throw new GraphQLError( + `Float cannot represent non numeric value: ${print(valueNode)}`, + valueNode + ); + } + return parseFloat(valueNode.value); + } + }); + var GraphQLString = new GraphQLScalarType({ + name: "String", + description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (typeof coercedValue === "boolean") { + return coercedValue ? "true" : "false"; + } + if (typeof coercedValue === "number" && Number.isFinite(coercedValue)) { + return coercedValue.toString(); + } + throw new GraphQLError( + `String cannot represent value: ${inspect(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "string") { + throw new GraphQLError( + `String cannot represent a non string value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.STRING) { + throw new GraphQLError( + `String cannot represent a non string value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var GraphQLBoolean = new GraphQLScalarType({ + name: "Boolean", + description: "The `Boolean` scalar type represents `true` or `false`.", + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "boolean") { + return coercedValue; + } + if (Number.isFinite(coercedValue)) { + return coercedValue !== 0; + } + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${inspect(coercedValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue !== "boolean") { + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${inspect(inputValue)}` + ); + } + return inputValue; + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.BOOLEAN) { + throw new GraphQLError( + `Boolean cannot represent a non boolean value: ${print(valueNode)}`, + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var GraphQLID = new GraphQLScalarType({ + name: "ID", + description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', + serialize(outputValue) { + const coercedValue = serializeObject(outputValue); + if (typeof coercedValue === "string") { + return coercedValue; + } + if (Number.isInteger(coercedValue)) { + return String(coercedValue); + } + throw new GraphQLError( + `ID cannot represent value: ${inspect(outputValue)}` + ); + }, + parseValue(inputValue) { + if (typeof inputValue === "string") { + return inputValue; + } + if (typeof inputValue === "number" && Number.isInteger(inputValue)) { + return inputValue.toString(); + } + throw new GraphQLError(`ID cannot represent value: ${inspect(inputValue)}`); + }, + parseLiteral(valueNode) { + if (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) { + throw new GraphQLError( + "ID cannot represent a non-string and non-integer value: " + print(valueNode), + { + nodes: valueNode + } + ); + } + return valueNode.value; + } + }); + var specifiedScalarTypes = Object.freeze([ + GraphQLString, + GraphQLInt, + GraphQLFloat, + GraphQLBoolean, + GraphQLID + ]); + function isSpecifiedScalarType(type2) { + return specifiedScalarTypes.some(({ name: name2 }) => type2.name === name2); + } + function serializeObject(outputValue) { + if (isObjectLike(outputValue)) { + if (typeof outputValue.valueOf === "function") { + const valueOfResult = outputValue.valueOf(); + if (!isObjectLike(valueOfResult)) { + return valueOfResult; + } + } + if (typeof outputValue.toJSON === "function") { + return outputValue.toJSON(); + } + } + return outputValue; + } + + // node_modules/graphql/type/directives.mjs + function isDirective(directive) { + return instanceOf(directive, GraphQLDirective); + } + var GraphQLDirective = class { + constructor(config) { + var _config$isRepeatable, _config$args; + this.name = assertName(config.name); + this.description = config.description; + this.locations = config.locations; + this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + Array.isArray(config.locations) || devAssert(false, `@${config.name} locations must be an Array.`); + const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; + isObjectLike(args) && !Array.isArray(args) || devAssert( + false, + `@${config.name} args must be an object with argument names as keys.` + ); + this.args = defineArguments(args); + } + get [Symbol.toStringTag]() { + return "GraphQLDirective"; + } + toConfig() { + return { + name: this.name, + description: this.description, + locations: this.locations, + args: argsToArgsConfig(this.args), + isRepeatable: this.isRepeatable, + extensions: this.extensions, + astNode: this.astNode + }; + } + toString() { + return "@" + this.name; + } + toJSON() { + return this.toString(); + } + }; + var GraphQLIncludeDirective = new GraphQLDirective({ + name: "include", + description: "Directs the executor to include this field or fragment only when the `if` argument is true.", + locations: [ + DirectiveLocation.FIELD, + DirectiveLocation.FRAGMENT_SPREAD, + DirectiveLocation.INLINE_FRAGMENT + ], + args: { + if: { + type: new GraphQLNonNull(GraphQLBoolean), + description: "Included when true." + } + } + }); + var GraphQLSkipDirective = new GraphQLDirective({ + name: "skip", + description: "Directs the executor to skip this field or fragment when the `if` argument is true.", + locations: [ + DirectiveLocation.FIELD, + DirectiveLocation.FRAGMENT_SPREAD, + DirectiveLocation.INLINE_FRAGMENT + ], + args: { + if: { + type: new GraphQLNonNull(GraphQLBoolean), + description: "Skipped when true." + } + } + }); + var DEFAULT_DEPRECATION_REASON = "No longer supported"; + var GraphQLDeprecatedDirective = new GraphQLDirective({ + name: "deprecated", + description: "Marks an element of a GraphQL schema as no longer supported.", + locations: [ + DirectiveLocation.FIELD_DEFINITION, + DirectiveLocation.ARGUMENT_DEFINITION, + DirectiveLocation.INPUT_FIELD_DEFINITION, + DirectiveLocation.ENUM_VALUE + ], + args: { + reason: { + type: GraphQLString, + description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).", + defaultValue: DEFAULT_DEPRECATION_REASON + } + } + }); + var GraphQLSpecifiedByDirective = new GraphQLDirective({ + name: "specifiedBy", + description: "Exposes a URL that specifies the behavior of this scalar.", + locations: [DirectiveLocation.SCALAR], + args: { + url: { + type: new GraphQLNonNull(GraphQLString), + description: "The URL that specifies the behavior of this scalar." + } + } + }); + var specifiedDirectives = Object.freeze([ + GraphQLIncludeDirective, + GraphQLSkipDirective, + GraphQLDeprecatedDirective, + GraphQLSpecifiedByDirective + ]); + + // node_modules/graphql/jsutils/isIterableObject.mjs + function isIterableObject(maybeIterable) { + return typeof maybeIterable === "object" && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === "function"; + } + + // node_modules/graphql/utilities/astFromValue.mjs + function astFromValue(value, type2) { + if (isNonNullType(type2)) { + const astValue = astFromValue(value, type2.ofType); + if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === Kind.NULL) { + return null; + } + return astValue; + } + if (value === null) { + return { + kind: Kind.NULL + }; + } + if (value === void 0) { + return null; + } + if (isListType(type2)) { + const itemType = type2.ofType; + if (isIterableObject(value)) { + const valuesNodes = []; + for (const item of value) { + const itemNode = astFromValue(item, itemType); + if (itemNode != null) { + valuesNodes.push(itemNode); + } + } + return { + kind: Kind.LIST, + values: valuesNodes + }; + } + return astFromValue(value, itemType); + } + if (isInputObjectType(type2)) { + if (!isObjectLike(value)) { + return null; + } + const fieldNodes = []; + for (const field of Object.values(type2.getFields())) { + const fieldValue = astFromValue(value[field.name], field.type); + if (fieldValue) { + fieldNodes.push({ + kind: Kind.OBJECT_FIELD, + name: { + kind: Kind.NAME, + value: field.name + }, + value: fieldValue + }); + } + } + return { + kind: Kind.OBJECT, + fields: fieldNodes + }; + } + if (isLeafType(type2)) { + const serialized = type2.serialize(value); + if (serialized == null) { + return null; + } + if (typeof serialized === "boolean") { + return { + kind: Kind.BOOLEAN, + value: serialized + }; + } + if (typeof serialized === "number" && Number.isFinite(serialized)) { + const stringNum = String(serialized); + return integerStringRegExp.test(stringNum) ? { + kind: Kind.INT, + value: stringNum + } : { + kind: Kind.FLOAT, + value: stringNum + }; + } + if (typeof serialized === "string") { + if (isEnumType(type2)) { + return { + kind: Kind.ENUM, + value: serialized + }; + } + if (type2 === GraphQLID && integerStringRegExp.test(serialized)) { + return { + kind: Kind.INT, + value: serialized + }; + } + return { + kind: Kind.STRING, + value: serialized + }; + } + throw new TypeError(`Cannot convert value to AST: ${inspect(serialized)}.`); + } + invariant(false, "Unexpected input type: " + inspect(type2)); + } + var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; + + // node_modules/graphql/type/introspection.mjs + var __Schema = new GraphQLObjectType({ + name: "__Schema", + description: "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + fields: () => ({ + description: { + type: GraphQLString, + resolve: (schema) => schema.description + }, + types: { + description: "A list of all types supported by this server.", + type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))), + resolve(schema) { + return Object.values(schema.getTypeMap()); + } + }, + queryType: { + description: "The type that query operations will be rooted at.", + type: new GraphQLNonNull(__Type), + resolve: (schema) => schema.getQueryType() + }, + mutationType: { + description: "If this server supports mutation, the type that mutation operations will be rooted at.", + type: __Type, + resolve: (schema) => schema.getMutationType() + }, + subscriptionType: { + description: "If this server support subscription, the type that subscription operations will be rooted at.", + type: __Type, + resolve: (schema) => schema.getSubscriptionType() + }, + directives: { + description: "A list of all directives supported by this server.", + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__Directive)) + ), + resolve: (schema) => schema.getDirectives() + } + }) + }); + var __Directive = new GraphQLObjectType({ + name: "__Directive", + description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (directive) => directive.name + }, + description: { + type: GraphQLString, + resolve: (directive) => directive.description + }, + isRepeatable: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (directive) => directive.isRepeatable + }, + locations: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__DirectiveLocation)) + ), + resolve: (directive) => directive.locations + }, + args: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__InputValue)) + ), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + } + }) + }); + var __DirectiveLocation = new GraphQLEnumType({ + name: "__DirectiveLocation", + description: "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + values: { + QUERY: { + value: DirectiveLocation.QUERY, + description: "Location adjacent to a query operation." + }, + MUTATION: { + value: DirectiveLocation.MUTATION, + description: "Location adjacent to a mutation operation." + }, + SUBSCRIPTION: { + value: DirectiveLocation.SUBSCRIPTION, + description: "Location adjacent to a subscription operation." + }, + FIELD: { + value: DirectiveLocation.FIELD, + description: "Location adjacent to a field." + }, + FRAGMENT_DEFINITION: { + value: DirectiveLocation.FRAGMENT_DEFINITION, + description: "Location adjacent to a fragment definition." + }, + FRAGMENT_SPREAD: { + value: DirectiveLocation.FRAGMENT_SPREAD, + description: "Location adjacent to a fragment spread." + }, + INLINE_FRAGMENT: { + value: DirectiveLocation.INLINE_FRAGMENT, + description: "Location adjacent to an inline fragment." + }, + VARIABLE_DEFINITION: { + value: DirectiveLocation.VARIABLE_DEFINITION, + description: "Location adjacent to a variable definition." + }, + SCHEMA: { + value: DirectiveLocation.SCHEMA, + description: "Location adjacent to a schema definition." + }, + SCALAR: { + value: DirectiveLocation.SCALAR, + description: "Location adjacent to a scalar definition." + }, + OBJECT: { + value: DirectiveLocation.OBJECT, + description: "Location adjacent to an object type definition." + }, + FIELD_DEFINITION: { + value: DirectiveLocation.FIELD_DEFINITION, + description: "Location adjacent to a field definition." + }, + ARGUMENT_DEFINITION: { + value: DirectiveLocation.ARGUMENT_DEFINITION, + description: "Location adjacent to an argument definition." + }, + INTERFACE: { + value: DirectiveLocation.INTERFACE, + description: "Location adjacent to an interface definition." + }, + UNION: { + value: DirectiveLocation.UNION, + description: "Location adjacent to a union definition." + }, + ENUM: { + value: DirectiveLocation.ENUM, + description: "Location adjacent to an enum definition." + }, + ENUM_VALUE: { + value: DirectiveLocation.ENUM_VALUE, + description: "Location adjacent to an enum value definition." + }, + INPUT_OBJECT: { + value: DirectiveLocation.INPUT_OBJECT, + description: "Location adjacent to an input object type definition." + }, + INPUT_FIELD_DEFINITION: { + value: DirectiveLocation.INPUT_FIELD_DEFINITION, + description: "Location adjacent to an input object field definition." + } + } + }); + var __Type = new GraphQLObjectType({ + name: "__Type", + description: "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + fields: () => ({ + kind: { + type: new GraphQLNonNull(__TypeKind), + resolve(type2) { + if (isScalarType(type2)) { + return TypeKind.SCALAR; + } + if (isObjectType(type2)) { + return TypeKind.OBJECT; + } + if (isInterfaceType(type2)) { + return TypeKind.INTERFACE; + } + if (isUnionType(type2)) { + return TypeKind.UNION; + } + if (isEnumType(type2)) { + return TypeKind.ENUM; + } + if (isInputObjectType(type2)) { + return TypeKind.INPUT_OBJECT; + } + if (isListType(type2)) { + return TypeKind.LIST; + } + if (isNonNullType(type2)) { + return TypeKind.NON_NULL; + } + invariant(false, `Unexpected type: "${inspect(type2)}".`); + } + }, + name: { + type: GraphQLString, + resolve: (type2) => "name" in type2 ? type2.name : void 0 + }, + description: { + type: GraphQLString, + resolve: (type2) => ( + /* c8 ignore next */ + "description" in type2 ? type2.description : void 0 + ) + }, + specifiedByURL: { + type: GraphQLString, + resolve: (obj) => "specifiedByURL" in obj ? obj.specifiedByURL : void 0 + }, + fields: { + type: new GraphQLList(new GraphQLNonNull(__Field)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isObjectType(type2) || isInterfaceType(type2)) { + const fields = Object.values(type2.getFields()); + return includeDeprecated ? fields : fields.filter((field) => field.deprecationReason == null); + } + } + }, + interfaces: { + type: new GraphQLList(new GraphQLNonNull(__Type)), + resolve(type2) { + if (isObjectType(type2) || isInterfaceType(type2)) { + return type2.getInterfaces(); + } + } + }, + possibleTypes: { + type: new GraphQLList(new GraphQLNonNull(__Type)), + resolve(type2, _args, _context, { schema }) { + if (isAbstractType(type2)) { + return schema.getPossibleTypes(type2); + } + } + }, + enumValues: { + type: new GraphQLList(new GraphQLNonNull(__EnumValue)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isEnumType(type2)) { + const values = type2.getValues(); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + inputFields: { + type: new GraphQLList(new GraphQLNonNull(__InputValue)), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(type2, { includeDeprecated }) { + if (isInputObjectType(type2)) { + const values = Object.values(type2.getFields()); + return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); + } + } + }, + ofType: { + type: __Type, + resolve: (type2) => "ofType" in type2 ? type2.ofType : void 0 + } + }) + }); + var __Field = new GraphQLObjectType({ + name: "__Field", + description: "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (field) => field.name + }, + description: { + type: GraphQLString, + resolve: (field) => field.description + }, + args: { + type: new GraphQLNonNull( + new GraphQLList(new GraphQLNonNull(__InputValue)) + ), + args: { + includeDeprecated: { + type: GraphQLBoolean, + defaultValue: false + } + }, + resolve(field, { includeDeprecated }) { + return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); + } + }, + type: { + type: new GraphQLNonNull(__Type), + resolve: (field) => field.type + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (field) => field.deprecationReason + } + }) + }); + var __InputValue = new GraphQLObjectType({ + name: "__InputValue", + description: "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (inputValue) => inputValue.name + }, + description: { + type: GraphQLString, + resolve: (inputValue) => inputValue.description + }, + type: { + type: new GraphQLNonNull(__Type), + resolve: (inputValue) => inputValue.type + }, + defaultValue: { + type: GraphQLString, + description: "A GraphQL-formatted string representing the default value for this input value.", + resolve(inputValue) { + const { type: type2, defaultValue } = inputValue; + const valueAST = astFromValue(defaultValue, type2); + return valueAST ? print(valueAST) : null; + } + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (field) => field.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (obj) => obj.deprecationReason + } + }) + }); + var __EnumValue = new GraphQLObjectType({ + name: "__EnumValue", + description: "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + fields: () => ({ + name: { + type: new GraphQLNonNull(GraphQLString), + resolve: (enumValue) => enumValue.name + }, + description: { + type: GraphQLString, + resolve: (enumValue) => enumValue.description + }, + isDeprecated: { + type: new GraphQLNonNull(GraphQLBoolean), + resolve: (enumValue) => enumValue.deprecationReason != null + }, + deprecationReason: { + type: GraphQLString, + resolve: (enumValue) => enumValue.deprecationReason + } + }) + }); + var TypeKind; + (function(TypeKind2) { + TypeKind2["SCALAR"] = "SCALAR"; + TypeKind2["OBJECT"] = "OBJECT"; + TypeKind2["INTERFACE"] = "INTERFACE"; + TypeKind2["UNION"] = "UNION"; + TypeKind2["ENUM"] = "ENUM"; + TypeKind2["INPUT_OBJECT"] = "INPUT_OBJECT"; + TypeKind2["LIST"] = "LIST"; + TypeKind2["NON_NULL"] = "NON_NULL"; + })(TypeKind || (TypeKind = {})); + var __TypeKind = new GraphQLEnumType({ + name: "__TypeKind", + description: "An enum describing what kind of type a given `__Type` is.", + values: { + SCALAR: { + value: TypeKind.SCALAR, + description: "Indicates this type is a scalar." + }, + OBJECT: { + value: TypeKind.OBJECT, + description: "Indicates this type is an object. `fields` and `interfaces` are valid fields." + }, + INTERFACE: { + value: TypeKind.INTERFACE, + description: "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields." + }, + UNION: { + value: TypeKind.UNION, + description: "Indicates this type is a union. `possibleTypes` is a valid field." + }, + ENUM: { + value: TypeKind.ENUM, + description: "Indicates this type is an enum. `enumValues` is a valid field." + }, + INPUT_OBJECT: { + value: TypeKind.INPUT_OBJECT, + description: "Indicates this type is an input object. `inputFields` is a valid field." + }, + LIST: { + value: TypeKind.LIST, + description: "Indicates this type is a list. `ofType` is a valid field." + }, + NON_NULL: { + value: TypeKind.NON_NULL, + description: "Indicates this type is a non-null. `ofType` is a valid field." + } + } + }); + var SchemaMetaFieldDef = { + name: "__schema", + type: new GraphQLNonNull(__Schema), + description: "Access the current type schema of this server.", + args: [], + resolve: (_source, _args, _context, { schema }) => schema, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var TypeMetaFieldDef = { + name: "__type", + type: __Type, + description: "Request the type information of a single type.", + args: [ + { + name: "name", + description: void 0, + type: new GraphQLNonNull(GraphQLString), + defaultValue: void 0, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + } + ], + resolve: (_source, { name: name2 }, _context, { schema }) => schema.getType(name2), + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var TypeNameMetaFieldDef = { + name: "__typename", + type: new GraphQLNonNull(GraphQLString), + description: "The name of the current Object type at runtime.", + args: [], + resolve: (_source, _args, _context, { parentType }) => parentType.name, + deprecationReason: void 0, + extensions: /* @__PURE__ */ Object.create(null), + astNode: void 0 + }; + var introspectionTypes = Object.freeze([ + __Schema, + __Directive, + __DirectiveLocation, + __Type, + __Field, + __InputValue, + __EnumValue, + __TypeKind + ]); + function isIntrospectionType(type2) { + return introspectionTypes.some(({ name: name2 }) => type2.name === name2); + } + + // node_modules/graphql/type/schema.mjs + function isSchema(schema) { + return instanceOf(schema, GraphQLSchema); + } + function assertSchema(schema) { + if (!isSchema(schema)) { + throw new Error(`Expected ${inspect(schema)} to be a GraphQL schema.`); + } + return schema; + } + var GraphQLSchema = class { + // Used as a cache for validateSchema(). + constructor(config) { + var _config$extensionASTN, _config$directives; + this.__validationErrors = config.assumeValid === true ? [] : void 0; + isObjectLike(config) || devAssert(false, "Must provide configuration object."); + !config.types || Array.isArray(config.types) || devAssert( + false, + `"types" must be Array if provided but got: ${inspect(config.types)}.` + ); + !config.directives || Array.isArray(config.directives) || devAssert( + false, + `"directives" must be Array if provided but got: ${inspect(config.directives)}.` + ); + this.description = config.description; + this.extensions = toObjMap(config.extensions); + this.astNode = config.astNode; + this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; + this._queryType = config.query; + this._mutationType = config.mutation; + this._subscriptionType = config.subscription; + this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : specifiedDirectives; + const allReferencedTypes = new Set(config.types); + if (config.types != null) { + for (const type2 of config.types) { + allReferencedTypes.delete(type2); + collectReferencedTypes(type2, allReferencedTypes); + } + } + if (this._queryType != null) { + collectReferencedTypes(this._queryType, allReferencedTypes); + } + if (this._mutationType != null) { + collectReferencedTypes(this._mutationType, allReferencedTypes); + } + if (this._subscriptionType != null) { + collectReferencedTypes(this._subscriptionType, allReferencedTypes); + } + for (const directive of this._directives) { + if (isDirective(directive)) { + for (const arg of directive.args) { + collectReferencedTypes(arg.type, allReferencedTypes); + } + } + } + collectReferencedTypes(__Schema, allReferencedTypes); + this._typeMap = /* @__PURE__ */ Object.create(null); + this._subTypeMap = /* @__PURE__ */ Object.create(null); + this._implementationsMap = /* @__PURE__ */ Object.create(null); + for (const namedType of allReferencedTypes) { + if (namedType == null) { + continue; + } + const typeName = namedType.name; + typeName || devAssert( + false, + "One of the provided types for building the Schema is missing a name." + ); + if (this._typeMap[typeName] !== void 0) { + throw new Error( + `Schema must contain uniquely named types but contains multiple types named "${typeName}".` + ); + } + this._typeMap[typeName] = namedType; + if (isInterfaceType(namedType)) { + for (const iface of namedType.getInterfaces()) { + if (isInterfaceType(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === void 0) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.interfaces.push(namedType); + } + } + } else if (isObjectType(namedType)) { + for (const iface of namedType.getInterfaces()) { + if (isInterfaceType(iface)) { + let implementations = this._implementationsMap[iface.name]; + if (implementations === void 0) { + implementations = this._implementationsMap[iface.name] = { + objects: [], + interfaces: [] + }; + } + implementations.objects.push(namedType); + } + } + } + } + } + get [Symbol.toStringTag]() { + return "GraphQLSchema"; + } + getQueryType() { + return this._queryType; + } + getMutationType() { + return this._mutationType; + } + getSubscriptionType() { + return this._subscriptionType; + } + getRootType(operation) { + switch (operation) { + case OperationTypeNode.QUERY: + return this.getQueryType(); + case OperationTypeNode.MUTATION: + return this.getMutationType(); + case OperationTypeNode.SUBSCRIPTION: + return this.getSubscriptionType(); + } + } + getTypeMap() { + return this._typeMap; + } + getType(name2) { + return this.getTypeMap()[name2]; + } + getPossibleTypes(abstractType) { + return isUnionType(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; + } + getImplementations(interfaceType) { + const implementations = this._implementationsMap[interfaceType.name]; + return implementations !== null && implementations !== void 0 ? implementations : { + objects: [], + interfaces: [] + }; + } + isSubType(abstractType, maybeSubType) { + let map = this._subTypeMap[abstractType.name]; + if (map === void 0) { + map = /* @__PURE__ */ Object.create(null); + if (isUnionType(abstractType)) { + for (const type2 of abstractType.getTypes()) { + map[type2.name] = true; + } + } else { + const implementations = this.getImplementations(abstractType); + for (const type2 of implementations.objects) { + map[type2.name] = true; + } + for (const type2 of implementations.interfaces) { + map[type2.name] = true; + } + } + this._subTypeMap[abstractType.name] = map; + } + return map[maybeSubType.name] !== void 0; + } + getDirectives() { + return this._directives; + } + getDirective(name2) { + return this.getDirectives().find((directive) => directive.name === name2); + } + toConfig() { + return { + description: this.description, + query: this.getQueryType(), + mutation: this.getMutationType(), + subscription: this.getSubscriptionType(), + types: Object.values(this.getTypeMap()), + directives: this.getDirectives(), + extensions: this.extensions, + astNode: this.astNode, + extensionASTNodes: this.extensionASTNodes, + assumeValid: this.__validationErrors !== void 0 + }; + } + }; + function collectReferencedTypes(type2, typeSet) { + const namedType = getNamedType(type2); + if (!typeSet.has(namedType)) { + typeSet.add(namedType); + if (isUnionType(namedType)) { + for (const memberType of namedType.getTypes()) { + collectReferencedTypes(memberType, typeSet); + } + } else if (isObjectType(namedType) || isInterfaceType(namedType)) { + for (const interfaceType of namedType.getInterfaces()) { + collectReferencedTypes(interfaceType, typeSet); + } + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); + for (const arg of field.args) { + collectReferencedTypes(arg.type, typeSet); + } + } + } else if (isInputObjectType(namedType)) { + for (const field of Object.values(namedType.getFields())) { + collectReferencedTypes(field.type, typeSet); + } + } + } + return typeSet; + } + + // node_modules/graphql/type/validate.mjs + function validateSchema(schema) { + assertSchema(schema); + if (schema.__validationErrors) { + return schema.__validationErrors; + } + const context = new SchemaValidationContext(schema); + validateRootTypes(context); + validateDirectives(context); + validateTypes(context); + const errors = context.getErrors(); + schema.__validationErrors = errors; + return errors; + } + function assertValidSchema(schema) { + const errors = validateSchema(schema); + if (errors.length !== 0) { + throw new Error(errors.map((error) => error.message).join("\n\n")); + } + } + var SchemaValidationContext = class { + constructor(schema) { + this._errors = []; + this.schema = schema; + } + reportError(message, nodes) { + const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; + this._errors.push( + new GraphQLError(message, { + nodes: _nodes + }) + ); + } + getErrors() { + return this._errors; + } + }; + function validateRootTypes(context) { + const schema = context.schema; + const queryType = schema.getQueryType(); + if (!queryType) { + context.reportError("Query root type must be provided.", schema.astNode); + } else if (!isObjectType(queryType)) { + var _getOperationTypeNode; + context.reportError( + `Query root type must be Object type, it cannot be ${inspect( + queryType + )}.`, + (_getOperationTypeNode = getOperationTypeNode( + schema, + OperationTypeNode.QUERY + )) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode + ); + } + const mutationType = schema.getMutationType(); + if (mutationType && !isObjectType(mutationType)) { + var _getOperationTypeNode2; + context.reportError( + `Mutation root type must be Object type if provided, it cannot be ${inspect(mutationType)}.`, + (_getOperationTypeNode2 = getOperationTypeNode( + schema, + OperationTypeNode.MUTATION + )) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode + ); + } + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType && !isObjectType(subscriptionType)) { + var _getOperationTypeNode3; + context.reportError( + `Subscription root type must be Object type if provided, it cannot be ${inspect(subscriptionType)}.`, + (_getOperationTypeNode3 = getOperationTypeNode( + schema, + OperationTypeNode.SUBSCRIPTION + )) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode + ); + } + } + function getOperationTypeNode(schema, operation) { + var _flatMap$find; + return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (schemaNode) => { + var _schemaNode$operation; + return ( + /* c8 ignore next */ + (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : [] + ); + } + ).find((operationNode) => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type; + } + function validateDirectives(context) { + for (const directive of context.schema.getDirectives()) { + if (!isDirective(directive)) { + context.reportError( + `Expected directive but got: ${inspect(directive)}.`, + directive === null || directive === void 0 ? void 0 : directive.astNode + ); + continue; + } + validateName(context, directive); + for (const arg of directive.args) { + validateName(context, arg); + if (!isInputType(arg.type)) { + context.reportError( + `The type of @${directive.name}(${arg.name}:) must be Input Type but got: ${inspect(arg.type)}.`, + arg.astNode + ); + } + if (isRequiredArgument(arg) && arg.deprecationReason != null) { + var _arg$astNode; + context.reportError( + `Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(arg.astNode), + (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type + ] + ); + } + } + } + } + function validateName(context, node) { + if (node.name.startsWith("__")) { + context.reportError( + `Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, + node.astNode + ); + } + } + function validateTypes(context) { + const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); + const typeMap = context.schema.getTypeMap(); + for (const type2 of Object.values(typeMap)) { + if (!isNamedType(type2)) { + context.reportError( + `Expected GraphQL named type but got: ${inspect(type2)}.`, + type2.astNode + ); + continue; + } + if (!isIntrospectionType(type2)) { + validateName(context, type2); + } + if (isObjectType(type2)) { + validateFields(context, type2); + validateInterfaces(context, type2); + } else if (isInterfaceType(type2)) { + validateFields(context, type2); + validateInterfaces(context, type2); + } else if (isUnionType(type2)) { + validateUnionMembers(context, type2); + } else if (isEnumType(type2)) { + validateEnumValues(context, type2); + } else if (isInputObjectType(type2)) { + validateInputFields(context, type2); + validateInputObjectCircularRefs(type2); + } + } + } + function validateFields(context, type2) { + const fields = Object.values(type2.getFields()); + if (fields.length === 0) { + context.reportError(`Type ${type2.name} must define one or more fields.`, [ + type2.astNode, + ...type2.extensionASTNodes + ]); + } + for (const field of fields) { + validateName(context, field); + if (!isOutputType(field.type)) { + var _field$astNode; + context.reportError( + `The type of ${type2.name}.${field.name} must be Output Type but got: ${inspect(field.type)}.`, + (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type + ); + } + for (const arg of field.args) { + const argName = arg.name; + validateName(context, arg); + if (!isInputType(arg.type)) { + var _arg$astNode2; + context.reportError( + `The type of ${type2.name}.${field.name}(${argName}:) must be Input Type but got: ${inspect(arg.type)}.`, + (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type + ); + } + if (isRequiredArgument(arg) && arg.deprecationReason != null) { + var _arg$astNode3; + context.reportError( + `Required argument ${type2.name}.${field.name}(${argName}:) cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(arg.astNode), + (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type + ] + ); + } + } + } + } + function validateInterfaces(context, type2) { + const ifaceTypeNames = /* @__PURE__ */ Object.create(null); + for (const iface of type2.getInterfaces()) { + if (!isInterfaceType(iface)) { + context.reportError( + `Type ${inspect(type2)} must only implement Interface types, it cannot implement ${inspect(iface)}.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + if (type2 === iface) { + context.reportError( + `Type ${type2.name} cannot implement itself because it would create a circular reference.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + if (ifaceTypeNames[iface.name]) { + context.reportError( + `Type ${type2.name} can only implement ${iface.name} once.`, + getAllImplementsInterfaceNodes(type2, iface) + ); + continue; + } + ifaceTypeNames[iface.name] = true; + validateTypeImplementsAncestors(context, type2, iface); + validateTypeImplementsInterface(context, type2, iface); + } + } + function validateTypeImplementsInterface(context, type2, iface) { + const typeFieldMap = type2.getFields(); + for (const ifaceField of Object.values(iface.getFields())) { + const fieldName = ifaceField.name; + const typeField = typeFieldMap[fieldName]; + if (!typeField) { + context.reportError( + `Interface field ${iface.name}.${fieldName} expected but ${type2.name} does not provide it.`, + [ifaceField.astNode, type2.astNode, ...type2.extensionASTNodes] + ); + continue; + } + if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) { + var _ifaceField$astNode, _typeField$astNode; + context.reportError( + `Interface field ${iface.name}.${fieldName} expects type ${inspect(ifaceField.type)} but ${type2.name}.${fieldName} is type ${inspect(typeField.type)}.`, + [ + (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, + (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type + ] + ); + } + for (const ifaceArg of ifaceField.args) { + const argName = ifaceArg.name; + const typeArg = typeField.args.find((arg) => arg.name === argName); + if (!typeArg) { + context.reportError( + `Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type2.name}.${fieldName} does not provide it.`, + [ifaceArg.astNode, typeField.astNode] + ); + continue; + } + if (!isEqualType(ifaceArg.type, typeArg.type)) { + var _ifaceArg$astNode, _typeArg$astNode; + context.reportError( + `Interface field argument ${iface.name}.${fieldName}(${argName}:) expects type ${inspect(ifaceArg.type)} but ${type2.name}.${fieldName}(${argName}:) is type ${inspect(typeArg.type)}.`, + [ + (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, + (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type + ] + ); + } + } + for (const typeArg of typeField.args) { + const argName = typeArg.name; + const ifaceArg = ifaceField.args.find((arg) => arg.name === argName); + if (!ifaceArg && isRequiredArgument(typeArg)) { + context.reportError( + `Object field ${type2.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, + [typeArg.astNode, ifaceField.astNode] + ); + } + } + } + } + function validateTypeImplementsAncestors(context, type2, iface) { + const ifaceInterfaces = type2.getInterfaces(); + for (const transitive of iface.getInterfaces()) { + if (!ifaceInterfaces.includes(transitive)) { + context.reportError( + transitive === type2 ? `Type ${type2.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type2.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, + [ + ...getAllImplementsInterfaceNodes(iface, transitive), + ...getAllImplementsInterfaceNodes(type2, iface) + ] + ); + } + } + } + function validateUnionMembers(context, union) { + const memberTypes = union.getTypes(); + if (memberTypes.length === 0) { + context.reportError( + `Union type ${union.name} must define one or more member types.`, + [union.astNode, ...union.extensionASTNodes] + ); + } + const includedTypeNames = /* @__PURE__ */ Object.create(null); + for (const memberType of memberTypes) { + if (includedTypeNames[memberType.name]) { + context.reportError( + `Union type ${union.name} can only include type ${memberType.name} once.`, + getUnionMemberTypeNodes(union, memberType.name) + ); + continue; + } + includedTypeNames[memberType.name] = true; + if (!isObjectType(memberType)) { + context.reportError( + `Union type ${union.name} can only include Object types, it cannot include ${inspect(memberType)}.`, + getUnionMemberTypeNodes(union, String(memberType)) + ); + } + } + } + function validateEnumValues(context, enumType) { + const enumValues = enumType.getValues(); + if (enumValues.length === 0) { + context.reportError( + `Enum type ${enumType.name} must define one or more values.`, + [enumType.astNode, ...enumType.extensionASTNodes] + ); + } + for (const enumValue of enumValues) { + validateName(context, enumValue); + } + } + function validateInputFields(context, inputObj) { + const fields = Object.values(inputObj.getFields()); + if (fields.length === 0) { + context.reportError( + `Input Object type ${inputObj.name} must define one or more fields.`, + [inputObj.astNode, ...inputObj.extensionASTNodes] + ); + } + for (const field of fields) { + validateName(context, field); + if (!isInputType(field.type)) { + var _field$astNode2; + context.reportError( + `The type of ${inputObj.name}.${field.name} must be Input Type but got: ${inspect(field.type)}.`, + (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type + ); + } + if (isRequiredInputField(field) && field.deprecationReason != null) { + var _field$astNode3; + context.reportError( + `Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, + [ + getDeprecatedDirectiveNode(field.astNode), + (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type + ] + ); + } + } + } + function createInputObjectCircularRefsValidator(context) { + const visitedTypes = /* @__PURE__ */ Object.create(null); + const fieldPath = []; + const fieldPathIndexByTypeName = /* @__PURE__ */ Object.create(null); + return detectCycleRecursive; + function detectCycleRecursive(inputObj) { + if (visitedTypes[inputObj.name]) { + return; + } + visitedTypes[inputObj.name] = true; + fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; + const fields = Object.values(inputObj.getFields()); + for (const field of fields) { + if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) { + const fieldType = field.type.ofType; + const cycleIndex = fieldPathIndexByTypeName[fieldType.name]; + fieldPath.push(field); + if (cycleIndex === void 0) { + detectCycleRecursive(fieldType); + } else { + const cyclePath = fieldPath.slice(cycleIndex); + const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join("."); + context.reportError( + `Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, + cyclePath.map((fieldObj) => fieldObj.astNode) + ); + } + fieldPath.pop(); + } + } + fieldPathIndexByTypeName[inputObj.name] = void 0; + } + } + function getAllImplementsInterfaceNodes(type2, iface) { + const { astNode, extensionASTNodes } = type2; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; + return nodes.flatMap((typeNode) => { + var _typeNode$interfaces; + return ( + /* c8 ignore next */ + (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : [] + ); + }).filter((ifaceNode) => ifaceNode.name.value === iface.name); + } + function getUnionMemberTypeNodes(union, typeName) { + const { astNode, extensionASTNodes } = union; + const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; + return nodes.flatMap((unionNode) => { + var _unionNode$types; + return ( + /* c8 ignore next */ + (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : [] + ); + }).filter((typeNode) => typeNode.name.value === typeName); + } + function getDeprecatedDirectiveNode(definitionNode) { + var _definitionNode$direc; + return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find( + (node) => node.name.value === GraphQLDeprecatedDirective.name + ); + } + + // node_modules/graphql/utilities/typeFromAST.mjs + function typeFromAST(schema, typeNode) { + switch (typeNode.kind) { + case Kind.LIST_TYPE: { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new GraphQLList(innerType); + } + case Kind.NON_NULL_TYPE: { + const innerType = typeFromAST(schema, typeNode.type); + return innerType && new GraphQLNonNull(innerType); + } + case Kind.NAMED_TYPE: + return schema.getType(typeNode.name.value); + } + } + + // node_modules/graphql/utilities/TypeInfo.mjs + var TypeInfo = class { + constructor(schema, initialType, getFieldDefFn) { + this._schema = schema; + this._typeStack = []; + this._parentTypeStack = []; + this._inputTypeStack = []; + this._fieldDefStack = []; + this._defaultValueStack = []; + this._directive = null; + this._argument = null; + this._enumValue = null; + this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; + if (initialType) { + if (isInputType(initialType)) { + this._inputTypeStack.push(initialType); + } + if (isCompositeType(initialType)) { + this._parentTypeStack.push(initialType); + } + if (isOutputType(initialType)) { + this._typeStack.push(initialType); + } + } + } + get [Symbol.toStringTag]() { + return "TypeInfo"; + } + getType() { + if (this._typeStack.length > 0) { + return this._typeStack[this._typeStack.length - 1]; + } + } + getParentType() { + if (this._parentTypeStack.length > 0) { + return this._parentTypeStack[this._parentTypeStack.length - 1]; + } + } + getInputType() { + if (this._inputTypeStack.length > 0) { + return this._inputTypeStack[this._inputTypeStack.length - 1]; + } + } + getParentInputType() { + if (this._inputTypeStack.length > 1) { + return this._inputTypeStack[this._inputTypeStack.length - 2]; + } + } + getFieldDef() { + if (this._fieldDefStack.length > 0) { + return this._fieldDefStack[this._fieldDefStack.length - 1]; + } + } + getDefaultValue() { + if (this._defaultValueStack.length > 0) { + return this._defaultValueStack[this._defaultValueStack.length - 1]; + } + } + getDirective() { + return this._directive; + } + getArgument() { + return this._argument; + } + getEnumValue() { + return this._enumValue; + } + enter(node) { + const schema = this._schema; + switch (node.kind) { + case Kind.SELECTION_SET: { + const namedType = getNamedType(this.getType()); + this._parentTypeStack.push( + isCompositeType(namedType) ? namedType : void 0 + ); + break; + } + case Kind.FIELD: { + const parentType = this.getParentType(); + let fieldDef; + let fieldType; + if (parentType) { + fieldDef = this._getFieldDef(schema, parentType, node); + if (fieldDef) { + fieldType = fieldDef.type; + } + } + this._fieldDefStack.push(fieldDef); + this._typeStack.push(isOutputType(fieldType) ? fieldType : void 0); + break; + } + case Kind.DIRECTIVE: + this._directive = schema.getDirective(node.name.value); + break; + case Kind.OPERATION_DEFINITION: { + const rootType = schema.getRootType(node.operation); + this._typeStack.push(isObjectType(rootType) ? rootType : void 0); + break; + } + case Kind.INLINE_FRAGMENT: + case Kind.FRAGMENT_DEFINITION: { + const typeConditionAST = node.typeCondition; + const outputType = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType()); + this._typeStack.push(isOutputType(outputType) ? outputType : void 0); + break; + } + case Kind.VARIABLE_DEFINITION: { + const inputType = typeFromAST(schema, node.type); + this._inputTypeStack.push( + isInputType(inputType) ? inputType : void 0 + ); + break; + } + case Kind.ARGUMENT: { + var _this$getDirective; + let argDef; + let argType; + const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); + if (fieldOrDirective) { + argDef = fieldOrDirective.args.find( + (arg) => arg.name === node.name.value + ); + if (argDef) { + argType = argDef.type; + } + } + this._argument = argDef; + this._defaultValueStack.push(argDef ? argDef.defaultValue : void 0); + this._inputTypeStack.push(isInputType(argType) ? argType : void 0); + break; + } + case Kind.LIST: { + const listType = getNullableType(this.getInputType()); + const itemType = isListType(listType) ? listType.ofType : listType; + this._defaultValueStack.push(void 0); + this._inputTypeStack.push(isInputType(itemType) ? itemType : void 0); + break; + } + case Kind.OBJECT_FIELD: { + const objectType = getNamedType(this.getInputType()); + let inputFieldType; + let inputField; + if (isInputObjectType(objectType)) { + inputField = objectType.getFields()[node.name.value]; + if (inputField) { + inputFieldType = inputField.type; + } + } + this._defaultValueStack.push( + inputField ? inputField.defaultValue : void 0 + ); + this._inputTypeStack.push( + isInputType(inputFieldType) ? inputFieldType : void 0 + ); + break; + } + case Kind.ENUM: { + const enumType = getNamedType(this.getInputType()); + let enumValue; + if (isEnumType(enumType)) { + enumValue = enumType.getValue(node.value); + } + this._enumValue = enumValue; + break; + } + default: + } + } + leave(node) { + switch (node.kind) { + case Kind.SELECTION_SET: + this._parentTypeStack.pop(); + break; + case Kind.FIELD: + this._fieldDefStack.pop(); + this._typeStack.pop(); + break; + case Kind.DIRECTIVE: + this._directive = null; + break; + case Kind.OPERATION_DEFINITION: + case Kind.INLINE_FRAGMENT: + case Kind.FRAGMENT_DEFINITION: + this._typeStack.pop(); + break; + case Kind.VARIABLE_DEFINITION: + this._inputTypeStack.pop(); + break; + case Kind.ARGUMENT: + this._argument = null; + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case Kind.LIST: + case Kind.OBJECT_FIELD: + this._defaultValueStack.pop(); + this._inputTypeStack.pop(); + break; + case Kind.ENUM: + this._enumValue = null; + break; + default: + } + } + }; + function getFieldDef(schema, parentType, fieldNode) { + const name2 = fieldNode.name.value; + if (name2 === SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { + return SchemaMetaFieldDef; + } + if (name2 === TypeMetaFieldDef.name && schema.getQueryType() === parentType) { + return TypeMetaFieldDef; + } + if (name2 === TypeNameMetaFieldDef.name && isCompositeType(parentType)) { + return TypeNameMetaFieldDef; + } + if (isObjectType(parentType) || isInterfaceType(parentType)) { + return parentType.getFields()[name2]; + } + } + function visitWithTypeInfo(typeInfo, visitor) { + return { + enter(...args) { + const node = args[0]; + typeInfo.enter(node); + const fn = getEnterLeaveForKind(visitor, node.kind).enter; + if (fn) { + const result = fn.apply(visitor, args); + if (result !== void 0) { + typeInfo.leave(node); + if (isNode(result)) { + typeInfo.enter(result); + } + } + return result; + } + }, + leave(...args) { + const node = args[0]; + const fn = getEnterLeaveForKind(visitor, node.kind).leave; + let result; + if (fn) { + result = fn.apply(visitor, args); + } + typeInfo.leave(node); + return result; + } + }; + } + + // node_modules/graphql/language/predicates.mjs + function isExecutableDefinitionNode(node) { + return node.kind === Kind.OPERATION_DEFINITION || node.kind === Kind.FRAGMENT_DEFINITION; + } + function isTypeSystemDefinitionNode(node) { + return node.kind === Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === Kind.DIRECTIVE_DEFINITION; + } + function isTypeDefinitionNode(node) { + return node.kind === Kind.SCALAR_TYPE_DEFINITION || node.kind === Kind.OBJECT_TYPE_DEFINITION || node.kind === Kind.INTERFACE_TYPE_DEFINITION || node.kind === Kind.UNION_TYPE_DEFINITION || node.kind === Kind.ENUM_TYPE_DEFINITION || node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION; + } + function isTypeSystemExtensionNode(node) { + return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node); + } + function isTypeExtensionNode(node) { + return node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || node.kind === Kind.INTERFACE_TYPE_EXTENSION || node.kind === Kind.UNION_TYPE_EXTENSION || node.kind === Kind.ENUM_TYPE_EXTENSION || node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + + // node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs + function ExecutableDefinitionsRule(context) { + return { + Document(node) { + for (const definition of node.definitions) { + if (!isExecutableDefinitionNode(definition)) { + const defName = definition.kind === Kind.SCHEMA_DEFINITION || definition.kind === Kind.SCHEMA_EXTENSION ? "schema" : '"' + definition.name.value + '"'; + context.reportError( + new GraphQLError(`The ${defName} definition is not executable.`, { + nodes: definition + }) + ); + } + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs + function FieldsOnCorrectTypeRule(context) { + return { + Field(node) { + const type2 = context.getParentType(); + if (type2) { + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + const schema = context.getSchema(); + const fieldName = node.name.value; + let suggestion = didYouMean( + "to use an inline fragment on", + getSuggestedTypeNames(schema, type2, fieldName) + ); + if (suggestion === "") { + suggestion = didYouMean(getSuggestedFieldNames(type2, fieldName)); + } + context.reportError( + new GraphQLError( + `Cannot query field "${fieldName}" on type "${type2.name}".` + suggestion, + { + nodes: node + } + ) + ); + } + } + } + }; + } + function getSuggestedTypeNames(schema, type2, fieldName) { + if (!isAbstractType(type2)) { + return []; + } + const suggestedTypes = /* @__PURE__ */ new Set(); + const usageCount = /* @__PURE__ */ Object.create(null); + for (const possibleType of schema.getPossibleTypes(type2)) { + if (!possibleType.getFields()[fieldName]) { + continue; + } + suggestedTypes.add(possibleType); + usageCount[possibleType.name] = 1; + for (const possibleInterface of possibleType.getInterfaces()) { + var _usageCount$possibleI; + if (!possibleInterface.getFields()[fieldName]) { + continue; + } + suggestedTypes.add(possibleInterface); + usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; + } + } + return [...suggestedTypes].sort((typeA, typeB) => { + const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; + if (usageCountDiff !== 0) { + return usageCountDiff; + } + if (isInterfaceType(typeA) && schema.isSubType(typeA, typeB)) { + return -1; + } + if (isInterfaceType(typeB) && schema.isSubType(typeB, typeA)) { + return 1; + } + return naturalCompare(typeA.name, typeB.name); + }).map((x) => x.name); + } + function getSuggestedFieldNames(type2, fieldName) { + if (isObjectType(type2) || isInterfaceType(type2)) { + const possibleFieldNames = Object.keys(type2.getFields()); + return suggestionList(fieldName, possibleFieldNames); + } + return []; + } + + // node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs + function FragmentsOnCompositeTypesRule(context) { + return { + InlineFragment(node) { + const typeCondition = node.typeCondition; + if (typeCondition) { + const type2 = typeFromAST(context.getSchema(), typeCondition); + if (type2 && !isCompositeType(type2)) { + const typeStr = print(typeCondition); + context.reportError( + new GraphQLError( + `Fragment cannot condition on non composite type "${typeStr}".`, + { + nodes: typeCondition + } + ) + ); + } + } + }, + FragmentDefinition(node) { + const type2 = typeFromAST(context.getSchema(), node.typeCondition); + if (type2 && !isCompositeType(type2)) { + const typeStr = print(node.typeCondition); + context.reportError( + new GraphQLError( + `Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, + { + nodes: node.typeCondition + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs + function KnownArgumentNamesRule(context) { + return { + // eslint-disable-next-line new-cap + ...KnownArgumentNamesOnDirectivesRule(context), + Argument(argNode) { + const argDef = context.getArgument(); + const fieldDef = context.getFieldDef(); + const parentType = context.getParentType(); + if (!argDef && fieldDef && parentType) { + const argName = argNode.name.value; + const knownArgsNames = fieldDef.args.map((arg) => arg.name); + const suggestions = suggestionList(argName, knownArgsNames); + context.reportError( + new GraphQLError( + `Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + didYouMean(suggestions), + { + nodes: argNode + } + ) + ); + } + } + }; + } + function KnownArgumentNamesOnDirectivesRule(context) { + const directiveArgs = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + directiveArgs[directive.name] = directive.args.map((arg) => arg.name); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value); + } + } + return { + Directive(directiveNode) { + const directiveName = directiveNode.name.value; + const knownArgs = directiveArgs[directiveName]; + if (directiveNode.arguments && knownArgs) { + for (const argNode of directiveNode.arguments) { + const argName = argNode.name.value; + if (!knownArgs.includes(argName)) { + const suggestions = suggestionList(argName, knownArgs); + context.reportError( + new GraphQLError( + `Unknown argument "${argName}" on directive "@${directiveName}".` + didYouMean(suggestions), + { + nodes: argNode + } + ) + ); + } + } + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/KnownDirectivesRule.mjs + function KnownDirectivesRule(context) { + const locationsMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + locationsMap[directive.name] = directive.locations; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + locationsMap[def.name.value] = def.locations.map((name2) => name2.value); + } + } + return { + Directive(node, _key, _parent, _path, ancestors) { + const name2 = node.name.value; + const locations = locationsMap[name2]; + if (!locations) { + context.reportError( + new GraphQLError(`Unknown directive "@${name2}".`, { + nodes: node + }) + ); + return; + } + const candidateLocation = getDirectiveLocationForASTPath(ancestors); + if (candidateLocation && !locations.includes(candidateLocation)) { + context.reportError( + new GraphQLError( + `Directive "@${name2}" may not be used on ${candidateLocation}.`, + { + nodes: node + } + ) + ); + } + } + }; + } + function getDirectiveLocationForASTPath(ancestors) { + const appliedTo = ancestors[ancestors.length - 1]; + "kind" in appliedTo || invariant(false); + switch (appliedTo.kind) { + case Kind.OPERATION_DEFINITION: + return getDirectiveLocationForOperation(appliedTo.operation); + case Kind.FIELD: + return DirectiveLocation.FIELD; + case Kind.FRAGMENT_SPREAD: + return DirectiveLocation.FRAGMENT_SPREAD; + case Kind.INLINE_FRAGMENT: + return DirectiveLocation.INLINE_FRAGMENT; + case Kind.FRAGMENT_DEFINITION: + return DirectiveLocation.FRAGMENT_DEFINITION; + case Kind.VARIABLE_DEFINITION: + return DirectiveLocation.VARIABLE_DEFINITION; + case Kind.SCHEMA_DEFINITION: + case Kind.SCHEMA_EXTENSION: + return DirectiveLocation.SCHEMA; + case Kind.SCALAR_TYPE_DEFINITION: + case Kind.SCALAR_TYPE_EXTENSION: + return DirectiveLocation.SCALAR; + case Kind.OBJECT_TYPE_DEFINITION: + case Kind.OBJECT_TYPE_EXTENSION: + return DirectiveLocation.OBJECT; + case Kind.FIELD_DEFINITION: + return DirectiveLocation.FIELD_DEFINITION; + case Kind.INTERFACE_TYPE_DEFINITION: + case Kind.INTERFACE_TYPE_EXTENSION: + return DirectiveLocation.INTERFACE; + case Kind.UNION_TYPE_DEFINITION: + case Kind.UNION_TYPE_EXTENSION: + return DirectiveLocation.UNION; + case Kind.ENUM_TYPE_DEFINITION: + case Kind.ENUM_TYPE_EXTENSION: + return DirectiveLocation.ENUM; + case Kind.ENUM_VALUE_DEFINITION: + return DirectiveLocation.ENUM_VALUE; + case Kind.INPUT_OBJECT_TYPE_DEFINITION: + case Kind.INPUT_OBJECT_TYPE_EXTENSION: + return DirectiveLocation.INPUT_OBJECT; + case Kind.INPUT_VALUE_DEFINITION: { + const parentNode = ancestors[ancestors.length - 3]; + "kind" in parentNode || invariant(false); + return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? DirectiveLocation.INPUT_FIELD_DEFINITION : DirectiveLocation.ARGUMENT_DEFINITION; + } + default: + invariant(false, "Unexpected kind: " + inspect(appliedTo.kind)); + } + } + function getDirectiveLocationForOperation(operation) { + switch (operation) { + case OperationTypeNode.QUERY: + return DirectiveLocation.QUERY; + case OperationTypeNode.MUTATION: + return DirectiveLocation.MUTATION; + case OperationTypeNode.SUBSCRIPTION: + return DirectiveLocation.SUBSCRIPTION; + } + } + + // node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs + function KnownFragmentNamesRule(context) { + return { + FragmentSpread(node) { + const fragmentName = node.name.value; + const fragment = context.getFragment(fragmentName); + if (!fragment) { + context.reportError( + new GraphQLError(`Unknown fragment "${fragmentName}".`, { + nodes: node.name + }) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs + function KnownTypeNamesRule(context) { + const schema = context.getSchema(); + const existingTypesMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const definedTypes = /* @__PURE__ */ Object.create(null); + for (const def of context.getDocument().definitions) { + if (isTypeDefinitionNode(def)) { + definedTypes[def.name.value] = true; + } + } + const typeNames = [ + ...Object.keys(existingTypesMap), + ...Object.keys(definedTypes) + ]; + return { + NamedType(node, _1, parent, _2, ancestors) { + const typeName = node.name.value; + if (!existingTypesMap[typeName] && !definedTypes[typeName]) { + var _ancestors$; + const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; + const isSDL = definitionNode != null && isSDLNode(definitionNode); + if (isSDL && standardTypeNames.includes(typeName)) { + return; + } + const suggestedTypes = suggestionList( + typeName, + isSDL ? standardTypeNames.concat(typeNames) : typeNames + ); + context.reportError( + new GraphQLError( + `Unknown type "${typeName}".` + didYouMean(suggestedTypes), + { + nodes: node + } + ) + ); + } + } + }; + } + var standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map( + (type2) => type2.name + ); + function isSDLNode(value) { + return "kind" in value && (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value)); + } + + // node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs + function LoneAnonymousOperationRule(context) { + let operationCount = 0; + return { + Document(node) { + operationCount = node.definitions.filter( + (definition) => definition.kind === Kind.OPERATION_DEFINITION + ).length; + }, + OperationDefinition(node) { + if (!node.name && operationCount > 1) { + context.reportError( + new GraphQLError( + "This anonymous operation must be the only defined operation.", + { + nodes: node + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs + function LoneSchemaDefinitionRule(context) { + var _ref, _ref2, _oldSchema$astNode; + const oldSchema = context.getSchema(); + const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); + let schemaDefinitionsCount = 0; + return { + SchemaDefinition(node) { + if (alreadyDefined) { + context.reportError( + new GraphQLError( + "Cannot define a new schema within a schema extension.", + { + nodes: node + } + ) + ); + return; + } + if (schemaDefinitionsCount > 0) { + context.reportError( + new GraphQLError("Must provide only one schema definition.", { + nodes: node + }) + ); + } + ++schemaDefinitionsCount; + } + }; + } + + // node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs + function NoFragmentCyclesRule(context) { + const visitedFrags = /* @__PURE__ */ Object.create(null); + const spreadPath = []; + const spreadPathIndexByName = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + detectCycleRecursive(node); + return false; + } + }; + function detectCycleRecursive(fragment) { + if (visitedFrags[fragment.name.value]) { + return; + } + const fragmentName = fragment.name.value; + visitedFrags[fragmentName] = true; + const spreadNodes = context.getFragmentSpreads(fragment.selectionSet); + if (spreadNodes.length === 0) { + return; + } + spreadPathIndexByName[fragmentName] = spreadPath.length; + for (const spreadNode of spreadNodes) { + const spreadName = spreadNode.name.value; + const cycleIndex = spreadPathIndexByName[spreadName]; + spreadPath.push(spreadNode); + if (cycleIndex === void 0) { + const spreadFragment = context.getFragment(spreadName); + if (spreadFragment) { + detectCycleRecursive(spreadFragment); + } + } else { + const cyclePath = spreadPath.slice(cycleIndex); + const viaPath = cyclePath.slice(0, -1).map((s) => '"' + s.name.value + '"').join(", "); + context.reportError( + new GraphQLError( + `Cannot spread fragment "${spreadName}" within itself` + (viaPath !== "" ? ` via ${viaPath}.` : "."), + { + nodes: cyclePath + } + ) + ); + } + spreadPath.pop(); + } + spreadPathIndexByName[fragmentName] = void 0; + } + } + + // node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs + function NoUndefinedVariablesRule(context) { + let variableNameDefined = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: { + enter() { + variableNameDefined = /* @__PURE__ */ Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { node } of usages) { + const varName = node.name.value; + if (variableNameDefined[varName] !== true) { + context.reportError( + new GraphQLError( + operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, + { + nodes: [node, operation] + } + ) + ); + } + } + } + }, + VariableDefinition(node) { + variableNameDefined[node.variable.name.value] = true; + } + }; + } + + // node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs + function NoUnusedFragmentsRule(context) { + const operationDefs = []; + const fragmentDefs = []; + return { + OperationDefinition(node) { + operationDefs.push(node); + return false; + }, + FragmentDefinition(node) { + fragmentDefs.push(node); + return false; + }, + Document: { + leave() { + const fragmentNameUsed = /* @__PURE__ */ Object.create(null); + for (const operation of operationDefs) { + for (const fragment of context.getRecursivelyReferencedFragments( + operation + )) { + fragmentNameUsed[fragment.name.value] = true; + } + } + for (const fragmentDef of fragmentDefs) { + const fragName = fragmentDef.name.value; + if (fragmentNameUsed[fragName] !== true) { + context.reportError( + new GraphQLError(`Fragment "${fragName}" is never used.`, { + nodes: fragmentDef + }) + ); + } + } + } + } + }; + } + + // node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs + function NoUnusedVariablesRule(context) { + let variableDefs = []; + return { + OperationDefinition: { + enter() { + variableDefs = []; + }, + leave(operation) { + const variableNameUsed = /* @__PURE__ */ Object.create(null); + const usages = context.getRecursiveVariableUsages(operation); + for (const { node } of usages) { + variableNameUsed[node.name.value] = true; + } + for (const variableDef of variableDefs) { + const variableName = variableDef.variable.name.value; + if (variableNameUsed[variableName] !== true) { + context.reportError( + new GraphQLError( + operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, + { + nodes: variableDef + } + ) + ); + } + } + } + }, + VariableDefinition(def) { + variableDefs.push(def); + } + }; + } + + // node_modules/graphql/utilities/sortValueNode.mjs + function sortValueNode(valueNode) { + switch (valueNode.kind) { + case Kind.OBJECT: + return { ...valueNode, fields: sortFields(valueNode.fields) }; + case Kind.LIST: + return { ...valueNode, values: valueNode.values.map(sortValueNode) }; + case Kind.INT: + case Kind.FLOAT: + case Kind.STRING: + case Kind.BOOLEAN: + case Kind.NULL: + case Kind.ENUM: + case Kind.VARIABLE: + return valueNode; + } + } + function sortFields(fields) { + return fields.map((fieldNode) => ({ + ...fieldNode, + value: sortValueNode(fieldNode.value) + })).sort( + (fieldA, fieldB) => naturalCompare(fieldA.name.value, fieldB.name.value) + ); + } + + // node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs + function reasonMessage(reason) { + if (Array.isArray(reason)) { + return reason.map( + ([responseName, subReason]) => `subfields "${responseName}" conflict because ` + reasonMessage(subReason) + ).join(" and "); + } + return reason; + } + function OverlappingFieldsCanBeMergedRule(context) { + const comparedFragmentPairs = new PairSet(); + const cachedFieldsAndFragmentNames = /* @__PURE__ */ new Map(); + return { + SelectionSet(selectionSet) { + const conflicts = findConflictsWithinSelectionSet( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + context.getParentType(), + selectionSet + ); + for (const [[responseName, reason], fields1, fields2] of conflicts) { + const reasonMsg = reasonMessage(reason); + context.reportError( + new GraphQLError( + `Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, + { + nodes: fields1.concat(fields2) + } + ) + ); + } + } + }; + } + function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) { + const conflicts = []; + const [fieldMap, fragmentNames] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType, + selectionSet + ); + collectConflictsWithin( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + fieldMap + ); + if (fragmentNames.length !== 0) { + for (let i = 0; i < fragmentNames.length; i++) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + fieldMap, + fragmentNames[i] + ); + for (let j = i + 1; j < fragmentNames.length; j++) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + fragmentNames[i], + fragmentNames[j] + ); + } + } + } + return conflicts; + } + function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) { + const fragment = context.getFragment(fragmentName); + if (!fragment) { + return; + } + const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment + ); + if (fieldMap === fieldMap2) { + return; + } + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap, + fieldMap2 + ); + for (const referencedFragmentName of referencedFragmentNames) { + if (comparedFragmentPairs.has( + referencedFragmentName, + fragmentName, + areMutuallyExclusive + )) { + continue; + } + comparedFragmentPairs.add( + referencedFragmentName, + fragmentName, + areMutuallyExclusive + ); + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap, + referencedFragmentName + ); + } + } + function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) { + if (fragmentName1 === fragmentName2) { + return; + } + if (comparedFragmentPairs.has( + fragmentName1, + fragmentName2, + areMutuallyExclusive + )) { + return; + } + comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); + const fragment1 = context.getFragment(fragmentName1); + const fragment2 = context.getFragment(fragmentName2); + if (!fragment1 || !fragment2) { + return; + } + const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment1 + ); + const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragment2 + ); + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fieldMap2 + ); + for (const referencedFragmentName2 of referencedFragmentNames2) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fragmentName1, + referencedFragmentName2 + ); + } + for (const referencedFragmentName1 of referencedFragmentNames1) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + referencedFragmentName1, + fragmentName2 + ); + } + } + function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) { + const conflicts = []; + const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType1, + selectionSet1 + ); + const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + parentType2, + selectionSet2 + ); + collectConflictsBetween( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fieldMap2 + ); + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap1, + fragmentName2 + ); + } + for (const fragmentName1 of fragmentNames1) { + collectConflictsBetweenFieldsAndFragment( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fieldMap2, + fragmentName1 + ); + } + for (const fragmentName1 of fragmentNames1) { + for (const fragmentName2 of fragmentNames2) { + collectConflictsBetweenFragments( + context, + conflicts, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + fragmentName1, + fragmentName2 + ); + } + } + return conflicts; + } + function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) { + for (const [responseName, fields] of Object.entries(fieldMap)) { + if (fields.length > 1) { + for (let i = 0; i < fields.length; i++) { + for (let j = i + 1; j < fields.length; j++) { + const conflict = findConflict( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + false, + // within one collection is never mutually exclusive + responseName, + fields[i], + fields[j] + ); + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } + } + function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) { + for (const [responseName, fields1] of Object.entries(fieldMap1)) { + const fields2 = fieldMap2[responseName]; + if (fields2) { + for (const field1 of fields1) { + for (const field2 of fields2) { + const conflict = findConflict( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + parentFieldsAreMutuallyExclusive, + responseName, + field1, + field2 + ); + if (conflict) { + conflicts.push(conflict); + } + } + } + } + } + } + function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) { + const [parentType1, node1, def1] = field1; + const [parentType2, node2, def2] = field2; + const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && isObjectType(parentType1) && isObjectType(parentType2); + if (!areMutuallyExclusive) { + const name1 = node1.name.value; + const name2 = node2.name.value; + if (name1 !== name2) { + return [ + [responseName, `"${name1}" and "${name2}" are different fields`], + [node1], + [node2] + ]; + } + if (stringifyArguments(node1) !== stringifyArguments(node2)) { + return [ + [responseName, "they have differing arguments"], + [node1], + [node2] + ]; + } + } + const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; + const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; + if (type1 && type2 && doTypesConflict(type1, type2)) { + return [ + [ + responseName, + `they return conflicting types "${inspect(type1)}" and "${inspect( + type2 + )}"` + ], + [node1], + [node2] + ]; + } + const selectionSet1 = node1.selectionSet; + const selectionSet2 = node2.selectionSet; + if (selectionSet1 && selectionSet2) { + const conflicts = findConflictsBetweenSubSelectionSets( + context, + cachedFieldsAndFragmentNames, + comparedFragmentPairs, + areMutuallyExclusive, + getNamedType(type1), + selectionSet1, + getNamedType(type2), + selectionSet2 + ); + return subfieldConflicts(conflicts, responseName, node1, node2); + } + } + function stringifyArguments(fieldNode) { + var _fieldNode$arguments; + const args = ( + /* c8 ignore next */ + (_fieldNode$arguments = fieldNode.arguments) !== null && _fieldNode$arguments !== void 0 ? _fieldNode$arguments : [] + ); + const inputObjectWithArgs = { + kind: Kind.OBJECT, + fields: args.map((argNode) => ({ + kind: Kind.OBJECT_FIELD, + name: argNode.name, + value: argNode.value + })) + }; + return print(sortValueNode(inputObjectWithArgs)); + } + function doTypesConflict(type1, type2) { + if (isListType(type1)) { + return isListType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if (isListType(type2)) { + return true; + } + if (isNonNullType(type1)) { + return isNonNullType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; + } + if (isNonNullType(type2)) { + return true; + } + if (isLeafType(type1) || isLeafType(type2)) { + return type1 !== type2; + } + return false; + } + function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) { + const cached = cachedFieldsAndFragmentNames.get(selectionSet); + if (cached) { + return cached; + } + const nodeAndDefs = /* @__PURE__ */ Object.create(null); + const fragmentNames = /* @__PURE__ */ Object.create(null); + _collectFieldsAndFragmentNames( + context, + parentType, + selectionSet, + nodeAndDefs, + fragmentNames + ); + const result = [nodeAndDefs, Object.keys(fragmentNames)]; + cachedFieldsAndFragmentNames.set(selectionSet, result); + return result; + } + function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) { + const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); + if (cached) { + return cached; + } + const fragmentType = typeFromAST(context.getSchema(), fragment.typeCondition); + return getFieldsAndFragmentNames( + context, + cachedFieldsAndFragmentNames, + fragmentType, + fragment.selectionSet + ); + } + function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case Kind.FIELD: { + const fieldName = selection.name.value; + let fieldDef; + if (isObjectType(parentType) || isInterfaceType(parentType)) { + fieldDef = parentType.getFields()[fieldName]; + } + const responseName = selection.alias ? selection.alias.value : fieldName; + if (!nodeAndDefs[responseName]) { + nodeAndDefs[responseName] = []; + } + nodeAndDefs[responseName].push([parentType, selection, fieldDef]); + break; + } + case Kind.FRAGMENT_SPREAD: + fragmentNames[selection.name.value] = true; + break; + case Kind.INLINE_FRAGMENT: { + const typeCondition = selection.typeCondition; + const inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType; + _collectFieldsAndFragmentNames( + context, + inlineFragmentType, + selection.selectionSet, + nodeAndDefs, + fragmentNames + ); + break; + } + } + } + } + function subfieldConflicts(conflicts, responseName, node1, node2) { + if (conflicts.length > 0) { + return [ + [responseName, conflicts.map(([reason]) => reason)], + [node1, ...conflicts.map(([, fields1]) => fields1).flat()], + [node2, ...conflicts.map(([, , fields2]) => fields2).flat()] + ]; + } + } + var PairSet = class { + constructor() { + this._data = /* @__PURE__ */ new Map(); + } + has(a, b, areMutuallyExclusive) { + var _this$_data$get; + const [key1, key2] = a < b ? [a, b] : [b, a]; + const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2); + if (result === void 0) { + return false; + } + return areMutuallyExclusive ? true : areMutuallyExclusive === result; + } + add(a, b, areMutuallyExclusive) { + const [key1, key2] = a < b ? [a, b] : [b, a]; + const map = this._data.get(key1); + if (map === void 0) { + this._data.set(key1, /* @__PURE__ */ new Map([[key2, areMutuallyExclusive]])); + } else { + map.set(key2, areMutuallyExclusive); + } + } + }; + + // node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs + function PossibleFragmentSpreadsRule(context) { + return { + InlineFragment(node) { + const fragType = context.getType(); + const parentType = context.getParentType(); + if (isCompositeType(fragType) && isCompositeType(parentType) && !doTypesOverlap(context.getSchema(), fragType, parentType)) { + const parentTypeStr = inspect(parentType); + const fragTypeStr = inspect(fragType); + context.reportError( + new GraphQLError( + `Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, + { + nodes: node + } + ) + ); + } + }, + FragmentSpread(node) { + const fragName = node.name.value; + const fragType = getFragmentType(context, fragName); + const parentType = context.getParentType(); + if (fragType && parentType && !doTypesOverlap(context.getSchema(), fragType, parentType)) { + const parentTypeStr = inspect(parentType); + const fragTypeStr = inspect(fragType); + context.reportError( + new GraphQLError( + `Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, + { + nodes: node + } + ) + ); + } + } + }; + } + function getFragmentType(context, name2) { + const frag = context.getFragment(name2); + if (frag) { + const type2 = typeFromAST(context.getSchema(), frag.typeCondition); + if (isCompositeType(type2)) { + return type2; + } + } + } + + // node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs + function PossibleTypeExtensionsRule(context) { + const schema = context.getSchema(); + const definedTypes = /* @__PURE__ */ Object.create(null); + for (const def of context.getDocument().definitions) { + if (isTypeDefinitionNode(def)) { + definedTypes[def.name.value] = def; + } + } + return { + ScalarTypeExtension: checkExtension, + ObjectTypeExtension: checkExtension, + InterfaceTypeExtension: checkExtension, + UnionTypeExtension: checkExtension, + EnumTypeExtension: checkExtension, + InputObjectTypeExtension: checkExtension + }; + function checkExtension(node) { + const typeName = node.name.value; + const defNode = definedTypes[typeName]; + const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); + let expectedKind; + if (defNode) { + expectedKind = defKindToExtKind[defNode.kind]; + } else if (existingType) { + expectedKind = typeToExtKind(existingType); + } + if (expectedKind) { + if (expectedKind !== node.kind) { + const kindStr = extensionKindToTypeName(node.kind); + context.reportError( + new GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, { + nodes: defNode ? [defNode, node] : node + }) + ); + } + } else { + const allTypeNames = Object.keys({ + ...definedTypes, + ...schema === null || schema === void 0 ? void 0 : schema.getTypeMap() + }); + const suggestedTypes = suggestionList(typeName, allTypeNames); + context.reportError( + new GraphQLError( + `Cannot extend type "${typeName}" because it is not defined.` + didYouMean(suggestedTypes), + { + nodes: node.name + } + ) + ); + } + } + } + var defKindToExtKind = { + [Kind.SCALAR_TYPE_DEFINITION]: Kind.SCALAR_TYPE_EXTENSION, + [Kind.OBJECT_TYPE_DEFINITION]: Kind.OBJECT_TYPE_EXTENSION, + [Kind.INTERFACE_TYPE_DEFINITION]: Kind.INTERFACE_TYPE_EXTENSION, + [Kind.UNION_TYPE_DEFINITION]: Kind.UNION_TYPE_EXTENSION, + [Kind.ENUM_TYPE_DEFINITION]: Kind.ENUM_TYPE_EXTENSION, + [Kind.INPUT_OBJECT_TYPE_DEFINITION]: Kind.INPUT_OBJECT_TYPE_EXTENSION + }; + function typeToExtKind(type2) { + if (isScalarType(type2)) { + return Kind.SCALAR_TYPE_EXTENSION; + } + if (isObjectType(type2)) { + return Kind.OBJECT_TYPE_EXTENSION; + } + if (isInterfaceType(type2)) { + return Kind.INTERFACE_TYPE_EXTENSION; + } + if (isUnionType(type2)) { + return Kind.UNION_TYPE_EXTENSION; + } + if (isEnumType(type2)) { + return Kind.ENUM_TYPE_EXTENSION; + } + if (isInputObjectType(type2)) { + return Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + invariant(false, "Unexpected type: " + inspect(type2)); + } + function extensionKindToTypeName(kind) { + switch (kind) { + case Kind.SCALAR_TYPE_EXTENSION: + return "scalar"; + case Kind.OBJECT_TYPE_EXTENSION: + return "object"; + case Kind.INTERFACE_TYPE_EXTENSION: + return "interface"; + case Kind.UNION_TYPE_EXTENSION: + return "union"; + case Kind.ENUM_TYPE_EXTENSION: + return "enum"; + case Kind.INPUT_OBJECT_TYPE_EXTENSION: + return "input object"; + default: + invariant(false, "Unexpected kind: " + inspect(kind)); + } + } + + // node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs + function ProvidedRequiredArgumentsRule(context) { + return { + // eslint-disable-next-line new-cap + ...ProvidedRequiredArgumentsOnDirectivesRule(context), + Field: { + // Validate on leave to allow for deeper errors to appear first. + leave(fieldNode) { + var _fieldNode$arguments; + const fieldDef = context.getFieldDef(); + if (!fieldDef) { + return false; + } + const providedArgs = new Set( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + /* c8 ignore next */ + (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map((arg) => arg.name.value) + ); + for (const argDef of fieldDef.args) { + if (!providedArgs.has(argDef.name) && isRequiredArgument(argDef)) { + const argTypeStr = inspect(argDef.type); + context.reportError( + new GraphQLError( + `Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, + { + nodes: fieldNode + } + ) + ); + } + } + } + } + }; + } + function ProvidedRequiredArgumentsOnDirectivesRule(context) { + var _schema$getDirectives; + const requiredArgsMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : specifiedDirectives; + for (const directive of definedDirectives) { + requiredArgsMap[directive.name] = keyMap( + directive.args.filter(isRequiredArgument), + (arg) => arg.name + ); + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + var _def$arguments; + const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; + requiredArgsMap[def.name.value] = keyMap( + argNodes.filter(isRequiredArgumentNode), + (arg) => arg.name.value + ); + } + } + return { + Directive: { + // Validate on leave to allow for deeper errors to appear first. + leave(directiveNode) { + const directiveName = directiveNode.name.value; + const requiredArgs = requiredArgsMap[directiveName]; + if (requiredArgs) { + var _directiveNode$argume; + const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + const argNodeMap = new Set(argNodes.map((arg) => arg.name.value)); + for (const [argName, argDef] of Object.entries(requiredArgs)) { + if (!argNodeMap.has(argName)) { + const argType = isType(argDef.type) ? inspect(argDef.type) : print(argDef.type); + context.reportError( + new GraphQLError( + `Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, + { + nodes: directiveNode + } + ) + ); + } + } + } + } + } + }; + } + function isRequiredArgumentNode(arg) { + return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null; + } + + // node_modules/graphql/validation/rules/ScalarLeafsRule.mjs + function ScalarLeafsRule(context) { + return { + Field(node) { + const type2 = context.getType(); + const selectionSet = node.selectionSet; + if (type2) { + if (isLeafType(getNamedType(type2))) { + if (selectionSet) { + const fieldName = node.name.value; + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, + { + nodes: selectionSet + } + ) + ); + } + } else if (!selectionSet) { + const fieldName = node.name.value; + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, + { + nodes: node + } + ) + ); + } + } + } + }; + } + + // node_modules/graphql/utilities/valueFromAST.mjs + function valueFromAST(valueNode, type2, variables) { + if (!valueNode) { + return; + } + if (valueNode.kind === Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variables == null || variables[variableName] === void 0) { + return; + } + const variableValue = variables[variableName]; + if (variableValue === null && isNonNullType(type2)) { + return; + } + return variableValue; + } + if (isNonNullType(type2)) { + if (valueNode.kind === Kind.NULL) { + return; + } + return valueFromAST(valueNode, type2.ofType, variables); + } + if (valueNode.kind === Kind.NULL) { + return null; + } + if (isListType(type2)) { + const itemType = type2.ofType; + if (valueNode.kind === Kind.LIST) { + const coercedValues = []; + for (const itemNode of valueNode.values) { + if (isMissingVariable(itemNode, variables)) { + if (isNonNullType(itemType)) { + return; + } + coercedValues.push(null); + } else { + const itemValue = valueFromAST(itemNode, itemType, variables); + if (itemValue === void 0) { + return; + } + coercedValues.push(itemValue); + } + } + return coercedValues; + } + const coercedValue = valueFromAST(valueNode, itemType, variables); + if (coercedValue === void 0) { + return; + } + return [coercedValue]; + } + if (isInputObjectType(type2)) { + if (valueNode.kind !== Kind.OBJECT) { + return; + } + const coercedObj = /* @__PURE__ */ Object.create(null); + const fieldNodes = keyMap(valueNode.fields, (field) => field.name.value); + for (const field of Object.values(type2.getFields())) { + const fieldNode = fieldNodes[field.name]; + if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { + if (field.defaultValue !== void 0) { + coercedObj[field.name] = field.defaultValue; + } else if (isNonNullType(field.type)) { + return; + } + continue; + } + const fieldValue = valueFromAST(fieldNode.value, field.type, variables); + if (fieldValue === void 0) { + return; + } + coercedObj[field.name] = fieldValue; + } + return coercedObj; + } + if (isLeafType(type2)) { + let result; + try { + result = type2.parseLiteral(valueNode, variables); + } catch (_error) { + return; + } + if (result === void 0) { + return; + } + return result; + } + invariant(false, "Unexpected input type: " + inspect(type2)); + } + function isMissingVariable(valueNode, variables) { + return valueNode.kind === Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === void 0); + } + + // node_modules/graphql/execution/values.mjs + function getArgumentValues(def, node, variableValues) { + var _node$arguments; + const coercedValues = {}; + const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : []; + const argNodeMap = keyMap(argumentNodes, (arg) => arg.name.value); + for (const argDef of def.args) { + const name2 = argDef.name; + const argType = argDef.type; + const argumentNode = argNodeMap[name2]; + if (!argumentNode) { + if (argDef.defaultValue !== void 0) { + coercedValues[name2] = argDef.defaultValue; + } else if (isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of required type "${inspect(argType)}" was not provided.`, + { + nodes: node + } + ); + } + continue; + } + const valueNode = argumentNode.value; + let isNull = valueNode.kind === Kind.NULL; + if (valueNode.kind === Kind.VARIABLE) { + const variableName = valueNode.name.value; + if (variableValues == null || !hasOwnProperty(variableValues, variableName)) { + if (argDef.defaultValue !== void 0) { + coercedValues[name2] = argDef.defaultValue; + } else if (isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of required type "${inspect(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`, + { + nodes: valueNode + } + ); + } + continue; + } + isNull = variableValues[variableName] == null; + } + if (isNull && isNonNullType(argType)) { + throw new GraphQLError( + `Argument "${name2}" of non-null type "${inspect(argType)}" must not be null.`, + { + nodes: valueNode + } + ); + } + const coercedValue = valueFromAST(valueNode, argType, variableValues); + if (coercedValue === void 0) { + throw new GraphQLError( + `Argument "${name2}" has invalid value ${print(valueNode)}.`, + { + nodes: valueNode + } + ); + } + coercedValues[name2] = coercedValue; + } + return coercedValues; + } + function getDirectiveValues(directiveDef, node, variableValues) { + var _node$directives; + const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find( + (directive) => directive.name.value === directiveDef.name + ); + if (directiveNode) { + return getArgumentValues(directiveDef, directiveNode, variableValues); + } + } + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + // node_modules/graphql/execution/collectFields.mjs + function collectFields(schema, fragments, variableValues, runtimeType, selectionSet) { + const fields = /* @__PURE__ */ new Map(); + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + selectionSet, + fields, + /* @__PURE__ */ new Set() + ); + return fields; + } + function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) { + for (const selection of selectionSet.selections) { + switch (selection.kind) { + case Kind.FIELD: { + if (!shouldIncludeNode(variableValues, selection)) { + continue; + } + const name2 = getFieldEntryKey(selection); + const fieldList = fields.get(name2); + if (fieldList !== void 0) { + fieldList.push(selection); + } else { + fields.set(name2, [selection]); + } + break; + } + case Kind.INLINE_FRAGMENT: { + if (!shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType)) { + continue; + } + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + selection.selectionSet, + fields, + visitedFragmentNames + ); + break; + } + case Kind.FRAGMENT_SPREAD: { + const fragName = selection.name.value; + if (visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection)) { + continue; + } + visitedFragmentNames.add(fragName); + const fragment = fragments[fragName]; + if (!fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType)) { + continue; + } + collectFieldsImpl( + schema, + fragments, + variableValues, + runtimeType, + fragment.selectionSet, + fields, + visitedFragmentNames + ); + break; + } + } + } + } + function shouldIncludeNode(variableValues, node) { + const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues); + if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) { + return false; + } + const include = getDirectiveValues( + GraphQLIncludeDirective, + node, + variableValues + ); + if ((include === null || include === void 0 ? void 0 : include.if) === false) { + return false; + } + return true; + } + function doesFragmentConditionMatch(schema, fragment, type2) { + const typeConditionNode = fragment.typeCondition; + if (!typeConditionNode) { + return true; + } + const conditionalType = typeFromAST(schema, typeConditionNode); + if (conditionalType === type2) { + return true; + } + if (isAbstractType(conditionalType)) { + return schema.isSubType(conditionalType, type2); + } + return false; + } + function getFieldEntryKey(node) { + return node.alias ? node.alias.value : node.name.value; + } + + // node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs + function SingleFieldSubscriptionsRule(context) { + return { + OperationDefinition(node) { + if (node.operation === "subscription") { + const schema = context.getSchema(); + const subscriptionType = schema.getSubscriptionType(); + if (subscriptionType) { + const operationName = node.name ? node.name.value : null; + const variableValues = /* @__PURE__ */ Object.create(null); + const document2 = context.getDocument(); + const fragments = /* @__PURE__ */ Object.create(null); + for (const definition of document2.definitions) { + if (definition.kind === Kind.FRAGMENT_DEFINITION) { + fragments[definition.name.value] = definition; + } + } + const fields = collectFields( + schema, + fragments, + variableValues, + subscriptionType, + node.selectionSet + ); + if (fields.size > 1) { + const fieldSelectionLists = [...fields.values()]; + const extraFieldSelectionLists = fieldSelectionLists.slice(1); + const extraFieldSelections = extraFieldSelectionLists.flat(); + context.reportError( + new GraphQLError( + operationName != null ? `Subscription "${operationName}" must select only one top level field.` : "Anonymous Subscription must select only one top level field.", + { + nodes: extraFieldSelections + } + ) + ); + } + for (const fieldNodes of fields.values()) { + const field = fieldNodes[0]; + const fieldName = field.name.value; + if (fieldName.startsWith("__")) { + context.reportError( + new GraphQLError( + operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : "Anonymous Subscription must not select an introspection top level field.", + { + nodes: fieldNodes + } + ) + ); + } + } + } + } + } + }; + } + + // node_modules/graphql/jsutils/groupBy.mjs + function groupBy(list2, keyFn) { + const result = /* @__PURE__ */ new Map(); + for (const item of list2) { + const key = keyFn(item); + const group2 = result.get(key); + if (group2 === void 0) { + result.set(key, [item]); + } else { + group2.push(item); + } + } + return result; + } + + // node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs + function UniqueArgumentDefinitionNamesRule(context) { + return { + DirectiveDefinition(directiveNode) { + var _directiveNode$argume; + const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; + return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes); + }, + InterfaceTypeDefinition: checkArgUniquenessPerField, + InterfaceTypeExtension: checkArgUniquenessPerField, + ObjectTypeDefinition: checkArgUniquenessPerField, + ObjectTypeExtension: checkArgUniquenessPerField + }; + function checkArgUniquenessPerField(typeNode) { + var _typeNode$fields; + const typeName = typeNode.name.value; + const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : []; + for (const fieldDef of fieldNodes) { + var _fieldDef$arguments; + const fieldName = fieldDef.name.value; + const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : []; + checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes); + } + return false; + } + function checkArgUniqueness(parentName, argumentNodes) { + const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError( + new GraphQLError( + `Argument "${parentName}(${argName}:)" can only be defined once.`, + { + nodes: argNodes.map((node) => node.name) + } + ) + ); + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs + function UniqueArgumentNamesRule(context) { + return { + Field: checkArgUniqueness, + Directive: checkArgUniqueness + }; + function checkArgUniqueness(parentNode) { + var _parentNode$arguments; + const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : []; + const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); + for (const [argName, argNodes] of seenArgs) { + if (argNodes.length > 1) { + context.reportError( + new GraphQLError( + `There can be only one argument named "${argName}".`, + { + nodes: argNodes.map((node) => node.name) + } + ) + ); + } + } + } + } + + // node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs + function UniqueDirectiveNamesRule(context) { + const knownDirectiveNames = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + return { + DirectiveDefinition(node) { + const directiveName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) { + context.reportError( + new GraphQLError( + `Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, + { + nodes: node.name + } + ) + ); + return; + } + if (knownDirectiveNames[directiveName]) { + context.reportError( + new GraphQLError( + `There can be only one directive named "@${directiveName}".`, + { + nodes: [knownDirectiveNames[directiveName], node.name] + } + ) + ); + } else { + knownDirectiveNames[directiveName] = node.name; + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs + function UniqueDirectivesPerLocationRule(context) { + const uniqueDirectiveMap = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; + for (const directive of definedDirectives) { + uniqueDirectiveMap[directive.name] = !directive.isRepeatable; + } + const astDefinitions = context.getDocument().definitions; + for (const def of astDefinitions) { + if (def.kind === Kind.DIRECTIVE_DEFINITION) { + uniqueDirectiveMap[def.name.value] = !def.repeatable; + } + } + const schemaDirectives = /* @__PURE__ */ Object.create(null); + const typeDirectivesMap = /* @__PURE__ */ Object.create(null); + return { + // Many different AST nodes may contain directives. Rather than listing + // them all, just listen for entering any node, and check to see if it + // defines any directives. + enter(node) { + if (!("directives" in node) || !node.directives) { + return; + } + let seenDirectives; + if (node.kind === Kind.SCHEMA_DEFINITION || node.kind === Kind.SCHEMA_EXTENSION) { + seenDirectives = schemaDirectives; + } else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) { + const typeName = node.name.value; + seenDirectives = typeDirectivesMap[typeName]; + if (seenDirectives === void 0) { + typeDirectivesMap[typeName] = seenDirectives = /* @__PURE__ */ Object.create(null); + } + } else { + seenDirectives = /* @__PURE__ */ Object.create(null); + } + for (const directive of node.directives) { + const directiveName = directive.name.value; + if (uniqueDirectiveMap[directiveName]) { + if (seenDirectives[directiveName]) { + context.reportError( + new GraphQLError( + `The directive "@${directiveName}" can only be used once at this location.`, + { + nodes: [seenDirectives[directiveName], directive] + } + ) + ); + } else { + seenDirectives[directiveName] = directive; + } + } + } + } + }; + } + + // node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs + function UniqueEnumValueNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const knownValueNames = /* @__PURE__ */ Object.create(null); + return { + EnumTypeDefinition: checkValueUniqueness, + EnumTypeExtension: checkValueUniqueness + }; + function checkValueUniqueness(node) { + var _node$values; + const typeName = node.name.value; + if (!knownValueNames[typeName]) { + knownValueNames[typeName] = /* @__PURE__ */ Object.create(null); + } + const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; + const valueNames = knownValueNames[typeName]; + for (const valueDef of valueNodes) { + const valueName = valueDef.name.value; + const existingType = existingTypeMap[typeName]; + if (isEnumType(existingType) && existingType.getValue(valueName)) { + context.reportError( + new GraphQLError( + `Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, + { + nodes: valueDef.name + } + ) + ); + } else if (valueNames[valueName]) { + context.reportError( + new GraphQLError( + `Enum value "${typeName}.${valueName}" can only be defined once.`, + { + nodes: [valueNames[valueName], valueDef.name] + } + ) + ); + } else { + valueNames[valueName] = valueDef.name; + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs + function UniqueFieldDefinitionNamesRule(context) { + const schema = context.getSchema(); + const existingTypeMap = schema ? schema.getTypeMap() : /* @__PURE__ */ Object.create(null); + const knownFieldNames = /* @__PURE__ */ Object.create(null); + return { + InputObjectTypeDefinition: checkFieldUniqueness, + InputObjectTypeExtension: checkFieldUniqueness, + InterfaceTypeDefinition: checkFieldUniqueness, + InterfaceTypeExtension: checkFieldUniqueness, + ObjectTypeDefinition: checkFieldUniqueness, + ObjectTypeExtension: checkFieldUniqueness + }; + function checkFieldUniqueness(node) { + var _node$fields; + const typeName = node.name.value; + if (!knownFieldNames[typeName]) { + knownFieldNames[typeName] = /* @__PURE__ */ Object.create(null); + } + const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; + const fieldNames = knownFieldNames[typeName]; + for (const fieldDef of fieldNodes) { + const fieldName = fieldDef.name.value; + if (hasField(existingTypeMap[typeName], fieldName)) { + context.reportError( + new GraphQLError( + `Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, + { + nodes: fieldDef.name + } + ) + ); + } else if (fieldNames[fieldName]) { + context.reportError( + new GraphQLError( + `Field "${typeName}.${fieldName}" can only be defined once.`, + { + nodes: [fieldNames[fieldName], fieldDef.name] + } + ) + ); + } else { + fieldNames[fieldName] = fieldDef.name; + } + } + return false; + } + } + function hasField(type2, fieldName) { + if (isObjectType(type2) || isInterfaceType(type2) || isInputObjectType(type2)) { + return type2.getFields()[fieldName] != null; + } + return false; + } + + // node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs + function UniqueFragmentNamesRule(context) { + const knownFragmentNames = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: () => false, + FragmentDefinition(node) { + const fragmentName = node.name.value; + if (knownFragmentNames[fragmentName]) { + context.reportError( + new GraphQLError( + `There can be only one fragment named "${fragmentName}".`, + { + nodes: [knownFragmentNames[fragmentName], node.name] + } + ) + ); + } else { + knownFragmentNames[fragmentName] = node.name; + } + return false; + } + }; + } + + // node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs + function UniqueInputFieldNamesRule(context) { + const knownNameStack = []; + let knownNames = /* @__PURE__ */ Object.create(null); + return { + ObjectValue: { + enter() { + knownNameStack.push(knownNames); + knownNames = /* @__PURE__ */ Object.create(null); + }, + leave() { + const prevKnownNames = knownNameStack.pop(); + prevKnownNames || invariant(false); + knownNames = prevKnownNames; + } + }, + ObjectField(node) { + const fieldName = node.name.value; + if (knownNames[fieldName]) { + context.reportError( + new GraphQLError( + `There can be only one input field named "${fieldName}".`, + { + nodes: [knownNames[fieldName], node.name] + } + ) + ); + } else { + knownNames[fieldName] = node.name; + } + } + }; + } + + // node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs + function UniqueOperationNamesRule(context) { + const knownOperationNames = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition(node) { + const operationName = node.name; + if (operationName) { + if (knownOperationNames[operationName.value]) { + context.reportError( + new GraphQLError( + `There can be only one operation named "${operationName.value}".`, + { + nodes: [ + knownOperationNames[operationName.value], + operationName + ] + } + ) + ); + } else { + knownOperationNames[operationName.value] = operationName; + } + } + return false; + }, + FragmentDefinition: () => false + }; + } + + // node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs + function UniqueOperationTypesRule(context) { + const schema = context.getSchema(); + const definedOperationTypes = /* @__PURE__ */ Object.create(null); + const existingOperationTypes = schema ? { + query: schema.getQueryType(), + mutation: schema.getMutationType(), + subscription: schema.getSubscriptionType() + } : {}; + return { + SchemaDefinition: checkOperationTypes, + SchemaExtension: checkOperationTypes + }; + function checkOperationTypes(node) { + var _node$operationTypes; + const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; + for (const operationType of operationTypesNodes) { + const operation = operationType.operation; + const alreadyDefinedOperationType = definedOperationTypes[operation]; + if (existingOperationTypes[operation]) { + context.reportError( + new GraphQLError( + `Type for ${operation} already defined in the schema. It cannot be redefined.`, + { + nodes: operationType + } + ) + ); + } else if (alreadyDefinedOperationType) { + context.reportError( + new GraphQLError( + `There can be only one ${operation} type in schema.`, + { + nodes: [alreadyDefinedOperationType, operationType] + } + ) + ); + } else { + definedOperationTypes[operation] = operationType; + } + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs + function UniqueTypeNamesRule(context) { + const knownTypeNames = /* @__PURE__ */ Object.create(null); + const schema = context.getSchema(); + return { + ScalarTypeDefinition: checkTypeName, + ObjectTypeDefinition: checkTypeName, + InterfaceTypeDefinition: checkTypeName, + UnionTypeDefinition: checkTypeName, + EnumTypeDefinition: checkTypeName, + InputObjectTypeDefinition: checkTypeName + }; + function checkTypeName(node) { + const typeName = node.name.value; + if (schema !== null && schema !== void 0 && schema.getType(typeName)) { + context.reportError( + new GraphQLError( + `Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, + { + nodes: node.name + } + ) + ); + return; + } + if (knownTypeNames[typeName]) { + context.reportError( + new GraphQLError(`There can be only one type named "${typeName}".`, { + nodes: [knownTypeNames[typeName], node.name] + }) + ); + } else { + knownTypeNames[typeName] = node.name; + } + return false; + } + } + + // node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs + function UniqueVariableNamesRule(context) { + return { + OperationDefinition(operationNode) { + var _operationNode$variab; + const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : []; + const seenVariableDefinitions = groupBy( + variableDefinitions, + (node) => node.variable.name.value + ); + for (const [variableName, variableNodes] of seenVariableDefinitions) { + if (variableNodes.length > 1) { + context.reportError( + new GraphQLError( + `There can be only one variable named "$${variableName}".`, + { + nodes: variableNodes.map((node) => node.variable.name) + } + ) + ); + } + } + } + }; + } + + // node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs + function ValuesOfCorrectTypeRule(context) { + return { + ListValue(node) { + const type2 = getNullableType(context.getParentInputType()); + if (!isListType(type2)) { + isValidValueNode(context, node); + return false; + } + }, + ObjectValue(node) { + const type2 = getNamedType(context.getInputType()); + if (!isInputObjectType(type2)) { + isValidValueNode(context, node); + return false; + } + const fieldNodeMap = keyMap(node.fields, (field) => field.name.value); + for (const fieldDef of Object.values(type2.getFields())) { + const fieldNode = fieldNodeMap[fieldDef.name]; + if (!fieldNode && isRequiredInputField(fieldDef)) { + const typeStr = inspect(fieldDef.type); + context.reportError( + new GraphQLError( + `Field "${type2.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, + { + nodes: node + } + ) + ); + } + } + }, + ObjectField(node) { + const parentType = getNamedType(context.getParentInputType()); + const fieldType = context.getInputType(); + if (!fieldType && isInputObjectType(parentType)) { + const suggestions = suggestionList( + node.name.value, + Object.keys(parentType.getFields()) + ); + context.reportError( + new GraphQLError( + `Field "${node.name.value}" is not defined by type "${parentType.name}".` + didYouMean(suggestions), + { + nodes: node + } + ) + ); + } + }, + NullValue(node) { + const type2 = context.getInputType(); + if (isNonNullType(type2)) { + context.reportError( + new GraphQLError( + `Expected value of type "${inspect(type2)}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + } + }, + EnumValue: (node) => isValidValueNode(context, node), + IntValue: (node) => isValidValueNode(context, node), + FloatValue: (node) => isValidValueNode(context, node), + StringValue: (node) => isValidValueNode(context, node), + BooleanValue: (node) => isValidValueNode(context, node) + }; + } + function isValidValueNode(context, node) { + const locationType = context.getInputType(); + if (!locationType) { + return; + } + const type2 = getNamedType(locationType); + if (!isLeafType(type2)) { + const typeStr = inspect(locationType); + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + return; + } + try { + const parseResult = type2.parseLiteral( + node, + void 0 + /* variables */ + ); + if (parseResult === void 0) { + const typeStr = inspect(locationType); + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}.`, + { + nodes: node + } + ) + ); + } + } catch (error) { + const typeStr = inspect(locationType); + if (error instanceof GraphQLError) { + context.reportError(error); + } else { + context.reportError( + new GraphQLError( + `Expected value of type "${typeStr}", found ${print(node)}; ` + error.message, + { + nodes: node, + originalError: error + } + ) + ); + } + } + } + + // node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs + function VariablesAreInputTypesRule(context) { + return { + VariableDefinition(node) { + const type2 = typeFromAST(context.getSchema(), node.type); + if (type2 !== void 0 && !isInputType(type2)) { + const variableName = node.variable.name.value; + const typeName = print(node.type); + context.reportError( + new GraphQLError( + `Variable "$${variableName}" cannot be non-input type "${typeName}".`, + { + nodes: node.type + } + ) + ); + } + } + }; + } + + // node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs + function VariablesInAllowedPositionRule(context) { + let varDefMap = /* @__PURE__ */ Object.create(null); + return { + OperationDefinition: { + enter() { + varDefMap = /* @__PURE__ */ Object.create(null); + }, + leave(operation) { + const usages = context.getRecursiveVariableUsages(operation); + for (const { node, type: type2, defaultValue } of usages) { + const varName = node.name.value; + const varDef = varDefMap[varName]; + if (varDef && type2) { + const schema = context.getSchema(); + const varType = typeFromAST(schema, varDef.type); + if (varType && !allowedVariableUsage( + schema, + varType, + varDef.defaultValue, + type2, + defaultValue + )) { + const varTypeStr = inspect(varType); + const typeStr = inspect(type2); + context.reportError( + new GraphQLError( + `Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, + { + nodes: [varDef, node] + } + ) + ); + } + } + } + } + }, + VariableDefinition(node) { + varDefMap[node.variable.name.value] = node; + } + }; + } + function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) { + if (isNonNullType(locationType) && !isNonNullType(varType)) { + const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL; + const hasLocationDefaultValue = locationDefaultValue !== void 0; + if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { + return false; + } + const nullableLocationType = locationType.ofType; + return isTypeSubTypeOf(schema, varType, nullableLocationType); + } + return isTypeSubTypeOf(schema, varType, locationType); + } + + // node_modules/graphql/validation/specifiedRules.mjs + var specifiedRules = Object.freeze([ + ExecutableDefinitionsRule, + UniqueOperationNamesRule, + LoneAnonymousOperationRule, + SingleFieldSubscriptionsRule, + KnownTypeNamesRule, + FragmentsOnCompositeTypesRule, + VariablesAreInputTypesRule, + ScalarLeafsRule, + FieldsOnCorrectTypeRule, + UniqueFragmentNamesRule, + KnownFragmentNamesRule, + NoUnusedFragmentsRule, + PossibleFragmentSpreadsRule, + NoFragmentCyclesRule, + UniqueVariableNamesRule, + NoUndefinedVariablesRule, + NoUnusedVariablesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + KnownArgumentNamesRule, + UniqueArgumentNamesRule, + ValuesOfCorrectTypeRule, + ProvidedRequiredArgumentsRule, + VariablesInAllowedPositionRule, + OverlappingFieldsCanBeMergedRule, + UniqueInputFieldNamesRule + ]); + var specifiedSDLRules = Object.freeze([ + LoneSchemaDefinitionRule, + UniqueOperationTypesRule, + UniqueTypeNamesRule, + UniqueEnumValueNamesRule, + UniqueFieldDefinitionNamesRule, + UniqueArgumentDefinitionNamesRule, + UniqueDirectiveNamesRule, + KnownTypeNamesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + PossibleTypeExtensionsRule, + KnownArgumentNamesOnDirectivesRule, + UniqueArgumentNamesRule, + UniqueInputFieldNamesRule, + ProvidedRequiredArgumentsOnDirectivesRule + ]); + + // node_modules/graphql/validation/ValidationContext.mjs + var ASTValidationContext = class { + constructor(ast, onError) { + this._ast = ast; + this._fragments = void 0; + this._fragmentSpreads = /* @__PURE__ */ new Map(); + this._recursivelyReferencedFragments = /* @__PURE__ */ new Map(); + this._onError = onError; + } + get [Symbol.toStringTag]() { + return "ASTValidationContext"; + } + reportError(error) { + this._onError(error); + } + getDocument() { + return this._ast; + } + getFragment(name2) { + let fragments; + if (this._fragments) { + fragments = this._fragments; + } else { + fragments = /* @__PURE__ */ Object.create(null); + for (const defNode of this.getDocument().definitions) { + if (defNode.kind === Kind.FRAGMENT_DEFINITION) { + fragments[defNode.name.value] = defNode; + } + } + this._fragments = fragments; + } + return fragments[name2]; + } + getFragmentSpreads(node) { + let spreads = this._fragmentSpreads.get(node); + if (!spreads) { + spreads = []; + const setsToVisit = [node]; + let set; + while (set = setsToVisit.pop()) { + for (const selection of set.selections) { + if (selection.kind === Kind.FRAGMENT_SPREAD) { + spreads.push(selection); + } else if (selection.selectionSet) { + setsToVisit.push(selection.selectionSet); + } + } + } + this._fragmentSpreads.set(node, spreads); + } + return spreads; + } + getRecursivelyReferencedFragments(operation) { + let fragments = this._recursivelyReferencedFragments.get(operation); + if (!fragments) { + fragments = []; + const collectedNames = /* @__PURE__ */ Object.create(null); + const nodesToVisit = [operation.selectionSet]; + let node; + while (node = nodesToVisit.pop()) { + for (const spread of this.getFragmentSpreads(node)) { + const fragName = spread.name.value; + if (collectedNames[fragName] !== true) { + collectedNames[fragName] = true; + const fragment = this.getFragment(fragName); + if (fragment) { + fragments.push(fragment); + nodesToVisit.push(fragment.selectionSet); + } + } + } + } + this._recursivelyReferencedFragments.set(operation, fragments); + } + return fragments; + } + }; + var SDLValidationContext = class extends ASTValidationContext { + constructor(ast, schema, onError) { + super(ast, onError); + this._schema = schema; + } + get [Symbol.toStringTag]() { + return "SDLValidationContext"; + } + getSchema() { + return this._schema; + } + }; + var ValidationContext = class extends ASTValidationContext { + constructor(schema, ast, typeInfo, onError) { + super(ast, onError); + this._schema = schema; + this._typeInfo = typeInfo; + this._variableUsages = /* @__PURE__ */ new Map(); + this._recursiveVariableUsages = /* @__PURE__ */ new Map(); + } + get [Symbol.toStringTag]() { + return "ValidationContext"; + } + getSchema() { + return this._schema; + } + getVariableUsages(node) { + let usages = this._variableUsages.get(node); + if (!usages) { + const newUsages = []; + const typeInfo = new TypeInfo(this._schema); + visit( + node, + visitWithTypeInfo(typeInfo, { + VariableDefinition: () => false, + Variable(variable) { + newUsages.push({ + node: variable, + type: typeInfo.getInputType(), + defaultValue: typeInfo.getDefaultValue() + }); + } + }) + ); + usages = newUsages; + this._variableUsages.set(node, usages); + } + return usages; + } + getRecursiveVariableUsages(operation) { + let usages = this._recursiveVariableUsages.get(operation); + if (!usages) { + usages = this.getVariableUsages(operation); + for (const frag of this.getRecursivelyReferencedFragments(operation)) { + usages = usages.concat(this.getVariableUsages(frag)); + } + this._recursiveVariableUsages.set(operation, usages); + } + return usages; + } + getType() { + return this._typeInfo.getType(); + } + getParentType() { + return this._typeInfo.getParentType(); + } + getInputType() { + return this._typeInfo.getInputType(); + } + getParentInputType() { + return this._typeInfo.getParentInputType(); + } + getFieldDef() { + return this._typeInfo.getFieldDef(); + } + getDirective() { + return this._typeInfo.getDirective(); + } + getArgument() { + return this._typeInfo.getArgument(); + } + getEnumValue() { + return this._typeInfo.getEnumValue(); + } + }; + + // node_modules/graphql/validation/validate.mjs + function validate(schema, documentAST, rules = specifiedRules, options, typeInfo = new TypeInfo(schema)) { + var _options$maxErrors; + const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100; + documentAST || devAssert(false, "Must provide document."); + assertValidSchema(schema); + const abortObj = Object.freeze({}); + const errors = []; + const context = new ValidationContext( + schema, + documentAST, + typeInfo, + (error) => { + if (errors.length >= maxErrors) { + errors.push( + new GraphQLError( + "Too many validation errors, error limit reached. Validation aborted." + ) + ); + throw abortObj; + } + errors.push(error); + } + ); + const visitor = visitInParallel(rules.map((rule) => rule(context))); + try { + visit(documentAST, visitWithTypeInfo(typeInfo, visitor)); + } catch (e) { + if (e !== abortObj) { + throw e; + } + } + return errors; + } + function validateSDL(documentAST, schemaToExtend, rules = specifiedSDLRules) { + const errors = []; + const context = new SDLValidationContext( + documentAST, + schemaToExtend, + (error) => { + errors.push(error); + } + ); + const visitors = rules.map((rule) => rule(context)); + visit(documentAST, visitInParallel(visitors)); + return errors; + } + function assertValidSDL(documentAST) { + const errors = validateSDL(documentAST); + if (errors.length !== 0) { + throw new Error(errors.map((error) => error.message).join("\n\n")); + } + } + + // node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs + function NoDeprecatedCustomRule(context) { + return { + Field(node) { + const fieldDef = context.getFieldDef(); + const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; + if (fieldDef && deprecationReason != null) { + const parentType = context.getParentType(); + parentType != null || invariant(false); + context.reportError( + new GraphQLError( + `The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + }, + Argument(node) { + const argDef = context.getArgument(); + const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; + if (argDef && deprecationReason != null) { + const directiveDef = context.getDirective(); + if (directiveDef != null) { + context.reportError( + new GraphQLError( + `Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } else { + const parentType = context.getParentType(); + const fieldDef = context.getFieldDef(); + parentType != null && fieldDef != null || invariant(false); + context.reportError( + new GraphQLError( + `Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }, + ObjectField(node) { + const inputObjectDef = getNamedType(context.getParentInputType()); + if (isInputObjectType(inputObjectDef)) { + const inputFieldDef = inputObjectDef.getFields()[node.name.value]; + const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; + if (deprecationReason != null) { + context.reportError( + new GraphQLError( + `The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }, + EnumValue(node) { + const enumValueDef = context.getEnumValue(); + const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; + if (enumValueDef && deprecationReason != null) { + const enumTypeDef = getNamedType(context.getInputType()); + enumTypeDef != null || invariant(false); + context.reportError( + new GraphQLError( + `The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, + { + nodes: node + } + ) + ); + } + } + }; + } + + // node_modules/graphql/utilities/buildClientSchema.mjs + function buildClientSchema(introspection, options) { + isObjectLike(introspection) && isObjectLike(introspection.__schema) || devAssert( + false, + `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${inspect( + introspection + )}.` + ); + const schemaIntrospection = introspection.__schema; + const typeMap = keyValMap( + schemaIntrospection.types, + (typeIntrospection) => typeIntrospection.name, + (typeIntrospection) => buildType(typeIntrospection) + ); + for (const stdType of [...specifiedScalarTypes, ...introspectionTypes]) { + if (typeMap[stdType.name]) { + typeMap[stdType.name] = stdType; + } + } + const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; + const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; + const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; + const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; + return new GraphQLSchema({ + description: schemaIntrospection.description, + query: queryType, + mutation: mutationType, + subscription: subscriptionType, + types: Object.values(typeMap), + directives, + assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid + }); + function getType(typeRef) { + if (typeRef.kind === TypeKind.LIST) { + const itemRef = typeRef.ofType; + if (!itemRef) { + throw new Error("Decorated type deeper than introspection query."); + } + return new GraphQLList(getType(itemRef)); + } + if (typeRef.kind === TypeKind.NON_NULL) { + const nullableRef = typeRef.ofType; + if (!nullableRef) { + throw new Error("Decorated type deeper than introspection query."); + } + const nullableType = getType(nullableRef); + return new GraphQLNonNull(assertNullableType(nullableType)); + } + return getNamedType2(typeRef); + } + function getNamedType2(typeRef) { + const typeName = typeRef.name; + if (!typeName) { + throw new Error(`Unknown type reference: ${inspect(typeRef)}.`); + } + const type2 = typeMap[typeName]; + if (!type2) { + throw new Error( + `Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.` + ); + } + return type2; + } + function getObjectType(typeRef) { + return assertObjectType(getNamedType2(typeRef)); + } + function getInterfaceType(typeRef) { + return assertInterfaceType(getNamedType2(typeRef)); + } + function buildType(type2) { + if (type2 != null && type2.name != null && type2.kind != null) { + switch (type2.kind) { + case TypeKind.SCALAR: + return buildScalarDef(type2); + case TypeKind.OBJECT: + return buildObjectDef(type2); + case TypeKind.INTERFACE: + return buildInterfaceDef(type2); + case TypeKind.UNION: + return buildUnionDef(type2); + case TypeKind.ENUM: + return buildEnumDef(type2); + case TypeKind.INPUT_OBJECT: + return buildInputObjectDef(type2); + } + } + const typeStr = inspect(type2); + throw new Error( + `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.` + ); + } + function buildScalarDef(scalarIntrospection) { + return new GraphQLScalarType({ + name: scalarIntrospection.name, + description: scalarIntrospection.description, + specifiedByURL: scalarIntrospection.specifiedByURL + }); + } + function buildImplementationsList(implementingIntrospection) { + if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === TypeKind.INTERFACE) { + return []; + } + if (!implementingIntrospection.interfaces) { + const implementingIntrospectionStr = inspect(implementingIntrospection); + throw new Error( + `Introspection result missing interfaces: ${implementingIntrospectionStr}.` + ); + } + return implementingIntrospection.interfaces.map(getInterfaceType); + } + function buildObjectDef(objectIntrospection) { + return new GraphQLObjectType({ + name: objectIntrospection.name, + description: objectIntrospection.description, + interfaces: () => buildImplementationsList(objectIntrospection), + fields: () => buildFieldDefMap(objectIntrospection) + }); + } + function buildInterfaceDef(interfaceIntrospection) { + return new GraphQLInterfaceType({ + name: interfaceIntrospection.name, + description: interfaceIntrospection.description, + interfaces: () => buildImplementationsList(interfaceIntrospection), + fields: () => buildFieldDefMap(interfaceIntrospection) + }); + } + function buildUnionDef(unionIntrospection) { + if (!unionIntrospection.possibleTypes) { + const unionIntrospectionStr = inspect(unionIntrospection); + throw new Error( + `Introspection result missing possibleTypes: ${unionIntrospectionStr}.` + ); + } + return new GraphQLUnionType({ + name: unionIntrospection.name, + description: unionIntrospection.description, + types: () => unionIntrospection.possibleTypes.map(getObjectType) + }); + } + function buildEnumDef(enumIntrospection) { + if (!enumIntrospection.enumValues) { + const enumIntrospectionStr = inspect(enumIntrospection); + throw new Error( + `Introspection result missing enumValues: ${enumIntrospectionStr}.` + ); + } + return new GraphQLEnumType({ + name: enumIntrospection.name, + description: enumIntrospection.description, + values: keyValMap( + enumIntrospection.enumValues, + (valueIntrospection) => valueIntrospection.name, + (valueIntrospection) => ({ + description: valueIntrospection.description, + deprecationReason: valueIntrospection.deprecationReason + }) + ) + }); + } + function buildInputObjectDef(inputObjectIntrospection) { + if (!inputObjectIntrospection.inputFields) { + const inputObjectIntrospectionStr = inspect(inputObjectIntrospection); + throw new Error( + `Introspection result missing inputFields: ${inputObjectIntrospectionStr}.` + ); + } + return new GraphQLInputObjectType({ + name: inputObjectIntrospection.name, + description: inputObjectIntrospection.description, + fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields) + }); + } + function buildFieldDefMap(typeIntrospection) { + if (!typeIntrospection.fields) { + throw new Error( + `Introspection result missing fields: ${inspect(typeIntrospection)}.` + ); + } + return keyValMap( + typeIntrospection.fields, + (fieldIntrospection) => fieldIntrospection.name, + buildField + ); + } + function buildField(fieldIntrospection) { + const type2 = getType(fieldIntrospection.type); + if (!isOutputType(type2)) { + const typeStr = inspect(type2); + throw new Error( + `Introspection must provide output type for fields, but received: ${typeStr}.` + ); + } + if (!fieldIntrospection.args) { + const fieldIntrospectionStr = inspect(fieldIntrospection); + throw new Error( + `Introspection result missing field args: ${fieldIntrospectionStr}.` + ); + } + return { + description: fieldIntrospection.description, + deprecationReason: fieldIntrospection.deprecationReason, + type: type2, + args: buildInputValueDefMap(fieldIntrospection.args) + }; + } + function buildInputValueDefMap(inputValueIntrospections) { + return keyValMap( + inputValueIntrospections, + (inputValue) => inputValue.name, + buildInputValue + ); + } + function buildInputValue(inputValueIntrospection) { + const type2 = getType(inputValueIntrospection.type); + if (!isInputType(type2)) { + const typeStr = inspect(type2); + throw new Error( + `Introspection must provide input type for arguments, but received: ${typeStr}.` + ); + } + const defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type2) : void 0; + return { + description: inputValueIntrospection.description, + type: type2, + defaultValue, + deprecationReason: inputValueIntrospection.deprecationReason + }; + } + function buildDirective(directiveIntrospection) { + if (!directiveIntrospection.args) { + const directiveIntrospectionStr = inspect(directiveIntrospection); + throw new Error( + `Introspection result missing directive args: ${directiveIntrospectionStr}.` + ); + } + if (!directiveIntrospection.locations) { + const directiveIntrospectionStr = inspect(directiveIntrospection); + throw new Error( + `Introspection result missing directive locations: ${directiveIntrospectionStr}.` + ); + } + return new GraphQLDirective({ + name: directiveIntrospection.name, + description: directiveIntrospection.description, + isRepeatable: directiveIntrospection.isRepeatable, + locations: directiveIntrospection.locations.slice(), + args: buildInputValueDefMap(directiveIntrospection.args) + }); + } + } + + // node_modules/graphql/utilities/extendSchema.mjs + function extendSchemaImpl(schemaConfig, documentAST, options) { + var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; + const typeDefs = []; + const typeExtensionsMap = /* @__PURE__ */ Object.create(null); + const directiveDefs = []; + let schemaDef; + const schemaExtensions = []; + for (const def of documentAST.definitions) { + if (def.kind === Kind.SCHEMA_DEFINITION) { + schemaDef = def; + } else if (def.kind === Kind.SCHEMA_EXTENSION) { + schemaExtensions.push(def); + } else if (isTypeDefinitionNode(def)) { + typeDefs.push(def); + } else if (isTypeExtensionNode(def)) { + const extendedTypeName = def.name.value; + const existingTypeExtensions = typeExtensionsMap[extendedTypeName]; + typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; + } else if (def.kind === Kind.DIRECTIVE_DEFINITION) { + directiveDefs.push(def); + } + } + if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) { + return schemaConfig; + } + const typeMap = /* @__PURE__ */ Object.create(null); + for (const existingType of schemaConfig.types) { + typeMap[existingType.name] = extendNamedType(existingType); + } + for (const typeNode of typeDefs) { + var _stdTypeMap$name; + const name2 = typeNode.name.value; + typeMap[name2] = (_stdTypeMap$name = stdTypeMap[name2]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); + } + const operationTypes = { + // Get the extended root operation types. + query: schemaConfig.query && replaceNamedType(schemaConfig.query), + mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), + subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription), + // Then, incorporate schema definition and all schema extensions. + ...schemaDef && getOperationTypes([schemaDef]), + ...getOperationTypes(schemaExtensions) + }; + return { + description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value, + ...operationTypes, + types: Object.values(typeMap), + directives: [ + ...schemaConfig.directives.map(replaceDirective), + ...directiveDefs.map(buildDirective) + ], + extensions: /* @__PURE__ */ Object.create(null), + astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, + extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), + assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false + }; + function replaceType(type2) { + if (isListType(type2)) { + return new GraphQLList(replaceType(type2.ofType)); + } + if (isNonNullType(type2)) { + return new GraphQLNonNull(replaceType(type2.ofType)); + } + return replaceNamedType(type2); + } + function replaceNamedType(type2) { + return typeMap[type2.name]; + } + function replaceDirective(directive) { + const config = directive.toConfig(); + return new GraphQLDirective({ + ...config, + args: mapValue(config.args, extendArg) + }); + } + function extendNamedType(type2) { + if (isIntrospectionType(type2) || isSpecifiedScalarType(type2)) { + return type2; + } + if (isScalarType(type2)) { + return extendScalarType(type2); + } + if (isObjectType(type2)) { + return extendObjectType(type2); + } + if (isInterfaceType(type2)) { + return extendInterfaceType(type2); + } + if (isUnionType(type2)) { + return extendUnionType(type2); + } + if (isEnumType(type2)) { + return extendEnumType(type2); + } + if (isInputObjectType(type2)) { + return extendInputObjectType(type2); + } + invariant(false, "Unexpected type: " + inspect(type2)); + } + function extendInputObjectType(type2) { + var _typeExtensionsMap$co; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; + return new GraphQLInputObjectType({ + ...config, + fields: () => ({ + ...mapValue(config.fields, (field) => ({ + ...field, + type: replaceType(field.type) + })), + ...buildInputFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendEnumType(type2) { + var _typeExtensionsMap$ty; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type2.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; + return new GraphQLEnumType({ + ...config, + values: { ...config.values, ...buildEnumValueMap(extensions) }, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendScalarType(type2) { + var _typeExtensionsMap$co2; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; + let specifiedByURL = config.specifiedByURL; + for (const extensionNode of extensions) { + var _getSpecifiedByURL; + specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL; + } + return new GraphQLScalarType({ + ...config, + specifiedByURL, + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendObjectType(type2) { + var _typeExtensionsMap$co3; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; + return new GraphQLObjectType({ + ...config, + interfaces: () => [ + ...type2.getInterfaces().map(replaceNamedType), + ...buildInterfaces(extensions) + ], + fields: () => ({ + ...mapValue(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendInterfaceType(type2) { + var _typeExtensionsMap$co4; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; + return new GraphQLInterfaceType({ + ...config, + interfaces: () => [ + ...type2.getInterfaces().map(replaceNamedType), + ...buildInterfaces(extensions) + ], + fields: () => ({ + ...mapValue(config.fields, extendField), + ...buildFieldMap(extensions) + }), + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendUnionType(type2) { + var _typeExtensionsMap$co5; + const config = type2.toConfig(); + const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; + return new GraphQLUnionType({ + ...config, + types: () => [ + ...type2.getTypes().map(replaceNamedType), + ...buildUnionTypes(extensions) + ], + extensionASTNodes: config.extensionASTNodes.concat(extensions) + }); + } + function extendField(field) { + return { + ...field, + type: replaceType(field.type), + args: field.args && mapValue(field.args, extendArg) + }; + } + function extendArg(arg) { + return { ...arg, type: replaceType(arg.type) }; + } + function getOperationTypes(nodes) { + const opTypes = {}; + for (const node of nodes) { + var _node$operationTypes; + const operationTypesNodes = ( + /* c8 ignore next */ + (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [] + ); + for (const operationType of operationTypesNodes) { + opTypes[operationType.operation] = getNamedType2(operationType.type); + } + } + return opTypes; + } + function getNamedType2(node) { + var _stdTypeMap$name2; + const name2 = node.name.value; + const type2 = (_stdTypeMap$name2 = stdTypeMap[name2]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name2]; + if (type2 === void 0) { + throw new Error(`Unknown type: "${name2}".`); + } + return type2; + } + function getWrappedType(node) { + if (node.kind === Kind.LIST_TYPE) { + return new GraphQLList(getWrappedType(node.type)); + } + if (node.kind === Kind.NON_NULL_TYPE) { + return new GraphQLNonNull(getWrappedType(node.type)); + } + return getNamedType2(node); + } + function buildDirective(node) { + var _node$description; + return new GraphQLDirective({ + name: node.name.value, + description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value, + // @ts-expect-error + locations: node.locations.map(({ value }) => value), + isRepeatable: node.repeatable, + args: buildArgumentMap(node.arguments), + astNode: node + }); + } + function buildFieldMap(nodes) { + const fieldConfigMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$fields; + const nodeFields = ( + /* c8 ignore next */ + (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [] + ); + for (const field of nodeFields) { + var _field$description; + fieldConfigMap[field.name.value] = { + // Note: While this could make assertions to get the correctly typed + // value, that would throw immediately while type system validation + // with validateSchema() will produce more actionable results. + type: getWrappedType(field.type), + description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value, + args: buildArgumentMap(field.arguments), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return fieldConfigMap; + } + function buildArgumentMap(args) { + const argsNodes = ( + /* c8 ignore next */ + args !== null && args !== void 0 ? args : [] + ); + const argConfigMap = /* @__PURE__ */ Object.create(null); + for (const arg of argsNodes) { + var _arg$description; + const type2 = getWrappedType(arg.type); + argConfigMap[arg.name.value] = { + type: type2, + description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value, + defaultValue: valueFromAST(arg.defaultValue, type2), + deprecationReason: getDeprecationReason(arg), + astNode: arg + }; + } + return argConfigMap; + } + function buildInputFieldMap(nodes) { + const inputFieldMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$fields2; + const fieldsNodes = ( + /* c8 ignore next */ + (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [] + ); + for (const field of fieldsNodes) { + var _field$description2; + const type2 = getWrappedType(field.type); + inputFieldMap[field.name.value] = { + type: type2, + description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value, + defaultValue: valueFromAST(field.defaultValue, type2), + deprecationReason: getDeprecationReason(field), + astNode: field + }; + } + } + return inputFieldMap; + } + function buildEnumValueMap(nodes) { + const enumValueMap = /* @__PURE__ */ Object.create(null); + for (const node of nodes) { + var _node$values; + const valuesNodes = ( + /* c8 ignore next */ + (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [] + ); + for (const value of valuesNodes) { + var _value$description; + enumValueMap[value.name.value] = { + description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value, + deprecationReason: getDeprecationReason(value), + astNode: value + }; + } + } + return enumValueMap; + } + function buildInterfaces(nodes) { + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (node) => { + var _node$interfaces$map, _node$interfaces; + return ( + /* c8 ignore next */ + (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType2)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : [] + ); + } + ); + } + function buildUnionTypes(nodes) { + return nodes.flatMap( + // FIXME: https://github.com/graphql/graphql-js/issues/2203 + (node) => { + var _node$types$map, _node$types; + return ( + /* c8 ignore next */ + (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType2)) !== null && _node$types$map !== void 0 ? _node$types$map : [] + ); + } + ); + } + function buildType(astNode) { + var _typeExtensionsMap$na; + const name2 = astNode.name.value; + const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name2]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; + switch (astNode.kind) { + case Kind.OBJECT_TYPE_DEFINITION: { + var _astNode$description; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLObjectType({ + name: name2, + description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.INTERFACE_TYPE_DEFINITION: { + var _astNode$description2; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLInterfaceType({ + name: name2, + description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value, + interfaces: () => buildInterfaces(allNodes), + fields: () => buildFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.ENUM_TYPE_DEFINITION: { + var _astNode$description3; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLEnumType({ + name: name2, + description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value, + values: buildEnumValueMap(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.UNION_TYPE_DEFINITION: { + var _astNode$description4; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLUnionType({ + name: name2, + description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value, + types: () => buildUnionTypes(allNodes), + astNode, + extensionASTNodes + }); + } + case Kind.SCALAR_TYPE_DEFINITION: { + var _astNode$description5; + return new GraphQLScalarType({ + name: name2, + description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value, + specifiedByURL: getSpecifiedByURL(astNode), + astNode, + extensionASTNodes + }); + } + case Kind.INPUT_OBJECT_TYPE_DEFINITION: { + var _astNode$description6; + const allNodes = [astNode, ...extensionASTNodes]; + return new GraphQLInputObjectType({ + name: name2, + description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value, + fields: () => buildInputFieldMap(allNodes), + astNode, + extensionASTNodes + }); + } + } + } + } + var stdTypeMap = keyMap( + [...specifiedScalarTypes, ...introspectionTypes], + (type2) => type2.name + ); + function getDeprecationReason(node) { + const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); + return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; + } + function getSpecifiedByURL(node) { + const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); + return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; + } + + // node_modules/graphql/utilities/buildASTSchema.mjs + function buildASTSchema(documentAST, options) { + documentAST != null && documentAST.kind === Kind.DOCUMENT || devAssert(false, "Must provide valid Document AST."); + if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) { + assertValidSDL(documentAST); + } + const emptySchemaConfig = { + description: void 0, + types: [], + directives: [], + extensions: /* @__PURE__ */ Object.create(null), + extensionASTNodes: [], + assumeValid: false + }; + const config = extendSchemaImpl(emptySchemaConfig, documentAST, options); + if (config.astNode == null) { + for (const type2 of config.types) { + switch (type2.name) { + case "Query": + config.query = type2; + break; + case "Mutation": + config.mutation = type2; + break; + case "Subscription": + config.subscription = type2; + break; + } + } + } + const directives = [ + ...config.directives, + // If specified directives were not explicitly declared, add them. + ...specifiedDirectives.filter( + (stdDirective) => config.directives.every( + (directive) => directive.name !== stdDirective.name + ) + ) + ]; + return new GraphQLSchema({ ...config, directives }); + } + + // node_modules/graphql-language-service/esm/interface/autocompleteUtils.js + var import_introspection8 = __toESM(require_introspection()); + function getDefinitionState(tokenState) { + let definitionState; + forEachState(tokenState, (state) => { + switch (state.kind) { + case "Query": + case "ShortQuery": + case "Mutation": + case "Subscription": + case "FragmentDefinition": + definitionState = state; + break; + } + }); + return definitionState; + } + function getFieldDef2(schema, type2, fieldName) { + if (fieldName === import_introspection8.SchemaMetaFieldDef.name && schema.getQueryType() === type2) { + return import_introspection8.SchemaMetaFieldDef; + } + if (fieldName === import_introspection8.TypeMetaFieldDef.name && schema.getQueryType() === type2) { + return import_introspection8.TypeMetaFieldDef; + } + if (fieldName === import_introspection8.TypeNameMetaFieldDef.name && isCompositeType(type2)) { + return import_introspection8.TypeNameMetaFieldDef; + } + if ("getFields" in type2) { + return type2.getFields()[fieldName]; + } + return null; + } + function forEachState(stack, fn) { + const reverseStateStack = []; + let state = stack; + while (state === null || state === void 0 ? void 0 : state.kind) { + reverseStateStack.push(state); + state = state.prevState; + } + for (let i = reverseStateStack.length - 1; i >= 0; i--) { + fn(reverseStateStack[i]); + } + } + function objectValues(object) { + const keys = Object.keys(object); + const len = keys.length; + const values = new Array(len); + for (let i = 0; i < len; ++i) { + values[i] = object[keys[i]]; + } + return values; + } + function hintList(token, list2) { + return filterAndSortList(list2, normalizeText(token.string)); + } + function filterAndSortList(list2, text3) { + if (!text3) { + return filterNonEmpty(list2, (entry) => !entry.isDeprecated); + } + const byProximity = list2.map((entry) => ({ + proximity: getProximity(normalizeText(entry.label), text3), + entry + })); + return filterNonEmpty(filterNonEmpty(byProximity, (pair) => pair.proximity <= 2), (pair) => !pair.entry.isDeprecated).sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.label.length - b.entry.label.length).map((pair) => pair.entry); + } + function filterNonEmpty(array, predicate) { + const filtered = array.filter(predicate); + return filtered.length === 0 ? array : filtered; + } + function normalizeText(text3) { + return text3.toLowerCase().replaceAll(/\W/g, ""); + } + function getProximity(suggestion, text3) { + let proximity = lexicalDistance(text3, suggestion); + if (suggestion.length > text3.length) { + proximity -= suggestion.length - text3.length - 1; + proximity += suggestion.indexOf(text3) === 0 ? 0 : 0.5; + } + return proximity; + } + function lexicalDistance(a, b) { + let i; + let j; + const d = []; + const aLength = a.length; + const bLength = b.length; + for (i = 0; i <= aLength; i++) { + d[i] = [i]; + } + for (j = 1; j <= bLength; j++) { + d[0][j] = j; + } + for (i = 1; i <= aLength; i++) { + for (j = 1; j <= bLength; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1; + d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost); + } + } + } + return d[aLength][bLength]; + } + + // node_modules/vscode-languageserver-types/lib/esm/main.js + var DocumentUri; + (function(DocumentUri2) { + function is(value) { + return typeof value === "string"; + } + DocumentUri2.is = is; + })(DocumentUri || (DocumentUri = {})); + var URI2; + (function(URI3) { + function is(value) { + return typeof value === "string"; + } + URI3.is = is; + })(URI2 || (URI2 = {})); + var integer; + (function(integer2) { + integer2.MIN_VALUE = -2147483648; + integer2.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === "number" && integer2.MIN_VALUE <= value && value <= integer2.MAX_VALUE; + } + integer2.is = is; + })(integer || (integer = {})); + var uinteger; + (function(uinteger2) { + uinteger2.MIN_VALUE = 0; + uinteger2.MAX_VALUE = 2147483647; + function is(value) { + return typeof value === "number" && uinteger2.MIN_VALUE <= value && value <= uinteger2.MAX_VALUE; + } + uinteger2.is = is; + })(uinteger || (uinteger = {})); + var Position2; + (function(Position4) { + function create(line, character) { + if (line === Number.MAX_VALUE) { + line = uinteger.MAX_VALUE; + } + if (character === Number.MAX_VALUE) { + character = uinteger.MAX_VALUE; + } + return { line, character }; + } + Position4.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character); + } + Position4.is = is; + })(Position2 || (Position2 = {})); + var Range2; + (function(Range4) { + function create(one, two, three, four) { + if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) { + return { start: Position2.create(one, two), end: Position2.create(three, four) }; + } else if (Position2.is(one) && Position2.is(two)) { + return { start: one, end: two }; + } else { + throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]")); + } + } + Range4.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position2.is(candidate.start) && Position2.is(candidate.end); + } + Range4.is = is; + })(Range2 || (Range2 = {})); + var Location2; + (function(Location3) { + function create(uri, range) { + return { uri, range }; + } + Location3.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location3.is = is; + })(Location2 || (Location2 = {})); + var LocationLink; + (function(LocationLink2) { + function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) { + return { targetUri, targetRange, targetSelectionRange, originSelectionRange }; + } + LocationLink2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range2.is(candidate.targetSelectionRange) && (Range2.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange)); + } + LocationLink2.is = is; + })(LocationLink || (LocationLink = {})); + var Color2; + (function(Color3) { + function create(red, green, blue, alpha) { + return { + red, + green, + blue, + alpha + }; + } + Color3.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1); + } + Color3.is = is; + })(Color2 || (Color2 = {})); + var ColorInformation; + (function(ColorInformation2) { + function create(range, color) { + return { + range, + color + }; + } + ColorInformation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && Color2.is(candidate.color); + } + ColorInformation2.is = is; + })(ColorInformation || (ColorInformation = {})); + var ColorPresentation; + (function(ColorPresentation2) { + function create(label, textEdit, additionalTextEdits) { + return { + label, + textEdit, + additionalTextEdits + }; + } + ColorPresentation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is)); + } + ColorPresentation2.is = is; + })(ColorPresentation || (ColorPresentation = {})); + var FoldingRangeKind2; + (function(FoldingRangeKind3) { + FoldingRangeKind3.Comment = "comment"; + FoldingRangeKind3.Imports = "imports"; + FoldingRangeKind3.Region = "region"; + })(FoldingRangeKind2 || (FoldingRangeKind2 = {})); + var FoldingRange; + (function(FoldingRange2) { + function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) { + var result = { + startLine, + endLine + }; + if (Is.defined(startCharacter)) { + result.startCharacter = startCharacter; + } + if (Is.defined(endCharacter)) { + result.endCharacter = endCharacter; + } + if (Is.defined(kind)) { + result.kind = kind; + } + if (Is.defined(collapsedText)) { + result.collapsedText = collapsedText; + } + return result; + } + FoldingRange2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind)); + } + FoldingRange2.is = is; + })(FoldingRange || (FoldingRange = {})); + var DiagnosticRelatedInformation; + (function(DiagnosticRelatedInformation2) { + function create(location, message) { + return { + location, + message + }; + } + DiagnosticRelatedInformation2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Location2.is(candidate.location) && Is.string(candidate.message); + } + DiagnosticRelatedInformation2.is = is; + })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {})); + var DiagnosticSeverity; + (function(DiagnosticSeverity2) { + DiagnosticSeverity2.Error = 1; + DiagnosticSeverity2.Warning = 2; + DiagnosticSeverity2.Information = 3; + DiagnosticSeverity2.Hint = 4; + })(DiagnosticSeverity || (DiagnosticSeverity = {})); + var DiagnosticTag; + (function(DiagnosticTag2) { + DiagnosticTag2.Unnecessary = 1; + DiagnosticTag2.Deprecated = 2; + })(DiagnosticTag || (DiagnosticTag = {})); + var CodeDescription; + (function(CodeDescription2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.href); + } + CodeDescription2.is = is; + })(CodeDescription || (CodeDescription = {})); + var Diagnostic; + (function(Diagnostic2) { + function create(range, message, severity, code, source, relatedInformation) { + var result = { range, message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + if (Is.defined(relatedInformation)) { + result.relatedInformation = relatedInformation; + } + return result; + } + Diagnostic2.create = create; + function is(value) { + var _a3; + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a3 = candidate.codeDescription) === null || _a3 === void 0 ? void 0 : _a3.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is)); + } + Diagnostic2.is = is; + })(Diagnostic || (Diagnostic = {})); + var Command2; + (function(Command3) { + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title, command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command3.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command); + } + Command3.is = is; + })(Command2 || (Command2 = {})); + var TextEdit; + (function(TextEdit2) { + function replace(range, newText) { + return { range, newText }; + } + TextEdit2.replace = replace; + function insert(position, newText) { + return { range: { start: position, end: position }, newText }; + } + TextEdit2.insert = insert; + function del(range) { + return { range, newText: "" }; + } + TextEdit2.del = del; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range2.is(candidate.range); + } + TextEdit2.is = is; + })(TextEdit || (TextEdit = {})); + var ChangeAnnotation; + (function(ChangeAnnotation2) { + function create(label, needsConfirmation, description) { + var result = { label }; + if (needsConfirmation !== void 0) { + result.needsConfirmation = needsConfirmation; + } + if (description !== void 0) { + result.description = description; + } + return result; + } + ChangeAnnotation2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === void 0) && (Is.string(candidate.description) || candidate.description === void 0); + } + ChangeAnnotation2.is = is; + })(ChangeAnnotation || (ChangeAnnotation = {})); + var ChangeAnnotationIdentifier; + (function(ChangeAnnotationIdentifier2) { + function is(value) { + var candidate = value; + return Is.string(candidate); + } + ChangeAnnotationIdentifier2.is = is; + })(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {})); + var AnnotatedTextEdit; + (function(AnnotatedTextEdit2) { + function replace(range, newText, annotation) { + return { range, newText, annotationId: annotation }; + } + AnnotatedTextEdit2.replace = replace; + function insert(position, newText, annotation) { + return { range: { start: position, end: position }, newText, annotationId: annotation }; + } + AnnotatedTextEdit2.insert = insert; + function del(range, annotation) { + return { range, newText: "", annotationId: annotation }; + } + AnnotatedTextEdit2.del = del; + function is(value) { + var candidate = value; + return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + AnnotatedTextEdit2.is = is; + })(AnnotatedTextEdit || (AnnotatedTextEdit = {})); + var TextDocumentEdit; + (function(TextDocumentEdit2) { + function create(textDocument, edits) { + return { textDocument, edits }; + } + TextDocumentEdit2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits); + } + TextDocumentEdit2.is = is; + })(TextDocumentEdit || (TextDocumentEdit = {})); + var CreateFile; + (function(CreateFile2) { + function create(uri, options, annotation) { + var result = { + kind: "create", + uri + }; + if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + CreateFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "create" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + CreateFile2.is = is; + })(CreateFile || (CreateFile = {})); + var RenameFile; + (function(RenameFile2) { + function create(oldUri, newUri, options, annotation) { + var result = { + kind: "rename", + oldUri, + newUri + }; + if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + RenameFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "rename" && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === void 0 || (candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + RenameFile2.is = is; + })(RenameFile || (RenameFile = {})); + var DeleteFile; + (function(DeleteFile2) { + function create(uri, options, annotation) { + var result = { + kind: "delete", + uri + }; + if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) { + result.options = options; + } + if (annotation !== void 0) { + result.annotationId = annotation; + } + return result; + } + DeleteFile2.create = create; + function is(value) { + var candidate = value; + return candidate && candidate.kind === "delete" && Is.string(candidate.uri) && (candidate.options === void 0 || (candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === void 0 || ChangeAnnotationIdentifier.is(candidate.annotationId)); + } + DeleteFile2.is = is; + })(DeleteFile || (DeleteFile = {})); + var WorkspaceEdit; + (function(WorkspaceEdit2) { + function is(value) { + var candidate = value; + return candidate && (candidate.changes !== void 0 || candidate.documentChanges !== void 0) && (candidate.documentChanges === void 0 || candidate.documentChanges.every(function(change) { + if (Is.string(change.kind)) { + return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change); + } else { + return TextDocumentEdit.is(change); + } + })); + } + WorkspaceEdit2.is = is; + })(WorkspaceEdit || (WorkspaceEdit = {})); + var TextEditChangeImpl = ( + /** @class */ + function() { + function TextEditChangeImpl2(edits, changeAnnotations) { + this.edits = edits; + this.changeAnnotations = changeAnnotations; + } + TextEditChangeImpl2.prototype.insert = function(position, newText, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.insert(position, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.insert(position, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.insert(position, newText, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.replace = function(range, newText, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.replace(range, newText); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.replace(range, newText, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.replace(range, newText, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.delete = function(range, annotation) { + var edit; + var id2; + if (annotation === void 0) { + edit = TextEdit.del(range); + } else if (ChangeAnnotationIdentifier.is(annotation)) { + id2 = annotation; + edit = AnnotatedTextEdit.del(range, annotation); + } else { + this.assertChangeAnnotations(this.changeAnnotations); + id2 = this.changeAnnotations.manage(annotation); + edit = AnnotatedTextEdit.del(range, id2); + } + this.edits.push(edit); + if (id2 !== void 0) { + return id2; + } + }; + TextEditChangeImpl2.prototype.add = function(edit) { + this.edits.push(edit); + }; + TextEditChangeImpl2.prototype.all = function() { + return this.edits; + }; + TextEditChangeImpl2.prototype.clear = function() { + this.edits.splice(0, this.edits.length); + }; + TextEditChangeImpl2.prototype.assertChangeAnnotations = function(value) { + if (value === void 0) { + throw new Error("Text edit change is not configured to manage change annotations."); + } + }; + return TextEditChangeImpl2; + }() + ); + var ChangeAnnotations = ( + /** @class */ + function() { + function ChangeAnnotations2(annotations2) { + this._annotations = annotations2 === void 0 ? /* @__PURE__ */ Object.create(null) : annotations2; + this._counter = 0; + this._size = 0; + } + ChangeAnnotations2.prototype.all = function() { + return this._annotations; + }; + Object.defineProperty(ChangeAnnotations2.prototype, "size", { + get: function() { + return this._size; + }, + enumerable: false, + configurable: true + }); + ChangeAnnotations2.prototype.manage = function(idOrAnnotation, annotation) { + var id2; + if (ChangeAnnotationIdentifier.is(idOrAnnotation)) { + id2 = idOrAnnotation; + } else { + id2 = this.nextId(); + annotation = idOrAnnotation; + } + if (this._annotations[id2] !== void 0) { + throw new Error("Id ".concat(id2, " is already in use.")); + } + if (annotation === void 0) { + throw new Error("No annotation provided for id ".concat(id2)); + } + this._annotations[id2] = annotation; + this._size++; + return id2; + }; + ChangeAnnotations2.prototype.nextId = function() { + this._counter++; + return this._counter.toString(); + }; + return ChangeAnnotations2; + }() + ); + var WorkspaceChange = ( + /** @class */ + function() { + function WorkspaceChange2(workspaceEdit) { + var _this = this; + this._textEditChanges = /* @__PURE__ */ Object.create(null); + if (workspaceEdit !== void 0) { + this._workspaceEdit = workspaceEdit; + if (workspaceEdit.documentChanges) { + this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations); + workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + workspaceEdit.documentChanges.forEach(function(change) { + if (TextDocumentEdit.is(change)) { + var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations); + _this._textEditChanges[change.textDocument.uri] = textEditChange; + } + }); + } else if (workspaceEdit.changes) { + Object.keys(workspaceEdit.changes).forEach(function(key) { + var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]); + _this._textEditChanges[key] = textEditChange; + }); + } + } else { + this._workspaceEdit = {}; + } + } + Object.defineProperty(WorkspaceChange2.prototype, "edit", { + /** + * Returns the underlying {@link WorkspaceEdit} literal + * use to be returned from a workspace edit operation like rename. + */ + get: function() { + this.initDocumentChanges(); + if (this._changeAnnotations !== void 0) { + if (this._changeAnnotations.size === 0) { + this._workspaceEdit.changeAnnotations = void 0; + } else { + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + } + return this._workspaceEdit; + }, + enumerable: false, + configurable: true + }); + WorkspaceChange2.prototype.getTextEditChange = function(key) { + if (OptionalVersionedTextDocumentIdentifier.is(key)) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var textDocument = { uri: key.uri, version: key.version }; + var result = this._textEditChanges[textDocument.uri]; + if (!result) { + var edits = []; + var textDocumentEdit = { + textDocument, + edits + }; + this._workspaceEdit.documentChanges.push(textDocumentEdit); + result = new TextEditChangeImpl(edits, this._changeAnnotations); + this._textEditChanges[textDocument.uri] = result; + } + return result; + } else { + this.initChanges(); + if (this._workspaceEdit.changes === void 0) { + throw new Error("Workspace edit is not configured for normal text edit changes."); + } + var result = this._textEditChanges[key]; + if (!result) { + var edits = []; + this._workspaceEdit.changes[key] = edits; + result = new TextEditChangeImpl(edits); + this._textEditChanges[key] = result; + } + return result; + } + }; + WorkspaceChange2.prototype.initDocumentChanges = function() { + if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { + this._changeAnnotations = new ChangeAnnotations(); + this._workspaceEdit.documentChanges = []; + this._workspaceEdit.changeAnnotations = this._changeAnnotations.all(); + } + }; + WorkspaceChange2.prototype.initChanges = function() { + if (this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0) { + this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null); + } + }; + WorkspaceChange2.prototype.createFile = function(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = CreateFile.create(uri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = CreateFile.create(uri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + WorkspaceChange2.prototype.renameFile = function(oldUri, newUri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = RenameFile.create(oldUri, newUri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = RenameFile.create(oldUri, newUri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + WorkspaceChange2.prototype.deleteFile = function(uri, optionsOrAnnotation, options) { + this.initDocumentChanges(); + if (this._workspaceEdit.documentChanges === void 0) { + throw new Error("Workspace edit is not configured for document changes."); + } + var annotation; + if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) { + annotation = optionsOrAnnotation; + } else { + options = optionsOrAnnotation; + } + var operation; + var id2; + if (annotation === void 0) { + operation = DeleteFile.create(uri, options); + } else { + id2 = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation); + operation = DeleteFile.create(uri, options, id2); + } + this._workspaceEdit.documentChanges.push(operation); + if (id2 !== void 0) { + return id2; + } + }; + return WorkspaceChange2; + }() + ); + var TextDocumentIdentifier; + (function(TextDocumentIdentifier2) { + function create(uri) { + return { uri }; + } + TextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier2.is = is; + })(TextDocumentIdentifier || (TextDocumentIdentifier = {})); + var VersionedTextDocumentIdentifier; + (function(VersionedTextDocumentIdentifier2) { + function create(uri, version) { + return { uri, version }; + } + VersionedTextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version); + } + VersionedTextDocumentIdentifier2.is = is; + })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {})); + var OptionalVersionedTextDocumentIdentifier; + (function(OptionalVersionedTextDocumentIdentifier2) { + function create(uri, version) { + return { uri, version }; + } + OptionalVersionedTextDocumentIdentifier2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version)); + } + OptionalVersionedTextDocumentIdentifier2.is = is; + })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {})); + var TextDocumentItem; + (function(TextDocumentItem2) { + function create(uri, languageId, version, text3) { + return { uri, languageId, version, text: text3 }; + } + TextDocumentItem2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem2.is = is; + })(TextDocumentItem || (TextDocumentItem = {})); + var MarkupKind; + (function(MarkupKind2) { + MarkupKind2.PlainText = "plaintext"; + MarkupKind2.Markdown = "markdown"; + function is(value) { + var candidate = value; + return candidate === MarkupKind2.PlainText || candidate === MarkupKind2.Markdown; + } + MarkupKind2.is = is; + })(MarkupKind || (MarkupKind = {})); + var MarkupContent; + (function(MarkupContent2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value); + } + MarkupContent2.is = is; + })(MarkupContent || (MarkupContent = {})); + var CompletionItemKind2; + (function(CompletionItemKind4) { + CompletionItemKind4.Text = 1; + CompletionItemKind4.Method = 2; + CompletionItemKind4.Function = 3; + CompletionItemKind4.Constructor = 4; + CompletionItemKind4.Field = 5; + CompletionItemKind4.Variable = 6; + CompletionItemKind4.Class = 7; + CompletionItemKind4.Interface = 8; + CompletionItemKind4.Module = 9; + CompletionItemKind4.Property = 10; + CompletionItemKind4.Unit = 11; + CompletionItemKind4.Value = 12; + CompletionItemKind4.Enum = 13; + CompletionItemKind4.Keyword = 14; + CompletionItemKind4.Snippet = 15; + CompletionItemKind4.Color = 16; + CompletionItemKind4.File = 17; + CompletionItemKind4.Reference = 18; + CompletionItemKind4.Folder = 19; + CompletionItemKind4.EnumMember = 20; + CompletionItemKind4.Constant = 21; + CompletionItemKind4.Struct = 22; + CompletionItemKind4.Event = 23; + CompletionItemKind4.Operator = 24; + CompletionItemKind4.TypeParameter = 25; + })(CompletionItemKind2 || (CompletionItemKind2 = {})); + var InsertTextFormat; + (function(InsertTextFormat2) { + InsertTextFormat2.PlainText = 1; + InsertTextFormat2.Snippet = 2; + })(InsertTextFormat || (InsertTextFormat = {})); + var CompletionItemTag2; + (function(CompletionItemTag3) { + CompletionItemTag3.Deprecated = 1; + })(CompletionItemTag2 || (CompletionItemTag2 = {})); + var InsertReplaceEdit; + (function(InsertReplaceEdit2) { + function create(newText, insert, replace) { + return { newText, insert, replace }; + } + InsertReplaceEdit2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.newText) && Range2.is(candidate.insert) && Range2.is(candidate.replace); + } + InsertReplaceEdit2.is = is; + })(InsertReplaceEdit || (InsertReplaceEdit = {})); + var InsertTextMode; + (function(InsertTextMode2) { + InsertTextMode2.asIs = 1; + InsertTextMode2.adjustIndentation = 2; + })(InsertTextMode || (InsertTextMode = {})); + var CompletionItemLabelDetails; + (function(CompletionItemLabelDetails2) { + function is(value) { + var candidate = value; + return candidate && (Is.string(candidate.detail) || candidate.detail === void 0) && (Is.string(candidate.description) || candidate.description === void 0); + } + CompletionItemLabelDetails2.is = is; + })(CompletionItemLabelDetails || (CompletionItemLabelDetails = {})); + var CompletionItem; + (function(CompletionItem2) { + function create(label) { + return { label }; + } + CompletionItem2.create = create; + })(CompletionItem || (CompletionItem = {})); + var CompletionList; + (function(CompletionList2) { + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList2.create = create; + })(CompletionList || (CompletionList = {})); + var MarkedString; + (function(MarkedString2) { + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); + } + MarkedString2.fromPlainText = fromPlainText; + function is(value) { + var candidate = value; + return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value); + } + MarkedString2.is = is; + })(MarkedString || (MarkedString = {})); + var Hover; + (function(Hover2) { + function is(value) { + var candidate = value; + return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range2.is(value.range)); + } + Hover2.is = is; + })(Hover || (Hover = {})); + var ParameterInformation; + (function(ParameterInformation2) { + function create(label, documentation) { + return documentation ? { label, documentation } : { label }; + } + ParameterInformation2.create = create; + })(ParameterInformation || (ParameterInformation = {})); + var SignatureInformation; + (function(SignatureInformation2) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } else { + result.parameters = []; + } + return result; + } + SignatureInformation2.create = create; + })(SignatureInformation || (SignatureInformation = {})); + var DocumentHighlightKind3; + (function(DocumentHighlightKind4) { + DocumentHighlightKind4.Text = 1; + DocumentHighlightKind4.Read = 2; + DocumentHighlightKind4.Write = 3; + })(DocumentHighlightKind3 || (DocumentHighlightKind3 = {})); + var DocumentHighlight; + (function(DocumentHighlight2) { + function create(range, kind) { + var result = { range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight2.create = create; + })(DocumentHighlight || (DocumentHighlight = {})); + var SymbolKind2; + (function(SymbolKind3) { + SymbolKind3.File = 1; + SymbolKind3.Module = 2; + SymbolKind3.Namespace = 3; + SymbolKind3.Package = 4; + SymbolKind3.Class = 5; + SymbolKind3.Method = 6; + SymbolKind3.Property = 7; + SymbolKind3.Field = 8; + SymbolKind3.Constructor = 9; + SymbolKind3.Enum = 10; + SymbolKind3.Interface = 11; + SymbolKind3.Function = 12; + SymbolKind3.Variable = 13; + SymbolKind3.Constant = 14; + SymbolKind3.String = 15; + SymbolKind3.Number = 16; + SymbolKind3.Boolean = 17; + SymbolKind3.Array = 18; + SymbolKind3.Object = 19; + SymbolKind3.Key = 20; + SymbolKind3.Null = 21; + SymbolKind3.EnumMember = 22; + SymbolKind3.Struct = 23; + SymbolKind3.Event = 24; + SymbolKind3.Operator = 25; + SymbolKind3.TypeParameter = 26; + })(SymbolKind2 || (SymbolKind2 = {})); + var SymbolTag2; + (function(SymbolTag3) { + SymbolTag3.Deprecated = 1; + })(SymbolTag2 || (SymbolTag2 = {})); + var SymbolInformation; + (function(SymbolInformation2) { + function create(name2, kind, range, uri, containerName) { + var result = { + name: name2, + kind, + location: { uri, range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation2.create = create; + })(SymbolInformation || (SymbolInformation = {})); + var WorkspaceSymbol; + (function(WorkspaceSymbol2) { + function create(name2, kind, uri, range) { + return range !== void 0 ? { name: name2, kind, location: { uri, range } } : { name: name2, kind, location: { uri } }; + } + WorkspaceSymbol2.create = create; + })(WorkspaceSymbol || (WorkspaceSymbol = {})); + var DocumentSymbol; + (function(DocumentSymbol2) { + function create(name2, detail, kind, range, selectionRange, children) { + var result = { + name: name2, + detail, + kind, + range, + selectionRange + }; + if (children !== void 0) { + result.children = children; + } + return result; + } + DocumentSymbol2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range2.is(candidate.range) && Range2.is(candidate.selectionRange) && (candidate.detail === void 0 || Is.string(candidate.detail)) && (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) && (candidate.children === void 0 || Array.isArray(candidate.children)) && (candidate.tags === void 0 || Array.isArray(candidate.tags)); + } + DocumentSymbol2.is = is; + })(DocumentSymbol || (DocumentSymbol = {})); + var CodeActionKind; + (function(CodeActionKind2) { + CodeActionKind2.Empty = ""; + CodeActionKind2.QuickFix = "quickfix"; + CodeActionKind2.Refactor = "refactor"; + CodeActionKind2.RefactorExtract = "refactor.extract"; + CodeActionKind2.RefactorInline = "refactor.inline"; + CodeActionKind2.RefactorRewrite = "refactor.rewrite"; + CodeActionKind2.Source = "source"; + CodeActionKind2.SourceOrganizeImports = "source.organizeImports"; + CodeActionKind2.SourceFixAll = "source.fixAll"; + })(CodeActionKind || (CodeActionKind = {})); + var CodeActionTriggerKind; + (function(CodeActionTriggerKind2) { + CodeActionTriggerKind2.Invoked = 1; + CodeActionTriggerKind2.Automatic = 2; + })(CodeActionTriggerKind || (CodeActionTriggerKind = {})); + var CodeActionContext; + (function(CodeActionContext2) { + function create(diagnostics, only, triggerKind) { + var result = { diagnostics }; + if (only !== void 0 && only !== null) { + result.only = only; + } + if (triggerKind !== void 0 && triggerKind !== null) { + result.triggerKind = triggerKind; + } + return result; + } + CodeActionContext2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === void 0 || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic); + } + CodeActionContext2.is = is; + })(CodeActionContext || (CodeActionContext = {})); + var CodeAction; + (function(CodeAction2) { + function create(title, kindOrCommandOrEdit, kind) { + var result = { title }; + var checkKind = true; + if (typeof kindOrCommandOrEdit === "string") { + checkKind = false; + result.kind = kindOrCommandOrEdit; + } else if (Command2.is(kindOrCommandOrEdit)) { + result.command = kindOrCommandOrEdit; + } else { + result.edit = kindOrCommandOrEdit; + } + if (checkKind && kind !== void 0) { + result.kind = kind; + } + return result; + } + CodeAction2.create = create; + function is(value) { + var candidate = value; + return candidate && Is.string(candidate.title) && (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === void 0 || Is.string(candidate.kind)) && (candidate.edit !== void 0 || candidate.command !== void 0) && (candidate.command === void 0 || Command2.is(candidate.command)) && (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) && (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit)); + } + CodeAction2.is = is; + })(CodeAction || (CodeAction = {})); + var CodeLens; + (function(CodeLens2) { + function create(range, data) { + var result = { range }; + if (Is.defined(data)) { + result.data = data; + } + return result; + } + CodeLens2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && (Is.undefined(candidate.command) || Command2.is(candidate.command)); + } + CodeLens2.is = is; + })(CodeLens || (CodeLens = {})); + var FormattingOptions; + (function(FormattingOptions2) { + function create(tabSize, insertSpaces) { + return { tabSize, insertSpaces }; + } + FormattingOptions2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions2.is = is; + })(FormattingOptions || (FormattingOptions = {})); + var DocumentLink; + (function(DocumentLink2) { + function create(range, target, data) { + return { range, target, data }; + } + DocumentLink2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink2.is = is; + })(DocumentLink || (DocumentLink = {})); + var SelectionRange; + (function(SelectionRange2) { + function create(range, parent) { + return { range, parent }; + } + SelectionRange2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Range2.is(candidate.range) && (candidate.parent === void 0 || SelectionRange2.is(candidate.parent)); + } + SelectionRange2.is = is; + })(SelectionRange || (SelectionRange = {})); + var SemanticTokenTypes; + (function(SemanticTokenTypes2) { + SemanticTokenTypes2["namespace"] = "namespace"; + SemanticTokenTypes2["type"] = "type"; + SemanticTokenTypes2["class"] = "class"; + SemanticTokenTypes2["enum"] = "enum"; + SemanticTokenTypes2["interface"] = "interface"; + SemanticTokenTypes2["struct"] = "struct"; + SemanticTokenTypes2["typeParameter"] = "typeParameter"; + SemanticTokenTypes2["parameter"] = "parameter"; + SemanticTokenTypes2["variable"] = "variable"; + SemanticTokenTypes2["property"] = "property"; + SemanticTokenTypes2["enumMember"] = "enumMember"; + SemanticTokenTypes2["event"] = "event"; + SemanticTokenTypes2["function"] = "function"; + SemanticTokenTypes2["method"] = "method"; + SemanticTokenTypes2["macro"] = "macro"; + SemanticTokenTypes2["keyword"] = "keyword"; + SemanticTokenTypes2["modifier"] = "modifier"; + SemanticTokenTypes2["comment"] = "comment"; + SemanticTokenTypes2["string"] = "string"; + SemanticTokenTypes2["number"] = "number"; + SemanticTokenTypes2["regexp"] = "regexp"; + SemanticTokenTypes2["operator"] = "operator"; + SemanticTokenTypes2["decorator"] = "decorator"; + })(SemanticTokenTypes || (SemanticTokenTypes = {})); + var SemanticTokenModifiers; + (function(SemanticTokenModifiers2) { + SemanticTokenModifiers2["declaration"] = "declaration"; + SemanticTokenModifiers2["definition"] = "definition"; + SemanticTokenModifiers2["readonly"] = "readonly"; + SemanticTokenModifiers2["static"] = "static"; + SemanticTokenModifiers2["deprecated"] = "deprecated"; + SemanticTokenModifiers2["abstract"] = "abstract"; + SemanticTokenModifiers2["async"] = "async"; + SemanticTokenModifiers2["modification"] = "modification"; + SemanticTokenModifiers2["documentation"] = "documentation"; + SemanticTokenModifiers2["defaultLibrary"] = "defaultLibrary"; + })(SemanticTokenModifiers || (SemanticTokenModifiers = {})); + var SemanticTokens; + (function(SemanticTokens2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.resultId === void 0 || typeof candidate.resultId === "string") && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === "number"); + } + SemanticTokens2.is = is; + })(SemanticTokens || (SemanticTokens = {})); + var InlineValueText; + (function(InlineValueText2) { + function create(range, text3) { + return { range, text: text3 }; + } + InlineValueText2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && Is.string(candidate.text); + } + InlineValueText2.is = is; + })(InlineValueText || (InlineValueText = {})); + var InlineValueVariableLookup; + (function(InlineValueVariableLookup2) { + function create(range, variableName, caseSensitiveLookup) { + return { range, variableName, caseSensitiveLookup }; + } + InlineValueVariableLookup2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === void 0); + } + InlineValueVariableLookup2.is = is; + })(InlineValueVariableLookup || (InlineValueVariableLookup = {})); + var InlineValueEvaluatableExpression; + (function(InlineValueEvaluatableExpression2) { + function create(range, expression) { + return { range, expression }; + } + InlineValueEvaluatableExpression2.create = create; + function is(value) { + var candidate = value; + return candidate !== void 0 && candidate !== null && Range2.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === void 0); + } + InlineValueEvaluatableExpression2.is = is; + })(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {})); + var InlineValueContext; + (function(InlineValueContext2) { + function create(frameId, stoppedLocation) { + return { frameId, stoppedLocation }; + } + InlineValueContext2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range2.is(value.stoppedLocation); + } + InlineValueContext2.is = is; + })(InlineValueContext || (InlineValueContext = {})); + var InlayHintKind3; + (function(InlayHintKind4) { + InlayHintKind4.Type = 1; + InlayHintKind4.Parameter = 2; + function is(value) { + return value === 1 || value === 2; + } + InlayHintKind4.is = is; + })(InlayHintKind3 || (InlayHintKind3 = {})); + var InlayHintLabelPart; + (function(InlayHintLabelPart2) { + function create(value) { + return { value }; + } + InlayHintLabelPart2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === void 0 || Location2.is(candidate.location)) && (candidate.command === void 0 || Command2.is(candidate.command)); + } + InlayHintLabelPart2.is = is; + })(InlayHintLabelPart || (InlayHintLabelPart = {})); + var InlayHint; + (function(InlayHint2) { + function create(position, label, kind) { + var result = { position, label }; + if (kind !== void 0) { + result.kind = kind; + } + return result; + } + InlayHint2.create = create; + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && Position2.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === void 0 || InlayHintKind3.is(candidate.kind)) && candidate.textEdits === void 0 || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === void 0 || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === void 0 || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === void 0 || Is.boolean(candidate.paddingRight)); + } + InlayHint2.is = is; + })(InlayHint || (InlayHint = {})); + var WorkspaceFolder; + (function(WorkspaceFolder2) { + function is(value) { + var candidate = value; + return Is.objectLiteral(candidate) && URI2.is(candidate.uri) && Is.string(candidate.name); + } + WorkspaceFolder2.is = is; + })(WorkspaceFolder || (WorkspaceFolder = {})); + var TextDocument; + (function(TextDocument2) { + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument2.create = create; + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument2.is = is; + function applyEdits(document2, edits) { + var text3 = document2.getText(); + var sortedEdits = mergeSort(edits, function(a, b) { + var diff = a.range.start.line - b.range.start.line; + if (diff === 0) { + return a.range.start.character - b.range.start.character; + } + return diff; + }); + var lastModifiedOffset = text3.length; + for (var i = sortedEdits.length - 1; i >= 0; i--) { + var e = sortedEdits[i]; + var startOffset = document2.offsetAt(e.range.start); + var endOffset = document2.offsetAt(e.range.end); + if (endOffset <= lastModifiedOffset) { + text3 = text3.substring(0, startOffset) + e.newText + text3.substring(endOffset, text3.length); + } else { + throw new Error("Overlapping edit"); + } + lastModifiedOffset = startOffset; + } + return text3; + } + TextDocument2.applyEdits = applyEdits; + function mergeSort(data, compare) { + if (data.length <= 1) { + return data; + } + var p2 = data.length / 2 | 0; + var left = data.slice(0, p2); + var right = data.slice(p2); + mergeSort(left, compare); + mergeSort(right, compare); + var leftIdx = 0; + var rightIdx = 0; + var i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + var ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + data[i++] = left[leftIdx++]; + } else { + data[i++] = right[rightIdx++]; + } + } + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } + return data; + } + })(TextDocument || (TextDocument = {})); + var FullTextDocument = ( + /** @class */ + function() { + function FullTextDocument2(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = void 0; + } + Object.defineProperty(FullTextDocument2.prototype, "uri", { + get: function() { + return this._uri; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument2.prototype, "languageId", { + get: function() { + return this._languageId; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(FullTextDocument2.prototype, "version", { + get: function() { + return this._version; + }, + enumerable: false, + configurable: true + }); + FullTextDocument2.prototype.getText = function(range) { + if (range) { + var start = this.offsetAt(range.start); + var end = this.offsetAt(range.end); + return this._content.substring(start, end); + } + return this._content; + }; + FullTextDocument2.prototype.update = function(event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = void 0; + }; + FullTextDocument2.prototype.getLineOffsets = function() { + if (this._lineOffsets === void 0) { + var lineOffsets = []; + var text3 = this._content; + var isLineStart = true; + for (var i = 0; i < text3.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text3.charAt(i); + isLineStart = ch === "\r" || ch === "\n"; + if (ch === "\r" && i + 1 < text3.length && text3.charAt(i + 1) === "\n") { + i++; + } + } + if (isLineStart && text3.length > 0) { + lineOffsets.push(text3.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument2.prototype.positionAt = function(offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position2.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } else { + low = mid + 1; + } + } + var line = low - 1; + return Position2.create(line, offset - lineOffsets[line]); + }; + FullTextDocument2.prototype.offsetAt = function(position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument2.prototype, "lineCount", { + get: function() { + return this.getLineOffsets().length; + }, + enumerable: false, + configurable: true + }); + return FullTextDocument2; + }() + ); + var Is; + (function(Is2) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== "undefined"; + } + Is2.defined = defined; + function undefined2(value) { + return typeof value === "undefined"; + } + Is2.undefined = undefined2; + function boolean(value) { + return value === true || value === false; + } + Is2.boolean = boolean; + function string(value) { + return toString.call(value) === "[object String]"; + } + Is2.string = string; + function number(value) { + return toString.call(value) === "[object Number]"; + } + Is2.number = number; + function numberRange(value, min, max) { + return toString.call(value) === "[object Number]" && min <= value && value <= max; + } + Is2.numberRange = numberRange; + function integer2(value) { + return toString.call(value) === "[object Number]" && -2147483648 <= value && value <= 2147483647; + } + Is2.integer = integer2; + function uinteger2(value) { + return toString.call(value) === "[object Number]" && 0 <= value && value <= 2147483647; + } + Is2.uinteger = uinteger2; + function func(value) { + return toString.call(value) === "[object Function]"; + } + Is2.func = func; + function objectLiteral(value) { + return value !== null && typeof value === "object"; + } + Is2.objectLiteral = objectLiteral; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is2.typedArray = typedArray; + })(Is || (Is = {})); + + // node_modules/graphql-language-service/esm/types.js + var CompletionItemKind3; + (function(CompletionItemKind4) { + CompletionItemKind4.Text = 1; + CompletionItemKind4.Method = 2; + CompletionItemKind4.Function = 3; + CompletionItemKind4.Constructor = 4; + CompletionItemKind4.Field = 5; + CompletionItemKind4.Variable = 6; + CompletionItemKind4.Class = 7; + CompletionItemKind4.Interface = 8; + CompletionItemKind4.Module = 9; + CompletionItemKind4.Property = 10; + CompletionItemKind4.Unit = 11; + CompletionItemKind4.Value = 12; + CompletionItemKind4.Enum = 13; + CompletionItemKind4.Keyword = 14; + CompletionItemKind4.Snippet = 15; + CompletionItemKind4.Color = 16; + CompletionItemKind4.File = 17; + CompletionItemKind4.Reference = 18; + CompletionItemKind4.Folder = 19; + CompletionItemKind4.EnumMember = 20; + CompletionItemKind4.Constant = 21; + CompletionItemKind4.Struct = 22; + CompletionItemKind4.Event = 23; + CompletionItemKind4.Operator = 24; + CompletionItemKind4.TypeParameter = 25; + })(CompletionItemKind3 || (CompletionItemKind3 = {})); + + // node_modules/graphql-language-service/esm/parser/CharacterStream.js + var CharacterStream = class { + constructor(sourceText) { + this.getStartOfToken = () => this._start; + this.getCurrentPosition = () => this._pos; + this.eol = () => this._sourceText.length === this._pos; + this.sol = () => this._pos === 0; + this.peek = () => { + return this._sourceText.charAt(this._pos) || null; + }; + this.next = () => { + const char = this._sourceText.charAt(this._pos); + this._pos++; + return char; + }; + this.eat = (pattern) => { + const isMatched = this._testNextCharacter(pattern); + if (isMatched) { + this._start = this._pos; + this._pos++; + return this._sourceText.charAt(this._pos - 1); + } + return void 0; + }; + this.eatWhile = (match) => { + let isMatched = this._testNextCharacter(match); + let didEat = false; + if (isMatched) { + didEat = isMatched; + this._start = this._pos; + } + while (isMatched) { + this._pos++; + isMatched = this._testNextCharacter(match); + didEat = true; + } + return didEat; + }; + this.eatSpace = () => this.eatWhile(/[\s\u00a0]/); + this.skipToEnd = () => { + this._pos = this._sourceText.length; + }; + this.skipTo = (position) => { + this._pos = position; + }; + this.match = (pattern, consume = true, caseFold = false) => { + let token = null; + let match = null; + if (typeof pattern === "string") { + const regex = new RegExp(pattern, caseFold ? "i" : "g"); + match = regex.test(this._sourceText.slice(this._pos, this._pos + pattern.length)); + token = pattern; + } else if (pattern instanceof RegExp) { + match = this._sourceText.slice(this._pos).match(pattern); + token = match === null || match === void 0 ? void 0 : match[0]; + } + if (match != null && (typeof pattern === "string" || match instanceof Array && this._sourceText.startsWith(match[0], this._pos))) { + if (consume) { + this._start = this._pos; + if (token && token.length) { + this._pos += token.length; + } + } + return match; + } + return false; + }; + this.backUp = (num) => { + this._pos -= num; + }; + this.column = () => this._pos; + this.indentation = () => { + const match = this._sourceText.match(/\s*/); + let indent2 = 0; + if (match && match.length !== 0) { + const whiteSpaces = match[0]; + let pos = 0; + while (whiteSpaces.length > pos) { + if (whiteSpaces.charCodeAt(pos) === 9) { + indent2 += 2; + } else { + indent2++; + } + pos++; + } + } + return indent2; + }; + this.current = () => this._sourceText.slice(this._start, this._pos); + this._start = 0; + this._pos = 0; + this._sourceText = sourceText; + } + _testNextCharacter(pattern) { + const character = this._sourceText.charAt(this._pos); + let isMatched = false; + if (typeof pattern === "string") { + isMatched = character === pattern; + } else { + isMatched = pattern instanceof RegExp ? pattern.test(character) : pattern(character); + } + return isMatched; + } + }; + + // node_modules/graphql-language-service/esm/parser/RuleHelpers.js + function opt(ofRule) { + return { ofRule }; + } + function list(ofRule, separator) { + return { ofRule, isList: true, separator }; + } + function butNot(rule, exclusions) { + const ruleMatch = rule.match; + rule.match = (token) => { + let check = false; + if (ruleMatch) { + check = ruleMatch(token); + } + return check && exclusions.every((exclusion) => exclusion.match && !exclusion.match(token)); + }; + return rule; + } + function t(kind, style) { + return { style, match: (token) => token.kind === kind }; + } + function p(value, style) { + return { + style: style || "punctuation", + match: (token) => token.kind === "Punctuation" && token.value === value + }; + } + + // node_modules/graphql-language-service/esm/parser/Rules.js + var isIgnored = (ch) => ch === " " || ch === " " || ch === "," || ch === "\n" || ch === "\r" || ch === "\uFEFF" || ch === "\xA0"; + var LexRules = { + Name: /^[_A-Za-z][_0-9A-Za-z]*/, + Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/, + Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, + String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/, + Comment: /^#.*/ + }; + var ParseRules = { + Document: [list("Definition")], + Definition(token) { + switch (token.value) { + case "{": + return "ShortQuery"; + case "query": + return "Query"; + case "mutation": + return "Mutation"; + case "subscription": + return "Subscription"; + case "fragment": + return Kind.FRAGMENT_DEFINITION; + case "schema": + return "SchemaDef"; + case "scalar": + return "ScalarDef"; + case "type": + return "ObjectTypeDef"; + case "interface": + return "InterfaceDef"; + case "union": + return "UnionDef"; + case "enum": + return "EnumDef"; + case "input": + return "InputDef"; + case "extend": + return "ExtendDef"; + case "directive": + return "DirectiveDef"; + } + }, + ShortQuery: ["SelectionSet"], + Query: [ + word("query"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + Mutation: [ + word("mutation"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + Subscription: [ + word("subscription"), + opt(name("def")), + opt("VariableDefinitions"), + list("Directive"), + "SelectionSet" + ], + VariableDefinitions: [p("("), list("VariableDefinition"), p(")")], + VariableDefinition: ["Variable", p(":"), "Type", opt("DefaultValue")], + Variable: [p("$", "variable"), name("variable")], + DefaultValue: [p("="), "Value"], + SelectionSet: [p("{"), list("Selection"), p("}")], + Selection(token, stream) { + return token.value === "..." ? stream.match(/[\s\u00a0,]*(on\b|@|{)/, false) ? "InlineFragment" : "FragmentSpread" : stream.match(/[\s\u00a0,]*:/, false) ? "AliasedField" : "Field"; + }, + AliasedField: [ + name("property"), + p(":"), + name("qualifier"), + opt("Arguments"), + list("Directive"), + opt("SelectionSet") + ], + Field: [ + name("property"), + opt("Arguments"), + list("Directive"), + opt("SelectionSet") + ], + Arguments: [p("("), list("Argument"), p(")")], + Argument: [name("attribute"), p(":"), "Value"], + FragmentSpread: [p("..."), name("def"), list("Directive")], + InlineFragment: [ + p("..."), + opt("TypeCondition"), + list("Directive"), + "SelectionSet" + ], + FragmentDefinition: [ + word("fragment"), + opt(butNot(name("def"), [word("on")])), + "TypeCondition", + list("Directive"), + "SelectionSet" + ], + TypeCondition: [word("on"), "NamedType"], + Value(token) { + switch (token.kind) { + case "Number": + return "NumberValue"; + case "String": + return "StringValue"; + case "Punctuation": + switch (token.value) { + case "[": + return "ListValue"; + case "{": + return "ObjectValue"; + case "$": + return "Variable"; + case "&": + return "NamedType"; + } + return null; + case "Name": + switch (token.value) { + case "true": + case "false": + return "BooleanValue"; + } + if (token.value === "null") { + return "NullValue"; + } + return "EnumValue"; + } + }, + NumberValue: [t("Number", "number")], + StringValue: [ + { + style: "string", + match: (token) => token.kind === "String", + update(state, token) { + if (token.value.startsWith('"""')) { + state.inBlockstring = !token.value.slice(3).endsWith('"""'); + } + } + } + ], + BooleanValue: [t("Name", "builtin")], + NullValue: [t("Name", "keyword")], + EnumValue: [name("string-2")], + ListValue: [p("["), list("Value"), p("]")], + ObjectValue: [p("{"), list("ObjectField"), p("}")], + ObjectField: [name("attribute"), p(":"), "Value"], + Type(token) { + return token.value === "[" ? "ListType" : "NonNullType"; + }, + ListType: [p("["), "Type", p("]"), opt(p("!"))], + NonNullType: ["NamedType", opt(p("!"))], + NamedType: [type("atom")], + Directive: [p("@", "meta"), name("meta"), opt("Arguments")], + DirectiveDef: [ + word("directive"), + p("@", "meta"), + name("meta"), + opt("ArgumentsDef"), + word("on"), + list("DirectiveLocation", p("|")) + ], + InterfaceDef: [ + word("interface"), + name("atom"), + opt("Implements"), + list("Directive"), + p("{"), + list("FieldDef"), + p("}") + ], + Implements: [word("implements"), list("NamedType", p("&"))], + DirectiveLocation: [name("string-2")], + SchemaDef: [ + word("schema"), + list("Directive"), + p("{"), + list("OperationTypeDef"), + p("}") + ], + OperationTypeDef: [name("keyword"), p(":"), name("atom")], + ScalarDef: [word("scalar"), name("atom"), list("Directive")], + ObjectTypeDef: [ + word("type"), + name("atom"), + opt("Implements"), + list("Directive"), + p("{"), + list("FieldDef"), + p("}") + ], + FieldDef: [ + name("property"), + opt("ArgumentsDef"), + p(":"), + "Type", + list("Directive") + ], + ArgumentsDef: [p("("), list("InputValueDef"), p(")")], + InputValueDef: [ + name("attribute"), + p(":"), + "Type", + opt("DefaultValue"), + list("Directive") + ], + UnionDef: [ + word("union"), + name("atom"), + list("Directive"), + p("="), + list("UnionMember", p("|")) + ], + UnionMember: ["NamedType"], + EnumDef: [ + word("enum"), + name("atom"), + list("Directive"), + p("{"), + list("EnumValueDef"), + p("}") + ], + EnumValueDef: [name("string-2"), list("Directive")], + InputDef: [ + word("input"), + name("atom"), + list("Directive"), + p("{"), + list("InputValueDef"), + p("}") + ], + ExtendDef: [word("extend"), "ExtensionDefinition"], + ExtensionDefinition(token) { + switch (token.value) { + case "schema": + return Kind.SCHEMA_EXTENSION; + case "scalar": + return Kind.SCALAR_TYPE_EXTENSION; + case "type": + return Kind.OBJECT_TYPE_EXTENSION; + case "interface": + return Kind.INTERFACE_TYPE_EXTENSION; + case "union": + return Kind.UNION_TYPE_EXTENSION; + case "enum": + return Kind.ENUM_TYPE_EXTENSION; + case "input": + return Kind.INPUT_OBJECT_TYPE_EXTENSION; + } + }, + [Kind.SCHEMA_EXTENSION]: ["SchemaDef"], + [Kind.SCALAR_TYPE_EXTENSION]: ["ScalarDef"], + [Kind.OBJECT_TYPE_EXTENSION]: ["ObjectTypeDef"], + [Kind.INTERFACE_TYPE_EXTENSION]: ["InterfaceDef"], + [Kind.UNION_TYPE_EXTENSION]: ["UnionDef"], + [Kind.ENUM_TYPE_EXTENSION]: ["EnumDef"], + [Kind.INPUT_OBJECT_TYPE_EXTENSION]: ["InputDef"] + }; + function word(value) { + return { + style: "keyword", + match: (token) => token.kind === "Name" && token.value === value + }; + } + function name(style) { + return { + style, + match: (token) => token.kind === "Name", + update(state, token) { + state.name = token.value; + } + }; + } + function type(style) { + return { + style, + match: (token) => token.kind === "Name", + update(state, token) { + var _a3; + if ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.prevState) { + state.name = token.value; + state.prevState.prevState.type = token.value; + } + } + }; + } + + // node_modules/graphql-language-service/esm/parser/onlineParser.js + function onlineParser(options = { + eatWhitespace: (stream) => stream.eatWhile(isIgnored), + lexRules: LexRules, + parseRules: ParseRules, + editorConfig: {} + }) { + return { + startState() { + const initialState = { + level: 0, + step: 0, + name: null, + kind: null, + type: null, + rule: null, + needsSeparator: false, + prevState: null + }; + pushRule(options.parseRules, initialState, Kind.DOCUMENT); + return initialState; + }, + token(stream, state) { + return getToken(stream, state, options); + } + }; + } + function getToken(stream, state, options) { + var _a3; + if (state.inBlockstring) { + if (stream.match(/.*"""/)) { + state.inBlockstring = false; + return "string"; + } + stream.skipToEnd(); + return "string"; + } + const { lexRules, parseRules, eatWhitespace, editorConfig } = options; + if (state.rule && state.rule.length === 0) { + popRule(state); + } else if (state.needsAdvance) { + state.needsAdvance = false; + advanceRule(state, true); + } + if (stream.sol()) { + const tabSize = (editorConfig === null || editorConfig === void 0 ? void 0 : editorConfig.tabSize) || 2; + state.indentLevel = Math.floor(stream.indentation() / tabSize); + } + if (eatWhitespace(stream)) { + return "ws"; + } + const token = lex(lexRules, stream); + if (!token) { + const matchedSomething = stream.match(/\S+/); + if (!matchedSomething) { + stream.match(/\s/); + } + pushRule(SpecialParseRules, state, "Invalid"); + return "invalidchar"; + } + if (token.kind === "Comment") { + pushRule(SpecialParseRules, state, "Comment"); + return "comment"; + } + const backupState = assign({}, state); + if (token.kind === "Punctuation") { + if (/^[{([]/.test(token.value)) { + if (state.indentLevel !== void 0) { + state.levels = (state.levels || []).concat(state.indentLevel + 1); + } + } else if (/^[})\]]/.test(token.value)) { + const levels = state.levels = (state.levels || []).slice(0, -1); + if (state.indentLevel && levels.length > 0 && levels.at(-1) < state.indentLevel) { + state.indentLevel = levels.at(-1); + } + } + } + while (state.rule) { + let expected = typeof state.rule === "function" ? state.step === 0 ? state.rule(token, stream) : null : state.rule[state.step]; + if (state.needsSeparator) { + expected = expected === null || expected === void 0 ? void 0 : expected.separator; + } + if (expected) { + if (expected.ofRule) { + expected = expected.ofRule; + } + if (typeof expected === "string") { + pushRule(parseRules, state, expected); + continue; + } + if ((_a3 = expected.match) === null || _a3 === void 0 ? void 0 : _a3.call(expected, token)) { + if (expected.update) { + expected.update(state, token); + } + if (token.kind === "Punctuation") { + advanceRule(state, true); + } else { + state.needsAdvance = true; + } + return expected.style; + } + } + unsuccessful(state); + } + assign(state, backupState); + pushRule(SpecialParseRules, state, "Invalid"); + return "invalidchar"; + } + function assign(to, from) { + const keys = Object.keys(from); + for (let i = 0; i < keys.length; i++) { + to[keys[i]] = from[keys[i]]; + } + return to; + } + var SpecialParseRules = { + Invalid: [], + Comment: [] + }; + function pushRule(rules, state, ruleKind) { + if (!rules[ruleKind]) { + throw new TypeError("Unknown rule: " + ruleKind); + } + state.prevState = Object.assign({}, state); + state.kind = ruleKind; + state.name = null; + state.type = null; + state.rule = rules[ruleKind]; + state.step = 0; + state.needsSeparator = false; + } + function popRule(state) { + if (!state.prevState) { + return; + } + state.kind = state.prevState.kind; + state.name = state.prevState.name; + state.type = state.prevState.type; + state.rule = state.prevState.rule; + state.step = state.prevState.step; + state.needsSeparator = state.prevState.needsSeparator; + state.prevState = state.prevState.prevState; + } + function advanceRule(state, successful) { + var _a3; + if (isList(state) && state.rule) { + const step = state.rule[state.step]; + if (step.separator) { + const { separator } = step; + state.needsSeparator = !state.needsSeparator; + if (!state.needsSeparator && separator.ofRule) { + return; + } + } + if (successful) { + return; + } + } + state.needsSeparator = false; + state.step++; + while (state.rule && !(Array.isArray(state.rule) && state.step < state.rule.length)) { + popRule(state); + if (state.rule) { + if (isList(state)) { + if ((_a3 = state.rule) === null || _a3 === void 0 ? void 0 : _a3[state.step].separator) { + state.needsSeparator = !state.needsSeparator; + } + } else { + state.needsSeparator = false; + state.step++; + } + } + } + } + function isList(state) { + const step = Array.isArray(state.rule) && typeof state.rule[state.step] !== "string" && state.rule[state.step]; + return step && step.isList; + } + function unsuccessful(state) { + while (state.rule && !(Array.isArray(state.rule) && state.rule[state.step].ofRule)) { + popRule(state); + } + if (state.rule) { + advanceRule(state, false); + } + } + function lex(lexRules, stream) { + const kinds = Object.keys(lexRules); + for (let i = 0; i < kinds.length; i++) { + const match = stream.match(lexRules[kinds[i]]); + if (match && match instanceof Array) { + return { kind: kinds[i], value: match[0] }; + } + } + } + + // node_modules/graphql-language-service/esm/parser/types.js + var AdditionalRuleKinds = { + ALIASED_FIELD: "AliasedField", + ARGUMENTS: "Arguments", + SHORT_QUERY: "ShortQuery", + QUERY: "Query", + MUTATION: "Mutation", + SUBSCRIPTION: "Subscription", + TYPE_CONDITION: "TypeCondition", + INVALID: "Invalid", + COMMENT: "Comment", + SCHEMA_DEF: "SchemaDef", + SCALAR_DEF: "ScalarDef", + OBJECT_TYPE_DEF: "ObjectTypeDef", + OBJECT_VALUE: "ObjectValue", + LIST_VALUE: "ListValue", + INTERFACE_DEF: "InterfaceDef", + UNION_DEF: "UnionDef", + ENUM_DEF: "EnumDef", + ENUM_VALUE: "EnumValue", + FIELD_DEF: "FieldDef", + INPUT_DEF: "InputDef", + INPUT_VALUE_DEF: "InputValueDef", + ARGUMENTS_DEF: "ArgumentsDef", + EXTEND_DEF: "ExtendDef", + EXTENSION_DEFINITION: "ExtensionDefinition", + DIRECTIVE_DEF: "DirectiveDef", + IMPLEMENTS: "Implements", + VARIABLE_DEFINITIONS: "VariableDefinitions", + TYPE: "Type" + }; + var RuleKinds = Object.assign(Object.assign({}, Kind), AdditionalRuleKinds); + + // node_modules/graphql-language-service/esm/interface/getAutocompleteSuggestions.js + var SuggestionCommand = { + command: "editor.action.triggerSuggest", + title: "Suggestions" + }; + var collectFragmentDefs = (op) => { + const externalFragments = []; + if (op) { + try { + visit(parse2(op), { + FragmentDefinition(def) { + externalFragments.push(def); + } + }); + } catch (_a3) { + return []; + } + } + return externalFragments; + }; + var typeSystemKinds = [ + Kind.SCHEMA_DEFINITION, + Kind.OPERATION_TYPE_DEFINITION, + Kind.SCALAR_TYPE_DEFINITION, + Kind.OBJECT_TYPE_DEFINITION, + Kind.INTERFACE_TYPE_DEFINITION, + Kind.UNION_TYPE_DEFINITION, + Kind.ENUM_TYPE_DEFINITION, + Kind.INPUT_OBJECT_TYPE_DEFINITION, + Kind.DIRECTIVE_DEFINITION, + Kind.SCHEMA_EXTENSION, + Kind.SCALAR_TYPE_EXTENSION, + Kind.OBJECT_TYPE_EXTENSION, + Kind.INTERFACE_TYPE_EXTENSION, + Kind.UNION_TYPE_EXTENSION, + Kind.ENUM_TYPE_EXTENSION, + Kind.INPUT_OBJECT_TYPE_EXTENSION + ]; + var hasTypeSystemDefinitions = (sdl) => { + let hasTypeSystemDef = false; + if (sdl) { + try { + visit(parse2(sdl), { + enter(node) { + if (node.kind === "Document") { + return; + } + if (typeSystemKinds.includes(node.kind)) { + hasTypeSystemDef = true; + return BREAK; + } + return false; + } + }); + } catch (_a3) { + return hasTypeSystemDef; + } + } + return hasTypeSystemDef; + }; + function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fragmentDefs, options) { + var _a3; + const opts = Object.assign(Object.assign({}, options), { schema }); + const token = contextToken || getTokenAtPosition(queryText, cursor, 1); + const state = token.state.kind === "Invalid" ? token.state.prevState : token.state; + const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri); + if (!state) { + return []; + } + const { kind, step, prevState } = state; + const typeInfo = getTypeInfo(schema, token.state); + if (kind === RuleKinds.DOCUMENT) { + if (mode === GraphQLDocumentMode.TYPE_SYSTEM) { + return getSuggestionsForTypeSystemDefinitions(token); + } + return getSuggestionsForExecutableDefinitions(token); + } + if (kind === RuleKinds.EXTEND_DEF) { + return getSuggestionsForExtensionDefinitions(token); + } + if (((_a3 = prevState === null || prevState === void 0 ? void 0 : prevState.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === RuleKinds.EXTENSION_DEFINITION && state.name) { + return hintList(token, []); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.SCALAR_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isScalarType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.OBJECT_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isObjectType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.INTERFACE_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isInterfaceType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.UNION_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isUnionType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.ENUM_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isEnumType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === Kind.INPUT_OBJECT_TYPE_EXTENSION) { + return hintList(token, Object.values(schema.getTypeMap()).filter(isInputObjectType).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if (kind === RuleKinds.IMPLEMENTS || kind === RuleKinds.NAMED_TYPE && (prevState === null || prevState === void 0 ? void 0 : prevState.kind) === RuleKinds.IMPLEMENTS) { + return getSuggestionsForImplements(token, state, schema, queryText, typeInfo); + } + if (kind === RuleKinds.SELECTION_SET || kind === RuleKinds.FIELD || kind === RuleKinds.ALIASED_FIELD) { + return getSuggestionsForFieldNames(token, typeInfo, opts); + } + if (kind === RuleKinds.ARGUMENTS || kind === RuleKinds.ARGUMENT && step === 0) { + const { argDefs } = typeInfo; + if (argDefs) { + return hintList(token, argDefs.map((argDef) => { + var _a4; + return { + label: argDef.name, + insertText: argDef.name + ": ", + command: SuggestionCommand, + detail: String(argDef.type), + documentation: (_a4 = argDef.description) !== null && _a4 !== void 0 ? _a4 : void 0, + kind: CompletionItemKind3.Variable, + type: argDef.type + }; + })); + } + } + if ((kind === RuleKinds.OBJECT_VALUE || kind === RuleKinds.OBJECT_FIELD && step === 0) && typeInfo.objectFieldDefs) { + const objectFields = objectValues(typeInfo.objectFieldDefs); + const completionKind = kind === RuleKinds.OBJECT_VALUE ? CompletionItemKind3.Value : CompletionItemKind3.Field; + return hintList(token, objectFields.map((field) => { + var _a4; + return { + label: field.name, + detail: String(field.type), + documentation: (_a4 = field.description) !== null && _a4 !== void 0 ? _a4 : void 0, + kind: completionKind, + type: field.type + }; + })); + } + if (kind === RuleKinds.ENUM_VALUE || kind === RuleKinds.LIST_VALUE && step === 1 || kind === RuleKinds.OBJECT_FIELD && step === 2 || kind === RuleKinds.ARGUMENT && step === 2) { + return getSuggestionsForInputValues(token, typeInfo, queryText, schema); + } + if (kind === RuleKinds.VARIABLE && step === 1) { + const namedInputType = getNamedType(typeInfo.inputType); + const variableDefinitions = getVariableCompletions(queryText, schema, token); + return hintList(token, variableDefinitions.filter((v) => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name))); + } + if (kind === RuleKinds.TYPE_CONDITION && step === 1 || kind === RuleKinds.NAMED_TYPE && prevState != null && prevState.kind === RuleKinds.TYPE_CONDITION) { + return getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, kind); + } + if (kind === RuleKinds.FRAGMENT_SPREAD && step === 1) { + return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, Array.isArray(fragmentDefs) ? fragmentDefs : collectFragmentDefs(fragmentDefs)); + } + const unwrappedState = unwrapType(state); + if (mode === GraphQLDocumentMode.TYPE_SYSTEM && !unwrappedState.needsAdvance && kind === RuleKinds.NAMED_TYPE || kind === RuleKinds.LIST_TYPE) { + if (unwrappedState.kind === RuleKinds.FIELD_DEF) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isOutputType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + if (unwrappedState.kind === RuleKinds.INPUT_VALUE_DEF) { + return hintList(token, Object.values(schema.getTypeMap()).filter((type2) => isInputType(type2) && !type2.name.startsWith("__")).map((type2) => ({ + label: type2.name, + kind: CompletionItemKind3.Function + }))); + } + } + if (kind === RuleKinds.VARIABLE_DEFINITION && step === 2 || kind === RuleKinds.LIST_TYPE && step === 1 || kind === RuleKinds.NAMED_TYPE && prevState && (prevState.kind === RuleKinds.VARIABLE_DEFINITION || prevState.kind === RuleKinds.LIST_TYPE || prevState.kind === RuleKinds.NON_NULL_TYPE)) { + return getSuggestionsForVariableDefinition(token, schema, kind); + } + if (kind === RuleKinds.DIRECTIVE) { + return getSuggestionsForDirective(token, state, schema, kind); + } + return []; + } + var insertSuffix = " {\n $1\n}"; + var getInsertText = (field) => { + const { type: type2 } = field; + if (isCompositeType(type2)) { + return insertSuffix; + } + if (isListType(type2) && isCompositeType(type2.ofType)) { + return insertSuffix; + } + if (isNonNullType(type2)) { + if (isCompositeType(type2.ofType)) { + return insertSuffix; + } + if (isListType(type2.ofType) && isCompositeType(type2.ofType.ofType)) { + return insertSuffix; + } + } + return null; + }; + function getSuggestionsForTypeSystemDefinitions(token) { + return hintList(token, [ + { label: "extend", kind: CompletionItemKind3.Function }, + { label: "type", kind: CompletionItemKind3.Function }, + { label: "interface", kind: CompletionItemKind3.Function }, + { label: "union", kind: CompletionItemKind3.Function }, + { label: "input", kind: CompletionItemKind3.Function }, + { label: "scalar", kind: CompletionItemKind3.Function }, + { label: "schema", kind: CompletionItemKind3.Function } + ]); + } + function getSuggestionsForExecutableDefinitions(token) { + return hintList(token, [ + { label: "query", kind: CompletionItemKind3.Function }, + { label: "mutation", kind: CompletionItemKind3.Function }, + { label: "subscription", kind: CompletionItemKind3.Function }, + { label: "fragment", kind: CompletionItemKind3.Function }, + { label: "{", kind: CompletionItemKind3.Constructor } + ]); + } + function getSuggestionsForExtensionDefinitions(token) { + return hintList(token, [ + { label: "type", kind: CompletionItemKind3.Function }, + { label: "interface", kind: CompletionItemKind3.Function }, + { label: "union", kind: CompletionItemKind3.Function }, + { label: "input", kind: CompletionItemKind3.Function }, + { label: "scalar", kind: CompletionItemKind3.Function }, + { label: "schema", kind: CompletionItemKind3.Function } + ]); + } + function getSuggestionsForFieldNames(token, typeInfo, options) { + var _a3; + if (typeInfo.parentType) { + const { parentType } = typeInfo; + let fields = []; + if ("getFields" in parentType) { + fields = objectValues(parentType.getFields()); + } + if (isCompositeType(parentType)) { + fields.push(TypeNameMetaFieldDef); + } + if (parentType === ((_a3 = options === null || options === void 0 ? void 0 : options.schema) === null || _a3 === void 0 ? void 0 : _a3.getQueryType())) { + fields.push(SchemaMetaFieldDef, TypeMetaFieldDef); + } + return hintList(token, fields.map((field, index) => { + var _a4; + const suggestion = { + sortText: String(index) + field.name, + label: field.name, + detail: String(field.type), + documentation: (_a4 = field.description) !== null && _a4 !== void 0 ? _a4 : void 0, + deprecated: Boolean(field.deprecationReason), + isDeprecated: Boolean(field.deprecationReason), + deprecationReason: field.deprecationReason, + kind: CompletionItemKind3.Field, + type: field.type + }; + if (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) { + const insertText = getInsertText(field); + if (insertText) { + suggestion.insertText = field.name + insertText; + suggestion.insertTextFormat = InsertTextFormat.Snippet; + suggestion.command = SuggestionCommand; + } + } + return suggestion; + })); + } + return []; + } + function getSuggestionsForInputValues(token, typeInfo, queryText, schema) { + const namedInputType = getNamedType(typeInfo.inputType); + const queryVariables = getVariableCompletions(queryText, schema, token).filter((v) => v.detail === namedInputType.name); + if (namedInputType instanceof GraphQLEnumType) { + const values = namedInputType.getValues(); + return hintList(token, values.map((value) => { + var _a3; + return { + label: value.name, + detail: String(namedInputType), + documentation: (_a3 = value.description) !== null && _a3 !== void 0 ? _a3 : void 0, + deprecated: Boolean(value.deprecationReason), + isDeprecated: Boolean(value.deprecationReason), + deprecationReason: value.deprecationReason, + kind: CompletionItemKind3.EnumMember, + type: namedInputType + }; + }).concat(queryVariables)); + } + if (namedInputType === GraphQLBoolean) { + return hintList(token, queryVariables.concat([ + { + label: "true", + detail: String(GraphQLBoolean), + documentation: "Not false.", + kind: CompletionItemKind3.Variable, + type: GraphQLBoolean + }, + { + label: "false", + detail: String(GraphQLBoolean), + documentation: "Not true.", + kind: CompletionItemKind3.Variable, + type: GraphQLBoolean + } + ])); + } + return queryVariables; + } + function getSuggestionsForImplements(token, tokenState, schema, documentText, typeInfo) { + if (tokenState.needsSeparator) { + return []; + } + const typeMap = schema.getTypeMap(); + const schemaInterfaces = objectValues(typeMap).filter(isInterfaceType); + const schemaInterfaceNames = schemaInterfaces.map(({ name: name2 }) => name2); + const inlineInterfaces = /* @__PURE__ */ new Set(); + runOnlineParser(documentText, (_, state) => { + var _a3, _b, _c, _d, _e; + if (state.name) { + if (state.kind === RuleKinds.INTERFACE_DEF && !schemaInterfaceNames.includes(state.name)) { + inlineInterfaces.add(state.name); + } + if (state.kind === RuleKinds.NAMED_TYPE && ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === RuleKinds.IMPLEMENTS) { + if (typeInfo.interfaceDef) { + const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(({ name: name2 }) => name2 === state.name); + if (existingType) { + return; + } + const type2 = schema.getType(state.name); + const interfaceConfig = (_c = typeInfo.interfaceDef) === null || _c === void 0 ? void 0 : _c.toConfig(); + typeInfo.interfaceDef = new GraphQLInterfaceType(Object.assign(Object.assign({}, interfaceConfig), { interfaces: [ + ...interfaceConfig.interfaces, + type2 || new GraphQLInterfaceType({ name: state.name, fields: {} }) + ] })); + } else if (typeInfo.objectTypeDef) { + const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(({ name: name2 }) => name2 === state.name); + if (existingType) { + return; + } + const type2 = schema.getType(state.name); + const objectTypeConfig = (_e = typeInfo.objectTypeDef) === null || _e === void 0 ? void 0 : _e.toConfig(); + typeInfo.objectTypeDef = new GraphQLObjectType(Object.assign(Object.assign({}, objectTypeConfig), { interfaces: [ + ...objectTypeConfig.interfaces, + type2 || new GraphQLInterfaceType({ name: state.name, fields: {} }) + ] })); + } + } + } + }); + const currentTypeToExtend = typeInfo.interfaceDef || typeInfo.objectTypeDef; + const siblingInterfaces = (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.getInterfaces()) || []; + const siblingInterfaceNames = siblingInterfaces.map(({ name: name2 }) => name2); + const possibleInterfaces = schemaInterfaces.concat([...inlineInterfaces].map((name2) => ({ name: name2 }))).filter(({ name: name2 }) => name2 !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name2)); + return hintList(token, possibleInterfaces.map((type2) => { + const result = { + label: type2.name, + kind: CompletionItemKind3.Interface, + type: type2 + }; + if (type2 === null || type2 === void 0 ? void 0 : type2.description) { + result.documentation = type2.description; + } + return result; + })); + } + function getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, _kind) { + let possibleTypes; + if (typeInfo.parentType) { + if (isAbstractType(typeInfo.parentType)) { + const abstractType = assertAbstractType(typeInfo.parentType); + const possibleObjTypes = schema.getPossibleTypes(abstractType); + const possibleIfaceMap = /* @__PURE__ */ Object.create(null); + for (const type2 of possibleObjTypes) { + for (const iface of type2.getInterfaces()) { + possibleIfaceMap[iface.name] = iface; + } + } + possibleTypes = possibleObjTypes.concat(objectValues(possibleIfaceMap)); + } else { + possibleTypes = [typeInfo.parentType]; + } + } else { + const typeMap = schema.getTypeMap(); + possibleTypes = objectValues(typeMap).filter((type2) => isCompositeType(type2) && !type2.name.startsWith("__")); + } + return hintList(token, possibleTypes.map((type2) => { + const namedType = getNamedType(type2); + return { + label: String(type2), + documentation: (namedType === null || namedType === void 0 ? void 0 : namedType.description) || "", + kind: CompletionItemKind3.Field + }; + })); + } + function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fragmentDefs) { + if (!queryText) { + return []; + } + const typeMap = schema.getTypeMap(); + const defState = getDefinitionState(token.state); + const fragments = getFragmentDefinitions(queryText); + if (fragmentDefs && fragmentDefs.length > 0) { + fragments.push(...fragmentDefs); + } + const relevantFrags = fragments.filter((frag) => typeMap[frag.typeCondition.name.value] && !(defState && defState.kind === RuleKinds.FRAGMENT_DEFINITION && defState.name === frag.name.value) && isCompositeType(typeInfo.parentType) && isCompositeType(typeMap[frag.typeCondition.name.value]) && doTypesOverlap(schema, typeInfo.parentType, typeMap[frag.typeCondition.name.value])); + return hintList(token, relevantFrags.map((frag) => ({ + label: frag.name.value, + detail: String(typeMap[frag.typeCondition.name.value]), + documentation: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`, + kind: CompletionItemKind3.Field, + type: typeMap[frag.typeCondition.name.value] + }))); + } + var getParentDefinition = (state, kind) => { + var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k; + if (((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) === kind) { + return state.prevState; + } + if (((_c = (_b = state.prevState) === null || _b === void 0 ? void 0 : _b.prevState) === null || _c === void 0 ? void 0 : _c.kind) === kind) { + return state.prevState.prevState; + } + if (((_f = (_e = (_d = state.prevState) === null || _d === void 0 ? void 0 : _d.prevState) === null || _e === void 0 ? void 0 : _e.prevState) === null || _f === void 0 ? void 0 : _f.kind) === kind) { + return state.prevState.prevState.prevState; + } + if (((_k = (_j = (_h = (_g = state.prevState) === null || _g === void 0 ? void 0 : _g.prevState) === null || _h === void 0 ? void 0 : _h.prevState) === null || _j === void 0 ? void 0 : _j.prevState) === null || _k === void 0 ? void 0 : _k.kind) === kind) { + return state.prevState.prevState.prevState.prevState; + } + }; + function getVariableCompletions(queryText, schema, token) { + let variableName = null; + let variableType; + const definitions = /* @__PURE__ */ Object.create({}); + runOnlineParser(queryText, (_, state) => { + if ((state === null || state === void 0 ? void 0 : state.kind) === RuleKinds.VARIABLE && state.name) { + variableName = state.name; + } + if ((state === null || state === void 0 ? void 0 : state.kind) === RuleKinds.NAMED_TYPE && variableName) { + const parentDefinition = getParentDefinition(state, RuleKinds.TYPE); + if (parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type) { + variableType = schema.getType(parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type); + } + } + if (variableName && variableType && !definitions[variableName]) { + definitions[variableName] = { + detail: variableType.toString(), + insertText: token.string === "$" ? variableName : "$" + variableName, + label: variableName, + type: variableType, + kind: CompletionItemKind3.Variable + }; + variableName = null; + variableType = null; + } + }); + return objectValues(definitions); + } + function getFragmentDefinitions(queryText) { + const fragmentDefs = []; + runOnlineParser(queryText, (_, state) => { + if (state.kind === RuleKinds.FRAGMENT_DEFINITION && state.name && state.type) { + fragmentDefs.push({ + kind: RuleKinds.FRAGMENT_DEFINITION, + name: { + kind: Kind.NAME, + value: state.name + }, + selectionSet: { + kind: RuleKinds.SELECTION_SET, + selections: [] + }, + typeCondition: { + kind: RuleKinds.NAMED_TYPE, + name: { + kind: Kind.NAME, + value: state.type + } + } + }); + } + }); + return fragmentDefs; + } + function getSuggestionsForVariableDefinition(token, schema, _kind) { + const inputTypeMap = schema.getTypeMap(); + const inputTypes = objectValues(inputTypeMap).filter(isInputType); + return hintList(token, inputTypes.map((type2) => ({ + label: type2.name, + documentation: type2.description, + kind: CompletionItemKind3.Variable + }))); + } + function getSuggestionsForDirective(token, state, schema, _kind) { + var _a3; + if ((_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.kind) { + const directives = schema.getDirectives().filter((directive) => canUseDirective(state.prevState, directive)); + return hintList(token, directives.map((directive) => ({ + label: directive.name, + documentation: directive.description || "", + kind: CompletionItemKind3.Function + }))); + } + return []; + } + function getTokenAtPosition(queryText, cursor, offset = 0) { + let styleAtCursor = null; + let stateAtCursor = null; + let stringAtCursor = null; + const token = runOnlineParser(queryText, (stream, state, style, index) => { + if (index === cursor.line && stream.getCurrentPosition() + offset >= cursor.character + 1) { + styleAtCursor = style; + stateAtCursor = Object.assign({}, state); + stringAtCursor = stream.current(); + return "BREAK"; + } + }); + return { + start: token.start, + end: token.end, + string: stringAtCursor || token.string, + state: stateAtCursor || token.state, + style: styleAtCursor || token.style + }; + } + function runOnlineParser(queryText, callback) { + const lines = queryText.split("\n"); + const parser = onlineParser(); + let state = parser.startState(); + let style = ""; + let stream = new CharacterStream(""); + for (let i = 0; i < lines.length; i++) { + stream = new CharacterStream(lines[i]); + while (!stream.eol()) { + style = parser.token(stream, state); + const code = callback(stream, state, style, i); + if (code === "BREAK") { + break; + } + } + callback(stream, state, style, i); + if (!state.kind) { + state = parser.startState(); + } + } + return { + start: stream.getStartOfToken(), + end: stream.getCurrentPosition(), + string: stream.current(), + state, + style + }; + } + function canUseDirective(state, directive) { + if (!(state === null || state === void 0 ? void 0 : state.kind)) { + return false; + } + const { kind, prevState } = state; + const { locations } = directive; + switch (kind) { + case RuleKinds.QUERY: + return locations.includes(DirectiveLocation.QUERY); + case RuleKinds.MUTATION: + return locations.includes(DirectiveLocation.MUTATION); + case RuleKinds.SUBSCRIPTION: + return locations.includes(DirectiveLocation.SUBSCRIPTION); + case RuleKinds.FIELD: + case RuleKinds.ALIASED_FIELD: + return locations.includes(DirectiveLocation.FIELD); + case RuleKinds.FRAGMENT_DEFINITION: + return locations.includes(DirectiveLocation.FRAGMENT_DEFINITION); + case RuleKinds.FRAGMENT_SPREAD: + return locations.includes(DirectiveLocation.FRAGMENT_SPREAD); + case RuleKinds.INLINE_FRAGMENT: + return locations.includes(DirectiveLocation.INLINE_FRAGMENT); + case RuleKinds.SCHEMA_DEF: + return locations.includes(DirectiveLocation.SCHEMA); + case RuleKinds.SCALAR_DEF: + return locations.includes(DirectiveLocation.SCALAR); + case RuleKinds.OBJECT_TYPE_DEF: + return locations.includes(DirectiveLocation.OBJECT); + case RuleKinds.FIELD_DEF: + return locations.includes(DirectiveLocation.FIELD_DEFINITION); + case RuleKinds.INTERFACE_DEF: + return locations.includes(DirectiveLocation.INTERFACE); + case RuleKinds.UNION_DEF: + return locations.includes(DirectiveLocation.UNION); + case RuleKinds.ENUM_DEF: + return locations.includes(DirectiveLocation.ENUM); + case RuleKinds.ENUM_VALUE: + return locations.includes(DirectiveLocation.ENUM_VALUE); + case RuleKinds.INPUT_DEF: + return locations.includes(DirectiveLocation.INPUT_OBJECT); + case RuleKinds.INPUT_VALUE_DEF: + const prevStateKind = prevState === null || prevState === void 0 ? void 0 : prevState.kind; + switch (prevStateKind) { + case RuleKinds.ARGUMENTS_DEF: + return locations.includes(DirectiveLocation.ARGUMENT_DEFINITION); + case RuleKinds.INPUT_DEF: + return locations.includes(DirectiveLocation.INPUT_FIELD_DEFINITION); + } + } + return false; + } + function getTypeInfo(schema, tokenState) { + let argDef; + let argDefs; + let directiveDef; + let enumValue; + let fieldDef; + let inputType; + let objectTypeDef; + let objectFieldDefs; + let parentType; + let type2; + let interfaceDef; + forEachState(tokenState, (state) => { + var _a3; + switch (state.kind) { + case RuleKinds.QUERY: + case "ShortQuery": + type2 = schema.getQueryType(); + break; + case RuleKinds.MUTATION: + type2 = schema.getMutationType(); + break; + case RuleKinds.SUBSCRIPTION: + type2 = schema.getSubscriptionType(); + break; + case RuleKinds.INLINE_FRAGMENT: + case RuleKinds.FRAGMENT_DEFINITION: + if (state.type) { + type2 = schema.getType(state.type); + } + break; + case RuleKinds.FIELD: + case RuleKinds.ALIASED_FIELD: { + if (!type2 || !state.name) { + fieldDef = null; + } else { + fieldDef = parentType ? getFieldDef2(schema, parentType, state.name) : null; + type2 = fieldDef ? fieldDef.type : null; + } + break; + } + case RuleKinds.SELECTION_SET: + parentType = getNamedType(type2); + break; + case RuleKinds.DIRECTIVE: + directiveDef = state.name ? schema.getDirective(state.name) : null; + break; + case RuleKinds.INTERFACE_DEF: + if (state.name) { + objectTypeDef = null; + interfaceDef = new GraphQLInterfaceType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case RuleKinds.OBJECT_TYPE_DEF: + if (state.name) { + interfaceDef = null; + objectTypeDef = new GraphQLObjectType({ + name: state.name, + interfaces: [], + fields: {} + }); + } + break; + case RuleKinds.ARGUMENTS: { + if (state.prevState) { + switch (state.prevState.kind) { + case RuleKinds.FIELD: + argDefs = fieldDef && fieldDef.args; + break; + case RuleKinds.DIRECTIVE: + argDefs = directiveDef && directiveDef.args; + break; + case RuleKinds.ALIASED_FIELD: { + const name2 = (_a3 = state.prevState) === null || _a3 === void 0 ? void 0 : _a3.name; + if (!name2) { + argDefs = null; + break; + } + const field = parentType ? getFieldDef2(schema, parentType, name2) : null; + if (!field) { + argDefs = null; + break; + } + argDefs = field.args; + break; + } + default: + argDefs = null; + break; + } + } else { + argDefs = null; + } + break; + } + case RuleKinds.ARGUMENT: + if (argDefs) { + for (let i = 0; i < argDefs.length; i++) { + if (argDefs[i].name === state.name) { + argDef = argDefs[i]; + break; + } + } + } + inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type; + break; + case RuleKinds.ENUM_VALUE: + const enumType = getNamedType(inputType); + enumValue = enumType instanceof GraphQLEnumType ? enumType.getValues().find((val) => val.value === state.name) : null; + break; + case RuleKinds.LIST_VALUE: + const nullableType = getNullableType(inputType); + inputType = nullableType instanceof GraphQLList ? nullableType.ofType : null; + break; + case RuleKinds.OBJECT_VALUE: + const objectType = getNamedType(inputType); + objectFieldDefs = objectType instanceof GraphQLInputObjectType ? objectType.getFields() : null; + break; + case RuleKinds.OBJECT_FIELD: + const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null; + inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type; + break; + case RuleKinds.NAMED_TYPE: + if (state.name) { + type2 = schema.getType(state.name); + } + break; + } + }); + return { + argDef, + argDefs, + directiveDef, + enumValue, + fieldDef, + inputType, + objectFieldDefs, + parentType, + type: type2, + interfaceDef, + objectTypeDef + }; + } + var GraphQLDocumentMode; + (function(GraphQLDocumentMode2) { + GraphQLDocumentMode2["TYPE_SYSTEM"] = "TYPE_SYSTEM"; + GraphQLDocumentMode2["EXECUTABLE"] = "EXECUTABLE"; + })(GraphQLDocumentMode || (GraphQLDocumentMode = {})); + function getDocumentMode(documentText, uri) { + if (uri === null || uri === void 0 ? void 0 : uri.endsWith(".graphqls")) { + return GraphQLDocumentMode.TYPE_SYSTEM; + } + return hasTypeSystemDefinitions(documentText) ? GraphQLDocumentMode.TYPE_SYSTEM : GraphQLDocumentMode.EXECUTABLE; + } + function unwrapType(state) { + if (state.prevState && state.kind && [ + RuleKinds.NAMED_TYPE, + RuleKinds.LIST_TYPE, + RuleKinds.TYPE, + RuleKinds.NON_NULL_TYPE + ].includes(state.kind)) { + return unwrapType(state.prevState); + } + return state; + } + + // node_modules/graphql-language-service/esm/utils/fragmentDependencies.js + var import_nullthrows = __toESM(require_nullthrows()); + + // node_modules/graphql-language-service/esm/utils/getVariablesJSONSchema.js + function text(into, newText) { + into.push(newText); + } + function renderType(into, t2) { + if (isNonNullType(t2)) { + renderType(into, t2.ofType); + text(into, "!"); + } else if (isListType(t2)) { + text(into, "["); + renderType(into, t2.ofType); + text(into, "]"); + } else { + text(into, t2.name); + } + } + function renderTypeToString(t2, useMarkdown) { + const into = []; + if (useMarkdown) { + text(into, "```graphql\n"); + } + renderType(into, t2); + if (useMarkdown) { + text(into, "\n```"); + } + return into.join(""); + } + var scalarTypesMap = { + Int: "integer", + String: "string", + Float: "number", + ID: "string", + Boolean: "boolean", + DateTime: "string" + }; + var Marker = class { + constructor() { + this.set = /* @__PURE__ */ new Set(); + } + mark(name2) { + if (this.set.has(name2)) { + return false; + } + this.set.add(name2); + return true; + } + }; + function getJSONSchemaFromGraphQLType(type2, options) { + let required = false; + let definition = /* @__PURE__ */ Object.create(null); + const definitions = /* @__PURE__ */ Object.create(null); + if ("defaultValue" in type2 && type2.defaultValue !== void 0) { + definition.default = type2.defaultValue; + } + if (isEnumType(type2)) { + definition.type = "string"; + definition.enum = type2.getValues().map((val) => val.name); + } + if (isScalarType(type2) && scalarTypesMap[type2.name]) { + definition.type = scalarTypesMap[type2.name]; + } + if (isListType(type2)) { + definition.type = "array"; + const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(type2.ofType, options); + if (def.$ref) { + definition.items = { $ref: def.$ref }; + } else { + definition.items = def; + } + if (defs) { + for (const defName of Object.keys(defs)) { + definitions[defName] = defs[defName]; + } + } + } + if (isNonNullType(type2)) { + required = true; + const { definition: def, definitions: defs } = getJSONSchemaFromGraphQLType(type2.ofType, options); + definition = def; + if (defs) { + for (const defName of Object.keys(defs)) { + definitions[defName] = defs[defName]; + } + } + } + if (isInputObjectType(type2)) { + definition.$ref = `#/definitions/${type2.name}`; + if (options === null || options === void 0 ? void 0 : options.definitionMarker.mark(type2.name)) { + const fields = type2.getFields(); + const fieldDef = { + type: "object", + properties: {}, + required: [] + }; + if (type2.description) { + fieldDef.description = type2.description + "\n" + renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + fieldDef.markdownDescription = type2.description + "\n" + renderTypeToString(type2, true); + } + } else { + fieldDef.description = renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + fieldDef.markdownDescription = renderTypeToString(type2, true); + } + } + for (const fieldName of Object.keys(fields)) { + const field = fields[fieldName]; + const { required: fieldRequired, definition: typeDefinition, definitions: typeDefinitions } = getJSONSchemaFromGraphQLType(field.type, options); + const { definition: fieldDefinition } = getJSONSchemaFromGraphQLType(field, options); + fieldDef.properties[fieldName] = Object.assign(Object.assign({}, typeDefinition), fieldDefinition); + const renderedField = renderTypeToString(field.type); + fieldDef.properties[fieldName].description = field.description ? field.description + "\n" + renderedField : renderedField; + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + const renderedFieldMarkdown = renderTypeToString(field.type, true); + fieldDef.properties[fieldName].markdownDescription = field.description ? field.description + "\n" + renderedFieldMarkdown : renderedFieldMarkdown; + } + if (fieldRequired) { + fieldDef.required.push(fieldName); + } + if (typeDefinitions) { + for (const [defName, value] of Object.entries(typeDefinitions)) { + definitions[defName] = value; + } + } + } + definitions[type2.name] = fieldDef; + } + } + if ("description" in type2 && !isScalarType(type2) && type2.description && !definition.description) { + definition.description = type2.description + "\n" + renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + definition.markdownDescription = type2.description + "\n" + renderTypeToString(type2, true); + } + } else { + definition.description = renderTypeToString(type2); + if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) { + definition.markdownDescription = renderTypeToString(type2, true); + } + } + return { required, definition, definitions }; + } + function getVariablesJSONSchema(variableToType, options) { + var _a3; + const jsonSchema = { + $schema: "https://json-schema.org/draft/2020-12/schema", + type: "object", + properties: {}, + required: [] + }; + const runtimeOptions = Object.assign(Object.assign({}, options), { definitionMarker: new Marker() }); + if (variableToType) { + for (const [variableName, type2] of Object.entries(variableToType)) { + const { definition, required, definitions } = getJSONSchemaFromGraphQLType(type2, runtimeOptions); + jsonSchema.properties[variableName] = definition; + if (required) { + (_a3 = jsonSchema.required) === null || _a3 === void 0 ? void 0 : _a3.push(variableName); + } + if (definitions) { + jsonSchema.definitions = Object.assign(Object.assign({}, jsonSchema === null || jsonSchema === void 0 ? void 0 : jsonSchema.definitions), definitions); + } + } + } + return jsonSchema; + } + + // node_modules/graphql-language-service/esm/utils/Range.js + var Range3 = class { + constructor(start, end) { + this.containsPosition = (position) => { + if (this.start.line === position.line) { + return this.start.character <= position.character; + } + if (this.end.line === position.line) { + return this.end.character >= position.character; + } + return this.start.line <= position.line && this.end.line >= position.line; + }; + this.start = start; + this.end = end; + } + setStart(line, character) { + this.start = new Position3(line, character); + } + setEnd(line, character) { + this.end = new Position3(line, character); + } + }; + var Position3 = class { + constructor(line, character) { + this.lessThanOrEqualTo = (position) => this.line < position.line || this.line === position.line && this.character <= position.character; + this.line = line; + this.character = character; + } + setLine(line) { + this.line = line; + } + setCharacter(character) { + this.character = character; + } + }; + + // node_modules/graphql-language-service/esm/utils/validateWithCustomRules.js + var specifiedSDLRules2 = [ + LoneSchemaDefinitionRule, + UniqueOperationTypesRule, + UniqueTypeNamesRule, + UniqueEnumValueNamesRule, + UniqueFieldDefinitionNamesRule, + UniqueDirectiveNamesRule, + KnownTypeNamesRule, + KnownDirectivesRule, + UniqueDirectivesPerLocationRule, + PossibleTypeExtensionsRule, + UniqueArgumentNamesRule, + UniqueInputFieldNamesRule + ]; + function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, isSchemaDocument) { + const rules = specifiedRules.filter((rule) => { + if (rule === NoUnusedFragmentsRule || rule === ExecutableDefinitionsRule) { + return false; + } + if (isRelayCompatMode && rule === KnownFragmentNamesRule) { + return false; + } + return true; + }); + if (customRules) { + Array.prototype.push.apply(rules, customRules); + } + if (isSchemaDocument) { + Array.prototype.push.apply(rules, specifiedSDLRules2); + } + const errors = validate(schema, ast, rules); + return errors.filter((error) => { + if (error.message.includes("Unknown directive") && error.nodes) { + const node = error.nodes[0]; + if (node && node.kind === Kind.DIRECTIVE) { + const name2 = node.name.value; + if (name2 === "arguments" || name2 === "argumentDefinitions") { + return false; + } + } + } + return true; + }); + } + + // node_modules/graphql-language-service/esm/utils/collectVariables.js + function collectVariables(schema, documentAST) { + const variableToType = /* @__PURE__ */ Object.create(null); + for (const definition of documentAST.definitions) { + if (definition.kind === "OperationDefinition") { + const { variableDefinitions } = definition; + if (variableDefinitions) { + for (const { variable, type: type2 } of variableDefinitions) { + const inputType = typeFromAST(schema, type2); + if (inputType) { + variableToType[variable.name.value] = inputType; + } else if (type2.kind === Kind.NAMED_TYPE && type2.name.value === "Float") { + variableToType[variable.name.value] = GraphQLFloat; + } + } + } + } + } + return variableToType; + } + + // node_modules/graphql-language-service/esm/utils/getOperationFacts.js + function getOperationASTFacts(documentAST, schema) { + const variableToType = schema ? collectVariables(schema, documentAST) : void 0; + const operations = []; + visit(documentAST, { + OperationDefinition(node) { + operations.push(node); + } + }); + return { variableToType, operations }; + } + + // node_modules/graphql-language-service/esm/interface/getDiagnostics.js + var SEVERITY = { + Error: "Error", + Warning: "Warning", + Information: "Information", + Hint: "Hint" + }; + var DIAGNOSTIC_SEVERITY = { + [SEVERITY.Error]: 1, + [SEVERITY.Warning]: 2, + [SEVERITY.Information]: 3, + [SEVERITY.Hint]: 4 + }; + var invariant2 = (condition, message) => { + if (!condition) { + throw new Error(message); + } + }; + function getDiagnostics(query, schema = null, customRules, isRelayCompatMode, externalFragments) { + var _a3, _b; + let ast = null; + let fragments = ""; + if (externalFragments) { + fragments = typeof externalFragments === "string" ? externalFragments : externalFragments.reduce((acc, node) => acc + print(node) + "\n\n", ""); + } + const enhancedQuery = fragments ? `${query} + +${fragments}` : query; + try { + ast = parse2(enhancedQuery); + } catch (error) { + if (error instanceof GraphQLError) { + const range = getRange((_b = (_a3 = error.locations) === null || _a3 === void 0 ? void 0 : _a3[0]) !== null && _b !== void 0 ? _b : { line: 0, column: 0 }, enhancedQuery); + return [ + { + severity: DIAGNOSTIC_SEVERITY.Error, + message: error.message, + source: "GraphQL: Syntax", + range + } + ]; + } + throw error; + } + return validateQuery(ast, schema, customRules, isRelayCompatMode); + } + function validateQuery(ast, schema = null, customRules, isRelayCompatMode) { + if (!schema) { + return []; + } + const validationErrorAnnotations = validateWithCustomRules(schema, ast, customRules, isRelayCompatMode).flatMap((error) => annotations(error, DIAGNOSTIC_SEVERITY.Error, "Validation")); + const deprecationWarningAnnotations = validate(schema, ast, [ + NoDeprecatedCustomRule + ]).flatMap((error) => annotations(error, DIAGNOSTIC_SEVERITY.Warning, "Deprecation")); + return validationErrorAnnotations.concat(deprecationWarningAnnotations); + } + function annotations(error, severity, type2) { + if (!error.nodes) { + return []; + } + const highlightedNodes = []; + for (const [i, node] of error.nodes.entries()) { + const highlightNode = node.kind !== "Variable" && "name" in node && node.name !== void 0 ? node.name : "variable" in node && node.variable !== void 0 ? node.variable : node; + if (highlightNode) { + invariant2(error.locations, "GraphQL validation error requires locations."); + const loc = error.locations[i]; + const highlightLoc = getLocation2(highlightNode); + const end = loc.column + (highlightLoc.end - highlightLoc.start); + highlightedNodes.push({ + source: `GraphQL: ${type2}`, + message: error.message, + severity, + range: new Range3(new Position3(loc.line - 1, loc.column - 1), new Position3(loc.line - 1, end)) + }); + } + } + return highlightedNodes; + } + function getRange(location, queryText) { + const parser = onlineParser(); + const state = parser.startState(); + const lines = queryText.split("\n"); + invariant2(lines.length >= location.line, "Query text must have more lines than where the error happened"); + let stream = null; + for (let i = 0; i < location.line; i++) { + stream = new CharacterStream(lines[i]); + while (!stream.eol()) { + const style = parser.token(stream, state); + if (style === "invalidchar") { + break; + } + } + } + invariant2(stream, "Expected Parser stream to be available."); + const line = location.line - 1; + const start = stream.getStartOfToken(); + const end = stream.getCurrentPosition(); + return new Range3(new Position3(line, start), new Position3(line, end)); + } + function getLocation2(node) { + const typeCastedNode = node; + const location = typeCastedNode.loc; + invariant2(location, "Expected ASTNode to have a location."); + return location; + } + + // node_modules/graphql-language-service/esm/interface/getOutline.js + var { INLINE_FRAGMENT } = Kind; + + // node_modules/graphql-language-service/esm/interface/getHoverInformation.js + function getHoverInformation(schema, queryText, cursor, contextToken, config) { + const token = contextToken || getTokenAtPosition(queryText, cursor); + if (!schema || !token || !token.state) { + return ""; + } + const { kind, step } = token.state; + const typeInfo = getTypeInfo(schema, token.state); + const options = Object.assign(Object.assign({}, config), { schema }); + if (kind === "Field" && step === 0 && typeInfo.fieldDef || kind === "AliasedField" && step === 2 && typeInfo.fieldDef) { + const into = []; + renderMdCodeStart(into, options); + renderField(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.fieldDef); + return into.join("").trim(); + } + if (kind === "Directive" && step === 1 && typeInfo.directiveDef) { + const into = []; + renderMdCodeStart(into, options); + renderDirective(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.directiveDef); + return into.join("").trim(); + } + if (kind === "Argument" && step === 0 && typeInfo.argDef) { + const into = []; + renderMdCodeStart(into, options); + renderArg(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.argDef); + return into.join("").trim(); + } + if (kind === "EnumValue" && typeInfo.enumValue && "description" in typeInfo.enumValue) { + const into = []; + renderMdCodeStart(into, options); + renderEnumValue(into, typeInfo, options); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.enumValue); + return into.join("").trim(); + } + if (kind === "NamedType" && typeInfo.type && "description" in typeInfo.type) { + const into = []; + renderMdCodeStart(into, options); + renderType2(into, typeInfo, options, typeInfo.type); + renderMdCodeEnd(into, options); + renderDescription(into, options, typeInfo.type); + return into.join("").trim(); + } + return ""; + } + function renderMdCodeStart(into, options) { + if (options.useMarkdown) { + text2(into, "```graphql\n"); + } + } + function renderMdCodeEnd(into, options) { + if (options.useMarkdown) { + text2(into, "\n```"); + } + } + function renderField(into, typeInfo, options) { + renderQualifiedField(into, typeInfo, options); + renderTypeAnnotation(into, typeInfo, options, typeInfo.type); + } + function renderQualifiedField(into, typeInfo, options) { + if (!typeInfo.fieldDef) { + return; + } + const fieldName = typeInfo.fieldDef.name; + if (fieldName.slice(0, 2) !== "__") { + renderType2(into, typeInfo, options, typeInfo.parentType); + text2(into, "."); + } + text2(into, fieldName); + } + function renderDirective(into, typeInfo, _options) { + if (!typeInfo.directiveDef) { + return; + } + const name2 = "@" + typeInfo.directiveDef.name; + text2(into, name2); + } + function renderArg(into, typeInfo, options) { + if (typeInfo.directiveDef) { + renderDirective(into, typeInfo, options); + } else if (typeInfo.fieldDef) { + renderQualifiedField(into, typeInfo, options); + } + if (!typeInfo.argDef) { + return; + } + const { name: name2 } = typeInfo.argDef; + text2(into, "("); + text2(into, name2); + renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType); + text2(into, ")"); + } + function renderTypeAnnotation(into, typeInfo, options, t2) { + text2(into, ": "); + renderType2(into, typeInfo, options, t2); + } + function renderEnumValue(into, typeInfo, options) { + if (!typeInfo.enumValue) { + return; + } + const { name: name2 } = typeInfo.enumValue; + renderType2(into, typeInfo, options, typeInfo.inputType); + text2(into, "."); + text2(into, name2); + } + function renderType2(into, typeInfo, options, t2) { + if (!t2) { + return; + } + if (t2 instanceof GraphQLNonNull) { + renderType2(into, typeInfo, options, t2.ofType); + text2(into, "!"); + } else if (t2 instanceof GraphQLList) { + text2(into, "["); + renderType2(into, typeInfo, options, t2.ofType); + text2(into, "]"); + } else { + text2(into, t2.name); + } + } + function renderDescription(into, options, def) { + if (!def) { + return; + } + const description = typeof def.description === "string" ? def.description : null; + if (description) { + text2(into, "\n\n"); + text2(into, description); + } + renderDeprecation(into, options, def); + } + function renderDeprecation(into, _options, def) { + if (!def) { + return; + } + const reason = def.deprecationReason || null; + if (!reason) { + return; + } + text2(into, "\n\n"); + text2(into, "Deprecated: "); + text2(into, reason); + } + function text2(into, content) { + into.push(content); + } + + // node_modules/monaco-graphql/esm/LanguageService.js + var import_picomatch_browser = __toESM(require_picomatch_browser()); + + // node_modules/monaco-graphql/esm/schemaLoader.js + var defaultSchemaLoader = (schemaConfig, parser) => { + const { schema, documentAST, introspectionJSON, introspectionJSONString, buildSchemaOptions, documentString } = schemaConfig; + if (schema) { + return schema; + } + if (introspectionJSONString) { + const introspectionJSONResult = JSON.parse(introspectionJSONString); + return buildClientSchema(introspectionJSONResult, buildSchemaOptions); + } + if (documentString && parser) { + const docAST = parser(documentString); + return buildASTSchema(docAST, buildSchemaOptions); + } + if (introspectionJSON) { + return buildClientSchema(introspectionJSON, buildSchemaOptions); + } + if (documentAST) { + return buildASTSchema(documentAST, buildSchemaOptions); + } + throw new Error("no schema supplied"); + }; + + // node_modules/monaco-graphql/esm/LanguageService.js + var schemaCache = /* @__PURE__ */ new Map(); + var LanguageService = class { + _parser = parse2; + _schemas = []; + _schemaCache = schemaCache; + _schemaLoader = defaultSchemaLoader; + _parseOptions = void 0; + _customValidationRules = void 0; + _externalFragmentDefinitionNodes = null; + _externalFragmentDefinitionsString = null; + _fillLeafsOnComplete = false; + constructor({ parser, schemas, parseOptions, externalFragmentDefinitions, customValidationRules, fillLeafsOnComplete }) { + this._schemaLoader = defaultSchemaLoader; + if (schemas) { + this._schemas = schemas; + this._cacheSchemas(); + } + if (parser) { + this._parser = parser; + } + this._fillLeafsOnComplete = fillLeafsOnComplete; + if (parseOptions) { + this._parseOptions = parseOptions; + } + if (customValidationRules) { + this._customValidationRules = customValidationRules; + } + if (externalFragmentDefinitions) { + if (Array.isArray(externalFragmentDefinitions)) { + this._externalFragmentDefinitionNodes = externalFragmentDefinitions; + } else { + this._externalFragmentDefinitionsString = externalFragmentDefinitions; + } + } + } + _cacheSchemas() { + for (const schema of this._schemas) { + this._cacheSchema(schema); + } + } + _cacheSchema(schemaConfig) { + const schema = this._schemaLoader(schemaConfig, this.parse.bind(this)); + return this._schemaCache.set(schemaConfig.uri, { + ...schemaConfig, + schema + }); + } + getSchemaForFile(uri) { + if (!this._schemas?.length) { + return; + } + if (this._schemas.length === 1) { + return this._schemaCache.get(this._schemas[0].uri); + } + const schema = this._schemas.find((schemaConfig) => { + if (!schemaConfig.fileMatch) { + return false; + } + return schemaConfig.fileMatch.some((glob) => { + const isMatch = (0, import_picomatch_browser.default)(glob); + return isMatch(uri); + }); + }); + if (schema) { + const cacheEntry = this._schemaCache.get(schema.uri); + if (cacheEntry) { + return cacheEntry; + } + const cache = this._cacheSchema(schema); + return cache.get(schema.uri); + } + } + getExternalFragmentDefinitions() { + if (!this._externalFragmentDefinitionNodes && this._externalFragmentDefinitionsString) { + const definitionNodes = []; + try { + visit(this._parser(this._externalFragmentDefinitionsString), { + FragmentDefinition(node) { + definitionNodes.push(node); + } + }); + } catch { + throw new Error(`Failed parsing externalFragmentDefinitions string: +${this._externalFragmentDefinitionsString}`); + } + this._externalFragmentDefinitionNodes = definitionNodes; + } + return this._externalFragmentDefinitionNodes; + } + async updateSchemas(schemas) { + this._schemas = schemas; + this._cacheSchemas(); + } + updateSchema(schema) { + const schemaIndex = this._schemas.findIndex((c) => c.uri === schema.uri); + if (schemaIndex < 0) { + console.warn("updateSchema could not find a schema in your config by that URI", schema.uri); + return; + } + this._schemas[schemaIndex] = schema; + this._cacheSchema(schema); + } + addSchema(schema) { + this._schemas.push(schema); + this._cacheSchema(schema); + } + parse(text3, options) { + return this._parser(text3, options || this._parseOptions); + } + getCompletion = (uri, documentText, position) => { + const schema = this.getSchemaForFile(uri); + if (!documentText || documentText.length < 1 || !schema?.schema) { + return []; + } + return getAutocompleteSuggestions(schema.schema, documentText, position, void 0, this.getExternalFragmentDefinitions(), { uri, fillLeafsOnComplete: this._fillLeafsOnComplete }); + }; + getDiagnostics = (uri, documentText, customRules) => { + const schema = this.getSchemaForFile(uri); + if (!documentText || documentText.trim().length < 2 || !schema?.schema) { + return []; + } + return getDiagnostics(documentText, schema.schema, customRules ?? this._customValidationRules, false, this.getExternalFragmentDefinitions()); + }; + getHover = (uri, documentText, position, options) => { + const schema = this.getSchemaForFile(uri); + if (schema && documentText?.length > 3) { + return getHoverInformation(schema.schema, documentText, position, void 0, { + useMarkdown: true, + ...options + }); + } + }; + getVariablesJSONSchema = (uri, documentText, options) => { + const schema = this.getSchemaForFile(uri); + if (schema && documentText.length > 3) { + try { + const documentAST = this.parse(documentText); + const operationFacts = getOperationASTFacts(documentAST, schema.schema); + if (operationFacts?.variableToType) { + return getVariablesJSONSchema(operationFacts.variableToType, options); + } + } catch { + } + } + return null; + }; + }; + + // node_modules/monaco-graphql/esm/utils.js + function toMonacoRange(range) { + return { + startLineNumber: range.start.line + 1, + startColumn: range.start.character + 1, + endLineNumber: range.end.line + 1, + endColumn: range.end.character + 1 + }; + } + function toGraphQLPosition(position) { + return new Position3(position.lineNumber - 1, position.column - 1); + } + function toCompletion(entry, range) { + const results = { + label: entry.label, + insertText: entry.insertText, + insertTextFormat: entry.insertTextFormat, + sortText: entry.sortText, + filterText: entry.filterText, + documentation: entry.documentation, + detail: entry.detail, + range: range ? toMonacoRange(range) : void 0, + kind: entry.kind + }; + if (entry.insertTextFormat) { + results.insertTextFormat = entry.insertTextFormat; + } + if (entry.command) { + results.command = { ...entry.command, id: entry.command.command }; + } + return results; + } + function toMarkerData(diagnostic) { + return { + startLineNumber: diagnostic.range.start.line + 1, + endLineNumber: diagnostic.range.end.line + 1, + startColumn: diagnostic.range.start.character + 1, + endColumn: diagnostic.range.end.character, + message: diagnostic.message, + severity: 5, + code: diagnostic.code || void 0 + }; + } + + // node_modules/monaco-graphql/esm/GraphQLWorker.js + var GraphQLWorker = class { + _ctx; + _languageService; + _formattingOptions; + constructor(ctx, createData) { + this._ctx = ctx; + this._languageService = new LanguageService(createData.languageConfig); + this._formattingOptions = createData.formattingOptions; + } + async doValidation(uri) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return []; + } + const graphqlDiagnostics = this._languageService.getDiagnostics(uri, document2); + return graphqlDiagnostics.map(toMarkerData); + } catch (err) { + console.error(err); + return []; + } + } + async doComplete(uri, position) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return []; + } + const graphQLPosition = toGraphQLPosition(position); + const suggestions = this._languageService.getCompletion(uri, document2, graphQLPosition); + return suggestions.map((suggestion) => toCompletion(suggestion)); + } catch (err) { + console.error(err); + return []; + } + } + async doHover(uri, position) { + try { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!document2) { + return null; + } + const graphQLPosition = toGraphQLPosition(position); + const hover = this._languageService.getHover(uri, document2, graphQLPosition); + return { + content: hover, + range: toMonacoRange(getRange({ + column: graphQLPosition.character, + line: graphQLPosition.line + }, document2)) + }; + } catch (err) { + console.error(err); + return null; + } + } + async doGetVariablesJSONSchema(uri) { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!documentModel || !document2) { + return null; + } + const jsonSchema = this._languageService.getVariablesJSONSchema(uri, document2, { useMarkdownDescription: true }); + if (jsonSchema) { + jsonSchema.$id = "monaco://variables-schema.json"; + jsonSchema.title = "GraphQL Variables"; + return jsonSchema; + } + return null; + } + async doFormat(uri) { + const documentModel = this._getTextModel(uri); + const document2 = documentModel?.getValue(); + if (!documentModel || !document2) { + return null; + } + const prettierStandalone = await Promise.resolve().then(() => __toESM(require_standalone())); + const prettierGraphqlParser = await Promise.resolve().then(() => __toESM(require_parser_graphql())); + return prettierStandalone.format(document2, { + parser: "graphql", + plugins: [prettierGraphqlParser], + ...this._formattingOptions?.prettierConfig + }); + } + _getTextModel(uri) { + const models = this._ctx.getMirrorModels(); + for (const model of models) { + if (model.uri.toString() === uri) { + return model; + } + } + return null; + } + doUpdateSchema(schema) { + return this._languageService.updateSchema(schema); + } + doUpdateSchemas(schemas) { + return this._languageService.updateSchemas(schemas); + } + }; + + // node_modules/monaco-graphql/esm/graphql.worker.js + self.onmessage = () => { + initialize((ctx, createData) => new GraphQLWorker(ctx, createData)); + }; +})(); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 2686481d19..bdd77acb3d 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -10,6 +10,18 @@ "license": "AGPL-3.0", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", + "@codingame/monaco-vscode-accessibility-service-override": "1.82.3", + "@codingame/monaco-vscode-configuration-service-override": "1.82.3", + "@codingame/monaco-vscode-editor-service-override": "1.82.3", + "@codingame/monaco-vscode-json-default-extension": "1.82.3", + "@codingame/monaco-vscode-keybindings-service-override": "1.82.3", + "@codingame/monaco-vscode-languages-service-override": "1.82.3", + "@codingame/monaco-vscode-model-service-override": "1.82.3", + "@codingame/monaco-vscode-python-default-extension": "1.82.3", + "@codingame/monaco-vscode-textmate-service-override": "1.82.3", + "@codingame/monaco-vscode-theme-defaults-default-extension": "1.82.3", + "@codingame/monaco-vscode-theme-service-override": "1.82.3", + "@codingame/monaco-vscode-views-service-override": "1.82.3", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", "@leeoniya/ufuzzy": "^1.0.8", @@ -34,7 +46,7 @@ "lodash": "^4.17.21", "lucide-svelte": "^0.277.0", "monaco-graphql": "^1.3.0", - "monaco-languageclient": "~6.0.3", + "monaco-languageclient": "^6.5.1", "openai": "^4.3.0", "quill": "^1.3.7", "svelte-autosize": "^1.0.1", @@ -53,6 +65,7 @@ "yjs": "^13.6.7" }, "devDependencies": { + "@codingame/monaco-vscode-api": "1.82.3", "@floating-ui/core": "^1.3.1", "@playwright/test": "^1.34.3", "@rgossiaux/svelte-headlessui": "^2.0.0", @@ -65,7 +78,6 @@ "@types/d3-zoom": "^3.0.3", "@types/lodash": "^4.14.195", "@types/node": "^20.3.3", - "@types/vscode": "~1.78.1", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.60.0", "@zerodevx/svelte-toast": "^0.9.5", @@ -75,10 +87,9 @@ "eslint": "^8.47.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte": "^2.33.1", - "monaco-editor-workers": "~0.39.1", + "monaco-editor-workers": "~0.43.0", "ol": "^7.4.0", "openapi-typescript-codegen": "^0.25.0", - "path-browserify": "^1.0.1", "pdfjs-dist": "^3.8.162", "postcss": "^8.4.24", "postcss-load-config": "^4.0.1", @@ -103,7 +114,7 @@ "tailwindcss": "^3.3.2", "tslib": "^2.6.1", "typescript": "^5.1.3", - "vite": "^4.4.9", + "vite": "^4.4.11", "vite-plugin-monaco-editor": "^1.1.0", "yootils": "^0.3.1" }, @@ -342,6 +353,125 @@ "node": ">=6.9.0" } }, + "node_modules/@codingame/monaco-vscode-accessibility-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-accessibility-service-override/-/monaco-vscode-accessibility-service-override-1.82.3.tgz", + "integrity": "sha512-+8ZQ6RLVye3jRXXGLFL6QAr7kiMrGp484y19ybwEXArXV473kHRhtLkDwoq6Kx8zx6+veA2KxRWFUKggqwBtDA==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-api": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.82.3.tgz", + "integrity": "sha512-3Z4GQ1A9nnZX1MRiMn1U5jXF1YKqmvHnLsW2zKaeEjS7bW7ZU8yyeOAX5J+KbLiMobTaPlzvZ1h6tuQkWGYMWA==", + "dev": true, + "dependencies": { + "monaco-editor": "0.43.0" + }, + "bin": { + "monaco-treemending": "monaco-treemending.js" + } + }, + "node_modules/@codingame/monaco-vscode-configuration-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-configuration-service-override/-/monaco-vscode-configuration-service-override-1.82.3.tgz", + "integrity": "sha512-/0sY5HRmbHHOpfWd+kuUO0q2/1VGLU+rkJUhMbYHvZ80CxU4TXEO+saLhJzOglmkah7O6Ov/JqH/9iJpzPlAEw==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-editor-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-service-override/-/monaco-vscode-editor-service-override-1.82.3.tgz", + "integrity": "sha512-61c0t2wExtE+wgP01N5K9AAWC+bNXafiO5JffhcnC/0nJJtgf+YDYMLuYThFKT6GnIKcXt/cqYoc8Ev0vMzDrw==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-json-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-json-default-extension/-/monaco-vscode-json-default-extension-1.82.3.tgz", + "integrity": "sha512-NPpRExvMJCGToLw2BSu3fr6Ch2sUfNVNE97WxKCktJ6nzSx/HTd3GlgZ5HXVNXldlZMyLPNw8rxiSr3CYpyLrQ==", + "dependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-keybindings-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-keybindings-service-override/-/monaco-vscode-keybindings-service-override-1.82.3.tgz", + "integrity": "sha512-ATnAbwsIzIn/+8kDEEo0EF/Oe728RhHjHv69FiE1EqoNRpGVm+AxaLkH2qBM7MOW2EP+2V+e8n6kOrEHG0dtNQ==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-languages-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-languages-service-override/-/monaco-vscode-languages-service-override-1.82.3.tgz", + "integrity": "sha512-iw5lb6f9ZY2jo0T6hwKeYKwOzU+ARcsTU5iDWkHnVYoaUfogSDfBBWOV/K1CmFBoNwSbvbMIv3lm0DE93/wKVw==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-model-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-model-service-override/-/monaco-vscode-model-service-override-1.82.3.tgz", + "integrity": "sha512-PJ+8Yv3cT4Re2jbaPtBuKxY5JQnkorAsJO9nqPOfw6qN7l4F/2t5wP9oLJDrPimzRerfauYwLBlQZ4hLmXIZaw==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-python-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-python-default-extension/-/monaco-vscode-python-default-extension-1.82.3.tgz", + "integrity": "sha512-xsCGecMr7haUfmtiXILu7tfOWXveI734ym3NamylspsJtBlUUH15uVrG5Z4qBNIKKOA4Tifoqc2htZPuvUGeRw==", + "dependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-textmate-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-textmate-service-override/-/monaco-vscode-textmate-service-override-1.82.3.tgz", + "integrity": "sha512-gACR+uBvJo7er/fhNL5tj2zKbkYulMigWYaZ9y20xHmvfuq3AZa/rRujppKESyvZtfV7p0st7Gsi3v+ZjvFiQg==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3", + "vscode-oniguruma": "^2.0.0", + "vscode-textmate": "^9.0.0" + } + }, + "node_modules/@codingame/monaco-vscode-theme-defaults-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-defaults-default-extension/-/monaco-vscode-theme-defaults-default-extension-1.82.3.tgz", + "integrity": "sha512-+Bp2A1JadE4Tr3lipfHFZKQOM1W56/AKzQCZYhY23wLczZvXH0WO+W3irOMnRop+ZbFTh4fWk1OCA5X8uL9j2A==", + "dependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-theme-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-service-override/-/monaco-vscode-theme-service-override-1.82.3.tgz", + "integrity": "sha512-S2pfYXW6s20lab4XKiLYnHD6qEM25HsVpEyJAGuY/vf4ze+37buFUZ/XtJdpNbOdU7Lmu9SMhZ8+yLEqalPcAQ==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "node_modules/@codingame/monaco-vscode-views-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-views-service-override/-/monaco-vscode-views-service-override-1.82.3.tgz", + "integrity": "sha512-pNN6c35OFiQTwMqVI0ZAXEF2EjO19IIQ3bJPwmyCqxgrXdN940fFpQnLGnfjfJJBMKn8Ae6BYd8WtFxe9pEeiQ==", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, "node_modules/@csstools/css-parser-algorithms": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.1.tgz", @@ -1661,12 +1791,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, - "node_modules/@types/vscode": { - "version": "1.78.1", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.78.1.tgz", - "integrity": "sha512-wEA+54axejHu7DhcUfnFBan1IqFD1gBDxAFz8LoX06NbNDMRJv/T6OGthOs52yZccasKfN588EyffHWABkR0fg==", - "dev": true - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.59.8", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz", @@ -2454,6 +2578,7 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, "engines": { "node": "*" } @@ -4055,15 +4180,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "peer": true, - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -6425,28 +6541,22 @@ } }, "node_modules/monaco-editor": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.37.1.tgz", - "integrity": "sha512-jLXEEYSbqMkT/FuJLBZAVWGuhIb4JNwHE9kPTorAVmsdZ4UzHAfgWxLsVtD7pLRFaOwYPhNG9nUCpmFL1t/dIg==" + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.43.0.tgz", + "integrity": "sha512-cnoqwQi/9fml2Szamv1XbSJieGJ1Dc8tENVMD26Kcfl7xGQWp7OBKMjlwKVGYFJ3/AXJjSOGvcqK7Ry/j9BM1Q==" }, "node_modules/monaco-editor-workers": { - "version": "0.39.1", - "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.39.1.tgz", - "integrity": "sha512-QSP2ZCarlYaHGIZqzcz2BtI1mKstwJo4YfYu9m7ZwhkRd8HJEHpclKgE51AXtrncRch5zc05pHk4cQrFEdYsBQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.43.0.tgz", + "integrity": "sha512-qO9b6uzXXS57lv5VodYr2jhuxd9resG38WBmc72thp+222kcJPg9eChMMJTXZbfDIPHYkBQNR0+zPrbIdVtU+w==", "dev": true, "dependencies": { - "monaco-editor": "~0.39.0" + "monaco-editor": "~0.43.0" }, "peerDependencies": { - "monaco-editor": "~0.39.0" + "monaco-editor": "~0.43.0" } }, - "node_modules/monaco-editor-workers/node_modules/monaco-editor": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.39.0.tgz", - "integrity": "sha512-zhbZ2Nx93tLR8aJmL2zI1mhJpsl87HMebNBM6R8z4pLfs8pj604pIVIVwyF1TivcfNtIPpMXL+nb3DsBmE/x6Q==", - "dev": true - }, "node_modules/monaco-graphql": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/monaco-graphql/-/monaco-graphql-1.3.0.tgz", @@ -6462,13 +6572,15 @@ } }, "node_modules/monaco-languageclient": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-6.0.3.tgz", - "integrity": "sha512-jxkmzazfp0boGiTMjbMGpfCRjUQc5DKbpN+zsHg5GBdHMcrB7FVl1NiN9yZ/JABVTAv4yxN4qwhJuzmUoSiQ4w==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-6.5.1.tgz", + "integrity": "sha512-p3+PEucYjD0hrJ2VeRIrnt2FcOeWSZmMTjFQICo5Lmkzc9DNCIjQQCDx99wZqQpvdp7KNrxAnljiYQzHkdoBGA==", "hasInstallScript": true, "dependencies": { - "monaco-editor": "~0.37.1", - "vscode": "npm:@codingame/monaco-vscode-api@~1.78.8", + "@codingame/monaco-vscode-languages-service-override": "~1.82.3", + "@codingame/monaco-vscode-model-service-override": "~1.82.3", + "monaco-editor": "~0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@>=1.82.3 <1.83.0", "vscode-jsonrpc": "~8.1.0", "vscode-languageclient": "~8.1.0" }, @@ -6477,8 +6589,8 @@ "npm": ">=9.0.0" }, "peerDependencies": { - "monaco-editor": "~0.37.1", - "vscode": "npm:@codingame/monaco-vscode-api@~1.78.8" + "monaco-editor": "~0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@>=1.82.3 <1.83.0" }, "peerDependenciesMeta": { "monaco-editor": { @@ -6937,12 +7049,6 @@ "tslib": "^2.0.3" } }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7021,12 +7127,6 @@ "path2d-polyfill": "^2.0.1" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "peer": true - }, "node_modules/periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -9731,9 +9831,9 @@ } }, "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", + "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", "dev": true, "dependencies": { "esbuild": "^0.18.10", @@ -9810,17 +9910,14 @@ }, "node_modules/vscode": { "name": "@codingame/monaco-vscode-api", - "version": "1.78.8", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.78.8.tgz", - "integrity": "sha512-MfiZy/UCEAzpTeFg3TTsA2sgvjHb1X/cuwr7QNZJtYbvJ7X68EOPBXHhr6Kygm3eEKR73ZRkmfK/xX4d9hytTw==", + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.82.3.tgz", + "integrity": "sha512-3Z4GQ1A9nnZX1MRiMn1U5jXF1YKqmvHnLsW2zKaeEjS7bW7ZU8yyeOAX5J+KbLiMobTaPlzvZ1h6tuQkWGYMWA==", + "dependencies": { + "monaco-editor": "0.43.0" + }, "bin": { "monaco-treemending": "monaco-treemending.js" - }, - "peerDependencies": { - "monaco-editor": "0.37.1", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^9.0.0", - "yauzl": "^2.10.0" } }, "node_modules/vscode-jsonrpc": { @@ -9878,16 +9975,14 @@ "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" }, "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "peer": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-2.0.1.tgz", + "integrity": "sha512-poJU8iHIWnC3vgphJnrLZyI3YdqRlR27xzqDmpPXYzA93R4Gk8z7T6oqDzDoHjoikA2aS82crdXFkjELCdJsjQ==" }, "node_modules/vscode-textmate": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-9.0.0.tgz", - "integrity": "sha512-Cl65diFGxz7gpwbav10HqiY/eVYTO1sjQpmRmV991Bj7wAoOAjGQ97PpQcXorDE2Uc4hnGWLY17xme+5t6MlSg==", - "peer": true + "integrity": "sha512-Cl65diFGxz7gpwbav10HqiY/eVYTO1sjQpmRmV991Bj7wAoOAjGQ97PpQcXorDE2Uc4hnGWLY17xme+5t6MlSg==" }, "node_modules/vscode-ws-jsonrpc": { "version": "3.0.0", @@ -10112,16 +10207,6 @@ "node": ">=10" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "peer": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "node_modules/yjs": { "version": "13.6.7", "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.7.tgz", @@ -10352,6 +10437,122 @@ "regenerator-runtime": "^0.13.11" } }, + "@codingame/monaco-vscode-accessibility-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-accessibility-service-override/-/monaco-vscode-accessibility-service-override-1.82.3.tgz", + "integrity": "sha512-+8ZQ6RLVye3jRXXGLFL6QAr7kiMrGp484y19ybwEXArXV473kHRhtLkDwoq6Kx8zx6+veA2KxRWFUKggqwBtDA==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-api": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.82.3.tgz", + "integrity": "sha512-3Z4GQ1A9nnZX1MRiMn1U5jXF1YKqmvHnLsW2zKaeEjS7bW7ZU8yyeOAX5J+KbLiMobTaPlzvZ1h6tuQkWGYMWA==", + "dev": true, + "requires": { + "monaco-editor": "0.43.0" + } + }, + "@codingame/monaco-vscode-configuration-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-configuration-service-override/-/monaco-vscode-configuration-service-override-1.82.3.tgz", + "integrity": "sha512-/0sY5HRmbHHOpfWd+kuUO0q2/1VGLU+rkJUhMbYHvZ80CxU4TXEO+saLhJzOglmkah7O6Ov/JqH/9iJpzPlAEw==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-editor-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-service-override/-/monaco-vscode-editor-service-override-1.82.3.tgz", + "integrity": "sha512-61c0t2wExtE+wgP01N5K9AAWC+bNXafiO5JffhcnC/0nJJtgf+YDYMLuYThFKT6GnIKcXt/cqYoc8Ev0vMzDrw==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-json-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-json-default-extension/-/monaco-vscode-json-default-extension-1.82.3.tgz", + "integrity": "sha512-NPpRExvMJCGToLw2BSu3fr6Ch2sUfNVNE97WxKCktJ6nzSx/HTd3GlgZ5HXVNXldlZMyLPNw8rxiSr3CYpyLrQ==", + "requires": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-keybindings-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-keybindings-service-override/-/monaco-vscode-keybindings-service-override-1.82.3.tgz", + "integrity": "sha512-ATnAbwsIzIn/+8kDEEo0EF/Oe728RhHjHv69FiE1EqoNRpGVm+AxaLkH2qBM7MOW2EP+2V+e8n6kOrEHG0dtNQ==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-languages-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-languages-service-override/-/monaco-vscode-languages-service-override-1.82.3.tgz", + "integrity": "sha512-iw5lb6f9ZY2jo0T6hwKeYKwOzU+ARcsTU5iDWkHnVYoaUfogSDfBBWOV/K1CmFBoNwSbvbMIv3lm0DE93/wKVw==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-model-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-model-service-override/-/monaco-vscode-model-service-override-1.82.3.tgz", + "integrity": "sha512-PJ+8Yv3cT4Re2jbaPtBuKxY5JQnkorAsJO9nqPOfw6qN7l4F/2t5wP9oLJDrPimzRerfauYwLBlQZ4hLmXIZaw==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-python-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-python-default-extension/-/monaco-vscode-python-default-extension-1.82.3.tgz", + "integrity": "sha512-xsCGecMr7haUfmtiXILu7tfOWXveI734ym3NamylspsJtBlUUH15uVrG5Z4qBNIKKOA4Tifoqc2htZPuvUGeRw==", + "requires": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-textmate-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-textmate-service-override/-/monaco-vscode-textmate-service-override-1.82.3.tgz", + "integrity": "sha512-gACR+uBvJo7er/fhNL5tj2zKbkYulMigWYaZ9y20xHmvfuq3AZa/rRujppKESyvZtfV7p0st7Gsi3v+ZjvFiQg==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3", + "vscode-oniguruma": "^2.0.0", + "vscode-textmate": "^9.0.0" + } + }, + "@codingame/monaco-vscode-theme-defaults-default-extension": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-defaults-default-extension/-/monaco-vscode-theme-defaults-default-extension-1.82.3.tgz", + "integrity": "sha512-+Bp2A1JadE4Tr3lipfHFZKQOM1W56/AKzQCZYhY23wLczZvXH0WO+W3irOMnRop+ZbFTh4fWk1OCA5X8uL9j2A==", + "requires": { + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-theme-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-service-override/-/monaco-vscode-theme-service-override-1.82.3.tgz", + "integrity": "sha512-S2pfYXW6s20lab4XKiLYnHD6qEM25HsVpEyJAGuY/vf4ze+37buFUZ/XtJdpNbOdU7Lmu9SMhZ8+yLEqalPcAQ==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, + "@codingame/monaco-vscode-views-service-override": { + "version": "1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-views-service-override/-/monaco-vscode-views-service-override-1.82.3.tgz", + "integrity": "sha512-pNN6c35OFiQTwMqVI0ZAXEF2EjO19IIQ3bJPwmyCqxgrXdN940fFpQnLGnfjfJJBMKn8Ae6BYd8WtFxe9pEeiQ==", + "requires": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@1.82.3" + } + }, "@csstools/css-parser-algorithms": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.1.tgz", @@ -11278,12 +11479,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, - "@types/vscode": { - "version": "1.78.1", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.78.1.tgz", - "integrity": "sha512-wEA+54axejHu7DhcUfnFBan1IqFD1gBDxAFz8LoX06NbNDMRJv/T6OGthOs52yZccasKfN588EyffHWABkR0fg==", - "dev": true - }, "@typescript-eslint/eslint-plugin": { "version": "5.59.8", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz", @@ -11783,7 +11978,8 @@ "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true }, "busboy": { "version": "1.6.0", @@ -12948,15 +13144,6 @@ "reusify": "^1.0.4" } }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "peer": true, - "requires": { - "pend": "~1.2.0" - } - }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -14604,25 +14791,17 @@ } }, "monaco-editor": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.37.1.tgz", - "integrity": "sha512-jLXEEYSbqMkT/FuJLBZAVWGuhIb4JNwHE9kPTorAVmsdZ4UzHAfgWxLsVtD7pLRFaOwYPhNG9nUCpmFL1t/dIg==" + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.43.0.tgz", + "integrity": "sha512-cnoqwQi/9fml2Szamv1XbSJieGJ1Dc8tENVMD26Kcfl7xGQWp7OBKMjlwKVGYFJ3/AXJjSOGvcqK7Ry/j9BM1Q==" }, "monaco-editor-workers": { - "version": "0.39.1", - "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.39.1.tgz", - "integrity": "sha512-QSP2ZCarlYaHGIZqzcz2BtI1mKstwJo4YfYu9m7ZwhkRd8HJEHpclKgE51AXtrncRch5zc05pHk4cQrFEdYsBQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/monaco-editor-workers/-/monaco-editor-workers-0.43.0.tgz", + "integrity": "sha512-qO9b6uzXXS57lv5VodYr2jhuxd9resG38WBmc72thp+222kcJPg9eChMMJTXZbfDIPHYkBQNR0+zPrbIdVtU+w==", "dev": true, "requires": { - "monaco-editor": "~0.39.0" - }, - "dependencies": { - "monaco-editor": { - "version": "0.39.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.39.0.tgz", - "integrity": "sha512-zhbZ2Nx93tLR8aJmL2zI1mhJpsl87HMebNBM6R8z4pLfs8pj604pIVIVwyF1TivcfNtIPpMXL+nb3DsBmE/x6Q==", - "dev": true - } + "monaco-editor": "~0.43.0" } }, "monaco-graphql": { @@ -14635,12 +14814,14 @@ } }, "monaco-languageclient": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-6.0.3.tgz", - "integrity": "sha512-jxkmzazfp0boGiTMjbMGpfCRjUQc5DKbpN+zsHg5GBdHMcrB7FVl1NiN9yZ/JABVTAv4yxN4qwhJuzmUoSiQ4w==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/monaco-languageclient/-/monaco-languageclient-6.5.1.tgz", + "integrity": "sha512-p3+PEucYjD0hrJ2VeRIrnt2FcOeWSZmMTjFQICo5Lmkzc9DNCIjQQCDx99wZqQpvdp7KNrxAnljiYQzHkdoBGA==", "requires": { - "monaco-editor": "~0.37.1", - "vscode": "npm:@codingame/monaco-vscode-api@~1.78.8", + "@codingame/monaco-vscode-languages-service-override": "~1.82.3", + "@codingame/monaco-vscode-model-service-override": "~1.82.3", + "monaco-editor": "~0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@>=1.82.3 <1.83.0", "vscode-jsonrpc": "~8.1.0", "vscode-languageclient": "~8.1.0" } @@ -14981,12 +15162,6 @@ "tslib": "^2.0.3" } }, - "path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -15044,12 +15219,6 @@ "path2d-polyfill": "^2.0.1" } }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "peer": true - }, "periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -16886,9 +17055,9 @@ } }, "vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", + "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", "dev": true, "requires": { "esbuild": "^0.18.10", @@ -16912,10 +17081,12 @@ "requires": {} }, "vscode": { - "version": "npm:@codingame/monaco-vscode-api@1.78.8", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.78.8.tgz", - "integrity": "sha512-MfiZy/UCEAzpTeFg3TTsA2sgvjHb1X/cuwr7QNZJtYbvJ7X68EOPBXHhr6Kygm3eEKR73ZRkmfK/xX4d9hytTw==", - "requires": {} + "version": "npm:@codingame/monaco-vscode-api@1.82.3", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.82.3.tgz", + "integrity": "sha512-3Z4GQ1A9nnZX1MRiMn1U5jXF1YKqmvHnLsW2zKaeEjS7bW7ZU8yyeOAX5J+KbLiMobTaPlzvZ1h6tuQkWGYMWA==", + "requires": { + "monaco-editor": "0.43.0" + } }, "vscode-jsonrpc": { "version": "8.1.0", @@ -16965,16 +17136,14 @@ "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" }, "vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "peer": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-2.0.1.tgz", + "integrity": "sha512-poJU8iHIWnC3vgphJnrLZyI3YdqRlR27xzqDmpPXYzA93R4Gk8z7T6oqDzDoHjoikA2aS82crdXFkjELCdJsjQ==" }, "vscode-textmate": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-9.0.0.tgz", - "integrity": "sha512-Cl65diFGxz7gpwbav10HqiY/eVYTO1sjQpmRmV991Bj7wAoOAjGQ97PpQcXorDE2Uc4hnGWLY17xme+5t6MlSg==", - "peer": true + "integrity": "sha512-Cl65diFGxz7gpwbav10HqiY/eVYTO1sjQpmRmV991Bj7wAoOAjGQ97PpQcXorDE2Uc4hnGWLY17xme+5t6MlSg==" }, "vscode-ws-jsonrpc": { "version": "3.0.0", @@ -17144,16 +17313,6 @@ "dev": true, "peer": true }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "peer": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "yjs": { "version": "13.6.7", "resolved": "https://registry.npmjs.org/yjs/-/yjs-13.6.7.tgz", diff --git a/frontend/package.json b/frontend/package.json index 012cb586b5..c5278d7da5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,6 +16,7 @@ "test": "playwright test --config=tests-out/playwright.config.js" }, "devDependencies": { + "@codingame/monaco-vscode-api": "1.82.3", "@floating-ui/core": "^1.3.1", "@playwright/test": "^1.34.3", "@rgossiaux/svelte-headlessui": "^2.0.0", @@ -28,7 +29,6 @@ "@types/d3-zoom": "^3.0.3", "@types/lodash": "^4.14.195", "@types/node": "^20.3.3", - "@types/vscode": "~1.78.1", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.60.0", "@zerodevx/svelte-toast": "^0.9.5", @@ -38,10 +38,9 @@ "eslint": "^8.47.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-svelte": "^2.33.1", - "monaco-editor-workers": "~0.39.1", + "monaco-editor-workers": "~0.43.0", "ol": "^7.4.0", "openapi-typescript-codegen": "^0.25.0", - "path-browserify": "^1.0.1", "pdfjs-dist": "^3.8.162", "postcss": "^8.4.24", "postcss-load-config": "^4.0.1", @@ -66,7 +65,7 @@ "tailwindcss": "^3.3.2", "tslib": "^2.6.1", "typescript": "^5.1.3", - "vite": "^4.4.9", + "vite": "^4.4.11", "vite-plugin-monaco-editor": "^1.1.0", "yootils": "^0.3.1" }, @@ -87,6 +86,18 @@ "type": "module", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", + "@codingame/monaco-vscode-accessibility-service-override": "1.82.3", + "@codingame/monaco-vscode-configuration-service-override": "1.82.3", + "@codingame/monaco-vscode-editor-service-override": "1.82.3", + "@codingame/monaco-vscode-json-default-extension": "1.82.3", + "@codingame/monaco-vscode-keybindings-service-override": "1.82.3", + "@codingame/monaco-vscode-languages-service-override": "1.82.3", + "@codingame/monaco-vscode-model-service-override": "1.82.3", + "@codingame/monaco-vscode-python-default-extension": "1.82.3", + "@codingame/monaco-vscode-textmate-service-override": "1.82.3", + "@codingame/monaco-vscode-theme-defaults-default-extension": "1.82.3", + "@codingame/monaco-vscode-theme-service-override": "1.82.3", + "@codingame/monaco-vscode-views-service-override": "1.82.3", "@fortawesome/free-brands-svg-icons": "^6.2.1", "@fortawesome/free-solid-svg-icons": "^6.2.1", "@leeoniya/ufuzzy": "^1.0.8", @@ -111,7 +122,7 @@ "lodash": "^4.17.21", "lucide-svelte": "^0.277.0", "monaco-graphql": "^1.3.0", - "monaco-languageclient": "~6.0.3", + "monaco-languageclient": "^6.5.1", "openai": "^4.3.0", "quill": "^1.3.7", "svelte-autosize": "^1.0.1", diff --git a/frontend/src/lib/components/DiffEditor.svelte b/frontend/src/lib/components/DiffEditor.svelte index 3d04ea357b..920d830e8d 100644 --- a/frontend/src/lib/components/DiffEditor.svelte +++ b/frontend/src/lib/components/DiffEditor.svelte @@ -2,14 +2,14 @@ import { BROWSER } from 'esm-env' import { onMount } from 'svelte' - import 'monaco-editor/esm/vs/editor/edcore.main' - import { editor as meditor } from 'monaco-editor/esm/vs/editor/editor.api' - import 'monaco-editor/esm/vs/basic-languages/python/python.contribution' - import 'monaco-editor/esm/vs/basic-languages/go/go.contribution' - import 'monaco-editor/esm/vs/basic-languages/shell/shell.contribution' - import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution' - import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution' - import 'monaco-editor/esm/vs/language/typescript/monaco.contribution' + // import 'monaco-editor/esm/vs/editor/edcore.main' + import { editor as meditor } from 'monaco-editor' + // import 'monaco-editor/esm/vs/basic-languages/python/python.contribution' + // import 'monaco-editor/esm/vs/basic-languages/go/go.contribution' + // import 'monaco-editor/esm/vs/basic-languages/shell/shell.contribution' + // import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution' + // import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution' + // import 'monaco-editor/esm/vs/language/typescript/monaco.contribution' const SIDE_BY_SIDE_MIN_WIDTH = 700 @@ -21,20 +21,20 @@ let editorWidth: number = SIDE_BY_SIDE_MIN_WIDTH function loadDiffEditor() { - diffEditor = meditor.createDiffEditor(diffDivEl!, { - automaticLayout, - renderSideBySide: editorWidth >= SIDE_BY_SIDE_MIN_WIDTH, - originalEditable: false, - minimap: { - enabled: false - }, - fixedOverflowWidgets, - scrollBeyondLastLine: false, - lineDecorationsWidth: 15, - lineNumbersMinChars: 2, - autoDetectHighContrast: true, - scrollbar: { alwaysConsumeMouseWheel: false } - }) + // diffEditor = meditor.createDiffEditor(diffDivEl!, { + // automaticLayout, + // renderSideBySide: editorWidth >= SIDE_BY_SIDE_MIN_WIDTH, + // originalEditable: false, + // minimap: { + // enabled: false + // }, + // fixedOverflowWidgets, + // scrollBeyondLastLine: false, + // lineDecorationsWidth: 15, + // lineNumbersMinChars: 2, + // autoDetectHighContrast: true, + // scrollbar: { alwaysConsumeMouseWheel: false } + // }) } export function setupModel( diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index fcb76b41fe..19ae243c8a 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -5,8 +5,40 @@ import { createEventDispatcher, onDestroy, onMount } from 'svelte' + import '@codingame/monaco-vscode-theme-defaults-default-extension' + import '@codingame/monaco-vscode-python-default-extension' + + import getAccessibilityServiceOverride from '@codingame/monaco-vscode-accessibility-service-override' + import getConfigurationServiceOverride from '@codingame/monaco-vscode-configuration-service-override' + import getEditorServiceOverride, { + type IReference + } from '@codingame/monaco-vscode-editor-service-override' + import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override' + import getLanguagesServiceOverride from '@codingame/monaco-vscode-languages-service-override' + import getModelServiceOverride from '@codingame/monaco-vscode-model-service-override' + import getThemeServiceOverride from '@codingame/monaco-vscode-theme-service-override' + import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-service-override' + + import { MonacoLanguageClient, initServices, useOpenEditorStub } from 'monaco-languageclient' + import { LogLevel } from 'vscode/services' + + import { + createConfiguredEditor, + createModelReference, + type ITextFileEditorModel + } from 'vscode/monaco' import * as vscode from 'vscode' + // import { + // editor as meditor, + // KeyCode, + // KeyMod, + // Uri as mUri, + // languages, + // type IRange + // } from 'monaco-editor' + + // import 'monaco-editor' import 'monaco-editor/esm/vs/editor/edcore.main' import { editor as meditor, @@ -26,7 +58,12 @@ import 'monaco-editor/esm/vs/language/typescript/monaco.contribution' import 'monaco-editor/esm/vs/basic-languages/css/css.contribution' - import { MonacoLanguageClient, initServices } from 'monaco-languageclient' + import { + RegisteredFileSystemProvider, + registerFileSystemOverlay, + RegisteredMemoryFile + } from 'vscode/service-override/files' + import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc' import { CloseAction, ErrorAction, RequestType, NotificationType } from 'vscode-languageclient' import { MonacoBinding } from 'y-monaco' @@ -119,8 +156,8 @@ let destroyed = false const uri = lang == 'typescript' && deno - ? `file:///${filePath ?? rHash}.${langToExt(lang)}` - : `file:///tmp/monaco/${randomHash()}.${langToExt(lang)}` + ? `/${filePath ?? rHash}.${langToExt(lang)}` + : `/tmp/monaco/${randomHash()}.${langToExt(lang)}` console.log('uri', uri) @@ -447,22 +484,6 @@ export async function reloadWebsocket() { console.log('reloadWebsocket') await closeWebsockets() - try { - await initServices({ - enableThemeService: false, - enableModelEditorService: true, - enableNotificationService: false, - modelEditorServiceConfig: { - useDefaultFunction: true - }, - debugLogging: false - }) - } catch (e) { - console.log('initServices failed', e.message) - if (e.message != 'Lifecycle cannot go backwards') { - return - } - } function createLanguageClient( transports: MessageTransports, @@ -487,13 +508,13 @@ workspaceFolder: name == 'bun' ? { - uri: vscode.Uri.parse('file:///tmp/monaco/'), + uri: vscode.Uri.file('/tmp/monaco/'), name: 'windmill', index: 0 } : name != 'deno' ? { - uri: vscode.Uri.parse(uri), + uri: vscode.Uri.file(uri), name: 'windmill', index: 0 } @@ -598,7 +619,7 @@ 'deno.cache', (uris: DocumentUri[] = []) => { languageClient.sendRequest(new RequestType('deno/cache'), { - referrer: { uri }, + referrer: { uri: 'file://' + uri }, uris: uris.map((uri) => ({ uri })) }) } @@ -884,30 +905,71 @@ } let widgets: HTMLElement | undefined = document.getElementById('monaco-widgets-root') ?? undefined - let model: meditor.ITextModel + let modelRef: IReference let monacoBinding: MonacoBinding | undefined = undefined // @ts-ignore - $: if (yContent && awareness && model && editor) { + $: if (yContent && awareness && modelRef.object.textEditorModel && editor) { monacoBinding && monacoBinding.destroy() - monacoBinding = new MonacoBinding(yContent, model, new Set([editor]), awareness) + monacoBinding = new MonacoBinding( + yContent, + modelRef.object.textEditorModel!, + new Set([editor]), + awareness + ) } async function loadMonaco() { try { - model = meditor.createModel(code, lang, mUri.parse(uri)) + await initServices({ + userServices: { + ...getThemeServiceOverride(), + ...getTextmateServiceOverride(), + ...getConfigurationServiceOverride(vscode.Uri.file('/workspace')), + ...getEditorServiceOverride(useOpenEditorStub), + ...getModelServiceOverride(), + ...getLanguagesServiceOverride(), + ...getKeybindingsServiceOverride(), + ...getAccessibilityServiceOverride() + }, + debugLogging: true, + logLevel: LogLevel.Debug + }) + } catch (e) { + throw e + console.log('initServices failed', e.message) + if (e.message != 'Lifecycle cannot go backwards') { + return + } + } + + const fileSystemProvider = new RegisteredFileSystemProvider(false) + fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file(uri), code)) + registerFileSystemOverlay(1, fileSystemProvider) + + try { + modelRef = await createModelReference(mUri.file(uri)) + modelRef.object.setLanguageId(lang) } catch (err) { console.log('model already existed', err) - const nmodel = meditor.getModel(mUri.parse(uri)) + const nmodel = meditor.getModel(mUri.file(uri)) if (!nmodel) { throw err } - model = nmodel + // modelRef.object.textEditorModel = nmodel } - model.updateOptions(lang == 'python' ? { tabSize: 4, insertSpaces: true } : updateOptions) + modelRef.object.textEditorModel?.updateOptions( + lang == 'python' ? { tabSize: 4, insertSpaces: true } : updateOptions + ) - editor = meditor.create(divEl as HTMLDivElement, { - ...editorConfig(model, code, lang, automaticLayout, fixedOverflowWidgets), + editor = createConfiguredEditor(divEl as HTMLDivElement, { + ...editorConfig( + modelRef.object.textEditorModel, + code, + lang, + automaticLayout, + fixedOverflowWidgets + ), overflowWidgetsDomNode: widgets, tabSize: lang == 'python' ? 4 : 2, folding @@ -960,7 +1022,7 @@ console.log('disposing editor') try { closeWebsockets() - model?.dispose() + modelRef?.dispose() editor && editor.dispose() console.log('disposed editor') } catch (err) { diff --git a/frontend/src/lib/components/icons/FunkwhaleIcon.svelte b/frontend/src/lib/components/icons/FunkwhaleIcon.svelte index d5d9a55b99..55cda2031f 100644 --- a/frontend/src/lib/components/icons/FunkwhaleIcon.svelte +++ b/frontend/src/lib/components/icons/FunkwhaleIcon.svelte @@ -15,11 +15,7 @@ style="fill:currentcolor;" >image/svg+xmlimage/svg+xml diff --git a/frontend/static/workers/cssWorker-es.js b/frontend/static/workers/cssWorker-es.js index beb177fb7b..32e687c6a6 100644 --- a/frontend/static/workers/cssWorker-es.js +++ b/frontend/static/workers/cssWorker-es.js @@ -1,11 +1,11 @@ -var Gl = Object.defineProperty; -var Jl = (t, e, n) => e in t ? Gl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; -var Yt = (t, e, n) => (Jl(t, typeof e != "symbol" ? e + "" : e, n), n); -class Xl { +var Kl = Object.defineProperty; +var Ql = (t, e, n) => e in t ? Kl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; +var Qt = (t, e, n) => (Ql(t, typeof e != "symbol" ? e + "" : e, n), n); +class Zl { constructor() { this.listeners = [], this.unexpectedErrorHandler = function(e) { setTimeout(() => { - throw e.stack ? $t.isErrorNoTelemetry(e) ? new $t(e.message + ` + throw e.stack ? Ht.isErrorNoTelemetry(e) ? new Ht(e.message + ` ` + e.stack) : new Error(e.message + ` @@ -13,25 +13,11 @@ class Xl { }, 0); }; } - addListener(e) { - return this.listeners.push(e), () => { - this._removeListener(e); - }; - } emit(e) { this.listeners.forEach((n) => { n(e); }); } - _removeListener(e) { - this.listeners.splice(this.listeners.indexOf(e), 1); - } - setUnexpectedErrorHandler(e) { - this.unexpectedErrorHandler = e; - } - getUnexpectedErrorHandler() { - return this.unexpectedErrorHandler; - } onUnexpectedError(e) { this.unexpectedErrorHandler(e), this.emit(e); } @@ -40,11 +26,11 @@ class Xl { this.unexpectedErrorHandler(e); } } -const Yl = new Xl(); -function Go(t) { - Kl(t) || Yl.onUnexpectedError(t); +const ec = new Zl(); +function tl(t) { + tc(t) || ec.onUnexpectedError(t); } -function Xi(t) { +function is(t) { if (t instanceof Error) { const { name: e, message: n } = t, r = t.stacktrace || t.stack; return { @@ -52,51 +38,50 @@ function Xi(t) { name: e, message: n, stack: r, - noTelemetry: $t.isErrorNoTelemetry(t) + noTelemetry: Ht.isErrorNoTelemetry(t) }; } return t; } -const Ir = "Canceled"; -function Kl(t) { - return t instanceof Ql ? !0 : t instanceof Error && t.name === Ir && t.message === Ir; +const jr = "Canceled"; +function tc(t) { + return t instanceof nc ? !0 : t instanceof Error && t.name === jr && t.message === jr; } -class Ql extends Error { +class nc extends Error { constructor() { - super(Ir), this.name = this.message; + super(jr), this.name = this.message; } } -class $t extends Error { +class Ht extends Error { constructor(e) { super(e), this.name = "CodeExpectedError"; } static fromError(e) { - if (e instanceof $t) + if (e instanceof Ht) return e; - const n = new $t(); + const n = new Ht(); return n.message = e.message, n.stack = e.stack, n; } static isErrorNoTelemetry(e) { return e.name === "CodeExpectedError"; } } -class Dt extends Error { +class st extends Error { constructor(e) { - super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, Dt.prototype); - debugger; + super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, st.prototype); } } -function Zl(t) { +function rc(t) { const e = this; let n = !1, r; return function() { return n || (n = !0, r = t.apply(e, arguments)), r; }; } -var qn; +var Kn; (function(t) { - function e(w) { - return w && typeof w == "object" && typeof w[Symbol.iterator] == "function"; + function e(x) { + return x && typeof x == "object" && typeof x[Symbol.iterator] == "function"; } t.is = e; const n = Object.freeze([]); @@ -104,88 +89,87 @@ var qn; return n; } t.empty = r; - function* i(w) { - yield w; + function* i(x) { + yield x; } t.single = i; - function s(w) { - return e(w) ? w : i(w); + function s(x) { + return e(x) ? x : i(x); } t.wrap = s; - function a(w) { - return w || n; + function a(x) { + return x || n; } t.from = a; - function o(w) { - return !w || w[Symbol.iterator]().next().done === !0; + function o(x) { + return !x || x[Symbol.iterator]().next().done === !0; } t.isEmpty = o; - function l(w) { - return w[Symbol.iterator]().next().value; + function l(x) { + return x[Symbol.iterator]().next().value; } t.first = l; - function c(w, x) { - for (const k of w) - if (x(k)) + function c(x, S) { + for (const w of x) + if (S(w)) return !0; return !1; } t.some = c; - function h(w, x) { - for (const k of w) - if (x(k)) - return k; + function h(x, S) { + for (const w of x) + if (S(w)) + return w; } t.find = h; - function* u(w, x) { - for (const k of w) - x(k) && (yield k); + function* u(x, S) { + for (const w of x) + S(w) && (yield w); } t.filter = u; - function* f(w, x) { - let k = 0; - for (const F of w) - yield x(F, k++); + function* m(x, S) { + let w = 0; + for (const E of x) + yield S(E, w++); } - t.map = f; - function* m(...w) { - for (const x of w) - for (const k of x) - yield k; + t.map = m; + function* f(...x) { + for (const S of x) + for (const w of S) + yield w; } - t.concat = m; - function g(w, x, k) { - let F = k; - for (const N of w) - F = x(F, N); - return F; + t.concat = f; + function g(x, S, w) { + let E = w; + for (const R of x) + E = S(E, R); + return E; } t.reduce = g; - function* b(w, x, k = w.length) { - for (x < 0 && (x += w.length), k < 0 ? k += w.length : k > w.length && (k = w.length); x < k; x++) - yield w[x]; + function* b(x, S, w = x.length) { + for (S < 0 && (S += x.length), w < 0 ? w += x.length : w > x.length && (w = x.length); S < w; S++) + yield x[S]; } t.slice = b; - function y(w, x = Number.POSITIVE_INFINITY) { - const k = []; - if (x === 0) - return [k, w]; - const F = w[Symbol.iterator](); - for (let N = 0; N < x; N++) { - const j = F.next(); - if (j.done) - return [k, t.empty()]; - k.push(j.value); + function y(x, S = Number.POSITIVE_INFINITY) { + const w = []; + if (S === 0) + return [w, x]; + const E = x[Symbol.iterator](); + for (let R = 0; R < S; R++) { + const T = E.next(); + if (T.done) + return [w, t.empty()]; + w.push(T.value); } - return [k, { [Symbol.iterator]() { - return F; + return [w, { [Symbol.iterator]() { + return E; } }]; } t.consume = y; -})(qn || (qn = {})); -globalThis && globalThis.__awaiter; -function Jo(t) { - if (qn.is(t)) { +})(Kn || (Kn = {})); +function nl(t) { + if (Kn.is(t)) { const e = []; for (const n of t) if (n) @@ -202,12 +186,12 @@ function Jo(t) { } else if (t) return t.dispose(), t; } -function ec(...t) { - return $n(() => Jo(t)); +function ic(...t) { + return mn(() => nl(t)); } -function $n(t) { +function mn(t) { return { - dispose: Zl(() => { + dispose: rc(() => { t(); }) }; @@ -236,7 +220,7 @@ class Et { clear() { if (this._toDispose.size !== 0) try { - Jo(this._toDispose); + nl(this._toDispose); } finally { this._toDispose.clear(); } @@ -253,7 +237,7 @@ class Et { } } Et.DISABLE_DISPOSED_WARNING = !1; -class dr { +class gn { constructor() { this._store = new Et(), this._store; } @@ -269,44 +253,31 @@ class dr { return this._store.add(e); } } -dr.None = Object.freeze({ dispose() { +gn.None = Object.freeze({ dispose() { } }); -class tc { - constructor() { - this.dispose = () => { - }, this.unset = () => { - }, this.isset = () => !1; - } - set(e) { - let n = e; - return this.unset = () => n = void 0, this.isset = () => n !== void 0, this.dispose = () => { - n && (n(), n = void 0); - }, this; - } -} -let se = class Lr { +let le = class qr { constructor(e) { - this.element = e, this.next = Lr.Undefined, this.prev = Lr.Undefined; + this.element = e, this.next = qr.Undefined, this.prev = qr.Undefined; } }; -se.Undefined = new se(void 0); -class Hn { +le.Undefined = new le(void 0); +class sc { constructor() { - this._first = se.Undefined, this._last = se.Undefined, this._size = 0; + this._first = le.Undefined, this._last = le.Undefined, this._size = 0; } get size() { return this._size; } isEmpty() { - return this._first === se.Undefined; + return this._first === le.Undefined; } clear() { let e = this._first; - for (; e !== se.Undefined; ) { + for (; e !== le.Undefined; ) { const n = e.next; - e.prev = se.Undefined, e.next = se.Undefined, e = n; + e.prev = le.Undefined, e.next = le.Undefined, e = n; } - this._first = se.Undefined, this._last = se.Undefined, this._size = 0; + this._first = le.Undefined, this._last = le.Undefined, this._size = 0; } unshift(e) { return this._insert(e, !1); @@ -315,8 +286,8 @@ class Hn { return this._insert(e, !0); } _insert(e, n) { - const r = new se(e); - if (this._first === se.Undefined) + const r = new le(e); + if (this._first === le.Undefined) this._first = r, this._last = r; else if (n) { const s = this._last; @@ -332,390 +303,309 @@ class Hn { }; } shift() { - if (this._first !== se.Undefined) { + if (this._first !== le.Undefined) { const e = this._first.element; return this._remove(this._first), e; } } pop() { - if (this._last !== se.Undefined) { + if (this._last !== le.Undefined) { const e = this._last.element; return this._remove(this._last), e; } } _remove(e) { - if (e.prev !== se.Undefined && e.next !== se.Undefined) { + if (e.prev !== le.Undefined && e.next !== le.Undefined) { const n = e.prev; n.next = e.next, e.next.prev = n; } else - e.prev === se.Undefined && e.next === se.Undefined ? (this._first = se.Undefined, this._last = se.Undefined) : e.next === se.Undefined ? (this._last = this._last.prev, this._last.next = se.Undefined) : e.prev === se.Undefined && (this._first = this._first.next, this._first.prev = se.Undefined); + e.prev === le.Undefined && e.next === le.Undefined ? (this._first = le.Undefined, this._last = le.Undefined) : e.next === le.Undefined ? (this._last = this._last.prev, this._last.next = le.Undefined) : e.prev === le.Undefined && (this._first = this._first.next, this._first.prev = le.Undefined); this._size -= 1; } *[Symbol.iterator]() { let e = this._first; - for (; e !== se.Undefined; ) + for (; e !== le.Undefined; ) yield e.element, e = e.next; } } -globalThis && globalThis.__awaiter; -let nc = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; -function rc(t, e) { - let n; - return e.length === 0 ? n = t : n = t.replace(/\{(\d+)\}/g, (r, i) => { - const s = i[0], a = e[s]; - let o = r; - return typeof a == "string" ? o = a : (typeof a == "number" || typeof a == "boolean" || a === void 0 || a === null) && (o = String(a)), o; - }), nc && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n; -} -function ic(t, e, ...n) { - return rc(e, n); -} -var gr; -const Wt = "en"; -let Tr = !1, Wr = !1, br = !1, Xo = !1, En, On = Wt, Yi = Wt, sc, qe; -const De = typeof self == "object" ? self : typeof global == "object" ? global : {}; -let Se; -typeof De.vscode < "u" && typeof De.vscode.process < "u" ? Se = De.vscode.process : typeof process < "u" && (Se = process); -const ac = typeof ((gr = Se == null ? void 0 : Se.versions) === null || gr === void 0 ? void 0 : gr.electron) == "string", oc = ac && (Se == null ? void 0 : Se.type) === "renderer"; -if (typeof navigator == "object" && !oc) - qe = navigator.userAgent, Tr = qe.indexOf("Windows") >= 0, Wr = qe.indexOf("Macintosh") >= 0, (qe.indexOf("Macintosh") >= 0 || qe.indexOf("iPad") >= 0 || qe.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints > 0, br = qe.indexOf("Linux") >= 0, (qe == null ? void 0 : qe.indexOf("Mobi")) >= 0, Xo = !0, // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` - // to ensure that the NLS AMD Loader plugin has been loaded and configured. - // This is because the loader plugin decides what the default locale is based on - // how it's able to resolve the strings. - ic({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_"), En = Wt, On = En, Yi = navigator.language; -else if (typeof Se == "object") { - Tr = Se.platform === "win32", Wr = Se.platform === "darwin", br = Se.platform === "linux", br && Se.env.SNAP && Se.env.SNAP_REVISION, Se.env.CI || Se.env.BUILD_ARTIFACTSTAGINGDIRECTORY, En = Wt, On = Wt; - const t = Se.env.VSCODE_NLS_CONFIG; - if (t) - try { - const e = JSON.parse(t), n = e.availableLanguages["*"]; - En = e.locale, Yi = e.osLocale, On = n || Wt, sc = e._translationsConfigFile; - } catch { - } -} else - console.error("Unable to resolve platform."); -const pn = Tr, lc = Wr; -Xo && De.importScripts; -const Qe = qe, lt = On; -var Ki; -(function(t) { - function e() { - return lt; - } - t.value = e; - function n() { - return lt.length === 2 ? lt === "en" : lt.length >= 3 ? lt[0] === "e" && lt[1] === "n" && lt[2] === "-" : !1; - } - t.isDefaultVariant = n; - function r() { - return lt === "en"; - } - t.isDefault = r; -})(Ki || (Ki = {})); -const cc = typeof De.postMessage == "function" && !De.importScripts; -(() => { - if (cc) { - const t = []; - De.addEventListener("message", (n) => { - if (n.data && n.data.vscodeScheduleAsyncWork) - for (let r = 0, i = t.length; r < i; r++) { - const s = t[r]; - if (s.id === n.data.vscodeScheduleAsyncWork) { - t.splice(r, 1), s.callback(); - return; - } - } - }); - let e = 0; - return (n) => { - const r = ++e; - t.push({ - id: r, - callback: n - }), De.postMessage({ vscodeScheduleAsyncWork: r }, "*"); - }; - } - return (t) => setTimeout(t); -})(); -const hc = !!(Qe && Qe.indexOf("Chrome") >= 0); -Qe && Qe.indexOf("Firefox") >= 0; -!hc && Qe && Qe.indexOf("Safari") >= 0; -Qe && Qe.indexOf("Edg/") >= 0; -Qe && Qe.indexOf("Android") >= 0; -const dc = De.performance && typeof De.performance.now == "function"; -class ur { - static create(e = !0) { - return new ur(e); +const ac = globalThis.performance && typeof globalThis.performance.now == "function"; +class br { + static create(e) { + return new br(e); } constructor(e) { - this._highResolution = dc && e, this._startTime = this._now(), this._stopTime = -1; + this._now = ac && e === !1 ? Date.now : globalThis.performance.now.bind(globalThis.performance), this._startTime = this._now(), this._stopTime = -1; } stop() { this._stopTime = this._now(); } - reset() { - this._startTime = this._now(), this._stopTime = -1; - } elapsed() { return this._stopTime !== -1 ? this._stopTime - this._startTime : this._now() - this._startTime; } - _now() { - return this._highResolution ? De.performance.now() : Date.now(); - } } -globalThis && globalThis.__awaiter; -var Or; +var $r; (function(t) { - t.None = () => dr.None; - function e(P, z) { - return h(P, () => { - }, 0, void 0, !0, void 0, z); + t.None = () => gn.None; + function e(z, F) { + return h(z, () => { + }, 0, void 0, !0, void 0, F); } t.defer = e; - function n(P) { - return (z, A = null, R) => { - let L = !1, O; - return O = P((K) => { - if (!L) - return O ? O.dispose() : L = !0, z.call(A, K); - }, null, R), L && O.dispose(), O; + function n(z) { + return (F, D = null, I) => { + let O = !1, J; + return J = z((Y) => { + if (!O) + return J ? J.dispose() : O = !0, F.call(D, Y); + }, null, I), O && J.dispose(), J; }; } t.once = n; - function r(P, z, A) { - return c((R, L = null, O) => P((K) => R.call(L, z(K)), null, O), A); + function r(z, F, D) { + return c((I, O = null, J) => z((Y) => I.call(O, F(Y)), null, J), D); } t.map = r; - function i(P, z, A) { - return c((R, L = null, O) => P((K) => { - z(K), R.call(L, K); - }, null, O), A); + function i(z, F, D) { + return c((I, O = null, J) => z((Y) => { + F(Y), I.call(O, Y); + }, null, J), D); } t.forEach = i; - function s(P, z, A) { - return c((R, L = null, O) => P((K) => z(K) && R.call(L, K), null, O), A); + function s(z, F, D) { + return c((I, O = null, J) => z((Y) => F(Y) && I.call(O, Y), null, J), D); } t.filter = s; - function a(P) { - return P; + function a(z) { + return z; } t.signal = a; - function o(...P) { - return (z, A = null, R) => ec(...P.map((L) => L((O) => z.call(A, O), null, R))); + function o(...z) { + return (F, D = null, I) => ic(...z.map((O) => O((J) => F.call(D, J), null, I))); } t.any = o; - function l(P, z, A, R) { - let L = A; - return r(P, (O) => (L = z(L, O), L), R); + function l(z, F, D, I) { + let O = D; + return r(z, (J) => (O = F(O, J), O), I); } t.reduce = l; - function c(P, z) { - let A; - const R = { + function c(z, F) { + let D; + const I = { onWillAddFirstListener() { - A = P(L.fire, L); + D = z(O.fire, O); }, onDidRemoveLastListener() { - A == null || A.dispose(); + D == null || D.dispose(); } - }, L = new Ke(R); - return z == null || z.add(L), L.event; + }, O = new qe(I); + return F == null || F.add(O), O.event; } - function h(P, z, A = 100, R = !1, L = !1, O, K) { - let re, E, C, D = 0, I; - const X = { - leakWarningThreshold: O, + function h(z, F, D = 100, I = !1, O = !1, J, Y) { + let A, k, N, P = 0, G; + const K = { + leakWarningThreshold: J, onWillAddFirstListener() { - re = P((ee) => { - D++, E = z(E, ee), R && !C && (G.fire(E), E = void 0), I = () => { - const Ie = E; - E = void 0, C = void 0, (!R || D > 1) && G.fire(Ie), D = 0; - }, typeof A == "number" ? (clearTimeout(C), C = setTimeout(I, A)) : C === void 0 && (C = 0, queueMicrotask(I)); + A = z((Le) => { + P++, k = F(k, Le), I && !N && (ee.fire(k), k = void 0), G = () => { + const ye = k; + k = void 0, N = void 0, (!I || P > 1) && ee.fire(ye), P = 0; + }, typeof D == "number" ? (clearTimeout(N), N = setTimeout(G, D)) : N === void 0 && (N = 0, queueMicrotask(G)); }); }, onWillRemoveListener() { - L && D > 0 && (I == null || I()); + O && P > 0 && (G == null || G()); }, onDidRemoveLastListener() { - I = void 0, re.dispose(); + G = void 0, A.dispose(); } - }, G = new Ke(X); - return K == null || K.add(G), G.event; + }, ee = new qe(K); + return Y == null || Y.add(ee), ee.event; } t.debounce = h; - function u(P, z = 0, A) { - return t.debounce(P, (R, L) => R ? (R.push(L), R) : [L], z, void 0, !0, void 0, A); + function u(z, F = 0, D) { + return t.debounce(z, (I, O) => I ? (I.push(O), I) : [O], F, void 0, !0, void 0, D); } t.accumulate = u; - function f(P, z = (R, L) => R === L, A) { - let R = !0, L; - return s(P, (O) => { - const K = R || !z(O, L); - return R = !1, L = O, K; - }, A); + function m(z, F = (I, O) => I === O, D) { + let I = !0, O; + return s(z, (J) => { + const Y = I || !F(J, O); + return I = !1, O = J, Y; + }, D); } - t.latch = f; - function m(P, z, A) { + t.latch = m; + function f(z, F, D) { return [ - t.filter(P, z, A), - t.filter(P, (R) => !z(R), A) + t.filter(z, F, D), + t.filter(z, (I) => !F(I), D) ]; } - t.split = m; - function g(P, z = !1, A = []) { - let R = A.slice(), L = P((re) => { - R ? R.push(re) : K.fire(re); + t.split = f; + function g(z, F = !1, D = []) { + let I = D.slice(), O = z((A) => { + I ? I.push(A) : Y.fire(A); }); - const O = () => { - R == null || R.forEach((re) => K.fire(re)), R = null; - }, K = new Ke({ + const J = () => { + I == null || I.forEach((A) => Y.fire(A)), I = null; + }, Y = new qe({ onWillAddFirstListener() { - L || (L = P((re) => K.fire(re))); + O || (O = z((A) => Y.fire(A))); }, onDidAddFirstListener() { - R && (z ? setTimeout(O) : O()); + I && (F ? setTimeout(J) : J()); }, onDidRemoveLastListener() { - L && L.dispose(), L = null; + O && O.dispose(), O = null; } }); - return K.event; + return Y.event; } t.buffer = g; class b { - constructor(z) { - this.event = z, this.disposables = new Et(); + constructor(F) { + this.event = F, this.disposables = new Et(); } /** @see {@link Event.map} */ - map(z) { - return new b(r(this.event, z, this.disposables)); + map(F) { + return new b(r(this.event, F, this.disposables)); } /** @see {@link Event.forEach} */ - forEach(z) { - return new b(i(this.event, z, this.disposables)); + forEach(F) { + return new b(i(this.event, F, this.disposables)); } - filter(z) { - return new b(s(this.event, z, this.disposables)); + filter(F) { + return new b(s(this.event, F, this.disposables)); } /** @see {@link Event.reduce} */ - reduce(z, A) { - return new b(l(this.event, z, A, this.disposables)); + reduce(F, D) { + return new b(l(this.event, F, D, this.disposables)); } /** @see {@link Event.reduce} */ latch() { - return new b(f(this.event, void 0, this.disposables)); + return new b(m(this.event, void 0, this.disposables)); } - debounce(z, A = 100, R = !1, L = !1, O) { - return new b(h(this.event, z, A, R, L, O, this.disposables)); + debounce(F, D = 100, I = !1, O = !1, J) { + return new b(h(this.event, F, D, I, O, J, this.disposables)); } /** * Attach a listener to the event. */ - on(z, A, R) { - return this.event(z, A, R); + on(F, D, I) { + return this.event(F, D, I); } /** @see {@link Event.once} */ - once(z, A, R) { - return n(this.event)(z, A, R); + once(F, D, I) { + return n(this.event)(F, D, I); } dispose() { this.disposables.dispose(); } } - function y(P) { - return new b(P); + function y(z) { + return new b(z); } t.chain = y; - function w(P, z, A = (R) => R) { - const R = (...re) => K.fire(A(...re)), L = () => P.on(z, R), O = () => P.removeListener(z, R), K = new Ke({ onWillAddFirstListener: L, onDidRemoveLastListener: O }); - return K.event; + function x(z, F, D = (I) => I) { + const I = (...A) => Y.fire(D(...A)), O = () => z.on(F, I), J = () => z.removeListener(F, I), Y = new qe({ onWillAddFirstListener: O, onDidRemoveLastListener: J }); + return Y.event; } - t.fromNodeEventEmitter = w; - function x(P, z, A = (R) => R) { - const R = (...re) => K.fire(A(...re)), L = () => P.addEventListener(z, R), O = () => P.removeEventListener(z, R), K = new Ke({ onWillAddFirstListener: L, onDidRemoveLastListener: O }); - return K.event; + t.fromNodeEventEmitter = x; + function S(z, F, D = (I) => I) { + const I = (...A) => Y.fire(D(...A)), O = () => z.addEventListener(F, I), J = () => z.removeEventListener(F, I), Y = new qe({ onWillAddFirstListener: O, onDidRemoveLastListener: J }); + return Y.event; } - t.fromDOMEventEmitter = x; - function k(P) { - return new Promise((z) => n(P)(z)); + t.fromDOMEventEmitter = S; + function w(z) { + return new Promise((F) => n(z)(F)); } - t.toPromise = k; - function F(P, z) { - return z(void 0), P((A) => z(A)); + t.toPromise = w; + function E(z) { + const F = new qe(); + return z.then((D) => { + F.fire(D); + }, () => { + F.fire(void 0); + }).finally(() => { + F.dispose(); + }), F.event; } - t.runAndSubscribe = F; - function N(P, z) { - let A = null; - function R(O) { - A == null || A.dispose(), A = new Et(), z(O, A); + t.fromPromise = E; + function R(z, F) { + return F(void 0), z((D) => F(D)); + } + t.runAndSubscribe = R; + function T(z, F) { + let D = null; + function I(J) { + D == null || D.dispose(), D = new Et(), F(J, D); } - R(void 0); - const L = P((O) => R(O)); - return $n(() => { - L.dispose(), A == null || A.dispose(); + I(void 0); + const O = z((J) => I(J)); + return mn(() => { + O.dispose(), D == null || D.dispose(); }); } - t.runAndSubscribeWithStore = N; - class j { - constructor(z, A) { - this._observable = z, this._counter = 0, this._hasChanged = !1; - const R = { + t.runAndSubscribeWithStore = T; + class W { + constructor(F, D) { + this._observable = F, this._counter = 0, this._hasChanged = !1; + const I = { onWillAddFirstListener: () => { - z.addObserver(this); + F.addObserver(this); }, onDidRemoveLastListener: () => { - z.removeObserver(this); + F.removeObserver(this); } }; - this.emitter = new Ke(R), A && A.add(this.emitter); + this.emitter = new qe(I), D && D.add(this.emitter); } - beginUpdate(z) { + beginUpdate(F) { this._counter++; } - handlePossibleChange(z) { + handlePossibleChange(F) { } - handleChange(z, A) { + handleChange(F, D) { this._hasChanged = !0; } - endUpdate(z) { + endUpdate(F) { this._counter--, this._counter === 0 && (this._observable.reportChanges(), this._hasChanged && (this._hasChanged = !1, this.emitter.fire(this._observable.get()))); } } - function H(P, z) { - return new j(P, z).emitter.event; + function L(z, F) { + return new W(z, F).emitter.event; } - t.fromObservable = H; - function B(P) { - return (z) => { - let A = 0, R = !1; - const L = { + t.fromObservable = L; + function q(z) { + return (F) => { + let D = 0, I = !1; + const O = { beginUpdate() { - A++; + D++; }, endUpdate() { - A--, A === 0 && (P.reportChanges(), R && (R = !1, z())); + D--, D === 0 && (z.reportChanges(), I && (I = !1, F())); }, handlePossibleChange() { }, handleChange() { - R = !0; + I = !0; } }; - return P.addObserver(L), { + return z.addObserver(O), z.reportChanges(), { dispose() { - P.removeObserver(L); + z.removeObserver(O); } }; }; } - t.fromObservableLight = B; -})(Or || (Or = {})); -class Ht { + t.fromObservableLight = q; +})($r || ($r = {})); +class Gt { constructor(e) { - this.listenerCount = 0, this.invocationCount = 0, this.elapsedOverall = 0, this.durations = [], this.name = `${e}_${Ht._idPool++}`, Ht.all.add(this); + this.listenerCount = 0, this.invocationCount = 0, this.elapsedOverall = 0, this.durations = [], this.name = `${e}_${Gt._idPool++}`, Gt.all.add(this); } start(e) { - this._stopWatch = new ur(!0), this.listenerCount = e; + this._stopWatch = new br(), this.listenerCount = e; } stop() { if (this._stopWatch) { @@ -724,10 +614,10 @@ class Ht { } } } -Ht.all = /* @__PURE__ */ new Set(); -Ht._idPool = 0; -let uc = -1; -class pc { +Gt.all = /* @__PURE__ */ new Set(); +Gt._idPool = 0; +let oc = -1; +class lc { constructor(e, n = Math.random().toString(18).slice(2, 5)) { this.threshold = e, this.name = n, this._warnCountdown = 0; } @@ -754,10 +644,10 @@ class pc { }; } } -class Si { +class Ai { static create() { var e; - return new Si((e = new Error().stack) !== null && e !== void 0 ? e : ""); + return new Ai((e = new Error().stack) !== null && e !== void 0 ? e : ""); } constructor(e) { this.value = e; @@ -768,115 +658,131 @@ class Si { `)); } } -class fc { - constructor(e, n, r) { - this.callback = e, this.callbackThis = n, this.stack = r, this.subscription = new tc(); - } - invoke(e) { - this.callback.call(this.callbackThis, e); +class xr { + constructor(e) { + this.value = e; } } -class Ke { +const cc = 2; +class qe { constructor(e) { var n, r, i, s, a; - this._disposed = !1, this._options = e, this._leakageMon = !((n = this._options) === null || n === void 0) && n.leakWarningThreshold ? new pc((i = (r = this._options) === null || r === void 0 ? void 0 : r.leakWarningThreshold) !== null && i !== void 0 ? i : uc) : void 0, this._perfMon = !((s = this._options) === null || s === void 0) && s._profName ? new Ht(this._options._profName) : void 0, this._deliveryQueue = (a = this._options) === null || a === void 0 ? void 0 : a.deliveryQueue; + this._size = 0, this._options = e, this._leakageMon = !((n = this._options) === null || n === void 0) && n.leakWarningThreshold ? new lc((i = (r = this._options) === null || r === void 0 ? void 0 : r.leakWarningThreshold) !== null && i !== void 0 ? i : oc) : void 0, this._perfMon = !((s = this._options) === null || s === void 0) && s._profName ? new Gt(this._options._profName) : void 0, this._deliveryQueue = (a = this._options) === null || a === void 0 ? void 0 : a.deliveryQueue; } dispose() { var e, n, r, i; - this._disposed || (this._disposed = !0, this._listeners && this._listeners.clear(), (e = this._deliveryQueue) === null || e === void 0 || e.clear(this), (r = (n = this._options) === null || n === void 0 ? void 0 : n.onDidRemoveLastListener) === null || r === void 0 || r.call(n), (i = this._leakageMon) === null || i === void 0 || i.dispose()); + this._disposed || (this._disposed = !0, ((e = this._deliveryQueue) === null || e === void 0 ? void 0 : e.current) === this && this._deliveryQueue.reset(), this._listeners && (this._listeners = void 0, this._size = 0), (r = (n = this._options) === null || n === void 0 ? void 0 : n.onDidRemoveLastListener) === null || r === void 0 || r.call(n), (i = this._leakageMon) === null || i === void 0 || i.dispose()); } /** * For the public to allow to subscribe * to events from this Emitter */ get event() { - return this._event || (this._event = (e, n, r) => { - var i, s, a; - if (this._listeners || (this._listeners = new Hn()), this._leakageMon && this._listeners.size > this._leakageMon.threshold * 3) - return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`), dr.None; - const o = this._listeners.isEmpty(); - o && (!((i = this._options) === null || i === void 0) && i.onWillAddFirstListener) && this._options.onWillAddFirstListener(this); - let l, c; - this._leakageMon && this._listeners.size >= Math.ceil(this._leakageMon.threshold * 0.2) && (c = Si.create(), l = this._leakageMon.check(c, this._listeners.size + 1)); - const h = new fc(e, n, c), u = this._listeners.push(h); - o && (!((s = this._options) === null || s === void 0) && s.onDidAddFirstListener) && this._options.onDidAddFirstListener(this), !((a = this._options) === null || a === void 0) && a.onDidAddListener && this._options.onDidAddListener(this, e, n); - const f = h.subscription.set(() => { - var m, g; - l == null || l(), this._disposed || ((g = (m = this._options) === null || m === void 0 ? void 0 : m.onWillRemoveListener) === null || g === void 0 || g.call(m, this), u(), this._options && this._options.onDidRemoveLastListener && (this._listeners && !this._listeners.isEmpty() || this._options.onDidRemoveLastListener(this))); + var e; + return (e = this._event) !== null && e !== void 0 || (this._event = (n, r, i) => { + var s, a, o, l, c; + if (this._leakageMon && this._size > this._leakageMon.threshold * 3) + return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`), gn.None; + if (this._disposed) + return gn.None; + r && (n = n.bind(r)); + const h = new xr(n); + let u; + this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && (h.stack = Ai.create(), u = this._leakageMon.check(h.stack, this._size + 1)), this._listeners ? this._listeners instanceof xr ? ((c = this._deliveryQueue) !== null && c !== void 0 || (this._deliveryQueue = new hc()), this._listeners = [this._listeners, h]) : this._listeners.push(h) : ((a = (s = this._options) === null || s === void 0 ? void 0 : s.onWillAddFirstListener) === null || a === void 0 || a.call(s, this), this._listeners = h, (l = (o = this._options) === null || o === void 0 ? void 0 : o.onDidAddFirstListener) === null || l === void 0 || l.call(o, this)), this._size++; + const m = mn(() => { + u == null || u(), this._removeListener(h); }); - return r instanceof Et ? r.add(f) : Array.isArray(r) && r.push(f), f; + return i instanceof Et ? i.add(m) : Array.isArray(i) && i.push(m), m; }), this._event; } + _removeListener(e) { + var n, r, i, s; + if ((r = (n = this._options) === null || n === void 0 ? void 0 : n.onWillRemoveListener) === null || r === void 0 || r.call(n, this), !this._listeners) + return; + if (this._size === 1) { + this._listeners = void 0, (s = (i = this._options) === null || i === void 0 ? void 0 : i.onDidRemoveLastListener) === null || s === void 0 || s.call(i, this), this._size = 0; + return; + } + const a = this._listeners, o = a.indexOf(e); + if (o === -1) + throw console.log("disposed?", this._disposed), console.log("size?", this._size), console.log("arr?", JSON.stringify(this._listeners)), new Error("Attempted to dispose unknown listener"); + this._size--, a[o] = void 0; + const l = this._deliveryQueue.current === this; + if (this._size * cc <= a.length) { + let c = 0; + for (let h = 0; h < a.length; h++) + a[h] ? a[c++] = a[h] : l && (this._deliveryQueue.end--, c < this._deliveryQueue.i && this._deliveryQueue.i--); + a.length = c; + } + } + _deliver(e, n) { + var r; + if (!e) + return; + const i = ((r = this._options) === null || r === void 0 ? void 0 : r.onListenerError) || tl; + if (!i) { + e.value(n); + return; + } + try { + e.value(n); + } catch (s) { + i(s); + } + } + /** Delivers items in the queue. Assumes the queue is ready to go. */ + _deliverQueue(e) { + const n = e.current._listeners; + for (; e.i < e.end; ) + this._deliver(n[e.i++], e.value); + e.reset(); + } /** * To be kept private to fire an event to * subscribers */ fire(e) { - var n, r, i; - if (this._listeners) { - this._deliveryQueue || (this._deliveryQueue = new gc((n = this._options) === null || n === void 0 ? void 0 : n.onListenerError)); - for (const s of this._listeners) - this._deliveryQueue.push(this, s, e); - (r = this._perfMon) === null || r === void 0 || r.start(this._deliveryQueue.size), this._deliveryQueue.deliver(), (i = this._perfMon) === null || i === void 0 || i.stop(); - } + var n, r, i, s; + if (!((n = this._deliveryQueue) === null || n === void 0) && n.current && (this._deliverQueue(this._deliveryQueue), (r = this._perfMon) === null || r === void 0 || r.stop()), (i = this._perfMon) === null || i === void 0 || i.start(this._size), this._listeners) + if (this._listeners instanceof xr) + this._deliver(this._listeners, e); + else { + const a = this._deliveryQueue; + a.enqueue(this, e, this._listeners.length), this._deliverQueue(a); + } + (s = this._perfMon) === null || s === void 0 || s.stop(); } hasListeners() { - return this._listeners ? !this._listeners.isEmpty() : !1; + return this._size > 0; } } -class mc { - constructor(e = Go) { - this._onListenerError = e, this._queue = new Hn(); +class hc { + constructor() { + this.i = -1, this.end = 0; } - get size() { - return this._queue.size; + enqueue(e, n, r) { + this.i = 0, this.end = r, this.current = e, this.value = n; } - push(e, n, r) { - this._queue.push(new bc(e, n, r)); - } - clear(e) { - const n = new Hn(); - for (const r of this._queue) - r.emitter !== e && n.push(r); - this._queue = n; - } - deliver() { - for (; this._queue.size > 0; ) { - const e = this._queue.shift(); - try { - e.listener.invoke(e.event); - } catch (n) { - this._onListenerError(n); - } - } + reset() { + this.i = this.end, this.current = void 0, this.value = void 0; } } -class gc extends mc { - clear(e) { - this._queue.clear(); - } -} -class bc { - constructor(e, n, r) { - this.emitter = e, this.listener = n, this.event = r; - } -} -function vc(t) { +function dc(t) { return typeof t == "string"; } -function yc(t) { - let e = [], n = Object.getPrototypeOf(t); - for (; Object.prototype !== n; ) - e = e.concat(Object.getOwnPropertyNames(n)), n = Object.getPrototypeOf(n); +function uc(t) { + let e = []; + for (; Object.prototype !== t; ) + e = e.concat(Object.getOwnPropertyNames(t)), t = Object.getPrototypeOf(t); return e; } -function Ur(t) { +function Hr(t) { const e = []; - for (const n of yc(t)) + for (const n of uc(t)) typeof t[n] == "function" && e.push(n); return e; } -function wc(t, e) { +function pc(t, e) { const n = (i) => function() { const s = Array.prototype.slice.call(arguments, 0); return e(i, s); @@ -885,57 +791,75 @@ function wc(t, e) { r[i] = n(i); return r; } -const Yo = Object.freeze(function(t, e) { - const n = setTimeout(t.bind(e), 0); - return { dispose() { - clearTimeout(n); - } }; -}); -var Gn; -(function(t) { - function e(n) { - return n === t.None || n === t.Cancelled || n instanceof Un ? !0 : !n || typeof n != "object" ? !1 : typeof n.isCancellationRequested == "boolean" && typeof n.onCancellationRequested == "function"; - } - t.isCancellationToken = e, t.None = Object.freeze({ - isCancellationRequested: !1, - onCancellationRequested: Or.None - }), t.Cancelled = Object.freeze({ - isCancellationRequested: !0, - onCancellationRequested: Yo - }); -})(Gn || (Gn = {})); -class Un { - constructor() { - this._isCancelled = !1, this._emitter = null; - } - cancel() { - this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter.fire(void 0), this.dispose())); - } - get isCancellationRequested() { - return this._isCancelled; - } - get onCancellationRequested() { - return this._isCancelled ? Yo : (this._emitter || (this._emitter = new Ke()), this._emitter.event); - } - dispose() { - this._emitter && (this._emitter.dispose(), this._emitter = null); - } +globalThis && globalThis.__awaiter; +let fc = typeof document < "u" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; +function mc(t, e) { + let n; + return e.length === 0 ? n = t : n = t.replace(/\{(\d+)\}/g, (r, i) => { + const s = i[0], a = e[s]; + let o = r; + return typeof a == "string" ? o = a : (typeof a == "number" || typeof a == "boolean" || a === void 0 || a === null) && (o = String(a)), o; + }), fc && (n = "[" + n.replace(/[aouei]/g, "$&$&") + "]"), n; } -class xc { - constructor(e) { - this._token = void 0, this._parentListener = void 0, this._parentListener = e && e.onCancellationRequested(this.cancel, this); - } - get token() { - return this._token || (this._token = new Un()), this._token; - } - cancel() { - this._token ? this._token instanceof Un && this._token.cancel() : this._token = Gn.Cancelled; - } - dispose(e = !1) { - var n; - e && this.cancel(), (n = this._parentListener) === null || n === void 0 || n.dispose(), this._token ? this._token instanceof Un && this._token.dispose() : this._token = Gn.None; - } +function oe(t, e, ...n) { + return mc(e, n); } +var Sr; +const Wt = "en"; +let Gr = !1, Jr = !1, Cr = !1, rl = !1, Pn, kr = Wt, ss = Wt, gc, je; +const He = typeof self == "object" ? self : typeof global == "object" ? global : {}; +let Se; +typeof He.vscode < "u" && typeof He.vscode.process < "u" ? Se = He.vscode.process : typeof process < "u" && (Se = process); +const bc = typeof ((Sr = Se == null ? void 0 : Se.versions) === null || Sr === void 0 ? void 0 : Sr.electron) == "string", vc = bc && (Se == null ? void 0 : Se.type) === "renderer"; +if (typeof navigator == "object" && !vc) + je = navigator.userAgent, Gr = je.indexOf("Windows") >= 0, Jr = je.indexOf("Macintosh") >= 0, (je.indexOf("Macintosh") >= 0 || je.indexOf("iPad") >= 0 || je.indexOf("iPhone") >= 0) && navigator.maxTouchPoints && navigator.maxTouchPoints > 0, Cr = je.indexOf("Linux") >= 0, (je == null ? void 0 : je.indexOf("Mobi")) >= 0, rl = !0, // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` + // to ensure that the NLS AMD Loader plugin has been loaded and configured. + // This is because the loader plugin decides what the default locale is based on + // how it's able to resolve the strings. + oe({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_"), Pn = Wt, kr = Pn, ss = navigator.language; +else if (typeof Se == "object") { + Gr = Se.platform === "win32", Jr = Se.platform === "darwin", Cr = Se.platform === "linux", Cr && Se.env.SNAP && Se.env.SNAP_REVISION, Se.env.CI || Se.env.BUILD_ARTIFACTSTAGINGDIRECTORY, Pn = Wt, kr = Wt; + const t = Se.env.VSCODE_NLS_CONFIG; + if (t) + try { + const e = JSON.parse(t), n = e.availableLanguages["*"]; + Pn = e.locale, ss = e.osLocale, kr = n || Wt, gc = e._translationsConfigFile; + } catch { + } +} else + console.error("Unable to resolve platform."); +const bn = Gr, yc = Jr; +rl && He.importScripts; +const Ye = je, wc = typeof He.postMessage == "function" && !He.importScripts; +(() => { + if (wc) { + const t = []; + He.addEventListener("message", (n) => { + if (n.data && n.data.vscodeScheduleAsyncWork) + for (let r = 0, i = t.length; r < i; r++) { + const s = t[r]; + if (s.id === n.data.vscodeScheduleAsyncWork) { + t.splice(r, 1), s.callback(); + return; + } + } + }); + let e = 0; + return (n) => { + const r = ++e; + t.push({ + id: r, + callback: n + }), He.postMessage({ vscodeScheduleAsyncWork: r }, "*"); + }; + } + return (t) => setTimeout(t); +})(); +const xc = !!(Ye && Ye.indexOf("Chrome") >= 0); +Ye && Ye.indexOf("Firefox") >= 0; +!xc && Ye && Ye.indexOf("Safari") >= 0; +Ye && Ye.indexOf("Edg/") >= 0; +Ye && Ye.indexOf("Android") >= 0; class Sc { constructor(e) { this.fn = e, this.lastCache = void 0, this.lastArgKey = void 0; @@ -945,16 +869,10 @@ class Sc { return this.lastArgKey !== n && (this.lastArgKey = n, this.lastCache = this.fn(e)), this.lastCache; } } -class Ko { +class il { constructor(e) { this.executor = e, this._didRun = !1; } - /** - * True if the lazy value has been resolved. - */ - get hasValue() { - return this._didRun; - } /** * Get the wrapped value. * @@ -981,7 +899,7 @@ class Ko { return this._value; } } -var Qo; +var Jt; function Cc(t) { return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); } @@ -996,7 +914,7 @@ function _c(t) { } return -1; } -function Fc(t, e = t.length - 1) { +function Rc(t, e = t.length - 1) { for (let n = e; n >= 0; n--) { const r = t.charCodeAt(n); if (r !== 32 && r !== 9) @@ -1004,13 +922,13 @@ function Fc(t, e = t.length - 1) { } return -1; } -function Zo(t) { +function sl(t) { return t >= 65 && t <= 90; } -function Vr(t) { +function Xr(t) { return 55296 <= t && t <= 56319; } -function Rc(t) { +function Fc(t) { return 56320 <= t && t <= 57343; } function Ec(t, e) { @@ -1018,23 +936,23 @@ function Ec(t, e) { } function Dc(t, e, n) { const r = t.charCodeAt(n); - if (Vr(r) && n + 1 < e) { + if (Xr(r) && n + 1 < e) { const i = t.charCodeAt(n + 1); - if (Rc(i)) + if (Fc(i)) return Ec(r, i); } return r; } const Ac = /^[\t\n\r\x20-\x7E]*$/; -function Mc(t) { +function Nc(t) { return Ac.test(t); } -class Ve { +class Dt { static getInstance(e) { - return Ve.cache.get(Array.from(e)); + return Jt.cache.get(Array.from(e)); } static getLocales() { - return Ve._locales.value; + return Jt._locales.value; } constructor(e) { this.confusableDictionary = e; @@ -1053,9 +971,9 @@ class Ve { return new Set(this.confusableDictionary.keys()); } } -Qo = Ve; -Ve.ambiguousCharacterData = new Ko(() => 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]}')); -Ve.cache = new Sc((t) => { +Jt = Dt; +Dt.ambiguousCharacterData = new il(() => 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]}')); +Dt.cache = new Sc((t) => { function e(c) { const h = /* @__PURE__ */ new Map(); for (let u = 0; u < c.length; u += 2) @@ -1064,19 +982,19 @@ Ve.cache = new Sc((t) => { } function n(c, h) { const u = new Map(c); - for (const [f, m] of h) - u.set(f, m); + for (const [m, f] of h) + u.set(m, f); return u; } function r(c, h) { if (!c) return h; const u = /* @__PURE__ */ new Map(); - for (const [f, m] of c) - h.has(f) && u.set(f, m); + for (const [m, f] of c) + h.has(m) && u.set(m, f); return u; } - const i = Qo.ambiguousCharacterData.value; + const i = Jt.ambiguousCharacterData.value; let s = t.filter((c) => !c.startsWith("_") && c in i); s.length === 0 && (s = ["_default"]); let a; @@ -1085,31 +1003,31 @@ Ve.cache = new Sc((t) => { a = r(a, h); } const o = e(i._common), l = n(o, a); - return new Ve(l); + return new Jt(l); }); -Ve._locales = new Ko(() => Object.keys(Ve.ambiguousCharacterData.value).filter((t) => !t.startsWith("_"))); -class bt { +Dt._locales = new il(() => Object.keys(Jt.ambiguousCharacterData.value).filter((t) => !t.startsWith("_"))); +class gt { 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() { - return this._data || (this._data = new Set(bt.getRawData())), this._data; + return this._data || (this._data = new Set(gt.getRawData())), this._data; } static isInvisibleCharacter(e) { - return bt.getData().has(e); + return gt.getData().has(e); } static get codePoints() { - return bt.getData(); + return gt.getData(); } } -bt._data = void 0; -const Nc = "$initialize"; +gt._data = void 0; +const Mc = "$initialize"; class zc { constructor(e, n, r, i) { this.vsWorker = e, this.req = n, this.method = r, this.args = i, this.type = 0; } } -class Qi { +class as { constructor(e, n, r, i) { this.vsWorker = e, this.seq = n, this.res = r, this.err = i, this.type = 1; } @@ -1119,12 +1037,12 @@ class Pc { this.vsWorker = e, this.req = n, this.eventName = r, this.arg = i, this.type = 2; } } -class Ic { +class Lc { constructor(e, n, r) { this.vsWorker = e, this.req = n, this.event = r, this.type = 3; } } -class Lc { +class Ic { constructor(e, n) { this.vsWorker = e, this.req = n, this.type = 4; } @@ -1147,12 +1065,12 @@ class Tc { } listen(e, n) { let r = null; - const i = new Ke({ + const i = new qe({ onWillAddFirstListener: () => { r = String(++this._lastSentReq), this._pendingEmitters.set(r, i), this._send(new Pc(this._workerId, r, e, n)); }, onDidRemoveLastListener: () => { - this._pendingEmitters.delete(r), this._send(new Lc(this._workerId, r)), r = null; + this._pendingEmitters.delete(r), this._send(new Ic(this._workerId, r)), r = null; } }); return i.event; @@ -1190,14 +1108,14 @@ class Tc { _handleRequestMessage(e) { const n = e.req; this._handler.handleMessage(e.method, e.args).then((i) => { - this._send(new Qi(this._workerId, n, i, void 0)); + this._send(new as(this._workerId, n, i, void 0)); }, (i) => { - i.detail instanceof Error && (i.detail = Xi(i.detail)), this._send(new Qi(this._workerId, n, void 0, Xi(i))); + i.detail instanceof Error && (i.detail = is(i.detail)), this._send(new as(this._workerId, n, void 0, is(i))); }); } _handleSubscribeEventMessage(e) { const n = e.req, r = this._handler.handleEvent(e.eventName, e.arg)((i) => { - this._send(new Ic(this._workerId, n, i)); + this._send(new Lc(this._workerId, n, i)); }); this._pendingEvents.set(n, r); } @@ -1225,11 +1143,11 @@ class Tc { this._handler.sendMessage(e, n); } } -function el(t) { - return t[0] === "o" && t[1] === "n" && Zo(t.charCodeAt(2)); +function al(t) { + return t[0] === "o" && t[1] === "n" && sl(t.charCodeAt(2)); } -function tl(t) { - return /^onDynamic/.test(t) && Zo(t.charCodeAt(9)); +function ol(t) { + return /^onDynamic/.test(t) && sl(t.charCodeAt(9)); } function Wc(t, e, n) { const r = (a) => function() { @@ -1239,11 +1157,11 @@ function Wc(t, e, n) { return n(a, o); }, s = {}; for (const a of t) { - if (tl(a)) { + if (ol(a)) { s[a] = i(a); continue; } - if (el(a)) { + if (al(a)) { s[a] = n(a, void 0); continue; } @@ -1265,7 +1183,7 @@ class Oc { this._protocol.handleMessage(e); } _handleMessage(e, n) { - if (e === Nc) + if (e === Mc) return this.initialize(n[0], n[1], n[2], n[3]); if (!this._requestHandler || typeof this._requestHandler[e] != "function") return Promise.reject(new Error("Missing requestHandler or method: " + e)); @@ -1278,13 +1196,13 @@ class Oc { _handleEvent(e, n) { if (!this._requestHandler) throw new Error("Missing requestHandler"); - if (tl(e)) { + if (ol(e)) { const r = this._requestHandler[e].call(this._requestHandler, n); if (typeof r != "function") throw new Error(`Missing dynamic event ${e} on request handler.`); return r; } - if (el(e)) { + if (al(e)) { const r = this._requestHandler[e]; if (typeof r != "function") throw new Error(`Missing event ${e} on request handler.`); @@ -1295,14 +1213,14 @@ class Oc { initialize(e, n, r, i) { this._protocol.setWorkerId(e); const o = Wc(i, (l, c) => this._protocol.sendMessage(l, c), (l, c) => this._protocol.listen(l, c)); - return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(o), Promise.resolve(Ur(this._requestHandler))) : (n && (typeof n.baseUrl < "u" && delete n.baseUrl, typeof n.paths < "u" && typeof n.paths.vs < "u" && delete n.paths.vs, typeof n.trustedTypesPolicy !== void 0 && delete n.trustedTypesPolicy, n.catchError = !0, globalThis.require.config(n)), new Promise((l, c) => { + return this._requestHandlerFactory ? (this._requestHandler = this._requestHandlerFactory(o), Promise.resolve(Hr(this._requestHandler))) : (n && (typeof n.baseUrl < "u" && delete n.baseUrl, typeof n.paths < "u" && typeof n.paths.vs < "u" && delete n.paths.vs, typeof n.trustedTypesPolicy !== void 0 && delete n.trustedTypesPolicy, n.catchError = !0, globalThis.require.config(n)), new Promise((l, c) => { const h = globalThis.require; h([r], (u) => { if (this._requestHandler = u.create(o), !this._requestHandler) { c(new Error("No RequestHandler!")); return; } - l(Ur(this._requestHandler)); + l(Hr(this._requestHandler)); }, c); })); } @@ -1328,16 +1246,16 @@ class ut { return this.modifiedStart + this.modifiedLength; } } -function Zi(t, e) { +function os(t, e) { return (e << 5) - e + t | 0; } function Uc(t, e) { - e = Zi(149417, e); + e = os(149417, e); for (let n = 0, r = t.length; n < r; n++) - e = Zi(t.charCodeAt(n), e); + e = os(t.charCodeAt(n), e); return e; } -class es { +class ls { constructor(e) { this.source = e; } @@ -1349,7 +1267,7 @@ class es { } } function Vc(t, e, n) { - return new ft(new es(t), new es(e)).ComputeDiff(n).changes; + return new ft(new ls(t), new ls(e)).ComputeDiff(n).changes; } class At { static Assert(e, n) { @@ -1357,7 +1275,7 @@ class At { throw new Error(n); } } -class Mt { +class Nt { /** * Copies a range of elements from an Array starting at the specified source index and pastes * them to another Array starting at the specified destination index. The length and the indexes @@ -1382,7 +1300,7 @@ class Mt { r[i + a] = e[n + a]; } } -class ts { +class cs { /** * Constructs a new DiffChangeHelper for the given DiffSequences. */ @@ -1507,39 +1425,39 @@ class ft { return l; if (!s[0]) { const u = this.ComputeDiffRecursive(e, c, r, h, s); - let f = []; - return s[0] ? f = [ + let m = []; + return s[0] ? m = [ new ut(c + 1, n - (c + 1) + 1, h + 1, i - (h + 1) + 1) - ] : f = this.ComputeDiffRecursive(c + 1, n, h + 1, i, s), this.ConcatenateChanges(u, f); + ] : m = this.ComputeDiffRecursive(c + 1, n, h + 1, i, s), this.ConcatenateChanges(u, m); } return [ new ut(e, n - e + 1, r, i - r + 1) ]; } - WALKTRACE(e, n, r, i, s, a, o, l, c, h, u, f, m, g, b, y, w, x) { - let k = null, F = null, N = new ts(), j = n, H = r, B = m[0] - y[0] - i, P = -1073741824, z = this.m_forwardHistory.length - 1; + WALKTRACE(e, n, r, i, s, a, o, l, c, h, u, m, f, g, b, y, x, S) { + let w = null, E = null, R = new cs(), T = n, W = r, L = f[0] - y[0] - i, q = -1073741824, z = this.m_forwardHistory.length - 1; do { - const A = B + e; - A === j || A < H && c[A - 1] < c[A + 1] ? (u = c[A + 1], g = u - B - i, u < P && N.MarkNextChange(), P = u, N.AddModifiedElement(u + 1, g), B = A + 1 - e) : (u = c[A - 1] + 1, g = u - B - i, u < P && N.MarkNextChange(), P = u - 1, N.AddOriginalElement(u, g + 1), B = A - 1 - e), z >= 0 && (c = this.m_forwardHistory[z], e = c[0], j = 1, H = c.length - 1); + const F = L + e; + F === T || F < W && c[F - 1] < c[F + 1] ? (u = c[F + 1], g = u - L - i, u < q && R.MarkNextChange(), q = u, R.AddModifiedElement(u + 1, g), L = F + 1 - e) : (u = c[F - 1] + 1, g = u - L - i, u < q && R.MarkNextChange(), q = u - 1, R.AddOriginalElement(u, g + 1), L = F - 1 - e), z >= 0 && (c = this.m_forwardHistory[z], e = c[0], T = 1, W = c.length - 1); } while (--z >= -1); - if (k = N.getReverseChanges(), x[0]) { - let A = m[0] + 1, R = y[0] + 1; - if (k !== null && k.length > 0) { - const L = k[k.length - 1]; - A = Math.max(A, L.getOriginalEnd()), R = Math.max(R, L.getModifiedEnd()); + if (w = R.getReverseChanges(), S[0]) { + let F = f[0] + 1, D = y[0] + 1; + if (w !== null && w.length > 0) { + const I = w[w.length - 1]; + F = Math.max(F, I.getOriginalEnd()), D = Math.max(D, I.getModifiedEnd()); } - F = [ - new ut(A, f - A + 1, R, b - R + 1) + E = [ + new ut(F, m - F + 1, D, b - D + 1) ]; } else { - N = new ts(), j = a, H = o, B = m[0] - y[0] - l, P = 1073741824, z = w ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; + R = new cs(), T = a, W = o, L = f[0] - y[0] - l, q = 1073741824, z = x ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; do { - const A = B + s; - A === j || A < H && h[A - 1] >= h[A + 1] ? (u = h[A + 1] - 1, g = u - B - l, u > P && N.MarkNextChange(), P = u + 1, N.AddOriginalElement(u + 1, g + 1), B = A + 1 - s) : (u = h[A - 1], g = u - B - l, u > P && N.MarkNextChange(), P = u, N.AddModifiedElement(u + 1, g + 1), B = A - 1 - s), z >= 0 && (h = this.m_reverseHistory[z], s = h[0], j = 1, H = h.length - 1); + const F = L + s; + F === T || F < W && h[F - 1] >= h[F + 1] ? (u = h[F + 1] - 1, g = u - L - l, u > q && R.MarkNextChange(), q = u + 1, R.AddOriginalElement(u + 1, g + 1), L = F + 1 - s) : (u = h[F - 1], g = u - L - l, u > q && R.MarkNextChange(), q = u, R.AddModifiedElement(u + 1, g + 1), L = F - 1 - s), z >= 0 && (h = this.m_reverseHistory[z], s = h[0], T = 1, W = h.length - 1); } while (--z >= -1); - F = N.getChanges(); + E = R.getChanges(); } - return this.ConcatenateChanges(k, F); + return this.ConcatenateChanges(w, E); } /** * Given the range to compute the diff on, this method finds the point: @@ -1558,41 +1476,41 @@ class ft { * @returns The diff changes, if available, otherwise null */ ComputeRecursionPoint(e, n, r, i, s, a, o) { - let l = 0, c = 0, h = 0, u = 0, f = 0, m = 0; + let l = 0, c = 0, h = 0, u = 0, m = 0, f = 0; e--, r--, s[0] = 0, a[0] = 0, this.m_forwardHistory = [], this.m_reverseHistory = []; - const g = n - e + (i - r), b = g + 1, y = new Int32Array(b), w = new Int32Array(b), x = i - r, k = n - e, F = e - r, N = n - i, H = (k - x) % 2 === 0; - y[x] = e, w[k] = n, o[0] = !1; - for (let B = 1; B <= g / 2 + 1; B++) { - let P = 0, z = 0; - h = this.ClipDiagonalBound(x - B, B, x, b), u = this.ClipDiagonalBound(x + B, B, x, b); - for (let R = h; R <= u; R += 2) { - R === h || R < u && y[R - 1] < y[R + 1] ? l = y[R + 1] : l = y[R - 1] + 1, c = l - (R - x) - F; - const L = l; + const g = n - e + (i - r), b = g + 1, y = new Int32Array(b), x = new Int32Array(b), S = i - r, w = n - e, E = e - r, R = n - i, W = (w - S) % 2 === 0; + y[S] = e, x[w] = n, o[0] = !1; + for (let L = 1; L <= g / 2 + 1; L++) { + let q = 0, z = 0; + h = this.ClipDiagonalBound(S - L, L, S, b), u = this.ClipDiagonalBound(S + L, L, S, b); + for (let D = h; D <= u; D += 2) { + D === h || D < u && y[D - 1] < y[D + 1] ? l = y[D + 1] : l = y[D - 1] + 1, c = l - (D - S) - E; + const I = l; for (; l < n && c < i && this.ElementsAreEqual(l + 1, c + 1); ) l++, c++; - if (y[R] = l, l + c > P + z && (P = l, z = c), !H && Math.abs(R - k) <= B - 1 && l >= w[R]) - return s[0] = l, a[0] = c, L <= w[R] && 1447 > 0 && B <= 1447 + 1 ? this.WALKTRACE(x, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : null; + if (y[D] = l, l + c > q + z && (q = l, z = c), !W && Math.abs(D - w) <= L - 1 && l >= x[D]) + return s[0] = l, a[0] = c, I <= x[D] && 1447 > 0 && L <= 1447 + 1 ? this.WALKTRACE(S, h, u, E, w, m, f, R, y, x, l, n, s, c, i, a, W, o) : null; } - const A = (P - e + (z - r) - B) / 2; - if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(P, A)) - return o[0] = !0, s[0] = P, a[0] = z, A > 0 && 1447 > 0 && B <= 1447 + 1 ? this.WALKTRACE(x, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : (e++, r++, [ + const F = (q - e + (z - r) - L) / 2; + if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(q, F)) + return o[0] = !0, s[0] = q, a[0] = z, F > 0 && 1447 > 0 && L <= 1447 + 1 ? this.WALKTRACE(S, h, u, E, w, m, f, R, y, x, l, n, s, c, i, a, W, o) : (e++, r++, [ new ut(e, n - e + 1, r, i - r + 1) ]); - f = this.ClipDiagonalBound(k - B, B, k, b), m = this.ClipDiagonalBound(k + B, B, k, b); - for (let R = f; R <= m; R += 2) { - R === f || R < m && w[R - 1] >= w[R + 1] ? l = w[R + 1] - 1 : l = w[R - 1], c = l - (R - k) - N; - const L = l; + m = this.ClipDiagonalBound(w - L, L, w, b), f = this.ClipDiagonalBound(w + L, L, w, b); + for (let D = m; D <= f; D += 2) { + D === m || D < f && x[D - 1] >= x[D + 1] ? l = x[D + 1] - 1 : l = x[D - 1], c = l - (D - w) - R; + const I = l; for (; l > e && c > r && this.ElementsAreEqual(l, c); ) l--, c--; - if (w[R] = l, H && Math.abs(R - x) <= B && l <= y[R]) - return s[0] = l, a[0] = c, L >= y[R] && 1447 > 0 && B <= 1447 + 1 ? this.WALKTRACE(x, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o) : null; + if (x[D] = l, W && Math.abs(D - S) <= L && l <= y[D]) + return s[0] = l, a[0] = c, I >= y[D] && 1447 > 0 && L <= 1447 + 1 ? this.WALKTRACE(S, h, u, E, w, m, f, R, y, x, l, n, s, c, i, a, W, o) : null; } - if (B <= 1447) { - let R = new Int32Array(u - h + 2); - R[0] = x - h + 1, Mt.Copy2(y, h, R, 1, u - h + 1), this.m_forwardHistory.push(R), R = new Int32Array(m - f + 2), R[0] = k - f + 1, Mt.Copy2(w, f, R, 1, m - f + 1), this.m_reverseHistory.push(R); + if (L <= 1447) { + let D = new Int32Array(u - h + 2); + D[0] = S - h + 1, Nt.Copy2(y, h, D, 1, u - h + 1), this.m_forwardHistory.push(D), D = new Int32Array(f - m + 2), D[0] = w - m + 1, Nt.Copy2(x, m, D, 1, f - m + 1), this.m_reverseHistory.push(D); } } - return this.WALKTRACE(x, h, u, F, k, f, m, N, y, w, l, n, s, c, i, a, H, o); + return this.WALKTRACE(S, h, u, E, w, m, f, R, y, x, l, n, s, c, i, a, W, o); } /** * Shifts the given changes to provide a more intuitive diff. @@ -1627,10 +1545,10 @@ class ft { const a = r.originalLength > 0, o = r.modifiedLength > 0; let l = 0, c = this._boundaryScore(r.originalStart, r.originalLength, r.modifiedStart, r.modifiedLength); for (let u = 1; ; u++) { - const f = r.originalStart - u, m = r.modifiedStart - u; - if (f < i || m < s || a && !this.OriginalElementsAreEqual(f, f + r.originalLength) || o && !this.ModifiedElementsAreEqual(m, m + r.modifiedLength)) + const m = r.originalStart - u, f = r.modifiedStart - u; + if (m < i || f < s || a && !this.OriginalElementsAreEqual(m, m + r.originalLength) || o && !this.ModifiedElementsAreEqual(f, f + r.modifiedLength)) break; - const b = (f === i && m === s ? 5 : 0) + this._boundaryScore(f, r.originalLength, m, r.modifiedLength); + const b = (m === i && f === s ? 5 : 0) + this._boundaryScore(m, r.originalLength, f, r.modifiedLength); b > c && (c = b, l = u); } r.originalStart -= l, r.modifiedStart -= l; @@ -1642,11 +1560,11 @@ class ft { } if (this._hasStrings) for (let n = 1, r = e.length; n < r; n++) { - const i = e[n - 1], s = e[n], a = s.originalStart - i.originalStart - i.originalLength, o = i.originalStart, l = s.originalStart + s.originalLength, c = l - o, h = i.modifiedStart, u = s.modifiedStart + s.modifiedLength, f = u - h; - if (a < 5 && c < 20 && f < 20) { - const m = this._findBetterContiguousSequence(o, c, h, f, a); - if (m) { - const [g, b] = m; + const i = e[n - 1], s = e[n], a = s.originalStart - i.originalStart - i.originalLength, o = i.originalStart, l = s.originalStart + s.originalLength, c = l - o, h = i.modifiedStart, u = s.modifiedStart + s.modifiedLength, m = u - h; + if (a < 5 && c < 20 && m < 20) { + const f = this._findBetterContiguousSequence(o, c, h, m, a); + if (f) { + const [g, b] = f; (g !== i.originalStart + i.originalLength || b !== i.modifiedStart + i.modifiedLength) && (i.originalLength = g - i.originalStart, i.modifiedLength = b - i.modifiedStart, s.originalStart = g + a, s.modifiedStart = b + a, s.originalLength = l - s.originalStart, s.modifiedLength = u - s.modifiedStart); } } @@ -1659,9 +1577,9 @@ class ft { const a = e + n - s + 1, o = r + i - s + 1; let l = 0, c = 0, h = 0; for (let u = e; u < a; u++) - for (let f = r; f < o; f++) { - const m = this._contiguousSequenceScore(u, f, s); - m > 0 && m > l && (l = m, c = u, h = f); + for (let m = r; m < o; m++) { + const f = this._contiguousSequenceScore(u, m, s); + f > 0 && f > l && (l = f, c = u, h = m); } return l > 0 ? [c, h] : null; } @@ -1717,10 +1635,10 @@ class ft { return n.length > 0 ? n : e; if (this.ChangesOverlap(e[e.length - 1], n[0], r)) { const i = new Array(e.length + n.length - 1); - return Mt.Copy(e, 0, i, 0, e.length - 1), i[e.length - 1] = r[0], Mt.Copy(n, 1, i, e.length, n.length - 1), i; + return Nt.Copy(e, 0, i, 0, e.length - 1), i[e.length - 1] = r[0], Nt.Copy(n, 1, i, e.length, n.length - 1), i; } else { const i = new Array(e.length + n.length); - return Mt.Copy(e, 0, i, 0, e.length), Mt.Copy(n, 0, i, e.length, n.length), i; + return Nt.Copy(e, 0, i, 0, e.length), Nt.Copy(n, 0, i, e.length, n.length), i; } } /** @@ -1766,10 +1684,10 @@ class ft { } } } -let Rt; -if (typeof De.vscode < "u" && typeof De.vscode.process < "u") { - const t = De.vscode.process; - Rt = { +let Vt; +if (typeof He.vscode < "u" && typeof He.vscode.process < "u") { + const t = He.vscode.process; + Vt = { get platform() { return t.platform; }, @@ -1784,7 +1702,7 @@ if (typeof De.vscode < "u" && typeof De.vscode.process < "u") { } }; } else - typeof process < "u" ? Rt = { + typeof process < "u" ? Vt = { get platform() { return process.platform; }, @@ -1797,10 +1715,10 @@ if (typeof De.vscode < "u" && typeof De.vscode.process < "u") { cwd() { return process.env.VSCODE_CWD || process.cwd(); } - } : Rt = { + } : Vt = { // Supported get platform() { - return pn ? "win32" : lc ? "darwin" : "linux"; + return bn ? "win32" : yc ? "darwin" : "linux"; }, get arch() { }, @@ -1812,10 +1730,8 @@ if (typeof De.vscode < "u" && typeof De.vscode.process < "u") { return "/"; } }; -const Jn = Rt.cwd, Bc = Rt.env, jc = Rt.platform; -Rt.arch; -const qc = 65, $c = 97, Hc = 90, Gc = 122, vt = 46, ye = 47, Re = 92, ct = 58, Jc = 63; -class nl extends Error { +const Qn = Vt.cwd, Bc = Vt.env, jc = Vt.platform, qc = 65, $c = 97, Hc = 90, Gc = 122, bt = 46, we = 47, Ee = 92, lt = 58, Jc = 63; +class ll extends Error { constructor(e, n, r) { let i; typeof n == "string" && n.indexOf("not ") === 0 ? (i = "must not be", n = n.replace(/^not /, "")) : i = "must be"; @@ -1826,23 +1742,23 @@ class nl extends Error { } function Xc(t, e) { if (t === null || typeof t != "object") - throw new nl(e, "Object", t); + throw new ll(e, "Object", t); } -function oe(t, e) { +function he(t, e) { if (typeof t != "string") - throw new nl(e, "string", t); + throw new ll(e, "string", t); } -const Ae = jc === "win32"; -function J(t) { - return t === ye || t === Re; +const yt = jc === "win32"; +function X(t) { + return t === we || t === Ee; } -function Br(t) { - return t === ye; +function Yr(t) { + return t === we; } -function ht(t) { +function ct(t) { return t >= qc && t <= Hc || t >= $c && t <= Gc; } -function Xn(t, e, n, r) { +function Zn(t, e, n, r) { let i = "", s = 0, a = -1, o = 0, l = 0; for (let c = 0; c <= t.length; ++c) { if (c < t.length) @@ -1850,12 +1766,12 @@ function Xn(t, e, n, r) { else { if (r(l)) break; - l = ye; + l = we; } if (r(l)) { if (!(a === c - 1 || o === 1)) if (o === 2) { - if (i.length < 2 || s !== 2 || i.charCodeAt(i.length - 1) !== vt || i.charCodeAt(i.length - 2) !== vt) { + if (i.length < 2 || s !== 2 || i.charCodeAt(i.length - 1) !== bt || i.charCodeAt(i.length - 2) !== bt) { if (i.length > 2) { const h = i.lastIndexOf(n); h === -1 ? (i = "", s = 0) : (i = i.slice(0, h), s = i.length - 1 - i.lastIndexOf(n)), a = c, o = 0; @@ -1870,50 +1786,50 @@ function Xn(t, e, n, r) { i.length > 0 ? i += `${n}${t.slice(a + 1, c)}` : i = t.slice(a + 1, c), s = c - a - 1; a = c, o = 0; } else - l === vt && o !== -1 ? ++o : o = -1; + l === bt && o !== -1 ? ++o : o = -1; } return i; } -function rl(t, e) { +function cl(t, e) { Xc(e, "pathObject"); const n = e.dir || e.root, r = e.base || `${e.name || ""}${e.ext || ""}`; return n ? n === e.root ? `${n}${r}` : `${n}${t}${r}` : r; } -const ue = { +const Re = { // path.resolve([from ...], to) resolve(...t) { let e = "", n = "", r = !1; for (let i = t.length - 1; i >= -1; i--) { let s; if (i >= 0) { - if (s = t[i], oe(s, "path"), s.length === 0) + if (s = t[i], he(s, "path"), s.length === 0) continue; } else - e.length === 0 ? s = Jn() : (s = Bc[`=${e}`] || Jn(), (s === void 0 || s.slice(0, 2).toLowerCase() !== e.toLowerCase() && s.charCodeAt(2) === Re) && (s = `${e}\\`)); + e.length === 0 ? s = Qn() : (s = Bc[`=${e}`] || Qn(), (s === void 0 || s.slice(0, 2).toLowerCase() !== e.toLowerCase() && s.charCodeAt(2) === Ee) && (s = `${e}\\`)); const a = s.length; let o = 0, l = "", c = !1; const h = s.charCodeAt(0); if (a === 1) - J(h) && (o = 1, c = !0); - else if (J(h)) - if (c = !0, J(s.charCodeAt(1))) { - let u = 2, f = u; - for (; u < a && !J(s.charCodeAt(u)); ) + X(h) && (o = 1, c = !0); + else if (X(h)) + if (c = !0, X(s.charCodeAt(1))) { + let u = 2, m = u; + for (; u < a && !X(s.charCodeAt(u)); ) u++; - if (u < a && u !== f) { - const m = s.slice(f, u); - for (f = u; u < a && J(s.charCodeAt(u)); ) + if (u < a && u !== m) { + const f = s.slice(m, u); + for (m = u; u < a && X(s.charCodeAt(u)); ) u++; - if (u < a && u !== f) { - for (f = u; u < a && !J(s.charCodeAt(u)); ) + if (u < a && u !== m) { + for (m = u; u < a && !X(s.charCodeAt(u)); ) u++; - (u === a || u !== f) && (l = `\\\\${m}\\${s.slice(f, u)}`, o = u); + (u === a || u !== m) && (l = `\\\\${f}\\${s.slice(m, u)}`, o = u); } } } else o = 1; else - ht(h) && s.charCodeAt(1) === ct && (l = s.slice(0, 2), o = 2, a > 2 && J(s.charCodeAt(2)) && (c = !0, o = 3)); + ct(h) && s.charCodeAt(1) === lt && (l = s.slice(0, 2), o = 2, a > 2 && X(s.charCodeAt(2)) && (c = !0, o = 3)); if (l.length > 0) if (e.length > 0) { if (l.toLowerCase() !== e.toLowerCase()) @@ -1926,28 +1842,28 @@ const ue = { } else if (n = `${s.slice(o)}\\${n}`, r = c, c && e.length > 0) break; } - return n = Xn(n, !r, "\\", J), r ? `${e}\\${n}` : `${e}${n}` || "."; + return n = Zn(n, !r, "\\", X), r ? `${e}\\${n}` : `${e}${n}` || "."; }, normalize(t) { - oe(t, "path"); + he(t, "path"); const e = t.length; if (e === 0) return "."; let n = 0, r, i = !1; const s = t.charCodeAt(0); if (e === 1) - return Br(s) ? "\\" : t; - if (J(s)) - if (i = !0, J(t.charCodeAt(1))) { + return Yr(s) ? "\\" : t; + if (X(s)) + if (i = !0, X(t.charCodeAt(1))) { let o = 2, l = o; - for (; o < e && !J(t.charCodeAt(o)); ) + for (; o < e && !X(t.charCodeAt(o)); ) o++; if (o < e && o !== l) { const c = t.slice(l, o); - for (l = o; o < e && J(t.charCodeAt(o)); ) + for (l = o; o < e && X(t.charCodeAt(o)); ) o++; if (o < e && o !== l) { - for (l = o; o < e && !J(t.charCodeAt(o)); ) + for (l = o; o < e && !X(t.charCodeAt(o)); ) o++; if (o === e) return `\\\\${c}\\${t.slice(l)}\\`; @@ -1957,18 +1873,18 @@ const ue = { } else n = 1; else - ht(s) && t.charCodeAt(1) === ct && (r = t.slice(0, 2), n = 2, e > 2 && J(t.charCodeAt(2)) && (i = !0, n = 3)); - let a = n < e ? Xn(t.slice(n), !i, "\\", J) : ""; - return a.length === 0 && !i && (a = "."), a.length > 0 && J(t.charCodeAt(e - 1)) && (a += "\\"), r === void 0 ? i ? `\\${a}` : a : i ? `${r}\\${a}` : `${r}${a}`; + ct(s) && t.charCodeAt(1) === lt && (r = t.slice(0, 2), n = 2, e > 2 && X(t.charCodeAt(2)) && (i = !0, n = 3)); + let a = n < e ? Zn(t.slice(n), !i, "\\", X) : ""; + return a.length === 0 && !i && (a = "."), a.length > 0 && X(t.charCodeAt(e - 1)) && (a += "\\"), r === void 0 ? i ? `\\${a}` : a : i ? `${r}\\${a}` : `${r}${a}`; }, isAbsolute(t) { - oe(t, "path"); + he(t, "path"); const e = t.length; if (e === 0) return !1; const n = t.charCodeAt(0); - return J(n) || // Possible device root - e > 2 && ht(n) && t.charCodeAt(1) === ct && J(t.charCodeAt(2)); + return X(n) || // Possible device root + e > 2 && ct(n) && t.charCodeAt(1) === lt && X(t.charCodeAt(2)); }, join(...t) { if (t.length === 0) @@ -1976,106 +1892,106 @@ const ue = { let e, n; for (let s = 0; s < t.length; ++s) { const a = t[s]; - oe(a, "path"), a.length > 0 && (e === void 0 ? e = n = a : e += `\\${a}`); + he(a, "path"), a.length > 0 && (e === void 0 ? e = n = a : e += `\\${a}`); } if (e === void 0) return "."; let r = !0, i = 0; - if (typeof n == "string" && J(n.charCodeAt(0))) { + if (typeof n == "string" && X(n.charCodeAt(0))) { ++i; const s = n.length; - s > 1 && J(n.charCodeAt(1)) && (++i, s > 2 && (J(n.charCodeAt(2)) ? ++i : r = !1)); + s > 1 && X(n.charCodeAt(1)) && (++i, s > 2 && (X(n.charCodeAt(2)) ? ++i : r = !1)); } if (r) { - for (; i < e.length && J(e.charCodeAt(i)); ) + for (; i < e.length && X(e.charCodeAt(i)); ) i++; i >= 2 && (e = `\\${e.slice(i)}`); } - return ue.normalize(e); + return Re.normalize(e); }, // It will solve the relative path from `from` to `to`, for instance: // from = 'C:\\orandea\\test\\aaa' // to = 'C:\\orandea\\impl\\bbb' // The output of the function should be: '..\\..\\impl\\bbb' relative(t, e) { - if (oe(t, "from"), oe(e, "to"), t === e) + if (he(t, "from"), he(e, "to"), t === e) return ""; - const n = ue.resolve(t), r = ue.resolve(e); + const n = Re.resolve(t), r = Re.resolve(e); if (n === r || (t = n.toLowerCase(), e = r.toLowerCase(), t === e)) return ""; let i = 0; - for (; i < t.length && t.charCodeAt(i) === Re; ) + for (; i < t.length && t.charCodeAt(i) === Ee; ) i++; let s = t.length; - for (; s - 1 > i && t.charCodeAt(s - 1) === Re; ) + for (; s - 1 > i && t.charCodeAt(s - 1) === Ee; ) s--; const a = s - i; let o = 0; - for (; o < e.length && e.charCodeAt(o) === Re; ) + for (; o < e.length && e.charCodeAt(o) === Ee; ) o++; let l = e.length; - for (; l - 1 > o && e.charCodeAt(l - 1) === Re; ) + for (; l - 1 > o && e.charCodeAt(l - 1) === Ee; ) l--; const c = l - o, h = a < c ? a : c; - let u = -1, f = 0; - for (; f < h; f++) { - const g = t.charCodeAt(i + f); - if (g !== e.charCodeAt(o + f)) + let u = -1, m = 0; + for (; m < h; m++) { + const g = t.charCodeAt(i + m); + if (g !== e.charCodeAt(o + m)) break; - g === Re && (u = f); + g === Ee && (u = m); } - if (f !== h) { + if (m !== h) { if (u === -1) return r; } else { if (c > h) { - if (e.charCodeAt(o + f) === Re) - return r.slice(o + f + 1); - if (f === 2) - return r.slice(o + f); + if (e.charCodeAt(o + m) === Ee) + return r.slice(o + m + 1); + if (m === 2) + return r.slice(o + m); } - a > h && (t.charCodeAt(i + f) === Re ? u = f : f === 2 && (u = 3)), u === -1 && (u = 0); + a > h && (t.charCodeAt(i + m) === Ee ? u = m : m === 2 && (u = 3)), u === -1 && (u = 0); } - let m = ""; - for (f = i + u + 1; f <= s; ++f) - (f === s || t.charCodeAt(f) === Re) && (m += m.length === 0 ? ".." : "\\.."); - return o += u, m.length > 0 ? `${m}${r.slice(o, l)}` : (r.charCodeAt(o) === Re && ++o, r.slice(o, l)); + let f = ""; + for (m = i + u + 1; m <= s; ++m) + (m === s || t.charCodeAt(m) === Ee) && (f += f.length === 0 ? ".." : "\\.."); + return o += u, f.length > 0 ? `${f}${r.slice(o, l)}` : (r.charCodeAt(o) === Ee && ++o, r.slice(o, l)); }, toNamespacedPath(t) { if (typeof t != "string" || t.length === 0) return t; - const e = ue.resolve(t); + const e = Re.resolve(t); if (e.length <= 2) return t; - if (e.charCodeAt(0) === Re) { - if (e.charCodeAt(1) === Re) { + if (e.charCodeAt(0) === Ee) { + if (e.charCodeAt(1) === Ee) { const n = e.charCodeAt(2); - if (n !== Jc && n !== vt) + if (n !== Jc && n !== bt) return `\\\\?\\UNC\\${e.slice(2)}`; } - } else if (ht(e.charCodeAt(0)) && e.charCodeAt(1) === ct && e.charCodeAt(2) === Re) + } else if (ct(e.charCodeAt(0)) && e.charCodeAt(1) === lt && e.charCodeAt(2) === Ee) return `\\\\?\\${e}`; return t; }, dirname(t) { - oe(t, "path"); + he(t, "path"); const e = t.length; if (e === 0) return "."; let n = -1, r = 0; const i = t.charCodeAt(0); if (e === 1) - return J(i) ? t : "."; - if (J(i)) { - if (n = r = 1, J(t.charCodeAt(1))) { + return X(i) ? t : "."; + if (X(i)) { + if (n = r = 1, X(t.charCodeAt(1))) { let o = 2, l = o; - for (; o < e && !J(t.charCodeAt(o)); ) + for (; o < e && !X(t.charCodeAt(o)); ) o++; if (o < e && o !== l) { - for (l = o; o < e && J(t.charCodeAt(o)); ) + for (l = o; o < e && X(t.charCodeAt(o)); ) o++; if (o < e && o !== l) { - for (l = o; o < e && !J(t.charCodeAt(o)); ) + for (l = o; o < e && !X(t.charCodeAt(o)); ) o++; if (o === e) return t; @@ -2084,10 +2000,10 @@ const ue = { } } } else - ht(i) && t.charCodeAt(1) === ct && (n = e > 2 && J(t.charCodeAt(2)) ? 3 : 2, r = n); + ct(i) && t.charCodeAt(1) === lt && (n = e > 2 && X(t.charCodeAt(2)) ? 3 : 2, r = n); let s = -1, a = !0; for (let o = e - 1; o >= r; --o) - if (J(t.charCodeAt(o))) { + if (X(t.charCodeAt(o))) { if (!a) { s = o; break; @@ -2102,15 +2018,15 @@ const ue = { return t.slice(0, s); }, basename(t, e) { - e !== void 0 && oe(e, "ext"), oe(t, "path"); + e !== void 0 && he(e, "ext"), he(t, "path"); let n = 0, r = -1, i = !0, s; - if (t.length >= 2 && ht(t.charCodeAt(0)) && t.charCodeAt(1) === ct && (n = 2), e !== void 0 && e.length > 0 && e.length <= t.length) { + if (t.length >= 2 && ct(t.charCodeAt(0)) && t.charCodeAt(1) === lt && (n = 2), e !== void 0 && e.length > 0 && e.length <= t.length) { if (e === t) return ""; let a = e.length - 1, o = -1; for (s = t.length - 1; s >= n; --s) { const l = t.charCodeAt(s); - if (J(l)) { + if (X(l)) { if (!i) { n = s + 1; break; @@ -2121,7 +2037,7 @@ const ue = { return n === r ? r = o : r === -1 && (r = t.length), t.slice(n, r); } for (s = t.length - 1; s >= n; --s) - if (J(t.charCodeAt(s))) { + if (X(t.charCodeAt(s))) { if (!i) { n = s + 1; break; @@ -2131,53 +2047,53 @@ const ue = { return r === -1 ? "" : t.slice(n, r); }, extname(t) { - oe(t, "path"); + he(t, "path"); let e = 0, n = -1, r = 0, i = -1, s = !0, a = 0; - t.length >= 2 && t.charCodeAt(1) === ct && ht(t.charCodeAt(0)) && (e = r = 2); + t.length >= 2 && t.charCodeAt(1) === lt && ct(t.charCodeAt(0)) && (e = r = 2); for (let o = t.length - 1; o >= e; --o) { const l = t.charCodeAt(o); - if (J(l)) { + if (X(l)) { if (!s) { r = o + 1; break; } continue; } - i === -1 && (s = !1, i = o + 1), l === vt ? n === -1 ? n = o : a !== 1 && (a = 1) : n !== -1 && (a = -1); + i === -1 && (s = !1, i = o + 1), l === bt ? n === -1 ? n = o : a !== 1 && (a = 1) : n !== -1 && (a = -1); } return n === -1 || i === -1 || // We saw a non-dot character immediately before the dot a === 0 || // The (right-most) trimmed path component is exactly '..' a === 1 && n === i - 1 && n === r + 1 ? "" : t.slice(n, i); }, - format: rl.bind(null, "\\"), + format: cl.bind(null, "\\"), parse(t) { - oe(t, "path"); + he(t, "path"); const e = { root: "", dir: "", base: "", ext: "", name: "" }; if (t.length === 0) return e; const n = t.length; let r = 0, i = t.charCodeAt(0); if (n === 1) - return J(i) ? (e.root = e.dir = t, e) : (e.base = e.name = t, e); - if (J(i)) { - if (r = 1, J(t.charCodeAt(1))) { - let u = 2, f = u; - for (; u < n && !J(t.charCodeAt(u)); ) + return X(i) ? (e.root = e.dir = t, e) : (e.base = e.name = t, e); + if (X(i)) { + if (r = 1, X(t.charCodeAt(1))) { + let u = 2, m = u; + for (; u < n && !X(t.charCodeAt(u)); ) u++; - if (u < n && u !== f) { - for (f = u; u < n && J(t.charCodeAt(u)); ) + if (u < n && u !== m) { + for (m = u; u < n && X(t.charCodeAt(u)); ) u++; - if (u < n && u !== f) { - for (f = u; u < n && !J(t.charCodeAt(u)); ) + if (u < n && u !== m) { + for (m = u; u < n && !X(t.charCodeAt(u)); ) u++; - u === n ? r = u : u !== f && (r = u + 1); + u === n ? r = u : u !== m && (r = u + 1); } } } - } else if (ht(i) && t.charCodeAt(1) === ct) { + } else if (ct(i) && t.charCodeAt(1) === lt) { if (n <= 2) return e.root = e.dir = t, e; - if (r = 2, J(t.charCodeAt(2))) { + if (r = 2, X(t.charCodeAt(2))) { if (n === 3) return e.root = e.dir = t, e; r = 3; @@ -2186,14 +2102,14 @@ const ue = { r > 0 && (e.root = t.slice(0, r)); let s = -1, a = r, o = -1, l = !0, c = t.length - 1, h = 0; for (; c >= r; --c) { - if (i = t.charCodeAt(c), J(i)) { + if (i = t.charCodeAt(c), X(i)) { if (!l) { a = c + 1; break; } continue; } - o === -1 && (l = !1, o = c + 1), i === vt ? s === -1 ? s = c : h !== 1 && (h = 1) : s !== -1 && (h = -1); + o === -1 && (l = !1, o = c + 1), i === bt ? s === -1 ? s = c : h !== 1 && (h = 1) : s !== -1 && (h = -1); } return o !== -1 && (s === -1 || // We saw a non-dot character immediately before the dot h === 0 || // The (right-most) trimmed path component is exactly '..' @@ -2204,32 +2120,32 @@ const ue = { win32: null, posix: null }, Yc = (() => { - if (Ae) { + if (yt) { const t = /\\/g; return () => { - const e = Jn().replace(t, "/"); + const e = Qn().replace(t, "/"); return e.slice(e.indexOf("/")); }; } - return () => Jn(); -})(), me = { + return () => Qn(); +})(), De = { // path.resolve([from ...], to) resolve(...t) { let e = "", n = !1; for (let r = t.length - 1; r >= -1 && !n; r--) { const i = r >= 0 ? t[r] : Yc(); - oe(i, "path"), i.length !== 0 && (e = `${i}/${e}`, n = i.charCodeAt(0) === ye); + he(i, "path"), i.length !== 0 && (e = `${i}/${e}`, n = i.charCodeAt(0) === we); } - return e = Xn(e, !n, "/", Br), n ? `/${e}` : e.length > 0 ? e : "."; + return e = Zn(e, !n, "/", Yr), n ? `/${e}` : e.length > 0 ? e : "."; }, normalize(t) { - if (oe(t, "path"), t.length === 0) + if (he(t, "path"), t.length === 0) return "."; - const e = t.charCodeAt(0) === ye, n = t.charCodeAt(t.length - 1) === ye; - return t = Xn(t, !e, "/", Br), t.length === 0 ? e ? "/" : n ? "./" : "." : (n && (t += "/"), e ? `/${t}` : t); + const e = t.charCodeAt(0) === we, n = t.charCodeAt(t.length - 1) === we; + return t = Zn(t, !e, "/", Yr), t.length === 0 ? e ? "/" : n ? "./" : "." : (n && (t += "/"), e ? `/${t}` : t); }, isAbsolute(t) { - return oe(t, "path"), t.length > 0 && t.charCodeAt(0) === ye; + return he(t, "path"), t.length > 0 && t.charCodeAt(0) === we; }, join(...t) { if (t.length === 0) @@ -2237,12 +2153,12 @@ const ue = { let e; for (let n = 0; n < t.length; ++n) { const r = t[n]; - oe(r, "path"), r.length > 0 && (e === void 0 ? e = r : e += `/${r}`); + he(r, "path"), r.length > 0 && (e === void 0 ? e = r : e += `/${r}`); } - return e === void 0 ? "." : me.normalize(e); + return e === void 0 ? "." : De.normalize(e); }, relative(t, e) { - if (oe(t, "from"), oe(e, "to"), t === e || (t = me.resolve(t), e = me.resolve(e), t === e)) + if (he(t, "from"), he(e, "to"), t === e || (t = De.resolve(t), e = De.resolve(e), t === e)) return ""; const n = 1, r = t.length, i = r - n, s = 1, a = e.length - s, o = i < a ? i : a; let l = -1, c = 0; @@ -2250,31 +2166,31 @@ const ue = { const u = t.charCodeAt(n + c); if (u !== e.charCodeAt(s + c)) break; - u === ye && (l = c); + u === we && (l = c); } if (c === o) if (a > o) { - if (e.charCodeAt(s + c) === ye) + if (e.charCodeAt(s + c) === we) return e.slice(s + c + 1); if (c === 0) return e.slice(s + c); } else - i > o && (t.charCodeAt(n + c) === ye ? l = c : c === 0 && (l = 0)); + i > o && (t.charCodeAt(n + c) === we ? l = c : c === 0 && (l = 0)); let h = ""; for (c = n + l + 1; c <= r; ++c) - (c === r || t.charCodeAt(c) === ye) && (h += h.length === 0 ? ".." : "/.."); + (c === r || t.charCodeAt(c) === we) && (h += h.length === 0 ? ".." : "/.."); return `${h}${e.slice(s + l)}`; }, toNamespacedPath(t) { return t; }, dirname(t) { - if (oe(t, "path"), t.length === 0) + if (he(t, "path"), t.length === 0) return "."; - const e = t.charCodeAt(0) === ye; + const e = t.charCodeAt(0) === we; let n = -1, r = !0; for (let i = t.length - 1; i >= 1; --i) - if (t.charCodeAt(i) === ye) { + if (t.charCodeAt(i) === we) { if (!r) { n = i; break; @@ -2284,7 +2200,7 @@ const ue = { return n === -1 ? e ? "/" : "." : e && n === 1 ? "//" : t.slice(0, n); }, basename(t, e) { - e !== void 0 && oe(e, "ext"), oe(t, "path"); + e !== void 0 && he(e, "ext"), he(t, "path"); let n = 0, r = -1, i = !0, s; if (e !== void 0 && e.length > 0 && e.length <= t.length) { if (e === t) @@ -2292,7 +2208,7 @@ const ue = { let a = e.length - 1, o = -1; for (s = t.length - 1; s >= 0; --s) { const l = t.charCodeAt(s); - if (l === ye) { + if (l === we) { if (!i) { n = s + 1; break; @@ -2303,7 +2219,7 @@ const ue = { return n === r ? r = o : r === -1 && (r = t.length), t.slice(n, r); } for (s = t.length - 1; s >= 0; --s) - if (t.charCodeAt(s) === ye) { + if (t.charCodeAt(s) === we) { if (!i) { n = s + 1; break; @@ -2313,43 +2229,43 @@ const ue = { return r === -1 ? "" : t.slice(n, r); }, extname(t) { - oe(t, "path"); + he(t, "path"); let e = -1, n = 0, r = -1, i = !0, s = 0; for (let a = t.length - 1; a >= 0; --a) { const o = t.charCodeAt(a); - if (o === ye) { + if (o === we) { if (!i) { n = a + 1; break; } continue; } - r === -1 && (i = !1, r = a + 1), o === vt ? e === -1 ? e = a : s !== 1 && (s = 1) : e !== -1 && (s = -1); + r === -1 && (i = !1, r = a + 1), o === bt ? e === -1 ? e = a : s !== 1 && (s = 1) : e !== -1 && (s = -1); } return e === -1 || r === -1 || // We saw a non-dot character immediately before the dot s === 0 || // The (right-most) trimmed path component is exactly '..' s === 1 && e === r - 1 && e === n + 1 ? "" : t.slice(e, r); }, - format: rl.bind(null, "/"), + format: cl.bind(null, "/"), parse(t) { - oe(t, "path"); + he(t, "path"); const e = { root: "", dir: "", base: "", ext: "", name: "" }; if (t.length === 0) return e; - const n = t.charCodeAt(0) === ye; + const n = t.charCodeAt(0) === we; let r; n ? (e.root = "/", r = 1) : r = 0; let i = -1, s = 0, a = -1, o = !0, l = t.length - 1, c = 0; for (; l >= r; --l) { const h = t.charCodeAt(l); - if (h === ye) { + if (h === we) { if (!o) { s = l + 1; break; } continue; } - a === -1 && (o = !1, a = l + 1), h === vt ? i === -1 ? i = l : c !== 1 && (c = 1) : i !== -1 && (c = -1); + a === -1 && (o = !1, a = l + 1), h === bt ? i === -1 ? i = l : c !== 1 && (c = 1) : i !== -1 && (c = -1); } if (a !== -1) { const h = s === 0 && n ? 1 : s; @@ -2364,23 +2280,17 @@ const ue = { win32: null, posix: null }; -me.win32 = ue.win32 = ue; -me.posix = ue.posix = me; -Ae ? ue.normalize : me.normalize; -Ae ? ue.isAbsolute : me.isAbsolute; -Ae ? ue.join : me.join; -Ae ? ue.resolve : me.resolve; -Ae ? ue.relative : me.relative; -Ae ? ue.dirname : me.dirname; -Ae ? ue.basename : me.basename; -Ae ? ue.extname : me.extname; -Ae ? ue.format : me.format; -Ae ? ue.parse : me.parse; -Ae ? ue.toNamespacedPath : me.toNamespacedPath; -Ae ? ue.sep : me.sep; -Ae ? ue.delimiter : me.delimiter; +De.win32 = Re.win32 = Re; +De.posix = Re.posix = De; +yt ? Re.normalize : De.normalize; +yt ? Re.resolve : De.resolve; +yt ? Re.relative : De.relative; +yt ? Re.dirname : De.dirname; +yt ? Re.basename : De.basename; +yt ? Re.extname : De.extname; +yt ? Re.sep : De.sep; const Kc = /^\w[\w\d+.-]*$/, Qc = /^\//, Zc = /^\/\//; -function ns(t, e) { +function eh(t, e) { if (!t.scheme && e) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`); if (t.scheme && !Kc.test(t.scheme)) @@ -2393,10 +2303,10 @@ function ns(t, e) { throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); } } -function eh(t, e) { +function th(t, e) { return !t && !e ? "file" : t; } -function th(t, e) { +function nh(t, e) { switch (t) { case "https": case "http": @@ -2406,16 +2316,16 @@ function th(t, e) { } return e; } -const ie = "", $e = "/", nh = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; -let Ci = class Vn { +const ae = "", $e = "/", rh = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; +let Ni = class Hn { static isUri(e) { - return e instanceof Vn ? !0 : e ? typeof e.authority == "string" && typeof e.fragment == "string" && typeof e.path == "string" && typeof e.query == "string" && typeof e.scheme == "string" && typeof e.fsPath == "string" && typeof e.with == "function" && typeof e.toString == "function" : !1; + return e instanceof Hn ? !0 : e ? typeof e.authority == "string" && typeof e.fragment == "string" && typeof e.path == "string" && typeof e.query == "string" && typeof e.scheme == "string" && typeof e.fsPath == "string" && typeof e.with == "function" && typeof e.toString == "function" : !1; } /** * @internal */ constructor(e, n, r, i, s, a = !1) { - typeof e == "object" ? (this.scheme = e.scheme || ie, this.authority = e.authority || ie, this.path = e.path || ie, this.query = e.query || ie, this.fragment = e.fragment || ie) : (this.scheme = eh(e, a), this.authority = n || ie, this.path = th(this.scheme, r || ie), this.query = i || ie, this.fragment = s || ie, ns(this, a)); + typeof e == "object" ? (this.scheme = e.scheme || ae, this.authority = e.authority || ae, this.path = e.path || ae, this.query = e.query || ae, this.fragment = e.fragment || ae) : (this.scheme = th(e, a), this.authority = n || ae, this.path = nh(this.scheme, r || ae), this.query = i || ae, this.fragment = s || ae, eh(this, a)); } // ---- filesystem path ----------------------- /** @@ -2443,14 +2353,14 @@ let Ci = class Vn { * with URIs that represent files on disk (`file` scheme). */ get fsPath() { - return jr(this, !1); + return Kr(this, !1); } // ---- modify to new ------------------------- with(e) { if (!e) return this; let { scheme: n, authority: r, path: i, query: s, fragment: a } = e; - return n === void 0 ? n = this.scheme : n === null && (n = ie), r === void 0 ? r = this.authority : r === null && (r = ie), i === void 0 ? i = this.path : i === null && (i = ie), s === void 0 ? s = this.query : s === null && (s = ie), a === void 0 ? a = this.fragment : a === null && (a = ie), n === this.scheme && r === this.authority && i === this.path && s === this.query && a === this.fragment ? this : new Nt(n, r, i, s, a); + return n === void 0 ? n = this.scheme : n === null && (n = ae), r === void 0 ? r = this.authority : r === null && (r = ae), i === void 0 ? i = this.path : i === null && (i = ae), s === void 0 ? s = this.query : s === null && (s = ae), a === void 0 ? a = this.fragment : a === null && (a = ae), n === this.scheme && r === this.authority && i === this.path && s === this.query && a === this.fragment ? this : new Mt(n, r, i, s, a); } // ---- parse & validate ------------------------ /** @@ -2460,8 +2370,8 @@ let Ci = class Vn { * @param value A string which represents an URI (see `URI#toString`). */ static parse(e, n = !1) { - const r = nh.exec(e); - return r ? new Nt(r[2] || ie, Dn(r[4] || ie), Dn(r[5] || ie), Dn(r[7] || ie), Dn(r[9] || ie), n) : new Nt(ie, ie, ie, ie, ie); + const r = rh.exec(e); + return r ? new Mt(r[2] || ae, Ln(r[4] || ae), Ln(r[5] || ae), Ln(r[7] || ae), Ln(r[9] || ae), n) : new Mt(ae, ae, ae, ae, ae); } /** * Creates a new URI from a file system path, e.g. `c:\my\files`, @@ -2485,16 +2395,22 @@ let Ci = class Vn { * @param path A file system path (see `URI#fsPath`) */ static file(e) { - let n = ie; - if (pn && (e = e.replace(/\\/g, $e)), e[0] === $e && e[1] === $e) { + let n = ae; + if (bn && (e = e.replace(/\\/g, $e)), e[0] === $e && e[1] === $e) { const r = e.indexOf($e, 2); r === -1 ? (n = e.substring(2), e = $e) : (n = e.substring(2, r), e = e.substring(r) || $e); } - return new Nt("file", n, e, ie, ie); + return new Mt("file", n, e, ae, ae); } - static from(e) { - const n = new Nt(e.scheme, e.authority, e.path, e.query, e.fragment); - return ns(n, !0), n; + /** + * Creates new URI from uri components. + * + * Unless `strict` is `true` the scheme is defaults to be `file`. This function performs + * validation and should be used for untrusted uri components retrieved from storage, + * user input, command arguments etc + */ + static from(e, n) { + return new Mt(e.scheme, e.authority, e.path, e.query, e.fragment, n); } /** * Join a URI path with path fragments and normalizes the resulting path. @@ -2507,7 +2423,7 @@ let Ci = class Vn { if (!e.path) throw new Error("[UriError]: cannot call joinPath on URI without path"); let r; - return pn && e.scheme === "file" ? r = Vn.file(ue.join(jr(e, !0), ...n)).path : r = me.join(e.path, ...n), e.with({ path: r }); + return bn && e.scheme === "file" ? r = Hn.file(Re.join(Kr(e, !0), ...n)).path : r = De.join(e.path, ...n), e.with({ path: r }); } // ---- printing/externalize --------------------------- /** @@ -2522,121 +2438,65 @@ let Ci = class Vn { * @param skipEncoding Do not encode the result, default is `false` */ toString(e = !1) { - return qr(this, e); + return Qr(this, e); } toJSON() { return this; } static revive(e) { + var n, r; if (e) { - if (e instanceof Vn) + if (e instanceof Hn) return e; { - const n = new Nt(e); - return n._formatted = e.external, n._fsPath = e._sep === il ? e.fsPath : null, n; + const i = new Mt(e); + return i._formatted = (n = e.external) !== null && n !== void 0 ? n : null, i._fsPath = e._sep === hl && (r = e.fsPath) !== null && r !== void 0 ? r : null, i; } } else return e; } }; -const il = pn ? 1 : void 0; -class Nt extends Ci { +const hl = bn ? 1 : void 0; +class Mt extends Ni { constructor() { super(...arguments), this._formatted = null, this._fsPath = null; } get fsPath() { - return this._fsPath || (this._fsPath = jr(this, !1)), this._fsPath; + return this._fsPath || (this._fsPath = Kr(this, !1)), this._fsPath; } toString(e = !1) { - return e ? qr(this, !0) : (this._formatted || (this._formatted = qr(this, !1)), this._formatted); + return e ? Qr(this, !0) : (this._formatted || (this._formatted = Qr(this, !1)), this._formatted); } toJSON() { const e = { $mid: 1 /* MarshalledId.Uri */ }; - return this._fsPath && (e.fsPath = this._fsPath, e._sep = il), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e; + return this._fsPath && (e.fsPath = this._fsPath, e._sep = hl), this._formatted && (e.external = this._formatted), this.path && (e.path = this.path), this.scheme && (e.scheme = this.scheme), this.authority && (e.authority = this.authority), this.query && (e.query = this.query), this.fragment && (e.fragment = this.fragment), e; } } -const sl = { - [ - 58 - /* CharCode.Colon */ - ]: "%3A", - [ - 47 - /* CharCode.Slash */ - ]: "%2F", - [ - 63 - /* CharCode.QuestionMark */ - ]: "%3F", - [ - 35 - /* CharCode.Hash */ - ]: "%23", - [ - 91 - /* CharCode.OpenSquareBracket */ - ]: "%5B", - [ - 93 - /* CharCode.CloseSquareBracket */ - ]: "%5D", - [ - 64 - /* CharCode.AtSign */ - ]: "%40", - [ - 33 - /* CharCode.ExclamationMark */ - ]: "%21", - [ - 36 - /* CharCode.DollarSign */ - ]: "%24", - [ - 38 - /* CharCode.Ampersand */ - ]: "%26", - [ - 39 - /* CharCode.SingleQuote */ - ]: "%27", - [ - 40 - /* CharCode.OpenParen */ - ]: "%28", - [ - 41 - /* CharCode.CloseParen */ - ]: "%29", - [ - 42 - /* CharCode.Asterisk */ - ]: "%2A", - [ - 43 - /* CharCode.Plus */ - ]: "%2B", - [ - 44 - /* CharCode.Comma */ - ]: "%2C", - [ - 59 - /* CharCode.Semicolon */ - ]: "%3B", - [ - 61 - /* CharCode.Equals */ - ]: "%3D", - [ - 32 - /* CharCode.Space */ - ]: "%20" +const dl = { + 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" }; -function rs(t, e, n) { +function hs(t, e, n) { let r, i = -1; for (let s = 0; s < t.length; s++) { const a = t.charCodeAt(s); @@ -2644,26 +2504,26 @@ function rs(t, e, n) { i !== -1 && (r += encodeURIComponent(t.substring(i, s)), i = -1), r !== void 0 && (r += t.charAt(s)); else { r === void 0 && (r = t.substr(0, s)); - const o = sl[a]; + const o = dl[a]; o !== void 0 ? (i !== -1 && (r += encodeURIComponent(t.substring(i, s)), i = -1), r += o) : i === -1 && (i = s); } } return i !== -1 && (r += encodeURIComponent(t.substring(i))), r !== void 0 ? r : t; } -function rh(t) { +function ih(t) { let e; for (let n = 0; n < t.length; n++) { const r = t.charCodeAt(n); - r === 35 || r === 63 ? (e === void 0 && (e = t.substr(0, n)), e += sl[r]) : e !== void 0 && (e += t[n]); + r === 35 || r === 63 ? (e === void 0 && (e = t.substr(0, n)), e += dl[r]) : e !== void 0 && (e += t[n]); } return e !== void 0 ? e : t; } -function jr(t, e) { +function Kr(t, e) { let n; - return t.authority && t.path.length > 1 && t.scheme === "file" ? n = `//${t.authority}${t.path}` : t.path.charCodeAt(0) === 47 && (t.path.charCodeAt(1) >= 65 && t.path.charCodeAt(1) <= 90 || t.path.charCodeAt(1) >= 97 && t.path.charCodeAt(1) <= 122) && t.path.charCodeAt(2) === 58 ? e ? n = t.path.substr(1) : n = t.path[1].toLowerCase() + t.path.substr(2) : n = t.path, pn && (n = n.replace(/\//g, "\\")), n; + return t.authority && t.path.length > 1 && t.scheme === "file" ? n = `//${t.authority}${t.path}` : t.path.charCodeAt(0) === 47 && (t.path.charCodeAt(1) >= 65 && t.path.charCodeAt(1) <= 90 || t.path.charCodeAt(1) >= 97 && t.path.charCodeAt(1) <= 122) && t.path.charCodeAt(2) === 58 ? e ? n = t.path.substr(1) : n = t.path[1].toLowerCase() + t.path.substr(2) : n = t.path, bn && (n = n.replace(/\//g, "\\")), n; } -function qr(t, e) { - const n = e ? rh : rs; +function Qr(t, e) { + const n = e ? ih : hs; let r = "", { scheme: i, authority: s, path: a, query: o, fragment: l } = t; if (i && (r += i, r += ":"), (s || i === "file") && (r += $e, r += $e), s) { let c = s.indexOf("@"); @@ -2683,20 +2543,20 @@ function qr(t, e) { } r += n(a, !0, !1); } - return o && (r += "?", r += n(o, !1, !1)), l && (r += "#", r += e ? l : rs(l, !1, !1)), r; + return o && (r += "?", r += n(o, !1, !1)), l && (r += "#", r += e ? l : hs(l, !1, !1)), r; } -function al(t) { +function ul(t) { try { return decodeURIComponent(t); } catch { - return t.length > 3 ? t.substr(0, 3) + al(t.substr(3)) : t; + return t.length > 3 ? t.substr(0, 3) + ul(t.substr(3)) : t; } } -const is = /(%[0-9A-Za-z][0-9A-Za-z])+/g; -function Dn(t) { - return t.match(is) ? t.replace(is, (e) => al(e)) : t; +const ds = /(%[0-9A-Za-z][0-9A-Za-z])+/g; +function Ln(t) { + return t.match(ds) ? t.replace(ds, (e) => ul(e)) : t; } -let Ge = class Ct { +let Ke = class Ct { constructor(e, n) { this.lineNumber = e, this.column = n; } @@ -2794,7 +2654,7 @@ let Ge = class Ct { static isIPosition(e) { return e && typeof e.lineNumber == "number" && typeof e.column == "number"; } -}, Ee = class ce { +}, Ae = class ue { constructor(e, n, r, i) { e > r || e === r && n > i ? (this.startLineNumber = r, this.startColumn = i, this.endLineNumber = e, this.endColumn = n) : (this.startLineNumber = e, this.startColumn = n, this.endLineNumber = r, this.endColumn = i); } @@ -2802,7 +2662,7 @@ let Ge = class Ct { * Test if this range is empty. */ isEmpty() { - return ce.isEmpty(this); + return ue.isEmpty(this); } /** * Test if `range` is empty. @@ -2814,7 +2674,7 @@ let Ge = class Ct { * Test if position is in this range. If the position is at the edges, will return true. */ containsPosition(e) { - return ce.containsPosition(this, e); + return ue.containsPosition(this, e); } /** * Test if `position` is in `range`. If the position is at the edges, will return true. @@ -2833,7 +2693,7 @@ let Ge = class Ct { * Test if range is in this range. If the range is equal to this range, will return true. */ containsRange(e) { - return ce.containsRange(this, e); + return ue.containsRange(this, e); } /** * Test if `otherRange` is in `range`. If the ranges are equal, will return true. @@ -2845,7 +2705,7 @@ let Ge = class Ct { * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. */ strictContainsRange(e) { - return ce.strictContainsRange(this, e); + return ue.strictContainsRange(this, e); } /** * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false. @@ -2858,7 +2718,7 @@ let Ge = class Ct { * The smallest position will be used as the start point, and the largest one as the end point. */ plusRange(e) { - return ce.plusRange(this, e); + return ue.plusRange(this, e); } /** * A reunion of the two ranges. @@ -2866,13 +2726,13 @@ let Ge = class Ct { */ static plusRange(e, n) { let r, i, s, a; - return n.startLineNumber < e.startLineNumber ? (r = n.startLineNumber, i = n.startColumn) : n.startLineNumber === e.startLineNumber ? (r = n.startLineNumber, i = Math.min(n.startColumn, e.startColumn)) : (r = e.startLineNumber, i = e.startColumn), n.endLineNumber > e.endLineNumber ? (s = n.endLineNumber, a = n.endColumn) : n.endLineNumber === e.endLineNumber ? (s = n.endLineNumber, a = Math.max(n.endColumn, e.endColumn)) : (s = e.endLineNumber, a = e.endColumn), new ce(r, i, s, a); + return n.startLineNumber < e.startLineNumber ? (r = n.startLineNumber, i = n.startColumn) : n.startLineNumber === e.startLineNumber ? (r = n.startLineNumber, i = Math.min(n.startColumn, e.startColumn)) : (r = e.startLineNumber, i = e.startColumn), n.endLineNumber > e.endLineNumber ? (s = n.endLineNumber, a = n.endColumn) : n.endLineNumber === e.endLineNumber ? (s = n.endLineNumber, a = Math.max(n.endColumn, e.endColumn)) : (s = e.endLineNumber, a = e.endColumn), new ue(r, i, s, a); } /** * A intersection of the two ranges. */ intersectRanges(e) { - return ce.intersectRanges(this, e); + return ue.intersectRanges(this, e); } /** * A intersection of the two ranges. @@ -2880,13 +2740,13 @@ let Ge = class Ct { static intersectRanges(e, n) { let r = e.startLineNumber, i = e.startColumn, s = e.endLineNumber, a = e.endColumn; const o = n.startLineNumber, l = n.startColumn, c = n.endLineNumber, h = n.endColumn; - return r < o ? (r = o, i = l) : r === o && (i = Math.max(i, l)), s > c ? (s = c, a = h) : s === c && (a = Math.min(a, h)), r > s || r === s && i > a ? null : new ce(r, i, s, a); + return r < o ? (r = o, i = l) : r === o && (i = Math.max(i, l)), s > c ? (s = c, a = h) : s === c && (a = Math.min(a, h)), r > s || r === s && i > a ? null : new ue(r, i, s, a); } /** * Test if this range equals other. */ equalsRange(e) { - return ce.equalsRange(this, e); + return ue.equalsRange(this, e); } /** * Test if range `a` equals `b`. @@ -2898,25 +2758,25 @@ let Ge = class Ct { * Return the end position (which will be after or equal to the start position) */ getEndPosition() { - return ce.getEndPosition(this); + return ue.getEndPosition(this); } /** * Return the end position (which will be after or equal to the start position) */ static getEndPosition(e) { - return new Ge(e.endLineNumber, e.endColumn); + return new Ke(e.endLineNumber, e.endColumn); } /** * Return the start position (which will be before or equal to the end position) */ getStartPosition() { - return ce.getStartPosition(this); + return ue.getStartPosition(this); } /** * Return the start position (which will be before or equal to the end position) */ static getStartPosition(e) { - return new Ge(e.startLineNumber, e.startColumn); + return new Ke(e.startLineNumber, e.startColumn); } /** * Transform to a user presentable string representation. @@ -2928,50 +2788,50 @@ let Ge = class Ct { * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position. */ setEndPosition(e, n) { - return new ce(this.startLineNumber, this.startColumn, e, n); + return new ue(this.startLineNumber, this.startColumn, e, n); } /** * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. */ setStartPosition(e, n) { - return new ce(e, n, this.endLineNumber, this.endColumn); + return new ue(e, n, this.endLineNumber, this.endColumn); } /** * Create a new empty range using this range's start position. */ collapseToStart() { - return ce.collapseToStart(this); + return ue.collapseToStart(this); } /** * Create a new empty range using this range's start position. */ static collapseToStart(e) { - return new ce(e.startLineNumber, e.startColumn, e.startLineNumber, e.startColumn); + return new ue(e.startLineNumber, e.startColumn, e.startLineNumber, e.startColumn); } /** * Create a new empty range using this range's end position. */ collapseToEnd() { - return ce.collapseToEnd(this); + return ue.collapseToEnd(this); } /** * Create a new empty range using this range's end position. */ static collapseToEnd(e) { - return new ce(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn); + return new ue(e.endLineNumber, e.endColumn, e.endLineNumber, e.endColumn); } /** * Moves the range by the given amount of lines. */ delta(e) { - return new ce(this.startLineNumber + e, this.startColumn, this.endLineNumber + e, this.endColumn); + return new ue(this.startLineNumber + e, this.startColumn, this.endLineNumber + e, this.endColumn); } // --- static fromPositions(e, n = e) { - return new ce(e.lineNumber, e.column, n.lineNumber, n.column); + return new ue(e.lineNumber, e.column, n.lineNumber, n.column); } static lift(e) { - return e ? new ce(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : null; + return e ? new ue(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : null; } /** * Test if `obj` is an `IRange`. @@ -3003,8 +2863,8 @@ let Ge = class Ct { if (o === l) { const c = e.endLineNumber | 0, h = n.endLineNumber | 0; if (c === h) { - const u = e.endColumn | 0, f = n.endColumn | 0; - return u - f; + const u = e.endColumn | 0, m = n.endColumn | 0; + return u - m; } return c - h; } @@ -3031,35 +2891,60 @@ let Ge = class Ct { return this; } }; -globalThis && globalThis.__awaiter; -var ss; +function sh(t, e, n = (r, i) => r === i) { + if (t === e) + return !0; + if (!t || !e || t.length !== e.length) + return !1; + for (let r = 0, i = t.length; r < i; r++) + if (!n(t[r], e[r])) + return !1; + return !0; +} +function us(t, e) { + for (let n = t.length - 1; n >= 0; n--) { + const r = t[n]; + if (e(r)) + return n; + } + return -1; +} +var er; (function(t) { - function e(i) { - return i < 0; + function e(s) { + return s < 0; } t.isLessThan = e; - function n(i) { - return i > 0; + function n(s) { + return s <= 0; } - t.isGreaterThan = n; - function r(i) { - return i === 0; + t.isLessThanOrEqual = n; + function r(s) { + return s > 0; } - t.isNeitherLessOrGreaterThan = r, t.greaterThan = 1, t.lessThan = -1, t.neitherLessOrGreaterThan = 0; -})(ss || (ss = {})); -function as(t) { + t.isGreaterThan = r; + function i(s) { + return s === 0; + } + t.isNeitherLessOrGreaterThan = i, t.greaterThan = 1, t.lessThan = -1, t.neitherLessOrGreaterThan = 0; +})(er || (er = {})); +function _r(t, e) { + return (n, r) => e(t(n), t(r)); +} +const In = (t, e) => t - e; +function ah(t) { + return (e, n) => -t(e, n); +} +function ps(t) { return t < 0 ? 0 : t > 255 ? 255 : t | 0; } function zt(t) { return t < 0 ? 0 : t > 4294967295 ? 4294967295 : t | 0; } -class ih { +class oh { constructor(e) { this.values = e, this.prefixSum = new Uint32Array(e.length), this.prefixSumValidIndex = new Int32Array(1), this.prefixSumValidIndex[0] = -1; } - getCount() { - return this.values.length; - } insertValues(e, n) { e = zt(e); const r = this.values, i = this.prefixSum, s = n.length; @@ -3105,15 +2990,15 @@ class ih { n = i + 1; else break; - return new sh(i, e - a); + return new lh(i, e - a); } } -class sh { +class lh { constructor(e, n) { this.index = e, this.remainder = n, this._prefixSumIndexOfResultBrand = void 0, this.index = e, this.remainder = n; } } -class ah { +class ch { constructor(e, n, r, i) { this._uri = e, this._lines = n, this._eol = r, this._versionId = i, this._lineStarts = null, this._cachedTextValue = null; } @@ -3130,7 +3015,7 @@ class ah { e.eol && e.eol !== this._eol && (this._eol = e.eol, this._lineStarts = null); const n = e.changes; for (const r of n) - this._acceptDeleteRange(r.range), this._acceptInsertText(new Ge(r.range.startLineNumber, r.range.startColumn), r.text); + this._acceptDeleteRange(r.range), this._acceptInsertText(new Ke(r.range.startLineNumber, r.range.startColumn), r.text); this._versionId = e.versionId, this._cachedTextValue = null; } _ensureLineStarts() { @@ -3138,7 +3023,7 @@ class ah { const e = this._eol.length, n = this._lines.length, r = new Uint32Array(n); for (let i = 0; i < n; i++) r[i] = this._lines[i].length + e; - this._lineStarts = new ih(r); + this._lineStarts = new oh(r); } } /** @@ -3171,16 +3056,16 @@ class ah { this._lineStarts && this._lineStarts.insertValues(e.lineNumber, i); } } -const oh = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; -function lh(t = "") { +const hh = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; +function dh(t = "") { let e = "(-?\\d*\\.\\d\\w*)|([^"; - for (const n of oh) + for (const n of hh) t.indexOf(n) >= 0 || (e += "\\" + n); return e += "\\s]+)", new RegExp(e, "g"); } -const ol = lh(); -function ch(t) { - let e = ol; +const pl = dh(); +function uh(t) { + let e = pl; if (t && t instanceof RegExp) if (t.global) e = t; @@ -3190,23 +3075,23 @@ function ch(t) { } return e.lastIndex = 0, e; } -const ll = new Hn(); -ll.unshift({ +const fl = new sc(); +fl.unshift({ maxLen: 1e3, windowSize: 15, timeBudget: 150 }); -function ki(t, e, n, r, i) { - if (i || (i = qn.first(ll)), n.length > i.maxLen) { +function Mi(t, e, n, r, i) { + if (i || (i = Kn.first(fl)), n.length > i.maxLen) { let c = t - i.maxLen / 2; - return c < 0 ? c = 0 : r += c, n = n.substring(c, t + i.maxLen / 2), ki(t, e, n, r, i); + return c < 0 ? c = 0 : r += c, n = n.substring(c, t + i.maxLen / 2), Mi(t, e, n, r, i); } const s = Date.now(), a = t - 1 - r; let o = -1, l = null; for (let c = 1; !(Date.now() - s >= i.timeBudget); c++) { const h = a - i.windowSize * c; e.lastIndex = Math.max(0, h); - const u = hh(e, n, a, o); + const u = ph(e, n, a, o); if (!u && l || (l = u, h <= 0)) break; o = h; @@ -3221,7 +3106,7 @@ function ki(t, e, n, r, i) { } return null; } -function hh(t, e, n, r) { +function ph(t, e, n, r) { let i; for (; i = t.exec(e); ) { const s = i.index || 0; @@ -3232,17 +3117,17 @@ function hh(t, e, n, r) { } return null; } -class _i { +class zi { constructor(e) { - const n = as(e); - this._defaultValue = n, this._asciiMap = _i._createAsciiMap(n), this._map = /* @__PURE__ */ new Map(); + const n = ps(e); + this._defaultValue = n, this._asciiMap = zi._createAsciiMap(n), this._map = /* @__PURE__ */ new Map(); } static _createAsciiMap(e) { const n = new Uint8Array(256); return n.fill(e), n; } set(e, n) { - const r = as(n); + const r = ps(n); e >= 0 && e < 256 ? this._asciiMap[e] = r : this._map.set(e, r); } get(e) { @@ -3252,7 +3137,7 @@ class _i { this._asciiMap.fill(this._defaultValue), this._map.clear(); } } -class dh { +class fh { constructor(e, n, r) { const i = new Uint8Array(e * n); for (let s = 0, a = e * n; s < a; s++) @@ -3266,7 +3151,7 @@ class dh { this._data[e * this.cols + n] = r; } } -class uh { +class mh { constructor(e) { let n = 0, r = 0; for (let s = 0, a = e.length; s < a; s++) { @@ -3274,7 +3159,7 @@ class uh { l > n && (n = l), o > r && (r = o), c > r && (r = c); } n++, r++; - const i = new dh( + const i = new fh( r, n, 0 @@ -3290,9 +3175,9 @@ class uh { return n < 0 || n >= this._maxCharCode ? 0 : this._states.get(e, n); } } -let vr = null; -function ph() { - return vr === null && (vr = new uh([ +let Rr = null; +function gh() { + return Rr === null && (Rr = new mh([ [ 1, 104, @@ -3425,33 +3310,33 @@ function ph() { 12 /* State.End */ ] - ])), vr; + ])), Rr; } -let Kt = null; -function fh() { - if (Kt === null) { - Kt = new _i( +let Zt = null; +function bh() { + if (Zt === null) { + Zt = new zi( 0 /* CharacterClass.None */ ); const t = ` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`; for (let n = 0; n < t.length; n++) - Kt.set( + Zt.set( t.charCodeAt(n), 1 /* CharacterClass.ForceTermination */ ); const e = ".,;:"; for (let n = 0; n < e.length; n++) - Kt.set( + Zt.set( e.charCodeAt(n), 2 /* CharacterClass.CannotEndIn */ ); } - return Kt; + return Zt; } -class Yn { +class tr { static _createLink(e, n, r, i, s) { let a = s - 1; do { @@ -3474,69 +3359,69 @@ class Yn { url: n.substring(i, a + 1) }; } - static computeLinks(e, n = ph()) { - const r = fh(), i = []; + static computeLinks(e, n = gh()) { + const r = bh(), i = []; for (let s = 1, a = e.getLineCount(); s <= a; s++) { const o = e.getLineContent(s), l = o.length; - let c = 0, h = 0, u = 0, f = 1, m = !1, g = !1, b = !1, y = !1; + let c = 0, h = 0, u = 0, m = 1, f = !1, g = !1, b = !1, y = !1; for (; c < l; ) { - let w = !1; - const x = o.charCodeAt(c); - if (f === 13) { - let k; - switch (x) { + let x = !1; + const S = o.charCodeAt(c); + if (m === 13) { + let w; + switch (S) { case 40: - m = !0, k = 0; + f = !0, w = 0; break; case 41: - k = m ? 0 : 1; + w = f ? 0 : 1; break; case 91: - b = !0, g = !0, k = 0; + b = !0, g = !0, w = 0; break; case 93: - b = !1, k = g ? 0 : 1; + b = !1, w = g ? 0 : 1; break; case 123: - y = !0, k = 0; + y = !0, w = 0; break; case 125: - k = y ? 0 : 1; + w = y ? 0 : 1; break; case 39: case 34: case 96: - u === x ? k = 1 : u === 39 || u === 34 || u === 96 ? k = 0 : k = 1; + u === S ? w = 1 : u === 39 || u === 34 || u === 96 ? w = 0 : w = 1; break; case 42: - k = u === 42 ? 1 : 0; + w = u === 42 ? 1 : 0; break; case 124: - k = u === 124 ? 1 : 0; + w = u === 124 ? 1 : 0; break; case 32: - k = b ? 0 : 1; + w = b ? 0 : 1; break; default: - k = r.get(x); + w = r.get(S); } - k === 1 && (i.push(Yn._createLink(r, o, s, h, c)), w = !0); - } else if (f === 12) { - let k; - x === 91 ? (g = !0, k = 0) : k = r.get(x), k === 1 ? w = !0 : f = 13; + w === 1 && (i.push(tr._createLink(r, o, s, h, c)), x = !0); + } else if (m === 12) { + let w; + S === 91 ? (g = !0, w = 0) : w = r.get(S), w === 1 ? x = !0 : m = 13; } else - f = n.nextState(f, x), f === 0 && (w = !0); - w && (f = 1, m = !1, g = !1, y = !1, h = c + 1, u = x), c++; + m = n.nextState(m, S), m === 0 && (x = !0); + x && (m = 1, f = !1, g = !1, y = !1, h = c + 1, u = S), c++; } - f === 13 && i.push(Yn._createLink(r, o, s, h, l)); + m === 13 && i.push(tr._createLink(r, o, s, h, l)); } return i; } } -function mh(t) { - return !t || typeof t.getLineCount != "function" || typeof t.getLineContent != "function" ? [] : Yn.computeLinks(t); +function vh(t) { + return !t || typeof t.getLineCount != "function" || typeof t.getLineContent != "function" ? [] : tr.computeLinks(t); } -class $r { +class Zr { constructor() { this._defaultValueSet = [ ["true", "false"], @@ -3588,8 +3473,59 @@ class $r { return i >= 0 ? (i += r ? 1 : -1, i < 0 ? i = e.length - 1 : i %= e.length, e[i]) : null; } } -$r.INSTANCE = new $r(); -class Fi { +Zr.INSTANCE = new Zr(); +const ml = Object.freeze(function(t, e) { + const n = setTimeout(t.bind(e), 0); + return { dispose() { + clearTimeout(n); + } }; +}); +var nr; +(function(t) { + function e(n) { + return n === t.None || n === t.Cancelled || n instanceof Gn ? !0 : !n || typeof n != "object" ? !1 : typeof n.isCancellationRequested == "boolean" && typeof n.onCancellationRequested == "function"; + } + t.isCancellationToken = e, t.None = Object.freeze({ + isCancellationRequested: !1, + onCancellationRequested: $r.None + }), t.Cancelled = Object.freeze({ + isCancellationRequested: !0, + onCancellationRequested: ml + }); +})(nr || (nr = {})); +class Gn { + constructor() { + this._isCancelled = !1, this._emitter = null; + } + cancel() { + this._isCancelled || (this._isCancelled = !0, this._emitter && (this._emitter.fire(void 0), this.dispose())); + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + return this._isCancelled ? ml : (this._emitter || (this._emitter = new qe()), this._emitter.event); + } + dispose() { + this._emitter && (this._emitter.dispose(), this._emitter = null); + } +} +class yh { + constructor(e) { + this._token = void 0, this._parentListener = void 0, this._parentListener = e && e.onCancellationRequested(this.cancel, this); + } + get token() { + return this._token || (this._token = new Gn()), this._token; + } + cancel() { + this._token ? this._token instanceof Gn && this._token.cancel() : this._token = nr.Cancelled; + } + dispose(e = !1) { + var n; + e && this.cancel(), (n = this._parentListener) === null || n === void 0 || n.dispose(), this._token ? this._token instanceof Gn && this._token.dispose() : this._token = nr.None; + } +} +class Pi { constructor() { this._keyCodeToStr = [], this._strToKeyCode = /* @__PURE__ */ Object.create(null); } @@ -3603,7 +3539,7 @@ class Fi { return this._strToKeyCode[e.toLowerCase()] || 0; } } -const Bn = new Fi(), Hr = new Fi(), Gr = new Fi(), gh = new Array(230), bh = /* @__PURE__ */ Object.create(null), vh = /* @__PURE__ */ Object.create(null); +const Jn = new Pi(), ei = new Pi(), ti = new Pi(), wh = new Array(230), xh = /* @__PURE__ */ Object.create(null), Sh = /* @__PURE__ */ Object.create(null); (function() { const t = "", e = [ // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel @@ -3724,11 +3660,11 @@ const Bn = new Fi(), Hr = new Fi(), Gr = new Fi(), gh = new Array(230), bh = /* [1, 114, "F17", 75, "F17", 128, "VK_F17", t, t], [1, 115, "F18", 76, "F18", 129, "VK_F18", t, t], [1, 116, "F19", 77, "F19", 130, "VK_F19", t, t], - [1, 117, "F20", 78, "F20", 0, "VK_F20", t, t], - [1, 118, "F21", 79, "F21", 0, "VK_F21", t, t], - [1, 119, "F22", 80, "F22", 0, "VK_F22", t, t], - [1, 120, "F23", 81, "F23", 0, "VK_F23", t, t], - [1, 121, "F24", 82, "F24", 0, "VK_F24", t, t], + [1, 117, "F20", 78, "F20", 131, "VK_F20", t, t], + [1, 118, "F21", 79, "F21", 132, "VK_F21", t, t], + [1, 119, "F22", 80, "F22", 133, "VK_F22", t, t], + [1, 120, "F23", 81, "F23", 134, "VK_F23", t, t], + [1, 121, "F24", 82, "F24", 135, "VK_F24", t, t], [1, 122, "Open", 0, t, 0, t, t, t], [1, 123, "Help", 0, t, 0, t, t, t], [1, 124, "Select", 0, t, 0, t, t, t], @@ -3840,35 +3776,35 @@ const Bn = new Fi(), Hr = new Fi(), Gr = new Fi(), gh = new Array(230), bh = /* [1, 0, t, 0, t, 0, "VK_OEM_CLEAR", t, t] ], n = [], r = []; for (const i of e) { - const [s, a, o, l, c, h, u, f, m] = i; - if (r[a] || (r[a] = !0, bh[o] = a, vh[o.toLowerCase()] = a), !n[l]) { + const [s, a, o, l, c, h, u, m, f] = i; + if (r[a] || (r[a] = !0, xh[o] = a, Sh[o.toLowerCase()] = a), !n[l]) { if (n[l] = !0, !c) throw new Error(`String representation missing for key code ${l} around scan code ${o}`); - Bn.define(l, c), Hr.define(l, f || c), Gr.define(l, m || f || c); + Jn.define(l, c), ei.define(l, m || c), ti.define(l, f || m || c); } - h && (gh[h] = l); + h && (wh[h] = l); } })(); -var os; +var fs; (function(t) { function e(o) { - return Bn.keyCodeToStr(o); + return Jn.keyCodeToStr(o); } t.toString = e; function n(o) { - return Bn.strToKeyCode(o); + return Jn.strToKeyCode(o); } t.fromString = n; function r(o) { - return Hr.keyCodeToStr(o); + return ei.keyCodeToStr(o); } t.toUserSettingsUS = r; function i(o) { - return Gr.keyCodeToStr(o); + return ti.keyCodeToStr(o); } t.toUserSettingsGeneral = i; function s(o) { - return Hr.strToKeyCode(o) || Gr.strToKeyCode(o); + return ei.strToKeyCode(o) || ti.strToKeyCode(o); } t.fromUserSettings = s; function a(o) { @@ -3884,15 +3820,15 @@ var os; case 17: return "Right"; } - return Bn.keyCodeToStr(o); + return Jn.keyCodeToStr(o); } t.toElectronAccelerator = a; -})(os || (os = {})); -function yh(t, e) { +})(fs || (fs = {})); +function Ch(t, e) { const n = (e & 65535) << 16 >>> 0; return (t | n) >>> 0; } -class Ne extends Ee { +class Me extends Ae { constructor(e, n, r, i) { super(e, n, r, i), this.selectionStartLineNumber = e, this.selectionStartColumn = n, this.positionLineNumber = r, this.positionColumn = i; } @@ -3906,7 +3842,7 @@ class Ne extends Ee { * Test if equals other selection. */ equalsSelection(e) { - return Ne.selectionsEqual(this, e); + return Me.selectionsEqual(this, e); } /** * Test if the two selections are equal. @@ -3924,44 +3860,44 @@ class Ne extends Ee { * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ setEndPosition(e, n) { - return this.getDirection() === 0 ? new Ne(this.startLineNumber, this.startColumn, e, n) : new Ne(e, n, this.startLineNumber, this.startColumn); + return this.getDirection() === 0 ? new Me(this.startLineNumber, this.startColumn, e, n) : new Me(e, n, this.startLineNumber, this.startColumn); } /** * Get the position at `positionLineNumber` and `positionColumn`. */ getPosition() { - return new Ge(this.positionLineNumber, this.positionColumn); + return new Ke(this.positionLineNumber, this.positionColumn); } /** * Get the position at the start of the selection. */ getSelectionStart() { - return new Ge(this.selectionStartLineNumber, this.selectionStartColumn); + return new Ke(this.selectionStartLineNumber, this.selectionStartColumn); } /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ setStartPosition(e, n) { - return this.getDirection() === 0 ? new Ne(e, n, this.endLineNumber, this.endColumn) : new Ne(this.endLineNumber, this.endColumn, e, n); + return this.getDirection() === 0 ? new Me(e, n, this.endLineNumber, this.endColumn) : new Me(this.endLineNumber, this.endColumn, e, n); } // ---- /** * Create a `Selection` from one or two positions */ static fromPositions(e, n = e) { - return new Ne(e.lineNumber, e.column, n.lineNumber, n.column); + return new Me(e.lineNumber, e.column, n.lineNumber, n.column); } /** * Creates a `Selection` from a range, given a direction. */ static fromRange(e, n) { - return n === 0 ? new Ne(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : new Ne(e.endLineNumber, e.endColumn, e.startLineNumber, e.startColumn); + return n === 0 ? new Me(e.startLineNumber, e.startColumn, e.endLineNumber, e.endColumn) : new Me(e.endLineNumber, e.endColumn, e.startLineNumber, e.startColumn); } /** * Create a `Selection` from an `ISelection`. */ static liftSelection(e) { - return new Ne(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn); + return new Me(e.selectionStartLineNumber, e.selectionStartColumn, e.positionLineNumber, e.positionColumn); } /** * `a` equals `b`. @@ -3988,20 +3924,20 @@ class Ne extends Ee { * Create with a direction. */ static createWithDirection(e, n, r, i, s) { - return s === 0 ? new Ne(e, n, r, i) : new Ne(r, i, e, n); + return s === 0 ? new Me(e, n, r, i) : new Me(r, i, e, n); } } -const ls = /* @__PURE__ */ Object.create(null); +const ms = /* @__PURE__ */ Object.create(null); function d(t, e) { - if (vc(e)) { - const n = ls[e]; + if (dc(e)) { + const n = ms[e]; if (n === void 0) throw new Error(`${t} references an unknown codicon: ${e}`); e = n; } - return ls[t] = e, { id: t }; + return ms[t] = e, { id: t }; } -const V = { +const j = { // built-in icons, with image name add: d("add", 6e4), plus: d("plus", 6e4), @@ -4020,6 +3956,7 @@ const V = { tag: d("tag", 60006), tagAdd: d("tag-add", 60006), tagRemove: d("tag-remove", 60006), + gitPullRequestLabel: d("git-pull-request-label", 60006), person: d("person", 60007), personFollow: d("person-follow", 60007), personOutline: d("person-outline", 60007), @@ -4274,6 +4211,7 @@ const V = { megaphone: d("megaphone", 60190), mention: d("mention", 60191), milestone: d("milestone", 60192), + gitPullRequestMilestone: d("git-pull-request-milestone", 60192), mortarBoard: d("mortar-board", 60193), move: d("move", 60194), multipleWindows: d("multiple-windows", 60195), @@ -4398,9 +4336,11 @@ const V = { menu: d("menu", 60308), expandAll: d("expand-all", 60309), feedback: d("feedback", 60310), + gitPullRequestReviewer: d("git-pull-request-reviewer", 60310), groupByRefType: d("group-by-ref-type", 60311), ungroupByRefType: d("ungroup-by-ref-type", 60312), account: d("account", 60313), + gitPullRequestAssignee: d("git-pull-request-assignee", 60313), bellDot: d("bell-dot", 60314), debugConsole: d("debug-console", 60315), library: d("library", 60316), @@ -4523,6 +4463,7 @@ const V = { send: d("send", 60431), sparkle: d("sparkle", 60432), insert: d("insert", 60433), + mic: d("mic", 60434), // derived icons, that could become separate icons dialogError: d("dialog-error", "error"), dialogWarning: d("dialog-warning", "warning"), @@ -4543,7 +4484,7 @@ const V = { toolBarMore: d("toolbar-more", "more"), quickInputBack: d("quick-input-back", "arrow-left") }; -var Jr = globalThis && globalThis.__awaiter || function(t, e, n, r) { +var ni = globalThis && globalThis.__awaiter || function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -4570,9 +4511,9 @@ var Jr = globalThis && globalThis.__awaiter || function(t, e, n, r) { c((r = r.apply(t, e || [])).next()); }); }; -class wh { +class kh { constructor() { - this._tokenizationSupports = /* @__PURE__ */ new Map(), this._factories = /* @__PURE__ */ new Map(), this._onDidChange = new Ke(), this.onDidChange = this._onDidChange.event, this._colorMap = null; + this._tokenizationSupports = /* @__PURE__ */ new Map(), this._factories = /* @__PURE__ */ new Map(), this._onDidChange = new qe(), this.onDidChange = this._onDidChange.event, this._colorMap = null; } handleChange(e) { this._onDidChange.fire({ @@ -4581,7 +4522,7 @@ class wh { }); } register(e, n) { - return this._tokenizationSupports.set(e, n), this.handleChange([e]), $n(() => { + return this._tokenizationSupports.set(e, n), this.handleChange([e]), mn(() => { this._tokenizationSupports.get(e) === n && (this._tokenizationSupports.delete(e), this.handleChange([e])); }); } @@ -4591,14 +4532,14 @@ class wh { registerFactory(e, n) { var r; (r = this._factories.get(e)) === null || r === void 0 || r.dispose(); - const i = new xh(this, e, n); - return this._factories.set(e, i), $n(() => { + const i = new _h(this, e, n); + return this._factories.set(e, i), mn(() => { const s = this._factories.get(e); !s || s !== i || (this._factories.delete(e), s.dispose()); }); } getOrCreate(e) { - return Jr(this, void 0, void 0, function* () { + return ni(this, void 0, void 0, function* () { const n = this.get(e); if (n) return n; @@ -4628,7 +4569,7 @@ class wh { ] : null; } } -class xh extends dr { +class _h extends gn { get isResolved() { return this._isResolved; } @@ -4639,18 +4580,18 @@ class xh extends dr { this._isDisposed = !0, super.dispose(); } resolve() { - return Jr(this, void 0, void 0, function* () { + return ni(this, void 0, void 0, function* () { return this._resolvePromise || (this._resolvePromise = this._create()), this._resolvePromise; }); } _create() { - return Jr(this, void 0, void 0, function* () { + return ni(this, void 0, void 0, function* () { const e = yield this._factory.tokenizationSupport; this._isResolved = !0, e && !this._isDisposed && this._register(this._registry.register(this._languageId, e)); }); } } -class Sh { +class Rh { constructor(e, n, r) { this.offset = e, this.type = n, this.language = r, this._tokenBrand = void 0; } @@ -4658,13 +4599,13 @@ class Sh { return "(" + this.offset + ", " + this.type + ")"; } } -var cs; +var gs; (function(t) { const e = /* @__PURE__ */ new Map(); - e.set(0, V.symbolMethod), e.set(1, V.symbolFunction), e.set(2, V.symbolConstructor), e.set(3, V.symbolField), e.set(4, V.symbolVariable), e.set(5, V.symbolClass), e.set(6, V.symbolStruct), e.set(7, V.symbolInterface), e.set(8, V.symbolModule), e.set(9, V.symbolProperty), e.set(10, V.symbolEvent), e.set(11, V.symbolOperator), e.set(12, V.symbolUnit), e.set(13, V.symbolValue), e.set(15, V.symbolEnum), e.set(14, V.symbolConstant), e.set(15, V.symbolEnum), e.set(16, V.symbolEnumMember), e.set(17, V.symbolKeyword), e.set(27, V.symbolSnippet), e.set(18, V.symbolText), e.set(19, V.symbolColor), e.set(20, V.symbolFile), e.set(21, V.symbolReference), e.set(22, V.symbolCustomColor), e.set(23, V.symbolFolder), e.set(24, V.symbolTypeParameter), e.set(25, V.account), e.set(26, V.issues); + e.set(0, j.symbolMethod), e.set(1, j.symbolFunction), e.set(2, j.symbolConstructor), e.set(3, j.symbolField), e.set(4, j.symbolVariable), e.set(5, j.symbolClass), e.set(6, j.symbolStruct), e.set(7, j.symbolInterface), e.set(8, j.symbolModule), e.set(9, j.symbolProperty), e.set(10, j.symbolEvent), e.set(11, j.symbolOperator), e.set(12, j.symbolUnit), e.set(13, j.symbolValue), e.set(15, j.symbolEnum), e.set(14, j.symbolConstant), e.set(15, j.symbolEnum), e.set(16, j.symbolEnumMember), e.set(17, j.symbolKeyword), e.set(27, j.symbolSnippet), e.set(18, j.symbolText), e.set(19, j.symbolColor), e.set(20, j.symbolFile), e.set(21, j.symbolReference), e.set(22, j.symbolCustomColor), e.set(23, j.symbolFolder), e.set(24, j.symbolTypeParameter), e.set(25, j.account), e.set(26, j.issues); function n(s) { let a = e.get(s); - return a || (console.info("No codicon found for CompletionItemKind " + s), a = V.symbolProperty), a; + return a || (console.info("No codicon found for CompletionItemKind " + s), a = j.symbolProperty), a; } t.toIcon = n; const r = /* @__PURE__ */ new Map(); @@ -4794,261 +4735,242 @@ var cs; return typeof o > "u" && !a && (o = 9), o; } t.fromString = i; -})(cs || (cs = {})); -var hs; +})(gs || (gs = {})); +var bs; (function(t) { t[t.Automatic = 0] = "Automatic", t[t.Explicit = 1] = "Explicit"; -})(hs || (hs = {})); -var ds; +})(bs || (bs = {})); +var vs; (function(t) { t[t.Invoke = 1] = "Invoke", t[t.TriggerCharacter = 2] = "TriggerCharacter", t[t.ContentChange = 3] = "ContentChange"; -})(ds || (ds = {})); -var us; +})(vs || (vs = {})); +var ys; (function(t) { t[t.Text = 0] = "Text", t[t.Read = 1] = "Read", t[t.Write = 2] = "Write"; -})(us || (us = {})); -var ps; +})(ys || (ys = {})); +oe("Array", "array"), oe("Boolean", "boolean"), oe("Class", "class"), oe("Constant", "constant"), oe("Constructor", "constructor"), oe("Enum", "enumeration"), oe("EnumMember", "enumeration member"), oe("Event", "event"), oe("Field", "field"), oe("File", "file"), oe("Function", "function"), oe("Interface", "interface"), oe("Key", "key"), oe("Method", "method"), oe("Module", "module"), oe("Namespace", "namespace"), oe("Null", "null"), oe("Number", "number"), oe("Object", "object"), oe("Operator", "operator"), oe("Package", "package"), oe("Property", "property"), oe("String", "string"), oe("Struct", "struct"), oe("TypeParameter", "type parameter"), oe("Variable", "variable"); +var ws; (function(t) { const e = /* @__PURE__ */ new Map(); - e.set(0, V.symbolFile), e.set(1, V.symbolModule), e.set(2, V.symbolNamespace), e.set(3, V.symbolPackage), e.set(4, V.symbolClass), e.set(5, V.symbolMethod), e.set(6, V.symbolProperty), e.set(7, V.symbolField), e.set(8, V.symbolConstructor), e.set(9, V.symbolEnum), e.set(10, V.symbolInterface), e.set(11, V.symbolFunction), e.set(12, V.symbolVariable), e.set(13, V.symbolConstant), e.set(14, V.symbolString), e.set(15, V.symbolNumber), e.set(16, V.symbolBoolean), e.set(17, V.symbolArray), e.set(18, V.symbolObject), e.set(19, V.symbolKey), e.set(20, V.symbolNull), e.set(21, V.symbolEnumMember), e.set(22, V.symbolStruct), e.set(23, V.symbolEvent), e.set(24, V.symbolOperator), e.set(25, V.symbolTypeParameter); + e.set(0, j.symbolFile), e.set(1, j.symbolModule), e.set(2, j.symbolNamespace), e.set(3, j.symbolPackage), e.set(4, j.symbolClass), e.set(5, j.symbolMethod), e.set(6, j.symbolProperty), e.set(7, j.symbolField), e.set(8, j.symbolConstructor), e.set(9, j.symbolEnum), e.set(10, j.symbolInterface), e.set(11, j.symbolFunction), e.set(12, j.symbolVariable), e.set(13, j.symbolConstant), e.set(14, j.symbolString), e.set(15, j.symbolNumber), e.set(16, j.symbolBoolean), e.set(17, j.symbolArray), e.set(18, j.symbolObject), e.set(19, j.symbolKey), e.set(20, j.symbolNull), e.set(21, j.symbolEnumMember), e.set(22, j.symbolStruct), e.set(23, j.symbolEvent), e.set(24, j.symbolOperator), e.set(25, j.symbolTypeParameter); function n(r) { let i = e.get(r); - return i || (console.info("No codicon found for SymbolKind " + r), i = V.symbolProperty), i; + return i || (console.info("No codicon found for SymbolKind " + r), i = j.symbolProperty), i; } t.toIcon = n; -})(ps || (ps = {})); -var fs; +})(ws || (ws = {})); +var xs; (function(t) { function e(n) { return !n || typeof n != "object" ? !1 : typeof n.id == "string" && typeof n.title == "string"; } t.is = e; -})(fs || (fs = {})); -var ms; -(function(t) { - t[t.Collapsed = 0] = "Collapsed", t[t.Expanded = 1] = "Expanded"; -})(ms || (ms = {})); -var gs; -(function(t) { - t[t.Unresolved = 0] = "Unresolved", t[t.Resolved = 1] = "Resolved"; -})(gs || (gs = {})); -var bs; -(function(t) { - t[t.Editing = 0] = "Editing", t[t.Preview = 1] = "Preview"; -})(bs || (bs = {})); -var vs; -(function(t) { - t[t.Published = 0] = "Published", t[t.Draft = 1] = "Draft"; -})(vs || (vs = {})); -var ys; -(function(t) { - t[t.Type = 1] = "Type", t[t.Parameter = 2] = "Parameter"; -})(ys || (ys = {})); -new wh(); -var ws; -(function(t) { - t[t.None = 0] = "None", t[t.Option = 1] = "Option", t[t.Default = 2] = "Default", t[t.Preferred = 3] = "Preferred"; -})(ws || (ws = {})); -var xs; -(function(t) { - t[t.Unknown = 0] = "Unknown", t[t.Disabled = 1] = "Disabled", t[t.Enabled = 2] = "Enabled"; })(xs || (xs = {})); var Ss; (function(t) { - t[t.Invoke = 1] = "Invoke", t[t.Auto = 2] = "Auto"; + t[t.Type = 1] = "Type", t[t.Parameter = 2] = "Parameter"; })(Ss || (Ss = {})); +new kh(); var Cs; (function(t) { - t[t.None = 0] = "None", t[t.KeepWhitespace = 1] = "KeepWhitespace", t[t.InsertAsSnippet = 4] = "InsertAsSnippet"; + t[t.Unknown = 0] = "Unknown", t[t.Disabled = 1] = "Disabled", t[t.Enabled = 2] = "Enabled"; })(Cs || (Cs = {})); var ks; (function(t) { - t[t.Method = 0] = "Method", t[t.Function = 1] = "Function", t[t.Constructor = 2] = "Constructor", t[t.Field = 3] = "Field", t[t.Variable = 4] = "Variable", t[t.Class = 5] = "Class", t[t.Struct = 6] = "Struct", t[t.Interface = 7] = "Interface", t[t.Module = 8] = "Module", t[t.Property = 9] = "Property", t[t.Event = 10] = "Event", t[t.Operator = 11] = "Operator", t[t.Unit = 12] = "Unit", t[t.Value = 13] = "Value", t[t.Constant = 14] = "Constant", t[t.Enum = 15] = "Enum", t[t.EnumMember = 16] = "EnumMember", t[t.Keyword = 17] = "Keyword", t[t.Text = 18] = "Text", t[t.Color = 19] = "Color", t[t.File = 20] = "File", t[t.Reference = 21] = "Reference", t[t.Customcolor = 22] = "Customcolor", t[t.Folder = 23] = "Folder", t[t.TypeParameter = 24] = "TypeParameter", t[t.User = 25] = "User", t[t.Issue = 26] = "Issue", t[t.Snippet = 27] = "Snippet"; + t[t.Invoke = 1] = "Invoke", t[t.Auto = 2] = "Auto"; })(ks || (ks = {})); var _s; (function(t) { - t[t.Deprecated = 1] = "Deprecated"; + t[t.None = 0] = "None", t[t.KeepWhitespace = 1] = "KeepWhitespace", t[t.InsertAsSnippet = 4] = "InsertAsSnippet"; })(_s || (_s = {})); -var Fs; -(function(t) { - t[t.Invoke = 0] = "Invoke", t[t.TriggerCharacter = 1] = "TriggerCharacter", t[t.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; -})(Fs || (Fs = {})); var Rs; (function(t) { - t[t.EXACT = 0] = "EXACT", t[t.ABOVE = 1] = "ABOVE", t[t.BELOW = 2] = "BELOW"; + t[t.Method = 0] = "Method", t[t.Function = 1] = "Function", t[t.Constructor = 2] = "Constructor", t[t.Field = 3] = "Field", t[t.Variable = 4] = "Variable", t[t.Class = 5] = "Class", t[t.Struct = 6] = "Struct", t[t.Interface = 7] = "Interface", t[t.Module = 8] = "Module", t[t.Property = 9] = "Property", t[t.Event = 10] = "Event", t[t.Operator = 11] = "Operator", t[t.Unit = 12] = "Unit", t[t.Value = 13] = "Value", t[t.Constant = 14] = "Constant", t[t.Enum = 15] = "Enum", t[t.EnumMember = 16] = "EnumMember", t[t.Keyword = 17] = "Keyword", t[t.Text = 18] = "Text", t[t.Color = 19] = "Color", t[t.File = 20] = "File", t[t.Reference = 21] = "Reference", t[t.Customcolor = 22] = "Customcolor", t[t.Folder = 23] = "Folder", t[t.TypeParameter = 24] = "TypeParameter", t[t.User = 25] = "User", t[t.Issue = 26] = "Issue", t[t.Snippet = 27] = "Snippet"; })(Rs || (Rs = {})); +var Fs; +(function(t) { + t[t.Deprecated = 1] = "Deprecated"; +})(Fs || (Fs = {})); var Es; (function(t) { - t[t.NotSet = 0] = "NotSet", t[t.ContentFlush = 1] = "ContentFlush", t[t.RecoverFromMarkers = 2] = "RecoverFromMarkers", t[t.Explicit = 3] = "Explicit", t[t.Paste = 4] = "Paste", t[t.Undo = 5] = "Undo", t[t.Redo = 6] = "Redo"; + t[t.Invoke = 0] = "Invoke", t[t.TriggerCharacter = 1] = "TriggerCharacter", t[t.TriggerForIncompleteCompletions = 2] = "TriggerForIncompleteCompletions"; })(Es || (Es = {})); var Ds; (function(t) { - t[t.LF = 1] = "LF", t[t.CRLF = 2] = "CRLF"; + t[t.EXACT = 0] = "EXACT", t[t.ABOVE = 1] = "ABOVE", t[t.BELOW = 2] = "BELOW"; })(Ds || (Ds = {})); var As; (function(t) { - t[t.Text = 0] = "Text", t[t.Read = 1] = "Read", t[t.Write = 2] = "Write"; + t[t.NotSet = 0] = "NotSet", t[t.ContentFlush = 1] = "ContentFlush", t[t.RecoverFromMarkers = 2] = "RecoverFromMarkers", t[t.Explicit = 3] = "Explicit", t[t.Paste = 4] = "Paste", t[t.Undo = 5] = "Undo", t[t.Redo = 6] = "Redo"; })(As || (As = {})); -var Ms; -(function(t) { - t[t.None = 0] = "None", t[t.Keep = 1] = "Keep", t[t.Brackets = 2] = "Brackets", t[t.Advanced = 3] = "Advanced", t[t.Full = 4] = "Full"; -})(Ms || (Ms = {})); var Ns; (function(t) { - t[t.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter", t[t.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter", t[t.accessibilitySupport = 2] = "accessibilitySupport", t[t.accessibilityPageSize = 3] = "accessibilityPageSize", t[t.ariaLabel = 4] = "ariaLabel", t[t.autoClosingBrackets = 5] = "autoClosingBrackets", t[t.screenReaderAnnounceInlineSuggestion = 6] = "screenReaderAnnounceInlineSuggestion", t[t.autoClosingDelete = 7] = "autoClosingDelete", t[t.autoClosingOvertype = 8] = "autoClosingOvertype", t[t.autoClosingQuotes = 9] = "autoClosingQuotes", t[t.autoIndent = 10] = "autoIndent", t[t.automaticLayout = 11] = "automaticLayout", t[t.autoSurround = 12] = "autoSurround", t[t.bracketPairColorization = 13] = "bracketPairColorization", t[t.guides = 14] = "guides", t[t.codeLens = 15] = "codeLens", t[t.codeLensFontFamily = 16] = "codeLensFontFamily", t[t.codeLensFontSize = 17] = "codeLensFontSize", t[t.colorDecorators = 18] = "colorDecorators", t[t.colorDecoratorsLimit = 19] = "colorDecoratorsLimit", t[t.columnSelection = 20] = "columnSelection", t[t.comments = 21] = "comments", t[t.contextmenu = 22] = "contextmenu", t[t.copyWithSyntaxHighlighting = 23] = "copyWithSyntaxHighlighting", t[t.cursorBlinking = 24] = "cursorBlinking", t[t.cursorSmoothCaretAnimation = 25] = "cursorSmoothCaretAnimation", t[t.cursorStyle = 26] = "cursorStyle", t[t.cursorSurroundingLines = 27] = "cursorSurroundingLines", t[t.cursorSurroundingLinesStyle = 28] = "cursorSurroundingLinesStyle", t[t.cursorWidth = 29] = "cursorWidth", t[t.disableLayerHinting = 30] = "disableLayerHinting", t[t.disableMonospaceOptimizations = 31] = "disableMonospaceOptimizations", t[t.domReadOnly = 32] = "domReadOnly", t[t.dragAndDrop = 33] = "dragAndDrop", t[t.dropIntoEditor = 34] = "dropIntoEditor", t[t.emptySelectionClipboard = 35] = "emptySelectionClipboard", t[t.experimentalWhitespaceRendering = 36] = "experimentalWhitespaceRendering", t[t.extraEditorClassName = 37] = "extraEditorClassName", t[t.fastScrollSensitivity = 38] = "fastScrollSensitivity", t[t.find = 39] = "find", t[t.fixedOverflowWidgets = 40] = "fixedOverflowWidgets", t[t.folding = 41] = "folding", t[t.foldingStrategy = 42] = "foldingStrategy", t[t.foldingHighlight = 43] = "foldingHighlight", t[t.foldingImportsByDefault = 44] = "foldingImportsByDefault", t[t.foldingMaximumRegions = 45] = "foldingMaximumRegions", t[t.unfoldOnClickAfterEndOfLine = 46] = "unfoldOnClickAfterEndOfLine", t[t.fontFamily = 47] = "fontFamily", t[t.fontInfo = 48] = "fontInfo", t[t.fontLigatures = 49] = "fontLigatures", t[t.fontSize = 50] = "fontSize", t[t.fontWeight = 51] = "fontWeight", t[t.fontVariations = 52] = "fontVariations", t[t.formatOnPaste = 53] = "formatOnPaste", t[t.formatOnType = 54] = "formatOnType", t[t.glyphMargin = 55] = "glyphMargin", t[t.gotoLocation = 56] = "gotoLocation", t[t.hideCursorInOverviewRuler = 57] = "hideCursorInOverviewRuler", t[t.hover = 58] = "hover", t[t.inDiffEditor = 59] = "inDiffEditor", t[t.inlineSuggest = 60] = "inlineSuggest", t[t.letterSpacing = 61] = "letterSpacing", t[t.lightbulb = 62] = "lightbulb", t[t.lineDecorationsWidth = 63] = "lineDecorationsWidth", t[t.lineHeight = 64] = "lineHeight", t[t.lineNumbers = 65] = "lineNumbers", t[t.lineNumbersMinChars = 66] = "lineNumbersMinChars", t[t.linkedEditing = 67] = "linkedEditing", t[t.links = 68] = "links", t[t.matchBrackets = 69] = "matchBrackets", t[t.minimap = 70] = "minimap", t[t.mouseStyle = 71] = "mouseStyle", t[t.mouseWheelScrollSensitivity = 72] = "mouseWheelScrollSensitivity", t[t.mouseWheelZoom = 73] = "mouseWheelZoom", t[t.multiCursorMergeOverlapping = 74] = "multiCursorMergeOverlapping", t[t.multiCursorModifier = 75] = "multiCursorModifier", t[t.multiCursorPaste = 76] = "multiCursorPaste", t[t.multiCursorLimit = 77] = "multiCursorLimit", t[t.occurrencesHighlight = 78] = "occurrencesHighlight", t[t.overviewRulerBorder = 79] = "overviewRulerBorder", t[t.overviewRulerLanes = 80] = "overviewRulerLanes", t[t.padding = 81] = "padding", t[t.parameterHints = 82] = "parameterHints", t[t.peekWidgetDefaultFocus = 83] = "peekWidgetDefaultFocus", t[t.definitionLinkOpensInPeek = 84] = "definitionLinkOpensInPeek", t[t.quickSuggestions = 85] = "quickSuggestions", t[t.quickSuggestionsDelay = 86] = "quickSuggestionsDelay", t[t.readOnly = 87] = "readOnly", t[t.renameOnType = 88] = "renameOnType", t[t.renderControlCharacters = 89] = "renderControlCharacters", t[t.renderFinalNewline = 90] = "renderFinalNewline", t[t.renderLineHighlight = 91] = "renderLineHighlight", t[t.renderLineHighlightOnlyWhenFocus = 92] = "renderLineHighlightOnlyWhenFocus", t[t.renderValidationDecorations = 93] = "renderValidationDecorations", t[t.renderWhitespace = 94] = "renderWhitespace", t[t.revealHorizontalRightPadding = 95] = "revealHorizontalRightPadding", t[t.roundedSelection = 96] = "roundedSelection", t[t.rulers = 97] = "rulers", t[t.scrollbar = 98] = "scrollbar", t[t.scrollBeyondLastColumn = 99] = "scrollBeyondLastColumn", t[t.scrollBeyondLastLine = 100] = "scrollBeyondLastLine", t[t.scrollPredominantAxis = 101] = "scrollPredominantAxis", t[t.selectionClipboard = 102] = "selectionClipboard", t[t.selectionHighlight = 103] = "selectionHighlight", t[t.selectOnLineNumbers = 104] = "selectOnLineNumbers", t[t.showFoldingControls = 105] = "showFoldingControls", t[t.showUnused = 106] = "showUnused", t[t.snippetSuggestions = 107] = "snippetSuggestions", t[t.smartSelect = 108] = "smartSelect", t[t.smoothScrolling = 109] = "smoothScrolling", t[t.stickyScroll = 110] = "stickyScroll", t[t.stickyTabStops = 111] = "stickyTabStops", t[t.stopRenderingLineAfter = 112] = "stopRenderingLineAfter", t[t.suggest = 113] = "suggest", t[t.suggestFontSize = 114] = "suggestFontSize", t[t.suggestLineHeight = 115] = "suggestLineHeight", t[t.suggestOnTriggerCharacters = 116] = "suggestOnTriggerCharacters", t[t.suggestSelection = 117] = "suggestSelection", t[t.tabCompletion = 118] = "tabCompletion", t[t.tabIndex = 119] = "tabIndex", t[t.unicodeHighlighting = 120] = "unicodeHighlighting", t[t.unusualLineTerminators = 121] = "unusualLineTerminators", t[t.useShadowDOM = 122] = "useShadowDOM", t[t.useTabStops = 123] = "useTabStops", t[t.wordBreak = 124] = "wordBreak", t[t.wordSeparators = 125] = "wordSeparators", t[t.wordWrap = 126] = "wordWrap", t[t.wordWrapBreakAfterCharacters = 127] = "wordWrapBreakAfterCharacters", t[t.wordWrapBreakBeforeCharacters = 128] = "wordWrapBreakBeforeCharacters", t[t.wordWrapColumn = 129] = "wordWrapColumn", t[t.wordWrapOverride1 = 130] = "wordWrapOverride1", t[t.wordWrapOverride2 = 131] = "wordWrapOverride2", t[t.wrappingIndent = 132] = "wrappingIndent", t[t.wrappingStrategy = 133] = "wrappingStrategy", t[t.showDeprecated = 134] = "showDeprecated", t[t.inlayHints = 135] = "inlayHints", t[t.editorClassName = 136] = "editorClassName", t[t.pixelRatio = 137] = "pixelRatio", t[t.tabFocusMode = 138] = "tabFocusMode", t[t.layoutInfo = 139] = "layoutInfo", t[t.wrappingInfo = 140] = "wrappingInfo", t[t.defaultColorDecorators = 141] = "defaultColorDecorators"; + t[t.LF = 1] = "LF", t[t.CRLF = 2] = "CRLF"; })(Ns || (Ns = {})); +var Ms; +(function(t) { + t[t.Text = 0] = "Text", t[t.Read = 1] = "Read", t[t.Write = 2] = "Write"; +})(Ms || (Ms = {})); var zs; (function(t) { - t[t.TextDefined = 0] = "TextDefined", t[t.LF = 1] = "LF", t[t.CRLF = 2] = "CRLF"; + t[t.None = 0] = "None", t[t.Keep = 1] = "Keep", t[t.Brackets = 2] = "Brackets", t[t.Advanced = 3] = "Advanced", t[t.Full = 4] = "Full"; })(zs || (zs = {})); var Ps; (function(t) { - t[t.LF = 0] = "LF", t[t.CRLF = 1] = "CRLF"; + t[t.acceptSuggestionOnCommitCharacter = 0] = "acceptSuggestionOnCommitCharacter", t[t.acceptSuggestionOnEnter = 1] = "acceptSuggestionOnEnter", t[t.accessibilitySupport = 2] = "accessibilitySupport", t[t.accessibilityPageSize = 3] = "accessibilityPageSize", t[t.ariaLabel = 4] = "ariaLabel", t[t.ariaRequired = 5] = "ariaRequired", t[t.autoClosingBrackets = 6] = "autoClosingBrackets", t[t.screenReaderAnnounceInlineSuggestion = 7] = "screenReaderAnnounceInlineSuggestion", t[t.autoClosingDelete = 8] = "autoClosingDelete", t[t.autoClosingOvertype = 9] = "autoClosingOvertype", t[t.autoClosingQuotes = 10] = "autoClosingQuotes", t[t.autoIndent = 11] = "autoIndent", t[t.automaticLayout = 12] = "automaticLayout", t[t.autoSurround = 13] = "autoSurround", t[t.bracketPairColorization = 14] = "bracketPairColorization", t[t.guides = 15] = "guides", t[t.codeLens = 16] = "codeLens", t[t.codeLensFontFamily = 17] = "codeLensFontFamily", t[t.codeLensFontSize = 18] = "codeLensFontSize", t[t.colorDecorators = 19] = "colorDecorators", t[t.colorDecoratorsLimit = 20] = "colorDecoratorsLimit", t[t.columnSelection = 21] = "columnSelection", t[t.comments = 22] = "comments", t[t.contextmenu = 23] = "contextmenu", t[t.copyWithSyntaxHighlighting = 24] = "copyWithSyntaxHighlighting", t[t.cursorBlinking = 25] = "cursorBlinking", t[t.cursorSmoothCaretAnimation = 26] = "cursorSmoothCaretAnimation", t[t.cursorStyle = 27] = "cursorStyle", t[t.cursorSurroundingLines = 28] = "cursorSurroundingLines", t[t.cursorSurroundingLinesStyle = 29] = "cursorSurroundingLinesStyle", t[t.cursorWidth = 30] = "cursorWidth", t[t.disableLayerHinting = 31] = "disableLayerHinting", t[t.disableMonospaceOptimizations = 32] = "disableMonospaceOptimizations", t[t.domReadOnly = 33] = "domReadOnly", t[t.dragAndDrop = 34] = "dragAndDrop", t[t.dropIntoEditor = 35] = "dropIntoEditor", t[t.emptySelectionClipboard = 36] = "emptySelectionClipboard", t[t.experimentalWhitespaceRendering = 37] = "experimentalWhitespaceRendering", t[t.extraEditorClassName = 38] = "extraEditorClassName", t[t.fastScrollSensitivity = 39] = "fastScrollSensitivity", t[t.find = 40] = "find", t[t.fixedOverflowWidgets = 41] = "fixedOverflowWidgets", t[t.folding = 42] = "folding", t[t.foldingStrategy = 43] = "foldingStrategy", t[t.foldingHighlight = 44] = "foldingHighlight", t[t.foldingImportsByDefault = 45] = "foldingImportsByDefault", t[t.foldingMaximumRegions = 46] = "foldingMaximumRegions", t[t.unfoldOnClickAfterEndOfLine = 47] = "unfoldOnClickAfterEndOfLine", t[t.fontFamily = 48] = "fontFamily", t[t.fontInfo = 49] = "fontInfo", t[t.fontLigatures = 50] = "fontLigatures", t[t.fontSize = 51] = "fontSize", t[t.fontWeight = 52] = "fontWeight", t[t.fontVariations = 53] = "fontVariations", t[t.formatOnPaste = 54] = "formatOnPaste", t[t.formatOnType = 55] = "formatOnType", t[t.glyphMargin = 56] = "glyphMargin", t[t.gotoLocation = 57] = "gotoLocation", t[t.hideCursorInOverviewRuler = 58] = "hideCursorInOverviewRuler", t[t.hover = 59] = "hover", t[t.inDiffEditor = 60] = "inDiffEditor", t[t.inlineSuggest = 61] = "inlineSuggest", t[t.letterSpacing = 62] = "letterSpacing", t[t.lightbulb = 63] = "lightbulb", t[t.lineDecorationsWidth = 64] = "lineDecorationsWidth", t[t.lineHeight = 65] = "lineHeight", t[t.lineNumbers = 66] = "lineNumbers", t[t.lineNumbersMinChars = 67] = "lineNumbersMinChars", t[t.linkedEditing = 68] = "linkedEditing", t[t.links = 69] = "links", t[t.matchBrackets = 70] = "matchBrackets", t[t.minimap = 71] = "minimap", t[t.mouseStyle = 72] = "mouseStyle", t[t.mouseWheelScrollSensitivity = 73] = "mouseWheelScrollSensitivity", t[t.mouseWheelZoom = 74] = "mouseWheelZoom", t[t.multiCursorMergeOverlapping = 75] = "multiCursorMergeOverlapping", t[t.multiCursorModifier = 76] = "multiCursorModifier", t[t.multiCursorPaste = 77] = "multiCursorPaste", t[t.multiCursorLimit = 78] = "multiCursorLimit", t[t.occurrencesHighlight = 79] = "occurrencesHighlight", t[t.overviewRulerBorder = 80] = "overviewRulerBorder", t[t.overviewRulerLanes = 81] = "overviewRulerLanes", t[t.padding = 82] = "padding", t[t.pasteAs = 83] = "pasteAs", t[t.parameterHints = 84] = "parameterHints", t[t.peekWidgetDefaultFocus = 85] = "peekWidgetDefaultFocus", t[t.definitionLinkOpensInPeek = 86] = "definitionLinkOpensInPeek", t[t.quickSuggestions = 87] = "quickSuggestions", t[t.quickSuggestionsDelay = 88] = "quickSuggestionsDelay", t[t.readOnly = 89] = "readOnly", t[t.readOnlyMessage = 90] = "readOnlyMessage", t[t.renameOnType = 91] = "renameOnType", t[t.renderControlCharacters = 92] = "renderControlCharacters", t[t.renderFinalNewline = 93] = "renderFinalNewline", t[t.renderLineHighlight = 94] = "renderLineHighlight", t[t.renderLineHighlightOnlyWhenFocus = 95] = "renderLineHighlightOnlyWhenFocus", t[t.renderValidationDecorations = 96] = "renderValidationDecorations", t[t.renderWhitespace = 97] = "renderWhitespace", t[t.revealHorizontalRightPadding = 98] = "revealHorizontalRightPadding", t[t.roundedSelection = 99] = "roundedSelection", t[t.rulers = 100] = "rulers", t[t.scrollbar = 101] = "scrollbar", t[t.scrollBeyondLastColumn = 102] = "scrollBeyondLastColumn", t[t.scrollBeyondLastLine = 103] = "scrollBeyondLastLine", t[t.scrollPredominantAxis = 104] = "scrollPredominantAxis", t[t.selectionClipboard = 105] = "selectionClipboard", t[t.selectionHighlight = 106] = "selectionHighlight", t[t.selectOnLineNumbers = 107] = "selectOnLineNumbers", t[t.showFoldingControls = 108] = "showFoldingControls", t[t.showUnused = 109] = "showUnused", t[t.snippetSuggestions = 110] = "snippetSuggestions", t[t.smartSelect = 111] = "smartSelect", t[t.smoothScrolling = 112] = "smoothScrolling", t[t.stickyScroll = 113] = "stickyScroll", t[t.stickyTabStops = 114] = "stickyTabStops", t[t.stopRenderingLineAfter = 115] = "stopRenderingLineAfter", t[t.suggest = 116] = "suggest", t[t.suggestFontSize = 117] = "suggestFontSize", t[t.suggestLineHeight = 118] = "suggestLineHeight", t[t.suggestOnTriggerCharacters = 119] = "suggestOnTriggerCharacters", t[t.suggestSelection = 120] = "suggestSelection", t[t.tabCompletion = 121] = "tabCompletion", t[t.tabIndex = 122] = "tabIndex", t[t.unicodeHighlighting = 123] = "unicodeHighlighting", t[t.unusualLineTerminators = 124] = "unusualLineTerminators", t[t.useShadowDOM = 125] = "useShadowDOM", t[t.useTabStops = 126] = "useTabStops", t[t.wordBreak = 127] = "wordBreak", t[t.wordSeparators = 128] = "wordSeparators", t[t.wordWrap = 129] = "wordWrap", t[t.wordWrapBreakAfterCharacters = 130] = "wordWrapBreakAfterCharacters", t[t.wordWrapBreakBeforeCharacters = 131] = "wordWrapBreakBeforeCharacters", t[t.wordWrapColumn = 132] = "wordWrapColumn", t[t.wordWrapOverride1 = 133] = "wordWrapOverride1", t[t.wordWrapOverride2 = 134] = "wordWrapOverride2", t[t.wrappingIndent = 135] = "wrappingIndent", t[t.wrappingStrategy = 136] = "wrappingStrategy", t[t.showDeprecated = 137] = "showDeprecated", t[t.inlayHints = 138] = "inlayHints", t[t.editorClassName = 139] = "editorClassName", t[t.pixelRatio = 140] = "pixelRatio", t[t.tabFocusMode = 141] = "tabFocusMode", t[t.layoutInfo = 142] = "layoutInfo", t[t.wrappingInfo = 143] = "wrappingInfo", t[t.defaultColorDecorators = 144] = "defaultColorDecorators", t[t.colorDecoratorsActivatedOn = 145] = "colorDecoratorsActivatedOn", t[t.inlineCompletionsAccessibilityVerbose = 146] = "inlineCompletionsAccessibilityVerbose"; })(Ps || (Ps = {})); -var Is; -(function(t) { - t[t.Left = 1] = "Left", t[t.Right = 2] = "Right"; -})(Is || (Is = {})); var Ls; (function(t) { - t[t.None = 0] = "None", t[t.Indent = 1] = "Indent", t[t.IndentOutdent = 2] = "IndentOutdent", t[t.Outdent = 3] = "Outdent"; + t[t.TextDefined = 0] = "TextDefined", t[t.LF = 1] = "LF", t[t.CRLF = 2] = "CRLF"; })(Ls || (Ls = {})); +var Is; +(function(t) { + t[t.LF = 0] = "LF", t[t.CRLF = 1] = "CRLF"; +})(Is || (Is = {})); var Ts; (function(t) { - t[t.Both = 0] = "Both", t[t.Right = 1] = "Right", t[t.Left = 2] = "Left", t[t.None = 3] = "None"; + t[t.Left = 1] = "Left", t[t.Right = 2] = "Right"; })(Ts || (Ts = {})); var Ws; (function(t) { - t[t.Type = 1] = "Type", t[t.Parameter = 2] = "Parameter"; + t[t.None = 0] = "None", t[t.Indent = 1] = "Indent", t[t.IndentOutdent = 2] = "IndentOutdent", t[t.Outdent = 3] = "Outdent"; })(Ws || (Ws = {})); var Os; (function(t) { - t[t.Automatic = 0] = "Automatic", t[t.Explicit = 1] = "Explicit"; + t[t.Both = 0] = "Both", t[t.Right = 1] = "Right", t[t.Left = 2] = "Left", t[t.None = 3] = "None"; })(Os || (Os = {})); -var Xr; -(function(t) { - t[t.DependsOnKbLayout = -1] = "DependsOnKbLayout", t[t.Unknown = 0] = "Unknown", t[t.Backspace = 1] = "Backspace", t[t.Tab = 2] = "Tab", t[t.Enter = 3] = "Enter", t[t.Shift = 4] = "Shift", t[t.Ctrl = 5] = "Ctrl", t[t.Alt = 6] = "Alt", t[t.PauseBreak = 7] = "PauseBreak", t[t.CapsLock = 8] = "CapsLock", t[t.Escape = 9] = "Escape", t[t.Space = 10] = "Space", t[t.PageUp = 11] = "PageUp", t[t.PageDown = 12] = "PageDown", t[t.End = 13] = "End", t[t.Home = 14] = "Home", t[t.LeftArrow = 15] = "LeftArrow", t[t.UpArrow = 16] = "UpArrow", t[t.RightArrow = 17] = "RightArrow", t[t.DownArrow = 18] = "DownArrow", t[t.Insert = 19] = "Insert", t[t.Delete = 20] = "Delete", t[t.Digit0 = 21] = "Digit0", t[t.Digit1 = 22] = "Digit1", t[t.Digit2 = 23] = "Digit2", t[t.Digit3 = 24] = "Digit3", t[t.Digit4 = 25] = "Digit4", t[t.Digit5 = 26] = "Digit5", t[t.Digit6 = 27] = "Digit6", t[t.Digit7 = 28] = "Digit7", t[t.Digit8 = 29] = "Digit8", t[t.Digit9 = 30] = "Digit9", t[t.KeyA = 31] = "KeyA", t[t.KeyB = 32] = "KeyB", t[t.KeyC = 33] = "KeyC", t[t.KeyD = 34] = "KeyD", t[t.KeyE = 35] = "KeyE", t[t.KeyF = 36] = "KeyF", t[t.KeyG = 37] = "KeyG", t[t.KeyH = 38] = "KeyH", t[t.KeyI = 39] = "KeyI", t[t.KeyJ = 40] = "KeyJ", t[t.KeyK = 41] = "KeyK", t[t.KeyL = 42] = "KeyL", t[t.KeyM = 43] = "KeyM", t[t.KeyN = 44] = "KeyN", t[t.KeyO = 45] = "KeyO", t[t.KeyP = 46] = "KeyP", t[t.KeyQ = 47] = "KeyQ", t[t.KeyR = 48] = "KeyR", t[t.KeyS = 49] = "KeyS", t[t.KeyT = 50] = "KeyT", t[t.KeyU = 51] = "KeyU", t[t.KeyV = 52] = "KeyV", t[t.KeyW = 53] = "KeyW", t[t.KeyX = 54] = "KeyX", t[t.KeyY = 55] = "KeyY", t[t.KeyZ = 56] = "KeyZ", t[t.Meta = 57] = "Meta", t[t.ContextMenu = 58] = "ContextMenu", t[t.F1 = 59] = "F1", t[t.F2 = 60] = "F2", t[t.F3 = 61] = "F3", t[t.F4 = 62] = "F4", t[t.F5 = 63] = "F5", t[t.F6 = 64] = "F6", t[t.F7 = 65] = "F7", t[t.F8 = 66] = "F8", t[t.F9 = 67] = "F9", t[t.F10 = 68] = "F10", t[t.F11 = 69] = "F11", t[t.F12 = 70] = "F12", t[t.F13 = 71] = "F13", t[t.F14 = 72] = "F14", t[t.F15 = 73] = "F15", t[t.F16 = 74] = "F16", t[t.F17 = 75] = "F17", t[t.F18 = 76] = "F18", t[t.F19 = 77] = "F19", t[t.F20 = 78] = "F20", t[t.F21 = 79] = "F21", t[t.F22 = 80] = "F22", t[t.F23 = 81] = "F23", t[t.F24 = 82] = "F24", t[t.NumLock = 83] = "NumLock", t[t.ScrollLock = 84] = "ScrollLock", t[t.Semicolon = 85] = "Semicolon", t[t.Equal = 86] = "Equal", t[t.Comma = 87] = "Comma", t[t.Minus = 88] = "Minus", t[t.Period = 89] = "Period", t[t.Slash = 90] = "Slash", t[t.Backquote = 91] = "Backquote", t[t.BracketLeft = 92] = "BracketLeft", t[t.Backslash = 93] = "Backslash", t[t.BracketRight = 94] = "BracketRight", t[t.Quote = 95] = "Quote", t[t.OEM_8 = 96] = "OEM_8", t[t.IntlBackslash = 97] = "IntlBackslash", t[t.Numpad0 = 98] = "Numpad0", t[t.Numpad1 = 99] = "Numpad1", t[t.Numpad2 = 100] = "Numpad2", t[t.Numpad3 = 101] = "Numpad3", t[t.Numpad4 = 102] = "Numpad4", t[t.Numpad5 = 103] = "Numpad5", t[t.Numpad6 = 104] = "Numpad6", t[t.Numpad7 = 105] = "Numpad7", t[t.Numpad8 = 106] = "Numpad8", t[t.Numpad9 = 107] = "Numpad9", t[t.NumpadMultiply = 108] = "NumpadMultiply", t[t.NumpadAdd = 109] = "NumpadAdd", t[t.NUMPAD_SEPARATOR = 110] = "NUMPAD_SEPARATOR", t[t.NumpadSubtract = 111] = "NumpadSubtract", t[t.NumpadDecimal = 112] = "NumpadDecimal", t[t.NumpadDivide = 113] = "NumpadDivide", t[t.KEY_IN_COMPOSITION = 114] = "KEY_IN_COMPOSITION", t[t.ABNT_C1 = 115] = "ABNT_C1", t[t.ABNT_C2 = 116] = "ABNT_C2", t[t.AudioVolumeMute = 117] = "AudioVolumeMute", t[t.AudioVolumeUp = 118] = "AudioVolumeUp", t[t.AudioVolumeDown = 119] = "AudioVolumeDown", t[t.BrowserSearch = 120] = "BrowserSearch", t[t.BrowserHome = 121] = "BrowserHome", t[t.BrowserBack = 122] = "BrowserBack", t[t.BrowserForward = 123] = "BrowserForward", t[t.MediaTrackNext = 124] = "MediaTrackNext", t[t.MediaTrackPrevious = 125] = "MediaTrackPrevious", t[t.MediaStop = 126] = "MediaStop", t[t.MediaPlayPause = 127] = "MediaPlayPause", t[t.LaunchMediaPlayer = 128] = "LaunchMediaPlayer", t[t.LaunchMail = 129] = "LaunchMail", t[t.LaunchApp2 = 130] = "LaunchApp2", t[t.Clear = 131] = "Clear", t[t.MAX_VALUE = 132] = "MAX_VALUE"; -})(Xr || (Xr = {})); -var Yr; -(function(t) { - t[t.Hint = 1] = "Hint", t[t.Info = 2] = "Info", t[t.Warning = 4] = "Warning", t[t.Error = 8] = "Error"; -})(Yr || (Yr = {})); -var Kr; -(function(t) { - t[t.Unnecessary = 1] = "Unnecessary", t[t.Deprecated = 2] = "Deprecated"; -})(Kr || (Kr = {})); var Us; (function(t) { - t[t.Inline = 1] = "Inline", t[t.Gutter = 2] = "Gutter"; + t[t.Type = 1] = "Type", t[t.Parameter = 2] = "Parameter"; })(Us || (Us = {})); var Vs; (function(t) { - t[t.UNKNOWN = 0] = "UNKNOWN", t[t.TEXTAREA = 1] = "TEXTAREA", t[t.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN", t[t.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS", t[t.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS", t[t.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE", t[t.CONTENT_TEXT = 6] = "CONTENT_TEXT", t[t.CONTENT_EMPTY = 7] = "CONTENT_EMPTY", t[t.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", t[t.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", t[t.OVERVIEW_RULER = 10] = "OVERVIEW_RULER", t[t.SCROLLBAR = 11] = "SCROLLBAR", t[t.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET", t[t.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"; + t[t.Automatic = 0] = "Automatic", t[t.Explicit = 1] = "Explicit"; })(Vs || (Vs = {})); +var ri; +(function(t) { + t[t.DependsOnKbLayout = -1] = "DependsOnKbLayout", t[t.Unknown = 0] = "Unknown", t[t.Backspace = 1] = "Backspace", t[t.Tab = 2] = "Tab", t[t.Enter = 3] = "Enter", t[t.Shift = 4] = "Shift", t[t.Ctrl = 5] = "Ctrl", t[t.Alt = 6] = "Alt", t[t.PauseBreak = 7] = "PauseBreak", t[t.CapsLock = 8] = "CapsLock", t[t.Escape = 9] = "Escape", t[t.Space = 10] = "Space", t[t.PageUp = 11] = "PageUp", t[t.PageDown = 12] = "PageDown", t[t.End = 13] = "End", t[t.Home = 14] = "Home", t[t.LeftArrow = 15] = "LeftArrow", t[t.UpArrow = 16] = "UpArrow", t[t.RightArrow = 17] = "RightArrow", t[t.DownArrow = 18] = "DownArrow", t[t.Insert = 19] = "Insert", t[t.Delete = 20] = "Delete", t[t.Digit0 = 21] = "Digit0", t[t.Digit1 = 22] = "Digit1", t[t.Digit2 = 23] = "Digit2", t[t.Digit3 = 24] = "Digit3", t[t.Digit4 = 25] = "Digit4", t[t.Digit5 = 26] = "Digit5", t[t.Digit6 = 27] = "Digit6", t[t.Digit7 = 28] = "Digit7", t[t.Digit8 = 29] = "Digit8", t[t.Digit9 = 30] = "Digit9", t[t.KeyA = 31] = "KeyA", t[t.KeyB = 32] = "KeyB", t[t.KeyC = 33] = "KeyC", t[t.KeyD = 34] = "KeyD", t[t.KeyE = 35] = "KeyE", t[t.KeyF = 36] = "KeyF", t[t.KeyG = 37] = "KeyG", t[t.KeyH = 38] = "KeyH", t[t.KeyI = 39] = "KeyI", t[t.KeyJ = 40] = "KeyJ", t[t.KeyK = 41] = "KeyK", t[t.KeyL = 42] = "KeyL", t[t.KeyM = 43] = "KeyM", t[t.KeyN = 44] = "KeyN", t[t.KeyO = 45] = "KeyO", t[t.KeyP = 46] = "KeyP", t[t.KeyQ = 47] = "KeyQ", t[t.KeyR = 48] = "KeyR", t[t.KeyS = 49] = "KeyS", t[t.KeyT = 50] = "KeyT", t[t.KeyU = 51] = "KeyU", t[t.KeyV = 52] = "KeyV", t[t.KeyW = 53] = "KeyW", t[t.KeyX = 54] = "KeyX", t[t.KeyY = 55] = "KeyY", t[t.KeyZ = 56] = "KeyZ", t[t.Meta = 57] = "Meta", t[t.ContextMenu = 58] = "ContextMenu", t[t.F1 = 59] = "F1", t[t.F2 = 60] = "F2", t[t.F3 = 61] = "F3", t[t.F4 = 62] = "F4", t[t.F5 = 63] = "F5", t[t.F6 = 64] = "F6", t[t.F7 = 65] = "F7", t[t.F8 = 66] = "F8", t[t.F9 = 67] = "F9", t[t.F10 = 68] = "F10", t[t.F11 = 69] = "F11", t[t.F12 = 70] = "F12", t[t.F13 = 71] = "F13", t[t.F14 = 72] = "F14", t[t.F15 = 73] = "F15", t[t.F16 = 74] = "F16", t[t.F17 = 75] = "F17", t[t.F18 = 76] = "F18", t[t.F19 = 77] = "F19", t[t.F20 = 78] = "F20", t[t.F21 = 79] = "F21", t[t.F22 = 80] = "F22", t[t.F23 = 81] = "F23", t[t.F24 = 82] = "F24", t[t.NumLock = 83] = "NumLock", t[t.ScrollLock = 84] = "ScrollLock", t[t.Semicolon = 85] = "Semicolon", t[t.Equal = 86] = "Equal", t[t.Comma = 87] = "Comma", t[t.Minus = 88] = "Minus", t[t.Period = 89] = "Period", t[t.Slash = 90] = "Slash", t[t.Backquote = 91] = "Backquote", t[t.BracketLeft = 92] = "BracketLeft", t[t.Backslash = 93] = "Backslash", t[t.BracketRight = 94] = "BracketRight", t[t.Quote = 95] = "Quote", t[t.OEM_8 = 96] = "OEM_8", t[t.IntlBackslash = 97] = "IntlBackslash", t[t.Numpad0 = 98] = "Numpad0", t[t.Numpad1 = 99] = "Numpad1", t[t.Numpad2 = 100] = "Numpad2", t[t.Numpad3 = 101] = "Numpad3", t[t.Numpad4 = 102] = "Numpad4", t[t.Numpad5 = 103] = "Numpad5", t[t.Numpad6 = 104] = "Numpad6", t[t.Numpad7 = 105] = "Numpad7", t[t.Numpad8 = 106] = "Numpad8", t[t.Numpad9 = 107] = "Numpad9", t[t.NumpadMultiply = 108] = "NumpadMultiply", t[t.NumpadAdd = 109] = "NumpadAdd", t[t.NUMPAD_SEPARATOR = 110] = "NUMPAD_SEPARATOR", t[t.NumpadSubtract = 111] = "NumpadSubtract", t[t.NumpadDecimal = 112] = "NumpadDecimal", t[t.NumpadDivide = 113] = "NumpadDivide", t[t.KEY_IN_COMPOSITION = 114] = "KEY_IN_COMPOSITION", t[t.ABNT_C1 = 115] = "ABNT_C1", t[t.ABNT_C2 = 116] = "ABNT_C2", t[t.AudioVolumeMute = 117] = "AudioVolumeMute", t[t.AudioVolumeUp = 118] = "AudioVolumeUp", t[t.AudioVolumeDown = 119] = "AudioVolumeDown", t[t.BrowserSearch = 120] = "BrowserSearch", t[t.BrowserHome = 121] = "BrowserHome", t[t.BrowserBack = 122] = "BrowserBack", t[t.BrowserForward = 123] = "BrowserForward", t[t.MediaTrackNext = 124] = "MediaTrackNext", t[t.MediaTrackPrevious = 125] = "MediaTrackPrevious", t[t.MediaStop = 126] = "MediaStop", t[t.MediaPlayPause = 127] = "MediaPlayPause", t[t.LaunchMediaPlayer = 128] = "LaunchMediaPlayer", t[t.LaunchMail = 129] = "LaunchMail", t[t.LaunchApp2 = 130] = "LaunchApp2", t[t.Clear = 131] = "Clear", t[t.MAX_VALUE = 132] = "MAX_VALUE"; +})(ri || (ri = {})); +var ii; +(function(t) { + t[t.Hint = 1] = "Hint", t[t.Info = 2] = "Info", t[t.Warning = 4] = "Warning", t[t.Error = 8] = "Error"; +})(ii || (ii = {})); +var si; +(function(t) { + t[t.Unnecessary = 1] = "Unnecessary", t[t.Deprecated = 2] = "Deprecated"; +})(si || (si = {})); var Bs; (function(t) { - t[t.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER", t[t.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER", t[t.TOP_CENTER = 2] = "TOP_CENTER"; + t[t.Inline = 1] = "Inline", t[t.Gutter = 2] = "Gutter"; })(Bs || (Bs = {})); var js; (function(t) { - t[t.Left = 1] = "Left", t[t.Center = 2] = "Center", t[t.Right = 4] = "Right", t[t.Full = 7] = "Full"; + t[t.UNKNOWN = 0] = "UNKNOWN", t[t.TEXTAREA = 1] = "TEXTAREA", t[t.GUTTER_GLYPH_MARGIN = 2] = "GUTTER_GLYPH_MARGIN", t[t.GUTTER_LINE_NUMBERS = 3] = "GUTTER_LINE_NUMBERS", t[t.GUTTER_LINE_DECORATIONS = 4] = "GUTTER_LINE_DECORATIONS", t[t.GUTTER_VIEW_ZONE = 5] = "GUTTER_VIEW_ZONE", t[t.CONTENT_TEXT = 6] = "CONTENT_TEXT", t[t.CONTENT_EMPTY = 7] = "CONTENT_EMPTY", t[t.CONTENT_VIEW_ZONE = 8] = "CONTENT_VIEW_ZONE", t[t.CONTENT_WIDGET = 9] = "CONTENT_WIDGET", t[t.OVERVIEW_RULER = 10] = "OVERVIEW_RULER", t[t.SCROLLBAR = 11] = "SCROLLBAR", t[t.OVERLAY_WIDGET = 12] = "OVERLAY_WIDGET", t[t.OUTSIDE_EDITOR = 13] = "OUTSIDE_EDITOR"; })(js || (js = {})); var qs; (function(t) { - t[t.Left = 0] = "Left", t[t.Right = 1] = "Right", t[t.None = 2] = "None", t[t.LeftOfInjectedText = 3] = "LeftOfInjectedText", t[t.RightOfInjectedText = 4] = "RightOfInjectedText"; + t[t.TOP_RIGHT_CORNER = 0] = "TOP_RIGHT_CORNER", t[t.BOTTOM_RIGHT_CORNER = 1] = "BOTTOM_RIGHT_CORNER", t[t.TOP_CENTER = 2] = "TOP_CENTER"; })(qs || (qs = {})); var $s; (function(t) { - t[t.Off = 0] = "Off", t[t.On = 1] = "On", t[t.Relative = 2] = "Relative", t[t.Interval = 3] = "Interval", t[t.Custom = 4] = "Custom"; + t[t.Left = 1] = "Left", t[t.Center = 2] = "Center", t[t.Right = 4] = "Right", t[t.Full = 7] = "Full"; })($s || ($s = {})); var Hs; (function(t) { - t[t.None = 0] = "None", t[t.Text = 1] = "Text", t[t.Blocks = 2] = "Blocks"; + t[t.Left = 0] = "Left", t[t.Right = 1] = "Right", t[t.None = 2] = "None", t[t.LeftOfInjectedText = 3] = "LeftOfInjectedText", t[t.RightOfInjectedText = 4] = "RightOfInjectedText"; })(Hs || (Hs = {})); var Gs; (function(t) { - t[t.Smooth = 0] = "Smooth", t[t.Immediate = 1] = "Immediate"; + t[t.Off = 0] = "Off", t[t.On = 1] = "On", t[t.Relative = 2] = "Relative", t[t.Interval = 3] = "Interval", t[t.Custom = 4] = "Custom"; })(Gs || (Gs = {})); var Js; (function(t) { - t[t.Auto = 1] = "Auto", t[t.Hidden = 2] = "Hidden", t[t.Visible = 3] = "Visible"; + t[t.None = 0] = "None", t[t.Text = 1] = "Text", t[t.Blocks = 2] = "Blocks"; })(Js || (Js = {})); -var Qr; -(function(t) { - t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL"; -})(Qr || (Qr = {})); var Xs; (function(t) { - t[t.Invoke = 1] = "Invoke", t[t.TriggerCharacter = 2] = "TriggerCharacter", t[t.ContentChange = 3] = "ContentChange"; + t[t.Smooth = 0] = "Smooth", t[t.Immediate = 1] = "Immediate"; })(Xs || (Xs = {})); var Ys; (function(t) { - t[t.File = 0] = "File", t[t.Module = 1] = "Module", t[t.Namespace = 2] = "Namespace", t[t.Package = 3] = "Package", t[t.Class = 4] = "Class", t[t.Method = 5] = "Method", t[t.Property = 6] = "Property", t[t.Field = 7] = "Field", t[t.Constructor = 8] = "Constructor", t[t.Enum = 9] = "Enum", t[t.Interface = 10] = "Interface", t[t.Function = 11] = "Function", t[t.Variable = 12] = "Variable", t[t.Constant = 13] = "Constant", t[t.String = 14] = "String", t[t.Number = 15] = "Number", t[t.Boolean = 16] = "Boolean", t[t.Array = 17] = "Array", t[t.Object = 18] = "Object", t[t.Key = 19] = "Key", t[t.Null = 20] = "Null", t[t.EnumMember = 21] = "EnumMember", t[t.Struct = 22] = "Struct", t[t.Event = 23] = "Event", t[t.Operator = 24] = "Operator", t[t.TypeParameter = 25] = "TypeParameter"; + t[t.Auto = 1] = "Auto", t[t.Hidden = 2] = "Hidden", t[t.Visible = 3] = "Visible"; })(Ys || (Ys = {})); +var ai; +(function(t) { + t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL"; +})(ai || (ai = {})); var Ks; (function(t) { - t[t.Deprecated = 1] = "Deprecated"; + t[t.Invoke = 1] = "Invoke", t[t.TriggerCharacter = 2] = "TriggerCharacter", t[t.ContentChange = 3] = "ContentChange"; })(Ks || (Ks = {})); var Qs; (function(t) { - t[t.Hidden = 0] = "Hidden", t[t.Blink = 1] = "Blink", t[t.Smooth = 2] = "Smooth", t[t.Phase = 3] = "Phase", t[t.Expand = 4] = "Expand", t[t.Solid = 5] = "Solid"; + t[t.File = 0] = "File", t[t.Module = 1] = "Module", t[t.Namespace = 2] = "Namespace", t[t.Package = 3] = "Package", t[t.Class = 4] = "Class", t[t.Method = 5] = "Method", t[t.Property = 6] = "Property", t[t.Field = 7] = "Field", t[t.Constructor = 8] = "Constructor", t[t.Enum = 9] = "Enum", t[t.Interface = 10] = "Interface", t[t.Function = 11] = "Function", t[t.Variable = 12] = "Variable", t[t.Constant = 13] = "Constant", t[t.String = 14] = "String", t[t.Number = 15] = "Number", t[t.Boolean = 16] = "Boolean", t[t.Array = 17] = "Array", t[t.Object = 18] = "Object", t[t.Key = 19] = "Key", t[t.Null = 20] = "Null", t[t.EnumMember = 21] = "EnumMember", t[t.Struct = 22] = "Struct", t[t.Event = 23] = "Event", t[t.Operator = 24] = "Operator", t[t.TypeParameter = 25] = "TypeParameter"; })(Qs || (Qs = {})); var Zs; (function(t) { - t[t.Line = 1] = "Line", t[t.Block = 2] = "Block", t[t.Underline = 3] = "Underline", t[t.LineThin = 4] = "LineThin", t[t.BlockOutline = 5] = "BlockOutline", t[t.UnderlineThin = 6] = "UnderlineThin"; + t[t.Deprecated = 1] = "Deprecated"; })(Zs || (Zs = {})); var ea; (function(t) { - t[t.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", t[t.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", t[t.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", t[t.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; + t[t.Hidden = 0] = "Hidden", t[t.Blink = 1] = "Blink", t[t.Smooth = 2] = "Smooth", t[t.Phase = 3] = "Phase", t[t.Expand = 4] = "Expand", t[t.Solid = 5] = "Solid"; })(ea || (ea = {})); var ta; (function(t) { - t[t.None = 0] = "None", t[t.Same = 1] = "Same", t[t.Indent = 2] = "Indent", t[t.DeepIndent = 3] = "DeepIndent"; + t[t.Line = 1] = "Line", t[t.Block = 2] = "Block", t[t.Underline = 3] = "Underline", t[t.LineThin = 4] = "LineThin", t[t.BlockOutline = 5] = "BlockOutline", t[t.UnderlineThin = 6] = "UnderlineThin"; })(ta || (ta = {})); -class kn { - static chord(e, n) { - return yh(e, n); - } -} -kn.CtrlCmd = 2048; -kn.Shift = 1024; -kn.Alt = 512; -kn.WinCtrl = 256; -function Ch() { - return { - editor: void 0, - languages: void 0, - CancellationTokenSource: xc, - Emitter: Ke, - KeyCode: Xr, - KeyMod: kn, - Position: Ge, - Range: Ee, - Selection: Ne, - SelectionDirection: Qr, - MarkerSeverity: Yr, - MarkerTag: Kr, - Uri: Ci, - Token: Sh - }; -} var na; (function(t) { - t[t.Left = 1] = "Left", t[t.Center = 2] = "Center", t[t.Right = 4] = "Right", t[t.Full = 7] = "Full"; + t[t.AlwaysGrowsWhenTypingAtEdges = 0] = "AlwaysGrowsWhenTypingAtEdges", t[t.NeverGrowsWhenTypingAtEdges = 1] = "NeverGrowsWhenTypingAtEdges", t[t.GrowsOnlyWhenTypingBefore = 2] = "GrowsOnlyWhenTypingBefore", t[t.GrowsOnlyWhenTypingAfter = 3] = "GrowsOnlyWhenTypingAfter"; })(na || (na = {})); var ra; (function(t) { - t[t.Left = 1] = "Left", t[t.Right = 2] = "Right"; + t[t.None = 0] = "None", t[t.Same = 1] = "Same", t[t.Indent = 2] = "Indent", t[t.DeepIndent = 3] = "DeepIndent"; })(ra || (ra = {})); +class An { + static chord(e, n) { + return Ch(e, n); + } +} +An.CtrlCmd = 2048; +An.Shift = 1024; +An.Alt = 512; +An.WinCtrl = 256; +function Fh() { + return { + editor: void 0, + languages: void 0, + CancellationTokenSource: yh, + Emitter: qe, + KeyCode: ri, + KeyMod: An, + Position: Ke, + Range: Ae, + Selection: Me, + SelectionDirection: ai, + MarkerSeverity: ii, + MarkerTag: si, + Uri: Ni, + Token: Rh + }; +} var ia; (function(t) { - t[t.Inline = 1] = "Inline", t[t.Gutter = 2] = "Gutter"; + t[t.Left = 1] = "Left", t[t.Center = 2] = "Center", t[t.Right = 4] = "Right", t[t.Full = 7] = "Full"; })(ia || (ia = {})); var sa; (function(t) { - t[t.Both = 0] = "Both", t[t.Right = 1] = "Right", t[t.Left = 2] = "Left", t[t.None = 3] = "None"; + t[t.Left = 1] = "Left", t[t.Right = 2] = "Right"; })(sa || (sa = {})); -function kh(t, e, n, r, i) { +var aa; +(function(t) { + t[t.Inline = 1] = "Inline", t[t.Gutter = 2] = "Gutter"; +})(aa || (aa = {})); +var oa; +(function(t) { + t[t.Both = 0] = "Both", t[t.Right = 1] = "Right", t[t.Left = 2] = "Left", t[t.None = 3] = "None"; +})(oa || (oa = {})); +function Eh(t, e, n, r, i) { if (r === 0) return !0; const s = e.charCodeAt(r - 1); @@ -5061,7 +4983,7 @@ function kh(t, e, n, r, i) { } return !1; } -function _h(t, e, n, r, i) { +function Dh(t, e, n, r, i) { if (r + i === n) return !0; const s = e.charCodeAt(r + i); @@ -5074,10 +4996,10 @@ function _h(t, e, n, r, i) { } return !1; } -function Fh(t, e, n, r, i) { - return kh(t, e, n, r, i) && _h(t, e, n, r, i); +function Ah(t, e, n, r, i) { + return Eh(t, e, n, r, i) && Dh(t, e, n, r, i); } -class Rh { +class Nh { constructor(e, n) { this._wordSeparators = e, this._searchRegex = n, this._prevMatchStartIndex = -1, this._prevMatchLength = 0; } @@ -5098,22 +5020,22 @@ class Rh { } return null; } - if (this._prevMatchStartIndex = i, this._prevMatchLength = s, !this._wordSeparators || Fh(this._wordSeparators, e, n, i, s)) + if (this._prevMatchStartIndex = i, this._prevMatchLength = s, !this._wordSeparators || Ah(this._wordSeparators, e, n, i, s)) return r; } while (r); return null; } } -function Eh(t, e = "Unreachable") { +function Mh(t, e = "Unreachable") { throw new Error(e); } -function Ri(t) { +function rr(t) { if (!t()) { debugger; - t(), Go(new Dt("Assertion Failed")); + t(), tl(new st("Assertion Failed")); } } -function cl(t, e) { +function gl(t, e) { let n = 0; for (; n < t.length - 1; ) { const r = t[n], i = t[n + 1]; @@ -5123,54 +5045,54 @@ function cl(t, e) { } return !0; } -class Dh { +class zh { static computeUnicodeHighlights(e, n, r) { - const i = r ? r.startLineNumber : 1, s = r ? r.endLineNumber : e.getLineCount(), a = new aa(n), o = a.getCandidateCodePoints(); + const i = r ? r.startLineNumber : 1, s = r ? r.endLineNumber : e.getLineCount(), a = new la(n), o = a.getCandidateCodePoints(); let l; - o === "allNonBasicAscii" ? l = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g") : l = new RegExp(`${Ah(Array.from(o))}`, "g"); - const c = new Rh(null, l), h = []; - let u = !1, f, m = 0, g = 0, b = 0; + o === "allNonBasicAscii" ? l = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g") : l = new RegExp(`${Ph(Array.from(o))}`, "g"); + const c = new Nh(null, l), h = []; + let u = !1, m, f = 0, g = 0, b = 0; e: - for (let y = i, w = s; y <= w; y++) { - const x = e.getLineContent(y), k = x.length; + for (let y = i, x = s; y <= x; y++) { + const S = e.getLineContent(y), w = S.length; c.reset(0); do - if (f = c.next(x), f) { - let F = f.index, N = f.index + f[0].length; - if (F > 0) { - const P = x.charCodeAt(F - 1); - Vr(P) && F--; + if (m = c.next(S), m) { + let E = m.index, R = m.index + m[0].length; + if (E > 0) { + const q = S.charCodeAt(E - 1); + Xr(q) && E--; } - if (N + 1 < k) { - const P = x.charCodeAt(N - 1); - Vr(P) && N++; + if (R + 1 < w) { + const q = S.charCodeAt(R - 1); + Xr(q) && R++; } - const j = x.substring(F, N); - let H = ki(F + 1, ol, x, 0); - H && H.endColumn <= F + 1 && (H = null); - const B = a.shouldHighlightNonBasicASCII(j, H ? H.word : null); - if (B !== 0) { - B === 3 ? m++ : B === 2 ? g++ : B === 1 ? b++ : Eh(); - const P = 1e3; - if (h.length >= P) { + const T = S.substring(E, R); + let W = Mi(E + 1, pl, S, 0); + W && W.endColumn <= E + 1 && (W = null); + const L = a.shouldHighlightNonBasicASCII(T, W ? W.word : null); + if (L !== 0) { + L === 3 ? f++ : L === 2 ? g++ : L === 1 ? b++ : Mh(); + const q = 1e3; + if (h.length >= q) { u = !0; break e; } - h.push(new Ee(y, F + 1, y, N + 1)); + h.push(new Ae(y, E + 1, y, R + 1)); } } - while (f); + while (m); } return { ranges: h, hasMore: u, - ambiguousCharacterCount: m, + ambiguousCharacterCount: f, invisibleCharacterCount: g, nonBasicAsciiCharacterCount: b }; } static computeUnicodeHighlightReason(e, n) { - const r = new aa(n); + const r = new la(n); switch (r.shouldHighlightNonBasicASCII(e, null)) { case 0: return null; @@ -5180,7 +5102,7 @@ class Dh { /* UnicodeHighlighterReasonKind.Invisible */ }; case 3: { - const s = e.codePointAt(0), a = r.ambiguousCharacters.getPrimaryConfusable(s), o = Ve.getLocales().filter((l) => !Ve.getInstance(/* @__PURE__ */ new Set([...n.allowedLocales, l])).isAmbiguous(s)); + const s = e.codePointAt(0), a = r.ambiguousCharacters.getPrimaryConfusable(s), o = Dt.getLocales().filter((l) => !Dt.getInstance(/* @__PURE__ */ new Set([...n.allowedLocales, l])).isAmbiguous(s)); return { kind: 0, confusableWith: String.fromCodePoint(a), notAmbiguousInLocales: o }; } case 1: @@ -5191,20 +5113,20 @@ class Dh { } } } -function Ah(t, e) { +function Ph(t, e) { return `[${Cc(t.map((r) => String.fromCodePoint(r)).join(""))}]`; } -class aa { +class la { constructor(e) { - this.options = e, this.allowedCodePoints = new Set(e.allowedCodePoints), this.ambiguousCharacters = Ve.getInstance(new Set(e.allowedLocales)); + this.options = e, this.allowedCodePoints = new Set(e.allowedCodePoints), this.ambiguousCharacters = Dt.getInstance(new Set(e.allowedLocales)); } getCandidateCodePoints() { if (this.options.nonBasicASCII) return "allNonBasicAscii"; const e = /* @__PURE__ */ new Set(); if (this.options.invisibleCharacters) - for (const n of bt.codePoints) - oa(String.fromCodePoint(n)) || e.add(n); + for (const n of gt.codePoints) + ca(String.fromCodePoint(n)) || e.add(n); if (this.options.ambiguousCharacters) for (const n of this.ambiguousCharacters.getConfusableCodePoints()) e.add(n); @@ -5221,45 +5143,125 @@ class aa { let i = !1, s = !1; if (n) for (const a of n) { - const o = a.codePointAt(0), l = Mc(a); - i = i || l, !l && !this.ambiguousCharacters.isAmbiguous(o) && !bt.isInvisibleCharacter(o) && (s = !0); + const o = a.codePointAt(0), l = Nc(a); + i = i || l, !l && !this.ambiguousCharacters.isAmbiguous(o) && !gt.isInvisibleCharacter(o) && (s = !0); } return ( /* Don't allow mixing weird looking characters with ASCII */ !i && /* Is there an obviously weird looking character? */ - s ? 0 : this.options.invisibleCharacters && !oa(e) && bt.isInvisibleCharacter(r) ? 2 : this.options.ambiguousCharacters && this.ambiguousCharacters.isAmbiguous(r) ? 3 : 0 + s ? 0 : this.options.invisibleCharacters && !ca(e) && gt.isInvisibleCharacter(r) ? 2 : this.options.ambiguousCharacters && this.ambiguousCharacters.isAmbiguous(r) ? 3 : 0 ); } } -function oa(t) { +function ca(t) { return t === " " || t === ` ` || t === " "; } -class hl { - constructor(e, n) { - this.changes = e, this.hitTimeout = n; +class Z { + static addRange(e, n) { + let r = 0; + for (; r < n.length && n[r].endExclusive < e.start; ) + r++; + let i = r; + for (; i < n.length && n[i].start <= e.endExclusive; ) + i++; + if (r === i) + n.splice(r, 0, e); + else { + const s = Math.min(e.start, n[r].start), a = Math.max(e.endExclusive, n[i - 1].endExclusive); + n.splice(r, i - r, new Z(s, a)); + } } -} -class Kn { - constructor(e, n, r) { - this.originalRange = e, this.modifiedRange = n, this.innerChanges = r; + static tryCreate(e, n) { + if (!(e > n)) + return new Z(e, n); + } + static ofLength(e) { + return new Z(0, e); + } + constructor(e, n) { + if (this.start = e, this.endExclusive = n, e > n) + throw new st(`Invalid range: ${this.toString()}`); + } + get isEmpty() { + return this.start === this.endExclusive; + } + delta(e) { + return new Z(this.start + e, this.endExclusive + e); + } + deltaStart(e) { + return new Z(this.start + e, this.endExclusive); + } + deltaEnd(e) { + return new Z(this.start, this.endExclusive + e); + } + get length() { + return this.endExclusive - this.start; } toString() { - return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + return `[${this.start}, ${this.endExclusive})`; } - get changedLineCount() { - return Math.max(this.originalRange.length, this.modifiedRange.length); + equals(e) { + return this.start === e.start && this.endExclusive === e.endExclusive; + } + containsRange(e) { + return this.start <= e.start && e.endExclusive <= this.endExclusive; + } + contains(e) { + return this.start <= e && e < this.endExclusive; + } + /** + * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n) + * The joined range is the smallest range that contains both ranges. + */ + join(e) { + return new Z(Math.min(this.start, e.start), Math.max(this.endExclusive, e.endExclusive)); + } + /** + * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n) + * + * The resulting range is empty if the ranges do not intersect, but touch. + * If the ranges don't even touch, the result is undefined. + */ + intersect(e) { + const n = Math.max(this.start, e.start), r = Math.min(this.endExclusive, e.endExclusive); + if (n <= r) + return new Z(n, r); + } + slice(e) { + return e.slice(this.start, this.endExclusive); + } + /** + * Returns the given value if it is contained in this instance, otherwise the closest value that is contained. + * The range must not be empty. + */ + clip(e) { + if (this.isEmpty) + throw new st(`Invalid clipping range: ${this.toString()}`); + return Math.max(this.start, Math.min(this.endExclusive - 1, e)); + } + /** + * Returns `r := value + k * length` such that `r` is contained in this range. + * The range must not be empty. + * + * E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`. + */ + clipCyclic(e) { + if (this.isEmpty) + throw new st(`Invalid clipping range: ${this.toString()}`); + return e < this.start ? this.endExclusive - (this.start - e) % this.length : e >= this.endExclusive ? this.start + (e - this.start) % this.length : e; } } -class dl { - constructor(e, n) { - this.originalRange = e, this.modifiedRange = n; +class re { + static fromRange(e) { + return new re(e.startLineNumber, e.endLineNumber); } - toString() { - return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + static subtract(e, n) { + return n ? e.startLineNumber < n.startLineNumber && n.endLineNumberExclusive < e.endLineNumberExclusive ? [ + new re(e.startLineNumber, n.startLineNumber), + new re(n.endLineNumberExclusive, e.endLineNumberExclusive) + ] : n.startLineNumber <= e.startLineNumber && e.endLineNumberExclusive <= n.endLineNumberExclusive ? [] : n.endLineNumberExclusive < e.endLineNumberExclusive ? [new re(Math.max(n.endLineNumberExclusive, e.startLineNumber), e.endLineNumberExclusive)] : [new re(e.startLineNumber, Math.min(n.startLineNumber, e.endLineNumberExclusive))] : [e]; } -} -class He { /** * @param lineRanges An array of sorted line ranges. */ @@ -5289,13 +5291,22 @@ class He { l.startLineNumber < c.startLineNumber ? (o = l, i++) : (o = c, s++); } else i < e.length ? (o = e[i], i++) : (o = n[s], s++); - a === null ? a = o : a.endLineNumberExclusive >= o.startLineNumber ? a = new He(a.startLineNumber, Math.max(a.endLineNumberExclusive, o.endLineNumberExclusive)) : (r.push(a), a = o); + a === null ? a = o : a.endLineNumberExclusive >= o.startLineNumber ? a = new re(a.startLineNumber, Math.max(a.endLineNumberExclusive, o.endLineNumberExclusive)) : (r.push(a), a = o); } return a !== null && r.push(a), r; } + static ofLength(e, n) { + return new re(e, e + n); + } + /** + * @internal + */ + static deserialize(e) { + return new re(e[0], e[1]); + } constructor(e, n) { if (e > n) - throw new Dt(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`); + throw new st(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`); this.startLineNumber = e, this.endLineNumberExclusive = n; } /** @@ -5314,7 +5325,10 @@ class He { * Moves this line range by the given offset of line numbers. */ delta(e) { - return new He(this.startLineNumber + e, this.endLineNumberExclusive + e); + return new re(this.startLineNumber + e, this.endLineNumberExclusive + e); + } + deltaLength(e) { + return new re(this.startLineNumber, this.endLineNumberExclusive + e); } /** * The number of lines this line range spans. @@ -5326,7 +5340,7 @@ class He { * Creates a line range that combines this and the given line range. */ join(e) { - return new He(Math.min(this.startLineNumber, e.startLineNumber), Math.max(this.endLineNumberExclusive, e.endLineNumberExclusive)); + return new re(Math.min(this.startLineNumber, e.startLineNumber), Math.max(this.endLineNumberExclusive, e.endLineNumberExclusive)); } toString() { return `[${this.startLineNumber},${this.endLineNumberExclusive})`; @@ -5338,7 +5352,10 @@ class He { intersect(e) { const n = Math.max(this.startLineNumber, e.startLineNumber), r = Math.min(this.endLineNumberExclusive, e.endLineNumberExclusive); if (n <= r) - return new He(n, r); + return new re(n, r); + } + intersectsStrict(e) { + return this.startLineNumber < e.endLineNumberExclusive && e.startLineNumber < this.endLineNumberExclusive; } overlapOrTouch(e) { return this.startLineNumber <= e.endLineNumberExclusive && e.startLineNumber <= this.endLineNumberExclusive; @@ -5346,12 +5363,107 @@ class He { equals(e) { return this.startLineNumber === e.startLineNumber && this.endLineNumberExclusive === e.endLineNumberExclusive; } + toInclusiveRange() { + return this.isEmpty ? null : new Ae(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER); + } + toExclusiveRange() { + return new Ae(this.startLineNumber, 1, this.endLineNumberExclusive, 1); + } + mapToLineArray(e) { + const n = []; + for (let r = this.startLineNumber; r < this.endLineNumberExclusive; r++) + n.push(e(r)); + return n; + } + forEach(e) { + for (let n = this.startLineNumber; n < this.endLineNumberExclusive; n++) + e(n); + } + /** + * @internal + */ + serialize() { + return [this.startLineNumber, this.endLineNumberExclusive]; + } + includes(e) { + return this.startLineNumber <= e && e < this.endLineNumberExclusive; + } + /** + * Converts this 1-based line range to a 0-based offset range (subtracts 1!). + * @internal + */ + toOffsetRange() { + return new Z(this.startLineNumber - 1, this.endLineNumberExclusive - 1); + } } -const Mh = 3; -class Nh { +class Xn { + constructor(e, n, r) { + this.changes = e, this.moves = n, this.hitTimeout = r; + } +} +class Xe { + static inverse(e, n, r) { + const i = []; + let s = 1, a = 1; + for (const l of e) { + const c = new Xe(new re(s, l.originalRange.startLineNumber), new re(a, l.modifiedRange.startLineNumber), void 0); + c.modifiedRange.isEmpty || i.push(c), s = l.originalRange.endLineNumberExclusive, a = l.modifiedRange.endLineNumberExclusive; + } + const o = new Xe(new re(s, n + 1), new re(a, r + 1), void 0); + return o.modifiedRange.isEmpty || i.push(o), i; + } + constructor(e, n, r) { + this.originalRange = e, this.modifiedRange = n, this.innerChanges = r; + } + toString() { + return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + } + get changedLineCount() { + return Math.max(this.originalRange.length, this.modifiedRange.length); + } + flip() { + var e; + return new Xe(this.modifiedRange, this.originalRange, (e = this.innerChanges) === null || e === void 0 ? void 0 : e.map((n) => n.flip())); + } +} +class vn { + constructor(e, n) { + this.originalRange = e, this.modifiedRange = n; + } + toString() { + return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; + } + flip() { + return new vn(this.modifiedRange, this.originalRange); + } +} +class yn { + constructor(e, n) { + this.original = e, this.modified = n; + } + toString() { + return `{${this.original.toString()}->${this.modified.toString()}}`; + } + flip() { + return new yn(this.modified, this.original); + } + join(e) { + return new yn(this.original.join(e.original), this.modified.join(e.modified)); + } +} +class Li { + constructor(e, n) { + this.lineRangeMapping = e, this.changes = n; + } + flip() { + return new Li(this.lineRangeMapping.flip(), this.changes.map((e) => e.flip())); + } +} +const Lh = 3; +class Ih { computeDiff(e, n, r) { var i; - const a = new pl(e, n, { + const a = new Oh(e, n, { maxComputationTime: r.maxComputationTimeMs, shouldIgnoreTrimWhitespace: r.ignoreTrimWhitespace, shouldComputeCharChanges: !0, @@ -5361,24 +5473,24 @@ class Nh { let l = null; for (const c of a.changes) { let h; - c.originalEndLineNumber === 0 ? h = new He(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1) : h = new He(c.originalStartLineNumber, c.originalEndLineNumber + 1); + c.originalEndLineNumber === 0 ? h = new re(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1) : h = new re(c.originalStartLineNumber, c.originalEndLineNumber + 1); let u; - c.modifiedEndLineNumber === 0 ? u = new He(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1) : u = new He(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); - let f = new Kn(h, u, (i = c.charChanges) === null || i === void 0 ? void 0 : i.map((m) => new dl(new Ee(m.originalStartLineNumber, m.originalStartColumn, m.originalEndLineNumber, m.originalEndColumn), new Ee(m.modifiedStartLineNumber, m.modifiedStartColumn, m.modifiedEndLineNumber, m.modifiedEndColumn)))); - l && (l.modifiedRange.endLineNumberExclusive === f.modifiedRange.startLineNumber || l.originalRange.endLineNumberExclusive === f.originalRange.startLineNumber) && (f = new Kn(l.originalRange.join(f.originalRange), l.modifiedRange.join(f.modifiedRange), l.innerChanges && f.innerChanges ? l.innerChanges.concat(f.innerChanges) : void 0), o.pop()), o.push(f), l = f; + c.modifiedEndLineNumber === 0 ? u = new re(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1) : u = new re(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); + let m = new Xe(h, u, (i = c.charChanges) === null || i === void 0 ? void 0 : i.map((f) => new vn(new Ae(f.originalStartLineNumber, f.originalStartColumn, f.originalEndLineNumber, f.originalEndColumn), new Ae(f.modifiedStartLineNumber, f.modifiedStartColumn, f.modifiedEndLineNumber, f.modifiedEndColumn)))); + l && (l.modifiedRange.endLineNumberExclusive === m.modifiedRange.startLineNumber || l.originalRange.endLineNumberExclusive === m.originalRange.startLineNumber) && (m = new Xe(l.originalRange.join(m.originalRange), l.modifiedRange.join(m.modifiedRange), l.innerChanges && m.innerChanges ? l.innerChanges.concat(m.innerChanges) : void 0), o.pop()), o.push(m), l = m; } - return Ri(() => cl(o, (c, h) => h.originalRange.startLineNumber - c.originalRange.endLineNumberExclusive === h.modifiedRange.startLineNumber - c.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) - c.originalRange.endLineNumberExclusive < h.originalRange.startLineNumber && c.modifiedRange.endLineNumberExclusive < h.modifiedRange.startLineNumber)), new hl(o, a.quitEarly); + return rr(() => gl(o, (c, h) => h.originalRange.startLineNumber - c.originalRange.endLineNumberExclusive === h.modifiedRange.startLineNumber - c.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + c.originalRange.endLineNumberExclusive < h.originalRange.startLineNumber && c.modifiedRange.endLineNumberExclusive < h.modifiedRange.startLineNumber)), new Xn(o, [], a.quitEarly); } } -function ul(t, e, n, r) { +function bl(t, e, n, r) { return new ft(t, e, n).ComputeDiff(r); } -let la = class { +let ha = class { constructor(e) { const n = [], r = []; for (let i = 0, s = e.length; i < s; i++) - n[i] = Zr(e[i], 1), r[i] = ei(e[i], 1); + n[i] = oi(e[i], 1), r[i] = li(e[i], 1); this.lines = e, this._startColumns = n, this._endColumns = r; } getElements() { @@ -5401,14 +5513,14 @@ let la = class { let o = 0; for (let l = n; l <= r; l++) { const c = this.lines[l], h = e ? this._startColumns[l] : 1, u = e ? this._endColumns[l] : c.length + 1; - for (let f = h; f < u; f++) - i[o] = c.charCodeAt(f - 1), s[o] = l + 1, a[o] = f, o++; + for (let m = h; m < u; m++) + i[o] = c.charCodeAt(m - 1), s[o] = l + 1, a[o] = m, o++; !e && l < r && (i[o] = 10, s[o] = l + 1, a[o] = c.length + 1, o++); } - return new zh(i, s, a); + return new Th(i, s, a); } }; -class zh { +class Th { constructor(e, n, r) { this._charCodes = e, this._lineNumbers = n, this._columns = r; } @@ -5435,47 +5547,47 @@ class zh { return e === -1 ? this.getStartColumn(e + 1) : (this._assertIndex(e, this._columns), this._charCodes[e] === 10 ? 1 : this._columns[e] + 1); } } -class Vt { +class Bt { constructor(e, n, r, i, s, a, o, l) { this.originalStartLineNumber = e, this.originalStartColumn = n, this.originalEndLineNumber = r, this.originalEndColumn = i, this.modifiedStartLineNumber = s, this.modifiedStartColumn = a, this.modifiedEndLineNumber = o, this.modifiedEndColumn = l; } static createFromDiffChange(e, n, r) { const i = n.getStartLineNumber(e.originalStart), s = n.getStartColumn(e.originalStart), a = n.getEndLineNumber(e.originalStart + e.originalLength - 1), o = n.getEndColumn(e.originalStart + e.originalLength - 1), l = r.getStartLineNumber(e.modifiedStart), c = r.getStartColumn(e.modifiedStart), h = r.getEndLineNumber(e.modifiedStart + e.modifiedLength - 1), u = r.getEndColumn(e.modifiedStart + e.modifiedLength - 1); - return new Vt(i, s, a, o, l, c, h, u); + return new Bt(i, s, a, o, l, c, h, u); } } -function Ph(t) { +function Wh(t) { if (t.length <= 1) return t; const e = [t[0]]; let n = e[0]; for (let r = 1, i = t.length; r < i; r++) { const s = t[r], a = s.originalStart - (n.originalStart + n.originalLength), o = s.modifiedStart - (n.modifiedStart + n.modifiedLength); - Math.min(a, o) < Mh ? (n.originalLength = s.originalStart + s.originalLength - n.originalStart, n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart) : (e.push(s), n = s); + Math.min(a, o) < Lh ? (n.originalLength = s.originalStart + s.originalLength - n.originalStart, n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart) : (e.push(s), n = s); } return e; } -class dn { +class pn { constructor(e, n, r, i, s) { this.originalStartLineNumber = e, this.originalEndLineNumber = n, this.modifiedStartLineNumber = r, this.modifiedEndLineNumber = i, this.charChanges = s; } static createFromDiffResult(e, n, r, i, s, a, o) { - let l, c, h, u, f; + let l, c, h, u, m; if (n.originalLength === 0 ? (l = r.getStartLineNumber(n.originalStart) - 1, c = 0) : (l = r.getStartLineNumber(n.originalStart), c = r.getEndLineNumber(n.originalStart + n.originalLength - 1)), n.modifiedLength === 0 ? (h = i.getStartLineNumber(n.modifiedStart) - 1, u = 0) : (h = i.getStartLineNumber(n.modifiedStart), u = i.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1)), a && n.originalLength > 0 && n.originalLength < 20 && n.modifiedLength > 0 && n.modifiedLength < 20 && s()) { - const m = r.createCharSequence(e, n.originalStart, n.originalStart + n.originalLength - 1), g = i.createCharSequence(e, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1); - if (m.getElements().length > 0 && g.getElements().length > 0) { - let b = ul(m, g, s, !0).changes; - o && (b = Ph(b)), f = []; - for (let y = 0, w = b.length; y < w; y++) - f.push(Vt.createFromDiffChange(b[y], m, g)); + const f = r.createCharSequence(e, n.originalStart, n.originalStart + n.originalLength - 1), g = i.createCharSequence(e, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1); + if (f.getElements().length > 0 && g.getElements().length > 0) { + let b = bl(f, g, s, !0).changes; + o && (b = Wh(b)), m = []; + for (let y = 0, x = b.length; y < x; y++) + m.push(Bt.createFromDiffChange(b[y], f, g)); } } - return new dn(l, c, h, u, f); + return new pn(l, c, h, u, m); } } -class pl { +class Oh { constructor(e, n, r) { - this.shouldComputeCharChanges = r.shouldComputeCharChanges, this.shouldPostProcessCharChanges = r.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = r.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = r.shouldMakePrettyDiff, this.originalLines = e, this.modifiedLines = n, this.original = new la(e), this.modified = new la(n), this.continueLineDiff = ca(r.maxComputationTime), this.continueCharDiff = ca(r.maxComputationTime === 0 ? 0 : Math.min(r.maxComputationTime, 5e3)); + this.shouldComputeCharChanges = r.shouldComputeCharChanges, this.shouldPostProcessCharChanges = r.shouldPostProcessCharChanges, this.shouldIgnoreTrimWhitespace = r.shouldIgnoreTrimWhitespace, this.shouldMakePrettyDiff = r.shouldMakePrettyDiff, this.originalLines = e, this.modifiedLines = n, this.original = new ha(e), this.modified = new ha(n), this.continueLineDiff = da(r.maxComputationTime), this.continueCharDiff = da(r.maxComputationTime === 0 ? 0 : Math.min(r.maxComputationTime, 5e3)); } computeDiff() { if (this.original.lines.length === 1 && this.original.lines[0].length === 0) @@ -5503,11 +5615,11 @@ class pl { charChanges: void 0 }] }; - const e = ul(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), n = e.changes, r = e.quitEarly; + const e = bl(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), n = e.changes, r = e.quitEarly; if (this.shouldIgnoreTrimWhitespace) { const o = []; for (let l = 0, c = n.length; l < c; l++) - o.push(dn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, n[l], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); + o.push(pn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, n[l], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); return { quitEarly: r, changes: o @@ -5518,33 +5630,33 @@ class pl { for (let o = -1, l = n.length; o < l; o++) { const c = o + 1 < l ? n[o + 1] : null, h = c ? c.originalStart : this.originalLines.length, u = c ? c.modifiedStart : this.modifiedLines.length; for (; s < h && a < u; ) { - const f = this.originalLines[s], m = this.modifiedLines[a]; - if (f !== m) { + const m = this.originalLines[s], f = this.modifiedLines[a]; + if (m !== f) { { - let g = Zr(f, 1), b = Zr(m, 1); + let g = oi(m, 1), b = oi(f, 1); for (; g > 1 && b > 1; ) { - const y = f.charCodeAt(g - 2), w = m.charCodeAt(b - 2); - if (y !== w) + const y = m.charCodeAt(g - 2), x = f.charCodeAt(b - 2); + if (y !== x) break; g--, b--; } (g > 1 || b > 1) && this._pushTrimWhitespaceCharChange(i, s + 1, 1, g, a + 1, 1, b); } { - let g = ei(f, 1), b = ei(m, 1); - const y = f.length + 1, w = m.length + 1; - for (; g < y && b < w; ) { - const x = f.charCodeAt(g - 1), k = f.charCodeAt(b - 1); - if (x !== k) + let g = li(m, 1), b = li(f, 1); + const y = m.length + 1, x = f.length + 1; + for (; g < y && b < x; ) { + const S = m.charCodeAt(g - 1), w = m.charCodeAt(b - 1); + if (S !== w) break; g++, b++; } - (g < y || b < w) && this._pushTrimWhitespaceCharChange(i, s + 1, g, y, a + 1, b, w); + (g < y || b < x) && this._pushTrimWhitespaceCharChange(i, s + 1, g, y, a + 1, b, x); } } s++, a++; } - c && (i.push(dn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, c, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)), s += c.originalLength, a += c.modifiedLength); + c && (i.push(pn.createFromDiffResult(this.shouldIgnoreTrimWhitespace, c, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)), s += c.originalLength, a += c.modifiedLength); } return { quitEarly: r, @@ -5555,128 +5667,89 @@ class pl { if (this._mergeTrimWhitespaceCharChange(e, n, r, i, s, a, o)) return; let l; - this.shouldComputeCharChanges && (l = [new Vt(n, r, n, i, s, a, s, o)]), e.push(new dn(n, n, s, s, l)); + this.shouldComputeCharChanges && (l = [new Bt(n, r, n, i, s, a, s, o)]), e.push(new pn(n, n, s, s, l)); } _mergeTrimWhitespaceCharChange(e, n, r, i, s, a, o) { const l = e.length; if (l === 0) return !1; const c = e[l - 1]; - return c.originalEndLineNumber === 0 || c.modifiedEndLineNumber === 0 ? !1 : c.originalEndLineNumber === n && c.modifiedEndLineNumber === s ? (this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new Vt(n, r, n, i, s, a, s, o)), !0) : c.originalEndLineNumber + 1 === n && c.modifiedEndLineNumber + 1 === s ? (c.originalEndLineNumber = n, c.modifiedEndLineNumber = s, this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new Vt(n, r, n, i, s, a, s, o)), !0) : !1; + return c.originalEndLineNumber === 0 || c.modifiedEndLineNumber === 0 ? !1 : c.originalEndLineNumber === n && c.modifiedEndLineNumber === s ? (this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new Bt(n, r, n, i, s, a, s, o)), !0) : c.originalEndLineNumber + 1 === n && c.modifiedEndLineNumber + 1 === s ? (c.originalEndLineNumber = n, c.modifiedEndLineNumber = s, this.shouldComputeCharChanges && c.charChanges && c.charChanges.push(new Bt(n, r, n, i, s, a, s, o)), !0) : !1; } } -function Zr(t, e) { +function oi(t, e) { const n = _c(t); return n === -1 ? e : n + 1; } -function ei(t, e) { - const n = Fc(t); +function li(t, e) { + const n = Rc(t); return n === -1 ? e : n + 2; } -function ca(t) { +function da(t) { if (t === 0) return () => !0; const e = Date.now(); return () => Date.now() - e < t; } -class de { - static addRange(e, n) { - let r = 0; - for (; r < n.length && n[r].endExclusive < e.start; ) - r++; - let i = r; - for (; i < n.length && n[i].start <= e.endExclusive; ) - i++; - if (r === i) - n.splice(r, 0, e); - else { - const s = Math.min(e.start, n[r].start), a = Math.max(e.endExclusive, n[i - 1].endExclusive); - n.splice(r, i - r, new de(s, a)); - } +class Uh { + constructor() { + this.map = /* @__PURE__ */ new Map(); } - static tryCreate(e, n) { - if (!(e > n)) - return new de(e, n); + add(e, n) { + let r = this.map.get(e); + r || (r = /* @__PURE__ */ new Set(), this.map.set(e, r)), r.add(n); } - constructor(e, n) { - if (this.start = e, this.endExclusive = n, e > n) - throw new Dt(`Invalid range: ${this.toString()}`); + delete(e, n) { + const r = this.map.get(e); + r && (r.delete(n), r.size === 0 && this.map.delete(e)); } - get isEmpty() { - return this.start === this.endExclusive; + forEach(e, n) { + const r = this.map.get(e); + r && r.forEach(n); } - delta(e) { - return new de(this.start + e, this.endExclusive + e); - } - get length() { - return this.endExclusive - this.start; - } - toString() { - return `[${this.start}, ${this.endExclusive})`; - } - equals(e) { - return this.start === e.start && this.endExclusive === e.endExclusive; - } - containsRange(e) { - return this.start <= e.start && e.endExclusive <= this.endExclusive; - } - contains(e) { - return this.start <= e && e < this.endExclusive; - } - /** - * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n) - * The joined range is the smallest range that contains both ranges. - */ - join(e) { - return new de(Math.min(this.start, e.start), Math.max(this.endExclusive, e.endExclusive)); - } - /** - * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n) - * - * The resulting range is empty if the ranges do not intersect, but touch. - * If the ranges don't even touch, the result is undefined. - */ - intersect(e) { - const n = Math.max(this.start, e.start), r = Math.min(this.endExclusive, e.endExclusive); - if (n <= r) - return new de(n, r); + get(e) { + const n = this.map.get(e); + return n || /* @__PURE__ */ new Set(); } } class at { static trivial(e, n) { - return new at([new Be(new de(0, e.length), new de(0, n.length))], !1); + return new at([new Fe(new Z(0, e.length), new Z(0, n.length))], !1); } static trivialTimedOut(e, n) { - return new at([new Be(new de(0, e.length), new de(0, n.length))], !0); + return new at([new Fe(new Z(0, e.length), new Z(0, n.length))], !0); } constructor(e, n) { this.diffs = e, this.hitTimeout = n; } } -class Be { +class Fe { constructor(e, n) { this.seq1Range = e, this.seq2Range = n; } reverse() { - return new Be(this.seq2Range, this.seq1Range); + return new Fe(this.seq2Range, this.seq1Range); } toString() { return `${this.seq1Range} <-> ${this.seq2Range}`; } join(e) { - return new Be(this.seq1Range.join(e.seq1Range), this.seq2Range.join(e.seq2Range)); + return new Fe(this.seq1Range.join(e.seq1Range), this.seq2Range.join(e.seq2Range)); + } + delta(e) { + return e === 0 ? this : new Fe(this.seq1Range.delta(e), this.seq2Range.delta(e)); } } -class fn { +class wn { isValid() { return !0; } } -fn.instance = new fn(); -class Ih { +wn.instance = new wn(); +class Vh { constructor(e) { if (this.timeout = e, this.startTime = Date.now(), this.valid = !0, e <= 0) - throw new Dt("timeout must be positive"); + throw new st("timeout must be positive"); } // Recommendation: Set a log-point `{this.disable()}` in the body isValid() { @@ -5686,11 +5759,8 @@ class Ih { } return this.valid; } - disable() { - this.timeout = Number.MAX_SAFE_INTEGER, this.isValid = () => !0, this.valid = !0; - } } -class yr { +class Fr { constructor(e, n) { this.width = e, this.height = n, this.array = [], this.array = new Array(e * n); } @@ -5701,42 +5771,42 @@ class yr { this.array[e + n * this.width] = r; } } -class Lh { - compute(e, n, r = fn.instance, i) { +class Bh { + compute(e, n, r = wn.instance, i) { if (e.length === 0 || n.length === 0) return at.trivial(e, n); - const s = new yr(e.length, n.length), a = new yr(e.length, n.length), o = new yr(e.length, n.length); + const s = new Fr(e.length, n.length), a = new Fr(e.length, n.length), o = new Fr(e.length, n.length); for (let g = 0; g < e.length; g++) for (let b = 0; b < n.length; b++) { if (!r.isValid()) return at.trivialTimedOut(e, n); - const y = g === 0 ? 0 : s.get(g - 1, b), w = b === 0 ? 0 : s.get(g, b - 1); - let x; - e.getElement(g) === n.getElement(b) ? (g === 0 || b === 0 ? x = 0 : x = s.get(g - 1, b - 1), g > 0 && b > 0 && a.get(g - 1, b - 1) === 3 && (x += o.get(g - 1, b - 1)), x += i ? i(g, b) : 1) : x = -1; - const k = Math.max(y, w, x); - if (k === x) { - const F = g > 0 && b > 0 ? o.get(g - 1, b - 1) : 0; - o.set(g, b, F + 1), a.set(g, b, 3); + const y = g === 0 ? 0 : s.get(g - 1, b), x = b === 0 ? 0 : s.get(g, b - 1); + let S; + e.getElement(g) === n.getElement(b) ? (g === 0 || b === 0 ? S = 0 : S = s.get(g - 1, b - 1), g > 0 && b > 0 && a.get(g - 1, b - 1) === 3 && (S += o.get(g - 1, b - 1)), S += i ? i(g, b) : 1) : S = -1; + const w = Math.max(y, x, S); + if (w === S) { + const E = g > 0 && b > 0 ? o.get(g - 1, b - 1) : 0; + o.set(g, b, E + 1), a.set(g, b, 3); } else - k === y ? (o.set(g, b, 0), a.set(g, b, 1)) : k === w && (o.set(g, b, 0), a.set(g, b, 2)); - s.set(g, b, k); + w === y ? (o.set(g, b, 0), a.set(g, b, 1)) : w === x && (o.set(g, b, 0), a.set(g, b, 2)); + s.set(g, b, w); } const l = []; let c = e.length, h = n.length; function u(g, b) { - (g + 1 !== c || b + 1 !== h) && l.push(new Be(new de(g + 1, c), new de(b + 1, h))), c = g, h = b; + (g + 1 !== c || b + 1 !== h) && l.push(new Fe(new Z(g + 1, c), new Z(b + 1, h))), c = g, h = b; } - let f = e.length - 1, m = n.length - 1; - for (; f >= 0 && m >= 0; ) - a.get(f, m) === 3 ? (u(f, m), f--, m--) : a.get(f, m) === 1 ? f-- : m--; + let m = e.length - 1, f = n.length - 1; + for (; m >= 0 && f >= 0; ) + a.get(m, f) === 3 ? (u(m, f), m--, f--) : a.get(m, f) === 1 ? m-- : f--; return u(-1, -1), l.reverse(), new at(l, !1); } } -function ha(t, e, n) { +function ua(t, e, n) { let r = n; - return r = Wh(t, e, r), r = Oh(t, e, r), r; + return r = Hh(t, e, r), r = Gh(t, e, r), r; } -function Th(t, e, n) { +function jh(t, e, n) { const r = []; for (const i of n) { const s = r[r.length - 1]; @@ -5744,108 +5814,188 @@ function Th(t, e, n) { r.push(i); continue; } - i.seq1Range.start - s.seq1Range.endExclusive <= 2 || i.seq2Range.start - s.seq2Range.endExclusive <= 2 ? r[r.length - 1] = new Be(s.seq1Range.join(i.seq1Range), s.seq2Range.join(i.seq2Range)) : r.push(i); + i.seq1Range.start - s.seq1Range.endExclusive <= 2 || i.seq2Range.start - s.seq2Range.endExclusive <= 2 ? r[r.length - 1] = new Fe(s.seq1Range.join(i.seq1Range), s.seq2Range.join(i.seq2Range)) : r.push(i); } return r; } -function Wh(t, e, n) { - const r = []; - n.length > 0 && r.push(n[0]); - for (let i = 1; i < n.length; i++) { - const s = r[r.length - 1], a = n[i]; - if (a.seq1Range.isEmpty) { - let o = !0; - const l = a.seq1Range.start - s.seq1Range.endExclusive; - for (let c = 1; c <= l; c++) - if (e.getElement(a.seq2Range.start - c) !== e.getElement(a.seq2Range.endExclusive - c)) { - o = !1; - break; +function qh(t, e, n) { + let r = n; + if (r.length === 0) + return r; + let i = 0, s; + do { + s = !1; + const o = [ + r[0] + ]; + for (let l = 1; l < r.length; l++) { + let u = function(f, g) { + const b = new Z(h.seq1Range.endExclusive, c.seq1Range.start); + return t.getText(b).replace(/\s/g, "").length <= 4 && (f.seq1Range.length + f.seq2Range.length > 5 || g.seq1Range.length + g.seq2Range.length > 5); + }; + var a = u; + const c = r[l], h = o[o.length - 1]; + u(h, c) ? (s = !0, o[o.length - 1] = o[o.length - 1].join(c)) : o.push(c); + } + r = o; + } while (i++ < 10 && s); + return r; +} +function $h(t, e, n) { + let r = n; + if (r.length === 0) + return r; + let i = 0, s; + do { + s = !1; + const o = [ + r[0] + ]; + for (let l = 1; l < r.length; l++) { + let u = function(f, g) { + const b = new Z(h.seq1Range.endExclusive, c.seq1Range.start); + if (t.countLinesIn(b) > 5 || b.length > 500) + return !1; + const x = t.getText(b).trim(); + if (x.length > 20 || x.split(/\r\n|\r|\n/).length > 1) + return !1; + const S = t.countLinesIn(f.seq1Range), w = f.seq1Range.length, E = e.countLinesIn(f.seq2Range), R = f.seq2Range.length, T = t.countLinesIn(g.seq1Range), W = g.seq1Range.length, L = e.countLinesIn(g.seq2Range), q = g.seq2Range.length, z = 2 * 40 + 50; + function F(D) { + return Math.min(D, z); } - if (o) { - r[r.length - 1] = new Be(s.seq1Range, new de(s.seq2Range.start, a.seq2Range.endExclusive - l)); + return Math.pow(Math.pow(F(S * 40 + w), 1.5) + Math.pow(F(E * 40 + R), 1.5), 1.5) + Math.pow(Math.pow(F(T * 40 + W), 1.5) + Math.pow(F(L * 40 + q), 1.5), 1.5) > Math.pow(Math.pow(z, 1.5), 1.5) * 1.3; + }; + var a = u; + const c = r[l], h = o[o.length - 1]; + u(h, c) ? (s = !0, o[o.length - 1] = o[o.length - 1].join(c)) : o.push(c); + } + r = o; + } while (i++ < 10 && s); + for (let o = 0; o < r.length; o++) { + const l = r[o]; + let c = l.seq1Range, h = l.seq2Range; + const u = t.extendToFullLines(l.seq1Range), m = t.getText(new Z(u.start, l.seq1Range.start)); + m.length > 0 && m.trim().length <= 3 && l.seq1Range.length + l.seq2Range.length > 100 && (c = l.seq1Range.deltaStart(-m.length), h = l.seq2Range.deltaStart(-m.length)); + const f = t.getText(new Z(l.seq1Range.endExclusive, u.endExclusive)); + f.length > 0 && f.trim().length <= 3 && l.seq1Range.length + l.seq2Range.length > 150 && (c = c.deltaEnd(f.length), h = h.deltaEnd(f.length)), r[o] = new Fe(c, h); + } + return r; +} +function Hh(t, e, n) { + if (n.length === 0) + return n; + const r = []; + r.push(n[0]); + for (let s = 1; s < n.length; s++) { + const a = r[r.length - 1]; + let o = n[s]; + if (o.seq1Range.isEmpty || o.seq2Range.isEmpty) { + const l = o.seq1Range.start - a.seq1Range.endExclusive; + let c; + for (c = 1; c <= l && !(t.getElement(o.seq1Range.start - c) !== t.getElement(o.seq1Range.endExclusive - c) || e.getElement(o.seq2Range.start - c) !== e.getElement(o.seq2Range.endExclusive - c)); c++) + ; + if (c--, c === l) { + r[r.length - 1] = new Fe(new Z(a.seq1Range.start, o.seq1Range.endExclusive - l), new Z(a.seq2Range.start, o.seq2Range.endExclusive - l)); continue; } + o = o.delta(-c); } - r.push(a); + r.push(o); } - return r; + const i = []; + for (let s = 0; s < r.length - 1; s++) { + const a = r[s + 1]; + let o = r[s]; + if (o.seq1Range.isEmpty || o.seq2Range.isEmpty) { + const l = a.seq1Range.start - o.seq1Range.endExclusive; + let c; + for (c = 0; c < l && !(t.getElement(o.seq1Range.start + c) !== t.getElement(o.seq1Range.endExclusive + c) || e.getElement(o.seq2Range.start + c) !== e.getElement(o.seq2Range.endExclusive + c)); c++) + ; + if (c === l) { + r[s + 1] = new Fe(new Z(o.seq1Range.start + l, a.seq1Range.endExclusive), new Z(o.seq2Range.start + l, a.seq2Range.endExclusive)); + continue; + } + c > 0 && (o = o.delta(c)); + } + i.push(o); + } + return r.length > 0 && i.push(r[r.length - 1]), i; } -function Oh(t, e, n) { +function Gh(t, e, n) { if (!t.getBoundaryScore || !e.getBoundaryScore) return n; for (let r = 0; r < n.length; r++) { - const i = n[r]; - if (i.seq1Range.isEmpty) { - const s = r > 0 ? n[r - 1].seq2Range.endExclusive : -1, a = r + 1 < n.length ? n[r + 1].seq2Range.start : e.length; - n[r] = da(i, t, e, a, s); - } else if (i.seq2Range.isEmpty) { - const s = r > 0 ? n[r - 1].seq1Range.endExclusive : -1, a = r + 1 < n.length ? n[r + 1].seq1Range.start : t.length; - n[r] = da(i.reverse(), e, t, a, s).reverse(); - } + const i = r > 0 ? n[r - 1] : void 0, s = n[r], a = r + 1 < n.length ? n[r + 1] : void 0, o = new Z(i ? i.seq1Range.start + 1 : 0, a ? a.seq1Range.endExclusive - 1 : t.length), l = new Z(i ? i.seq2Range.start + 1 : 0, a ? a.seq2Range.endExclusive - 1 : e.length); + s.seq1Range.isEmpty ? n[r] = pa(s, t, e, o, l) : s.seq2Range.isEmpty && (n[r] = pa(s.reverse(), e, t, l, o).reverse()); } return n; } -function da(t, e, n, r, i) { +function pa(t, e, n, r, i) { let a = 1; - for (; t.seq2Range.start - a > i && n.getElement(t.seq2Range.start - a) === n.getElement(t.seq2Range.endExclusive - a) && a < 20; ) + for (; t.seq1Range.start - a >= r.start && t.seq2Range.start - a >= i.start && n.isStronglyEqual(t.seq2Range.start - a, t.seq2Range.endExclusive - a) && a < 100; ) a++; a--; let o = 0; - for (; t.seq2Range.start + o < r && n.getElement(t.seq2Range.start + o) === n.getElement(t.seq2Range.endExclusive + o) && o < 20; ) + for (; t.seq1Range.start + o < r.endExclusive && t.seq2Range.endExclusive + o < i.endExclusive && n.isStronglyEqual(t.seq2Range.start + o, t.seq2Range.endExclusive + o) && o < 100; ) o++; if (a === 0 && o === 0) return t; let l = 0, c = -1; for (let h = -a; h <= o; h++) { - const u = t.seq2Range.start + h, f = t.seq2Range.endExclusive + h, m = t.seq1Range.start + h, g = e.getBoundaryScore(m) + n.getBoundaryScore(u) + n.getBoundaryScore(f); + const u = t.seq2Range.start + h, m = t.seq2Range.endExclusive + h, f = t.seq1Range.start + h, g = e.getBoundaryScore(f) + n.getBoundaryScore(u) + n.getBoundaryScore(m); g > c && (c = g, l = h); } - return l !== 0 ? new Be(t.seq1Range.delta(l), t.seq2Range.delta(l)) : t; + return t.delta(l); } -class Uh { - compute(e, n, r = fn.instance) { +class Jh { + compute(e, n, r = wn.instance) { if (e.length === 0 || n.length === 0) return at.trivial(e, n); - function i(m, g) { - for (; m < e.length && g < n.length && e.getElement(m) === n.getElement(g); ) - m++, g++; - return m; + function i(f, g) { + for (; f < e.length && g < n.length && e.getElement(f) === n.getElement(g); ) + f++, g++; + return f; } let s = 0; - const a = new Vh(); + const a = new Xh(); a.set(0, i(0, 0)); - const o = new Bh(); - o.set(0, a.get(0) === 0 ? null : new ua(null, 0, 0, a.get(0))); + const o = new Yh(); + o.set(0, a.get(0) === 0 ? null : new fa(null, 0, 0, a.get(0))); let l = 0; e: - for (; ; ) - for (s++, l = -s; l <= s; l += 2) { - if (!r.isValid()) - return at.trivialTimedOut(e, n); - const m = l === s ? -1 : a.get(l + 1), g = l === -s ? -1 : a.get(l - 1) + 1, b = Math.min(Math.max(m, g), e.length), y = b - l, w = i(b, y); + for (; ; ) { + if (s++, !r.isValid()) + return at.trivialTimedOut(e, n); + const f = -Math.min(s, n.length + s % 2), g = Math.min(s, e.length + s % 2); + for (l = f; l <= g; l += 2) { + const b = l === g ? -1 : a.get(l + 1), y = l === f ? -1 : a.get(l - 1) + 1, x = Math.min(Math.max(b, y), e.length), S = x - l; + if (x > e.length || S > n.length) + continue; + const w = i(x, S); a.set(l, w); - const x = b === m ? o.get(l + 1) : o.get(l - 1); - if (o.set(l, w !== b ? new ua(x, b, y, w - b) : x), a.get(l) === e.length && a.get(l) - l === n.length) + const E = x === b ? o.get(l + 1) : o.get(l - 1); + if (o.set(l, w !== x ? new fa(E, x, S, w - x) : E), a.get(l) === e.length && a.get(l) - l === n.length) break e; } + } let c = o.get(l); const h = []; - let u = e.length, f = n.length; + let u = e.length, m = n.length; for (; ; ) { - const m = c ? c.x + c.length : 0, g = c ? c.y + c.length : 0; - if ((m !== u || g !== f) && h.push(new Be(new de(m, u), new de(g, f))), !c) + const f = c ? c.x + c.length : 0, g = c ? c.y + c.length : 0; + if ((f !== u || g !== m) && h.push(new Fe(new Z(f, u), new Z(g, m))), !c) break; - u = c.x, f = c.y, c = c.prev; + u = c.x, m = c.y, c = c.prev; } return h.reverse(), new at(h, !1); } } -class ua { +class fa { constructor(e, n, r, i) { this.prev = e, this.x = n, this.y = r, this.length = i; } } -class Vh { +class Xh { constructor() { this.positiveArr = new Int32Array(10), this.negativeArr = new Int32Array(10); } @@ -5868,7 +6018,7 @@ class Vh { } } } -class Bh { +class Yh { constructor() { this.positiveArr = [], this.negativeArr = []; } @@ -5879,82 +6029,247 @@ class Bh { e < 0 ? (e = -e - 1, this.negativeArr[e] = n) : this.positiveArr[e] = n; } } -class jh { +class Kh { constructor() { - this.dynamicProgrammingDiffing = new Lh(), this.myersDiffingAlgorithm = new Uh(); + this.dynamicProgrammingDiffing = new Bh(), this.myersDiffingAlgorithm = new Jh(); } computeDiff(e, n, r) { - const i = r.maxComputationTimeMs === 0 ? fn.instance : new Ih(r.maxComputationTimeMs), s = !r.ignoreTrimWhitespace, a = /* @__PURE__ */ new Map(); - function o(F) { - let N = a.get(F); - return N === void 0 && (N = a.size, a.set(F, N)), N; + if (e.length <= 1 && sh(e, n, (R, T) => R === T)) + return new Xn([], [], !1); + if (e.length === 1 && e[0].length === 0 || n.length === 1 && n[0].length === 0) + return new Xn([ + new Xe(new re(1, e.length + 1), new re(1, n.length + 1), [ + new vn(new Ae(1, 1, e.length, e[0].length + 1), new Ae(1, 1, n.length, n[0].length + 1)) + ]) + ], [], !1); + const i = r.maxComputationTimeMs === 0 ? wn.instance : new Vh(r.maxComputationTimeMs), s = !r.ignoreTrimWhitespace, a = /* @__PURE__ */ new Map(); + function o(R) { + let T = a.get(R); + return T === void 0 && (T = a.size, a.set(R, T)), T; } - const l = e.map((F) => o(F.trim())), c = n.map((F) => o(F.trim())), h = new pa(l, e), u = new pa(c, n), f = (() => h.length + u.length < 1500 ? this.dynamicProgrammingDiffing.compute(h, u, i, (F, N) => e[F] === n[N] ? n[N].length === 0 ? 0.1 : 1 + Math.log(1 + n[N].length) : 0.99) : this.myersDiffingAlgorithm.compute(h, u))(); - let m = f.diffs, g = f.hitTimeout; - m = ha(h, u, m); - const b = [], y = (F) => { + const l = e.map((R) => o(R.trim())), c = n.map((R) => o(R.trim())), h = new va(l, e), u = new va(c, n), m = (() => h.length + u.length < 1700 ? this.dynamicProgrammingDiffing.compute(h, u, i, (R, T) => e[R] === n[T] ? n[T].length === 0 ? 0.1 : 1 + Math.log(1 + n[T].length) : 0.99) : this.myersDiffingAlgorithm.compute(h, u))(); + let f = m.diffs, g = m.hitTimeout; + f = ua(h, u, f), f = qh(h, u, f); + const b = [], y = (R) => { if (s) - for (let N = 0; N < F; N++) { - const j = w + N, H = x + N; - if (e[j] !== n[H]) { - const B = this.refineDiff(e, n, new Be(new de(j, j + 1), new de(H, H + 1)), i, s); - for (const P of B.mappings) - b.push(P); - B.hitTimeout && (g = !0); + for (let T = 0; T < R; T++) { + const W = x + T, L = S + T; + if (e[W] !== n[L]) { + const q = this.refineDiff(e, n, new Fe(new Z(W, W + 1), new Z(L, L + 1)), i, s); + for (const z of q.mappings) + b.push(z); + q.hitTimeout && (g = !0); } } }; - let w = 0, x = 0; - for (const F of m) { - Ri(() => F.seq1Range.start - w === F.seq2Range.start - x); - const N = F.seq1Range.start - w; - y(N), w = F.seq1Range.endExclusive, x = F.seq2Range.endExclusive; - const j = this.refineDiff(e, n, F, i, s); - j.hitTimeout && (g = !0); - for (const H of j.mappings) - b.push(H); + let x = 0, S = 0; + for (const R of f) { + rr(() => R.seq1Range.start - x === R.seq2Range.start - S); + const T = R.seq1Range.start - x; + y(T), x = R.seq1Range.endExclusive, S = R.seq2Range.endExclusive; + const W = this.refineDiff(e, n, R, i, s); + W.hitTimeout && (g = !0); + for (const L of W.mappings) + b.push(L); } - y(e.length - w); - const k = Hh(b, e, n); - return new hl(k, g); + y(e.length - x); + const w = ba(b, e, n); + let E = []; + return r.computeMoves && (E = this.computeMoves(w, e, n, l, c, i, s)), rr(() => { + function R(W, L) { + if (W.lineNumber < 1 || W.lineNumber > L.length) + return !1; + const q = L[W.lineNumber - 1]; + return !(W.column < 1 || W.column > q.length + 1); + } + function T(W, L) { + return !(W.startLineNumber < 1 || W.startLineNumber > L.length + 1 || W.endLineNumberExclusive < 1 || W.endLineNumberExclusive > L.length + 1); + } + for (const W of w) { + if (!W.innerChanges) + return !1; + for (const L of W.innerChanges) + if (!(R(L.modifiedRange.getStartPosition(), n) && R(L.modifiedRange.getEndPosition(), n) && R(L.originalRange.getStartPosition(), e) && R(L.originalRange.getEndPosition(), e))) + return !1; + if (!T(W.modifiedRange, n) || !T(W.originalRange, e)) + return !1; + } + return !0; + }), new Xn(w, E, g); + } + computeMoves(e, n, r, i, s, a, o) { + const l = [], c = e.filter((w) => w.modifiedRange.isEmpty && w.originalRange.length >= 3).map((w) => new ka(w.originalRange, n, w)), h = new Set(e.filter((w) => w.originalRange.isEmpty && w.modifiedRange.length >= 3).map((w) => new ka(w.modifiedRange, r, w))), u = /* @__PURE__ */ new Set(); + for (const w of c) { + let E = -1, R; + for (const T of h) { + const W = w.computeSimilarity(T); + W > E && (E = W, R = T); + } + if (E > 0.9 && R && (h.delete(R), l.push(new yn(w.range, R.range)), u.add(w.source), u.add(R.source)), !a.isValid()) + return []; + } + const m = new Uh(); + for (const w of e) + if (!u.has(w)) + for (let E = w.originalRange.startLineNumber; E < w.originalRange.endLineNumberExclusive - 2; E++) { + const R = `${i[E - 1]}:${i[E + 1 - 1]}:${i[E + 2 - 1]}`; + m.add(R, { range: new re(E, E + 3) }); + } + const f = []; + e.sort(_r((w) => w.modifiedRange.startLineNumber, In)); + for (const w of e) { + if (u.has(w)) + continue; + let E = []; + for (let R = w.modifiedRange.startLineNumber; R < w.modifiedRange.endLineNumberExclusive - 2; R++) { + const T = `${s[R - 1]}:${s[R + 1 - 1]}:${s[R + 2 - 1]}`, W = new re(R, R + 3), L = []; + m.forEach(T, ({ range: q }) => { + for (const F of E) + if (F.originalLineRange.endLineNumberExclusive + 1 === q.endLineNumberExclusive && F.modifiedLineRange.endLineNumberExclusive + 1 === W.endLineNumberExclusive) { + F.originalLineRange = new re(F.originalLineRange.startLineNumber, q.endLineNumberExclusive), F.modifiedLineRange = new re(F.modifiedLineRange.startLineNumber, W.endLineNumberExclusive), L.push(F); + return; + } + const z = { + modifiedLineRange: W, + originalLineRange: q + }; + f.push(z), L.push(z); + }), E = L; + } + if (!a.isValid()) + return []; + } + f.sort(ah(_r((w) => w.modifiedLineRange.length, In))); + const g = new ma(), b = new ma(); + for (const w of f) { + const E = w.modifiedLineRange.startLineNumber - w.originalLineRange.startLineNumber, R = g.subtractFrom(w.modifiedLineRange), T = b.subtractFrom(w.originalLineRange).map((L) => L.delta(E)), W = Qh(R, T); + for (const L of W) { + if (L.length < 3) + continue; + const q = L, z = L.delta(-E); + l.push(new yn(z, q)), g.addRange(q), b.addRange(z); + } + } + if (l.sort(_r((w) => w.original.startLineNumber, In)), l.length === 0) + return []; + let y = [l[0]]; + for (let w = 1; w < l.length; w++) { + const E = y[y.length - 1], R = l[w], T = R.original.startLineNumber - E.original.endLineNumberExclusive, W = R.modified.startLineNumber - E.modified.endLineNumberExclusive; + if (T >= 0 && W >= 0 && T + W <= 2) { + y[y.length - 1] = E.join(R); + continue; + } + R.original.toOffsetRange().slice(n).map((z) => z.trim()).join(` +`).length <= 10 || y.push(R); + } + const x = Ii.createOfSorted(e, (w) => w.originalRange.endLineNumberExclusive, In); + return y = y.filter((w) => { + const E = x.findLastItemBeforeOrEqual(w.original.startLineNumber) || new Xe(new re(1, 1), new re(1, 1), []), R = w.modified.startLineNumber - E.modifiedRange.endLineNumberExclusive, T = w.original.startLineNumber - E.originalRange.endLineNumberExclusive; + return R !== T; + }), y.map((w) => { + const E = this.refineDiff(n, r, new Fe(w.original.toOffsetRange(), w.modified.toOffsetRange()), a, o), R = ba(E.mappings, n, r, !0); + return new Li(w, R); + }); } refineDiff(e, n, r, i, s) { - const a = new ma(e, r.seq1Range, s), o = new ma(n, r.seq2Range, s), l = a.length + o.length < 500 ? this.dynamicProgrammingDiffing.compute(a, o, i) : this.myersDiffingAlgorithm.compute(a, o, i); + const a = new wa(e, r.seq1Range, s), o = new wa(n, r.seq2Range, s), l = a.length + o.length < 500 ? this.dynamicProgrammingDiffing.compute(a, o, i) : this.myersDiffingAlgorithm.compute(a, o, i); let c = l.diffs; - return c = ha(a, o, c), c = qh(a, o, c), c = Th(a, o, c), { - mappings: c.map((u) => new dl(a.translateRange(u.seq1Range), o.translateRange(u.seq2Range))), + return c = ua(a, o, c), c = Zh(a, o, c), c = jh(a, o, c), c = $h(a, o, c), { + mappings: c.map((u) => new vn(a.translateRange(u.seq1Range), o.translateRange(u.seq2Range))), hitTimeout: l.hitTimeout }; } } -function qh(t, e, n) { +class Ii { + static createOfSorted(e, n, r) { + return new Ii(e, n, r); + } + constructor(e, n, r) { + this._items = e, this._itemToDomain = n, this._domainComparator = r, this._currentIdx = 0, this._lastValue = void 0, this._hasLastValue = !1; + } + /** + * Assumes the values are monotonously increasing. + */ + findLastItemBeforeOrEqual(e) { + if (this._hasLastValue && er.isLessThan(this._domainComparator(e, this._lastValue))) + throw new st(); + for (this._lastValue = e, this._hasLastValue = !0; this._currentIdx < this._items.length && er.isLessThanOrEqual(this._domainComparator(this._itemToDomain(this._items[this._currentIdx]), e)); ) + this._currentIdx++; + return this._currentIdx === 0 ? void 0 : this._items[this._currentIdx - 1]; + } +} +function Qh(t, e) { + const n = []; + let r = 0, i = 0; + for (; r < t.length && i < e.length; ) { + const s = t[r], a = e[i], o = s.intersect(a); + o && !o.isEmpty && n.push(o), s.endLineNumberExclusive < a.endLineNumberExclusive ? r++ : i++; + } + return n; +} +class ma { + constructor() { + this._normalizedRanges = []; + } + addRange(e) { + const n = ga(this._normalizedRanges.findIndex((i) => i.endLineNumberExclusive >= e.startLineNumber), this._normalizedRanges.length), r = us(this._normalizedRanges, (i) => i.startLineNumber <= e.endLineNumberExclusive) + 1; + if (n === r) + this._normalizedRanges.splice(n, 0, e); + else if (n === r - 1) { + const i = this._normalizedRanges[n]; + this._normalizedRanges[n] = i.join(e); + } else { + const i = this._normalizedRanges[n].join(this._normalizedRanges[r - 1]).join(e); + this._normalizedRanges.splice(n, r - n, i); + } + } + /** + * Subtracts all ranges in this set from `range` and returns the result. + */ + subtractFrom(e) { + const n = ga(this._normalizedRanges.findIndex((a) => a.endLineNumberExclusive >= e.startLineNumber), this._normalizedRanges.length), r = us(this._normalizedRanges, (a) => a.startLineNumber <= e.endLineNumberExclusive) + 1; + if (n === r) + return [e]; + const i = []; + let s = e.startLineNumber; + for (let a = n; a < r; a++) { + const o = this._normalizedRanges[a]; + o.startLineNumber > s && i.push(new re(s, o.startLineNumber)), s = o.endLineNumberExclusive; + } + return s < e.endLineNumberExclusive && i.push(new re(s, e.endLineNumberExclusive)), i; + } +} +function ga(t, e) { + return t === -1 ? e : t; +} +function Zh(t, e, n) { const r = []; let i; function s() { if (!i) return; const l = i.s1Range.length - i.deleted; - i.s2Range.length - i.added, Math.max(i.deleted, i.added) + (i.count - 1) > l && r.push(new Be(i.s1Range, i.s2Range)), i = void 0; + i.s2Range.length - i.added, Math.max(i.deleted, i.added) + (i.count - 1) > l && r.push(new Fe(i.s1Range, i.s2Range)), i = void 0; } for (const l of n) { let c = function(g, b) { - var y, w, x, k; + var y, x, S, w; if (!i || !i.s1Range.containsRange(g) || !i.s2Range.containsRange(b)) if (i && !(i.s1Range.endExclusive < g.start && i.s2Range.endExclusive < b.start)) { - const j = de.tryCreate(i.s1Range.endExclusive, g.start), H = de.tryCreate(i.s2Range.endExclusive, b.start); - i.deleted += (y = j == null ? void 0 : j.length) !== null && y !== void 0 ? y : 0, i.added += (w = H == null ? void 0 : H.length) !== null && w !== void 0 ? w : 0, i.s1Range = i.s1Range.join(g), i.s2Range = i.s2Range.join(b); + const T = Z.tryCreate(i.s1Range.endExclusive, g.start), W = Z.tryCreate(i.s2Range.endExclusive, b.start); + i.deleted += (y = T == null ? void 0 : T.length) !== null && y !== void 0 ? y : 0, i.added += (x = W == null ? void 0 : W.length) !== null && x !== void 0 ? x : 0, i.s1Range = i.s1Range.join(g), i.s2Range = i.s2Range.join(b); } else s(), i = { added: 0, deleted: 0, count: 0, s1Range: g, s2Range: b }; - const F = g.intersect(l.seq1Range), N = b.intersect(l.seq2Range); - i.count++, i.deleted += (x = F == null ? void 0 : F.length) !== null && x !== void 0 ? x : 0, i.added += (k = N == null ? void 0 : N.length) !== null && k !== void 0 ? k : 0; + const E = g.intersect(l.seq1Range), R = b.intersect(l.seq2Range); + i.count++, i.deleted += (S = E == null ? void 0 : E.length) !== null && S !== void 0 ? S : 0, i.added += (w = R == null ? void 0 : R.length) !== null && w !== void 0 ? w : 0; }; var o = c; - const h = t.findWordContaining(l.seq1Range.start - 1), u = e.findWordContaining(l.seq2Range.start - 1), f = t.findWordContaining(l.seq1Range.endExclusive), m = e.findWordContaining(l.seq2Range.endExclusive); - h && f && u && m && h.equals(f) && u.equals(m) ? c(h, u) : (h && u && c(h, u), f && m && c(f, m)); + const h = t.findWordContaining(l.seq1Range.start - 1), u = e.findWordContaining(l.seq2Range.start - 1), m = t.findWordContaining(l.seq1Range.endExclusive), f = e.findWordContaining(l.seq2Range.endExclusive); + h && m && u && f && h.equals(m) && u.equals(f) ? c(h, u) : (h && u && c(h, u), m && f && c(m, f)); } - return s(), $h(n, r); + return s(), ed(n, r); } -function $h(t, e) { +function ed(t, e) { const n = []; for (; t.length > 0 || e.length > 0; ) { const r = t[0], i = e[0]; @@ -5963,28 +6278,28 @@ function $h(t, e) { } return n; } -function Hh(t, e, n) { - const r = []; - for (const i of Jh(t.map((s) => Gh(s, e, n)), (s, a) => s.originalRange.overlapOrTouch(a.originalRange) || s.modifiedRange.overlapOrTouch(a.modifiedRange))) { - const s = i[0], a = i[i.length - 1]; - r.push(new Kn(s.originalRange.join(a.originalRange), s.modifiedRange.join(a.modifiedRange), i.map((o) => o.innerChanges[0]))); +function ba(t, e, n, r = !1) { + const i = []; + for (const s of nd(t.map((a) => td(a, e, n)), (a, o) => a.originalRange.overlapOrTouch(o.originalRange) || a.modifiedRange.overlapOrTouch(o.modifiedRange))) { + const a = s[0], o = s[s.length - 1]; + i.push(new Xe(a.originalRange.join(o.originalRange), a.modifiedRange.join(o.modifiedRange), s.map((l) => l.innerChanges[0]))); } - return Ri(() => cl(r, (i, s) => s.originalRange.startLineNumber - i.originalRange.endLineNumberExclusive === s.modifiedRange.startLineNumber - i.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) - i.originalRange.endLineNumberExclusive < s.originalRange.startLineNumber && i.modifiedRange.endLineNumberExclusive < s.modifiedRange.startLineNumber)), r; + return rr(() => !r && i.length > 0 && i[0].originalRange.startLineNumber !== i[0].modifiedRange.startLineNumber ? !1 : gl(i, (s, a) => a.originalRange.startLineNumber - s.originalRange.endLineNumberExclusive === a.modifiedRange.startLineNumber - s.modifiedRange.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) + s.originalRange.endLineNumberExclusive < a.originalRange.startLineNumber && s.modifiedRange.endLineNumberExclusive < a.modifiedRange.startLineNumber)), i; } -function Gh(t, e, n) { +function td(t, e, n) { let r = 0, i = 0; - t.modifiedRange.startColumn - 1 >= n[t.modifiedRange.startLineNumber - 1].length && t.originalRange.startColumn - 1 >= e[t.originalRange.startLineNumber - 1].length && (r = 1), t.modifiedRange.endColumn === 1 && t.originalRange.endColumn === 1 && t.originalRange.startLineNumber + r <= t.originalRange.endLineNumber && t.modifiedRange.startLineNumber + r <= t.modifiedRange.endLineNumber && (i = -1); - const s = new He(t.originalRange.startLineNumber + r, t.originalRange.endLineNumber + 1 + i), a = new He(t.modifiedRange.startLineNumber + r, t.modifiedRange.endLineNumber + 1 + i); - return new Kn(s, a, [t]); + t.modifiedRange.endColumn === 1 && t.originalRange.endColumn === 1 && t.originalRange.startLineNumber + r <= t.originalRange.endLineNumber && t.modifiedRange.startLineNumber + r <= t.modifiedRange.endLineNumber && (i = -1), t.modifiedRange.startColumn - 1 >= n[t.modifiedRange.startLineNumber - 1].length && t.originalRange.startColumn - 1 >= e[t.originalRange.startLineNumber - 1].length && t.originalRange.startLineNumber <= t.originalRange.endLineNumber + i && t.modifiedRange.startLineNumber <= t.modifiedRange.endLineNumber + i && (r = 1); + const s = new re(t.originalRange.startLineNumber + r, t.originalRange.endLineNumber + 1 + i), a = new re(t.modifiedRange.startLineNumber + r, t.modifiedRange.endLineNumber + 1 + i); + return new Xe(s, a, [t]); } -function* Jh(t, e) { +function* nd(t, e) { let n, r; for (const i of t) r !== void 0 && e(r, i) ? n.push(i) : (n && (yield n), n = [i]), r = i; n && (yield n); } -class pa { +class va { constructor(e, n) { this.trimmedHash = e, this.lines = n; } @@ -5995,21 +6310,28 @@ class pa { return this.trimmedHash.length; } getBoundaryScore(e) { - const n = e === 0 ? 0 : fa(this.lines[e - 1]), r = e === this.lines.length ? 0 : fa(this.lines[e]); + const n = e === 0 ? 0 : ya(this.lines[e - 1]), r = e === this.lines.length ? 0 : ya(this.lines[e]); return 1e3 - (n + r); } + getText(e) { + return this.lines.slice(e.start, e.endExclusive).join(` +`); + } + isStronglyEqual(e, n) { + return this.lines[e] === this.lines[n]; + } } -function fa(t) { +function ya(t) { let e = 0; for (; e < t.length && (t.charCodeAt(e) === 32 || t.charCodeAt(e) === 9); ) e++; return e; } -class ma { +class wa { constructor(e, n, r) { - this.lines = e, this.considerWhitespaceChanges = r, this.elements = [], this.firstCharOffsetByLineMinusOne = [], this.offsetByLine = []; + this.lines = e, this.considerWhitespaceChanges = r, this.elements = [], this.firstCharOffsetByLineMinusOne = [], this.additionalOffsetByLine = []; let i = !1; - n.start > 0 && n.endExclusive >= e.length && (n = new de(n.start - 1, n.endExclusive), i = !0), this.lineRange = n; + n.start > 0 && n.endExclusive >= e.length && (n = new Z(n.start - 1, n.endExclusive), i = !0), this.lineRange = n; for (let s = this.lineRange.start; s < this.lineRange.endExclusive; s++) { let a = e[s], o = 0; if (i) @@ -6018,19 +6340,22 @@ class ma { const l = a.trimStart(); o = a.length - l.length, a = l.trimEnd(); } - this.offsetByLine.push(o); + this.additionalOffsetByLine.push(o); for (let l = 0; l < a.length; l++) this.elements.push(a.charCodeAt(l)); s < e.length - 1 && (this.elements.push(` `.charCodeAt(0)), this.firstCharOffsetByLineMinusOne[s - this.lineRange.start] = this.elements.length); } - this.offsetByLine.push(0); + this.additionalOffsetByLine.push(0); } toString() { return `Slice: "${this.text}"`; } get text() { - return [...this.elements].map((e) => String.fromCharCode(e)).join(""); + return this.getText(new Z(0, this.length)); + } + getText(e) { + return this.elements.slice(e.start, e.endExclusive).map((n) => String.fromCharCode(n)).join(""); } getElement(e) { return this.elements[e]; @@ -6039,106 +6364,149 @@ class ma { return this.elements.length; } getBoundaryScore(e) { - const n = ba(e > 0 ? this.elements[e - 1] : -1), r = ba(e < this.elements.length ? this.elements[e] : -1); + const n = Sa(e > 0 ? this.elements[e - 1] : -1), r = Sa(e < this.elements.length ? this.elements[e] : -1); if (n === 6 && r === 7) return 0; let i = 0; - return n !== r && (i += 10, r === 1 && (i += 1)), i += ga(n), i += ga(r), i; + return n !== r && (i += 10, r === 1 && (i += 1)), i += xa(n), i += xa(r), i; } translateOffset(e) { if (this.lineRange.isEmpty) - return new Ge(this.lineRange.start + 1, 1); + return new Ke(this.lineRange.start + 1, 1); let n = 0, r = this.firstCharOffsetByLineMinusOne.length; for (; n < r; ) { const s = Math.floor((n + r) / 2); this.firstCharOffsetByLineMinusOne[s] > e ? r = s : n = s + 1; } const i = n === 0 ? 0 : this.firstCharOffsetByLineMinusOne[n - 1]; - return new Ge(this.lineRange.start + n + 1, e - i + 1 + this.offsetByLine[n]); + return new Ke(this.lineRange.start + n + 1, e - i + 1 + this.additionalOffsetByLine[n]); } translateRange(e) { - return Ee.fromPositions(this.translateOffset(e.start), this.translateOffset(e.endExclusive)); + return Ae.fromPositions(this.translateOffset(e.start), this.translateOffset(e.endExclusive)); } /** * Finds the word that contains the character at the given offset */ findWordContaining(e) { - if (e < 0 || e >= this.elements.length || !wr(this.elements[e])) + if (e < 0 || e >= this.elements.length || !Er(this.elements[e])) return; let n = e; - for (; n > 0 && wr(this.elements[n - 1]); ) + for (; n > 0 && Er(this.elements[n - 1]); ) n--; let r = e; - for (; r < this.elements.length && wr(this.elements[r]); ) + for (; r < this.elements.length && Er(this.elements[r]); ) r++; - return new de(n, r); + return new Z(n, r); + } + countLinesIn(e) { + return this.translateOffset(e.endExclusive).lineNumber - this.translateOffset(e.start).lineNumber; + } + isStronglyEqual(e, n) { + return this.elements[e] === this.elements[n]; + } + extendToFullLines(e) { + var n, r; + const i = (n = id(this.firstCharOffsetByLineMinusOne, (a) => a <= e.start)) !== null && n !== void 0 ? n : 0, s = (r = ad(this.firstCharOffsetByLineMinusOne, (a) => e.endExclusive <= a)) !== null && r !== void 0 ? r : this.elements.length; + return new Z(i, s); } } -function wr(t) { +function rd(t, e) { + let n = 0, r = t.length; + for (; n < r; ) { + const i = Math.floor((n + r) / 2); + e(t[i]) ? n = i + 1 : r = i; + } + return n - 1; +} +function id(t, e) { + const n = rd(t, e); + return n === -1 ? void 0 : t[n]; +} +function sd(t, e) { + let n = 0, r = t.length; + for (; n < r; ) { + const i = Math.floor((n + r) / 2); + e(t[i]) ? r = i : n = i + 1; + } + return n; +} +function ad(t, e) { + const n = sd(t, e); + return n === t.length ? void 0 : t[n]; +} +function Er(t) { return t >= 97 && t <= 122 || t >= 65 && t <= 90 || t >= 48 && t <= 57; } -const Xh = { - [ - 0 - /* CharBoundaryCategory.WordLower */ - ]: 0, - [ - 1 - /* CharBoundaryCategory.WordUpper */ - ]: 0, - [ - 2 - /* CharBoundaryCategory.WordNumber */ - ]: 0, - [ - 3 - /* CharBoundaryCategory.End */ - ]: 10, - [ - 4 - /* CharBoundaryCategory.Other */ - ]: 2, - [ - 5 - /* CharBoundaryCategory.Space */ - ]: 3, - [ - 6 - /* CharBoundaryCategory.LineBreakCR */ - ]: 10, - [ - 7 - /* CharBoundaryCategory.LineBreakLF */ - ]: 10 +const od = { + 0: 0, + 1: 0, + 2: 0, + 3: 10, + 4: 2, + 5: 3, + 6: 10, + 7: 10 }; -function ga(t) { - return Xh[t]; +function xa(t) { + return od[t]; } -function ba(t) { - return t === 10 ? 7 : t === 13 ? 6 : Yh(t) ? 5 : t >= 97 && t <= 122 ? 0 : t >= 65 && t <= 90 ? 1 : t >= 48 && t <= 57 ? 2 : t === -1 ? 3 : 4; +function Sa(t) { + return t === 10 ? 7 : t === 13 ? 6 : ld(t) ? 5 : t >= 97 && t <= 122 ? 0 : t >= 65 && t <= 90 ? 1 : t >= 48 && t <= 57 ? 2 : t === -1 ? 3 : 4; } -function Yh(t) { +function ld(t) { return t === 32 || t === 9; } -const xr = { - legacy: new Nh(), - advanced: new jh() +const Dr = /* @__PURE__ */ new Map(); +function Ca(t) { + let e = Dr.get(t); + return e === void 0 && (e = Dr.size, Dr.set(t, e)), e; +} +class ka { + constructor(e, n, r) { + this.range = e, this.lines = n, this.source = r, this.histogram = []; + let i = 0; + for (let s = e.startLineNumber - 1; s < e.endLineNumberExclusive - 1; s++) { + const a = n[s]; + for (let l = 0; l < a.length; l++) { + i++; + const c = a[l], h = Ca(c); + this.histogram[h] = (this.histogram[h] || 0) + 1; + } + i++; + const o = Ca(` +`); + this.histogram[o] = (this.histogram[o] || 0) + 1; + } + this.totalCount = i; + } + computeSimilarity(e) { + var n, r; + let i = 0; + const s = Math.max(this.histogram.length, e.histogram.length); + for (let a = 0; a < s; a++) + i += Math.abs(((n = this.histogram[a]) !== null && n !== void 0 ? n : 0) - ((r = e.histogram[a]) !== null && r !== void 0 ? r : 0)); + return 1 - i / (this.totalCount + e.totalCount); + } +} +const _a = { + getLegacy: () => new Ih(), + getAdvanced: () => new Kh() }; -function yt(t, e) { +function vt(t, e) { const n = Math.pow(10, e); return Math.round(t * n) / n; } -class he { +class ve { constructor(e, n, r, i = 1) { - this._rgbaBrand = void 0, this.r = Math.min(255, Math.max(0, e)) | 0, this.g = Math.min(255, Math.max(0, n)) | 0, this.b = Math.min(255, Math.max(0, r)) | 0, this.a = yt(Math.max(Math.min(1, i), 0), 3); + this._rgbaBrand = void 0, this.r = Math.min(255, Math.max(0, e)) | 0, this.g = Math.min(255, Math.max(0, n)) | 0, this.b = Math.min(255, Math.max(0, r)) | 0, this.a = vt(Math.max(Math.min(1, i), 0), 3); } static equals(e, n) { return e.r === n.r && e.g === n.g && e.b === n.b && e.a === n.a; } } -class We { +class Oe { constructor(e, n, r, i) { - this._hslaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = yt(Math.max(Math.min(1, n), 0), 3), this.l = yt(Math.max(Math.min(1, r), 0), 3), this.a = yt(Math.max(Math.min(1, i), 0), 3); + this._hslaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = vt(Math.max(Math.min(1, n), 0), 3), this.l = vt(Math.max(Math.min(1, r), 0), 3), this.a = vt(Math.max(Math.min(1, i), 0), 3); } static equals(e, n) { return e.h === n.h && e.s === n.s && e.l === n.l && e.a === n.a; @@ -6167,7 +6535,7 @@ class We { } l *= 60, l = Math.round(l); } - return new We(l, c, h, s); + return new Oe(l, c, h, s); } static _hue2rgb(e, n, r) { return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (n - e) * 6 * r : r < 1 / 2 ? n : r < 2 / 3 ? e + (n - e) * (2 / 3 - r) * 6 : e; @@ -6185,14 +6553,14 @@ class We { a = o = l = i; else { const c = i < 0.5 ? i * (1 + r) : i + r - i * r, h = 2 * i - c; - a = We._hue2rgb(h, c, n + 1 / 3), o = We._hue2rgb(h, c, n), l = We._hue2rgb(h, c, n - 1 / 3); + a = Oe._hue2rgb(h, c, n + 1 / 3), o = Oe._hue2rgb(h, c, n), l = Oe._hue2rgb(h, c, n - 1 / 3); } - return new he(Math.round(a * 255), Math.round(o * 255), Math.round(l * 255), s); + return new ve(Math.round(a * 255), Math.round(o * 255), Math.round(l * 255), s); } } class Ot { constructor(e, n, r, i) { - this._hsvaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = yt(Math.max(Math.min(1, n), 0), 3), this.v = yt(Math.max(Math.min(1, r), 0), 3), this.a = yt(Math.max(Math.min(1, i), 0), 3); + this._hsvaBrand = void 0, this.h = Math.max(Math.min(360, e), 0) | 0, this.s = vt(Math.max(Math.min(1, n), 0), 3), this.v = vt(Math.max(Math.min(1, r), 0), 3), this.a = vt(Math.max(Math.min(1, i), 0), 3); } static equals(e, n) { return e.h === n.h && e.s === n.s && e.v === n.v && e.a === n.a; @@ -6207,28 +6575,28 @@ class Ot { static toRGBA(e) { const { h: n, s: r, v: i, a: s } = e, a = i * r, o = a * (1 - Math.abs(n / 60 % 2 - 1)), l = i - a; let [c, h, u] = [0, 0, 0]; - return n < 60 ? (c = a, h = o) : n < 120 ? (c = o, h = a) : n < 180 ? (h = a, u = o) : n < 240 ? (h = o, u = a) : n < 300 ? (c = o, u = a) : n <= 360 && (c = a, u = o), c = Math.round((c + l) * 255), h = Math.round((h + l) * 255), u = Math.round((u + l) * 255), new he(c, h, u, s); + return n < 60 ? (c = a, h = o) : n < 120 ? (c = o, h = a) : n < 180 ? (h = a, u = o) : n < 240 ? (h = o, u = a) : n < 300 ? (c = o, u = a) : n <= 360 && (c = a, u = o), c = Math.round((c + l) * 255), h = Math.round((h + l) * 255), u = Math.round((u + l) * 255), new ve(c, h, u, s); } } -let ge = class we { +let me = class Te { static fromHex(e) { - return we.Format.CSS.parseHex(e) || we.red; + return Te.Format.CSS.parseHex(e) || Te.red; } static equals(e, n) { return !e && !n ? !0 : !e || !n ? !1 : e.equals(n); } get hsla() { - return this._hsla ? this._hsla : We.fromRGBA(this.rgba); + return this._hsla ? this._hsla : Oe.fromRGBA(this.rgba); } get hsva() { return this._hsva ? this._hsva : Ot.fromRGBA(this.rgba); } constructor(e) { if (e) - if (e instanceof he) + if (e instanceof ve) this.rgba = e; - else if (e instanceof We) - this._hsla = e, this.rgba = We.toRGBA(e); + else if (e instanceof Oe) + this._hsla = e, this.rgba = Oe.toRGBA(e); else if (e instanceof Ot) this._hsva = e, this.rgba = Ot.toRGBA(e); else @@ -6237,35 +6605,20 @@ let ge = class we { throw new Error("Color needs a value"); } equals(e) { - return !!e && he.equals(this.rgba, e.rgba) && We.equals(this.hsla, e.hsla) && Ot.equals(this.hsva, e.hsva); + return !!e && ve.equals(this.rgba, e.rgba) && Oe.equals(this.hsla, e.hsla) && Ot.equals(this.hsva, e.hsva); } /** * http://www.w3.org/TR/WCAG20/#relativeluminancedef * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. */ getRelativeLuminance() { - const e = we._relativeLuminanceForComponent(this.rgba.r), n = we._relativeLuminanceForComponent(this.rgba.g), r = we._relativeLuminanceForComponent(this.rgba.b), i = 0.2126 * e + 0.7152 * n + 0.0722 * r; - return yt(i, 4); + const e = Te._relativeLuminanceForComponent(this.rgba.r), n = Te._relativeLuminanceForComponent(this.rgba.g), r = Te._relativeLuminanceForComponent(this.rgba.b), i = 0.2126 * e + 0.7152 * n + 0.0722 * r; + return vt(i, 4); } static _relativeLuminanceForComponent(e) { const n = e / 255; return n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4); } - /** - * http://www.w3.org/TR/WCAG20/#contrast-ratiodef - * Returns the contrast ration number in the set [1, 21]. - */ - getContrastRatio(e) { - const n = this.getRelativeLuminance(), r = e.getRelativeLuminance(); - return n > r ? (n + 0.05) / (r + 0.05) : (r + 0.05) / (n + 0.05); - } - /** - * http://24ways.org/2010/calculating-color-contrast - * Return 'true' if darker color otherwise 'false' - */ - isDarker() { - return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3 < 128; - } /** * http://24ways.org/2010/calculating-color-contrast * Return 'true' if lighter color otherwise 'false' @@ -6282,14 +6635,14 @@ let ge = class we { return n < r; } lighten(e) { - return new we(new We(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * e, this.hsla.a)); + return new Te(new Oe(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * e, this.hsla.a)); } darken(e) { - return new we(new We(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * e, this.hsla.a)); + return new Te(new Oe(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * e, this.hsla.a)); } transparent(e) { const { r: n, g: r, b: i, a: s } = this.rgba; - return new we(new he(n, r, i, s * e)); + return new Te(new ve(n, r, i, s * e)); } isTransparent() { return this.rgba.a === 0; @@ -6298,31 +6651,16 @@ let ge = class we { return this.rgba.a === 1; } opposite() { - return new we(new he(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); - } - blend(e) { - const n = e.rgba, r = this.rgba.a, i = n.a, s = r + i * (1 - r); - if (s < 1e-6) - return we.transparent; - const a = this.rgba.r * r / s + n.r * i * (1 - r) / s, o = this.rgba.g * r / s + n.g * i * (1 - r) / s, l = this.rgba.b * r / s + n.b * i * (1 - r) / s; - return new we(new he(a, o, l, s)); + return new Te(new ve(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); } makeOpaque(e) { if (this.isOpaque() || e.rgba.a !== 1) return this; const { r: n, g: r, b: i, a: s } = this.rgba; - return new we(new he(e.rgba.r - s * (e.rgba.r - n), e.rgba.g - s * (e.rgba.g - r), e.rgba.b - s * (e.rgba.b - i), 1)); - } - flatten(...e) { - const n = e.reduceRight((r, i) => we._flatten(i, r)); - return we._flatten(this, n); - } - static _flatten(e, n) { - const r = 1 - e.rgba.a; - return new we(new he(r * n.rgba.r + e.rgba.a * e.rgba.r, r * n.rgba.g + e.rgba.a * e.rgba.g, r * n.rgba.b + e.rgba.a * e.rgba.b)); + return new Te(new ve(e.rgba.r - s * (e.rgba.r - n), e.rgba.g - s * (e.rgba.g - r), e.rgba.b - s * (e.rgba.b - i), 1)); } toString() { - return this._toString || (this._toString = we.Format.CSS.format(this)), this._toString; + return this._toString || (this._toString = Te.Format.CSS.format(this)), this._toString; } static getLighterColor(e, n, r) { if (e.isLighterThan(n)) @@ -6339,74 +6677,74 @@ let ge = class we { return r = r * (i - s) / i, e.darken(r); } }; -ge.white = new ge(new he(255, 255, 255, 1)); -ge.black = new ge(new he(0, 0, 0, 1)); -ge.red = new ge(new he(255, 0, 0, 1)); -ge.blue = new ge(new he(0, 0, 255, 1)); -ge.green = new ge(new he(0, 255, 0, 1)); -ge.cyan = new ge(new he(0, 255, 255, 1)); -ge.lightgrey = new ge(new he(211, 211, 211, 1)); -ge.transparent = new ge(new he(0, 0, 0, 0)); +me.white = new me(new ve(255, 255, 255, 1)); +me.black = new me(new ve(0, 0, 0, 1)); +me.red = new me(new ve(255, 0, 0, 1)); +me.blue = new me(new ve(0, 0, 255, 1)); +me.green = new me(new ve(0, 255, 0, 1)); +me.cyan = new me(new ve(0, 255, 255, 1)); +me.lightgrey = new me(new ve(211, 211, 211, 1)); +me.transparent = new me(new ve(0, 0, 0, 0)); (function(t) { (function(e) { (function(n) { - function r(m) { - return m.rgba.a === 1 ? `rgb(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b})` : t.Format.CSS.formatRGBA(m); + function r(f) { + return f.rgba.a === 1 ? `rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})` : t.Format.CSS.formatRGBA(f); } n.formatRGB = r; - function i(m) { - return `rgba(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b}, ${+m.rgba.a.toFixed(2)})`; + function i(f) { + return `rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`; } n.formatRGBA = i; - function s(m) { - return m.hsla.a === 1 ? `hsl(${m.hsla.h}, ${(m.hsla.s * 100).toFixed(2)}%, ${(m.hsla.l * 100).toFixed(2)}%)` : t.Format.CSS.formatHSLA(m); + function s(f) { + return f.hsla.a === 1 ? `hsl(${f.hsla.h}, ${(f.hsla.s * 100).toFixed(2)}%, ${(f.hsla.l * 100).toFixed(2)}%)` : t.Format.CSS.formatHSLA(f); } n.formatHSL = s; - function a(m) { - return `hsla(${m.hsla.h}, ${(m.hsla.s * 100).toFixed(2)}%, ${(m.hsla.l * 100).toFixed(2)}%, ${m.hsla.a.toFixed(2)})`; + function a(f) { + return `hsla(${f.hsla.h}, ${(f.hsla.s * 100).toFixed(2)}%, ${(f.hsla.l * 100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`; } n.formatHSLA = a; - function o(m) { - const g = m.toString(16); + function o(f) { + const g = f.toString(16); return g.length !== 2 ? "0" + g : g; } - function l(m) { - return `#${o(m.rgba.r)}${o(m.rgba.g)}${o(m.rgba.b)}`; + function l(f) { + return `#${o(f.rgba.r)}${o(f.rgba.g)}${o(f.rgba.b)}`; } n.formatHex = l; - function c(m, g = !1) { - return g && m.rgba.a === 1 ? t.Format.CSS.formatHex(m) : `#${o(m.rgba.r)}${o(m.rgba.g)}${o(m.rgba.b)}${o(Math.round(m.rgba.a * 255))}`; + function c(f, g = !1) { + return g && f.rgba.a === 1 ? t.Format.CSS.formatHex(f) : `#${o(f.rgba.r)}${o(f.rgba.g)}${o(f.rgba.b)}${o(Math.round(f.rgba.a * 255))}`; } n.formatHexA = c; - function h(m) { - return m.isOpaque() ? t.Format.CSS.formatHex(m) : t.Format.CSS.formatRGBA(m); + function h(f) { + return f.isOpaque() ? t.Format.CSS.formatHex(f) : t.Format.CSS.formatRGBA(f); } n.format = h; - function u(m) { - const g = m.length; - if (g === 0 || m.charCodeAt(0) !== 35) + function u(f) { + const g = f.length; + if (g === 0 || f.charCodeAt(0) !== 35) return null; if (g === 7) { - const b = 16 * f(m.charCodeAt(1)) + f(m.charCodeAt(2)), y = 16 * f(m.charCodeAt(3)) + f(m.charCodeAt(4)), w = 16 * f(m.charCodeAt(5)) + f(m.charCodeAt(6)); - return new t(new he(b, y, w, 1)); + const b = 16 * m(f.charCodeAt(1)) + m(f.charCodeAt(2)), y = 16 * m(f.charCodeAt(3)) + m(f.charCodeAt(4)), x = 16 * m(f.charCodeAt(5)) + m(f.charCodeAt(6)); + return new t(new ve(b, y, x, 1)); } if (g === 9) { - const b = 16 * f(m.charCodeAt(1)) + f(m.charCodeAt(2)), y = 16 * f(m.charCodeAt(3)) + f(m.charCodeAt(4)), w = 16 * f(m.charCodeAt(5)) + f(m.charCodeAt(6)), x = 16 * f(m.charCodeAt(7)) + f(m.charCodeAt(8)); - return new t(new he(b, y, w, x / 255)); + const b = 16 * m(f.charCodeAt(1)) + m(f.charCodeAt(2)), y = 16 * m(f.charCodeAt(3)) + m(f.charCodeAt(4)), x = 16 * m(f.charCodeAt(5)) + m(f.charCodeAt(6)), S = 16 * m(f.charCodeAt(7)) + m(f.charCodeAt(8)); + return new t(new ve(b, y, x, S / 255)); } if (g === 4) { - const b = f(m.charCodeAt(1)), y = f(m.charCodeAt(2)), w = f(m.charCodeAt(3)); - return new t(new he(16 * b + b, 16 * y + y, 16 * w + w)); + const b = m(f.charCodeAt(1)), y = m(f.charCodeAt(2)), x = m(f.charCodeAt(3)); + return new t(new ve(16 * b + b, 16 * y + y, 16 * x + x)); } if (g === 5) { - const b = f(m.charCodeAt(1)), y = f(m.charCodeAt(2)), w = f(m.charCodeAt(3)), x = f(m.charCodeAt(4)); - return new t(new he(16 * b + b, 16 * y + y, 16 * w + w, (16 * x + x) / 255)); + const b = m(f.charCodeAt(1)), y = m(f.charCodeAt(2)), x = m(f.charCodeAt(3)), S = m(f.charCodeAt(4)); + return new t(new ve(16 * b + b, 16 * y + y, 16 * x + x, (16 * S + S) / 255)); } return null; } n.parseHex = u; - function f(m) { - switch (m) { + function m(f) { + switch (f) { case 48: return 0; case 49: @@ -6456,8 +6794,8 @@ ge.transparent = new ge(new he(0, 0, 0, 0)); } })(e.CSS || (e.CSS = {})); })(t.Format || (t.Format = {})); -})(ge || (ge = {})); -function fl(t) { +})(me || (me = {})); +function vl(t) { const e = []; for (const n of t) { const r = Number(n); @@ -6465,7 +6803,7 @@ function fl(t) { } return e; } -function Ei(t, e, n, r) { +function Ti(t, e, n, r) { return { red: t / 255, blue: n / 255, @@ -6473,7 +6811,7 @@ function Ei(t, e, n, r) { alpha: r }; } -function Qt(t, e) { +function en(t, e) { const n = e.index, r = e[0].length; if (!n) return; @@ -6485,39 +6823,39 @@ function Qt(t, e) { endColumn: i.column + r }; } -function Kh(t, e) { +function cd(t, e) { if (!t) return; - const n = ge.Format.CSS.parseHex(e); + const n = me.Format.CSS.parseHex(e); if (n) return { range: t, - color: Ei(n.rgba.r, n.rgba.g, n.rgba.b, n.rgba.a) + color: Ti(n.rgba.r, n.rgba.g, n.rgba.b, n.rgba.a) }; } -function va(t, e, n) { +function Ra(t, e, n) { if (!t || e.length !== 1) return; - const i = e[0].values(), s = fl(i); + const i = e[0].values(), s = vl(i); return { range: t, - color: Ei(s[0], s[1], s[2], n ? s[3] : 1) + color: Ti(s[0], s[1], s[2], n ? s[3] : 1) }; } -function ya(t, e, n) { +function Fa(t, e, n) { if (!t || e.length !== 1) return; - const i = e[0].values(), s = fl(i), a = new ge(new We(s[0], s[1] / 100, s[2] / 100, n ? s[3] : 1)); + const i = e[0].values(), s = vl(i), a = new me(new Oe(s[0], s[1] / 100, s[2] / 100, n ? s[3] : 1)); return { range: t, - color: Ei(a.rgba.r, a.rgba.g, a.rgba.b, a.rgba.a) + color: Ti(a.rgba.r, a.rgba.g, a.rgba.b, a.rgba.a) }; } -function Zt(t, e) { +function tn(t, e) { return typeof t == "string" ? [...t.matchAll(e)] : t.findMatches(e); } -function Qh(t) { - const e = [], r = Zt(t, /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm); +function hd(t) { + const e = [], r = tn(t, /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm); if (r.length > 0) for (const i of r) { const s = i.filter((c) => c !== void 0), a = s[1], o = s[2]; @@ -6526,26 +6864,26 @@ function Qh(t) { let l; if (a === "rgb") { const c = /^\(\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; - l = va(Qt(t, i), Zt(o, c), !1); + l = Ra(en(t, i), tn(o, c), !1); } else if (a === "rgba") { const c = /^\(\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; - l = va(Qt(t, i), Zt(o, c), !0); + l = Ra(en(t, i), tn(o, c), !0); } else if (a === "hsl") { const c = /^\(\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; - l = ya(Qt(t, i), Zt(o, c), !1); + l = Fa(en(t, i), tn(o, c), !1); } else if (a === "hsla") { const c = /^\(\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; - l = ya(Qt(t, i), Zt(o, c), !0); + l = Fa(en(t, i), tn(o, c), !0); } else - a === "#" && (l = Kh(Qt(t, i), a + o)); + a === "#" && (l = cd(en(t, i), a + o)); l && e.push(l); } return e; } -function Zh(t) { - return !t || typeof t.getValue != "function" || typeof t.positionAt != "function" ? [] : Qh(t); +function dd(t) { + return !t || typeof t.getValue != "function" || typeof t.positionAt != "function" ? [] : hd(t); } -var Xe = globalThis && globalThis.__awaiter || function(t, e, n, r) { +var ht = globalThis && globalThis.__awaiter || function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -6572,7 +6910,7 @@ var Xe = globalThis && globalThis.__awaiter || function(t, e, n, r) { c((r = r.apply(t, e || [])).next()); }); }; -class ed extends ah { +class ud extends ch { get uri() { return this._uri; } @@ -6585,7 +6923,7 @@ class ed extends ah { findMatches(e) { const n = []; for (let r = 0; r < this._lines.length; r++) { - const i = this._lines[r], s = this.offsetAt(new Ge(r + 1, 1)), a = i.matchAll(e); + const i = this._lines[r], s = this.offsetAt(new Ke(r + 1, 1)), a = i.matchAll(e); for (const o of a) (o.index || o.index === 0) && (o.index = o.index + s), n.push(o); } @@ -6601,20 +6939,8 @@ class ed extends ah { return this._lines[e - 1]; } getWordAtPosition(e, n) { - const r = ki(e.column, ch(n), this._lines[e.lineNumber - 1], 0); - return r ? new Ee(e.lineNumber, r.startColumn, e.lineNumber, r.endColumn) : null; - } - getWordUntilPosition(e, n) { - const r = this.getWordAtPosition(e, n); - return r ? { - word: this._lines[e.lineNumber - 1].substring(r.startColumn - 1, e.column - 1), - startColumn: r.startColumn, - endColumn: e.column - } : { - word: "", - startColumn: e.column, - endColumn: e.column - }; + const r = Mi(e.column, uh(n), this._lines[e.lineNumber - 1], 0); + return r ? new Ae(e.lineNumber, r.startColumn, e.lineNumber, r.endColumn) : null; } words(e) { const n = this._lines, r = this._wordenize.bind(this); @@ -6679,7 +7005,7 @@ class ed extends ah { } : e; } _validatePosition(e) { - if (!Ge.isIPosition(e)) + if (!Ke.isIPosition(e)) throw new Error("bad position"); let { lineNumber: n, column: r } = e, i = !1; if (n < 1) @@ -6693,7 +7019,7 @@ class ed extends ah { return i ? { lineNumber: n, column: r } : e; } } -class gt { +class Ft { constructor(e, n) { this._host = e, this._models = /* @__PURE__ */ Object.create(null), this._foreignModuleFactory = n, this._foreignModule = null; } @@ -6708,7 +7034,7 @@ class gt { return Object.keys(this._models).forEach((n) => e.push(this._models[n])), e; } acceptNewModel(e) { - this._models[e.url] = new ed(Ci.parse(e.url), e.lines, e.EOL, e.versionId); + this._models[e.url] = new ud(Ni.parse(e.url), e.lines, e.EOL, e.versionId); } acceptModelChanged(e, n) { if (!this._models[e]) @@ -6719,36 +7045,46 @@ class gt { this._models[e] && delete this._models[e]; } computeUnicodeHighlights(e, n, r) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const i = this._getModel(e); - return i ? Dh.computeUnicodeHighlights(i, n, r) : { ranges: [], hasMore: !1, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; + return i ? zh.computeUnicodeHighlights(i, n, r) : { ranges: [], hasMore: !1, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; }); } // ---- BEGIN diff -------------------------------------------------------------------------- computeDiff(e, n, r, i) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const s = this._getModel(e), a = this._getModel(n); - return !s || !a ? null : gt.computeDiff(s, a, r, i); + return !s || !a ? null : Ft.computeDiff(s, a, r, i); }); } static computeDiff(e, n, r, i) { - const s = i === "advanced" ? xr.advanced : xr.legacy, a = e.getLinesContent(), o = n.getLinesContent(), l = s.computeDiff(a, o, r); - return { - identical: l.changes.length > 0 ? !1 : this._modelsAreIdentical(e, n), - quitEarly: l.hitTimeout, - changes: l.changes.map((h) => { - var u; - return [h.originalRange.startLineNumber, h.originalRange.endLineNumberExclusive, h.modifiedRange.startLineNumber, h.modifiedRange.endLineNumberExclusive, (u = h.innerChanges) === null || u === void 0 ? void 0 : u.map((f) => [ - f.originalRange.startLineNumber, - f.originalRange.startColumn, - f.originalRange.endLineNumber, - f.originalRange.endColumn, - f.modifiedRange.startLineNumber, - f.modifiedRange.startColumn, - f.modifiedRange.endLineNumber, - f.modifiedRange.endColumn + const s = i === "advanced" ? _a.getAdvanced() : _a.getLegacy(), a = e.getLinesContent(), o = n.getLinesContent(), l = s.computeDiff(a, o, r), c = l.changes.length > 0 ? !1 : this._modelsAreIdentical(e, n); + function h(u) { + return u.map((m) => { + var f; + return [m.originalRange.startLineNumber, m.originalRange.endLineNumberExclusive, m.modifiedRange.startLineNumber, m.modifiedRange.endLineNumberExclusive, (f = m.innerChanges) === null || f === void 0 ? void 0 : f.map((g) => [ + g.originalRange.startLineNumber, + g.originalRange.startColumn, + g.originalRange.endLineNumber, + g.originalRange.endColumn, + g.modifiedRange.startLineNumber, + g.modifiedRange.startColumn, + g.modifiedRange.endLineNumber, + g.modifiedRange.endColumn ])]; - }) + }); + } + return { + identical: c, + quitEarly: l.hitTimeout, + changes: h(l.changes), + moves: l.moves.map((u) => [ + u.lineRangeMapping.original.startLineNumber, + u.lineRangeMapping.original.endLineNumberExclusive, + u.lineRangeMapping.modified.startLineNumber, + u.lineRangeMapping.modified.endLineNumberExclusive, + h(u.changes) + ]) }; } static _modelsAreIdentical(e, n) { @@ -6762,23 +7098,8 @@ class gt { } return !0; } - computeDirtyDiff(e, n, r) { - return Xe(this, void 0, void 0, function* () { - const i = this._getModel(e), s = this._getModel(n); - if (!i || !s) - return null; - const a = i.getLinesContent(), o = s.getLinesContent(); - return new pl(a, o, { - shouldComputeCharChanges: !1, - shouldPostProcessCharChanges: !1, - shouldIgnoreTrimWhitespace: r, - shouldMakePrettyDiff: !0, - maxComputationTime: 1e3 - }).computeDiff().changes; - }); - } computeMoreMinimalEdits(e, n, r) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const i = this._getModel(e); if (!i) return n; @@ -6786,24 +7107,24 @@ class gt { let a; n = n.slice(0).sort((o, l) => { if (o.range && l.range) - return Ee.compareRangesUsingStarts(o.range, l.range); + return Ae.compareRangesUsingStarts(o.range, l.range); const c = o.range ? 0 : 1, h = l.range ? 0 : 1; return c - h; }); for (let { range: o, text: l, eol: c } of n) { - if (typeof c == "number" && (a = c), Ee.isEmpty(o) && !l) + if (typeof c == "number" && (a = c), Ae.isEmpty(o) && !l) continue; const h = i.getValueInRange(o); if (l = l.replace(/\r\n|\n|\r/g, i.eol), h === l) continue; - if (Math.max(l.length, h.length) > gt._diffLimit) { + if (Math.max(l.length, h.length) > Ft._diffLimit) { s.push({ range: o, text: l }); continue; } - const u = Vc(h, l, r), f = i.offsetAt(Ee.lift(o).getStartPosition()); - for (const m of u) { - const g = i.positionAt(f + m.originalStart), b = i.positionAt(f + m.originalStart + m.originalLength), y = { - text: l.substr(m.modifiedStart, m.modifiedLength), + const u = Vc(h, l, r), m = i.offsetAt(Ae.lift(o).getStartPosition()); + for (const f of u) { + const g = i.positionAt(m + f.originalStart), b = i.positionAt(m + f.originalStart + f.originalLength), y = { + text: l.substr(f.modifiedStart, f.modifiedLength), range: { startLineNumber: g.lineNumber, startColumn: g.column, endLineNumber: b.lineNumber, endColumn: b.column } }; i.getValueInRange(y.range) !== y.text && s.push(y); @@ -6812,77 +7133,29 @@ class gt { return typeof a == "number" && s.push({ eol: a, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }), s; }); } - computeHumanReadableDiff(e, n, r) { - return Xe(this, void 0, void 0, function* () { - const i = this._getModel(e); - if (!i) - return n; - const s = []; - let a; - n = n.slice(0).sort((c, h) => { - if (c.range && h.range) - return Ee.compareRangesUsingStarts(c.range, h.range); - const u = c.range ? 0 : 1, f = h.range ? 0 : 1; - return u - f; - }); - for (let { range: c, text: h, eol: u } of n) { - let w = function(k, F) { - return new Ge(k.lineNumber + F.lineNumber - 1, F.lineNumber === 1 ? k.column + F.column - 1 : F.column); - }, x = function(k, F) { - const N = []; - for (let j = F.startLineNumber; j <= F.endLineNumber; j++) { - const H = k[j - 1]; - j === F.startLineNumber && j === F.endLineNumber ? N.push(H.substring(F.startColumn - 1, F.endColumn - 1)) : j === F.startLineNumber ? N.push(H.substring(F.startColumn - 1)) : j === F.endLineNumber ? N.push(H.substring(0, F.endColumn - 1)) : N.push(H); - } - return N; - }; - var o = w, l = x; - if (typeof u == "number" && (a = u), Ee.isEmpty(c) && !h) - continue; - const f = i.getValueInRange(c); - if (h = h.replace(/\r\n|\n|\r/g, i.eol), f === h) - continue; - if (Math.max(h.length, f.length) > gt._diffLimit) { - s.push({ range: c, text: h }); - continue; - } - const m = f.split(/\r\n|\n|\r/), g = h.split(/\r\n|\n|\r/), b = xr.advanced.computeDiff(m, g, r), y = Ee.lift(c).getStartPosition(); - for (const k of b.changes) - if (k.innerChanges) - for (const F of k.innerChanges) - s.push({ - range: Ee.fromPositions(w(y, F.originalRange.getStartPosition()), w(y, F.originalRange.getEndPosition())), - text: x(g, F.modifiedRange).join(i.eol) - }); - else - throw new Dt("The experimental diff algorithm always produces inner changes"); - } - return typeof a == "number" && s.push({ eol: a, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }), s; - }); - } // ---- END minimal edits --------------------------------------------------------------- computeLinks(e) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const n = this._getModel(e); - return n ? mh(n) : null; + return n ? vh(n) : null; }); } // --- BEGIN default document colors ----------------------------------------------------------- computeDefaultDocumentColors(e) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const n = this._getModel(e); - return n ? Zh(n) : null; + return n ? dd(n) : null; }); } textualSuggest(e, n, r, i) { - return Xe(this, void 0, void 0, function* () { - const s = new ur(!0), a = new RegExp(r, i), o = /* @__PURE__ */ new Set(); + return ht(this, void 0, void 0, function* () { + const s = new br(), a = new RegExp(r, i), o = /* @__PURE__ */ new Set(); e: for (const l of e) { const c = this._getModel(l); if (c) { for (const h of c.words(a)) - if (!(h === n || !isNaN(Number(h))) && (o.add(h), o.size > gt._suggestionsLimit)) + if (!(h === n || !isNaN(Number(h))) && (o.add(h), o.size > Ft._suggestionsLimit)) break e; } } @@ -6892,7 +7165,7 @@ class gt { // ---- END suggest -------------------------------------------------------------------------- //#region -- word ranges -- computeWordRanges(e, n, r, i) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const s = this._getModel(e); if (!s) return /* @__PURE__ */ Object.create(null); @@ -6916,7 +7189,7 @@ class gt { } //#endregion navigateValueSet(e, n, r, i, s) { - return Xe(this, void 0, void 0, function* () { + return ht(this, void 0, void 0, function* () { const a = this._getModel(e); if (!a) return null; @@ -6931,16 +7204,16 @@ class gt { if (!c) return null; const h = a.getValueInRange(c); - return $r.INSTANCE.navigateValueSet(n, l, c, h, r); + return Zr.INSTANCE.navigateValueSet(n, l, c, h, r); }); } // ---- BEGIN foreign module support -------------------------------------------------------------------------- loadForeignModule(e, n, r) { const a = { - host: wc(r, (o, l) => this._host.fhr(o, l)), + host: pc(r, (o, l) => this._host.fhr(o, l)), getMirrorModels: () => this._getModels() }; - return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(a, n), Promise.resolve(Ur(this._foreignModule))) : Promise.reject(new Error("Unexpected usage")); + return this._foreignModuleFactory ? (this._foreignModule = this._foreignModuleFactory(a, n), Promise.resolve(Hr(this._foreignModule))) : Promise.reject(new Error("Unexpected usage")); } // foreign method request fmr(e, n) { @@ -6953,27 +7226,27 @@ class gt { } } } -gt._diffLimit = 1e5; -gt._suggestionsLimit = 1e4; -typeof importScripts == "function" && (globalThis.monaco = Ch()); -let ti = !1; -function ml(t) { - if (ti) +Ft._diffLimit = 1e5; +Ft._suggestionsLimit = 1e4; +typeof importScripts == "function" && (globalThis.monaco = Fh()); +let ci = !1; +function yl(t) { + if (ci) return; - ti = !0; + ci = !0; const e = new Oc((n) => { globalThis.postMessage(n); - }, (n) => new gt(n, t)); + }, (n) => new Ft(n, t)); globalThis.onmessage = (n) => { e.onmessage(n.data); }; } globalThis.onmessage = (t) => { - ti || ml(null); + ci || yl(null); }; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0) + * Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ @@ -6981,7 +7254,7 @@ var p; (function(t) { t[t.Ident = 0] = "Ident", t[t.AtKeyword = 1] = "AtKeyword", t[t.String = 2] = "String", t[t.BadString = 3] = "BadString", t[t.UnquotedString = 4] = "UnquotedString", t[t.Hash = 5] = "Hash", t[t.Num = 6] = "Num", t[t.Percentage = 7] = "Percentage", t[t.Dimension = 8] = "Dimension", t[t.UnicodeRange = 9] = "UnicodeRange", t[t.CDO = 10] = "CDO", t[t.CDC = 11] = "CDC", t[t.Colon = 12] = "Colon", t[t.SemiColon = 13] = "SemiColon", t[t.CurlyL = 14] = "CurlyL", t[t.CurlyR = 15] = "CurlyR", t[t.ParenthesisL = 16] = "ParenthesisL", t[t.ParenthesisR = 17] = "ParenthesisR", t[t.BracketL = 18] = "BracketL", t[t.BracketR = 19] = "BracketR", t[t.Whitespace = 20] = "Whitespace", t[t.Includes = 21] = "Includes", t[t.Dashmatch = 22] = "Dashmatch", t[t.SubstringOperator = 23] = "SubstringOperator", t[t.PrefixOperator = 24] = "PrefixOperator", t[t.SuffixOperator = 25] = "SuffixOperator", t[t.Delim = 26] = "Delim", t[t.EMS = 27] = "EMS", t[t.EXS = 28] = "EXS", t[t.Length = 29] = "Length", t[t.Angle = 30] = "Angle", t[t.Time = 31] = "Time", t[t.Freq = 32] = "Freq", t[t.Exclamation = 33] = "Exclamation", t[t.Resolution = 34] = "Resolution", t[t.Comma = 35] = "Comma", t[t.Charset = 36] = "Charset", t[t.EscapedJavaScript = 37] = "EscapedJavaScript", t[t.BadEscapedJavaScript = 38] = "BadEscapedJavaScript", t[t.Comment = 39] = "Comment", t[t.SingleLineComment = 40] = "SingleLineComment", t[t.EOF = 41] = "EOF", t[t.CustomToken = 42] = "CustomToken"; })(p || (p = {})); -var wa = function() { +var Ea = function() { function t(e) { this.source = e, this.len = e.length, this.position = 0; } @@ -7017,43 +7290,43 @@ var wa = function() { this.position++; return this.position - n; }, t; -}(), An = "a".charCodeAt(0), xa = "f".charCodeAt(0), Sa = "z".charCodeAt(0), Mn = "A".charCodeAt(0), Ca = "F".charCodeAt(0), ka = "Z".charCodeAt(0), en = "0".charCodeAt(0), tn = "9".charCodeAt(0), td = "~".charCodeAt(0), nd = "^".charCodeAt(0), nn = "=".charCodeAt(0), rd = "|".charCodeAt(0), xt = "-".charCodeAt(0), _a = "_".charCodeAt(0), id = "%".charCodeAt(0), Sr = "*".charCodeAt(0), gl = "(".charCodeAt(0), bl = ")".charCodeAt(0), sd = "<".charCodeAt(0), ad = ">".charCodeAt(0), od = "@".charCodeAt(0), ld = "#".charCodeAt(0), cd = "$".charCodeAt(0), Cr = "\\".charCodeAt(0), Fa = "/".charCodeAt(0), Pt = ` -`.charCodeAt(0), It = "\r".charCodeAt(0), rn = "\f".charCodeAt(0), Ra = '"'.charCodeAt(0), Ea = "'".charCodeAt(0), kr = " ".charCodeAt(0), _r = " ".charCodeAt(0), hd = ";".charCodeAt(0), dd = ":".charCodeAt(0), ud = "{".charCodeAt(0), pd = "}".charCodeAt(0), fd = "[".charCodeAt(0), md = "]".charCodeAt(0), gd = ",".charCodeAt(0), Da = ".".charCodeAt(0), Aa = "!".charCodeAt(0), bd = "?".charCodeAt(0), vd = "+".charCodeAt(0), et = {}; -et[hd] = p.SemiColon; -et[dd] = p.Colon; -et[ud] = p.CurlyL; -et[pd] = p.CurlyR; -et[md] = p.BracketR; -et[fd] = p.BracketL; -et[gl] = p.ParenthesisL; -et[bl] = p.ParenthesisR; -et[gd] = p.Comma; -var be = {}; -be.em = p.EMS; -be.ex = p.EXS; -be.px = p.Length; -be.cm = p.Length; -be.mm = p.Length; -be.in = p.Length; -be.pt = p.Length; -be.pc = p.Length; -be.deg = p.Angle; -be.rad = p.Angle; -be.grad = p.Angle; -be.ms = p.Time; -be.s = p.Time; -be.hz = p.Freq; -be.khz = p.Freq; -be["%"] = p.Percentage; -be.fr = p.Percentage; -be.dpi = p.Resolution; -be.dpcm = p.Resolution; -var _n = function() { +}(), Tn = "a".charCodeAt(0), Da = "f".charCodeAt(0), Aa = "z".charCodeAt(0), Wn = "A".charCodeAt(0), Na = "F".charCodeAt(0), Ma = "Z".charCodeAt(0), nn = "0".charCodeAt(0), rn = "9".charCodeAt(0), pd = "~".charCodeAt(0), fd = "^".charCodeAt(0), sn = "=".charCodeAt(0), md = "|".charCodeAt(0), xt = "-".charCodeAt(0), za = "_".charCodeAt(0), gd = "%".charCodeAt(0), Ar = "*".charCodeAt(0), wl = "(".charCodeAt(0), xl = ")".charCodeAt(0), bd = "<".charCodeAt(0), vd = ">".charCodeAt(0), yd = "@".charCodeAt(0), wd = "#".charCodeAt(0), xd = "$".charCodeAt(0), Nr = "\\".charCodeAt(0), Pa = "/".charCodeAt(0), Pt = ` +`.charCodeAt(0), Lt = "\r".charCodeAt(0), an = "\f".charCodeAt(0), La = '"'.charCodeAt(0), Ia = "'".charCodeAt(0), Mr = " ".charCodeAt(0), zr = " ".charCodeAt(0), Sd = ";".charCodeAt(0), Cd = ":".charCodeAt(0), kd = "{".charCodeAt(0), _d = "}".charCodeAt(0), Rd = "[".charCodeAt(0), Fd = "]".charCodeAt(0), Ed = ",".charCodeAt(0), Ta = ".".charCodeAt(0), Wa = "!".charCodeAt(0), Dd = "?".charCodeAt(0), Ad = "+".charCodeAt(0), Ze = {}; +Ze[Sd] = p.SemiColon; +Ze[Cd] = p.Colon; +Ze[kd] = p.CurlyL; +Ze[_d] = p.CurlyR; +Ze[Fd] = p.BracketR; +Ze[Rd] = p.BracketL; +Ze[wl] = p.ParenthesisL; +Ze[xl] = p.ParenthesisR; +Ze[Ed] = p.Comma; +var ge = {}; +ge.em = p.EMS; +ge.ex = p.EXS; +ge.px = p.Length; +ge.cm = p.Length; +ge.mm = p.Length; +ge.in = p.Length; +ge.pt = p.Length; +ge.pc = p.Length; +ge.deg = p.Angle; +ge.rad = p.Angle; +ge.grad = p.Angle; +ge.ms = p.Time; +ge.s = p.Time; +ge.hz = p.Freq; +ge.khz = p.Freq; +ge["%"] = p.Percentage; +ge.fr = p.Percentage; +ge.dpi = p.Resolution; +ge.dpcm = p.Resolution; +var Nn = function() { function t() { - this.stream = new wa(""), this.ignoreComment = !0, this.ignoreWhitespace = !0, this.inURL = !1; + this.stream = new Ea(""), this.ignoreComment = !0, this.ignoreWhitespace = !0, this.inURL = !1; } return t.prototype.setSource = function(e) { - this.stream = new wa(e); + this.stream = new Ea(e); }, t.prototype.finishToken = function(e, n, r) { return { offset: e, @@ -7082,36 +7355,36 @@ var _n = function() { return this.finishToken(e, p.UnicodeRange); this.stream.goBackTo(e); }, t.prototype.scanNext = function(e) { - if (this.stream.advanceIfChars([sd, Aa, xt, xt])) + if (this.stream.advanceIfChars([bd, Wa, xt, xt])) return this.finishToken(e, p.CDO); - if (this.stream.advanceIfChars([xt, xt, ad])) + if (this.stream.advanceIfChars([xt, xt, vd])) return this.finishToken(e, p.CDC); var n = []; if (this.ident(n)) return this.finishToken(e, p.Ident, n.join("")); - if (this.stream.advanceIfChar(od)) + if (this.stream.advanceIfChar(yd)) if (n = ["@"], this._name(n)) { var r = n.join(""); return r === "@charset" ? this.finishToken(e, p.Charset, r) : this.finishToken(e, p.AtKeyword, r); } else return this.finishToken(e, p.Delim); - if (this.stream.advanceIfChar(ld)) + if (this.stream.advanceIfChar(wd)) return n = ["#"], this._name(n) ? this.finishToken(e, p.Hash, n.join("")) : this.finishToken(e, p.Delim); - if (this.stream.advanceIfChar(Aa)) + if (this.stream.advanceIfChar(Wa)) return this.finishToken(e, p.Exclamation); if (this._number()) { var i = this.stream.pos(); - if (n = [this.stream.substring(e, i)], this.stream.advanceIfChar(id)) + if (n = [this.stream.substring(e, i)], this.stream.advanceIfChar(gd)) return this.finishToken(e, p.Percentage); if (this.ident(n)) { - var s = this.stream.substring(i).toLowerCase(), a = be[s]; + var s = this.stream.substring(i).toLowerCase(), a = ge[s]; return typeof a < "u" ? this.finishToken(e, a, n.join("")) : this.finishToken(e, p.Dimension, n.join("")); } return this.finishToken(e, p.Num); } n = []; var o = this._string(n); - return o !== null ? this.finishToken(e, o, n.join("")) : (o = et[this.stream.peekChar()], typeof o < "u" ? (this.stream.advance(1), this.finishToken(e, o)) : this.stream.peekChar(0) === td && this.stream.peekChar(1) === nn ? (this.stream.advance(2), this.finishToken(e, p.Includes)) : this.stream.peekChar(0) === rd && this.stream.peekChar(1) === nn ? (this.stream.advance(2), this.finishToken(e, p.Dashmatch)) : this.stream.peekChar(0) === Sr && this.stream.peekChar(1) === nn ? (this.stream.advance(2), this.finishToken(e, p.SubstringOperator)) : this.stream.peekChar(0) === nd && this.stream.peekChar(1) === nn ? (this.stream.advance(2), this.finishToken(e, p.PrefixOperator)) : this.stream.peekChar(0) === cd && this.stream.peekChar(1) === nn ? (this.stream.advance(2), this.finishToken(e, p.SuffixOperator)) : (this.stream.nextChar(), this.finishToken(e, p.Delim))); + return o !== null ? this.finishToken(e, o, n.join("")) : (o = Ze[this.stream.peekChar()], typeof o < "u" ? (this.stream.advance(1), this.finishToken(e, o)) : this.stream.peekChar(0) === pd && this.stream.peekChar(1) === sn ? (this.stream.advance(2), this.finishToken(e, p.Includes)) : this.stream.peekChar(0) === md && this.stream.peekChar(1) === sn ? (this.stream.advance(2), this.finishToken(e, p.Dashmatch)) : this.stream.peekChar(0) === Ar && this.stream.peekChar(1) === sn ? (this.stream.advance(2), this.finishToken(e, p.SubstringOperator)) : this.stream.peekChar(0) === fd && this.stream.peekChar(1) === sn ? (this.stream.advance(2), this.finishToken(e, p.PrefixOperator)) : this.stream.peekChar(0) === xd && this.stream.peekChar(1) === sn ? (this.stream.advance(2), this.finishToken(e, p.SuffixOperator)) : (this.stream.nextChar(), this.finishToken(e, p.Delim))); }, t.prototype.trivia = function() { for (; ; ) { var e = this.stream.pos(); @@ -7125,33 +7398,33 @@ var _n = function() { return null; } }, t.prototype.comment = function() { - if (this.stream.advanceIfChars([Fa, Sr])) { + if (this.stream.advanceIfChars([Pa, Ar])) { var e = !1, n = !1; return this.stream.advanceWhileChar(function(r) { - return n && r === Fa ? (e = !0, !1) : (n = r === Sr, !0); + return n && r === Pa ? (e = !0, !1) : (n = r === Ar, !0); }), e && this.stream.advance(1), !0; } return !1; }, t.prototype._number = function() { var e = 0, n; - return this.stream.peekChar() === Da && (e = 1), n = this.stream.peekChar(e), n >= en && n <= tn ? (this.stream.advance(e + 1), this.stream.advanceWhileChar(function(r) { - return r >= en && r <= tn || e === 0 && r === Da; + return this.stream.peekChar() === Ta && (e = 1), n = this.stream.peekChar(e), n >= nn && n <= rn ? (this.stream.advance(e + 1), this.stream.advanceWhileChar(function(r) { + return r >= nn && r <= rn || e === 0 && r === Ta; }), !0) : !1; }, t.prototype._newline = function(e) { var n = this.stream.peekChar(); switch (n) { - case It: - case rn: + case Lt: + case an: case Pt: - return this.stream.advance(1), e.push(String.fromCharCode(n)), n === It && this.stream.advanceIfChar(Pt) && e.push(` + return this.stream.advance(1), e.push(String.fromCharCode(n)), n === Lt && this.stream.advanceIfChar(Pt) && e.push(` `), !0; } return !1; }, t.prototype._escape = function(e, n) { var r = this.stream.peekChar(); - if (r === Cr) { + if (r === Nr) { this.stream.advance(1), r = this.stream.peekChar(); - for (var i = 0; i < 6 && (r >= en && r <= tn || r >= An && r <= xa || r >= Mn && r <= Ca); ) + for (var i = 0; i < 6 && (r >= nn && r <= rn || r >= Tn && r <= Da || r >= Wn && r <= Na); ) this.stream.advance(1), r = this.stream.peekChar(), i++; if (i > 0) { try { @@ -7159,9 +7432,9 @@ var _n = function() { s && e.push(String.fromCharCode(s)); } catch { } - return r === kr || r === _r ? this.stream.advance(1) : this._newline([]), !0; + return r === Mr || r === zr ? this.stream.advance(1) : this._newline([]), !0; } - if (r !== It && r !== rn && r !== Pt) + if (r !== Lt && r !== an && r !== Pt) return this.stream.advance(1), e.push(String.fromCharCode(r)), !0; if (n) return this._newline(e); @@ -7169,9 +7442,9 @@ var _n = function() { return !1; }, t.prototype._stringChar = function(e, n) { var r = this.stream.peekChar(); - return r !== 0 && r !== e && r !== Cr && r !== It && r !== rn && r !== Pt ? (this.stream.advance(1), n.push(String.fromCharCode(r)), !0) : !1; + return r !== 0 && r !== e && r !== Nr && r !== Lt && r !== an && r !== Pt ? (this.stream.advance(1), n.push(String.fromCharCode(r)), !0) : !1; }, t.prototype._string = function(e) { - if (this.stream.peekChar() === Ea || this.stream.peekChar() === Ra) { + if (this.stream.peekChar() === Ia || this.stream.peekChar() === La) { var n = this.stream.nextChar(); for (e.push(String.fromCharCode(n)); this._stringChar(n, e) || this._escape(e, !0); ) ; @@ -7180,14 +7453,14 @@ var _n = function() { return null; }, t.prototype._unquotedChar = function(e) { var n = this.stream.peekChar(); - return n !== 0 && n !== Cr && n !== Ea && n !== Ra && n !== gl && n !== bl && n !== kr && n !== _r && n !== Pt && n !== rn && n !== It ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; + return n !== 0 && n !== Nr && n !== Ia && n !== La && n !== wl && n !== xl && n !== Mr && n !== zr && n !== Pt && n !== an && n !== Lt ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; }, t.prototype._unquotedString = function(e) { for (var n = !1; this._unquotedChar(e) || this._escape(e); ) n = !0; return n; }, t.prototype._whitespace = function() { var e = this.stream.advanceWhileChar(function(n) { - return n === kr || n === _r || n === Pt || n === rn || n === It; + return n === Mr || n === zr || n === Pt || n === an || n === Lt; }); return e > 0; }, t.prototype._name = function(e) { @@ -7210,19 +7483,19 @@ var _n = function() { return this.stream.goBackTo(n), !1; }, t.prototype._identFirstChar = function(e) { var n = this.stream.peekChar(); - return n === _a || n >= An && n <= Sa || n >= Mn && n <= ka || n >= 128 && n <= 65535 ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; + return n === za || n >= Tn && n <= Aa || n >= Wn && n <= Ma || n >= 128 && n <= 65535 ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; }, t.prototype._minus = function(e) { var n = this.stream.peekChar(); return n === xt ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; }, t.prototype._identChar = function(e) { var n = this.stream.peekChar(); - return n === _a || n === xt || n >= An && n <= Sa || n >= Mn && n <= ka || n >= en && n <= tn || n >= 128 && n <= 65535 ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; + return n === za || n === xt || n >= Tn && n <= Aa || n >= Wn && n <= Ma || n >= nn && n <= rn || n >= 128 && n <= 65535 ? (this.stream.advance(1), e.push(String.fromCharCode(n)), !0) : !1; }, t.prototype._unicodeRange = function() { - if (this.stream.advanceIfChar(vd)) { + if (this.stream.advanceIfChar(Ad)) { var e = function(i) { - return i >= en && i <= tn || i >= An && i <= xa || i >= Mn && i <= Ca; + return i >= nn && i <= rn || i >= Tn && i <= Da || i >= Wn && i <= Na; }, n = this.stream.advanceWhileChar(e) + this.stream.advanceWhileChar(function(i) { - return i === bd; + return i === Dd; }); if (n >= 1 && n <= 6) if (this.stream.advanceIfChar(xt)) { @@ -7243,11 +7516,11 @@ function fe(t, e) { return !1; return !0; } -function vl(t, e) { +function Sl(t, e) { var n = t.length - e.length; return n > 0 ? t.lastIndexOf(e) === n : n === 0 ? t === e : !1; } -function yd(t, e, n) { +function Nd(t, e, n) { n === void 0 && (n = 4); var r = Math.abs(t.length - e.length); if (r > n) @@ -7262,19 +7535,19 @@ function yd(t, e, n) { t[a - 1] === e[o - 1] ? i[a][o] = i[a - 1][o - 1] + 1 : i[a][o] = Math.max(i[a - 1][o], i[a][o - 1]); return i[t.length][e.length] - Math.sqrt(r); } -function Ma(t, e) { +function Oa(t, e) { return e === void 0 && (e = !0), t ? t.length < 140 ? t : t.slice(0, 140) + (e ? "…" : "") : ""; } -function wd(t, e) { +function Md(t, e) { var n = e.exec(t); return n && n[0].length ? t.substr(0, t.length - n[0].length) : t; } -function Na(t, e) { +function Ua(t, e) { for (var n = ""; e > 0; ) (e & 1) === 1 && (n += t), t += t, e = e >>> 1; return n; } -var T = function() { +var U = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -7296,26 +7569,26 @@ var T = function() { (function(t) { t[t.Undefined = 0] = "Undefined", t[t.Identifier = 1] = "Identifier", t[t.Stylesheet = 2] = "Stylesheet", t[t.Ruleset = 3] = "Ruleset", t[t.Selector = 4] = "Selector", t[t.SimpleSelector = 5] = "SimpleSelector", t[t.SelectorInterpolation = 6] = "SelectorInterpolation", t[t.SelectorCombinator = 7] = "SelectorCombinator", t[t.SelectorCombinatorParent = 8] = "SelectorCombinatorParent", t[t.SelectorCombinatorSibling = 9] = "SelectorCombinatorSibling", t[t.SelectorCombinatorAllSiblings = 10] = "SelectorCombinatorAllSiblings", t[t.SelectorCombinatorShadowPiercingDescendant = 11] = "SelectorCombinatorShadowPiercingDescendant", t[t.Page = 12] = "Page", t[t.PageBoxMarginBox = 13] = "PageBoxMarginBox", t[t.ClassSelector = 14] = "ClassSelector", t[t.IdentifierSelector = 15] = "IdentifierSelector", t[t.ElementNameSelector = 16] = "ElementNameSelector", t[t.PseudoSelector = 17] = "PseudoSelector", t[t.AttributeSelector = 18] = "AttributeSelector", t[t.Declaration = 19] = "Declaration", t[t.Declarations = 20] = "Declarations", t[t.Property = 21] = "Property", t[t.Expression = 22] = "Expression", t[t.BinaryExpression = 23] = "BinaryExpression", t[t.Term = 24] = "Term", t[t.Operator = 25] = "Operator", t[t.Value = 26] = "Value", t[t.StringLiteral = 27] = "StringLiteral", t[t.URILiteral = 28] = "URILiteral", t[t.EscapedValue = 29] = "EscapedValue", t[t.Function = 30] = "Function", t[t.NumericValue = 31] = "NumericValue", t[t.HexColorValue = 32] = "HexColorValue", t[t.RatioValue = 33] = "RatioValue", t[t.MixinDeclaration = 34] = "MixinDeclaration", t[t.MixinReference = 35] = "MixinReference", t[t.VariableName = 36] = "VariableName", t[t.VariableDeclaration = 37] = "VariableDeclaration", t[t.Prio = 38] = "Prio", t[t.Interpolation = 39] = "Interpolation", t[t.NestedProperties = 40] = "NestedProperties", t[t.ExtendsReference = 41] = "ExtendsReference", t[t.SelectorPlaceholder = 42] = "SelectorPlaceholder", t[t.Debug = 43] = "Debug", t[t.If = 44] = "If", t[t.Else = 45] = "Else", t[t.For = 46] = "For", t[t.Each = 47] = "Each", t[t.While = 48] = "While", t[t.MixinContentReference = 49] = "MixinContentReference", t[t.MixinContentDeclaration = 50] = "MixinContentDeclaration", t[t.Media = 51] = "Media", t[t.Keyframe = 52] = "Keyframe", t[t.FontFace = 53] = "FontFace", t[t.Import = 54] = "Import", t[t.Namespace = 55] = "Namespace", t[t.Invocation = 56] = "Invocation", t[t.FunctionDeclaration = 57] = "FunctionDeclaration", t[t.ReturnStatement = 58] = "ReturnStatement", t[t.MediaQuery = 59] = "MediaQuery", t[t.MediaCondition = 60] = "MediaCondition", t[t.MediaFeature = 61] = "MediaFeature", t[t.FunctionParameter = 62] = "FunctionParameter", t[t.FunctionArgument = 63] = "FunctionArgument", t[t.KeyframeSelector = 64] = "KeyframeSelector", t[t.ViewPort = 65] = "ViewPort", t[t.Document = 66] = "Document", t[t.AtApplyRule = 67] = "AtApplyRule", t[t.CustomPropertyDeclaration = 68] = "CustomPropertyDeclaration", t[t.CustomPropertySet = 69] = "CustomPropertySet", t[t.ListEntry = 70] = "ListEntry", t[t.Supports = 71] = "Supports", t[t.SupportsCondition = 72] = "SupportsCondition", t[t.NamespacePrefix = 73] = "NamespacePrefix", t[t.GridLine = 74] = "GridLine", t[t.Plugin = 75] = "Plugin", t[t.UnknownAtRule = 76] = "UnknownAtRule", t[t.Use = 77] = "Use", t[t.ModuleConfiguration = 78] = "ModuleConfiguration", t[t.Forward = 79] = "Forward", t[t.ForwardVisibility = 80] = "ForwardVisibility", t[t.Module = 81] = "Module", t[t.UnicodeRange = 82] = "UnicodeRange"; })(v || (v = {})); -var Y; +var Q; (function(t) { t[t.Mixin = 0] = "Mixin", t[t.Rule = 1] = "Rule", t[t.Variable = 2] = "Variable", t[t.Function = 3] = "Function", t[t.Keyframe = 4] = "Keyframe", t[t.Unknown = 5] = "Unknown", t[t.Module = 6] = "Module", t[t.Forward = 7] = "Forward", t[t.ForwardVisibility = 8] = "ForwardVisibility"; -})(Y || (Y = {})); -function ni(t, e) { +})(Q || (Q = {})); +function hi(t, e) { var n = null; return !t || e < t.offset || e > t.end ? null : (t.accept(function(r) { return r.offset === -1 && r.length === -1 ? !0 : r.offset <= e && r.end >= e ? (n ? r.length <= n.length && (n = r) : n = r, !0) : !1; }), n); } -function Di(t, e) { - for (var n = ni(t, e), r = []; n; ) +function Wi(t, e) { + for (var n = hi(t, e), r = []; n; ) r.unshift(n), n = n.parent; return r; } -function xd(t) { +function zd(t) { var e = t.findParent(v.Declaration), n = e && e.getValue(); return n && n.encloses(t) ? e : null; } -var W = function() { +var V = function() { function t(e, n, r) { e === void 0 && (e = -1), n === void 0 && (n = -1), this.parent = null, this.offset = e, this.length = n, r && (this.nodeType = r); } @@ -7431,15 +7704,15 @@ var W = function() { return !this.options || !this.options.hasOwnProperty(e) ? null : this.options[e]; }, t; }(), Ce = function(t) { - T(e, t); + U(e, t); function e(n, r) { r === void 0 && (r = -1); var i = t.call(this, -1, -1) || this; return i.attachTo(n, r), i.offset = -1, i.length = -1, i; } return e; -}(W), Sd = function(t) { - T(e, t); +}(V), Pd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7458,8 +7731,8 @@ var W = function() { }, e.prototype.getRangeEnd = function() { return this.rangeEnd; }, e; -}(W), Oe = function(t) { - T(e, t); +}(V), Ue = function(t) { + U(e, t); function e(n, r) { var i = t.call(this, n, r) || this; return i.isCustomProperty = !1, i; @@ -7473,8 +7746,8 @@ var W = function() { }), e.prototype.containsInterpolation = function() { return this.hasChildren(); }, e; -}(W), Cd = function(t) { - T(e, t); +}(V), Ld = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7485,8 +7758,8 @@ var W = function() { enumerable: !1, configurable: !0 }), e; -}(W), Ai = function(t) { - T(e, t); +}(V), Oi = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7497,8 +7770,8 @@ var W = function() { enumerable: !1, configurable: !0 }), e; -}(W), ae = function(t) { - T(e, t); +}(V), ce = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7507,8 +7780,8 @@ var W = function() { }, e.prototype.setDeclarations = function(n) { return this.setNode("declarations", n); }, e; -}(W), Bt = function(t) { - T(e, t); +}(V), jt = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7523,8 +7796,8 @@ var W = function() { }, e.prototype.isNested = function() { return !!this.parent && this.parent.findParent(v.Declarations) !== null; }, e; -}(ae), Fn = function(t) { - T(e, t); +}(ce), Mn = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7535,8 +7808,8 @@ var W = function() { enumerable: !1, configurable: !0 }), e; -}(W), jt = function(t) { - T(e, t); +}(V), qt = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7547,9 +7820,9 @@ var W = function() { enumerable: !1, configurable: !0 }), e; -}(W); +}(V); (function(t) { - T(e, t); + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7566,15 +7839,15 @@ var W = function() { }, e.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, e; -})(W); -var Mi = function(t) { - T(e, t); +})(V); +var Ui = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } return e; -}(W), kd = function(t) { - T(e, t); +}(V), Id = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7585,8 +7858,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Ze = function(t) { - T(e, t); +}(ce), Qe = function(t) { + U(e, t); function e(n, r) { var i = t.call(this, n, r) || this; return i.property = null, i; @@ -7603,7 +7876,7 @@ var Mi = function(t) { return this.property; }, e.prototype.getFullPropertyName = function() { var n = this.property ? this.property.getName() : "unknown"; - if (this.parent instanceof Ai && this.parent.getParent() instanceof wl) { + if (this.parent instanceof Oi && this.parent.getParent() instanceof kl) { var r = this.parent.getParent().getParent(); if (r instanceof e) return r.getFullPropertyName() + n; @@ -7626,8 +7899,8 @@ var Mi = function(t) { }, e.prototype.getNestedProperties = function() { return this.nestedProperties; }, e; -}(Mi), _d = function(t) { - T(e, t); +}(Ui), Td = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7642,8 +7915,8 @@ var Mi = function(t) { }, e.prototype.getPropertySet = function() { return this.propertySet; }, e; -}(Ze), Ni = function(t) { - T(e, t); +}(Qe), Vi = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7658,12 +7931,12 @@ var Mi = function(t) { }, e.prototype.getIdentifier = function() { return this.identifier; }, e.prototype.getName = function() { - return wd(this.getText(), /[_\+]+$/); + return Md(this.getText(), /[_\+]+$/); }, e.prototype.isCustomProperty = function() { return !!this.identifier && this.identifier.isCustomProperty; }, e; -}(W), Fd = function(t) { - T(e, t); +}(V), Wd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7676,8 +7949,8 @@ var Mi = function(t) { }), e.prototype.getArguments = function() { return this.arguments || (this.arguments = new Ce(this)), this.arguments; }, e; -}(W), Rn = function(t) { - T(e, t); +}(V), zn = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7694,8 +7967,8 @@ var Mi = function(t) { }, e.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, e; -}(Fd), pr = function(t) { - T(e, t); +}(Wd), vr = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7716,8 +7989,8 @@ var Mi = function(t) { }, e.prototype.getDefaultValue = function() { return this.defaultValue; }, e; -}(W), Gt = function(t) { - T(e, t); +}(V), Xt = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7738,8 +8011,8 @@ var Mi = function(t) { }, e.prototype.getValue = function() { return this.value; }, e; -}(W), Rd = function(t) { - T(e, t); +}(V), Od = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7754,8 +8027,8 @@ var Mi = function(t) { }, e.prototype.setElseClause = function(n) { return this.setNode("elseClause", n); }, e; -}(ae), Ed = function(t) { - T(e, t); +}(ce), Ud = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7768,8 +8041,8 @@ var Mi = function(t) { }), e.prototype.setVariable = function(n) { return this.setNode("variable", n, 0); }, e; -}(ae), Dd = function(t) { - T(e, t); +}(ce), Vd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7782,8 +8055,8 @@ var Mi = function(t) { }), e.prototype.getVariables = function() { return this.variables || (this.variables = new Ce(this)), this.variables; }, e; -}(ae), Ad = function(t) { - T(e, t); +}(ce), Bd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7794,8 +8067,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Md = function(t) { - T(e, t); +}(ce), jd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7806,8 +8079,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Qn = function(t) { - T(e, t); +}(ce), ir = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7826,8 +8099,8 @@ var Mi = function(t) { }, e.prototype.getParameters = function() { return this.parameters || (this.parameters = new Ce(this)), this.parameters; }, e; -}(ae), Nd = function(t) { - T(e, t); +}(ce), qd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7838,8 +8111,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), yl = function(t) { - T(e, t); +}(ce), Cl = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7850,8 +8123,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), wl = function(t) { - T(e, t); +}(ce), kl = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7862,8 +8135,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), xl = function(t) { - T(e, t); +}(ce), _l = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7884,8 +8157,8 @@ var Mi = function(t) { }, e.prototype.getName = function() { return this.identifier ? this.identifier.getText() : ""; }, e; -}(ae), za = function(t) { - T(e, t); +}(ce), Va = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7896,8 +8169,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), zi = function(t) { - T(e, t); +}(ce), Bi = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7910,8 +8183,8 @@ var Mi = function(t) { }), e.prototype.setMedialist = function(n) { return n ? (n.attachTo(this), !0) : !1; }, e; -}(W), zd = function(t) { - T(e, t); +}(V), $d = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -7928,8 +8201,8 @@ var Mi = function(t) { }, e.prototype.getIdentifier = function() { return this.identifier; }, e; -}(W), Pd = function(t) { - T(e, t); +}(V), Hd = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -7950,8 +8223,8 @@ var Mi = function(t) { }, e.prototype.getValue = function() { return this.value; }, e; -}(W), Id = function(t) { - T(e, t); +}(V), Gd = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -7970,8 +8243,8 @@ var Mi = function(t) { }, e.prototype.getParameters = function() { return this.parameters || (this.parameters = new Ce(this)), this.parameters; }, e; -}(W), Ld = function(t) { - T(e, t); +}(V), Jd = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -7986,8 +8259,8 @@ var Mi = function(t) { }, e.prototype.getIdentifier = function() { return this.identifier; }, e; -}(W), Td = function(t) { - T(e, t); +}(V), Xd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -7998,8 +8271,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Sl = function(t) { - T(e, t); +}(V), Rl = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8010,8 +8283,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), ri = function(t) { - T(e, t); +}(ce), di = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8022,8 +8295,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Wd = function(t) { - T(e, t); +}(ce), Yd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8034,16 +8307,16 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Cl = function(t) { - T(e, t); +}(ce), Fl = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } return e.prototype.getMediums = function() { return this.mediums || (this.mediums = new Ce(this)), this.mediums; }, e; -}(W), kl = function(t) { - T(e, t); +}(V), El = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8054,8 +8327,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Od = function(t) { - T(e, t); +}(V), Kd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8066,8 +8339,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Ud = function(t) { - T(e, t); +}(V), Qd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8078,8 +8351,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), un = function(t) { - T(e, t); +}(V), fn = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8090,8 +8363,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Vd = function(t) { - T(e, t); +}(V), Zd = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8102,8 +8375,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), Bd = function(t) { - T(e, t); +}(ce), eu = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8114,8 +8387,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(ae), _l = function(t) { - T(e, t); +}(ce), Dl = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8126,8 +8399,8 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Pi = function(t) { - T(e, t); +}(V), ji = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8150,8 +8423,8 @@ var Mi = function(t) { }, e.prototype.getOperator = function() { return this.operator; }, e; -}(W), jd = function(t) { - T(e, t); +}(V), tu = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8170,8 +8443,8 @@ var Mi = function(t) { }, e.prototype.getExpression = function() { return this.expression; }, e; -}(W), qd = function(t) { - T(e, t); +}(V), nu = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8198,9 +8471,9 @@ var Mi = function(t) { }, e.prototype.getValue = function() { return this.value; }, e; -}(W); +}(V); (function(t) { - T(e, t); + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8211,9 +8484,9 @@ var Mi = function(t) { enumerable: !1, configurable: !0 }), e; -})(W); -var Ii = function(t) { - T(e, t); +})(V); +var qi = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8224,8 +8497,8 @@ var Ii = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), $d = function(t) { - T(e, t); +}(V), ru = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8236,8 +8509,8 @@ var Ii = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Hd = ".".charCodeAt(0), Gd = "0".charCodeAt(0), Jd = "9".charCodeAt(0), Li = function(t) { - T(e, t); +}(V), iu = ".".charCodeAt(0), su = "0".charCodeAt(0), au = "9".charCodeAt(0), $i = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8248,15 +8521,15 @@ var Ii = function(t) { enumerable: !1, configurable: !0 }), e.prototype.getValue = function() { - for (var n = this.getText(), r = 0, i, s = 0, a = n.length; s < a && (i = n.charCodeAt(s), Gd <= i && i <= Jd || i === Hd); s++) + for (var n = this.getText(), r = 0, i, s = 0, a = n.length; s < a && (i = n.charCodeAt(s), su <= i && i <= au || i === iu); s++) r += 1; return { value: n.substring(0, r), unit: r < n.length ? n.substring(r) : void 0 }; }, e; -}(W), fr = function(t) { - T(e, t); +}(V), yr = function(t) { + U(e, t); function e(n, r) { var i = t.call(this, n, r) || this; return i.variable = null, i.value = null, i.needsSemicolon = !0, i; @@ -8278,8 +8551,8 @@ var Ii = function(t) { }, e.prototype.getValue = function() { return this.value; }, e; -}(Mi), ii = function(t) { - T(e, t); +}(Ui), ui = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8290,8 +8563,8 @@ var Ii = function(t) { enumerable: !1, configurable: !0 }), e; -}(W), Ti = function(t) { - T(e, t); +}(V), Hi = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8304,8 +8577,8 @@ var Ii = function(t) { }), e.prototype.getName = function() { return this.getText(); }, e; -}(W), mn = function(t) { - T(e, t); +}(V), xn = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8318,8 +8591,8 @@ var Ii = function(t) { }), e.prototype.getSelectors = function() { return this.selectors || (this.selectors = new Ce(this)), this.selectors; }, e; -}(W), Xd = function(t) { - T(e, t); +}(V), ou = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8332,8 +8605,8 @@ var Ii = function(t) { }), e.prototype.getArguments = function() { return this.arguments || (this.arguments = new Ce(this)), this.arguments; }, e; -}(W), Yd = function(t) { - T(e, t); +}(V), lu = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8346,8 +8619,8 @@ var Ii = function(t) { }), e.prototype.getParameters = function() { return this.parameters || (this.parameters = new Ce(this)), this.parameters; }, e; -}(ae), Zn = function(t) { - T(e, t); +}(ce), sr = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8372,8 +8645,8 @@ var Ii = function(t) { }, e.prototype.getContent = function() { return this.content; }, e; -}(W), gn = function(t) { - T(e, t); +}(V), Sn = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8394,8 +8667,8 @@ var Ii = function(t) { }, e.prototype.setGuard = function(n) { return n && (n.attachTo(this), this.guard = n), !1; }, e; -}(ae), Fl = function(t) { - T(e, t); +}(ce), Al = function(t) { + U(e, t); function e(n, r) { return t.call(this, n, r) || this; } @@ -8410,8 +8683,8 @@ var Ii = function(t) { }, e.prototype.getAtRuleName = function() { return this.atRuleName; }, e; -}(ae), Kd = function(t) { - T(e, t); +}(ce), cu = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -8426,24 +8699,24 @@ var Ii = function(t) { }, e.prototype.setValue = function(n) { return this.setNode("value", n, 1); }, e; -}(W), Qd = function(t) { - T(e, t); +}(V), hu = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } return e.prototype.getConditions = function() { return this.conditions || (this.conditions = new Ce(this)), this.conditions; }, e; -}(W), Zd = function(t) { - T(e, t); +}(V), du = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } return e.prototype.setVariable = function(n) { return this.setNode("variable", n); }, e; -}(W), Pa = function(t) { - T(e, t); +}(V), Ba = function(t) { + U(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } @@ -8458,11 +8731,11 @@ var Ii = function(t) { }, e.prototype.getIdentifier = function() { return this.identifier; }, e; -}(W), Pe; +}(V), Pe; (function(t) { t[t.Ignore = 1] = "Ignore", t[t.Warning = 2] = "Warning", t[t.Error = 4] = "Error"; })(Pe || (Pe = {})); -var Rl = function() { +var Nl = function() { function t(e, n, r, i, s, a) { s === void 0 && (s = e.offset), a === void 0 && (a = e.length), this.node = e, this.rule = n, this.level = r, this.message = i || n.message, this.offset = s, this.length = a; } @@ -8479,7 +8752,7 @@ var Rl = function() { }, t.prototype.getMessage = function() { return this.message; }, t; -}(), eu = function() { +}(), uu = function() { function t() { this.entries = []; } @@ -8490,70 +8763,70 @@ var Rl = function() { return e.isErroneous() && e.collectIssues(this.entries), !0; }, t; }(); -function tu(t, e) { +function pu(t, e) { let n; return e.length === 0 ? n = t : n = t.replace(/\{(\d+)\}/g, (r, i) => { let s = i[0]; return typeof e[s] < "u" ? e[s] : r; }), n; } -function nu(t, e, ...n) { - return tu(e, n); +function fu(t, e, ...n) { + return pu(e, n); } -function Je(t) { - return nu; +function Ge(t) { + return fu; } -var Q = Je(), Z = function() { +var te = Ge(), ne = function() { function t(e, n) { this.id = e, this.message = n; } return t; -}(), S = { - NumberExpected: new Z("css-numberexpected", Q("expected.number", "number expected")), - ConditionExpected: new Z("css-conditionexpected", Q("expected.condt", "condition expected")), - RuleOrSelectorExpected: new Z("css-ruleorselectorexpected", Q("expected.ruleorselector", "at-rule or selector expected")), - DotExpected: new Z("css-dotexpected", Q("expected.dot", "dot expected")), - ColonExpected: new Z("css-colonexpected", Q("expected.colon", "colon expected")), - SemiColonExpected: new Z("css-semicolonexpected", Q("expected.semicolon", "semi-colon expected")), - TermExpected: new Z("css-termexpected", Q("expected.term", "term expected")), - ExpressionExpected: new Z("css-expressionexpected", Q("expected.expression", "expression expected")), - OperatorExpected: new Z("css-operatorexpected", Q("expected.operator", "operator expected")), - IdentifierExpected: new Z("css-identifierexpected", Q("expected.ident", "identifier expected")), - PercentageExpected: new Z("css-percentageexpected", Q("expected.percentage", "percentage expected")), - URIOrStringExpected: new Z("css-uriorstringexpected", Q("expected.uriorstring", "uri or string expected")), - URIExpected: new Z("css-uriexpected", Q("expected.uri", "URI expected")), - VariableNameExpected: new Z("css-varnameexpected", Q("expected.varname", "variable name expected")), - VariableValueExpected: new Z("css-varvalueexpected", Q("expected.varvalue", "variable value expected")), - PropertyValueExpected: new Z("css-propertyvalueexpected", Q("expected.propvalue", "property value expected")), - LeftCurlyExpected: new Z("css-lcurlyexpected", Q("expected.lcurly", "{ expected")), - RightCurlyExpected: new Z("css-rcurlyexpected", Q("expected.rcurly", "} expected")), - LeftSquareBracketExpected: new Z("css-rbracketexpected", Q("expected.lsquare", "[ expected")), - RightSquareBracketExpected: new Z("css-lbracketexpected", Q("expected.rsquare", "] expected")), - LeftParenthesisExpected: new Z("css-lparentexpected", Q("expected.lparen", "( expected")), - RightParenthesisExpected: new Z("css-rparentexpected", Q("expected.rparent", ") expected")), - CommaExpected: new Z("css-commaexpected", Q("expected.comma", "comma expected")), - PageDirectiveOrDeclarationExpected: new Z("css-pagedirordeclexpected", Q("expected.pagedirordecl", "page directive or declaraton expected")), - UnknownAtRule: new Z("css-unknownatrule", Q("unknown.atrule", "at-rule unknown")), - UnknownKeyword: new Z("css-unknownkeyword", Q("unknown.keyword", "unknown keyword")), - SelectorExpected: new Z("css-selectorexpected", Q("expected.selector", "selector expected")), - StringLiteralExpected: new Z("css-stringliteralexpected", Q("expected.stringliteral", "string literal expected")), - WhitespaceExpected: new Z("css-whitespaceexpected", Q("expected.whitespace", "whitespace expected")), - MediaQueryExpected: new Z("css-mediaqueryexpected", Q("expected.mediaquery", "media query expected")), - IdentifierOrWildcardExpected: new Z("css-idorwildcardexpected", Q("expected.idorwildcard", "identifier or wildcard expected")), - WildcardExpected: new Z("css-wildcardexpected", Q("expected.wildcard", "wildcard expected")), - IdentifierOrVariableExpected: new Z("css-idorvarexpected", Q("expected.idorvar", "identifier or variable expected")) -}, Ia; +}(), C = { + NumberExpected: new ne("css-numberexpected", te("expected.number", "number expected")), + ConditionExpected: new ne("css-conditionexpected", te("expected.condt", "condition expected")), + RuleOrSelectorExpected: new ne("css-ruleorselectorexpected", te("expected.ruleorselector", "at-rule or selector expected")), + DotExpected: new ne("css-dotexpected", te("expected.dot", "dot expected")), + ColonExpected: new ne("css-colonexpected", te("expected.colon", "colon expected")), + SemiColonExpected: new ne("css-semicolonexpected", te("expected.semicolon", "semi-colon expected")), + TermExpected: new ne("css-termexpected", te("expected.term", "term expected")), + ExpressionExpected: new ne("css-expressionexpected", te("expected.expression", "expression expected")), + OperatorExpected: new ne("css-operatorexpected", te("expected.operator", "operator expected")), + IdentifierExpected: new ne("css-identifierexpected", te("expected.ident", "identifier expected")), + PercentageExpected: new ne("css-percentageexpected", te("expected.percentage", "percentage expected")), + URIOrStringExpected: new ne("css-uriorstringexpected", te("expected.uriorstring", "uri or string expected")), + URIExpected: new ne("css-uriexpected", te("expected.uri", "URI expected")), + VariableNameExpected: new ne("css-varnameexpected", te("expected.varname", "variable name expected")), + VariableValueExpected: new ne("css-varvalueexpected", te("expected.varvalue", "variable value expected")), + PropertyValueExpected: new ne("css-propertyvalueexpected", te("expected.propvalue", "property value expected")), + LeftCurlyExpected: new ne("css-lcurlyexpected", te("expected.lcurly", "{ expected")), + RightCurlyExpected: new ne("css-rcurlyexpected", te("expected.rcurly", "} expected")), + LeftSquareBracketExpected: new ne("css-rbracketexpected", te("expected.lsquare", "[ expected")), + RightSquareBracketExpected: new ne("css-lbracketexpected", te("expected.rsquare", "] expected")), + LeftParenthesisExpected: new ne("css-lparentexpected", te("expected.lparen", "( expected")), + RightParenthesisExpected: new ne("css-rparentexpected", te("expected.rparent", ") expected")), + CommaExpected: new ne("css-commaexpected", te("expected.comma", "comma expected")), + PageDirectiveOrDeclarationExpected: new ne("css-pagedirordeclexpected", te("expected.pagedirordecl", "page directive or declaraton expected")), + UnknownAtRule: new ne("css-unknownatrule", te("unknown.atrule", "at-rule unknown")), + UnknownKeyword: new ne("css-unknownkeyword", te("unknown.keyword", "unknown keyword")), + SelectorExpected: new ne("css-selectorexpected", te("expected.selector", "selector expected")), + StringLiteralExpected: new ne("css-stringliteralexpected", te("expected.stringliteral", "string literal expected")), + WhitespaceExpected: new ne("css-whitespaceexpected", te("expected.whitespace", "whitespace expected")), + MediaQueryExpected: new ne("css-mediaqueryexpected", te("expected.mediaquery", "media query expected")), + IdentifierOrWildcardExpected: new ne("css-idorwildcardexpected", te("expected.idorwildcard", "identifier or wildcard expected")), + WildcardExpected: new ne("css-wildcardexpected", te("expected.wildcard", "wildcard expected")), + IdentifierOrVariableExpected: new ne("css-idorvarexpected", te("expected.idorvar", "identifier or variable expected")) +}, ja; (function(t) { t.MIN_VALUE = -2147483648, t.MAX_VALUE = 2147483647; -})(Ia || (Ia = {})); -var er; +})(ja || (ja = {})); +var ar; (function(t) { t.MIN_VALUE = 0, t.MAX_VALUE = 2147483647; -})(er || (er = {})); -var Fe; +})(ar || (ar = {})); +var _e; (function(t) { function e(r, i) { - return r === Number.MAX_VALUE && (r = er.MAX_VALUE), i === Number.MAX_VALUE && (i = er.MAX_VALUE), { line: r, character: i }; + return r === Number.MAX_VALUE && (r = ar.MAX_VALUE), i === Number.MAX_VALUE && (i = ar.MAX_VALUE), { line: r, character: i }; } t.create = e; function n(r) { @@ -8561,24 +8834,24 @@ var Fe; return _.objectLiteral(i) && _.uinteger(i.line) && _.uinteger(i.character); } t.is = n; -})(Fe || (Fe = {})); -var te; +})(_e || (_e = {})); +var ie; (function(t) { function e(r, i, s, a) { if (_.uinteger(r) && _.uinteger(i) && _.uinteger(s) && _.uinteger(a)) - return { start: Fe.create(r, i), end: Fe.create(s, a) }; - if (Fe.is(r) && Fe.is(i)) + return { start: _e.create(r, i), end: _e.create(s, a) }; + if (_e.is(r) && _e.is(i)) return { start: r, end: i }; throw new Error("Range#create called with invalid arguments[" + r + ", " + i + ", " + s + ", " + a + "]"); } t.create = e; function n(r) { var i = r; - return _.objectLiteral(i) && Fe.is(i.start) && Fe.is(i.end); + return _.objectLiteral(i) && _e.is(i.start) && _e.is(i.end); } t.is = n; -})(te || (te = {})); -var bn; +})(ie || (ie = {})); +var Cn; (function(t) { function e(r, i) { return { uri: r, range: i }; @@ -8586,11 +8859,11 @@ var bn; t.create = e; function n(r) { var i = r; - return _.defined(i) && te.is(i.range) && (_.string(i.uri) || _.undefined(i.uri)); + return _.defined(i) && ie.is(i.range) && (_.string(i.uri) || _.undefined(i.uri)); } t.is = n; -})(bn || (bn = {})); -var La; +})(Cn || (Cn = {})); +var qa; (function(t) { function e(r, i, s, a) { return { targetUri: r, targetRange: i, targetSelectionRange: s, originSelectionRange: a }; @@ -8598,11 +8871,11 @@ var La; t.create = e; function n(r) { var i = r; - return _.defined(i) && te.is(i.targetRange) && _.string(i.targetUri) && (te.is(i.targetSelectionRange) || _.undefined(i.targetSelectionRange)) && (te.is(i.originSelectionRange) || _.undefined(i.originSelectionRange)); + return _.defined(i) && ie.is(i.targetRange) && _.string(i.targetUri) && (ie.is(i.targetSelectionRange) || _.undefined(i.targetSelectionRange)) && (ie.is(i.originSelectionRange) || _.undefined(i.originSelectionRange)); } t.is = n; -})(La || (La = {})); -var si; +})(qa || (qa = {})); +var pi; (function(t) { function e(r, i, s, a) { return { @@ -8618,8 +8891,8 @@ var si; return _.numberRange(i.red, 0, 1) && _.numberRange(i.green, 0, 1) && _.numberRange(i.blue, 0, 1) && _.numberRange(i.alpha, 0, 1); } t.is = n; -})(si || (si = {})); -var Ta; +})(pi || (pi = {})); +var $a; (function(t) { function e(r, i) { return { @@ -8630,11 +8903,11 @@ var Ta; t.create = e; function n(r) { var i = r; - return te.is(i.range) && si.is(i.color); + return ie.is(i.range) && pi.is(i.color); } t.is = n; -})(Ta || (Ta = {})); -var Wa; +})($a || ($a = {})); +var Ha; (function(t) { function e(r, i, s) { return { @@ -8646,15 +8919,15 @@ var Wa; t.create = e; function n(r) { var i = r; - return _.string(i.label) && (_.undefined(i.textEdit) || $.is(i)) && (_.undefined(i.additionalTextEdits) || _.typedArray(i.additionalTextEdits, $.is)); + return _.string(i.label) && (_.undefined(i.textEdit) || H.is(i)) && (_.undefined(i.additionalTextEdits) || _.typedArray(i.additionalTextEdits, H.is)); } t.is = n; -})(Wa || (Wa = {})); -var Oa; +})(Ha || (Ha = {})); +var Ga; (function(t) { t.Comment = "comment", t.Imports = "imports", t.Region = "region"; -})(Oa || (Oa = {})); -var Ua; +})(Ga || (Ga = {})); +var Ja; (function(t) { function e(r, i, s, a, o) { var l = { @@ -8669,8 +8942,8 @@ var Ua; return _.uinteger(i.startLine) && _.uinteger(i.startLine) && (_.undefined(i.startCharacter) || _.uinteger(i.startCharacter)) && (_.undefined(i.endCharacter) || _.uinteger(i.endCharacter)) && (_.undefined(i.kind) || _.string(i.kind)); } t.is = n; -})(Ua || (Ua = {})); -var ai; +})(Ja || (Ja = {})); +var fi; (function(t) { function e(r, i) { return { @@ -8681,27 +8954,27 @@ var ai; t.create = e; function n(r) { var i = r; - return _.defined(i) && bn.is(i.location) && _.string(i.message); + return _.defined(i) && Cn.is(i.location) && _.string(i.message); } t.is = n; -})(ai || (ai = {})); -var tr; +})(fi || (fi = {})); +var or; (function(t) { t.Error = 1, t.Warning = 2, t.Information = 3, t.Hint = 4; -})(tr || (tr = {})); -var Va; +})(or || (or = {})); +var Xa; (function(t) { t.Unnecessary = 1, t.Deprecated = 2; -})(Va || (Va = {})); -var Ba; +})(Xa || (Xa = {})); +var Ya; (function(t) { function e(n) { var r = n; return r != null && _.string(r.href); } t.is = e; -})(Ba || (Ba = {})); -var nr; +})(Ya || (Ya = {})); +var lr; (function(t) { function e(r, i, s, a, o, l) { var c = { range: r, message: i }; @@ -8710,11 +8983,11 @@ var nr; t.create = e; function n(r) { var i, s = r; - return _.defined(s) && te.is(s.range) && _.string(s.message) && (_.number(s.severity) || _.undefined(s.severity)) && (_.integer(s.code) || _.string(s.code) || _.undefined(s.code)) && (_.undefined(s.codeDescription) || _.string((i = s.codeDescription) === null || i === void 0 ? void 0 : i.href)) && (_.string(s.source) || _.undefined(s.source)) && (_.undefined(s.relatedInformation) || _.typedArray(s.relatedInformation, ai.is)); + return _.defined(s) && ie.is(s.range) && _.string(s.message) && (_.number(s.severity) || _.undefined(s.severity)) && (_.integer(s.code) || _.string(s.code) || _.undefined(s.code)) && (_.undefined(s.codeDescription) || _.string((i = s.codeDescription) === null || i === void 0 ? void 0 : i.href)) && (_.string(s.source) || _.undefined(s.source)) && (_.undefined(s.relatedInformation) || _.typedArray(s.relatedInformation, fi.is)); } t.is = n; -})(nr || (nr = {})); -var Jt; +})(lr || (lr = {})); +var Yt; (function(t) { function e(r, i) { for (var s = [], a = 2; a < arguments.length; a++) @@ -8728,8 +9001,8 @@ var Jt; return _.defined(i) && _.string(i.title) && _.string(i.command); } t.is = n; -})(Jt || (Jt = {})); -var $; +})(Yt || (Yt = {})); +var H; (function(t) { function e(s, a) { return { range: s, newText: a }; @@ -8745,11 +9018,11 @@ var $; t.del = r; function i(s) { var a = s; - return _.objectLiteral(a) && _.string(a.newText) && te.is(a.range); + return _.objectLiteral(a) && _.string(a.newText) && ie.is(a.range); } t.is = i; -})($ || ($ = {})); -var qt; +})(H || (H = {})); +var $t; (function(t) { function e(r, i, s) { var a = { label: r }; @@ -8761,15 +9034,15 @@ var qt; return i !== void 0 && _.objectLiteral(i) && _.string(i.label) && (_.boolean(i.needsConfirmation) || i.needsConfirmation === void 0) && (_.string(i.description) || i.description === void 0); } t.is = n; -})(qt || (qt = {})); -var _e; +})($t || ($t = {})); +var ke; (function(t) { function e(n) { var r = n; return typeof r == "string"; } t.is = e; -})(_e || (_e = {})); +})(ke || (ke = {})); var pt; (function(t) { function e(s, a, o) { @@ -8786,11 +9059,11 @@ var pt; t.del = r; function i(s) { var a = s; - return $.is(a) && (qt.is(a.annotationId) || _e.is(a.annotationId)); + return H.is(a) && ($t.is(a.annotationId) || ke.is(a.annotationId)); } t.is = i; })(pt || (pt = {})); -var vn; +var kn; (function(t) { function e(r, i) { return { textDocument: r, edits: i }; @@ -8798,11 +9071,11 @@ var vn; t.create = e; function n(r) { var i = r; - return _.defined(i) && rr.is(i.textDocument) && Array.isArray(i.edits); + return _.defined(i) && cr.is(i.textDocument) && Array.isArray(i.edits); } t.is = n; -})(vn || (vn = {})); -var yn; +})(kn || (kn = {})); +var _n; (function(t) { function e(r, i, s) { var a = { @@ -8814,11 +9087,11 @@ var yn; t.create = e; function n(r) { var i = r; - return i && i.kind === "create" && _.string(i.uri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || _e.is(i.annotationId)); + return i && i.kind === "create" && _.string(i.uri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || ke.is(i.annotationId)); } t.is = n; -})(yn || (yn = {})); -var wn; +})(_n || (_n = {})); +var Rn; (function(t) { function e(r, i, s, a) { var o = { @@ -8831,11 +9104,11 @@ var wn; t.create = e; function n(r) { var i = r; - return i && i.kind === "rename" && _.string(i.oldUri) && _.string(i.newUri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || _e.is(i.annotationId)); + return i && i.kind === "rename" && _.string(i.oldUri) && _.string(i.newUri) && (i.options === void 0 || (i.options.overwrite === void 0 || _.boolean(i.options.overwrite)) && (i.options.ignoreIfExists === void 0 || _.boolean(i.options.ignoreIfExists))) && (i.annotationId === void 0 || ke.is(i.annotationId)); } t.is = n; -})(wn || (wn = {})); -var xn; +})(Rn || (Rn = {})); +var Fn; (function(t) { function e(r, i, s) { var a = { @@ -8847,35 +9120,35 @@ var xn; t.create = e; function n(r) { var i = r; - return i && i.kind === "delete" && _.string(i.uri) && (i.options === void 0 || (i.options.recursive === void 0 || _.boolean(i.options.recursive)) && (i.options.ignoreIfNotExists === void 0 || _.boolean(i.options.ignoreIfNotExists))) && (i.annotationId === void 0 || _e.is(i.annotationId)); + return i && i.kind === "delete" && _.string(i.uri) && (i.options === void 0 || (i.options.recursive === void 0 || _.boolean(i.options.recursive)) && (i.options.ignoreIfNotExists === void 0 || _.boolean(i.options.ignoreIfNotExists))) && (i.annotationId === void 0 || ke.is(i.annotationId)); } t.is = n; -})(xn || (xn = {})); -var oi; +})(Fn || (Fn = {})); +var mi; (function(t) { function e(n) { var r = n; return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(i) { - return _.string(i.kind) ? yn.is(i) || wn.is(i) || xn.is(i) : vn.is(i); + return _.string(i.kind) ? _n.is(i) || Rn.is(i) || Fn.is(i) : kn.is(i); })); } t.is = e; -})(oi || (oi = {})); -var Nn = function() { +})(mi || (mi = {})); +var On = function() { function t(e, n) { this.edits = e, this.changeAnnotations = n; } return t.prototype.insert = function(e, n, r) { var i, s; - if (r === void 0 ? i = $.insert(e, n) : _e.is(r) ? (s = r, i = pt.insert(e, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = pt.insert(e, n, s)), this.edits.push(i), s !== void 0) + if (r === void 0 ? i = H.insert(e, n) : ke.is(r) ? (s = r, i = pt.insert(e, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = pt.insert(e, n, s)), this.edits.push(i), s !== void 0) return s; }, t.prototype.replace = function(e, n, r) { var i, s; - if (r === void 0 ? i = $.replace(e, n) : _e.is(r) ? (s = r, i = pt.replace(e, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = pt.replace(e, n, s)), this.edits.push(i), s !== void 0) + if (r === void 0 ? i = H.replace(e, n) : ke.is(r) ? (s = r, i = pt.replace(e, n, r)) : (this.assertChangeAnnotations(this.changeAnnotations), s = this.changeAnnotations.manage(r), i = pt.replace(e, n, s)), this.edits.push(i), s !== void 0) return s; }, t.prototype.delete = function(e, n) { var r, i; - if (n === void 0 ? r = $.del(e) : _e.is(n) ? (i = n, r = pt.del(e, n)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(n), r = pt.del(e, i)), this.edits.push(r), i !== void 0) + if (n === void 0 ? r = H.del(e) : ke.is(n) ? (i = n, r = pt.del(e, n)) : (this.assertChangeAnnotations(this.changeAnnotations), i = this.changeAnnotations.manage(n), r = pt.del(e, i)), this.edits.push(r), i !== void 0) return i; }, t.prototype.add = function(e) { this.edits.push(e); @@ -8887,7 +9160,7 @@ var Nn = function() { if (e === void 0) throw new Error("Text edit change is not configured to manage change annotations."); }, t; -}(), ja = function() { +}(), Ka = function() { function t(e) { this._annotations = e === void 0 ? /* @__PURE__ */ Object.create(null) : e, this._counter = 0, this._size = 0; } @@ -8901,7 +9174,7 @@ var Nn = function() { configurable: !0 }), t.prototype.manage = function(e, n) { var r; - if (_e.is(e) ? r = e : (r = this.nextId(), n = e), this._annotations[r] !== void 0) + if (ke.is(e) ? r = e : (r = this.nextId(), n = e), this._annotations[r] !== void 0) throw new Error("Id " + r + " is already in use."); if (n === void 0) throw new Error("No annotation provided for id " + r); @@ -8913,13 +9186,13 @@ var Nn = function() { (function() { function t(e) { var n = this; - this._textEditChanges = /* @__PURE__ */ Object.create(null), e !== void 0 ? (this._workspaceEdit = e, e.documentChanges ? (this._changeAnnotations = new ja(e.changeAnnotations), e.changeAnnotations = this._changeAnnotations.all(), e.documentChanges.forEach(function(r) { - if (vn.is(r)) { - var i = new Nn(r.edits, n._changeAnnotations); + this._textEditChanges = /* @__PURE__ */ Object.create(null), e !== void 0 ? (this._workspaceEdit = e, e.documentChanges ? (this._changeAnnotations = new Ka(e.changeAnnotations), e.changeAnnotations = this._changeAnnotations.all(), e.documentChanges.forEach(function(r) { + if (kn.is(r)) { + var i = new On(r.edits, n._changeAnnotations); n._textEditChanges[r.textDocument.uri] = i; } })) : e.changes && Object.keys(e.changes).forEach(function(r) { - var i = new Nn(e.changes[r]); + var i = new On(e.changes[r]); n._textEditChanges[r] = i; })) : this._workspaceEdit = {}; } @@ -8930,7 +9203,7 @@ var Nn = function() { enumerable: !1, configurable: !0 }), t.prototype.getTextEditChange = function(e) { - if (rr.is(e)) { + if (cr.is(e)) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var n = { uri: e.uri, version: e.version }, r = this._textEditChanges[n.uri]; @@ -8939,7 +9212,7 @@ var Nn = function() { textDocument: n, edits: i }; - this._workspaceEdit.documentChanges.push(s), r = new Nn(i, this._changeAnnotations), this._textEditChanges[n.uri] = r; + this._workspaceEdit.documentChanges.push(s), r = new On(i, this._changeAnnotations), this._textEditChanges[n.uri] = r; } return r; } else { @@ -8948,41 +9221,41 @@ var Nn = function() { var r = this._textEditChanges[e]; if (!r) { var i = []; - this._workspaceEdit.changes[e] = i, r = new Nn(i), this._textEditChanges[e] = r; + this._workspaceEdit.changes[e] = i, r = new On(i), this._textEditChanges[e] = r; } return r; } }, t.prototype.initDocumentChanges = function() { - this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new ja(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()); + this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new Ka(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()); }, t.prototype.initChanges = function() { this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null)); }, t.prototype.createFile = function(e, n, r) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var i; - qt.is(n) || _e.is(n) ? i = n : r = n; + $t.is(n) || ke.is(n) ? i = n : r = n; var s, a; - if (i === void 0 ? s = yn.create(e, r) : (a = _e.is(i) ? i : this._changeAnnotations.manage(i), s = yn.create(e, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) + if (i === void 0 ? s = _n.create(e, r) : (a = ke.is(i) ? i : this._changeAnnotations.manage(i), s = _n.create(e, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) return a; }, t.prototype.renameFile = function(e, n, r, i) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var s; - qt.is(r) || _e.is(r) ? s = r : i = r; + $t.is(r) || ke.is(r) ? s = r : i = r; var a, o; - if (s === void 0 ? a = wn.create(e, n, i) : (o = _e.is(s) ? s : this._changeAnnotations.manage(s), a = wn.create(e, n, i, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0) + if (s === void 0 ? a = Rn.create(e, n, i) : (o = ke.is(s) ? s : this._changeAnnotations.manage(s), a = Rn.create(e, n, i, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0) return o; }, t.prototype.deleteFile = function(e, n, r) { if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0) throw new Error("Workspace edit is not configured for document changes."); var i; - qt.is(n) || _e.is(n) ? i = n : r = n; + $t.is(n) || ke.is(n) ? i = n : r = n; var s, a; - if (i === void 0 ? s = xn.create(e, r) : (a = _e.is(i) ? i : this._changeAnnotations.manage(i), s = xn.create(e, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) + if (i === void 0 ? s = Fn.create(e, r) : (a = ke.is(i) ? i : this._changeAnnotations.manage(i), s = Fn.create(e, r, a)), this._workspaceEdit.documentChanges.push(s), a !== void 0) return a; }, t; })(); -var qa; +var Qa; (function(t) { function e(r) { return { uri: r }; @@ -8993,8 +9266,8 @@ var qa; return _.defined(i) && _.string(i.uri); } t.is = n; -})(qa || (qa = {})); -var li; +})(Qa || (Qa = {})); +var gi; (function(t) { function e(r, i) { return { uri: r, version: i }; @@ -9005,8 +9278,8 @@ var li; return _.defined(i) && _.string(i.uri) && _.integer(i.version); } t.is = n; -})(li || (li = {})); -var rr; +})(gi || (gi = {})); +var cr; (function(t) { function e(r, i) { return { uri: r, version: i }; @@ -9017,8 +9290,8 @@ var rr; return _.defined(i) && _.string(i.uri) && (i.version === null || _.integer(i.version)); } t.is = n; -})(rr || (rr = {})); -var $a; +})(cr || (cr = {})); +var Za; (function(t) { function e(r, i, s, a) { return { uri: r, languageId: i, version: s, text: a }; @@ -9029,30 +9302,30 @@ var $a; return _.defined(i) && _.string(i.uri) && _.string(i.languageId) && _.integer(i.version) && _.string(i.text); } t.is = n; -})($a || ($a = {})); -var Ue; +})(Za || (Za = {})); +var Ve; (function(t) { t.PlainText = "plaintext", t.Markdown = "markdown"; -})(Ue || (Ue = {})); +})(Ve || (Ve = {})); (function(t) { function e(n) { var r = n; return r === t.PlainText || r === t.Markdown; } t.is = e; -})(Ue || (Ue = {})); -var ci; +})(Ve || (Ve = {})); +var bi; (function(t) { function e(n) { var r = n; - return _.objectLiteral(n) && Ue.is(r.kind) && _.string(r.value); + return _.objectLiteral(n) && Ve.is(r.kind) && _.string(r.value); } t.is = e; -})(ci || (ci = {})); -var q; +})(bi || (bi = {})); +var $; (function(t) { t.Text = 1, t.Method = 2, t.Function = 3, t.Constructor = 4, t.Field = 5, t.Variable = 6, t.Class = 7, t.Interface = 8, t.Module = 9, t.Property = 10, t.Unit = 11, t.Value = 12, t.Enum = 13, t.Keyword = 14, t.Snippet = 15, t.Color = 16, t.File = 17, t.Reference = 18, t.Folder = 19, t.EnumMember = 20, t.Constant = 21, t.Struct = 22, t.Event = 23, t.Operator = 24, t.TypeParameter = 25; -})(q || (q = {})); +})($ || ($ = {})); var ze; (function(t) { t.PlainText = 1, t.Snippet = 2; @@ -9061,7 +9334,7 @@ var _t; (function(t) { t.Deprecated = 1; })(_t || (_t = {})); -var Ha; +var eo; (function(t) { function e(r, i, s) { return { newText: r, insert: i, replace: s }; @@ -9069,29 +9342,29 @@ var Ha; t.create = e; function n(r) { var i = r; - return i && _.string(i.newText) && te.is(i.insert) && te.is(i.replace); + return i && _.string(i.newText) && ie.is(i.insert) && ie.is(i.replace); } t.is = n; -})(Ha || (Ha = {})); -var Ga; +})(eo || (eo = {})); +var to; (function(t) { t.asIs = 1, t.adjustIndentation = 2; -})(Ga || (Ga = {})); -var Ja; +})(to || (to = {})); +var no; (function(t) { function e(n) { return { label: n }; } t.create = e; -})(Ja || (Ja = {})); -var Xa; +})(no || (no = {})); +var ro; (function(t) { function e(n, r) { return { items: n || [], isIncomplete: !!r }; } t.create = e; -})(Xa || (Xa = {})); -var ir; +})(ro || (ro = {})); +var hr; (function(t) { function e(r) { return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); @@ -9102,23 +9375,23 @@ var ir; return _.string(i) || _.objectLiteral(i) && _.string(i.language) && _.string(i.value); } t.is = n; -})(ir || (ir = {})); -var Ya; +})(hr || (hr = {})); +var io; (function(t) { function e(n) { var r = n; - return !!r && _.objectLiteral(r) && (ci.is(r.contents) || ir.is(r.contents) || _.typedArray(r.contents, ir.is)) && (n.range === void 0 || te.is(n.range)); + return !!r && _.objectLiteral(r) && (bi.is(r.contents) || hr.is(r.contents) || _.typedArray(r.contents, hr.is)) && (n.range === void 0 || ie.is(n.range)); } t.is = e; -})(Ya || (Ya = {})); -var Ka; +})(io || (io = {})); +var so; (function(t) { function e(n, r) { return r ? { label: n, documentation: r } : { label: n }; } t.create = e; -})(Ka || (Ka = {})); -var Qa; +})(so || (so = {})); +var ao; (function(t) { function e(n, r) { for (var i = [], s = 2; s < arguments.length; s++) @@ -9127,28 +9400,28 @@ var Qa; return _.defined(r) && (a.documentation = r), _.defined(i) ? a.parameters = i : a.parameters = [], a; } t.create = e; -})(Qa || (Qa = {})); +})(ao || (ao = {})); var Ut; (function(t) { t.Text = 1, t.Read = 2, t.Write = 3; })(Ut || (Ut = {})); -var Za; +var oo; (function(t) { function e(n, r) { var i = { range: n }; return _.number(r) && (i.kind = r), i; } t.create = e; -})(Za || (Za = {})); -var Ft; +})(oo || (oo = {})); +var Rt; (function(t) { t.File = 1, t.Module = 2, t.Namespace = 3, t.Package = 4, t.Class = 5, t.Method = 6, t.Property = 7, t.Field = 8, t.Constructor = 9, t.Enum = 10, t.Interface = 11, t.Function = 12, t.Variable = 13, t.Constant = 14, t.String = 15, t.Number = 16, t.Boolean = 17, t.Array = 18, t.Object = 19, t.Key = 20, t.Null = 21, t.EnumMember = 22, t.Struct = 23, t.Event = 24, t.Operator = 25, t.TypeParameter = 26; -})(Ft || (Ft = {})); -var eo; +})(Rt || (Rt = {})); +var lo; (function(t) { t.Deprecated = 1; -})(eo || (eo = {})); -var to; +})(lo || (lo = {})); +var co; (function(t) { function e(n, r, i, s, a) { var o = { @@ -9159,8 +9432,8 @@ var to; return a && (o.containerName = a), o; } t.create = e; -})(to || (to = {})); -var no; +})(co || (co = {})); +var ho; (function(t) { function e(r, i, s, a, o, l) { var c = { @@ -9175,15 +9448,15 @@ var no; t.create = e; function n(r) { var i = r; - return i && _.string(i.name) && _.number(i.kind) && te.is(i.range) && te.is(i.selectionRange) && (i.detail === void 0 || _.string(i.detail)) && (i.deprecated === void 0 || _.boolean(i.deprecated)) && (i.children === void 0 || Array.isArray(i.children)) && (i.tags === void 0 || Array.isArray(i.tags)); + return i && _.string(i.name) && _.number(i.kind) && ie.is(i.range) && ie.is(i.selectionRange) && (i.detail === void 0 || _.string(i.detail)) && (i.deprecated === void 0 || _.boolean(i.deprecated)) && (i.children === void 0 || Array.isArray(i.children)) && (i.tags === void 0 || Array.isArray(i.tags)); } t.is = n; -})(no || (no = {})); -var hi; +})(ho || (ho = {})); +var vi; (function(t) { t.Empty = "", t.QuickFix = "quickfix", t.Refactor = "refactor", t.RefactorExtract = "refactor.extract", t.RefactorInline = "refactor.inline", t.RefactorRewrite = "refactor.rewrite", t.Source = "source", t.SourceOrganizeImports = "source.organizeImports", t.SourceFixAll = "source.fixAll"; -})(hi || (hi = {})); -var ro; +})(vi || (vi = {})); +var uo; (function(t) { function e(r, i) { var s = { diagnostics: r }; @@ -9192,24 +9465,24 @@ var ro; t.create = e; function n(r) { var i = r; - return _.defined(i) && _.typedArray(i.diagnostics, nr.is) && (i.only === void 0 || _.typedArray(i.only, _.string)); + return _.defined(i) && _.typedArray(i.diagnostics, lr.is) && (i.only === void 0 || _.typedArray(i.only, _.string)); } t.is = n; -})(ro || (ro = {})); -var di; +})(uo || (uo = {})); +var yi; (function(t) { function e(r, i, s) { var a = { title: r }, o = !0; - return typeof i == "string" ? (o = !1, a.kind = i) : Jt.is(i) ? a.command = i : a.edit = i, o && s !== void 0 && (a.kind = s), a; + return typeof i == "string" ? (o = !1, a.kind = i) : Yt.is(i) ? a.command = i : a.edit = i, o && s !== void 0 && (a.kind = s), a; } t.create = e; function n(r) { var i = r; - return i && _.string(i.title) && (i.diagnostics === void 0 || _.typedArray(i.diagnostics, nr.is)) && (i.kind === void 0 || _.string(i.kind)) && (i.edit !== void 0 || i.command !== void 0) && (i.command === void 0 || Jt.is(i.command)) && (i.isPreferred === void 0 || _.boolean(i.isPreferred)) && (i.edit === void 0 || oi.is(i.edit)); + return i && _.string(i.title) && (i.diagnostics === void 0 || _.typedArray(i.diagnostics, lr.is)) && (i.kind === void 0 || _.string(i.kind)) && (i.edit !== void 0 || i.command !== void 0) && (i.command === void 0 || Yt.is(i.command)) && (i.isPreferred === void 0 || _.boolean(i.isPreferred)) && (i.edit === void 0 || mi.is(i.edit)); } t.is = n; -})(di || (di = {})); -var io; +})(yi || (yi = {})); +var po; (function(t) { function e(r, i) { var s = { range: r }; @@ -9218,11 +9491,11 @@ var io; t.create = e; function n(r) { var i = r; - return _.defined(i) && te.is(i.range) && (_.undefined(i.command) || Jt.is(i.command)); + return _.defined(i) && ie.is(i.range) && (_.undefined(i.command) || Yt.is(i.command)); } t.is = n; -})(io || (io = {})); -var so; +})(po || (po = {})); +var fo; (function(t) { function e(r, i) { return { tabSize: r, insertSpaces: i }; @@ -9233,8 +9506,8 @@ var so; return _.defined(i) && _.uinteger(i.tabSize) && _.boolean(i.insertSpaces); } t.is = n; -})(so || (so = {})); -var ao; +})(fo || (fo = {})); +var mo; (function(t) { function e(r, i, s) { return { range: r, target: i, data: s }; @@ -9242,11 +9515,11 @@ var ao; t.create = e; function n(r) { var i = r; - return _.defined(i) && te.is(i.range) && (_.undefined(i.target) || _.string(i.target)); + return _.defined(i) && ie.is(i.range) && (_.undefined(i.target) || _.string(i.target)); } t.is = n; -})(ao || (ao = {})); -var sr; +})(mo || (mo = {})); +var dr; (function(t) { function e(r, i) { return { range: r, parent: i }; @@ -9254,14 +9527,14 @@ var sr; t.create = e; function n(r) { var i = r; - return i !== void 0 && te.is(i.range) && (i.parent === void 0 || t.is(i.parent)); + return i !== void 0 && ie.is(i.range) && (i.parent === void 0 || t.is(i.parent)); } t.is = n; -})(sr || (sr = {})); -var oo; +})(dr || (dr = {})); +var go; (function(t) { function e(s, a, o, l) { - return new ru(s, a, o, l); + return new mu(s, a, o, l); } t.create = e; function n(s) { @@ -9274,12 +9547,12 @@ var oo; var y = g.range.start.line - b.range.start.line; return y === 0 ? g.range.start.character - b.range.start.character : y; }), c = o.length, h = l.length - 1; h >= 0; h--) { - var u = l[h], f = s.offsetAt(u.range.start), m = s.offsetAt(u.range.end); - if (m <= c) - o = o.substring(0, f) + u.newText + o.substring(m, o.length); + var u = l[h], m = s.offsetAt(u.range.start), f = s.offsetAt(u.range.end); + if (f <= c) + o = o.substring(0, m) + u.newText + o.substring(f, o.length); else throw new Error("Overlapping edit"); - c = f; + c = m; } return o; } @@ -9289,18 +9562,18 @@ var oo; return s; var o = s.length / 2 | 0, l = s.slice(0, o), c = s.slice(o); i(l, a), i(c, a); - for (var h = 0, u = 0, f = 0; h < l.length && u < c.length; ) { - var m = a(l[h], c[u]); - m <= 0 ? s[f++] = l[h++] : s[f++] = c[u++]; + for (var h = 0, u = 0, m = 0; h < l.length && u < c.length; ) { + var f = a(l[h], c[u]); + f <= 0 ? s[m++] = l[h++] : s[m++] = c[u++]; } for (; h < l.length; ) - s[f++] = l[h++]; + s[m++] = l[h++]; for (; u < c.length; ) - s[f++] = c[u++]; + s[m++] = c[u++]; return s; } -})(oo || (oo = {})); -var ru = function() { +})(go || (go = {})); +var mu = function() { function t(e, n, r, i) { this._uri = e, this._languageId = n, this._version = r, this._content = i, this._lineOffsets = void 0; } @@ -9346,13 +9619,13 @@ var ru = function() { e = Math.max(Math.min(e, this._content.length), 0); var n = this.getLineOffsets(), r = 0, i = n.length; if (i === 0) - return Fe.create(0, e); + return _e.create(0, e); for (; r < i; ) { var s = Math.floor((r + i) / 2); n[s] > e ? i = s : r = s + 1; } var a = r - 1; - return Fe.create(a, e - n[a]); + return _e.create(a, e - n[a]); }, t.prototype.offsetAt = function(e) { var n = this.getLineOffsets(); if (e.line >= n.length) @@ -9371,52 +9644,52 @@ var ru = function() { }(), _; (function(t) { var e = Object.prototype.toString; - function n(m) { - return typeof m < "u"; + function n(f) { + return typeof f < "u"; } t.defined = n; - function r(m) { - return typeof m > "u"; + function r(f) { + return typeof f > "u"; } t.undefined = r; - function i(m) { - return m === !0 || m === !1; + function i(f) { + return f === !0 || f === !1; } t.boolean = i; - function s(m) { - return e.call(m) === "[object String]"; + function s(f) { + return e.call(f) === "[object String]"; } t.string = s; - function a(m) { - return e.call(m) === "[object Number]"; + function a(f) { + return e.call(f) === "[object Number]"; } t.number = a; - function o(m, g, b) { - return e.call(m) === "[object Number]" && g <= m && m <= b; + function o(f, g, b) { + return e.call(f) === "[object Number]" && g <= f && f <= b; } t.numberRange = o; - function l(m) { - return e.call(m) === "[object Number]" && -2147483648 <= m && m <= 2147483647; + function l(f) { + return e.call(f) === "[object Number]" && -2147483648 <= f && f <= 2147483647; } t.integer = l; - function c(m) { - return e.call(m) === "[object Number]" && 0 <= m && m <= 2147483647; + function c(f) { + return e.call(f) === "[object Number]" && 0 <= f && f <= 2147483647; } t.uinteger = c; - function h(m) { - return e.call(m) === "[object Function]"; + function h(f) { + return e.call(f) === "[object Function]"; } t.func = h; - function u(m) { - return m !== null && typeof m == "object"; + function u(f) { + return f !== null && typeof f == "object"; } t.objectLiteral = u; - function f(m, g) { - return Array.isArray(m) && m.every(g); + function m(f, g) { + return Array.isArray(f) && f.every(g); } - t.typedArray = f; + t.typedArray = m; })(_ || (_ = {})); -var ar = class { +var ur = class { constructor(t, e, n, r) { this._uri = t, this._languageId = e, this._version = n, this._content = r, this._lineOffsets = void 0; } @@ -9438,29 +9711,29 @@ var ar = class { } update(t, e) { for (let n of t) - if (ar.isIncremental(n)) { - const r = El(n.range), i = this.offsetAt(r.start), s = this.offsetAt(r.end); + if (ur.isIncremental(n)) { + const r = Ml(n.range), i = this.offsetAt(r.start), s = this.offsetAt(r.end); this._content = this._content.substring(0, i) + n.text + this._content.substring(s, this._content.length); const a = Math.max(r.start.line, 0), o = Math.max(r.end.line, 0); let l = this._lineOffsets; - const c = lo(n.text, !1, i); + const c = bo(n.text, !1, i); if (o - a === c.length) - for (let u = 0, f = c.length; u < f; u++) + for (let u = 0, m = c.length; u < m; u++) l[u + a + 1] = c[u]; else c.length < 1e4 ? l.splice(a + 1, o - a, ...c) : this._lineOffsets = l = l.slice(0, a + 1).concat(c, l.slice(o + 1)); const h = n.text.length - (s - i); if (h !== 0) - for (let u = a + 1 + c.length, f = l.length; u < f; u++) + for (let u = a + 1 + c.length, m = l.length; u < m; u++) l[u] = l[u] + h; - } else if (ar.isFull(n)) + } else if (ur.isFull(n)) this._content = n.text, this._lineOffsets = void 0; else throw new Error("Unknown change event received"); this._version = e; } getLineOffsets() { - return this._lineOffsets === void 0 && (this._lineOffsets = lo(this._content, !0)), this._lineOffsets; + return this._lineOffsets === void 0 && (this._lineOffsets = bo(this._content, !0)), this._lineOffsets; } positionAt(t) { t = Math.max(Math.min(t, this._content.length), 0); @@ -9494,22 +9767,22 @@ var ar = class { let e = t; return e != null && typeof e.text == "string" && e.range === void 0 && e.rangeLength === void 0; } -}, ui; +}, wi; (function(t) { function e(i, s, a, o) { - return new ar(i, s, a, o); + return new ur(i, s, a, o); } t.create = e; function n(i, s, a) { - if (i instanceof ar) + if (i instanceof ur) return i.update(s, a), i; throw new Error("TextDocument.update: document must be created by TextDocument.create"); } t.update = n; function r(i, s) { - let a = i.getText(), o = pi(s.map(iu), (h, u) => { - let f = h.range.start.line - u.range.start.line; - return f === 0 ? h.range.start.character - u.range.start.character : f; + let a = i.getText(), o = xi(s.map(gu), (h, u) => { + let m = h.range.start.line - u.range.start.line; + return m === 0 ? h.range.start.character - u.range.start.character : m; }), l = 0; const c = []; for (const h of o) { @@ -9521,12 +9794,12 @@ var ar = class { return c.push(a.substr(l)), c.join(""); } t.applyEdits = r; -})(ui || (ui = {})); -function pi(t, e) { +})(wi || (wi = {})); +function xi(t, e) { if (t.length <= 1) return t; const n = t.length / 2 | 0, r = t.slice(0, n), i = t.slice(n); - pi(r, e), pi(i, e); + xi(r, e), xi(i, e); let s = 0, a = 0, o = 0; for (; s < r.length && a < i.length; ) e(r[s], i[a]) <= 0 ? t[o++] = r[s++] : t[o++] = i[a++]; @@ -9536,7 +9809,7 @@ function pi(t, e) { t[o++] = i[a++]; return t; } -function lo(t, e, n = 0) { +function bo(t, e, n = 0) { const r = e ? [n] : []; for (let i = 0; i < t.length; i++) { let s = t.charCodeAt(i); @@ -9544,34 +9817,34 @@ function lo(t, e, n = 0) { } return r; } -function El(t) { +function Ml(t) { const e = t.start, n = t.end; return e.line > n.line || e.line === n.line && e.character > n.character ? { start: n, end: e } : t; } -function iu(t) { - const e = El(t.range); +function gu(t) { + const e = Ml(t.range); return e !== t.range ? { newText: t.newText, range: e } : t; } -var co; +var vo; (function(t) { t.LATEST = { textDocument: { completion: { completionItem: { - documentationFormat: [Ue.Markdown, Ue.PlainText] + documentationFormat: [Ve.Markdown, Ve.PlainText] } }, hover: { - contentFormat: [Ue.Markdown, Ue.PlainText] + contentFormat: [Ve.Markdown, Ve.PlainText] } } }; -})(co || (co = {})); -var Sn; +})(vo || (vo = {})); +var En; (function(t) { t[t.Unknown = 0] = "Unknown", t[t.File = 1] = "File", t[t.Directory = 2] = "Directory", t[t.SymbolicLink = 64] = "SymbolicLink"; -})(Sn || (Sn = {})); -var ho = { +})(En || (En = {})); +var yo = { E: "Edge", FF: "Firefox", S: "Safari", @@ -9579,7 +9852,7 @@ var ho = { IE: "IE", O: "Opera" }; -function Dl(t) { +function zl(t) { switch (t) { case "experimental": return `⚠️ Property is experimental. Be cautious when using it.️ @@ -9601,25 +9874,25 @@ function mt(t, e, n) { var r; if (e ? r = { kind: "markdown", - value: au(t, n) + value: vu(t, n) } : r = { kind: "plaintext", - value: su(t, n) + value: bu(t, n) }, r.value !== "") return r; } -function zn(t) { +function Un(t) { return t = t.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"), t.replace(//g, ">"); } -function su(t, e) { +function bu(t, e) { if (!t.description || t.description === "") return ""; if (typeof t.description != "string") return t.description.value; var n = ""; if ((e == null ? void 0 : e.documentation) !== !1) { - t.status && (n += Dl(t.status)), n += t.description; - var r = Al(t.browsers); + t.status && (n += zl(t.status)), n += t.description; + var r = Pl(t.browsers); r && (n += ` (` + r + ")"), "syntax" in t && (n += ` @@ -9631,18 +9904,18 @@ Syntax: `.concat(t.syntax)); return "".concat(i.name, ": ").concat(i.url); }).join(" | ")), n; } -function au(t, e) { +function vu(t, e) { if (!t.description || t.description === "") return ""; var n = ""; if ((e == null ? void 0 : e.documentation) !== !1) { - t.status && (n += Dl(t.status)), typeof t.description == "string" ? n += zn(t.description) : n += t.description.kind === Ue.Markdown ? t.description.value : zn(t.description.value); - var r = Al(t.browsers); + t.status && (n += zl(t.status)), typeof t.description == "string" ? n += Un(t.description) : n += t.description.kind === Ve.Markdown ? t.description.value : Un(t.description.value); + var r = Pl(t.browsers); r && (n += ` -(` + zn(r) + ")"), "syntax" in t && t.syntax && (n += ` +(` + Un(r) + ")"), "syntax" in t && t.syntax && (n += ` -Syntax: `.concat(zn(t.syntax))); +Syntax: `.concat(Un(t.syntax))); } return t.references && t.references.length > 0 && (e == null ? void 0 : e.references) !== !1 && (n.length > 0 && (n += ` @@ -9650,19 +9923,19 @@ Syntax: `.concat(zn(t.syntax))); return "[".concat(i.name, "](").concat(i.url, ")"); }).join(" | ")), n; } -function Al(t) { +function Pl(t) { return t === void 0 && (t = []), t.length === 0 ? null : t.map(function(e) { var n = "", r = e.match(/([A-Z]+)(\d+)?/), i = r[1], s = r[2]; - return i in ho && (n += ho[i]), s && (n += " " + s), n; + return i in yo && (n += yo[i]), s && (n += " " + s), n; }).join(", "); } -var sn = Je(), ou = [ - { func: "rgb($red, $green, $blue)", desc: sn("css.builtin.rgb", "Creates a Color from red, green, and blue values.") }, - { func: "rgba($red, $green, $blue, $alpha)", desc: sn("css.builtin.rgba", "Creates a Color from red, green, blue, and alpha values.") }, - { func: "hsl($hue, $saturation, $lightness)", desc: sn("css.builtin.hsl", "Creates a Color from hue, saturation, and lightness values.") }, - { func: "hsla($hue, $saturation, $lightness, $alpha)", desc: sn("css.builtin.hsla", "Creates a Color from hue, saturation, lightness, and alpha values.") }, - { func: "hwb($hue $white $black)", desc: sn("css.builtin.hwb", "Creates a Color from hue, white and black.") } -], or = { +var on = Ge(), yu = [ + { func: "rgb($red, $green, $blue)", desc: on("css.builtin.rgb", "Creates a Color from red, green, and blue values.") }, + { func: "rgba($red, $green, $blue, $alpha)", desc: on("css.builtin.rgba", "Creates a Color from red, green, blue, and alpha values.") }, + { func: "hsl($hue, $saturation, $lightness)", desc: on("css.builtin.hsl", "Creates a Color from hue, saturation, and lightness values.") }, + { func: "hsla($hue, $saturation, $lightness, $alpha)", desc: on("css.builtin.hsla", "Creates a Color from hue, saturation, lightness, and alpha values.") }, + { func: "hwb($hue $white $black)", desc: on("css.builtin.hwb", "Creates a Color from hue, white and black.") } +], pr = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", @@ -9811,7 +10084,7 @@ var sn = Je(), ou = [ whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32" -}, uo = { +}, wo = { currentColor: "The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.", transparent: "Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value." }; @@ -9825,7 +10098,7 @@ function dt(t, e) { } throw new Error(); } -function po(t) { +function xo(t) { var e = t.getText(), n = e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/); if (n) switch (n[2]) { @@ -9843,50 +10116,50 @@ function po(t) { } throw new Error(); } -function lu(t) { +function wu(t) { var e = t.getName(); return e ? /^(rgb|rgba|hsl|hsla|hwb)$/gi.test(e) : !1; } -var fo = 48, cu = 57, hu = 65, Pn = 97, du = 102; -function le(t) { - return t < fo ? 0 : t <= cu ? t - fo : (t < Pn && (t += Pn - hu), t >= Pn && t <= du ? t - Pn + 10 : 0); +var So = 48, xu = 57, Su = 65, Vn = 97, Cu = 102; +function de(t) { + return t < So ? 0 : t <= xu ? t - So : (t < Vn && (t += Vn - Su), t >= Vn && t <= Cu ? t - Vn + 10 : 0); } -function mo(t) { +function Co(t) { if (t[0] !== "#") return null; switch (t.length) { case 4: return { - red: le(t.charCodeAt(1)) * 17 / 255, - green: le(t.charCodeAt(2)) * 17 / 255, - blue: le(t.charCodeAt(3)) * 17 / 255, + red: de(t.charCodeAt(1)) * 17 / 255, + green: de(t.charCodeAt(2)) * 17 / 255, + blue: de(t.charCodeAt(3)) * 17 / 255, alpha: 1 }; case 5: return { - red: le(t.charCodeAt(1)) * 17 / 255, - green: le(t.charCodeAt(2)) * 17 / 255, - blue: le(t.charCodeAt(3)) * 17 / 255, - alpha: le(t.charCodeAt(4)) * 17 / 255 + red: de(t.charCodeAt(1)) * 17 / 255, + green: de(t.charCodeAt(2)) * 17 / 255, + blue: de(t.charCodeAt(3)) * 17 / 255, + alpha: de(t.charCodeAt(4)) * 17 / 255 }; case 7: return { - red: (le(t.charCodeAt(1)) * 16 + le(t.charCodeAt(2))) / 255, - green: (le(t.charCodeAt(3)) * 16 + le(t.charCodeAt(4))) / 255, - blue: (le(t.charCodeAt(5)) * 16 + le(t.charCodeAt(6))) / 255, + red: (de(t.charCodeAt(1)) * 16 + de(t.charCodeAt(2))) / 255, + green: (de(t.charCodeAt(3)) * 16 + de(t.charCodeAt(4))) / 255, + blue: (de(t.charCodeAt(5)) * 16 + de(t.charCodeAt(6))) / 255, alpha: 1 }; case 9: return { - red: (le(t.charCodeAt(1)) * 16 + le(t.charCodeAt(2))) / 255, - green: (le(t.charCodeAt(3)) * 16 + le(t.charCodeAt(4))) / 255, - blue: (le(t.charCodeAt(5)) * 16 + le(t.charCodeAt(6))) / 255, - alpha: (le(t.charCodeAt(7)) * 16 + le(t.charCodeAt(8))) / 255 + red: (de(t.charCodeAt(1)) * 16 + de(t.charCodeAt(2))) / 255, + green: (de(t.charCodeAt(3)) * 16 + de(t.charCodeAt(4))) / 255, + blue: (de(t.charCodeAt(5)) * 16 + de(t.charCodeAt(6))) / 255, + alpha: (de(t.charCodeAt(7)) * 16 + de(t.charCodeAt(8))) / 255 }; } return null; } -function Ml(t, e, n, r) { +function Ll(t, e, n, r) { if (r === void 0 && (r = 1), t = t / 60, e === 0) return { red: n, green: n, blue: n, alpha: r }; var i = function(o, l, c) { @@ -9898,7 +10171,7 @@ function Ml(t, e, n, r) { }, s = n <= 0.5 ? n * (e + 1) : n + e - n * e, a = n * 2 - s; return { red: i(a, s, t + 2), green: i(a, s, t), blue: i(a, s, t - 2), alpha: r }; } -function Nl(t) { +function Il(t) { var e = t.red, n = t.green, r = t.blue, i = t.alpha, s = Math.max(e, n, r), a = Math.min(e, n, r), o = 0, l = 0, c = (a + s) / 2, h = s - a; if (h > 0) { switch (l = Math.min(c <= 0.5 ? h / (2 * c) : h / (2 - 2 * c), 1), s) { @@ -9916,12 +10189,12 @@ function Nl(t) { } return { h: o, s: l, l: c, a: i }; } -function uu(t, e, n, r) { +function ku(t, e, n, r) { if (r === void 0 && (r = 1), e + n >= 1) { var i = e / (e + n); return { red: i, green: i, blue: i, alpha: r }; } - var s = Ml(t, 1, 0.5, r), a = s.red; + var s = Ll(t, 1, 0.5, r), a = s.red; a *= 1 - e - n, a += e; var o = s.green; o *= 1 - e - n, o += e; @@ -9933,8 +10206,8 @@ function uu(t, e, n, r) { alpha: r }; } -function pu(t) { - var e = Nl(t), n = Math.min(t.red, t.green, t.blue), r = 1 - Math.max(t.red, t.green, t.blue); +function _u(t) { + var e = Il(t), n = Math.min(t.red, t.green, t.blue), r = 1 - Math.max(t.red, t.green, t.blue); return { h: e.h, w: n, @@ -9942,17 +10215,17 @@ function pu(t) { a: e.a }; } -function fu(t) { +function Ru(t) { if (t.type === v.HexColorValue) { var e = t.getText(); - return mo(e); + return Co(e); } else if (t.type === v.Function) { var n = t, r = n.getName(), i = n.getArguments().getChildren(); if (i.length === 1) { var s = i[0].getChildren(); if (s.length === 1 && s[0].type === v.Expression && (i = s[0].getChildren(), i.length === 3)) { var a = i[2]; - if (a instanceof Pi) { + if (a instanceof ji) { var o = a.getLeft(), l = a.getRight(), c = a.getOperator(); o && l && c && c.matches("/") && (i = [i[0], i[1], o, l]); } @@ -9970,11 +10243,11 @@ function fu(t) { alpha: h }; if (r === "hsl" || r === "hsla") { - var u = po(i[0]), f = dt(i[1], 100), m = dt(i[2], 100); - return Ml(u, f, m, h); + var u = xo(i[0]), m = dt(i[1], 100), f = dt(i[2], 100); + return Ll(u, m, f, h); } else if (r === "hwb") { - var u = po(i[0]), g = dt(i[1], 100), b = dt(i[2], 100); - return uu(u, g, b, h); + var u = xo(i[0]), g = dt(i[1], 100), b = dt(i[2], 100); + return ku(u, g, b, h); } } catch { return null; @@ -9984,33 +10257,33 @@ function fu(t) { return null; var y = t.parent; if (y && y.parent && y.parent.type === v.BinaryExpression) { - var w = y.parent; - if (w.parent && w.parent.type === v.ListEntry && w.parent.key === w) + var x = y.parent; + if (x.parent && x.parent.type === v.ListEntry && x.parent.key === x) return null; } - var x = t.getText().toLowerCase(); - if (x === "none") + var S = t.getText().toLowerCase(); + if (S === "none") return null; - var k = or[x]; - if (k) - return mo(k); + var w = pr[S]; + if (w) + return Co(w); } return null; } -var go = { +var ko = { bottom: "Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.", center: "Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.", left: "Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.", right: "Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.", top: "Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset." -}, bo = { +}, _o = { "no-repeat": "Placed once and not repeated in this direction.", repeat: "Repeated in this direction as often as needed to cover the background painting area.", "repeat-x": "Computes to ‘repeat no-repeat’.", "repeat-y": "Computes to ‘no-repeat repeat’.", round: "Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.", space: "Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area." -}, vo = { +}, Ro = { dashed: "A series of square-ended dashes.", dotted: "A series of round dots.", double: "Two parallel solid lines with some space between them.", @@ -10021,23 +10294,23 @@ var go = { outset: "Looks as if the content on the inside of the border is coming out of the canvas.", ridge: "Looks as if it were coming out of the canvas.", solid: "A single line segment." -}, mu = ["medium", "thick", "thin"], yo = { +}, Fu = ["medium", "thick", "thin"], Fo = { "border-box": "The background is painted within (clipped to) the border box.", "content-box": "The background is painted within (clipped to) the content box.", "padding-box": "The background is painted within (clipped to) the padding box." -}, wo = { +}, Eo = { "margin-box": "Uses the margin box as reference box.", "fill-box": "Uses the object bounding box as reference box.", "stroke-box": "Uses the stroke bounding box as reference box.", "view-box": "Uses the nearest SVG viewport as reference box." -}, xo = { +}, Do = { initial: "Represents the value specified as the property’s initial value.", inherit: "Represents the computed value of the property on the element’s parent.", unset: "Acts as either `inherit` or `initial`, depending on whether the property is inherited or not." -}, So = { +}, Ao = { "var()": "Evaluates the value of a custom variable.", "calc()": "Evaluates an mathematical expression. The following operators can be used: + - * /." -}, Co = { +}, No = { "url()": "Reference an image file by URL", "image()": "Provide image fallbacks and annotations.", "-webkit-image-set()": "Provide multiple resolutions. Remember to use unprefixed image-set() in addition.", @@ -10060,7 +10333,7 @@ var go = { "-webkit-repeating-radial-gradient()": "Repeating radial gradient. Remember to use unprefixed version in addition.", "-moz-repeating-radial-gradient()": "Repeating radial gradient. Remember to use unprefixed version in addition.", "repeating-radial-gradient()": "Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position." -}, ko = { +}, Mo = { ease: "Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).", "ease-in": "Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).", "ease-in-out": "Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).", @@ -10094,19 +10367,19 @@ var go = { "cubic-bezier(0.755, 0.05, 0.855, 0.06)": "Ease-in Quintic. Based on power of five.", "cubic-bezier(0.86, 0, 0.07, 1)": "Ease-in-out Quintic. Based on power of five.", "cubic-bezier(0.23, 1, 0.320, 1)": "Ease-out Quintic. Based on power of five." -}, _o = { +}, zo = { "circle()": "Defines a circle.", "ellipse()": "Defines an ellipse.", "inset()": "Defines an inset rectangle.", "polygon()": "Defines a polygon." -}, zl = { +}, Tl = { length: ["em", "rem", "ex", "px", "cm", "mm", "in", "pt", "pc", "ch", "vw", "vh", "vmin", "vmax"], angle: ["deg", "rad", "grad", "turn"], time: ["ms", "s"], frequency: ["Hz", "kHz"], resolution: ["dpi", "dpcm", "dppx"], percentage: ["%", "fr"] -}, gu = [ +}, Eu = [ "a", "abbr", "address", @@ -10222,7 +10495,7 @@ var go = { "const", "video", "wbr" -], bu = [ +], Du = [ "circle", "clipPath", "cursor", @@ -10286,7 +10559,7 @@ var go = { "tspan", "use", "view" -], vu = [ +], Au = [ "@bottom-center", "@bottom-left", "@bottom-left-corner", @@ -10304,22 +10577,22 @@ var go = { "@top-right", "@top-right-corner" ]; -function In(t) { +function Bn(t) { return Object.keys(t).map(function(e) { return t[e]; }); } -function Te(t) { +function We(t) { return typeof t < "u"; } -var Fo = function(t, e, n) { +var Po = function(t, e, n) { if (n || arguments.length === 2) for (var r = 0, i = e.length, s; r < i; r++) (s || !(r in e)) && (s || (s = Array.prototype.slice.call(e, 0, r)), s[r] = e[r]); return t.concat(s || Array.prototype.slice.call(e)); -}, Wi = function() { +}, Gi = function() { function t(e) { - e === void 0 && (e = new _n()), this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i, this.scanner = e, this.token = { type: p.EOF, offset: -1, len: 0, text: "" }, this.prevToken = void 0; + e === void 0 && (e = new Nn()), this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i, this.scanner = e, this.token = { type: p.EOF, offset: -1, len: 0, text: "" }, this.prevToken = void 0; } return t.prototype.peekIdent = function(e) { return p.Ident === this.token.type && e.length === this.token.text.length && e === this.token.text.toLowerCase(); @@ -10393,7 +10666,7 @@ var Fo = function(t, e, n) { this.token = this.scanner.scan(); } }, t.prototype.createNode = function(e) { - return new W(this.token.offset, this.token.len, e); + return new V(this.token.offset, this.token.len, e); }, t.prototype.create = function(e) { return new e(this.token.offset, this.token.len); }, t.prototype.finish = function(e, n, r, i) { @@ -10403,7 +10676,7 @@ var Fo = function(t, e, n) { } return e; }, t.prototype.markError = function(e, n, r, i) { - this.token !== this.lastErrorToken && (e.addIssue(new Rl(e, n, Pe.Error, void 0, this.token.offset, this.token.len)), this.lastErrorToken = this.token), (r || i) && this.resync(r, i); + this.token !== this.lastErrorToken && (e.addIssue(new Nl(e, n, Pe.Error, void 0, this.token.offset, this.token.len)), this.lastErrorToken = this.token), (r || i) && this.resync(r, i); }, t.prototype.parseStylesheet = function(e) { var n = e.version, r = e.getText(), i = function(s, a) { if (e.version !== n) @@ -10418,7 +10691,7 @@ var Fo = function(t, e, n) { return e.substr(s, a); }), i; }, t.prototype._parseStylesheet = function() { - for (var e = this.create(Cd); e.addChild(this._parseStylesheetStart()); ) + for (var e = this.create(Ld); e.addChild(this._parseStylesheetStart()); ) ; var n = !1; do { @@ -10426,12 +10699,12 @@ var Fo = function(t, e, n) { do { r = !1; var i = this._parseStylesheetStatement(); - for (i && (e.addChild(i), r = !0, n = !1, !this.peek(p.EOF) && this._needsSemicolonAfter(i) && !this.accept(p.SemiColon) && this.markError(e, S.SemiColonExpected)); this.accept(p.SemiColon) || this.accept(p.CDO) || this.accept(p.CDC); ) + for (i && (e.addChild(i), r = !0, n = !1, !this.peek(p.EOF) && this._needsSemicolonAfter(i) && !this.accept(p.SemiColon) && this.markError(e, C.SemiColonExpected)); this.accept(p.SemiColon) || this.accept(p.CDO) || this.accept(p.CDC); ) r = !0, n = !1; } while (r); if (this.peek(p.EOF)) break; - n || (this.peek(p.AtKeyword) ? this.markError(e, S.UnknownAtRule) : this.markError(e, S.RuleOrSelectorExpected), n = !0), this.consumeToken(); + n || (this.peek(p.AtKeyword) ? this.markError(e, C.UnknownAtRule) : this.markError(e, C.RuleOrSelectorExpected), n = !0), this.consumeToken(); } while (!this.peek(p.EOF)); return this.finish(e); }, t.prototype._parseStylesheetStart = function() { @@ -10451,12 +10724,12 @@ var Fo = function(t, e, n) { return this.restoreAtMark(n), null; }, t.prototype._parseRuleset = function(e) { e === void 0 && (e = !1); - var n = this.create(Bt), r = n.getSelectors(); + var n = this.create(jt), r = n.getSelectors(); if (!r.addChild(this._parseSelector(e))) return null; for (; this.accept(p.Comma); ) if (!r.addChild(this._parseSelector(e))) - return this.finish(n, S.SelectorExpected); + return this.finish(n, C.SelectorExpected); return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._parseRuleSetDeclarationAtStatement = function() { return this._parseUnknownAtRule(); @@ -10495,21 +10768,21 @@ var Fo = function(t, e, n) { } return !1; }, t.prototype._parseDeclarations = function(e) { - var n = this.create(Ai); + var n = this.create(Oi); if (!this.accept(p.CurlyL)) return null; for (var r = e(); n.addChild(r) && !this.peek(p.CurlyR); ) { if (this._needsSemicolonAfter(r) && !this.accept(p.SemiColon)) - return this.finish(n, S.SemiColonExpected, [p.SemiColon, p.CurlyR]); + return this.finish(n, C.SemiColonExpected, [p.SemiColon, p.CurlyR]); for (r && this.prevToken && this.prevToken.type === p.SemiColon && (r.semicolonPosition = this.prevToken.offset); this.accept(p.SemiColon); ) ; r = e(); } - return this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, S.RightCurlyExpected, [p.CurlyR, p.SemiColon]); + return this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, C.RightCurlyExpected, [p.CurlyR, p.SemiColon]); }, t.prototype._parseBody = function(e, n) { - return e.setDeclarations(this._parseDeclarations(n)) ? this.finish(e) : this.finish(e, S.LeftCurlyExpected, [p.CurlyR, p.SemiColon]); + return e.setDeclarations(this._parseDeclarations(n)) ? this.finish(e) : this.finish(e, C.LeftCurlyExpected, [p.CurlyR, p.SemiColon]); }, t.prototype._parseSelector = function(e) { - var n = this.create(Fn), r = !1; + var n = this.create(Mn), r = !1; for (e && (r = n.addChild(this._parseCombinator())); n.addChild(this._parseSimpleSelector()); ) r = !0, n.addChild(this._parseCombinator()); return r ? this.finish(n) : null; @@ -10517,30 +10790,30 @@ var Fo = function(t, e, n) { var n = this._tryParseCustomPropertyDeclaration(e); if (n) return n; - var r = this.create(Ze); - return r.setProperty(this._parseProperty()) ? this.accept(p.Colon) ? (this.prevToken && (r.colonPosition = this.prevToken.offset), r.setValue(this._parseExpr()) ? (r.addChild(this._parsePrio()), this.peek(p.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r)) : this.finish(r, S.PropertyValueExpected)) : this.finish(r, S.ColonExpected, [p.Colon], e || [p.SemiColon]) : null; + var r = this.create(Qe); + return r.setProperty(this._parseProperty()) ? this.accept(p.Colon) ? (this.prevToken && (r.colonPosition = this.prevToken.offset), r.setValue(this._parseExpr()) ? (r.addChild(this._parsePrio()), this.peek(p.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r)) : this.finish(r, C.PropertyValueExpected)) : this.finish(r, C.ColonExpected, [p.Colon], e || [p.SemiColon]) : null; }, t.prototype._tryParseCustomPropertyDeclaration = function(e) { if (!this.peekRegExp(p.Ident, /^--/)) return null; - var n = this.create(_d); + var n = this.create(Td); if (!n.setProperty(this._parseProperty())) return null; if (!this.accept(p.Colon)) - return this.finish(n, S.ColonExpected, [p.Colon]); + return this.finish(n, C.ColonExpected, [p.Colon]); this.prevToken && (n.colonPosition = this.prevToken.offset); var r = this.mark(); if (this.peek(p.CurlyL)) { - var i = this.create(kd), s = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this)); + var i = this.create(Id), s = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this)); if (i.setDeclarations(s) && !s.isErroneous(!0) && (i.addChild(this._parsePrio()), this.peek(p.SemiColon))) return this.finish(i), n.setPropertySet(i), n.semicolonPosition = this.token.offset, this.finish(n); this.restoreAtMark(r); } var a = this._parseExpr(); - return a && !a.isErroneous(!0) && (this._parsePrio(), this.peekOne.apply(this, Fo(Fo([], e || [], !1), [p.SemiColon, p.EOF], !1))) ? (n.setValue(a), this.peek(p.SemiColon) && (n.semicolonPosition = this.token.offset), this.finish(n)) : (this.restoreAtMark(r), n.addChild(this._parseCustomPropertyValue(e)), n.addChild(this._parsePrio()), Te(n.colonPosition) && this.token.offset === n.colonPosition + 1 ? this.finish(n, S.PropertyValueExpected) : this.finish(n)); + return a && !a.isErroneous(!0) && (this._parsePrio(), this.peekOne.apply(this, Po(Po([], e || [], !1), [p.SemiColon, p.EOF], !1))) ? (n.setValue(a), this.peek(p.SemiColon) && (n.semicolonPosition = this.token.offset), this.finish(n)) : (this.restoreAtMark(r), n.addChild(this._parseCustomPropertyValue(e)), n.addChild(this._parsePrio()), We(n.colonPosition) && this.token.offset === n.colonPosition + 1 ? this.finish(n, C.PropertyValueExpected) : this.finish(n)); }, t.prototype._parseCustomPropertyValue = function(e) { var n = this; e === void 0 && (e = [p.CurlyR]); - var r = this.create(W), i = function() { + var r = this.create(V), i = function() { return a === 0 && o === 0 && l === 0; }, s = function() { return e.indexOf(n.token.type) !== -1; @@ -10563,7 +10836,7 @@ var Fo = function(t, e, n) { if (a--, a < 0) { if (s() && o === 0 && l === 0) break e; - return this.finish(r, S.LeftCurlyExpected); + return this.finish(r, C.LeftCurlyExpected); } break; case p.ParenthesisL: @@ -10573,7 +10846,7 @@ var Fo = function(t, e, n) { if (o--, o < 0) { if (s() && l === 0 && a === 0) break e; - return this.finish(r, S.LeftParenthesisExpected); + return this.finish(r, C.LeftParenthesisExpected); } break; case p.BracketL: @@ -10581,13 +10854,13 @@ var Fo = function(t, e, n) { break; case p.BracketR: if (l--, l < 0) - return this.finish(r, S.LeftSquareBracketExpected); + return this.finish(r, C.LeftSquareBracketExpected); break; case p.BadString: break e; case p.EOF: - var c = S.RightCurlyExpected; - return l > 0 ? c = S.RightSquareBracketExpected : o > 0 && (c = S.RightParenthesisExpected), this.finish(r, c); + var c = C.RightCurlyExpected; + return l > 0 ? c = C.RightSquareBracketExpected : o > 0 && (c = C.RightParenthesisExpected), this.finish(r, c); } this.consumeToken(); } @@ -10596,52 +10869,52 @@ var Fo = function(t, e, n) { var n = this.mark(); return this._parseProperty() && this.accept(p.Colon) ? (this.restoreAtMark(n), this._parseDeclaration(e)) : (this.restoreAtMark(n), null); }, t.prototype._parseProperty = function() { - var e = this.create(Ni), n = this.mark(); + var e = this.create(Vi), n = this.mark(); return (this.acceptDelim("*") || this.acceptDelim("_")) && this.hasWhitespace() ? (this.restoreAtMark(n), null) : e.setIdentifier(this._parsePropertyIdentifier()) ? this.finish(e) : null; }, t.prototype._parsePropertyIdentifier = function() { return this._parseIdent(); }, t.prototype._parseCharset = function() { if (!this.peek(p.Charset)) return null; - var e = this.create(W); - return this.consumeToken(), this.accept(p.String) ? this.accept(p.SemiColon) ? this.finish(e) : this.finish(e, S.SemiColonExpected) : this.finish(e, S.IdentifierExpected); + var e = this.create(V); + return this.consumeToken(), this.accept(p.String) ? this.accept(p.SemiColon) ? this.finish(e) : this.finish(e, C.SemiColonExpected) : this.finish(e, C.IdentifierExpected); }, t.prototype._parseImport = function() { if (!this.peekKeyword("@import")) return null; - var e = this.create(zi); - return this.consumeToken(), !e.addChild(this._parseURILiteral()) && !e.addChild(this._parseStringLiteral()) ? this.finish(e, S.URIOrStringExpected) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && e.setMedialist(this._parseMediaQueryList()), this.finish(e)); + var e = this.create(Bi); + return this.consumeToken(), !e.addChild(this._parseURILiteral()) && !e.addChild(this._parseStringLiteral()) ? this.finish(e, C.URIOrStringExpected) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && e.setMedialist(this._parseMediaQueryList()), this.finish(e)); }, t.prototype._parseNamespace = function() { if (!this.peekKeyword("@namespace")) return null; - var e = this.create(Td); - return this.consumeToken(), !e.addChild(this._parseURILiteral()) && (e.addChild(this._parseIdent()), !e.addChild(this._parseURILiteral()) && !e.addChild(this._parseStringLiteral())) ? this.finish(e, S.URIExpected, [p.SemiColon]) : this.accept(p.SemiColon) ? this.finish(e) : this.finish(e, S.SemiColonExpected); + var e = this.create(Xd); + return this.consumeToken(), !e.addChild(this._parseURILiteral()) && (e.addChild(this._parseIdent()), !e.addChild(this._parseURILiteral()) && !e.addChild(this._parseStringLiteral())) ? this.finish(e, C.URIExpected, [p.SemiColon]) : this.accept(p.SemiColon) ? this.finish(e) : this.finish(e, C.SemiColonExpected); }, t.prototype._parseFontFace = function() { if (!this.peekKeyword("@font-face")) return null; - var e = this.create(yl); + var e = this.create(Cl); return this.consumeToken(), this._parseBody(e, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._parseViewPort = function() { if (!this.peekKeyword("@-ms-viewport") && !this.peekKeyword("@-o-viewport") && !this.peekKeyword("@viewport")) return null; - var e = this.create(Nd); + var e = this.create(qd); return this.consumeToken(), this._parseBody(e, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._parseKeyframe = function() { if (!this.peekRegExp(p.AtKeyword, this.keyframeRegex)) return null; - var e = this.create(xl), n = this.create(W); - return this.consumeToken(), e.setKeyword(this.finish(n)), n.matches("@-ms-keyframes") && this.markError(n, S.UnknownKeyword), e.setIdentifier(this._parseKeyframeIdent()) ? this._parseBody(e, this._parseKeyframeSelector.bind(this)) : this.finish(e, S.IdentifierExpected, [p.CurlyR]); + var e = this.create(_l), n = this.create(V); + return this.consumeToken(), e.setKeyword(this.finish(n)), n.matches("@-ms-keyframes") && this.markError(n, C.UnknownKeyword), e.setIdentifier(this._parseKeyframeIdent()) ? this._parseBody(e, this._parseKeyframeSelector.bind(this)) : this.finish(e, C.IdentifierExpected, [p.CurlyR]); }, t.prototype._parseKeyframeIdent = function() { - return this._parseIdent([Y.Keyframe]); + return this._parseIdent([Q.Keyframe]); }, t.prototype._parseKeyframeSelector = function() { - var e = this.create(za); + var e = this.create(Va); if (!e.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return null; for (; this.accept(p.Comma); ) if (!e.addChild(this._parseIdent()) && !this.accept(p.Percentage)) - return this.finish(e, S.PercentageExpected); + return this.finish(e, C.PercentageExpected); return this._parseBody(e, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._tryParseKeyframeSelector = function() { - var e = this.create(za), n = this.mark(); + var e = this.create(Va), n = this.mark(); if (!e.addChild(this._parseIdent()) && !this.accept(p.Percentage)) return null; for (; this.accept(p.Comma); ) @@ -10651,12 +10924,12 @@ var Fo = function(t, e, n) { }, t.prototype._parseSupports = function(e) { if (e === void 0 && (e = !1), !this.peekKeyword("@supports")) return null; - var n = this.create(ri); + var n = this.create(di); return this.consumeToken(), n.addChild(this._parseSupportsCondition()), this._parseBody(n, this._parseSupportsDeclaration.bind(this, e)); }, t.prototype._parseSupportsDeclaration = function(e) { return e === void 0 && (e = !1), e ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); }, t.prototype._parseSupportsCondition = function() { - var e = this.create(un); + var e = this.create(fn); if (this.acceptIdent("not")) e.addChild(this._parseSupportsConditionInParens()); else if (e.addChild(this._parseSupportsConditionInParens()), this.peekRegExp(p.Ident, /^(and|or)$/i)) @@ -10664,9 +10937,9 @@ var Fo = function(t, e, n) { e.addChild(this._parseSupportsConditionInParens()); return this.finish(e); }, t.prototype._parseSupportsConditionInParens = function() { - var e = this.create(un); + var e = this.create(fn); if (this.accept(p.ParenthesisL)) - return this.prevToken && (e.lParent = this.prevToken.offset), !e.addChild(this._tryToParseDeclaration([p.ParenthesisR])) && !this._parseSupportsCondition() ? this.finish(e, S.ConditionExpected) : this.accept(p.ParenthesisR) ? (this.prevToken && (e.rParent = this.prevToken.offset), this.finish(e)) : this.finish(e, S.RightParenthesisExpected, [p.ParenthesisR], []); + return this.prevToken && (e.lParent = this.prevToken.offset), !e.addChild(this._tryToParseDeclaration([p.ParenthesisR])) && !this._parseSupportsCondition() ? this.finish(e, C.ConditionExpected) : this.accept(p.ParenthesisR) ? (this.prevToken && (e.rParent = this.prevToken.offset), this.finish(e)) : this.finish(e, C.RightParenthesisExpected, [p.ParenthesisR], []); if (this.peek(p.Ident)) { var n = this.mark(); if (this.consumeToken(), !this.hasWhitespace() && this.accept(p.ParenthesisL)) { @@ -10676,24 +10949,24 @@ var Fo = function(t, e, n) { } else this.restoreAtMark(n); } - return this.finish(e, S.LeftParenthesisExpected, [], [p.ParenthesisL]); + return this.finish(e, C.LeftParenthesisExpected, [], [p.ParenthesisL]); }, t.prototype._parseMediaDeclaration = function(e) { return e === void 0 && (e = !1), e ? this._tryParseRuleset(!0) || this._tryToParseDeclaration() || this._parseStylesheetStatement(!0) : this._parseStylesheetStatement(!1); }, t.prototype._parseMedia = function(e) { if (e === void 0 && (e = !1), !this.peekKeyword("@media")) return null; - var n = this.create(Sl); - return this.consumeToken(), n.addChild(this._parseMediaQueryList()) ? this._parseBody(n, this._parseMediaDeclaration.bind(this, e)) : this.finish(n, S.MediaQueryExpected); + var n = this.create(Rl); + return this.consumeToken(), n.addChild(this._parseMediaQueryList()) ? this._parseBody(n, this._parseMediaDeclaration.bind(this, e)) : this.finish(n, C.MediaQueryExpected); }, t.prototype._parseMediaQueryList = function() { - var e = this.create(Cl); + var e = this.create(Fl); if (!e.addChild(this._parseMediaQuery())) - return this.finish(e, S.MediaQueryExpected); + return this.finish(e, C.MediaQueryExpected); for (; this.accept(p.Comma); ) if (!e.addChild(this._parseMediaQuery())) - return this.finish(e, S.MediaQueryExpected); + return this.finish(e, C.MediaQueryExpected); return this.finish(e); }, t.prototype._parseMediaQuery = function() { - var e = this.create(kl), n = this.mark(); + var e = this.create(El), n = this.mark(); if (this.acceptIdent("not"), this.peek(p.ParenthesisL)) this.restoreAtMark(n), e.addChild(this._parseMediaCondition()); else { @@ -10703,81 +10976,81 @@ var Fo = function(t, e, n) { } return this.finish(e); }, t.prototype._parseRatio = function() { - var e = this.mark(), n = this.create($d); - return this._parseNumeric() ? this.acceptDelim("/") ? this._parseNumeric() ? this.finish(n) : this.finish(n, S.NumberExpected) : (this.restoreAtMark(e), null) : null; + var e = this.mark(), n = this.create(ru); + return this._parseNumeric() ? this.acceptDelim("/") ? this._parseNumeric() ? this.finish(n) : this.finish(n, C.NumberExpected) : (this.restoreAtMark(e), null) : null; }, t.prototype._parseMediaCondition = function() { - var e = this.create(Od); + var e = this.create(Kd); this.acceptIdent("not"); for (var n = !0; n; ) { if (!this.accept(p.ParenthesisL)) - return this.finish(e, S.LeftParenthesisExpected, [], [p.CurlyL]); + return this.finish(e, C.LeftParenthesisExpected, [], [p.CurlyL]); if (this.peek(p.ParenthesisL) || this.peekIdent("not") ? e.addChild(this._parseMediaCondition()) : e.addChild(this._parseMediaFeature()), !this.accept(p.ParenthesisR)) - return this.finish(e, S.RightParenthesisExpected, [], [p.CurlyL]); + return this.finish(e, C.RightParenthesisExpected, [], [p.CurlyL]); n = this.acceptIdent("and") || this.acceptIdent("or"); } return this.finish(e); }, t.prototype._parseMediaFeature = function() { - var e = this, n = [p.ParenthesisR], r = this.create(Ud), i = function() { + var e = this, n = [p.ParenthesisR], r = this.create(Qd), i = function() { return e.acceptDelim("<") || e.acceptDelim(">") ? (e.hasWhitespace() || e.acceptDelim("="), !0) : !!e.acceptDelim("="); }; if (r.addChild(this._parseMediaFeatureName())) { if (this.accept(p.Colon)) { if (!r.addChild(this._parseMediaFeatureValue())) - return this.finish(r, S.TermExpected, [], n); + return this.finish(r, C.TermExpected, [], n); } else if (i()) { if (!r.addChild(this._parseMediaFeatureValue())) - return this.finish(r, S.TermExpected, [], n); + return this.finish(r, C.TermExpected, [], n); if (i() && !r.addChild(this._parseMediaFeatureValue())) - return this.finish(r, S.TermExpected, [], n); + return this.finish(r, C.TermExpected, [], n); } } else if (r.addChild(this._parseMediaFeatureValue())) { if (!i()) - return this.finish(r, S.OperatorExpected, [], n); + return this.finish(r, C.OperatorExpected, [], n); if (!r.addChild(this._parseMediaFeatureName())) - return this.finish(r, S.IdentifierExpected, [], n); + return this.finish(r, C.IdentifierExpected, [], n); if (i() && !r.addChild(this._parseMediaFeatureValue())) - return this.finish(r, S.TermExpected, [], n); + return this.finish(r, C.TermExpected, [], n); } else - return this.finish(r, S.IdentifierExpected, [], n); + return this.finish(r, C.IdentifierExpected, [], n); return this.finish(r); }, t.prototype._parseMediaFeatureName = function() { return this._parseIdent(); }, t.prototype._parseMediaFeatureValue = function() { return this._parseRatio() || this._parseTermExpression(); }, t.prototype._parseMedium = function() { - var e = this.create(W); + var e = this.create(V); return e.addChild(this._parseIdent()) ? this.finish(e) : null; }, t.prototype._parsePageDeclaration = function() { return this._parsePageMarginBox() || this._parseRuleSetDeclaration(); }, t.prototype._parsePage = function() { if (!this.peekKeyword("@page")) return null; - var e = this.create(Vd); + var e = this.create(Zd); if (this.consumeToken(), e.addChild(this._parsePageSelector())) { for (; this.accept(p.Comma); ) if (!e.addChild(this._parsePageSelector())) - return this.finish(e, S.IdentifierExpected); + return this.finish(e, C.IdentifierExpected); } return this._parseBody(e, this._parsePageDeclaration.bind(this)); }, t.prototype._parsePageMarginBox = function() { if (!this.peek(p.AtKeyword)) return null; - var e = this.create(Bd); - return this.acceptOneKeyword(vu) || this.markError(e, S.UnknownAtRule, [], [p.CurlyL]), this._parseBody(e, this._parseRuleSetDeclaration.bind(this)); + var e = this.create(eu); + return this.acceptOneKeyword(Au) || this.markError(e, C.UnknownAtRule, [], [p.CurlyL]), this._parseBody(e, this._parseRuleSetDeclaration.bind(this)); }, t.prototype._parsePageSelector = function() { if (!this.peek(p.Ident) && !this.peek(p.Colon)) return null; - var e = this.create(W); - return e.addChild(this._parseIdent()), this.accept(p.Colon) && !e.addChild(this._parseIdent()) ? this.finish(e, S.IdentifierExpected) : this.finish(e); + var e = this.create(V); + return e.addChild(this._parseIdent()), this.accept(p.Colon) && !e.addChild(this._parseIdent()) ? this.finish(e, C.IdentifierExpected) : this.finish(e); }, t.prototype._parseDocument = function() { if (!this.peekKeyword("@-moz-document")) return null; - var e = this.create(Wd); + var e = this.create(Yd); return this.consumeToken(), this.resync([], [p.CurlyL]), this._parseBody(e, this._parseStylesheetStatement.bind(this)); }, t.prototype._parseUnknownAtRule = function() { if (!this.peek(p.AtKeyword)) return null; - var e = this.create(Fl); + var e = this.create(Al); e.addChild(this._parseUnknownAtRuleName()); var n = function() { return i === 0 && s === 0 && a === 0; @@ -10790,22 +11063,22 @@ var Fo = function(t, e, n) { break e; break; case p.EOF: - return i > 0 ? this.finish(e, S.RightCurlyExpected) : a > 0 ? this.finish(e, S.RightSquareBracketExpected) : s > 0 ? this.finish(e, S.RightParenthesisExpected) : this.finish(e); + return i > 0 ? this.finish(e, C.RightCurlyExpected) : a > 0 ? this.finish(e, C.RightSquareBracketExpected) : s > 0 ? this.finish(e, C.RightParenthesisExpected) : this.finish(e); case p.CurlyL: r++, i++; break; case p.CurlyR: if (i--, r > 0 && i === 0) { if (this.consumeToken(), a > 0) - return this.finish(e, S.RightSquareBracketExpected); + return this.finish(e, C.RightSquareBracketExpected); if (s > 0) - return this.finish(e, S.RightParenthesisExpected); + return this.finish(e, C.RightParenthesisExpected); break e; } if (i < 0) { if (s === 0 && a === 0) break e; - return this.finish(e, S.LeftCurlyExpected); + return this.finish(e, C.LeftCurlyExpected); } break; case p.ParenthesisL: @@ -10813,21 +11086,21 @@ var Fo = function(t, e, n) { break; case p.ParenthesisR: if (s--, s < 0) - return this.finish(e, S.LeftParenthesisExpected); + return this.finish(e, C.LeftParenthesisExpected); break; case p.BracketL: a++; break; case p.BracketR: if (a--, a < 0) - return this.finish(e, S.LeftSquareBracketExpected); + return this.finish(e, C.LeftSquareBracketExpected); break; } this.consumeToken(); } return e; }, t.prototype._parseUnknownAtRuleName = function() { - var e = this.create(W); + var e = this.create(V); return this.accept(p.AtKeyword) ? this.finish(e) : e; }, t.prototype._parseOperator = function() { if (this.peekDelim("/") || this.peekDelim("*") || this.peekDelim("+") || this.peekDelim("-") || this.peek(p.Dashmatch) || this.peek(p.Includes) || this.peek(p.SubstringOperator) || this.peek(p.PrefixOperator) || this.peek(p.SuffixOperator) || this.peekDelim("=")) { @@ -10838,11 +11111,11 @@ var Fo = function(t, e, n) { }, t.prototype._parseUnaryOperator = function() { if (!this.peekDelim("+") && !this.peekDelim("-")) return null; - var e = this.create(W); + var e = this.create(V); return this.consumeToken(), this.finish(e); }, t.prototype._parseCombinator = function() { if (this.peekDelim(">")) { - var e = this.create(W); + var e = this.create(V); this.consumeToken(); var n = this.mark(); if (!this.hasWhitespace() && this.acceptDelim(">")) { @@ -10852,13 +11125,13 @@ var Fo = function(t, e, n) { } return e.type = v.SelectorCombinatorParent, this.finish(e); } else if (this.peekDelim("+")) { - var e = this.create(W); + var e = this.create(V); return this.consumeToken(), e.type = v.SelectorCombinatorSibling, this.finish(e); } else if (this.peekDelim("~")) { - var e = this.create(W); + var e = this.create(V); return this.consumeToken(), e.type = v.SelectorCombinatorAllSiblings, this.finish(e); } else if (this.peekDelim("/")) { - var e = this.create(W); + var e = this.create(V); this.consumeToken(); var n = this.mark(); if (!this.hasWhitespace() && this.acceptIdent("deep") && !this.hasWhitespace() && this.acceptDelim("/")) @@ -10867,7 +11140,7 @@ var Fo = function(t, e, n) { } return null; }, t.prototype._parseSimpleSelector = function() { - var e = this.create(jt), n = 0; + var e = this.create(qt), n = 0; for (e.addChild(this._parseElementName()) && n++; (n === 0 || !this.hasWhitespace()) && e.addChild(this._parseSimpleSelectorBody()); ) n++; return n > 0 ? this.finish(e) : null; @@ -10881,7 +11154,7 @@ var Fo = function(t, e, n) { var e = this.createNode(v.IdentifierSelector); if (this.acceptDelim("#")) { if (this.hasWhitespace() || !e.addChild(this._parseSelectorIdent())) - return this.finish(e, S.IdentifierExpected); + return this.finish(e, C.IdentifierExpected); } else this.consumeToken(); return this.finish(e); @@ -10889,7 +11162,7 @@ var Fo = function(t, e, n) { if (!this.peekDelim(".")) return null; var e = this.createNode(v.ClassSelector); - return this.consumeToken(), this.hasWhitespace() || !e.addChild(this._parseSelectorIdent()) ? this.finish(e, S.IdentifierExpected) : this.finish(e); + return this.consumeToken(), this.hasWhitespace() || !e.addChild(this._parseSelectorIdent()) ? this.finish(e, C.IdentifierExpected) : this.finish(e); }, t.prototype._parseElementName = function() { var e = this.mark(), n = this.createNode(v.ElementNameSelector); return n.addChild(this._parseNamespacePrefix()), !n.addChild(this._parseSelectorIdent()) && !this.acceptDelim("*") ? (this.restoreAtMark(e), null) : this.finish(n); @@ -10899,14 +11172,14 @@ var Fo = function(t, e, n) { }, t.prototype._parseAttrib = function() { if (!this.peek(p.BracketL)) return null; - var e = this.create(qd); - return this.consumeToken(), e.setNamespacePrefix(this._parseNamespacePrefix()), e.setIdentifier(this._parseIdent()) ? (e.setOperator(this._parseOperator()) && (e.setValue(this._parseBinaryExpr()), this.acceptIdent("i"), this.acceptIdent("s")), this.accept(p.BracketR) ? this.finish(e) : this.finish(e, S.RightSquareBracketExpected)) : this.finish(e, S.IdentifierExpected); + var e = this.create(nu); + return this.consumeToken(), e.setNamespacePrefix(this._parseNamespacePrefix()), e.setIdentifier(this._parseIdent()) ? (e.setOperator(this._parseOperator()) && (e.setValue(this._parseBinaryExpr()), this.acceptIdent("i"), this.acceptIdent("s")), this.accept(p.BracketR) ? this.finish(e) : this.finish(e, C.RightSquareBracketExpected)) : this.finish(e, C.IdentifierExpected); }, t.prototype._parsePseudo = function() { var e = this, n = this._tryParsePseudoIdentifier(); if (n) { if (!this.hasWhitespace() && this.accept(p.ParenthesisL)) { var r = function() { - var i = e.create(W); + var i = e.create(V); if (!i.addChild(e._parseSelector(!1))) return null; for (; e.accept(p.Comma) && i.addChild(e._parseSelector(!1)); ) @@ -10914,7 +11187,7 @@ var Fo = function(t, e, n) { return e.peek(p.ParenthesisR) ? e.finish(i) : null; }; if (n.addChild(this.try(r) || this._parseBinaryExpr()), !this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.RightParenthesisExpected); } return this.finish(n); } @@ -10923,7 +11196,7 @@ var Fo = function(t, e, n) { if (!this.peek(p.Colon)) return null; var e = this.mark(), n = this.createNode(v.PseudoSelector); - return this.consumeToken(), this.hasWhitespace() ? (this.restoreAtMark(e), null) : (this.accept(p.Colon), this.hasWhitespace() || !n.addChild(this._parseIdent()) ? this.finish(n, S.IdentifierExpected) : this.finish(n)); + return this.consumeToken(), this.hasWhitespace() ? (this.restoreAtMark(e), null) : (this.accept(p.Colon), this.hasWhitespace() || !n.addChild(this._parseIdent()) ? this.finish(n, C.IdentifierExpected) : this.finish(n)); }, t.prototype._tryParsePrio = function() { var e = this.mark(), n = this._parsePrio(); return n || (this.restoreAtMark(e), null); @@ -10934,7 +11207,7 @@ var Fo = function(t, e, n) { return this.accept(p.Exclamation) && this.acceptIdent("important") ? this.finish(e) : null; }, t.prototype._parseExpr = function(e) { e === void 0 && (e = !1); - var n = this.create(_l); + var n = this.create(Dl); if (!n.addChild(this._parseBinaryExpr())) return null; for (; ; ) { @@ -10951,7 +11224,7 @@ var Fo = function(t, e, n) { }, t.prototype._parseUnicodeRange = function() { if (!this.peekIdent("u")) return null; - var e = this.create(Sd); + var e = this.create(Pd); return this.acceptUnicodeRange() ? this.finish(e) : null; }, t.prototype._parseNamedLine = function() { if (!this.peek(p.BracketL)) @@ -10959,31 +11232,31 @@ var Fo = function(t, e, n) { var e = this.createNode(v.GridLine); for (this.consumeToken(); e.addChild(this._parseIdent()); ) ; - return this.accept(p.BracketR) ? this.finish(e) : this.finish(e, S.RightSquareBracketExpected); + return this.accept(p.BracketR) ? this.finish(e) : this.finish(e, C.RightSquareBracketExpected); }, t.prototype._parseBinaryExpr = function(e, n) { - var r = this.create(Pi); + var r = this.create(ji); if (!r.setLeft(e || this._parseTerm())) return null; if (!r.setOperator(n || this._parseOperator())) return this.finish(r); if (!r.setRight(this._parseTerm())) - return this.finish(r, S.TermExpected); + return this.finish(r, C.TermExpected); r = this.finish(r); var i = this._parseOperator(); return i && (r = this._parseBinaryExpr(r, i)), this.finish(r); }, t.prototype._parseTerm = function() { - var e = this.create(jd); + var e = this.create(tu); return e.setOperator(this._parseUnaryOperator()), e.setExpression(this._parseTermExpression()) ? this.finish(e) : null; }, t.prototype._parseTermExpression = function() { return this._parseURILiteral() || this._parseUnicodeRange() || this._parseFunction() || this._parseIdent() || this._parseStringLiteral() || this._parseNumeric() || this._parseHexColor() || this._parseOperation() || this._parseNamedLine(); }, t.prototype._parseOperation = function() { if (!this.peek(p.ParenthesisL)) return null; - var e = this.create(W); - return this.consumeToken(), e.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(e) : this.finish(e, S.RightParenthesisExpected); + var e = this.create(V); + return this.consumeToken(), e.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(e) : this.finish(e, C.RightParenthesisExpected); }, t.prototype._parseNumeric = function() { if (this.peek(p.Num) || this.peek(p.Percentage) || this.peek(p.Resolution) || this.peek(p.Length) || this.peek(p.EMS) || this.peek(p.EXS) || this.peek(p.Angle) || this.peek(p.Time) || this.peek(p.Dimension) || this.peek(p.Freq)) { - var e = this.create(Li); + var e = this.create($i); return this.consumeToken(), this.finish(e); } return null; @@ -10996,30 +11269,30 @@ var Fo = function(t, e, n) { if (!this.peekRegExp(p.Ident, /^url(-prefix)?$/i)) return null; var e = this.mark(), n = this.createNode(v.URILiteral); - return this.accept(p.Ident), this.hasWhitespace() || !this.peek(p.ParenthesisL) ? (this.restoreAtMark(e), null) : (this.scanner.inURL = !0, this.consumeToken(), n.addChild(this._parseURLArgument()), this.scanner.inURL = !1, this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, S.RightParenthesisExpected)); + return this.accept(p.Ident), this.hasWhitespace() || !this.peek(p.ParenthesisL) ? (this.restoreAtMark(e), null) : (this.scanner.inURL = !0, this.consumeToken(), n.addChild(this._parseURLArgument()), this.scanner.inURL = !1, this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, C.RightParenthesisExpected)); }, t.prototype._parseURLArgument = function() { - var e = this.create(W); + var e = this.create(V); return !this.accept(p.String) && !this.accept(p.BadString) && !this.acceptUnquotedString() ? null : this.finish(e); }, t.prototype._parseIdent = function(e) { if (!this.peek(p.Ident)) return null; - var n = this.create(Oe); + var n = this.create(Ue); return e && (n.referenceTypes = e), n.isCustomProperty = this.peekRegExp(p.Ident, /^--/), this.consumeToken(), this.finish(n); }, t.prototype._parseFunction = function() { - var e = this.mark(), n = this.create(Rn); + var e = this.mark(), n = this.create(zn); if (!n.setIdentifier(this._parseFunctionIdentifier())) return null; if (this.hasWhitespace() || !this.accept(p.ParenthesisL)) return this.restoreAtMark(e), null; if (n.getArguments().addChild(this._parseFunctionArgument())) for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) - n.getArguments().addChild(this._parseFunctionArgument()) || this.markError(n, S.ExpressionExpected); - return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, S.RightParenthesisExpected); + n.getArguments().addChild(this._parseFunctionArgument()) || this.markError(n, C.ExpressionExpected); + return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, C.RightParenthesisExpected); }, t.prototype._parseFunctionIdentifier = function() { if (!this.peek(p.Ident)) return null; - var e = this.create(Oe); - if (e.referenceTypes = [Y.Function], this.acceptIdent("progid")) { + var e = this.create(Ue); + if (e.referenceTypes = [Q.Function], this.acceptIdent("progid")) { if (this.accept(p.Colon)) for (; this.accept(p.Ident) && this.acceptDelim("."); ) ; @@ -11027,17 +11300,17 @@ var Fo = function(t, e, n) { } return this.consumeToken(), this.finish(e); }, t.prototype._parseFunctionArgument = function() { - var e = this.create(Gt); + var e = this.create(Xt); return e.setValue(this._parseExpr(!0)) ? this.finish(e) : null; }, t.prototype._parseHexColor = function() { if (this.peekRegExp(p.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) { - var e = this.create(Ii); + var e = this.create(qi); return this.consumeToken(), this.finish(e); } else return null; }, t; }(); -function yu(t, e) { +function Nu(t, e) { var n = 0, r = t.length; if (r === 0) return 0; @@ -11047,20 +11320,20 @@ function yu(t, e) { } return n; } -function Pl(t, e) { +function Wl(t, e) { return t.indexOf(e) !== -1; } -function Ln() { +function jn() { for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e]; for (var n = [], r = 0, i = t; r < i.length; r++) for (var s = i[r], a = 0, o = s; a < o.length; a++) { var l = o[a]; - Pl(n, l) || n.push(l); + Wl(n, l) || n.push(l); } return n; } -var wu = function() { +var Mu = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -11078,7 +11351,7 @@ var wu = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), Il = function() { +}(), Ol = function() { function t(e, n) { this.offset = e, this.length = n, this.symbols = [], this.parent = null, this.children = []; } @@ -11090,7 +11363,7 @@ var wu = function() { return n === void 0 && (n = 0), this.offset <= e && this.offset + this.length > e + n || this.offset === e && this.length === n ? this.findInScope(e, n) : null; }, t.prototype.findInScope = function(e, n) { n === void 0 && (n = 0); - var r = e + n, i = yu(this.children, function(a) { + var r = e + n, i = Nu(this.children, function(a) { return a.offset > r; }); if (i === 0) @@ -11109,31 +11382,31 @@ var wu = function() { }, t.prototype.getSymbols = function() { return this.symbols; }, t; -}(), xu = function(t) { - wu(e, t); +}(), zu = function(t) { + Mu(e, t); function e() { return t.call(this, 0, Number.MAX_VALUE) || this; } return e; -}(Il), Tn = function() { +}(Ol), qn = function() { function t(e, n, r, i) { this.name = e, this.value = n, this.node = r, this.type = i; } return t; -}(), Su = function() { +}(), Pu = function() { function t(e) { this.scope = e; } return t.prototype.addSymbol = function(e, n, r, i) { if (e.offset !== -1) { var s = this.scope.findScope(e.offset, e.length); - s && s.addSymbol(new Tn(n, r, e, i)); + s && s.addSymbol(new qn(n, r, e, i)); } }, t.prototype.addScope = function(e) { if (e.offset !== -1) { var n = this.scope.findScope(e.offset, e.length); if (n && (n.offset !== e.offset || n.length !== e.length)) { - var r = new Il(e.offset, e.length); + var r = new Ol(e.offset, e.length); return n.addChild(r), r; } return n; @@ -11142,12 +11415,12 @@ var wu = function() { }, t.prototype.addSymbolToChildScope = function(e, n, r, i, s) { if (e && e.offset !== -1) { var a = this.addScope(e); - a && a.addSymbol(new Tn(r, i, n, s)); + a && a.addSymbol(new qn(r, i, n, s)); } }, t.prototype.visitNode = function(e) { switch (e.type) { case v.Keyframe: - return this.addSymbol(e, e.getName(), void 0, Y.Keyframe), !0; + return this.addSymbol(e, e.getName(), void 0, Q.Keyframe), !0; case v.CustomPropertyDeclaration: return this.visitCustomPropertyDeclarationNode(e); case v.VariableDeclaration: @@ -11155,22 +11428,22 @@ var wu = function() { case v.Ruleset: return this.visitRuleSet(e); case v.MixinDeclaration: - return this.addSymbol(e, e.getName(), void 0, Y.Mixin), !0; + return this.addSymbol(e, e.getName(), void 0, Q.Mixin), !0; case v.FunctionDeclaration: - return this.addSymbol(e, e.getName(), void 0, Y.Function), !0; + return this.addSymbol(e, e.getName(), void 0, Q.Function), !0; case v.FunctionParameter: return this.visitFunctionParameterNode(e); case v.Declarations: return this.addScope(e), !0; case v.For: var n = e, r = n.getDeclarations(); - return r && n.variable && this.addSymbolToChildScope(r, n.variable, n.variable.getName(), void 0, Y.Variable), !0; + return r && n.variable && this.addSymbolToChildScope(r, n.variable, n.variable.getName(), void 0, Q.Variable), !0; case v.Each: { var i = e, s = i.getDeclarations(); if (s) for (var a = i.getVariables().getChildren(), o = 0, l = a; o < l.length; o++) { var c = l[o]; - this.addSymbolToChildScope(s, c, c.getName(), void 0, Y.Variable); + this.addSymbolToChildScope(s, c, c.getName(), void 0, Q.Variable); } return !0; } @@ -11181,28 +11454,28 @@ var wu = function() { if (n) for (var r = 0, i = e.getSelectors().getChildren(); r < i.length; r++) { var s = i[r]; - s instanceof Fn && s.getChildren().length === 1 && n.addSymbol(new Tn(s.getChild(0).getText(), void 0, s, Y.Rule)); + s instanceof Mn && s.getChildren().length === 1 && n.addSymbol(new qn(s.getChild(0).getText(), void 0, s, Q.Rule)); } return !0; }, t.prototype.visitVariableDeclarationNode = function(e) { var n = e.getValue() ? e.getValue().getText() : void 0; - return this.addSymbol(e, e.getName(), n, Y.Variable), !0; + return this.addSymbol(e, e.getName(), n, Q.Variable), !0; }, t.prototype.visitFunctionParameterNode = function(e) { var n = e.getParent().getDeclarations(); if (n) { var r = e.getDefaultValue(), i = r ? r.getText() : void 0; - this.addSymbolToChildScope(n, e, e.getName(), i, Y.Variable); + this.addSymbolToChildScope(n, e, e.getName(), i, Q.Variable); } return !0; }, t.prototype.visitCustomPropertyDeclarationNode = function(e) { var n = e.getValue() ? e.getValue().getText() : ""; - return this.addCSSVariable(e.getProperty(), e.getProperty().getName(), n, Y.Variable), !0; + return this.addCSSVariable(e.getProperty(), e.getProperty().getName(), n, Q.Variable), !0; }, t.prototype.addCSSVariable = function(e, n, r, i) { - e.offset !== -1 && this.scope.addSymbol(new Tn(n, r, e, i)); + e.offset !== -1 && this.scope.addSymbol(new qn(n, r, e, i)); }, t; -}(), fi = function() { +}(), Si = function() { function t(e) { - this.global = new xu(), e.acceptVisitor(new Su(this.global)); + this.global = new zu(), e.acceptVisitor(new Pu(this.global)); } return t.prototype.findSymbolsAtOffset = function(e, n) { for (var r = this.global.findScope(e, 0), i = [], s = {}; r; ) { @@ -11215,10 +11488,10 @@ var wu = function() { return i; }, t.prototype.internalFindSymbol = function(e, n) { var r = e; - if (e.parent instanceof pr && e.parent.getParent() instanceof ae && (r = e.parent.getParent().getDeclarations()), e.parent instanceof Gt && e.parent.getParent() instanceof Rn) { + if (e.parent instanceof vr && e.parent.getParent() instanceof ce && (r = e.parent.getParent().getDeclarations()), e.parent instanceof Xt && e.parent.getParent() instanceof zn) { var i = e.parent.getParent().getIdentifier(); if (i) { - var s = this.internalFindSymbol(i, [Y.Function]); + var s = this.internalFindSymbol(i, [Q.Function]); s && (r = s.node.getDeclarations()); } } @@ -11234,22 +11507,22 @@ var wu = function() { } return null; }, t.prototype.evaluateReferenceTypes = function(e) { - if (e instanceof Oe) { + if (e instanceof Ue) { var n = e.referenceTypes; if (n) return n; if (e.isCustomProperty) - return [Y.Variable]; - var r = xd(e); + return [Q.Variable]; + var r = zd(e); if (r) { var i = r.getNonPrefixedPropertyName(); if ((i === "animation" || i === "animation-name") && r.getValue() && r.getValue().offset === e.offset) - return [Y.Keyframe]; + return [Q.Keyframe]; } - } else if (e instanceof Ti) - return [Y.Variable]; + } else if (e instanceof Hi) + return [Q.Variable]; var s = e.findAParent(v.Selector, v.ExtendsReference); - return s ? [Y.Rule] : null; + return s ? [Q.Rule] : null; }, t.prototype.findSymbolFromNode = function(e) { if (!e) return null; @@ -11278,15 +11551,15 @@ var wu = function() { } return null; }, t; -}(), Ll; -Ll = (() => { +}(), Ul; +Ul = (() => { var t = { 470: (r) => { function i(o) { if (typeof o != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(o)); } function s(o, l) { - for (var c, h = "", u = 0, f = -1, m = 0, g = 0; g <= o.length; ++g) { + for (var c, h = "", u = 0, m = -1, f = 0, g = 0; g <= o.length; ++g) { if (g < o.length) c = o.charCodeAt(g); else { @@ -11295,26 +11568,26 @@ Ll = (() => { c = 47; } if (c === 47) { - if (!(f === g - 1 || m === 1)) - if (f !== g - 1 && m === 2) { + if (!(m === g - 1 || f === 1)) + if (m !== g - 1 && f === 2) { if (h.length < 2 || u !== 2 || h.charCodeAt(h.length - 1) !== 46 || h.charCodeAt(h.length - 2) !== 46) { if (h.length > 2) { var b = h.lastIndexOf("/"); if (b !== h.length - 1) { - b === -1 ? (h = "", u = 0) : u = (h = h.slice(0, b)).length - 1 - h.lastIndexOf("/"), f = g, m = 0; + b === -1 ? (h = "", u = 0) : u = (h = h.slice(0, b)).length - 1 - h.lastIndexOf("/"), m = g, f = 0; continue; } } else if (h.length === 2 || h.length === 1) { - h = "", u = 0, f = g, m = 0; + h = "", u = 0, m = g, f = 0; continue; } } l && (h.length > 0 ? h += "/.." : h = "..", u = 2); } else - h.length > 0 ? h += "/" + o.slice(f + 1, g) : h = o.slice(f + 1, g), u = g - f - 1; - f = g, m = 0; + h.length > 0 ? h += "/" + o.slice(m + 1, g) : h = o.slice(m + 1, g), u = g - m - 1; + m = g, f = 0; } else - c === 46 && m !== -1 ? ++m : m = -1; + c === 46 && f !== -1 ? ++f : f = -1; } return h; } @@ -11344,37 +11617,37 @@ Ll = (() => { return ""; for (var c = 1; c < o.length && o.charCodeAt(c) === 47; ++c) ; - for (var h = o.length, u = h - c, f = 1; f < l.length && l.charCodeAt(f) === 47; ++f) + for (var h = o.length, u = h - c, m = 1; m < l.length && l.charCodeAt(m) === 47; ++m) ; - for (var m = l.length - f, g = u < m ? u : m, b = -1, y = 0; y <= g; ++y) { + for (var f = l.length - m, g = u < f ? u : f, b = -1, y = 0; y <= g; ++y) { if (y === g) { - if (m > g) { - if (l.charCodeAt(f + y) === 47) - return l.slice(f + y + 1); + if (f > g) { + if (l.charCodeAt(m + y) === 47) + return l.slice(m + y + 1); if (y === 0) - return l.slice(f + y); + return l.slice(m + y); } else u > g && (o.charCodeAt(c + y) === 47 ? b = y : y === 0 && (b = 0)); break; } - var w = o.charCodeAt(c + y); - if (w !== l.charCodeAt(f + y)) + var x = o.charCodeAt(c + y); + if (x !== l.charCodeAt(m + y)) break; - w === 47 && (b = y); + x === 47 && (b = y); } - var x = ""; + var S = ""; for (y = c + b + 1; y <= h; ++y) - y !== h && o.charCodeAt(y) !== 47 || (x.length === 0 ? x += ".." : x += "/.."); - return x.length > 0 ? x + l.slice(f + b) : (f += b, l.charCodeAt(f) === 47 && ++f, l.slice(f)); + y !== h && o.charCodeAt(y) !== 47 || (S.length === 0 ? S += ".." : S += "/.."); + return S.length > 0 ? S + l.slice(m + b) : (m += b, l.charCodeAt(m) === 47 && ++m, l.slice(m)); }, _makeLong: function(o) { return o; }, dirname: function(o) { if (i(o), o.length === 0) return "."; - for (var l = o.charCodeAt(0), c = l === 47, h = -1, u = !0, f = o.length - 1; f >= 1; --f) - if ((l = o.charCodeAt(f)) === 47) { + for (var l = o.charCodeAt(0), c = l === 47, h = -1, u = !0, m = o.length - 1; m >= 1; --m) + if ((l = o.charCodeAt(m)) === 47) { if (!u) { - h = f; + h = m; break; } } else @@ -11384,44 +11657,44 @@ Ll = (() => { if (l !== void 0 && typeof l != "string") throw new TypeError('"ext" argument must be a string'); i(o); - var c, h = 0, u = -1, f = !0; + var c, h = 0, u = -1, m = !0; if (l !== void 0 && l.length > 0 && l.length <= o.length) { if (l.length === o.length && l === o) return ""; - var m = l.length - 1, g = -1; + var f = l.length - 1, g = -1; for (c = o.length - 1; c >= 0; --c) { var b = o.charCodeAt(c); if (b === 47) { - if (!f) { + if (!m) { h = c + 1; break; } } else - g === -1 && (f = !1, g = c + 1), m >= 0 && (b === l.charCodeAt(m) ? --m == -1 && (u = c) : (m = -1, u = g)); + g === -1 && (m = !1, g = c + 1), f >= 0 && (b === l.charCodeAt(f) ? --f == -1 && (u = c) : (f = -1, u = g)); } return h === u ? u = g : u === -1 && (u = o.length), o.slice(h, u); } for (c = o.length - 1; c >= 0; --c) if (o.charCodeAt(c) === 47) { - if (!f) { + if (!m) { h = c + 1; break; } } else - u === -1 && (f = !1, u = c + 1); + u === -1 && (m = !1, u = c + 1); return u === -1 ? "" : o.slice(h, u); }, extname: function(o) { i(o); - for (var l = -1, c = 0, h = -1, u = !0, f = 0, m = o.length - 1; m >= 0; --m) { - var g = o.charCodeAt(m); + for (var l = -1, c = 0, h = -1, u = !0, m = 0, f = o.length - 1; f >= 0; --f) { + var g = o.charCodeAt(f); if (g !== 47) - h === -1 && (u = !1, h = m + 1), g === 46 ? l === -1 ? l = m : f !== 1 && (f = 1) : l !== -1 && (f = -1); + h === -1 && (u = !1, h = f + 1), g === 46 ? l === -1 ? l = f : m !== 1 && (m = 1) : l !== -1 && (m = -1); else if (!u) { - c = m + 1; + c = f + 1; break; } } - return l === -1 || h === -1 || f === 0 || f === 1 && l === h - 1 && l === c + 1 ? "" : o.slice(l, h); + return l === -1 || h === -1 || m === 0 || m === 1 && l === h - 1 && l === c + 1 ? "" : o.slice(l, h); }, format: function(o) { if (o === null || typeof o != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof o); @@ -11436,199 +11709,199 @@ Ll = (() => { return l; var c, h = o.charCodeAt(0), u = h === 47; u ? (l.root = "/", c = 1) : c = 0; - for (var f = -1, m = 0, g = -1, b = !0, y = o.length - 1, w = 0; y >= c; --y) + for (var m = -1, f = 0, g = -1, b = !0, y = o.length - 1, x = 0; y >= c; --y) if ((h = o.charCodeAt(y)) !== 47) - g === -1 && (b = !1, g = y + 1), h === 46 ? f === -1 ? f = y : w !== 1 && (w = 1) : f !== -1 && (w = -1); + g === -1 && (b = !1, g = y + 1), h === 46 ? m === -1 ? m = y : x !== 1 && (x = 1) : m !== -1 && (x = -1); else if (!b) { - m = y + 1; + f = y + 1; break; } - return f === -1 || g === -1 || w === 0 || w === 1 && f === g - 1 && f === m + 1 ? g !== -1 && (l.base = l.name = m === 0 && u ? o.slice(1, g) : o.slice(m, g)) : (m === 0 && u ? (l.name = o.slice(1, f), l.base = o.slice(1, g)) : (l.name = o.slice(m, f), l.base = o.slice(m, g)), l.ext = o.slice(f, g)), m > 0 ? l.dir = o.slice(0, m - 1) : u && (l.dir = "/"), l; + return m === -1 || g === -1 || x === 0 || x === 1 && m === g - 1 && m === f + 1 ? g !== -1 && (l.base = l.name = f === 0 && u ? o.slice(1, g) : o.slice(f, g)) : (f === 0 && u ? (l.name = o.slice(1, m), l.base = o.slice(1, g)) : (l.name = o.slice(f, m), l.base = o.slice(f, g)), l.ext = o.slice(m, g)), f > 0 ? l.dir = o.slice(0, f - 1) : u && (l.dir = "/"), l; }, sep: "/", delimiter: ":", win32: null, posix: null }; a.posix = a, r.exports = a; }, 447: (r, i, s) => { var a; - if (s.r(i), s.d(i, { URI: () => x, Utils: () => L }), typeof process == "object") + if (s.r(i), s.d(i, { URI: () => S, Utils: () => I }), typeof process == "object") a = process.platform === "win32"; else if (typeof navigator == "object") { var o = navigator.userAgent; a = o.indexOf("Windows") >= 0; } - var l, c, h = (l = function(E, C) { - return (l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(D, I) { - D.__proto__ = I; - } || function(D, I) { - for (var X in I) - Object.prototype.hasOwnProperty.call(I, X) && (D[X] = I[X]); - })(E, C); - }, function(E, C) { - if (typeof C != "function" && C !== null) - throw new TypeError("Class extends value " + String(C) + " is not a constructor or null"); - function D() { - this.constructor = E; + var l, c, h = (l = function(A, k) { + return (l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, P) { + N.__proto__ = P; + } || function(N, P) { + for (var G in P) + Object.prototype.hasOwnProperty.call(P, G) && (N[G] = P[G]); + })(A, k); + }, function(A, k) { + if (typeof k != "function" && k !== null) + throw new TypeError("Class extends value " + String(k) + " is not a constructor or null"); + function N() { + this.constructor = A; } - l(E, C), E.prototype = C === null ? Object.create(C) : (D.prototype = C.prototype, new D()); - }), u = /^\w[\w\d+.-]*$/, f = /^\//, m = /^\/\//; - function g(E, C) { - if (!E.scheme && C) - throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(E.authority, '", path: "').concat(E.path, '", query: "').concat(E.query, '", fragment: "').concat(E.fragment, '"}')); - if (E.scheme && !u.test(E.scheme)) + l(A, k), A.prototype = k === null ? Object.create(k) : (N.prototype = k.prototype, new N()); + }), u = /^\w[\w\d+.-]*$/, m = /^\//, f = /^\/\//; + function g(A, k) { + if (!A.scheme && k) + throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(A.authority, '", path: "').concat(A.path, '", query: "').concat(A.query, '", fragment: "').concat(A.fragment, '"}')); + if (A.scheme && !u.test(A.scheme)) throw new Error("[UriError]: Scheme contains illegal characters."); - if (E.path) { - if (E.authority) { - if (!f.test(E.path)) + if (A.path) { + if (A.authority) { + if (!m.test(A.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 (m.test(E.path)) + } else if (f.test(A.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); } } - var b = "", y = "/", w = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, x = function() { - function E(C, D, I, X, G, ee) { - ee === void 0 && (ee = !1), typeof C == "object" ? (this.scheme = C.scheme || b, this.authority = C.authority || b, this.path = C.path || b, this.query = C.query || b, this.fragment = C.fragment || b) : (this.scheme = function(Ie, ke) { - return Ie || ke ? Ie : "file"; - }(C, ee), this.authority = D || b, this.path = function(Ie, ke) { - switch (Ie) { + var b = "", y = "/", x = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, S = function() { + function A(k, N, P, G, K, ee) { + ee === void 0 && (ee = !1), typeof k == "object" ? (this.scheme = k.scheme || b, this.authority = k.authority || b, this.path = k.path || b, this.query = k.query || b, this.fragment = k.fragment || b) : (this.scheme = function(Le, ye) { + return Le || ye ? Le : "file"; + }(k, ee), this.authority = N || b, this.path = function(Le, ye) { + switch (Le) { case "https": case "http": case "file": - ke ? ke[0] !== y && (ke = y + ke) : ke = y; + ye ? ye[0] !== y && (ye = y + ye) : ye = y; } - return ke; - }(this.scheme, I || b), this.query = X || b, this.fragment = G || b, g(this, ee)); + return ye; + }(this.scheme, P || b), this.query = G || b, this.fragment = K || b, g(this, ee)); } - return E.isUri = function(C) { - return C instanceof E || !!C && typeof C.authority == "string" && typeof C.fragment == "string" && typeof C.path == "string" && typeof C.query == "string" && typeof C.scheme == "string" && typeof C.fsPath == "string" && typeof C.with == "function" && typeof C.toString == "function"; - }, Object.defineProperty(E.prototype, "fsPath", { get: function() { - return B(this, !1); - }, enumerable: !1, configurable: !0 }), E.prototype.with = function(C) { - if (!C) + return A.isUri = function(k) { + return k instanceof A || !!k && typeof k.authority == "string" && typeof k.fragment == "string" && typeof k.path == "string" && typeof k.query == "string" && typeof k.scheme == "string" && typeof k.fsPath == "string" && typeof k.with == "function" && typeof k.toString == "function"; + }, Object.defineProperty(A.prototype, "fsPath", { get: function() { + return L(this, !1); + }, enumerable: !1, configurable: !0 }), A.prototype.with = function(k) { + if (!k) return this; - var D = C.scheme, I = C.authority, X = C.path, G = C.query, ee = C.fragment; - return D === void 0 ? D = this.scheme : D === null && (D = b), I === void 0 ? I = this.authority : I === null && (I = b), X === void 0 ? X = this.path : X === null && (X = b), G === void 0 ? G = this.query : G === null && (G = b), ee === void 0 ? ee = this.fragment : ee === null && (ee = b), D === this.scheme && I === this.authority && X === this.path && G === this.query && ee === this.fragment ? this : new F(D, I, X, G, ee); - }, E.parse = function(C, D) { - D === void 0 && (D = !1); - var I = w.exec(C); - return I ? new F(I[2] || b, R(I[4] || b), R(I[5] || b), R(I[7] || b), R(I[9] || b), D) : new F(b, b, b, b, b); - }, E.file = function(C) { - var D = b; - if (a && (C = C.replace(/\\/g, y)), C[0] === y && C[1] === y) { - var I = C.indexOf(y, 2); - I === -1 ? (D = C.substring(2), C = y) : (D = C.substring(2, I), C = C.substring(I) || y); + var N = k.scheme, P = k.authority, G = k.path, K = k.query, ee = k.fragment; + return N === void 0 ? N = this.scheme : N === null && (N = b), P === void 0 ? P = this.authority : P === null && (P = b), G === void 0 ? G = this.path : G === null && (G = b), K === void 0 ? K = this.query : K === null && (K = b), ee === void 0 ? ee = this.fragment : ee === null && (ee = b), N === this.scheme && P === this.authority && G === this.path && K === this.query && ee === this.fragment ? this : new E(N, P, G, K, ee); + }, A.parse = function(k, N) { + N === void 0 && (N = !1); + var P = x.exec(k); + return P ? new E(P[2] || b, D(P[4] || b), D(P[5] || b), D(P[7] || b), D(P[9] || b), N) : new E(b, b, b, b, b); + }, A.file = function(k) { + var N = b; + if (a && (k = k.replace(/\\/g, y)), k[0] === y && k[1] === y) { + var P = k.indexOf(y, 2); + P === -1 ? (N = k.substring(2), k = y) : (N = k.substring(2, P), k = k.substring(P) || y); } - return new F("file", D, C, b, b); - }, E.from = function(C) { - var D = new F(C.scheme, C.authority, C.path, C.query, C.fragment); - return g(D, !0), D; - }, E.prototype.toString = function(C) { - return C === void 0 && (C = !1), P(this, C); - }, E.prototype.toJSON = function() { + return new E("file", N, k, b, b); + }, A.from = function(k) { + var N = new E(k.scheme, k.authority, k.path, k.query, k.fragment); + return g(N, !0), N; + }, A.prototype.toString = function(k) { + return k === void 0 && (k = !1), q(this, k); + }, A.prototype.toJSON = function() { return this; - }, E.revive = function(C) { - if (C) { - if (C instanceof E) - return C; - var D = new F(C); - return D._formatted = C.external, D._fsPath = C._sep === k ? C.fsPath : null, D; + }, A.revive = function(k) { + if (k) { + if (k instanceof A) + return k; + var N = new E(k); + return N._formatted = k.external, N._fsPath = k._sep === w ? k.fsPath : null, N; } - return C; - }, E; - }(), k = a ? 1 : void 0, F = function(E) { - function C() { - var D = E !== null && E.apply(this, arguments) || this; - return D._formatted = null, D._fsPath = null, D; + return k; + }, A; + }(), w = a ? 1 : void 0, E = function(A) { + function k() { + var N = A !== null && A.apply(this, arguments) || this; + return N._formatted = null, N._fsPath = null, N; } - return h(C, E), Object.defineProperty(C.prototype, "fsPath", { get: function() { - return this._fsPath || (this._fsPath = B(this, !1)), this._fsPath; - }, enumerable: !1, configurable: !0 }), C.prototype.toString = function(D) { - return D === void 0 && (D = !1), D ? P(this, !0) : (this._formatted || (this._formatted = P(this, !1)), this._formatted); - }, C.prototype.toJSON = function() { - var D = { $mid: 1 }; - return this._fsPath && (D.fsPath = this._fsPath, D._sep = k), this._formatted && (D.external = this._formatted), this.path && (D.path = this.path), this.scheme && (D.scheme = this.scheme), this.authority && (D.authority = this.authority), this.query && (D.query = this.query), this.fragment && (D.fragment = this.fragment), D; - }, C; - }(x), N = ((c = {})[58] = "%3A", c[47] = "%2F", c[63] = "%3F", c[35] = "%23", c[91] = "%5B", c[93] = "%5D", c[64] = "%40", c[33] = "%21", c[36] = "%24", c[38] = "%26", c[39] = "%27", c[40] = "%28", c[41] = "%29", c[42] = "%2A", c[43] = "%2B", c[44] = "%2C", c[59] = "%3B", c[61] = "%3D", c[32] = "%20", c); - function j(E, C) { - for (var D = void 0, I = -1, X = 0; X < E.length; X++) { - var G = E.charCodeAt(X); - if (G >= 97 && G <= 122 || G >= 65 && G <= 90 || G >= 48 && G <= 57 || G === 45 || G === 46 || G === 95 || G === 126 || C && G === 47) - I !== -1 && (D += encodeURIComponent(E.substring(I, X)), I = -1), D !== void 0 && (D += E.charAt(X)); + return h(k, A), Object.defineProperty(k.prototype, "fsPath", { get: function() { + return this._fsPath || (this._fsPath = L(this, !1)), this._fsPath; + }, enumerable: !1, configurable: !0 }), k.prototype.toString = function(N) { + return N === void 0 && (N = !1), N ? q(this, !0) : (this._formatted || (this._formatted = q(this, !1)), this._formatted); + }, k.prototype.toJSON = function() { + var N = { $mid: 1 }; + return this._fsPath && (N.fsPath = this._fsPath, N._sep = w), this._formatted && (N.external = this._formatted), this.path && (N.path = this.path), this.scheme && (N.scheme = this.scheme), this.authority && (N.authority = this.authority), this.query && (N.query = this.query), this.fragment && (N.fragment = this.fragment), N; + }, k; + }(S), R = ((c = {})[58] = "%3A", c[47] = "%2F", c[63] = "%3F", c[35] = "%23", c[91] = "%5B", c[93] = "%5D", c[64] = "%40", c[33] = "%21", c[36] = "%24", c[38] = "%26", c[39] = "%27", c[40] = "%28", c[41] = "%29", c[42] = "%2A", c[43] = "%2B", c[44] = "%2C", c[59] = "%3B", c[61] = "%3D", c[32] = "%20", c); + function T(A, k) { + for (var N = void 0, P = -1, G = 0; G < A.length; G++) { + var K = A.charCodeAt(G); + if (K >= 97 && K <= 122 || K >= 65 && K <= 90 || K >= 48 && K <= 57 || K === 45 || K === 46 || K === 95 || K === 126 || k && K === 47) + P !== -1 && (N += encodeURIComponent(A.substring(P, G)), P = -1), N !== void 0 && (N += A.charAt(G)); else { - D === void 0 && (D = E.substr(0, X)); - var ee = N[G]; - ee !== void 0 ? (I !== -1 && (D += encodeURIComponent(E.substring(I, X)), I = -1), D += ee) : I === -1 && (I = X); + N === void 0 && (N = A.substr(0, G)); + var ee = R[K]; + ee !== void 0 ? (P !== -1 && (N += encodeURIComponent(A.substring(P, G)), P = -1), N += ee) : P === -1 && (P = G); } } - return I !== -1 && (D += encodeURIComponent(E.substring(I))), D !== void 0 ? D : E; + return P !== -1 && (N += encodeURIComponent(A.substring(P))), N !== void 0 ? N : A; } - function H(E) { - for (var C = void 0, D = 0; D < E.length; D++) { - var I = E.charCodeAt(D); - I === 35 || I === 63 ? (C === void 0 && (C = E.substr(0, D)), C += N[I]) : C !== void 0 && (C += E[D]); + function W(A) { + for (var k = void 0, N = 0; N < A.length; N++) { + var P = A.charCodeAt(N); + P === 35 || P === 63 ? (k === void 0 && (k = A.substr(0, N)), k += R[P]) : k !== void 0 && (k += A[N]); } - return C !== void 0 ? C : E; + return k !== void 0 ? k : A; } - function B(E, C) { - var D; - return D = E.authority && E.path.length > 1 && E.scheme === "file" ? "//".concat(E.authority).concat(E.path) : E.path.charCodeAt(0) === 47 && (E.path.charCodeAt(1) >= 65 && E.path.charCodeAt(1) <= 90 || E.path.charCodeAt(1) >= 97 && E.path.charCodeAt(1) <= 122) && E.path.charCodeAt(2) === 58 ? C ? E.path.substr(1) : E.path[1].toLowerCase() + E.path.substr(2) : E.path, a && (D = D.replace(/\//g, "\\")), D; + function L(A, k) { + var N; + return N = A.authority && A.path.length > 1 && A.scheme === "file" ? "//".concat(A.authority).concat(A.path) : A.path.charCodeAt(0) === 47 && (A.path.charCodeAt(1) >= 65 && A.path.charCodeAt(1) <= 90 || A.path.charCodeAt(1) >= 97 && A.path.charCodeAt(1) <= 122) && A.path.charCodeAt(2) === 58 ? k ? A.path.substr(1) : A.path[1].toLowerCase() + A.path.substr(2) : A.path, a && (N = N.replace(/\//g, "\\")), N; } - function P(E, C) { - var D = C ? H : j, I = "", X = E.scheme, G = E.authority, ee = E.path, Ie = E.query, ke = E.fragment; - if (X && (I += X, I += ":"), (G || X === "file") && (I += y, I += y), G) { - var Me = G.indexOf("@"); - if (Me !== -1) { - var wt = G.substr(0, Me); - G = G.substr(Me + 1), (Me = wt.indexOf(":")) === -1 ? I += D(wt, !1) : (I += D(wt.substr(0, Me), !1), I += ":", I += D(wt.substr(Me + 1), !1)), I += "@"; + function q(A, k) { + var N = k ? W : T, P = "", G = A.scheme, K = A.authority, ee = A.path, Le = A.query, ye = A.fragment; + if (G && (P += G, P += ":"), (K || G === "file") && (P += y, P += y), K) { + var Ne = K.indexOf("@"); + if (Ne !== -1) { + var wt = K.substr(0, Ne); + K = K.substr(Ne + 1), (Ne = wt.indexOf(":")) === -1 ? P += N(wt, !1) : (P += N(wt.substr(0, Ne), !1), P += ":", P += N(wt.substr(Ne + 1), !1)), P += "@"; } - (Me = (G = G.toLowerCase()).indexOf(":")) === -1 ? I += D(G, !1) : (I += D(G.substr(0, Me), !1), I += G.substr(Me)); + (Ne = (K = K.toLowerCase()).indexOf(":")) === -1 ? P += N(K, !1) : (P += N(K.substr(0, Ne), !1), P += K.substr(Ne)); } if (ee) { if (ee.length >= 3 && ee.charCodeAt(0) === 47 && ee.charCodeAt(2) === 58) - (tt = ee.charCodeAt(1)) >= 65 && tt <= 90 && (ee = "/".concat(String.fromCharCode(tt + 32), ":").concat(ee.substr(3))); + (et = ee.charCodeAt(1)) >= 65 && et <= 90 && (ee = "/".concat(String.fromCharCode(et + 32), ":").concat(ee.substr(3))); else if (ee.length >= 2 && ee.charCodeAt(1) === 58) { - var tt; - (tt = ee.charCodeAt(0)) >= 65 && tt <= 90 && (ee = "".concat(String.fromCharCode(tt + 32), ":").concat(ee.substr(2))); + var et; + (et = ee.charCodeAt(0)) >= 65 && et <= 90 && (ee = "".concat(String.fromCharCode(et + 32), ":").concat(ee.substr(2))); } - I += D(ee, !0); + P += N(ee, !0); } - return Ie && (I += "?", I += D(Ie, !1)), ke && (I += "#", I += C ? ke : j(ke, !1)), I; + return Le && (P += "?", P += N(Le, !1)), ye && (P += "#", P += k ? ye : T(ye, !1)), P; } - function z(E) { + function z(A) { try { - return decodeURIComponent(E); + return decodeURIComponent(A); } catch { - return E.length > 3 ? E.substr(0, 3) + z(E.substr(3)) : E; + return A.length > 3 ? A.substr(0, 3) + z(A.substr(3)) : A; } } - var A = /(%[0-9A-Za-z][0-9A-Za-z])+/g; - function R(E) { - return E.match(A) ? E.replace(A, function(C) { - return z(C); - }) : E; + var F = /(%[0-9A-Za-z][0-9A-Za-z])+/g; + function D(A) { + return A.match(F) ? A.replace(F, function(k) { + return z(k); + }) : A; } - var L, O = s(470), K = function(E, C, D) { - if (D || arguments.length === 2) - for (var I, X = 0, G = C.length; X < G; X++) - !I && X in C || (I || (I = Array.prototype.slice.call(C, 0, X)), I[X] = C[X]); - return E.concat(I || Array.prototype.slice.call(C)); - }, re = O.posix || O; - (function(E) { - E.joinPath = function(C) { - for (var D = [], I = 1; I < arguments.length; I++) - D[I - 1] = arguments[I]; - return C.with({ path: re.join.apply(re, K([C.path], D, !1)) }); - }, E.resolvePath = function(C) { - for (var D = [], I = 1; I < arguments.length; I++) - D[I - 1] = arguments[I]; - var X = C.path || "/"; - return C.with({ path: re.resolve.apply(re, K([X], D, !1)) }); - }, E.dirname = function(C) { - var D = re.dirname(C.path); - return D.length === 1 && D.charCodeAt(0) === 46 ? C : C.with({ path: D }); - }, E.basename = function(C) { - return re.basename(C.path); - }, E.extname = function(C) { - return re.extname(C.path); + var I, O = s(470), J = function(A, k, N) { + if (N || arguments.length === 2) + for (var P, G = 0, K = k.length; G < K; G++) + !P && G in k || (P || (P = Array.prototype.slice.call(k, 0, G)), P[G] = k[G]); + return A.concat(P || Array.prototype.slice.call(k)); + }, Y = O.posix || O; + (function(A) { + A.joinPath = function(k) { + for (var N = [], P = 1; P < arguments.length; P++) + N[P - 1] = arguments[P]; + return k.with({ path: Y.join.apply(Y, J([k.path], N, !1)) }); + }, A.resolvePath = function(k) { + for (var N = [], P = 1; P < arguments.length; P++) + N[P - 1] = arguments[P]; + var G = k.path || "/"; + return k.with({ path: Y.resolve.apply(Y, J([G], N, !1)) }); + }, A.dirname = function(k) { + var N = Y.dirname(k.path); + return N.length === 1 && N.charCodeAt(0) === 46 ? k : k.with({ path: N }); + }, A.basename = function(k) { + return Y.basename(k.path); + }, A.extname = function(k) { + return Y.extname(k.path); }; - })(L || (L = {})); + })(I || (I = {})); } }, e = {}; function n(r) { if (e[r]) @@ -11643,21 +11916,21 @@ Ll = (() => { typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(r, "__esModule", { value: !0 }); }, n(447); })(); -var { URI: Oi, Utils: mi } = Ll, Cu = function(t, e, n) { +var { URI: Ji, Utils: Ci } = Ul, Lu = function(t, e, n) { if (n || arguments.length === 2) for (var r = 0, i = e.length, s; r < i; r++) (s || !(r in e)) && (s || (s = Array.prototype.slice.call(e, 0, r)), s[r] = e[r]); return t.concat(s || Array.prototype.slice.call(e)); }; -function Fr(t) { - return mi.dirname(Oi.parse(t)).toString(); +function Pr(t) { + return Ci.dirname(Ji.parse(t)).toString(); } -function gi(t) { +function ki(t) { for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n]; - return mi.joinPath.apply(mi, Cu([Oi.parse(t)], e, !1)).toString(); + return Ci.joinPath.apply(Ci, Lu([Ji.parse(t)], e, !1)).toString(); } -var Ro = function(t, e, n, r) { +var Lo = function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -11683,7 +11956,7 @@ var Ro = function(t, e, n, r) { } c((r = r.apply(t, e || [])).next()); }); -}, Eo = function(t, e) { +}, Io = function(t, e) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; @@ -11747,7 +12020,7 @@ var Ro = function(t, e, n, r) { throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } -}, ku = function() { +}, Iu = function() { function t(e) { this.readDirectory = e, this.literalCompletions = [], this.importCompletions = []; } @@ -11756,34 +12029,34 @@ var Ro = function(t, e, n, r) { }, t.prototype.onCssImportPath = function(e) { this.importCompletions.push(e); }, t.prototype.computeCompletions = function(e, n) { - return Ro(this, void 0, void 0, function() { - var r, i, s, a, o, b, l, c, h, k, u, f, m, g, b, y, w, x, k; - return Eo(this, function(F) { - switch (F.label) { + return Lo(this, void 0, void 0, function() { + var r, i, s, a, o, b, l, c, h, w, u, m, f, g, b, y, x, S, w; + return Io(this, function(E) { + switch (E.label) { case 0: - r = { items: [], isIncomplete: !1 }, i = 0, s = this.literalCompletions, F.label = 1; + r = { items: [], isIncomplete: !1 }, i = 0, s = this.literalCompletions, E.label = 1; case 1: - return i < s.length ? (a = s[i], o = a.uriValue, b = Rr(o), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 4]) : [3, 2]) : [3, 5]; + return i < s.length ? (a = s[i], o = a.uriValue, b = Lr(o), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 4]) : [3, 2]) : [3, 5]; case 2: return [4, this.providePathSuggestions(o, a.position, a.range, e, n)]; case 3: - for (l = F.sent(), c = 0, h = l; c < h.length; c++) - k = h[c], r.items.push(k); - F.label = 4; + for (l = E.sent(), c = 0, h = l; c < h.length; c++) + w = h[c], r.items.push(w); + E.label = 4; case 4: return i++, [3, 1]; case 5: - u = 0, f = this.importCompletions, F.label = 6; + u = 0, m = this.importCompletions, E.label = 6; case 6: - return u < f.length ? (m = f[u], g = m.pathValue, b = Rr(g), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 9]) : [3, 7]) : [3, 10]; + return u < m.length ? (f = m[u], g = f.pathValue, b = Lr(g), b === "." || b === ".." ? (r.isIncomplete = !0, [3, 9]) : [3, 7]) : [3, 10]; case 7: - return [4, this.providePathSuggestions(g, m.position, m.range, e, n)]; + return [4, this.providePathSuggestions(g, f.position, f.range, e, n)]; case 8: - for (y = F.sent(), e.languageId === "scss" && y.forEach(function(N) { - fe(N.label, "_") && vl(N.label, ".scss") && (N.textEdit ? N.textEdit.newText = N.label.slice(1, -5) : N.label = N.label.slice(1, -5)); - }), w = 0, x = y; w < x.length; w++) - k = x[w], r.items.push(k); - F.label = 9; + for (y = E.sent(), e.languageId === "scss" && y.forEach(function(R) { + fe(R.label, "_") && Sl(R.label, ".scss") && (R.textEdit ? R.textEdit.newText = R.label.slice(1, -5) : R.label = R.label.slice(1, -5)); + }), x = 0, S = y; x < S.length; x++) + w = S[x], r.items.push(w); + E.label = 9; case 9: return u++, [3, 6]; case 10: @@ -11792,68 +12065,68 @@ var Ro = function(t, e, n, r) { }); }); }, t.prototype.providePathSuggestions = function(e, n, r, i, s) { - return Ro(this, void 0, void 0, function() { - var a, o, l, c, h, u, f, m, g, b, y, w, x, k, F; - return Eo(this, function(N) { - switch (N.label) { + return Lo(this, void 0, void 0, function() { + var a, o, l, c, h, u, m, f, g, b, y, x, S, w, E; + return Io(this, function(R) { + switch (R.label) { case 0: - if (a = Rr(e), o = fe(e, "'") || fe(e, '"'), l = o ? a.slice(0, n.character - (r.start.character + 1)) : a.slice(0, n.character - r.start.character), c = i.uri, h = o ? Eu(r, 1, -1) : r, u = Fu(l, a, h), f = l.substring(0, l.lastIndexOf("/") + 1), m = s.resolveReference(f || ".", c), !m) + if (a = Lr(e), o = fe(e, "'") || fe(e, '"'), l = o ? a.slice(0, n.character - (r.start.character + 1)) : a.slice(0, n.character - r.start.character), c = i.uri, h = o ? Uu(r, 1, -1) : r, u = Wu(l, a, h), m = l.substring(0, l.lastIndexOf("/") + 1), f = s.resolveReference(m || ".", c), !f) return [3, 4]; - N.label = 1; + R.label = 1; case 1: - return N.trys.push([1, 3, , 4]), g = [], [4, this.readDirectory(m)]; + return R.trys.push([1, 3, , 4]), g = [], [4, this.readDirectory(f)]; case 2: - for (b = N.sent(), y = 0, w = b; y < w.length; y++) - x = w[y], k = x[0], F = x[1], k.charCodeAt(0) !== _u && (F === Sn.Directory || gi(m, k) !== c) && g.push(Ru(k, F === Sn.Directory, u)); + for (b = R.sent(), y = 0, x = b; y < x.length; y++) + S = x[y], w = S[0], E = S[1], w.charCodeAt(0) !== Tu && (E === En.Directory || ki(f, w) !== c) && g.push(Ou(w, E === En.Directory, u)); return [2, g]; case 3: - return N.sent(), [3, 4]; + return R.sent(), [3, 4]; case 4: return [2, []]; } }); }); }, t; -}(), _u = ".".charCodeAt(0); -function Rr(t) { +}(), Tu = ".".charCodeAt(0); +function Lr(t) { return fe(t, "'") || fe(t, '"') ? t.slice(1, -1) : t; } -function Fu(t, e, n) { +function Wu(t, e, n) { var r, i = t.lastIndexOf("/"); if (i === -1) r = n; else { - var s = e.slice(i + 1), a = lr(n.end, -s.length), o = s.indexOf(" "), l = void 0; - o !== -1 ? l = lr(a, o) : l = n.end, r = te.create(a, l); + var s = e.slice(i + 1), a = fr(n.end, -s.length), o = s.indexOf(" "), l = void 0; + o !== -1 ? l = fr(a, o) : l = n.end, r = ie.create(a, l); } return r; } -function Ru(t, e, n) { +function Ou(t, e, n) { return e ? (t = t + "/", { - label: Wn(t), - kind: q.Folder, - textEdit: $.replace(n, Wn(t)), + label: $n(t), + kind: $.Folder, + textEdit: H.replace(n, $n(t)), command: { title: "Suggest", command: "editor.action.triggerSuggest" } }) : { - label: Wn(t), - kind: q.File, - textEdit: $.replace(n, Wn(t)) + label: $n(t), + kind: $.File, + textEdit: H.replace(n, $n(t)) }; } -function Wn(t) { +function $n(t) { return t.replace(/(\s|\(|\)|,|"|')/g, "\\$1"); } -function lr(t, e) { - return Fe.create(t.line, t.character + e); +function fr(t, e) { + return _e.create(t.line, t.character + e); } -function Eu(t, e, n) { - var r = lr(t.start, e), i = lr(t.end, n); - return te.create(r, i); +function Uu(t, e, n) { + var r = fr(t.start, e), i = fr(t.end, n); + return ie.create(r, i); } -var Du = function(t, e, n, r) { +var Vu = function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -11879,7 +12152,7 @@ var Du = function(t, e, n, r) { } c((r = r.apply(t, e || [])).next()); }); -}, Au = function(t, e) { +}, Bu = function(t, e) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; @@ -11943,32 +12216,32 @@ var Du = function(t, e, n, r) { throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } -}, Mu = Je(), nt = ze.Snippet, Do = { +}, ju = Ge(), tt = ze.Snippet, To = { title: "Suggest", command: "editor.action.triggerSuggest" -}, Ye; +}, Je; (function(t) { t.Enums = " ", t.Normal = "d", t.VendorPrefixed = "x", t.Term = "y", t.Variable = "z"; -})(Ye || (Ye = {})); -var Ui = function() { +})(Je || (Je = {})); +var Xi = function() { function t(e, n, r) { e === void 0 && (e = null), this.variablePrefix = e, this.lsOptions = n, this.cssDataManager = r, this.completionParticipants = []; } return t.prototype.configure = function(e) { this.defaultSettings = e; }, t.prototype.getSymbolContext = function() { - return this.symbolContext || (this.symbolContext = new fi(this.styleSheet)), this.symbolContext; + return this.symbolContext || (this.symbolContext = new Si(this.styleSheet)), this.symbolContext; }, t.prototype.setCompletionParticipants = function(e) { this.completionParticipants = e || []; }, t.prototype.doComplete2 = function(e, n, r, i, s) { - return s === void 0 && (s = this.defaultSettings), Du(this, void 0, void 0, function() { + return s === void 0 && (s = this.defaultSettings), Vu(this, void 0, void 0, function() { var a, o, l, c; - return Au(this, function(h) { + return Bu(this, function(h) { switch (h.label) { case 0: if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) return [2, this.doComplete(e, n, r, s)]; - a = new ku(this.lsOptions.fileSystemProvider.readDirectory), o = this.completionParticipants, this.completionParticipants = [a].concat(o), l = this.doComplete(e, n, r, s), h.label = 1; + a = new Iu(this.lsOptions.fileSystemProvider.readDirectory), o = this.completionParticipants, this.completionParticipants = [a].concat(o), l = this.doComplete(e, n, r, s), h.label = 1; case 1: return h.trys.push([1, , 3, 4]), [4, a.computeCompletions(e, i)]; case 2: @@ -11984,17 +12257,17 @@ var Ui = function() { }); }); }, t.prototype.doComplete = function(e, n, r, i) { - this.offset = e.offsetAt(n), this.position = n, this.currentWord = Iu(e, this.offset), this.defaultReplaceRange = te.create(Fe.create(this.position.line, this.position.character - this.currentWord.length), this.position), this.textDocument = e, this.styleSheet = r, this.documentSettings = i; + this.offset = e.offsetAt(n), this.position = n, this.currentWord = Gu(e, this.offset), this.defaultReplaceRange = ie.create(_e.create(this.position.line, this.position.character - this.currentWord.length), this.position), this.textDocument = e, this.styleSheet = r, this.documentSettings = i; try { var s = { isIncomplete: !1, items: [] }; - this.nodePath = Di(this.styleSheet, this.offset); + this.nodePath = Wi(this.styleSheet, this.offset); for (var a = this.nodePath.length - 1; a >= 0; a--) { var o = this.nodePath[a]; - if (o instanceof Ni) + if (o instanceof Vi) this.getCompletionsForDeclarationProperty(o.getParent(), s); - else if (o instanceof _l) - o.parent instanceof ii ? this.getVariableProposals(null, s) : this.getCompletionsForExpression(o, s); - else if (o instanceof jt) { + else if (o instanceof Dl) + o.parent instanceof ui ? this.getVariableProposals(null, s) : this.getCompletionsForExpression(o, s); + else if (o instanceof qt) { var l = o.findAParent(v.ExtendsReference, v.Ruleset); if (l) if (l.type === v.ExtendsReference) @@ -12003,27 +12276,27 @@ var Ui = function() { var c = l; this.getCompletionsForSelector(c, c && c.isNested(), s); } - } else if (o instanceof Gt) + } else if (o instanceof Xt) this.getCompletionsForFunctionArgument(o, o.getParent(), s); - else if (o instanceof Ai) + else if (o instanceof Oi) this.getCompletionsForDeclarations(o, s); - else if (o instanceof fr) + else if (o instanceof yr) this.getCompletionsForVariableDeclaration(o, s); - else if (o instanceof Bt) + else if (o instanceof jt) this.getCompletionsForRuleSet(o, s); - else if (o instanceof ii) + else if (o instanceof ui) this.getCompletionsForInterpolation(o, s); - else if (o instanceof Qn) + else if (o instanceof ir) this.getCompletionsForFunctionDeclaration(o, s); - else if (o instanceof Zn) + else if (o instanceof sr) this.getCompletionsForMixinReference(o, s); - else if (o instanceof Rn) + else if (o instanceof zn) this.getCompletionsForFunctionArgument(null, o, s); - else if (o instanceof ri) + else if (o instanceof di) this.getCompletionsForSupports(o, s); - else if (o instanceof un) + else if (o instanceof fn) this.getCompletionsForSupportsCondition(o, s); - else if (o instanceof mn) + else if (o instanceof xn) this.getCompletionsForExtendsReference(o, null, s); else if (o.type === v.URILiteral) this.getCompletionForUriLiteralValue(o, s); @@ -12059,18 +12332,18 @@ var Ui = function() { var r = this, i = this.isTriggerPropertyValueCompletionEnabled, s = this.isCompletePropertyWithSemicolonEnabled, a = this.cssDataManager.getProperties(); return a.forEach(function(o) { var l, c, h = !1; - e ? (l = r.getCompletionRange(e.getProperty()), c = o.name, Te(e.colonPosition) || (c += ": ", h = !0)) : (l = r.getCompletionRange(null), c = o.name + ": ", h = !0), !e && s && (c += "$0;"), e && !e.semicolonPosition && s && r.offset >= r.textDocument.offsetAt(l.end) && (c += "$0;"); + e ? (l = r.getCompletionRange(e.getProperty()), c = o.name, We(e.colonPosition) || (c += ": ", h = !0)) : (l = r.getCompletionRange(null), c = o.name + ": ", h = !0), !e && s && (c += "$0;"), e && !e.semicolonPosition && s && r.offset >= r.textDocument.offsetAt(l.end) && (c += "$0;"); var u = { label: o.name, documentation: mt(o, r.doesSupportMarkdown()), - tags: an(o) ? [_t.Deprecated] : [], - textEdit: $.replace(l, c), + tags: ln(o) ? [_t.Deprecated] : [], + textEdit: H.replace(l, c), insertTextFormat: ze.Snippet, - kind: q.Property + kind: $.Property }; - o.restrictions || (h = !1), i && h && (u.command = Do); - var f = typeof o.relevance == "number" ? Math.min(Math.max(o.relevance, 0), 99) : 50, m = (255 - f).toString(16), g = fe(o.name, "-") ? Ye.VendorPrefixed : Ye.Normal; - u.sortText = g + "_" + m, n.items.push(u); + o.restrictions || (h = !1), i && h && (u.command = To); + var m = typeof o.relevance == "number" ? Math.min(Math.max(o.relevance, 0), 99) : 50, f = (255 - m).toString(16), g = fe(o.name, "-") ? Je.VendorPrefixed : Je.Normal; + u.sortText = g + "_" + f, n.items.push(u); }), this.completionParticipants.forEach(function(o) { o.onCssProperty && o.onCssProperty({ propertyName: r.currentWord, @@ -12139,12 +12412,12 @@ var Ui = function() { } this.getValueEnumProposals(s, a, n), this.getCSSWideKeywordProposals(s, a, n), this.getUnitProposals(s, a, n); } else - for (var h = Nu(this.styleSheet, e), u = 0, f = h.getEntries(); u < f.length; u++) { - var m = f[u]; + for (var h = qu(this.styleSheet, e), u = 0, m = h.getEntries(); u < m.length; u++) { + var f = m[u]; n.items.push({ - label: m, - textEdit: $.replace(this.getCompletionRange(a), m), - kind: q.Value + label: f, + textEdit: H.replace(this.getCompletionRange(a), f), + kind: $.Value }); } return this.getVariableProposals(a, n), this.getTermProposals(s, a, n), n; @@ -12152,75 +12425,75 @@ var Ui = function() { if (e.values) for (var i = 0, s = e.values; i < s.length; i++) { var a = s[i], o = a.name, l = void 0; - if (vl(o, ")")) { + if (Sl(o, ")")) { var c = o.lastIndexOf("("); - c !== -1 && (o = o.substr(0, c) + "($1)", l = nt); + c !== -1 && (o = o.substr(0, c) + "($1)", l = tt); } - var h = Ye.Enums; - fe(a.name, "-") && (h += Ye.VendorPrefixed); + var h = Je.Enums; + fe(a.name, "-") && (h += Je.VendorPrefixed); var u = { label: a.name, documentation: mt(a, this.doesSupportMarkdown()), - tags: an(e) ? [_t.Deprecated] : [], - textEdit: $.replace(this.getCompletionRange(n), o), + tags: ln(e) ? [_t.Deprecated] : [], + textEdit: H.replace(this.getCompletionRange(n), o), sortText: h, - kind: q.Value, + kind: $.Value, insertTextFormat: l }; r.items.push(u); } return r; }, t.prototype.getCSSWideKeywordProposals = function(e, n, r) { - for (var i in xo) + for (var i in Do) r.items.push({ label: i, - documentation: xo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value + documentation: Do[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value }); - for (var s in So) { - var a = Lt(s); + for (var s in Ao) { + var a = It(s); r.items.push({ label: s, - documentation: So[s], - textEdit: $.replace(this.getCompletionRange(n), a), - kind: q.Function, - insertTextFormat: nt, - command: fe(s, "var") ? Do : void 0 + documentation: Ao[s], + textEdit: H.replace(this.getCompletionRange(n), a), + kind: $.Function, + insertTextFormat: tt, + command: fe(s, "var") ? To : void 0 }); } return r; }, t.prototype.getCompletionsForInterpolation = function(e, n) { return this.offset >= e.offset + 2 && this.getVariableProposals(null, n), n; }, t.prototype.getVariableProposals = function(e, n) { - for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Variable), i = 0, s = r; i < s.length; i++) { + for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Q.Variable), i = 0, s = r; i < s.length; i++) { var a = s[i], o = fe(a.name, "--") ? "var(".concat(a.name, ")") : a.name, l = { label: a.name, - documentation: a.value ? Ma(a.value) : a.value, - textEdit: $.replace(this.getCompletionRange(e), o), - kind: q.Variable, - sortText: Ye.Variable + documentation: a.value ? Oa(a.value) : a.value, + textEdit: H.replace(this.getCompletionRange(e), o), + kind: $.Variable, + sortText: Je.Variable }; - if (typeof l.documentation == "string" && Ao(l.documentation) && (l.kind = q.Color), a.node.type === v.FunctionParameter) { + if (typeof l.documentation == "string" && Wo(l.documentation) && (l.kind = $.Color), a.node.type === v.FunctionParameter) { var c = a.node.getParent(); - c.type === v.MixinDeclaration && (l.detail = Mu("completion.argument", "argument from '{0}'", c.getName())); + c.type === v.MixinDeclaration && (l.detail = ju("completion.argument", "argument from '{0}'", c.getName())); } n.items.push(l); } return n; }, t.prototype.getVariableProposalsForCSSVarFunction = function(e) { - var n = new bi(); - this.styleSheet.acceptVisitor(new Pu(n, this.offset)); - for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Variable), i = 0, s = r; i < s.length; i++) { + var n = new _i(); + this.styleSheet.acceptVisitor(new Hu(n, this.offset)); + for (var r = this.getSymbolContext().findSymbolsAtOffset(this.offset, Q.Variable), i = 0, s = r; i < s.length; i++) { var a = s[i]; if (fe(a.name, "--")) { var o = { label: a.name, - documentation: a.value ? Ma(a.value) : a.value, - textEdit: $.replace(this.getCompletionRange(null), a.name), - kind: q.Variable + documentation: a.value ? Oa(a.value) : a.value, + textEdit: H.replace(this.getCompletionRange(null), a.name), + kind: $.Variable }; - typeof o.documentation == "string" && Ao(o.documentation) && (o.kind = q.Color), e.items.push(o); + typeof o.documentation == "string" && Wo(o.documentation) && (o.kind = $.Color), e.items.push(o); } n.remove(a.name); } @@ -12229,8 +12502,8 @@ var Ui = function() { if (fe(h, "--")) { var o = { label: h, - textEdit: $.replace(this.getCompletionRange(null), h), - kind: q.Variable + textEdit: H.replace(this.getCompletionRange(null), h), + kind: $.Variable }; e.items.push(o); } @@ -12245,14 +12518,14 @@ var Ui = function() { this.currentWord.length === 0 && (r.isIncomplete = !0); if (n && n.parent && n.parent.type === v.Term && (n = n.getParent()), e.restrictions) for (var a = 0, o = e.restrictions; a < o.length; a++) { - var l = o[a], c = zl[l]; + var l = o[a], c = Tl[l]; if (c) for (var h = 0, u = c; h < u.length; h++) { - var f = u[h], m = i + f; + var m = u[h], f = i + m; r.items.push({ - label: m, - textEdit: $.replace(this.getCompletionRange(n), m), - kind: q.Unit + label: f, + textEdit: H.replace(this.getCompletionRange(n), f), + kind: $.Unit }); } } @@ -12261,154 +12534,154 @@ var Ui = function() { if (e && e.offset <= this.offset && this.offset <= e.end) { var n = e.end !== -1 ? this.textDocument.positionAt(e.end) : this.position, r = this.textDocument.positionAt(e.offset); if (r.line === n.line) - return te.create(r, n); + return ie.create(r, n); } return this.defaultReplaceRange; }, t.prototype.getColorProposals = function(e, n, r) { - for (var i in or) + for (var i in pr) r.items.push({ label: i, - documentation: or[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Color + documentation: pr[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Color }); - for (var i in uo) - r.items.push({ - label: i, - documentation: uo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value - }); - var s = new bi(); - this.styleSheet.acceptVisitor(new zu(s, this.offset)); - for (var a = 0, o = s.getEntries(); a < o.length; a++) { - var i = o[a]; - r.items.push({ - label: i, - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Color - }); - } - for (var l = function(m) { - var g = 1, b = function(w, x) { - return "${" + g++ + ":" + x + "}"; - }, y = m.func.replace(/\[?\$(\w+)\]?/g, b); - r.items.push({ - label: m.func.substr(0, m.func.indexOf("(")), - detail: m.func, - documentation: m.desc, - textEdit: $.replace(c.getCompletionRange(n), y), - insertTextFormat: nt, - kind: q.Function - }); - }, c = this, h = 0, u = ou; h < u.length; h++) { - var f = u[h]; - l(f); - } - return r; - }, t.prototype.getPositionProposals = function(e, n, r) { - for (var i in go) - r.items.push({ - label: i, - documentation: go[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value - }); - return r; - }, t.prototype.getRepeatStyleProposals = function(e, n, r) { - for (var i in bo) - r.items.push({ - label: i, - documentation: bo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value - }); - return r; - }, t.prototype.getLineStyleProposals = function(e, n, r) { - for (var i in vo) - r.items.push({ - label: i, - documentation: vo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value - }); - return r; - }, t.prototype.getLineWidthProposals = function(e, n, r) { - for (var i = 0, s = mu; i < s.length; i++) { - var a = s[i]; - r.items.push({ - label: a, - textEdit: $.replace(this.getCompletionRange(n), a), - kind: q.Value - }); - } - return r; - }, t.prototype.getGeometryBoxProposals = function(e, n, r) { for (var i in wo) r.items.push({ label: i, documentation: wo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value + }); + var s = new _i(); + this.styleSheet.acceptVisitor(new $u(s, this.offset)); + for (var a = 0, o = s.getEntries(); a < o.length; a++) { + var i = o[a]; + r.items.push({ + label: i, + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Color + }); + } + for (var l = function(f) { + var g = 1, b = function(x, S) { + return "${" + g++ + ":" + S + "}"; + }, y = f.func.replace(/\[?\$(\w+)\]?/g, b); + r.items.push({ + label: f.func.substr(0, f.func.indexOf("(")), + detail: f.func, + documentation: f.desc, + textEdit: H.replace(c.getCompletionRange(n), y), + insertTextFormat: tt, + kind: $.Function + }); + }, c = this, h = 0, u = yu; h < u.length; h++) { + var m = u[h]; + l(m); + } + return r; + }, t.prototype.getPositionProposals = function(e, n, r) { + for (var i in ko) + r.items.push({ + label: i, + documentation: ko[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value + }); + return r; + }, t.prototype.getRepeatStyleProposals = function(e, n, r) { + for (var i in _o) + r.items.push({ + label: i, + documentation: _o[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value + }); + return r; + }, t.prototype.getLineStyleProposals = function(e, n, r) { + for (var i in Ro) + r.items.push({ + label: i, + documentation: Ro[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value + }); + return r; + }, t.prototype.getLineWidthProposals = function(e, n, r) { + for (var i = 0, s = Fu; i < s.length; i++) { + var a = s[i]; + r.items.push({ + label: a, + textEdit: H.replace(this.getCompletionRange(n), a), + kind: $.Value + }); + } + return r; + }, t.prototype.getGeometryBoxProposals = function(e, n, r) { + for (var i in Eo) + r.items.push({ + label: i, + documentation: Eo[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value }); return r; }, t.prototype.getBoxProposals = function(e, n, r) { - for (var i in yo) + for (var i in Fo) r.items.push({ label: i, - documentation: yo[i], - textEdit: $.replace(this.getCompletionRange(n), i), - kind: q.Value + documentation: Fo[i], + textEdit: H.replace(this.getCompletionRange(n), i), + kind: $.Value }); return r; }, t.prototype.getImageProposals = function(e, n, r) { - for (var i in Co) { - var s = Lt(i); + for (var i in No) { + var s = It(i); r.items.push({ label: i, - documentation: Co[i], - textEdit: $.replace(this.getCompletionRange(n), s), - kind: q.Function, - insertTextFormat: i !== s ? nt : void 0 + documentation: No[i], + textEdit: H.replace(this.getCompletionRange(n), s), + kind: $.Function, + insertTextFormat: i !== s ? tt : void 0 }); } return r; }, t.prototype.getTimingFunctionProposals = function(e, n, r) { - for (var i in ko) { - var s = Lt(i); + for (var i in Mo) { + var s = It(i); r.items.push({ label: i, - documentation: ko[i], - textEdit: $.replace(this.getCompletionRange(n), s), - kind: q.Function, - insertTextFormat: i !== s ? nt : void 0 + documentation: Mo[i], + textEdit: H.replace(this.getCompletionRange(n), s), + kind: $.Function, + insertTextFormat: i !== s ? tt : void 0 }); } return r; }, t.prototype.getBasicShapeProposals = function(e, n, r) { - for (var i in _o) { - var s = Lt(i); + for (var i in zo) { + var s = It(i); r.items.push({ label: i, - documentation: _o[i], - textEdit: $.replace(this.getCompletionRange(n), s), - kind: q.Function, - insertTextFormat: i !== s ? nt : void 0 + documentation: zo[i], + textEdit: H.replace(this.getCompletionRange(n), s), + kind: $.Function, + insertTextFormat: i !== s ? tt : void 0 }); } return r; }, t.prototype.getCompletionsForStylesheet = function(e) { var n = this.styleSheet.findFirstChildBeforeOffset(this.offset); - return n ? n instanceof Bt ? this.getCompletionsForRuleSet(n, e) : n instanceof ri ? this.getCompletionsForSupports(n, e) : e : this.getCompletionForTopLevel(e); + return n ? n instanceof jt ? this.getCompletionsForRuleSet(n, e) : n instanceof di ? this.getCompletionsForSupports(n, e) : e : this.getCompletionForTopLevel(e); }, t.prototype.getCompletionForTopLevel = function(e) { var n = this; return this.cssDataManager.getAtDirectives().forEach(function(r) { e.items.push({ label: r.name, - textEdit: $.replace(n.getCompletionRange(null), r.name), + textEdit: H.replace(n.getCompletionRange(null), r.name), documentation: mt(r, n.doesSupportMarkdown()), - tags: an(r) ? [_t.Deprecated] : [], - kind: q.Keyword + tags: ln(r) ? [_t.Deprecated] : [], + kind: $.Keyword }); }), this.getCompletionsForSelector(null, !1, e), e; }, t.prototype.getCompletionsForRuleSet = function(e, n) { @@ -12419,58 +12692,58 @@ var Ui = function() { return s ? this.getCompletionsForSelector(e, e.isNested(), n) : this.getCompletionsForDeclarations(e.getDeclarations(), n); }, t.prototype.getCompletionsForSelector = function(e, n, r) { var i = this, s = this.findInNodePath(v.PseudoSelector, v.IdentifierSelector, v.ClassSelector, v.ElementNameSelector); - !s && this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":") && (this.currentWord = ":" + this.currentWord, this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":") && (this.currentWord = ":" + this.currentWord), this.defaultReplaceRange = te.create(Fe.create(this.position.line, this.position.character - this.currentWord.length), this.position)); + !s && this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":") && (this.currentWord = ":" + this.currentWord, this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ":") && (this.currentWord = ":" + this.currentWord), this.defaultReplaceRange = ie.create(_e.create(this.position.line, this.position.character - this.currentWord.length), this.position)); var a = this.cssDataManager.getPseudoClasses(); a.forEach(function(y) { - var w = Lt(y.name), x = { + var x = It(y.name), S = { label: y.name, - textEdit: $.replace(i.getCompletionRange(s), w), + textEdit: H.replace(i.getCompletionRange(s), x), documentation: mt(y, i.doesSupportMarkdown()), - tags: an(y) ? [_t.Deprecated] : [], - kind: q.Function, - insertTextFormat: y.name !== w ? nt : void 0 + tags: ln(y) ? [_t.Deprecated] : [], + kind: $.Function, + insertTextFormat: y.name !== x ? tt : void 0 }; - fe(y.name, ":-") && (x.sortText = Ye.VendorPrefixed), r.items.push(x); + fe(y.name, ":-") && (S.sortText = Je.VendorPrefixed), r.items.push(S); }); var o = this.cssDataManager.getPseudoElements(); if (o.forEach(function(y) { - var w = Lt(y.name), x = { + var x = It(y.name), S = { label: y.name, - textEdit: $.replace(i.getCompletionRange(s), w), + textEdit: H.replace(i.getCompletionRange(s), x), documentation: mt(y, i.doesSupportMarkdown()), - tags: an(y) ? [_t.Deprecated] : [], - kind: q.Function, - insertTextFormat: y.name !== w ? nt : void 0 + tags: ln(y) ? [_t.Deprecated] : [], + kind: $.Function, + insertTextFormat: y.name !== x ? tt : void 0 }; - fe(y.name, "::-") && (x.sortText = Ye.VendorPrefixed), r.items.push(x); + fe(y.name, "::-") && (S.sortText = Je.VendorPrefixed), r.items.push(S); }), !n) { - for (var l = 0, c = gu; l < c.length; l++) { + for (var l = 0, c = Eu; l < c.length; l++) { var h = c[l]; r.items.push({ label: h, - textEdit: $.replace(this.getCompletionRange(s), h), - kind: q.Keyword + textEdit: H.replace(this.getCompletionRange(s), h), + kind: $.Keyword }); } - for (var u = 0, f = bu; u < f.length; u++) { - var h = f[u]; + for (var u = 0, m = Du; u < m.length; u++) { + var h = m[u]; r.items.push({ label: h, - textEdit: $.replace(this.getCompletionRange(s), h), - kind: q.Keyword + textEdit: H.replace(this.getCompletionRange(s), h), + kind: $.Keyword }); } } - var m = {}; - m[this.currentWord] = !0; + var f = {}; + f[this.currentWord] = !0; var g = this.textDocument.getText(); if (this.styleSheet.accept(function(y) { if (y.type === v.SimpleSelector && y.length > 0) { - var w = g.substr(y.offset, y.length); - return w.charAt(0) === "." && !m[w] && (m[w] = !0, r.items.push({ - label: w, - textEdit: $.replace(i.getCompletionRange(s), w), - kind: q.Keyword + var x = g.substr(y.offset, y.length); + return x.charAt(0) === "." && !f[x] && (f[x] = !0, r.items.push({ + label: x, + textEdit: H.replace(i.getCompletionRange(s), x), + kind: $.Keyword })), !1; } return !0; @@ -12485,28 +12758,28 @@ var Ui = function() { var r = e.findFirstChildBeforeOffset(this.offset); if (!r) return this.getCompletionsForDeclarationProperty(null, n); - if (r instanceof Mi) { + if (r instanceof Ui) { var i = r; - if (!Te(i.colonPosition) || this.offset <= i.colonPosition) + if (!We(i.colonPosition) || this.offset <= i.colonPosition) return this.getCompletionsForDeclarationProperty(i, n); - if (Te(i.semicolonPosition) && i.semicolonPosition < this.offset) + if (We(i.semicolonPosition) && i.semicolonPosition < this.offset) return this.offset === i.semicolonPosition + 1 ? n : this.getCompletionsForDeclarationProperty(null, n); - if (i instanceof Ze) + if (i instanceof Qe) return this.getCompletionsForDeclarationValue(i, n); } else - r instanceof mn ? this.getCompletionsForExtendsReference(r, null, n) : this.currentWord && this.currentWord[0] === "@" ? this.getCompletionsForDeclarationProperty(null, n) : r instanceof Bt && this.getCompletionsForDeclarationProperty(null, n); + r instanceof xn ? this.getCompletionsForExtendsReference(r, null, n) : this.currentWord && this.currentWord[0] === "@" ? this.getCompletionsForDeclarationProperty(null, n) : r instanceof jt && this.getCompletionsForDeclarationProperty(null, n); return n; }, t.prototype.getCompletionsForVariableDeclaration = function(e, n) { - return this.offset && Te(e.colonPosition) && this.offset > e.colonPosition && this.getVariableProposals(e.getValue(), n), n; + return this.offset && We(e.colonPosition) && this.offset > e.colonPosition && this.getVariableProposals(e.getValue(), n), n; }, t.prototype.getCompletionsForExpression = function(e, n) { var r = e.getParent(); - if (r instanceof Gt) + if (r instanceof Xt) return this.getCompletionsForFunctionArgument(r, r.getParent(), n), n; var i = e.findParent(v.Declaration); if (!i) return this.getTermProposals(void 0, null, n), n; var s = e.findChildAtOffset(this.offset, !0); - return s ? s instanceof Li || s instanceof Oe ? this.getCompletionsForDeclarationValue(i, n) : n : this.getCompletionsForDeclarationValue(i, n); + return s ? s instanceof $i || s instanceof Ue ? this.getCompletionsForDeclarationValue(i, n) : n : this.getCompletionsForDeclarationValue(i, n); }, t.prototype.getCompletionsForFunctionArgument = function(e, n, r) { var i = n.getIdentifier(); return i && i.matches("var") && (!n.getArguments().hasChildren() || n.getArguments().getChild(0) === e) && this.getVariableProposalsForCSSVarFunction(r), r; @@ -12514,9 +12787,9 @@ var Ui = function() { var r = e.getDeclarations(); return r && this.offset > r.offset && this.offset < r.end && this.getTermProposals(void 0, null, n), n; }, t.prototype.getCompletionsForMixinReference = function(e, n) { - for (var r = this, i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Mixin), s = 0, a = i; s < a.length; s++) { + for (var r = this, i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Q.Mixin), s = 0, a = i; s < a.length; s++) { var o = a[s]; - o.node instanceof gn && n.items.push(this.makeTermProposal(o, o.node.getParameters(), null)); + o.node instanceof Sn && n.items.push(this.makeTermProposal(o, o.node.getParameters(), null)); } var l = e.getIdentifier() || null; return this.completionParticipants.forEach(function(c) { @@ -12526,40 +12799,40 @@ var Ui = function() { }); }), n; }, t.prototype.getTermProposals = function(e, n, r) { - for (var i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Function), s = 0, a = i; s < a.length; s++) { + for (var i = this.getSymbolContext().findSymbolsAtOffset(this.offset, Q.Function), s = 0, a = i; s < a.length; s++) { var o = a[s]; - o.node instanceof Qn && r.items.push(this.makeTermProposal(o, o.node.getParameters(), n)); + o.node instanceof ir && r.items.push(this.makeTermProposal(o, o.node.getParameters(), n)); } return r; }, t.prototype.makeTermProposal = function(e, n, r) { e.node; var i = n.getChildren().map(function(a) { - return a instanceof pr ? a.getName() : a.getText(); + return a instanceof vr ? a.getName() : a.getText(); }), s = e.name + "(" + i.map(function(a, o) { return "${" + (o + 1) + ":" + a + "}"; }).join(", ") + ")"; return { label: e.name, detail: e.name + "(" + i.join(", ") + ")", - textEdit: $.replace(this.getCompletionRange(r), s), - insertTextFormat: nt, - kind: q.Function, - sortText: Ye.Term + textEdit: H.replace(this.getCompletionRange(r), s), + insertTextFormat: tt, + kind: $.Function, + sortText: Je.Term }; }, t.prototype.getCompletionsForSupportsCondition = function(e, n) { var r = e.findFirstChildBeforeOffset(this.offset); if (r) { - if (r instanceof Ze) - return !Te(r.colonPosition) || this.offset <= r.colonPosition ? this.getCompletionsForDeclarationProperty(r, n) : this.getCompletionsForDeclarationValue(r, n); - if (r instanceof un) + if (r instanceof Qe) + return !We(r.colonPosition) || this.offset <= r.colonPosition ? this.getCompletionsForDeclarationProperty(r, n) : this.getCompletionsForDeclarationValue(r, n); + if (r instanceof fn) return this.getCompletionsForSupportsCondition(r, n); } - return Te(e.lParent) && this.offset > e.lParent && (!Te(e.rParent) || this.offset <= e.rParent) ? this.getCompletionsForDeclarationProperty(null, n) : n; + return We(e.lParent) && this.offset > e.lParent && (!We(e.rParent) || this.offset <= e.rParent) ? this.getCompletionsForDeclarationProperty(null, n) : n; }, t.prototype.getCompletionsForSupports = function(e, n) { var r = e.getDeclarations(), i = !r || this.offset <= r.offset; if (i) { var s = e.findFirstChildBeforeOffset(this.offset); - return s instanceof un ? this.getCompletionsForSupportsCondition(s, n) : n; + return s instanceof fn ? this.getCompletionsForSupportsCondition(s, n) : n; } return this.getCompletionForTopLevel(n); }, t.prototype.getCompletionsForExtendsReference = function(e, n, r) { @@ -12572,7 +12845,7 @@ var Ui = function() { } else { r = "", i = this.position; var a = this.textDocument.positionAt(e.offset + 4); - s = te.create(a, a); + s = ie.create(a, a); } return this.completionParticipants.forEach(function(l) { l.onCssURILiteralValue && l.onCssURILiteralValue({ @@ -12595,19 +12868,19 @@ var Ui = function() { return e >= 0 && e < r.length && r.charAt(e) === n; }, t.prototype.doesSupportMarkdown = function() { var e, n, r; - if (!Te(this.supportsMarkdown)) { - if (!Te(this.lsOptions.clientCapabilities)) + if (!We(this.supportsMarkdown)) { + if (!We(this.lsOptions.clientCapabilities)) return this.supportsMarkdown = !0, this.supportsMarkdown; var i = (r = (n = (e = this.lsOptions.clientCapabilities.textDocument) === null || e === void 0 ? void 0 : e.completion) === null || n === void 0 ? void 0 : n.completionItem) === null || r === void 0 ? void 0 : r.documentationFormat; - this.supportsMarkdown = Array.isArray(i) && i.indexOf(Ue.Markdown) !== -1; + this.supportsMarkdown = Array.isArray(i) && i.indexOf(Ve.Markdown) !== -1; } return this.supportsMarkdown; }, t; }(); -function an(t) { +function ln(t) { return !!(t.status && (t.status === "nonstandard" || t.status === "obsolete")); } -var bi = function() { +var _i = function() { function t() { this.entries = {}; } @@ -12619,20 +12892,20 @@ var bi = function() { return Object.keys(this.entries); }, t; }(); -function Lt(t) { +function It(t) { return t.replace(/\(\)$/, "($1)"); } -function Nu(t, e) { - var n = e.getFullPropertyName(), r = new bi(); +function qu(t, e) { + var n = e.getFullPropertyName(), r = new _i(); function i(o) { - return (o instanceof Oe || o instanceof Li || o instanceof Ii) && r.add(o.getText()), !0; + return (o instanceof Ue || o instanceof $i || o instanceof qi) && r.add(o.getText()), !0; } function s(o) { var l = o.getFullPropertyName(); return n === l; } function a(o) { - if (o instanceof Ze && o !== e && s(o)) { + if (o instanceof Qe && o !== e && s(o)) { var l = o.getValue(); l && l.accept(i); } @@ -12640,31 +12913,31 @@ function Nu(t, e) { } return t.accept(a), r; } -var zu = function() { +var $u = function() { function t(e, n) { this.entries = e, this.currentOffset = n; } return t.prototype.visitNode = function(e) { - return (e instanceof Ii || e instanceof Rn && lu(e)) && (this.currentOffset < e.offset || e.end < this.currentOffset) && this.entries.add(e.getText()), !0; + return (e instanceof qi || e instanceof zn && wu(e)) && (this.currentOffset < e.offset || e.end < this.currentOffset) && this.entries.add(e.getText()), !0; }, t; -}(), Pu = function() { +}(), Hu = function() { function t(e, n) { this.entries = e, this.currentOffset = n; } return t.prototype.visitNode = function(e) { - return e instanceof Oe && e.isCustomProperty && (this.currentOffset < e.offset || e.end < this.currentOffset) && this.entries.add(e.getText()), !0; + return e instanceof Ue && e.isCustomProperty && (this.currentOffset < e.offset || e.end < this.currentOffset) && this.entries.add(e.getText()), !0; }, t; }(); -function Iu(t, e) { +function Gu(t, e) { for (var n = e - 1, r = t.getText(); n >= 0 && ` \r":{[()]},*>+`.indexOf(r.charAt(n)) === -1; ) n--; return r.substring(n + 1, e); } -function Ao(t) { - return t.toLowerCase() in or || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t); +function Wo(t) { + return t.toLowerCase() in pr || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t); } -var Tl = function() { +var Vl = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -12682,7 +12955,7 @@ var Tl = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), Lu = Je(), Vi = function() { +}(), Ju = Ge(), Yi = function() { function t() { this.parent = null, this.children = null, this.attributes = null; } @@ -12707,7 +12980,7 @@ var Tl = function() { n.value = e + n.value; } }, t.prototype.findRoot = function() { - for (var e = this; e.parent && !(e.parent instanceof Xt); ) + for (var e = this; e.parent && !(e.parent instanceof Kt); ) e = e.parent; return e; }, t.prototype.removeChild = function(e) { @@ -12745,31 +13018,31 @@ var Tl = function() { return n; }, t.prototype.cloneWithParent = function() { var e = this.clone(!1); - if (this.parent && !(this.parent instanceof Xt)) { + if (this.parent && !(this.parent instanceof Kt)) { var n = this.parent.cloneWithParent(); n.addChild(e); } return e; }, t; -}(), Xt = function(t) { - Tl(e, t); +}(), Kt = function(t) { + Vl(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } return e; -}(Vi), vi = function(t) { - Tl(e, t); +}(Yi), Ri = function(t) { + Vl(e, t); function e(n) { var r = t.call(this) || this; return r.addAttr("name", n), r; } return e; -}(Vi), Mo = function() { +}(Yi), Oo = function() { function t(e) { this.quote = e, this.result = []; } return t.prototype.print = function(e) { - this.result = [], e instanceof Xt ? e.children && this.doPrint(e.children, 0) : this.doPrint([e], 0); + this.result = [], e instanceof Kt ? e.children && this.doPrint(e.children, 0) : this.doPrint([e], 0); var n = this.result.join(` `); return [{ language: "html", value: n }]; @@ -12783,7 +13056,7 @@ var Tl = function() { this.result.push(r + n); }, t.prototype.doPrintElement = function(e, n) { var r = e.findAttribute("name"); - if (e instanceof vi || r === "…") { + if (e instanceof Ri || r === "…") { this.writeLine(n, r); return; } @@ -12794,12 +13067,12 @@ var Tl = function() { if (o.name !== "name") { i.push(" "), i.push(o.name); var l = o.value; - l && (i.push("="), i.push(st.ensure(l, this.quote))); + l && (i.push("="), i.push(it.ensure(l, this.quote))); } } i.push(">"), this.writeLine(n, i.join("")); }, t; -}(), st; +}(), it; (function(t) { function e(r, i) { return i + n(r) + i; @@ -12810,15 +13083,15 @@ var Tl = function() { return i ? i[1] : r; } t.remove = n; -})(st || (st = {})); -var No = function() { +})(it || (it = {})); +var Uo = function() { function t() { this.id = 0, this.attr = 0, this.tag = 0; } return t; }(); -function Wl(t, e) { - for (var n = new Vi(), r = 0, i = t.getChildren(); r < i.length; r++) { +function Bl(t, e) { + for (var n = new Yi(), r = 0, i = t.getChildren(); r < i.length; r++) { var s = i[r]; switch (s.type) { case v.SelectorCombinator: @@ -12846,78 +13119,78 @@ function Wl(t, e) { return n; case v.ElementNameSelector: var h = s.getText(); - n.addAttr("name", h === "*" ? "element" : Le(h)); + n.addAttr("name", h === "*" ? "element" : Ie(h)); break; case v.ClassSelector: - n.addAttr("class", Le(s.getText().substring(1))); + n.addAttr("class", Ie(s.getText().substring(1))); break; case v.IdentifierSelector: - n.addAttr("id", Le(s.getText().substring(1))); + n.addAttr("id", Ie(s.getText().substring(1))); break; case v.MixinDeclaration: n.addAttr("class", s.getName()); break; case v.PseudoSelector: - n.addAttr(Le(s.getText()), ""); + n.addAttr(Ie(s.getText()), ""); break; case v.AttributeSelector: - var u = s, f = u.getIdentifier(); - if (f) { - var m = u.getValue(), g = u.getOperator(), b = void 0; - if (m && g) - switch (Le(g.getText())) { + var u = s, m = u.getIdentifier(); + if (m) { + var f = u.getValue(), g = u.getOperator(), b = void 0; + if (f && g) + switch (Ie(g.getText())) { case "|=": - b = "".concat(st.remove(Le(m.getText())), "-…"); + b = "".concat(it.remove(Ie(f.getText())), "-…"); break; case "^=": - b = "".concat(st.remove(Le(m.getText())), "…"); + b = "".concat(it.remove(Ie(f.getText())), "…"); break; case "$=": - b = "…".concat(st.remove(Le(m.getText()))); + b = "…".concat(it.remove(Ie(f.getText()))); break; case "~=": - b = " … ".concat(st.remove(Le(m.getText())), " … "); + b = " … ".concat(it.remove(Ie(f.getText())), " … "); break; case "*=": - b = "…".concat(st.remove(Le(m.getText())), "…"); + b = "…".concat(it.remove(Ie(f.getText())), "…"); break; default: - b = st.remove(Le(m.getText())); + b = it.remove(Ie(f.getText())); break; } - n.addAttr(Le(f.getText()), b); + n.addAttr(Ie(m.getText()), b); } break; } } return n; } -function Le(t) { - var e = new _n(); +function Ie(t) { + var e = new Nn(); e.setSource(t); var n = e.scanUnquotedString(); return n ? n.text : t; } -var Tu = function() { +var Xu = function() { function t(e) { this.cssDataManager = e; } return t.prototype.selectorToMarkedString = function(e) { - var n = Uu(e); + var n = Qu(e); if (n) { - var r = new Mo('"').print(n); + var r = new Oo('"').print(n); return r.push(this.selectorToSpecificityMarkedString(e)), r; } else return []; }, t.prototype.simpleSelectorToMarkedString = function(e) { - var n = Wl(e), r = new Mo('"').print(n); + var n = Bl(e), r = new Oo('"').print(n); return r.push(this.selectorToSpecificityMarkedString(e)), r; }, t.prototype.isPseudoElementIdentifier = function(e) { var n = e.match(/^::?([\w-]+)/); return n ? !!this.cssDataManager.getPseudoElement("::" + n[1]) : !1; }, t.prototype.selectorToSpecificityMarkedString = function(e) { var n = this, r = function(s) { - var a = new No(); + var a = new Uo(); e: for (var o = 0, l = s.getChildren(); o < l.length; o++) { var c = l[o]; @@ -12943,23 +13216,23 @@ var Tu = function() { if (h.match(/^:where/i)) continue e; if (h.match(/^:(not|has|is)/i) && c.getChildren().length > 0) { - for (var u = new No(), f = 0, m = c.getChildren(); f < m.length; f++) { - var g = m[f]; + for (var u = new Uo(), m = 0, f = c.getChildren(); m < f.length; m++) { + var g = f[m]; g.type === v.Undefined && g.getChildren(); for (var b = 0, y = g.getChildren(); b < y.length; b++) { - var w = y[b], x = r(w); - if (x.id > u.id) { - u = x; + var x = y[b], S = r(x); + if (S.id > u.id) { + u = S; continue; - } else if (x.id < u.id) + } else if (S.id < u.id) continue; - if (x.attr > u.attr) { - u = x; + if (S.attr > u.attr) { + u = S; continue; - } else if (x.attr < u.attr) + } else if (S.attr < u.attr) continue; - if (x.tag > u.tag) { - u = x; + if (S.tag > u.tag) { + u = S; continue; } } @@ -12971,43 +13244,43 @@ var Tu = function() { break; } if (c.getChildren().length > 0) { - var x = r(c); - a.id += x.id, a.attr += x.attr, a.tag += x.tag; + var S = r(c); + a.id += S.id, a.attr += S.attr, a.tag += S.tag; } } return a; }, i = r(e); - return Lu("specificity", "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", i.id, i.attr, i.tag); + return Ju("specificity", "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", i.id, i.attr, i.tag); }, t; -}(), Wu = function() { +}(), Yu = function() { function t(e) { this.prev = null, this.element = e; } return t.prototype.processSelector = function(e) { var n = null; - if (!(this.element instanceof Xt) && e.getChildren().some(function(h) { + if (!(this.element instanceof Kt) && e.getChildren().some(function(h) { return h.hasChildren() && h.getChild(0).type === v.SelectorCombinator; })) { var r = this.element.findRoot(); - r.parent instanceof Xt && (n = this.element, this.element = r.parent, this.element.removeChild(r), this.prev = null); + r.parent instanceof Kt && (n = this.element, this.element = r.parent, this.element.removeChild(r), this.prev = null); } for (var i = 0, s = e.getChildren(); i < s.length; i++) { var a = s[i]; - if (a instanceof jt) { - if (this.prev instanceof jt) { - var o = new vi("…"); + if (a instanceof qt) { + if (this.prev instanceof qt) { + var o = new Ri("…"); this.element.addChild(o), this.element = o; } else this.prev && (this.prev.matches("+") || this.prev.matches("~")) && this.element.parent && (this.element = this.element.parent); - this.prev && this.prev.matches("~") && this.element.addChild(new vi("⋮")); - var l = Wl(a, n), c = l.findRoot(); + this.prev && this.prev.matches("~") && this.element.addChild(new Ri("⋮")); + var l = Bl(a, n), c = l.findRoot(); this.element.addChild(c), this.element = l; } - (a instanceof jt || a.type === v.SelectorCombinatorParent || a.type === v.SelectorCombinatorShadowPiercingDescendant || a.type === v.SelectorCombinatorSibling || a.type === v.SelectorCombinatorAllSiblings) && (this.prev = a); + (a instanceof qt || a.type === v.SelectorCombinatorParent || a.type === v.SelectorCombinatorShadowPiercingDescendant || a.type === v.SelectorCombinatorSibling || a.type === v.SelectorCombinatorAllSiblings) && (this.prev = a); } }, t; }(); -function Ou(t) { +function Ku(t) { switch (t.type) { case v.MixinDeclaration: case v.Stylesheet: @@ -13015,80 +13288,80 @@ function Ou(t) { } return !1; } -function Uu(t) { +function Qu(t) { if (t.matches("@at-root")) return null; - var e = new Xt(), n = [], r = t.getParent(); - if (r instanceof Bt) - for (var i = r.getParent(); i && !Ou(i); ) { - if (i instanceof Bt) { + var e = new Kt(), n = [], r = t.getParent(); + if (r instanceof jt) + for (var i = r.getParent(); i && !Ku(i); ) { + if (i instanceof jt) { if (i.getSelectors().matches("@at-root")) break; n.push(i); } i = i.getParent(); } - for (var s = new Wu(e), a = n.length - 1; a >= 0; a--) { + for (var s = new Yu(e), a = n.length - 1; a >= 0; a--) { var o = n[a].getSelectors().getChild(0); o && s.processSelector(o); } return s.processSelector(t), e; } -var Bi = function() { +var Ki = function() { function t(e, n) { - this.clientCapabilities = e, this.cssDataManager = n, this.selectorPrinting = new Tu(n); + this.clientCapabilities = e, this.cssDataManager = n, this.selectorPrinting = new Xu(n); } return t.prototype.configure = function(e) { this.defaultSettings = e; }, t.prototype.doHover = function(e, n, r, i) { i === void 0 && (i = this.defaultSettings); function s(y) { - return te.create(e.positionAt(y.offset), e.positionAt(y.end)); + return ie.create(e.positionAt(y.offset), e.positionAt(y.end)); } - for (var a = e.offsetAt(n), o = Di(r, a), l = null, c = 0; c < o.length; c++) { + for (var a = e.offsetAt(n), o = Wi(r, a), l = null, c = 0; c < o.length; c++) { var h = o[c]; - if (h instanceof Fn) { + if (h instanceof Mn) { l = { contents: this.selectorPrinting.selectorToMarkedString(h), range: s(h) }; break; } - if (h instanceof jt) { + if (h instanceof qt) { fe(h.getText(), "@") || (l = { contents: this.selectorPrinting.simpleSelectorToMarkedString(h), range: s(h) }); break; } - if (h instanceof Ze) { - var u = h.getFullPropertyName(), f = this.cssDataManager.getProperty(u); - if (f) { - var m = mt(f, this.doesSupportMarkdown(), i); - m ? l = { - contents: m, + if (h instanceof Qe) { + var u = h.getFullPropertyName(), m = this.cssDataManager.getProperty(u); + if (m) { + var f = mt(m, this.doesSupportMarkdown(), i); + f ? l = { + contents: f, range: s(h) } : l = null; } continue; } - if (h instanceof Fl) { - var g = h.getText(), f = this.cssDataManager.getAtDirective(g); - if (f) { - var m = mt(f, this.doesSupportMarkdown(), i); - m ? l = { - contents: m, + if (h instanceof Al) { + var g = h.getText(), m = this.cssDataManager.getAtDirective(g); + if (m) { + var f = mt(m, this.doesSupportMarkdown(), i); + f ? l = { + contents: f, range: s(h) } : l = null; } continue; } - if (h instanceof W && h.type === v.PseudoSelector) { - var b = h.getText(), f = b.slice(0, 2) === "::" ? this.cssDataManager.getPseudoElement(b) : this.cssDataManager.getPseudoClass(b); - if (f) { - var m = mt(f, this.doesSupportMarkdown(), i); - m ? l = { - contents: m, + if (h instanceof V && h.type === v.PseudoSelector) { + var b = h.getText(), m = b.slice(0, 2) === "::" ? this.cssDataManager.getPseudoElement(b) : this.cssDataManager.getPseudoClass(b); + if (m) { + var f = mt(m, this.doesSupportMarkdown(), i); + f ? l = { + contents: f, range: s(h) } : l = null; } @@ -13104,15 +13377,15 @@ var Bi = function() { return typeof n == "string" ? n : n.value; }) : e.value; }, t.prototype.doesSupportMarkdown = function() { - if (!Te(this.supportsMarkdown)) { - if (!Te(this.clientCapabilities)) + if (!We(this.supportsMarkdown)) { + if (!We(this.clientCapabilities)) return this.supportsMarkdown = !0, this.supportsMarkdown; var e = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover; - this.supportsMarkdown = e && e.contentFormat && Array.isArray(e.contentFormat) && e.contentFormat.indexOf(Ue.Markdown) !== -1; + this.supportsMarkdown = e && e.contentFormat && Array.isArray(e.contentFormat) && e.contentFormat.indexOf(Ve.Markdown) !== -1; } return this.supportsMarkdown; }, t; -}(), on = function(t, e, n, r) { +}(), cn = function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -13138,7 +13411,7 @@ var Bi = function() { } c((r = r.apply(t, e || [])).next()); }); -}, ln = function(t, e) { +}, hn = function(t, e) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; @@ -13202,12 +13475,12 @@ var Bi = function() { throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } -}, zo = Je(), Po = /^\w+:\/\//, Io = /^data:/, ji = function() { +}, Vo = Ge(), Bo = /^\w+:\/\//, jo = /^data:/, Qi = function() { function t(e, n) { this.fileSystemProvider = e, this.resolveModuleReferences = n; } return t.prototype.findDefinition = function(e, n, r) { - var i = new fi(r), s = e.offsetAt(n), a = ni(r, s); + var i = new Si(r), s = e.offsetAt(n), a = hi(r, s); if (!a) return null; var o = i.findSymbolFromNode(a); @@ -13224,21 +13497,21 @@ var Bi = function() { }; }); }, t.prototype.findDocumentHighlights = function(e, n, r) { - var i = [], s = e.offsetAt(n), a = ni(r, s); + var i = [], s = e.offsetAt(n), a = hi(r, s); if (!a || a.type === v.Stylesheet || a.type === v.Declarations) return i; a.type === v.Identifier && a.parent && a.parent.type === v.ClassSelector && (a = a.parent); - var o = new fi(r), l = o.findSymbolFromNode(a), c = a.getText(); + var o = new Si(r), l = o.findSymbolFromNode(a), c = a.getText(); return r.accept(function(h) { if (l) { if (o.matchesSymbol(h, l)) return i.push({ - kind: Lo(h), + kind: qo(h), range: kt(h, e) }), !1; } else a && a.type === h.type && h.matches(c) && i.push({ - kind: Lo(h), + kind: qo(h), range: kt(h, e) }); return !0; @@ -13248,8 +13521,8 @@ var Bi = function() { }, t.prototype.findDocumentLinks = function(e, n, r) { for (var i = this.findUnresolvedLinks(e, n), s = [], a = 0, o = i; a < o.length; a++) { var l = o[a], c = l.link, h = c.target; - if (!(!h || Io.test(h))) - if (Po.test(h)) + if (!(!h || jo.test(h))) + if (Bo.test(h)) s.push(c); else { var u = r.resolveReference(h, e.uri); @@ -13258,20 +13531,20 @@ var Bi = function() { } return s; }, t.prototype.findDocumentLinks2 = function(e, n, r) { - return on(this, void 0, void 0, function() { + return cn(this, void 0, void 0, function() { var i, s, a, o, l, c, h, u; - return ln(this, function(f) { - switch (f.label) { + return hn(this, function(m) { + switch (m.label) { case 0: - i = this.findUnresolvedLinks(e, n), s = [], a = 0, o = i, f.label = 1; + i = this.findUnresolvedLinks(e, n), s = [], a = 0, o = i, m.label = 1; case 1: - return a < o.length ? (l = o[a], c = l.link, h = c.target, !h || Io.test(h) ? [3, 5] : [3, 2]) : [3, 6]; + return a < o.length ? (l = o[a], c = l.link, h = c.target, !h || jo.test(h) ? [3, 5] : [3, 2]) : [3, 6]; case 2: - return Po.test(h) ? (s.push(c), [3, 5]) : [3, 3]; + return Bo.test(h) ? (s.push(c), [3, 5]) : [3, 3]; case 3: return [4, this.resolveRelativeReference(h, e.uri, r, l.isRawLink)]; case 4: - u = f.sent(), u !== void 0 && (c.target = u, s.push(c)), f.label = 5; + u = m.sent(), u !== void 0 && (c.target = u, s.push(c)), m.label = 5; case 5: return a++, [3, 1]; case 6: @@ -13304,57 +13577,57 @@ var Bi = function() { return n.accept(function(i) { var s = { name: null, - kind: Ft.Class, + kind: Rt.Class, location: null }, a = i; - if (i instanceof Fn) - return s.name = i.getText(), a = i.findAParent(v.Ruleset, v.ExtendsReference), a && (s.location = bn.create(e.uri, kt(a, e)), r.push(s)), !1; - if (i instanceof fr) - s.name = i.getName(), s.kind = Ft.Variable; - else if (i instanceof gn) - s.name = i.getName(), s.kind = Ft.Method; - else if (i instanceof Qn) - s.name = i.getName(), s.kind = Ft.Function; - else if (i instanceof xl) - s.name = zo("literal.keyframes", "@keyframes {0}", i.getName()); - else if (i instanceof yl) - s.name = zo("literal.fontface", "@font-face"); - else if (i instanceof Sl) { + if (i instanceof Mn) + return s.name = i.getText(), a = i.findAParent(v.Ruleset, v.ExtendsReference), a && (s.location = Cn.create(e.uri, kt(a, e)), r.push(s)), !1; + if (i instanceof yr) + s.name = i.getName(), s.kind = Rt.Variable; + else if (i instanceof Sn) + s.name = i.getName(), s.kind = Rt.Method; + else if (i instanceof ir) + s.name = i.getName(), s.kind = Rt.Function; + else if (i instanceof _l) + s.name = Vo("literal.keyframes", "@keyframes {0}", i.getName()); + else if (i instanceof Cl) + s.name = Vo("literal.fontface", "@font-face"); + else if (i instanceof Rl) { var o = i.getChild(0); - o instanceof Cl && (s.name = "@media " + o.getText(), s.kind = Ft.Module); + o instanceof Fl && (s.name = "@media " + o.getText(), s.kind = Rt.Module); } - return s.name && (s.location = bn.create(e.uri, kt(a, e)), r.push(s)), !0; + return s.name && (s.location = Cn.create(e.uri, kt(a, e)), r.push(s)), !0; }), r; }, t.prototype.findDocumentColors = function(e, n) { var r = []; return n.accept(function(i) { - var s = Vu(i, e); + var s = Zu(i, e); return s && r.push(s), !0; }), r; }, t.prototype.getColorPresentations = function(e, n, r, i) { var s = [], a = Math.round(r.red * 255), o = Math.round(r.green * 255), l = Math.round(r.blue * 255), c; - r.alpha === 1 ? c = "rgb(".concat(a, ", ").concat(o, ", ").concat(l, ")") : c = "rgba(".concat(a, ", ").concat(o, ", ").concat(l, ", ").concat(r.alpha, ")"), s.push({ label: c, textEdit: $.replace(i, c) }), r.alpha === 1 ? c = "#".concat(St(a)).concat(St(o)).concat(St(l)) : c = "#".concat(St(a)).concat(St(o)).concat(St(l)).concat(St(Math.round(r.alpha * 255))), s.push({ label: c, textEdit: $.replace(i, c) }); - var h = Nl(r); - h.a === 1 ? c = "hsl(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%)") : c = "hsla(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%, ").concat(h.a, ")"), s.push({ label: c, textEdit: $.replace(i, c) }); - var u = pu(r); - return u.a === 1 ? c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "%)") : c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "% / ").concat(u.a, ")"), s.push({ label: c, textEdit: $.replace(i, c) }), s; + r.alpha === 1 ? c = "rgb(".concat(a, ", ").concat(o, ", ").concat(l, ")") : c = "rgba(".concat(a, ", ").concat(o, ", ").concat(l, ", ").concat(r.alpha, ")"), s.push({ label: c, textEdit: H.replace(i, c) }), r.alpha === 1 ? c = "#".concat(St(a)).concat(St(o)).concat(St(l)) : c = "#".concat(St(a)).concat(St(o)).concat(St(l)).concat(St(Math.round(r.alpha * 255))), s.push({ label: c, textEdit: H.replace(i, c) }); + var h = Il(r); + h.a === 1 ? c = "hsl(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%)") : c = "hsla(".concat(h.h, ", ").concat(Math.round(h.s * 100), "%, ").concat(Math.round(h.l * 100), "%, ").concat(h.a, ")"), s.push({ label: c, textEdit: H.replace(i, c) }); + var u = _u(r); + return u.a === 1 ? c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "%)") : c = "hwb(".concat(u.h, " ").concat(Math.round(u.w * 100), "% ").concat(Math.round(u.b * 100), "% / ").concat(u.a, ")"), s.push({ label: c, textEdit: H.replace(i, c) }), s; }, t.prototype.doRename = function(e, n, r, i) { var s, a = this.findDocumentHighlights(e, n, i), o = a.map(function(l) { - return $.replace(l.range, r); + return H.replace(l.range, r); }); return { changes: (s = {}, s[e.uri] = o, s) }; }, t.prototype.resolveModuleReference = function(e, n, r) { - return on(this, void 0, void 0, function() { + return cn(this, void 0, void 0, function() { var i, s, a, o, l; - return ln(this, function(c) { + return hn(this, function(c) { switch (c.label) { case 0: - return fe(n, "file://") ? (i = Bu(e), s = r.resolveReference("/", n), a = Fr(n), [4, this.resolvePathToModule(i, a, s)]) : [3, 2]; + return fe(n, "file://") ? (i = ep(e), s = r.resolveReference("/", n), a = Pr(n), [4, this.resolvePathToModule(i, a, s)]) : [3, 2]; case 1: if (o = c.sent(), o) - return l = e.substring(i.length + 1), [2, gi(o, l)]; + return l = e.substring(i.length + 1), [2, ki(o, l)]; c.label = 2; case 2: return [2, void 0]; @@ -13362,9 +13635,9 @@ var Bi = function() { }); }); }, t.prototype.resolveRelativeReference = function(e, n, r, i) { - return on(this, void 0, void 0, function() { + return cn(this, void 0, void 0, function() { var s, a; - return ln(this, function(o) { + return hn(this, function(o) { switch (o.label) { case 0: return s = r.resolveReference(e, n), e[0] === "~" && e[1] !== "/" && this.fileSystemProvider ? (e = e.substring(1), [4, this.resolveModuleReference(e, n, r)]) : [3, 2]; @@ -13386,21 +13659,21 @@ var Bi = function() { }); }); }, t.prototype.resolvePathToModule = function(e, n, r) { - return on(this, void 0, void 0, function() { + return cn(this, void 0, void 0, function() { var i; - return ln(this, function(s) { + return hn(this, function(s) { switch (s.label) { case 0: - return i = gi(n, "node_modules", e, "package.json"), [4, this.fileExists(i)]; + return i = ki(n, "node_modules", e, "package.json"), [4, this.fileExists(i)]; case 1: - return s.sent() ? [2, Fr(i)] : r && n.startsWith(r) && n.length !== r.length ? [2, this.resolvePathToModule(e, Fr(n), r)] : [2, void 0]; + return s.sent() ? [2, Pr(i)] : r && n.startsWith(r) && n.length !== r.length ? [2, this.resolvePathToModule(e, Pr(n), r)] : [2, void 0]; } }); }); }, t.prototype.fileExists = function(e) { - return on(this, void 0, void 0, function() { + return cn(this, void 0, void 0, function() { var n; - return ln(this, function(r) { + return hn(this, function(r) { switch (r.label) { case 0: if (!this.fileSystemProvider) @@ -13409,7 +13682,7 @@ var Bi = function() { case 1: return r.trys.push([1, 3, , 4]), [4, this.fileSystemProvider.stat(e)]; case 2: - return n = r.sent(), n.type === Sn.Unknown && n.size === -1 ? [2, !1] : [2, !0]; + return n = r.sent(), n.type === En.Unknown && n.size === -1 ? [2, !1] : [2, !0]; case 3: return r.sent(), [2, !1]; case 4: @@ -13419,8 +13692,8 @@ var Bi = function() { }); }, t; }(); -function Vu(t, e) { - var n = fu(t); +function Zu(t, e) { + var n = Ru(t); if (n) { var r = kt(t, e); return { color: n, range: r }; @@ -13428,10 +13701,10 @@ function Vu(t, e) { return null; } function kt(t, e) { - return te.create(e.positionAt(t.offset), e.positionAt(t.end)); + return ie.create(e.positionAt(t.offset), e.positionAt(t.end)); } -function Lo(t) { - if (t.type === v.Selector || t instanceof Oe && t.parent && t.parent instanceof Ni && t.isCustomProperty) +function qo(t) { + if (t.type === v.Selector || t instanceof Ue && t.parent && t.parent instanceof Vi && t.isCustomProperty) return Ut.Write; if (t.parent) switch (t.parent.type) { @@ -13448,48 +13721,48 @@ function St(t) { var e = t.toString(16); return e.length !== 2 ? "0" + e : e; } -function Bu(t) { +function ep(t) { return t[0] === "@" ? t.substring(0, t.indexOf("/", t.indexOf("/") + 1)) : t.substring(0, t.indexOf("/")); } -var pe = Je(), Tt = Pe.Warning, To = Pe.Error, je = Pe.Ignore, ve = function() { +var pe = Ge(), Tt = Pe.Warning, $o = Pe.Error, Be = Pe.Ignore, be = function() { function t(e, n, r) { this.id = e, this.message = n, this.defaultValue = r; } return t; -}(), ju = function() { +}(), tp = function() { function t(e, n, r) { this.id = e, this.message = n, this.defaultValue = r; } return t; -}(), ne = { - AllVendorPrefixes: new ve("compatibleVendorPrefixes", pe("rule.vendorprefixes.all", "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), je), - IncludeStandardPropertyWhenUsingVendorPrefix: new ve("vendorPrefix", pe("rule.standardvendorprefix.all", "When using a vendor-specific prefix also include the standard property"), Tt), - DuplicateDeclarations: new ve("duplicateProperties", pe("rule.duplicateDeclarations", "Do not use duplicate style definitions"), je), - EmptyRuleSet: new ve("emptyRules", pe("rule.emptyRuleSets", "Do not use empty rulesets"), Tt), - ImportStatemement: new ve("importStatement", pe("rule.importDirective", "Import statements do not load in parallel"), je), - BewareOfBoxModelSize: new ve("boxModel", pe("rule.bewareOfBoxModelSize", "Do not use width or height when using padding or border"), je), - UniversalSelector: new ve("universalSelector", pe("rule.universalSelector", "The universal selector (*) is known to be slow"), je), - ZeroWithUnit: new ve("zeroUnits", pe("rule.zeroWidthUnit", "No unit for zero needed"), je), - RequiredPropertiesForFontFace: new ve("fontFaceProperties", pe("rule.fontFaceProperties", "@font-face rule must define 'src' and 'font-family' properties"), Tt), - HexColorLength: new ve("hexColorLength", pe("rule.hexColor", "Hex colors must consist of three, four, six or eight hex numbers"), To), - ArgsInColorFunction: new ve("argumentsInColorFunction", pe("rule.colorFunction", "Invalid number of parameters"), To), - UnknownProperty: new ve("unknownProperties", pe("rule.unknownProperty", "Unknown property."), Tt), - UnknownAtRules: new ve("unknownAtRules", pe("rule.unknownAtRules", "Unknown at-rule."), Tt), - IEStarHack: new ve("ieHack", pe("rule.ieHack", "IE hacks are only necessary when supporting IE7 and older"), je), - UnknownVendorSpecificProperty: new ve("unknownVendorSpecificProperties", pe("rule.unknownVendorSpecificProperty", "Unknown vendor specific property."), je), - PropertyIgnoredDueToDisplay: new ve("propertyIgnoredDueToDisplay", pe("rule.propertyIgnoredDueToDisplay", "Property is ignored due to the display."), Tt), - AvoidImportant: new ve("important", pe("rule.avoidImportant", "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), je), - AvoidFloat: new ve("float", pe("rule.avoidFloat", "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), je), - AvoidIdSelector: new ve("idSelector", pe("rule.avoidIdSelector", "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), je) -}, qu = { - ValidProperties: new ju("validProperties", pe("rule.validProperties", "A list of properties that are not validated against the `unknownProperties` rule."), []) -}, $u = function() { +}(), se = { + AllVendorPrefixes: new be("compatibleVendorPrefixes", pe("rule.vendorprefixes.all", "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Be), + IncludeStandardPropertyWhenUsingVendorPrefix: new be("vendorPrefix", pe("rule.standardvendorprefix.all", "When using a vendor-specific prefix also include the standard property"), Tt), + DuplicateDeclarations: new be("duplicateProperties", pe("rule.duplicateDeclarations", "Do not use duplicate style definitions"), Be), + EmptyRuleSet: new be("emptyRules", pe("rule.emptyRuleSets", "Do not use empty rulesets"), Tt), + ImportStatemement: new be("importStatement", pe("rule.importDirective", "Import statements do not load in parallel"), Be), + BewareOfBoxModelSize: new be("boxModel", pe("rule.bewareOfBoxModelSize", "Do not use width or height when using padding or border"), Be), + UniversalSelector: new be("universalSelector", pe("rule.universalSelector", "The universal selector (*) is known to be slow"), Be), + ZeroWithUnit: new be("zeroUnits", pe("rule.zeroWidthUnit", "No unit for zero needed"), Be), + RequiredPropertiesForFontFace: new be("fontFaceProperties", pe("rule.fontFaceProperties", "@font-face rule must define 'src' and 'font-family' properties"), Tt), + HexColorLength: new be("hexColorLength", pe("rule.hexColor", "Hex colors must consist of three, four, six or eight hex numbers"), $o), + ArgsInColorFunction: new be("argumentsInColorFunction", pe("rule.colorFunction", "Invalid number of parameters"), $o), + UnknownProperty: new be("unknownProperties", pe("rule.unknownProperty", "Unknown property."), Tt), + UnknownAtRules: new be("unknownAtRules", pe("rule.unknownAtRules", "Unknown at-rule."), Tt), + IEStarHack: new be("ieHack", pe("rule.ieHack", "IE hacks are only necessary when supporting IE7 and older"), Be), + UnknownVendorSpecificProperty: new be("unknownVendorSpecificProperties", pe("rule.unknownVendorSpecificProperty", "Unknown vendor specific property."), Be), + PropertyIgnoredDueToDisplay: new be("propertyIgnoredDueToDisplay", pe("rule.propertyIgnoredDueToDisplay", "Property is ignored due to the display."), Tt), + AvoidImportant: new be("important", pe("rule.avoidImportant", "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Be), + AvoidFloat: new be("float", pe("rule.avoidFloat", "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Be), + AvoidIdSelector: new be("idSelector", pe("rule.avoidIdSelector", "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Be) +}, np = { + ValidProperties: new tp("validProperties", pe("rule.validProperties", "A list of properties that are not validated against the `unknownProperties` rule."), []) +}, rp = function() { function t(e) { e === void 0 && (e = {}), this.conf = e; } return t.prototype.getRule = function(e) { if (this.conf.hasOwnProperty(e.id)) { - var n = Hu(this.conf[e.id]); + var n = ip(this.conf[e.id]); if (n) return n; } @@ -13498,7 +13771,7 @@ var pe = Je(), Tt = Pe.Warning, To = Pe.Error, je = Pe.Ignore, ve = function() { return this.conf[e.id]; }, t; }(); -function Hu(t) { +function ip(t) { switch (t) { case "ignore": return Pe.Ignore; @@ -13509,14 +13782,14 @@ function Hu(t) { } return null; } -var Gu = Je(), qi = function() { +var sp = Ge(), Zi = function() { function t(e) { this.cssDataManager = e; } return t.prototype.doCodeActions = function(e, n, r, i) { return this.doCodeActions2(e, n, r, i).map(function(s) { var a = s.edit && s.edit.documentChanges && s.edit.documentChanges[0]; - return Jt.create(s.title, "_css.applyCodeAction", e.uri, e.version, a && a.edits); + return Yt.create(s.title, "_css.applyCodeAction", e.uri, e.version, a && a.edits); }); }, t.prototype.doCodeActions2 = function(e, n, r, i) { var s = []; @@ -13528,22 +13801,22 @@ var Gu = Je(), qi = function() { return s; }, t.prototype.getFixesForUnknownProperty = function(e, n, r, i) { var s = n.getName(), a = []; - this.cssDataManager.getProperties().forEach(function(w) { - var x = yd(s, w.name); - x >= s.length / 2 && a.push({ property: w.name, score: x }); - }), a.sort(function(w, x) { - return x.score - w.score || w.property.localeCompare(x.property); + this.cssDataManager.getProperties().forEach(function(x) { + var S = Nd(s, x.name); + S >= s.length / 2 && a.push({ property: x.name, score: S }); + }), a.sort(function(x, S) { + return S.score - x.score || x.property.localeCompare(S.property); }); for (var o = 3, l = 0, c = a; l < c.length; l++) { - var h = c[l], u = h.property, f = Gu("css.codeaction.rename", "Rename to '{0}'", u), m = $.replace(r.range, u), g = li.create(e.uri, e.version), b = { documentChanges: [vn.create(g, [m])] }, y = di.create(f, b, hi.QuickFix); + var h = c[l], u = h.property, m = sp("css.codeaction.rename", "Rename to '{0}'", u), f = H.replace(r.range, u), g = gi.create(e.uri, e.version), b = { documentChanges: [kn.create(g, [f])] }, y = yi.create(m, b, vi.QuickFix); if (y.diagnostics = [r], i.push(y), --o <= 0) return; } }, t.prototype.appendFixesForMarker = function(e, n, r, i) { - if (r.code === ne.UnknownProperty.id) - for (var s = e.offsetAt(r.range.start), a = e.offsetAt(r.range.end), o = Di(n, s), l = o.length - 1; l >= 0; l--) { + if (r.code === se.UnknownProperty.id) + for (var s = e.offsetAt(r.range.start), a = e.offsetAt(r.range.end), o = Wi(n, s), l = o.length - 1; l >= 0; l--) { var c = o[l]; - if (c instanceof Ze) { + if (c instanceof Qe) { var h = c.getProperty(); if (h && h.offset === s && h.end === a) { this.getFixesForUnknownProperty(e, h, r, i); @@ -13552,23 +13825,23 @@ var Gu = Je(), qi = function() { } } }, t; -}(), Ju = function() { +}(), ap = function() { function t(e) { this.fullPropertyName = e.getFullPropertyName().toLowerCase(), this.node = e; } return t; }(); -function hn(t, e, n, r) { +function un(t, e, n, r) { var i = t[e]; - i.value = n, n && (Pl(i.properties, r) || i.properties.push(r)); + i.value = n, n && (Wl(i.properties, r) || i.properties.push(r)); } -function Xu(t, e, n) { - hn(t, "top", e, n), hn(t, "right", e, n), hn(t, "bottom", e, n), hn(t, "left", e, n); +function op(t, e, n) { + un(t, "top", e, n), un(t, "right", e, n), un(t, "bottom", e, n), un(t, "left", e, n); } function xe(t, e, n, r) { - e === "top" || e === "right" || e === "bottom" || e === "left" ? hn(t, e, n, r) : Xu(t, n, r); + e === "top" || e === "right" || e === "bottom" || e === "left" ? un(t, e, n, r) : op(t, n, r); } -function Er(t, e, n) { +function Ir(t, e, n) { switch (e.length) { case 1: xe(t, void 0, e[0], n); @@ -13584,7 +13857,7 @@ function Er(t, e, n) { break; } } -function yi(t, e) { +function Fi(t, e) { for (var n = 0, r = e; n < r.length; n++) { var i = r[n]; if (t.matches(i)) @@ -13592,36 +13865,36 @@ function yi(t, e) { } return !1; } -function Cn(t, e) { - return e === void 0 && (e = !0), e && yi(t, ["initial", "unset"]) ? !1 : parseFloat(t.getText()) !== 0; +function Dn(t, e) { + return e === void 0 && (e = !0), e && Fi(t, ["initial", "unset"]) ? !1 : parseFloat(t.getText()) !== 0; } -function Wo(t, e) { +function Ho(t, e) { return e === void 0 && (e = !0), t.map(function(n) { - return Cn(n, e); + return Dn(n, e); }); } -function cr(t, e) { - return e === void 0 && (e = !0), !(yi(t, ["none", "hidden"]) || e && yi(t, ["initial", "unset"])); +function mr(t, e) { + return e === void 0 && (e = !0), !(Fi(t, ["none", "hidden"]) || e && Fi(t, ["initial", "unset"])); } -function Yu(t, e) { +function lp(t, e) { return e === void 0 && (e = !0), t.map(function(n) { - return cr(n, e); + return mr(n, e); }); } -function Ku(t) { +function cp(t) { var e = t.getChildren(); if (e.length === 1) { var n = e[0]; - return Cn(n) && cr(n); + return Dn(n) && mr(n); } for (var r = 0, i = e; r < i.length; r++) { var s = i[r], n = s; - if (!Cn(n, !1) || !cr(n, !1)) + if (!Dn(n, !1) || !mr(n, !1)) return !1; } return !0; } -function Qu(t) { +function hp(t) { for (var e = { top: { value: !1, properties: [] }, right: { value: !1, properties: [] }, @@ -13656,26 +13929,26 @@ function Qu(t) { case "left": switch (a[2]) { case void 0: - xe(e, a[1], Ku(s), i); + xe(e, a[1], cp(s), i); break; case "width": - xe(e, a[1], Cn(s, !1), i); + xe(e, a[1], Dn(s, !1), i); break; case "style": - xe(e, a[1], cr(s, !0), i); + xe(e, a[1], mr(s, !0), i); break; } break; case "width": - Er(e, Wo(s.getChildren(), !1), i); + Ir(e, Ho(s.getChildren(), !1), i); break; case "style": - Er(e, Yu(s.getChildren(), !0), i); + Ir(e, lp(s.getChildren(), !0), i); break; } break; case "padding": - a.length === 1 ? Er(e, Wo(s.getChildren(), !0), i) : xe(e, a[1], Cn(s, !0), i); + a.length === 1 ? Ir(e, Ho(s.getChildren(), !0), i) : xe(e, a[1], Dn(s, !0), i); break; } break; @@ -13683,7 +13956,7 @@ function Qu(t) { } return e; } -var rt = Je(), Oo = function() { +var nt = Ge(), Go = function() { function t() { this.data = {}; } @@ -13691,11 +13964,11 @@ var rt = Je(), Oo = function() { var i = this.data[e]; i || (i = { nodes: [], names: [] }, this.data[e] = i), i.names.push(n), r && i.nodes.push(r); }, t; -}(), Zu = function() { +}(), dp = function() { function t(e, n, r) { var i = this; - this.cssDataManager = r, this.warnings = [], this.settings = n, this.documentText = e.getText(), this.keyframes = new Oo(), this.validProperties = {}; - var s = n.getSetting(qu.ValidProperties); + this.cssDataManager = r, this.warnings = [], this.settings = n, this.documentText = e.getText(), this.keyframes = new Go(), this.validProperties = {}; + var s = n.getSetting(np.ValidProperties); Array.isArray(s) && s.forEach(function(a) { if (typeof a == "string") { var o = a.trim().toLowerCase(); @@ -13734,7 +14007,7 @@ var rt = Je(), Oo = function() { return (n.getLevel() & e) !== 0; }); }, t.prototype.addEntry = function(e, n, r) { - var i = new Rl(e, n, this.settings.getRule(n), r); + var i = new Nl(e, n, this.settings.getRule(n), r); this.warnings.push(i); }, t.prototype.getMissingNames = function(e, n) { for (var r = e.slice(0), i = 0; i < n.length; i++) { @@ -13743,7 +14016,7 @@ var rt = Je(), Oo = function() { } for (var a = null, i = 0; i < r.length; i++) { var o = r[i]; - o && (a === null ? a = rt("namelist.single", "'{0}'", o) : a = rt("namelist.concatenated", "{0}, '{1}'", a, o)); + o && (a === null ? a = nt("namelist.single", "'{0}'", o) : a = nt("namelist.concatenated", "{0}, '{1}'", a, o)); } return a; }, t.prototype.visitNode = function(e) { @@ -13779,7 +14052,7 @@ var rt = Je(), Oo = function() { if (!n) return !1; var r = this.cssDataManager.getAtDirective(n.getText()); - return r ? !1 : (this.addEntry(n, ne.UnknownAtRules, "Unknown at rule ".concat(n.getText())), !0); + return r ? !1 : (this.addEntry(n, se.UnknownAtRules, "Unknown at rule ".concat(n.getText())), !0); }, t.prototype.visitKeyframe = function(e) { var n = e.getKeyword(); if (!n) @@ -13796,12 +14069,12 @@ var rt = Je(), Oo = function() { for (var a = 0, o = this.keyframes.data[n].nodes; a < o.length; a++) { var l = o[a]; if (i) { - var c = rt("keyframes.standardrule.missing", "Always define standard rule '@keyframes' when defining keyframes."); - this.addEntry(l, ne.IncludeStandardPropertyWhenUsingVendorPrefix, c); + var c = nt("keyframes.standardrule.missing", "Always define standard rule '@keyframes' when defining keyframes."); + this.addEntry(l, se.IncludeStandardPropertyWhenUsingVendorPrefix, c); } if (s) { - var c = rt("keyframes.vendorspecific.missing", "Always include all vendor specific rules: Missing: {0}", s); - this.addEntry(l, ne.AllVendorPrefixes, c); + var c = nt("keyframes.vendorspecific.missing", "Always include all vendor specific rules: Missing: {0}", s); + this.addEntry(l, se.AllVendorPrefixes, c); } } } @@ -13809,106 +14082,106 @@ var rt = Je(), Oo = function() { return !0; }, t.prototype.visitSimpleSelector = function(e) { var n = this.documentText.charAt(e.offset); - return e.length === 1 && n === "*" && this.addEntry(e, ne.UniversalSelector), !0; + return e.length === 1 && n === "*" && this.addEntry(e, se.UniversalSelector), !0; }, t.prototype.visitIdentifierSelector = function(e) { - return this.addEntry(e, ne.AvoidIdSelector), !0; + return this.addEntry(e, se.AvoidIdSelector), !0; }, t.prototype.visitImport = function(e) { - return this.addEntry(e, ne.ImportStatemement), !0; + return this.addEntry(e, se.ImportStatemement), !0; }, t.prototype.visitRuleSet = function(e) { var n = e.getDeclarations(); if (!n) return !1; - n.hasChildren() || this.addEntry(e.getSelectors(), ne.EmptyRuleSet); + n.hasChildren() || this.addEntry(e.getSelectors(), se.EmptyRuleSet); for (var r = [], i = 0, s = n.getChildren(); i < s.length; i++) { var a = s[i]; - a instanceof Ze && r.push(new Ju(a)); + a instanceof Qe && r.push(new ap(a)); } - var o = Qu(r); + var o = hp(r); if (o.width) { var l = []; - if (o.right.value && (l = Ln(l, o.right.properties)), o.left.value && (l = Ln(l, o.left.properties)), l.length !== 0) { + if (o.right.value && (l = jn(l, o.right.properties)), o.left.value && (l = jn(l, o.left.properties)), l.length !== 0) { for (var c = 0, h = l; c < h.length; c++) { var u = h[c]; - this.addEntry(u.node, ne.BewareOfBoxModelSize); + this.addEntry(u.node, se.BewareOfBoxModelSize); } - this.addEntry(o.width.node, ne.BewareOfBoxModelSize); + this.addEntry(o.width.node, se.BewareOfBoxModelSize); } } if (o.height) { var l = []; - if (o.top.value && (l = Ln(l, o.top.properties)), o.bottom.value && (l = Ln(l, o.bottom.properties)), l.length !== 0) { - for (var f = 0, m = l; f < m.length; f++) { - var u = m[f]; - this.addEntry(u.node, ne.BewareOfBoxModelSize); + if (o.top.value && (l = jn(l, o.top.properties)), o.bottom.value && (l = jn(l, o.bottom.properties)), l.length !== 0) { + for (var m = 0, f = l; m < f.length; m++) { + var u = f[m]; + this.addEntry(u.node, se.BewareOfBoxModelSize); } - this.addEntry(o.height.node, ne.BewareOfBoxModelSize); + this.addEntry(o.height.node, se.BewareOfBoxModelSize); } } var g = this.fetchWithValue(r, "display", "inline-block"); if (g.length > 0) for (var b = this.fetch(r, "float"), y = 0; y < b.length; y++) { - var w = b[y].node, x = w.getValue(); - x && !x.matches("none") && this.addEntry(w, ne.PropertyIgnoredDueToDisplay, rt("rule.propertyIgnoredDueToDisplayInlineBlock", "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'")); + var x = b[y].node, S = x.getValue(); + S && !S.matches("none") && this.addEntry(x, se.PropertyIgnoredDueToDisplay, nt("rule.propertyIgnoredDueToDisplayInlineBlock", "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'")); } if (g = this.fetchWithValue(r, "display", "block"), g.length > 0) for (var b = this.fetch(r, "vertical-align"), y = 0; y < b.length; y++) - this.addEntry(b[y].node, ne.PropertyIgnoredDueToDisplay, rt("rule.propertyIgnoredDueToDisplayBlock", "Property is ignored due to the display. With 'display: block', vertical-align should not be used.")); - for (var k = this.fetch(r, "float"), y = 0; y < k.length; y++) { - var a = k[y]; - this.isValidPropertyDeclaration(a) || this.addEntry(a.node, ne.AvoidFloat); + this.addEntry(b[y].node, se.PropertyIgnoredDueToDisplay, nt("rule.propertyIgnoredDueToDisplayBlock", "Property is ignored due to the display. With 'display: block', vertical-align should not be used.")); + for (var w = this.fetch(r, "float"), y = 0; y < w.length; y++) { + var a = w[y]; + this.isValidPropertyDeclaration(a) || this.addEntry(a.node, se.AvoidFloat); } - for (var F = 0; F < r.length; F++) { - var a = r[F]; + for (var E = 0; E < r.length; E++) { + var a = r[E]; if (a.fullPropertyName !== "background" && !this.validProperties[a.fullPropertyName]) { - var x = a.node.getValue(); - if (x && this.documentText.charAt(x.offset) !== "-") { - var N = this.fetch(r, a.fullPropertyName); - if (N.length > 1) - for (var j = 0; j < N.length; j++) { - var H = N[j].node.getValue(); - H && this.documentText.charAt(H.offset) !== "-" && N[j] !== a && this.addEntry(a.node, ne.DuplicateDeclarations); + var S = a.node.getValue(); + if (S && this.documentText.charAt(S.offset) !== "-") { + var R = this.fetch(r, a.fullPropertyName); + if (R.length > 1) + for (var T = 0; T < R.length; T++) { + var W = R[T].node.getValue(); + W && this.documentText.charAt(W.offset) !== "-" && R[T] !== a && this.addEntry(a.node, se.DuplicateDeclarations); } } } } - var B = e.getSelectors().matches(":export"); - if (!B) { - for (var P = new Oo(), z = !1, A = 0, R = r; A < R.length; A++) { - var a = R[A], L = a.node; - if (this.isCSSDeclaration(L)) { - var O = a.fullPropertyName, K = O.charAt(0); - if (K === "-") { + var L = e.getSelectors().matches(":export"); + if (!L) { + for (var q = new Go(), z = !1, F = 0, D = r; F < D.length; F++) { + var a = D[F], I = a.node; + if (this.isCSSDeclaration(I)) { + var O = a.fullPropertyName, J = O.charAt(0); + if (J === "-") { if (O.charAt(1) !== "-") { - !this.cssDataManager.isKnownProperty(O) && !this.validProperties[O] && this.addEntry(L.getProperty(), ne.UnknownVendorSpecificProperty); - var re = L.getNonPrefixedPropertyName(); - P.add(re, O, L.getProperty()); + !this.cssDataManager.isKnownProperty(O) && !this.validProperties[O] && this.addEntry(I.getProperty(), se.UnknownVendorSpecificProperty); + var Y = I.getNonPrefixedPropertyName(); + q.add(Y, O, I.getProperty()); } } else { - var E = O; - (K === "*" || K === "_") && (this.addEntry(L.getProperty(), ne.IEStarHack), O = O.substr(1)), !this.cssDataManager.isKnownProperty(E) && !this.cssDataManager.isKnownProperty(O) && (this.validProperties[O] || this.addEntry(L.getProperty(), ne.UnknownProperty, rt("property.unknownproperty.detailed", "Unknown property: '{0}'", L.getFullPropertyName()))), P.add(O, O, null); + var A = O; + (J === "*" || J === "_") && (this.addEntry(I.getProperty(), se.IEStarHack), O = O.substr(1)), !this.cssDataManager.isKnownProperty(A) && !this.cssDataManager.isKnownProperty(O) && (this.validProperties[O] || this.addEntry(I.getProperty(), se.UnknownProperty, nt("property.unknownproperty.detailed", "Unknown property: '{0}'", I.getFullPropertyName()))), q.add(O, O, null); } } else z = !0; } if (!z) - for (var C in P.data) { - var D = P.data[C], I = D.names, X = this.cssDataManager.isStandardProperty(C) && I.indexOf(C) === -1; - if (!(!X && I.length === 1)) { - for (var G = [], F = 0, ee = t.prefixes.length; F < ee; F++) { - var Ie = t.prefixes[F]; - this.cssDataManager.isStandardProperty(Ie + C) && G.push(Ie + C); + for (var k in q.data) { + var N = q.data[k], P = N.names, G = this.cssDataManager.isStandardProperty(k) && P.indexOf(k) === -1; + if (!(!G && P.length === 1)) { + for (var K = [], E = 0, ee = t.prefixes.length; E < ee; E++) { + var Le = t.prefixes[E]; + this.cssDataManager.isStandardProperty(Le + k) && K.push(Le + k); } - var ke = this.getMissingNames(G, I); - if (ke || X) - for (var Me = 0, wt = D.nodes; Me < wt.length; Me++) { - var tt = wt[Me]; - if (X) { - var mr = rt("property.standard.missing", "Also define the standard property '{0}' for compatibility", C); - this.addEntry(tt, ne.IncludeStandardPropertyWhenUsingVendorPrefix, mr); + var ye = this.getMissingNames(K, P); + if (ye || G) + for (var Ne = 0, wt = N.nodes; Ne < wt.length; Ne++) { + var et = wt[Ne]; + if (G) { + var wr = nt("property.standard.missing", "Also define the standard property '{0}' for compatibility", k); + this.addEntry(et, se.IncludeStandardPropertyWhenUsingVendorPrefix, wr); } - if (ke) { - var mr = rt("property.vendorspecific.missing", "Always include all vendor specific properties: Missing: {0}", ke); - this.addEntry(tt, ne.AllVendorPrefixes, mr); + if (ye) { + var wr = nt("property.vendorspecific.missing", "Always include all vendor specific properties: Missing: {0}", ye); + this.addEntry(et, se.AllVendorPrefixes, wr); } } } @@ -13916,7 +14189,7 @@ var rt = Je(), Oo = function() { } return !0; }, t.prototype.visitPrio = function(e) { - return this.addEntry(e, ne.AvoidImportant), !0; + return this.addEntry(e, se.AvoidImportant), !0; }, t.prototype.visitNumericValue = function(e) { var n = e.findParent(v.Function); if (n && n.getName() === "calc") @@ -13926,9 +14199,9 @@ var rt = Je(), Oo = function() { var i = r.getValue(); if (i) { var s = e.getValue(); - if (!s.unit || zl.length.indexOf(s.unit.toLowerCase()) === -1) + if (!s.unit || Tl.length.indexOf(s.unit.toLowerCase()) === -1) return !0; - parseFloat(s.value) === 0 && s.unit && !this.validProperties[r.getFullPropertyName()] && this.addEntry(e, ne.ZeroWithUnit); + parseFloat(s.value) === 0 && s.unit && !this.validProperties[r.getFullPropertyName()] && this.addEntry(e, se.ZeroWithUnit); } } return !0; @@ -13944,9 +14217,9 @@ var rt = Je(), Oo = function() { } else s = !0; } - return !s && (!r || !i) && this.addEntry(e, ne.RequiredPropertiesForFontFace), !0; + return !s && (!r || !i) && this.addEntry(e, se.RequiredPropertiesForFontFace), !0; }, t.prototype.isCSSDeclaration = function(e) { - if (e instanceof Ze) { + if (e instanceof Qe) { if (!e.getValue()) return !1; var n = e.getProperty(); @@ -13958,7 +14231,7 @@ var rt = Je(), Oo = function() { return !1; }, t.prototype.visitHexColorValue = function(e) { var n = e.length; - return n !== 9 && n !== 7 && n !== 5 && n !== 4 && this.addEntry(e, ne.HexColorLength), !1; + return n !== 9 && n !== 7 && n !== 5 && n !== 4 && this.addEntry(e, se.HexColorLength), !1; }, t.prototype.visitFunction = function(e) { var n = e.getName().toLowerCase(), r = -1, i = 0; switch (n) { @@ -13972,15 +14245,15 @@ var rt = Je(), Oo = function() { break; } return r !== -1 && (e.getArguments().accept(function(s) { - return s instanceof Pi ? (i += 1, !1) : !0; - }), i !== r && this.addEntry(e, ne.ArgsInColorFunction)), !0; + return s instanceof ji ? (i += 1, !1) : !0; + }), i !== r && this.addEntry(e, se.ArgsInColorFunction)), !0; }, t.prefixes = [ "-ms-", "-moz-", "-o-", "-webkit-" ], t; -}(), $i = function() { +}(), es = function() { function t(e) { this.cssDataManager = e; } @@ -13990,17 +14263,17 @@ var rt = Je(), Oo = function() { if (r === void 0 && (r = this.settings), r && r.validate === !1) return []; var i = []; - i.push.apply(i, eu.entries(n)), i.push.apply(i, Zu.entries(n, e, new $u(r && r.lint), this.cssDataManager)); + i.push.apply(i, uu.entries(n)), i.push.apply(i, dp.entries(n, e, new rp(r && r.lint), this.cssDataManager)); var s = []; - for (var a in ne) - s.push(ne[a].id); + for (var a in se) + s.push(se[a].id); function o(l) { - var c = te.create(e.positionAt(l.getOffset()), e.positionAt(l.getOffset() + l.getLength())), h = e.languageId; + var c = ie.create(e.positionAt(l.getOffset()), e.positionAt(l.getOffset() + l.getLength())), h = e.languageId; return { code: l.getRule().id, source: h, message: l.getMessage(), - severity: l.getLevel() === Pe.Warning ? tr.Warning : tr.Error, + severity: l.getLevel() === Pe.Warning ? or.Warning : or.Error, range: c }; } @@ -14008,7 +14281,7 @@ var rt = Je(), Oo = function() { return l.getLevel() !== Pe.Ignore; }).map(o); }, t; -}(), ep = function() { +}(), up = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -14026,46 +14299,46 @@ var rt = Je(), Oo = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), Uo = "/".charCodeAt(0), tp = ` -`.charCodeAt(0), np = "\r".charCodeAt(0), rp = "\f".charCodeAt(0), ip = "$".charCodeAt(0), sp = "#".charCodeAt(0), ap = "{".charCodeAt(0), cn = "=".charCodeAt(0), op = "!".charCodeAt(0), lp = "<".charCodeAt(0), cp = ">".charCodeAt(0), Dr = ".".charCodeAt(0), ot = p.CustomToken, wi = ot++, hr = ot++; +}(), Jo = "/".charCodeAt(0), pp = ` +`.charCodeAt(0), fp = "\r".charCodeAt(0), mp = "\f".charCodeAt(0), gp = "$".charCodeAt(0), bp = "#".charCodeAt(0), vp = "{".charCodeAt(0), dn = "=".charCodeAt(0), yp = "!".charCodeAt(0), wp = "<".charCodeAt(0), xp = ">".charCodeAt(0), Tr = ".".charCodeAt(0), ot = p.CustomToken, Ei = ot++, gr = ot++; ot++; -var Ol = ot++, Ul = ot++, Vl = ot++, Bl = ot++, jn = ot++; +var jl = ot++, ql = ot++, $l = ot++, Hl = ot++, Yn = ot++; ot++; -var jl = function(t) { - ep(e, t); +var Gl = function(t) { + up(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } return e.prototype.scanNext = function(n) { - if (this.stream.advanceIfChar(ip)) { + if (this.stream.advanceIfChar(gp)) { var r = ["$"]; if (this.ident(r)) - return this.finishToken(n, wi, r.join("")); + return this.finishToken(n, Ei, r.join("")); this.stream.goBackTo(n); } - return this.stream.advanceIfChars([sp, ap]) ? this.finishToken(n, hr) : this.stream.advanceIfChars([cn, cn]) ? this.finishToken(n, Ol) : this.stream.advanceIfChars([op, cn]) ? this.finishToken(n, Ul) : this.stream.advanceIfChar(lp) ? this.stream.advanceIfChar(cn) ? this.finishToken(n, Bl) : this.finishToken(n, p.Delim) : this.stream.advanceIfChar(cp) ? this.stream.advanceIfChar(cn) ? this.finishToken(n, Vl) : this.finishToken(n, p.Delim) : this.stream.advanceIfChars([Dr, Dr, Dr]) ? this.finishToken(n, jn) : t.prototype.scanNext.call(this, n); + return this.stream.advanceIfChars([bp, vp]) ? this.finishToken(n, gr) : this.stream.advanceIfChars([dn, dn]) ? this.finishToken(n, jl) : this.stream.advanceIfChars([yp, dn]) ? this.finishToken(n, ql) : this.stream.advanceIfChar(wp) ? this.stream.advanceIfChar(dn) ? this.finishToken(n, Hl) : this.finishToken(n, p.Delim) : this.stream.advanceIfChar(xp) ? this.stream.advanceIfChar(dn) ? this.finishToken(n, $l) : this.finishToken(n, p.Delim) : this.stream.advanceIfChars([Tr, Tr, Tr]) ? this.finishToken(n, Yn) : t.prototype.scanNext.call(this, n); }, e.prototype.comment = function() { - return t.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Uo, Uo]) ? (this.stream.advanceWhileChar(function(n) { + return t.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Jo, Jo]) ? (this.stream.advanceWhileChar(function(n) { switch (n) { - case tp: - case np: - case rp: + case pp: + case fp: + case mp: return !1; default: return !0; } }), !0) : !1; }, e; -}(_n), Ar = Je(), Mr = function() { +}(Nn), Wr = Ge(), Or = function() { function t(e, n) { this.id = e, this.message = n; } return t; -}(), Nr = { - FromExpected: new Mr("scss-fromexpected", Ar("expected.from", "'from' expected")), - ThroughOrToExpected: new Mr("scss-throughexpected", Ar("expected.through", "'through' or 'to' expected")), - InExpected: new Mr("scss-fromexpected", Ar("expected.in", "'in' expected")) -}, hp = function() { +}(), Ur = { + FromExpected: new Or("scss-fromexpected", Wr("expected.from", "'from' expected")), + ThroughOrToExpected: new Or("scss-throughexpected", Wr("expected.through", "'through' or 'to' expected")), + InExpected: new Or("scss-fromexpected", Wr("expected.in", "'in' expected")) +}, Sp = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -14083,37 +14356,37 @@ var jl = function(t) { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), dp = function(t) { - hp(e, t); +}(), Cp = function(t) { + Sp(e, t); function e() { - return t.call(this, new jl()) || this; + return t.call(this, new Gl()) || this; } return e.prototype._parseStylesheetStatement = function(n) { return n === void 0 && (n = !1), this.peek(p.AtKeyword) ? this._parseWarnAndDebug() || this._parseControlStatement() || this._parseMixinDeclaration() || this._parseMixinContent() || this._parseMixinReference() || this._parseFunctionDeclaration() || this._parseForward() || this._parseUse() || this._parseRuleset(n) || t.prototype._parseStylesheetAtStatement.call(this, n) : this._parseRuleset(!0) || this._parseVariableDeclaration(); }, e.prototype._parseImport = function() { if (!this.peekKeyword("@import")) return null; - var n = this.create(zi); + var n = this.create(Bi); if (this.consumeToken(), !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) - return this.finish(n, S.URIOrStringExpected); + return this.finish(n, C.URIOrStringExpected); for (; this.accept(p.Comma); ) if (!n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral())) - return this.finish(n, S.URIOrStringExpected); + return this.finish(n, C.URIOrStringExpected); return !this.peek(p.SemiColon) && !this.peek(p.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n); }, e.prototype._parseVariableDeclaration = function(n) { - if (n === void 0 && (n = []), !this.peek(wi)) + if (n === void 0 && (n = []), !this.peek(Ei)) return null; - var r = this.create(fr); + var r = this.create(yr); if (!r.setVariable(this._parseVariable())) return null; if (!this.accept(p.Colon)) - return this.finish(r, S.ColonExpected); + return this.finish(r, C.ColonExpected); if (this.prevToken && (r.colonPosition = this.prevToken.offset), !r.setValue(this._parseExpr())) - return this.finish(r, S.VariableValueExpected, [], n); + return this.finish(r, C.VariableValueExpected, [], n); for (; this.peek(p.Exclamation); ) if (!r.addChild(this._tryParsePrio())) { if (this.consumeToken(), !this.peekRegExp(p.Ident, /^(default|global)$/)) - return this.finish(r, S.UnknownKeyword); + return this.finish(r, C.UnknownKeyword); this.consumeToken(); } return this.peek(p.SemiColon) && (r.semicolonPosition = this.token.offset), this.finish(r); @@ -14124,18 +14397,18 @@ var jl = function(t) { }, e.prototype._parseKeyframeSelector = function() { return this._tryParseKeyframeSelector() || this._parseControlStatement(this._parseKeyframeSelector.bind(this)) || this._parseVariableDeclaration() || this._parseMixinContent(); }, e.prototype._parseVariable = function() { - if (!this.peek(wi)) + if (!this.peek(Ei)) return null; - var n = this.create(Ti); + var n = this.create(Hi); return this.consumeToken(), n; }, e.prototype._parseModuleMember = function() { - var n = this.mark(), r = this.create(Pa); - return r.setIdentifier(this._parseIdent([Y.Module])) ? this.hasWhitespace() || !this.acceptDelim(".") || this.hasWhitespace() ? (this.restoreAtMark(n), null) : r.addChild(this._parseVariable() || this._parseFunction()) ? r : this.finish(r, S.IdentifierOrVariableExpected) : null; + var n = this.mark(), r = this.create(Ba); + return r.setIdentifier(this._parseIdent([Q.Module])) ? this.hasWhitespace() || !this.acceptDelim(".") || this.hasWhitespace() ? (this.restoreAtMark(n), null) : r.addChild(this._parseVariable() || this._parseFunction()) ? r : this.finish(r, C.IdentifierOrVariableExpected) : null; }, e.prototype._parseIdent = function(n) { var r = this; - if (!this.peek(p.Ident) && !this.peek(hr) && !this.peekDelim("-")) + if (!this.peek(p.Ident) && !this.peek(gr) && !this.peekDelim("-")) return null; - var i = this.create(Oe); + var i = this.create(Ue); i.referenceTypes = n, i.isCustomProperty = this.peekRegExp(p.Ident, /^--/); for (var s = !1, a = function() { var o = r.mark(); @@ -14146,20 +14419,20 @@ var jl = function(t) { }, e.prototype._parseTermExpression = function() { return this._parseModuleMember() || this._parseVariable() || this._parseSelectorCombinator() || t.prototype._parseTermExpression.call(this); }, e.prototype._parseInterpolation = function() { - if (this.peek(hr)) { - var n = this.create(ii); - return this.consumeToken(), !n.addChild(this._parseExpr()) && !this._parseSelectorCombinator() ? this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, S.ExpressionExpected) : this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, S.RightCurlyExpected); + if (this.peek(gr)) { + var n = this.create(ui); + return this.consumeToken(), !n.addChild(this._parseExpr()) && !this._parseSelectorCombinator() ? this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, C.ExpressionExpected) : this.accept(p.CurlyR) ? this.finish(n) : this.finish(n, C.RightCurlyExpected); } return null; }, e.prototype._parseOperator = function() { - if (this.peek(Ol) || this.peek(Ul) || this.peek(Vl) || this.peek(Bl) || this.peekDelim(">") || this.peekDelim("<") || this.peekIdent("and") || this.peekIdent("or") || this.peekDelim("%")) { + if (this.peek(jl) || this.peek(ql) || this.peek($l) || this.peek(Hl) || this.peekDelim(">") || this.peekDelim("<") || this.peekIdent("and") || this.peekIdent("or") || this.peekDelim("%")) { var n = this.createNode(v.Operator); return this.consumeToken(), this.finish(n); } return t.prototype._parseOperator.call(this); }, e.prototype._parseUnaryOperator = function() { if (this.peekIdent("not")) { - var n = this.create(W); + var n = this.create(V); return this.consumeToken(), this.finish(n); } return t.prototype._parseUnaryOperator.call(this); @@ -14169,29 +14442,29 @@ var jl = function(t) { var r = this._tryParseCustomPropertyDeclaration(n); if (r) return r; - var i = this.create(Ze); + var i = this.create(Qe); if (!i.setProperty(this._parseProperty())) return null; if (!this.accept(p.Colon)) - return this.finish(i, S.ColonExpected, [p.Colon], n || [p.SemiColon]); + return this.finish(i, C.ColonExpected, [p.Colon], n || [p.SemiColon]); this.prevToken && (i.colonPosition = this.prevToken.offset); var s = !1; if (i.setValue(this._parseExpr()) && (s = !0, i.addChild(this._parsePrio())), this.peek(p.CurlyL)) i.setNestedProperties(this._parseNestedProperties()); else if (!s) - return this.finish(i, S.PropertyValueExpected); + return this.finish(i, C.PropertyValueExpected); return this.peek(p.SemiColon) && (i.semicolonPosition = this.token.offset), this.finish(i); }, e.prototype._parseNestedProperties = function() { - var n = this.create(wl); + var n = this.create(kl); return this._parseBody(n, this._parseDeclaration.bind(this)); }, e.prototype._parseExtends = function() { if (this.peekKeyword("@extend")) { - var n = this.create(mn); + var n = this.create(xn); if (this.consumeToken(), !n.getSelectors().addChild(this._parseSimpleSelector())) - return this.finish(n, S.SelectorExpected); + return this.finish(n, C.SelectorExpected); for (; this.accept(p.Comma); ) n.getSelectors().addChild(this._parseSimpleSelector()); - return this.accept(p.Exclamation) && !this.acceptIdent("optional") ? this.finish(n, S.UnknownKeyword) : this.finish(n); + return this.accept(p.Exclamation) && !this.acceptIdent("optional") ? this.finish(n, C.UnknownKeyword) : this.finish(n); } return null; }, e.prototype._parseSimpleSelectorBody = function() { @@ -14228,14 +14501,14 @@ var jl = function(t) { }, e.prototype._parseIfStatement = function(n) { return this.peekKeyword("@if") ? this._internalParseIfStatement(n) : null; }, e.prototype._internalParseIfStatement = function(n) { - var r = this.create(Rd); + var r = this.create(Od); if (this.consumeToken(), !r.setExpression(this._parseExpr(!0))) - return this.finish(r, S.ExpressionExpected); + return this.finish(r, C.ExpressionExpected); if (this._parseBody(r, n), this.acceptKeyword("@else")) { if (this.peekIdent("if")) r.setElseClause(this._internalParseIfStatement(n)); else if (this.peek(p.CurlyL)) { - var i = this.create(Md); + var i = this.create(jd); this._parseBody(i, n), r.setElseClause(i); } } @@ -14243,223 +14516,223 @@ var jl = function(t) { }, e.prototype._parseForStatement = function(n) { if (!this.peekKeyword("@for")) return null; - var r = this.create(Ed); - return this.consumeToken(), r.setVariable(this._parseVariable()) ? this.acceptIdent("from") ? r.addChild(this._parseBinaryExpr()) ? !this.acceptIdent("to") && !this.acceptIdent("through") ? this.finish(r, Nr.ThroughOrToExpected, [p.CurlyR]) : r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, S.ExpressionExpected, [p.CurlyR]) : this.finish(r, S.ExpressionExpected, [p.CurlyR]) : this.finish(r, Nr.FromExpected, [p.CurlyR]) : this.finish(r, S.VariableNameExpected, [p.CurlyR]); + var r = this.create(Ud); + return this.consumeToken(), r.setVariable(this._parseVariable()) ? this.acceptIdent("from") ? r.addChild(this._parseBinaryExpr()) ? !this.acceptIdent("to") && !this.acceptIdent("through") ? this.finish(r, Ur.ThroughOrToExpected, [p.CurlyR]) : r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, C.ExpressionExpected, [p.CurlyR]) : this.finish(r, C.ExpressionExpected, [p.CurlyR]) : this.finish(r, Ur.FromExpected, [p.CurlyR]) : this.finish(r, C.VariableNameExpected, [p.CurlyR]); }, e.prototype._parseEachStatement = function(n) { if (!this.peekKeyword("@each")) return null; - var r = this.create(Dd); + var r = this.create(Vd); this.consumeToken(); var i = r.getVariables(); if (!i.addChild(this._parseVariable())) - return this.finish(r, S.VariableNameExpected, [p.CurlyR]); + return this.finish(r, C.VariableNameExpected, [p.CurlyR]); for (; this.accept(p.Comma); ) if (!i.addChild(this._parseVariable())) - return this.finish(r, S.VariableNameExpected, [p.CurlyR]); - return this.finish(i), this.acceptIdent("in") ? r.addChild(this._parseExpr()) ? this._parseBody(r, n) : this.finish(r, S.ExpressionExpected, [p.CurlyR]) : this.finish(r, Nr.InExpected, [p.CurlyR]); + return this.finish(r, C.VariableNameExpected, [p.CurlyR]); + return this.finish(i), this.acceptIdent("in") ? r.addChild(this._parseExpr()) ? this._parseBody(r, n) : this.finish(r, C.ExpressionExpected, [p.CurlyR]) : this.finish(r, Ur.InExpected, [p.CurlyR]); }, e.prototype._parseWhileStatement = function(n) { if (!this.peekKeyword("@while")) return null; - var r = this.create(Ad); - return this.consumeToken(), r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, S.ExpressionExpected, [p.CurlyR]); + var r = this.create(Bd); + return this.consumeToken(), r.addChild(this._parseBinaryExpr()) ? this._parseBody(r, n) : this.finish(r, C.ExpressionExpected, [p.CurlyR]); }, e.prototype._parseFunctionBodyDeclaration = function() { return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug() || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this)); }, e.prototype._parseFunctionDeclaration = function() { if (!this.peekKeyword("@function")) return null; - var n = this.create(Qn); - if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Y.Function]))) - return this.finish(n, S.IdentifierExpected, [p.CurlyR]); + var n = this.create(ir); + if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Q.Function]))) + return this.finish(n, C.IdentifierExpected, [p.CurlyR]); if (!this.accept(p.ParenthesisL)) - return this.finish(n, S.LeftParenthesisExpected, [p.CurlyR]); + return this.finish(n, C.LeftParenthesisExpected, [p.CurlyR]); if (n.getParameters().addChild(this._parseParameterDeclaration())) { for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseParameterDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); } - return this.accept(p.ParenthesisR) ? this._parseBody(n, this._parseFunctionBodyDeclaration.bind(this)) : this.finish(n, S.RightParenthesisExpected, [p.CurlyR]); + return this.accept(p.ParenthesisR) ? this._parseBody(n, this._parseFunctionBodyDeclaration.bind(this)) : this.finish(n, C.RightParenthesisExpected, [p.CurlyR]); }, e.prototype._parseReturnStatement = function() { if (!this.peekKeyword("@return")) return null; var n = this.createNode(v.ReturnStatement); - return this.consumeToken(), n.addChild(this._parseExpr()) ? this.finish(n) : this.finish(n, S.ExpressionExpected); + return this.consumeToken(), n.addChild(this._parseExpr()) ? this.finish(n) : this.finish(n, C.ExpressionExpected); }, e.prototype._parseMixinDeclaration = function() { if (!this.peekKeyword("@mixin")) return null; - var n = this.create(gn); - if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Y.Mixin]))) - return this.finish(n, S.IdentifierExpected, [p.CurlyR]); + var n = this.create(Sn); + if (this.consumeToken(), !n.setIdentifier(this._parseIdent([Q.Mixin]))) + return this.finish(n, C.IdentifierExpected, [p.CurlyR]); if (this.accept(p.ParenthesisL)) { if (n.getParameters().addChild(this._parseParameterDeclaration())) { for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseParameterDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); } if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected, [p.CurlyR]); + return this.finish(n, C.RightParenthesisExpected, [p.CurlyR]); } return this._parseBody(n, this._parseRuleSetDeclaration.bind(this)); }, e.prototype._parseParameterDeclaration = function() { - var n = this.create(pr); - return n.setIdentifier(this._parseVariable()) ? (this.accept(jn), this.accept(p.Colon) && !n.setDefaultValue(this._parseExpr(!0)) ? this.finish(n, S.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.finish(n)) : null; + var n = this.create(vr); + return n.setIdentifier(this._parseVariable()) ? (this.accept(Yn), this.accept(p.Colon) && !n.setDefaultValue(this._parseExpr(!0)) ? this.finish(n, C.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.finish(n)) : null; }, e.prototype._parseMixinContent = function() { if (!this.peekKeyword("@content")) return null; - var n = this.create(Xd); + var n = this.create(ou); if (this.consumeToken(), this.accept(p.ParenthesisL)) { if (n.getArguments().addChild(this._parseFunctionArgument())) { for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getArguments().addChild(this._parseFunctionArgument())) - return this.finish(n, S.ExpressionExpected); + return this.finish(n, C.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.RightParenthesisExpected); } return this.finish(n); }, e.prototype._parseMixinReference = function() { if (!this.peekKeyword("@include")) return null; - var n = this.create(Zn); + var n = this.create(sr); this.consumeToken(); - var r = this._parseIdent([Y.Mixin]); + var r = this._parseIdent([Q.Mixin]); if (!n.setIdentifier(r)) - return this.finish(n, S.IdentifierExpected, [p.CurlyR]); + return this.finish(n, C.IdentifierExpected, [p.CurlyR]); if (!this.hasWhitespace() && this.acceptDelim(".") && !this.hasWhitespace()) { - var i = this._parseIdent([Y.Mixin]); + var i = this._parseIdent([Q.Mixin]); if (!i) - return this.finish(n, S.IdentifierExpected, [p.CurlyR]); - var s = this.create(Pa); - r.referenceTypes = [Y.Module], s.setIdentifier(r), n.setIdentifier(i), n.addChild(s); + return this.finish(n, C.IdentifierExpected, [p.CurlyR]); + var s = this.create(Ba); + r.referenceTypes = [Q.Module], s.setIdentifier(r), n.setIdentifier(i), n.addChild(s); } if (this.accept(p.ParenthesisL)) { if (n.getArguments().addChild(this._parseFunctionArgument())) { for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getArguments().addChild(this._parseFunctionArgument())) - return this.finish(n, S.ExpressionExpected); + return this.finish(n, C.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.RightParenthesisExpected); } return (this.peekIdent("using") || this.peek(p.CurlyL)) && n.setContent(this._parseMixinContentDeclaration()), this.finish(n); }, e.prototype._parseMixinContentDeclaration = function() { - var n = this.create(Yd); + var n = this.create(lu); if (this.acceptIdent("using")) { if (!this.accept(p.ParenthesisL)) - return this.finish(n, S.LeftParenthesisExpected, [p.CurlyL]); + return this.finish(n, C.LeftParenthesisExpected, [p.CurlyL]); if (n.getParameters().addChild(this._parseParameterDeclaration())) { for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseParameterDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); } if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected, [p.CurlyL]); + return this.finish(n, C.RightParenthesisExpected, [p.CurlyL]); } return this.peek(p.CurlyL) && this._parseBody(n, this._parseMixinReferenceBodyStatement.bind(this)), this.finish(n); }, e.prototype._parseMixinReferenceBodyStatement = function() { return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); }, e.prototype._parseFunctionArgument = function() { - var n = this.create(Gt), r = this.mark(), i = this._parseVariable(); + var n = this.create(Xt), r = this.mark(), i = this._parseVariable(); if (i) if (this.accept(p.Colon)) n.setIdentifier(i); else { - if (this.accept(jn)) + if (this.accept(Yn)) return n.setValue(i), this.finish(n); this.restoreAtMark(r); } - return n.setValue(this._parseExpr(!0)) ? (this.accept(jn), n.addChild(this._parsePrio()), this.finish(n)) : n.setValue(this._tryParsePrio()) ? this.finish(n) : null; + return n.setValue(this._parseExpr(!0)) ? (this.accept(Yn), n.addChild(this._parsePrio()), this.finish(n)) : n.setValue(this._tryParsePrio()) ? this.finish(n) : null; }, e.prototype._parseURLArgument = function() { var n = this.mark(), r = t.prototype._parseURLArgument.call(this); if (!r || !this.peek(p.ParenthesisR)) { this.restoreAtMark(n); - var i = this.create(W); + var i = this.create(V); return i.addChild(this._parseBinaryExpr()), this.finish(i); } return r; }, e.prototype._parseOperation = function() { if (!this.peek(p.ParenthesisL)) return null; - var n = this.create(W); + var n = this.create(V); for (this.consumeToken(); n.addChild(this._parseListElement()); ) this.accept(p.Comma); - return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, S.RightParenthesisExpected); + return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, C.RightParenthesisExpected); }, e.prototype._parseListElement = function() { - var n = this.create(Kd), r = this._parseBinaryExpr(); + var n = this.create(cu), r = this._parseBinaryExpr(); if (!r) return null; if (this.accept(p.Colon)) { if (n.setKey(r), !n.setValue(this._parseBinaryExpr())) - return this.finish(n, S.ExpressionExpected); + return this.finish(n, C.ExpressionExpected); } else n.setValue(r); return this.finish(n); }, e.prototype._parseUse = function() { if (!this.peekKeyword("@use")) return null; - var n = this.create(zd); + var n = this.create($d); if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) - return this.finish(n, S.StringLiteralExpected); + return this.finish(n, C.StringLiteralExpected); if (!this.peek(p.SemiColon) && !this.peek(p.EOF)) { if (!this.peekRegExp(p.Ident, /as|with/)) - return this.finish(n, S.UnknownKeyword); - if (this.acceptIdent("as") && !n.setIdentifier(this._parseIdent([Y.Module])) && !this.acceptDelim("*")) - return this.finish(n, S.IdentifierOrWildcardExpected); + return this.finish(n, C.UnknownKeyword); + if (this.acceptIdent("as") && !n.setIdentifier(this._parseIdent([Q.Module])) && !this.acceptDelim("*")) + return this.finish(n, C.IdentifierOrWildcardExpected); if (this.acceptIdent("with")) { if (!this.accept(p.ParenthesisL)) - return this.finish(n, S.LeftParenthesisExpected, [p.ParenthesisR]); + return this.finish(n, C.LeftParenthesisExpected, [p.ParenthesisR]); if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.RightParenthesisExpected); } } - return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, S.SemiColonExpected) : this.finish(n); + return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, C.SemiColonExpected) : this.finish(n); }, e.prototype._parseModuleConfigDeclaration = function() { - var n = this.create(Pd); - return n.setIdentifier(this._parseVariable()) ? !this.accept(p.Colon) || !n.setValue(this._parseExpr(!0)) ? this.finish(n, S.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.accept(p.Exclamation) && (this.hasWhitespace() || !this.acceptIdent("default")) ? this.finish(n, S.UnknownKeyword) : this.finish(n) : null; + var n = this.create(Hd); + return n.setIdentifier(this._parseVariable()) ? !this.accept(p.Colon) || !n.setValue(this._parseExpr(!0)) ? this.finish(n, C.VariableValueExpected, [], [p.Comma, p.ParenthesisR]) : this.accept(p.Exclamation) && (this.hasWhitespace() || !this.acceptIdent("default")) ? this.finish(n, C.UnknownKeyword) : this.finish(n) : null; }, e.prototype._parseForward = function() { if (!this.peekKeyword("@forward")) return null; - var n = this.create(Id); + var n = this.create(Gd); if (this.consumeToken(), !n.addChild(this._parseStringLiteral())) - return this.finish(n, S.StringLiteralExpected); + return this.finish(n, C.StringLiteralExpected); if (this.acceptIdent("with")) { if (!this.accept(p.ParenthesisL)) - return this.finish(n, S.LeftParenthesisExpected, [p.ParenthesisR]); + return this.finish(n, C.LeftParenthesisExpected, [p.ParenthesisR]); if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); for (; this.accept(p.Comma) && !this.peek(p.ParenthesisR); ) if (!n.getParameters().addChild(this._parseModuleConfigDeclaration())) - return this.finish(n, S.VariableNameExpected); + return this.finish(n, C.VariableNameExpected); if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.RightParenthesisExpected); } if (!this.peek(p.SemiColon) && !this.peek(p.EOF)) { if (!this.peekRegExp(p.Ident, /as|hide|show/)) - return this.finish(n, S.UnknownKeyword); + return this.finish(n, C.UnknownKeyword); if (this.acceptIdent("as")) { - var r = this._parseIdent([Y.Forward]); + var r = this._parseIdent([Q.Forward]); if (!n.setIdentifier(r)) - return this.finish(n, S.IdentifierExpected); + return this.finish(n, C.IdentifierExpected); if (this.hasWhitespace() || !this.acceptDelim("*")) - return this.finish(n, S.WildcardExpected); + return this.finish(n, C.WildcardExpected); } if ((this.peekIdent("hide") || this.peekIdent("show")) && !n.addChild(this._parseForwardVisibility())) - return this.finish(n, S.IdentifierOrVariableExpected); + return this.finish(n, C.IdentifierOrVariableExpected); } - return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, S.SemiColonExpected) : this.finish(n); + return !this.accept(p.SemiColon) && !this.accept(p.EOF) ? this.finish(n, C.SemiColonExpected) : this.finish(n); }, e.prototype._parseForwardVisibility = function() { - var n = this.create(Ld); + var n = this.create(Jd); for (n.setIdentifier(this._parseIdent()); n.addChild(this._parseVariable() || this._parseIdent()); ) this.accept(p.Comma); return n.getChildren().length > 1 ? n : null; }, e.prototype._parseSupportsCondition = function() { return this._parseInterpolation() || t.prototype._parseSupportsCondition.call(this); }, e; -}(Wi), up = function() { +}(Gi), kp = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -14477,11 +14750,11 @@ var jl = function(t) { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), M = Je(), pp = function(t) { - up(e, t); +}(), M = Ge(), _p = function(t) { + kp(e, t); function e(n, r) { var i = t.call(this, "$", n, r) || this; - return Vo(e.scssModuleLoaders), Vo(e.scssModuleBuiltIns), i; + return Xo(e.scssModuleLoaders), Xo(e.scssModuleBuiltIns), i; } return e.prototype.isImportPathParent = function(n) { return n === v.Forward || n === v.Use || t.prototype.isImportPathParent.call(this, n); @@ -14492,8 +14765,8 @@ var jl = function(t) { var o = a[s], l = { label: o.label, documentation: o.documentation, - textEdit: $.replace(this.getCompletionRange(n), "'".concat(o.label, "'")), - kind: q.Module + textEdit: H.replace(this.getCompletionRange(n), "'".concat(o.label, "'")), + kind: $.Module }; r.items.push(l); } @@ -14509,9 +14782,9 @@ var jl = function(t) { label: h, detail: l.func, documentation: l.desc, - textEdit: $.replace(this.getCompletionRange(r), c), + textEdit: H.replace(this.getCompletionRange(r), c), insertTextFormat: ze.Snippet, - kind: q.Function + kind: $.Function }; i && (u.sortText = "z"), s.items.push(u); } @@ -14528,11 +14801,11 @@ var jl = function(t) { }, e.prototype.getCompletionsForDeclarationProperty = function(n, r) { return this.getCompletionForAtDirectives(r), this.getCompletionsForSelector(null, !0, r), t.prototype.getCompletionsForDeclarationProperty.call(this, n, r); }, e.prototype.getCompletionsForExtendsReference = function(n, r, i) { - for (var s = this.getSymbolContext().findSymbolsAtOffset(this.offset, Y.Rule), a = 0, o = s; a < o.length; a++) { + for (var s = this.getSymbolContext().findSymbolsAtOffset(this.offset, Q.Rule), a = 0, o = s; a < o.length; a++) { var l = o[a], c = { label: l.name, - textEdit: $.replace(this.getCompletionRange(r), l.name), - kind: q.Function + textEdit: H.replace(this.getCompletionRange(r), l.name), + kind: $.Function }; i.items.push(c); } @@ -14644,27 +14917,27 @@ var jl = function(t) { { label: "@extend", documentation: M("scss.builtin.@extend", "Inherits the styles of another selector."), - kind: q.Keyword + kind: $.Keyword }, { label: "@at-root", documentation: M("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."), - kind: q.Keyword + kind: $.Keyword }, { label: "@debug", documentation: M("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."), - kind: q.Keyword + kind: $.Keyword }, { label: "@warn", documentation: M("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."), - kind: q.Keyword + kind: $.Keyword }, { label: "@error", documentation: M("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."), - kind: q.Keyword + kind: $.Keyword }, { label: "@if", @@ -14673,21 +14946,21 @@ var jl = function(t) { $0 }`, insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@for", documentation: M("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."), insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}", insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@each", documentation: M("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."), insertText: "@each \\$${1:var} in ${2:list} {\n $0\n}", insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@while", @@ -14696,7 +14969,7 @@ var jl = function(t) { $0 }`, insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@mixin", @@ -14705,17 +14978,17 @@ var jl = function(t) { $0 }`, insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@include", documentation: M("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."), - kind: q.Keyword + kind: $.Keyword }, { label: "@function", documentation: M("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."), - kind: q.Keyword + kind: $.Keyword } ], e.scssModuleLoaders = [ { @@ -14724,7 +14997,7 @@ var jl = function(t) { references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/use" }], insertText: "@use $0;", insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword }, { label: "@forward", @@ -14732,7 +15005,7 @@ var jl = function(t) { references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/at-rules/forward" }], insertText: "@forward $0;", insertTextFormat: ze.Snippet, - kind: q.Keyword + kind: $.Keyword } ], e.scssModuleBuiltIns = [ { @@ -14771,8 +15044,8 @@ var jl = function(t) { references: [{ name: "Sass documentation", url: "https://sass-lang.com/documentation/modules/meta" }] } ], e; -}(Ui); -function Vo(t) { +}(Xi); +function Xo(t) { t.forEach(function(e) { if (e.documentation && e.references && e.references.length > 0) { var n = typeof e.documentation == "string" ? { kind: "markdown", value: e.documentation } : { kind: "markdown", value: e.documentation.value }; @@ -14784,7 +15057,7 @@ function Vo(t) { } }); } -var fp = function() { +var Rp = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -14802,21 +15075,21 @@ var fp = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), Bo = "/".charCodeAt(0), mp = ` -`.charCodeAt(0), gp = "\r".charCodeAt(0), bp = "\f".charCodeAt(0), zr = "`".charCodeAt(0), Pr = ".".charCodeAt(0), vp = p.CustomToken, xi = vp++, ql = function(t) { - fp(e, t); +}(), Yo = "/".charCodeAt(0), Fp = ` +`.charCodeAt(0), Ep = "\r".charCodeAt(0), Dp = "\f".charCodeAt(0), Vr = "`".charCodeAt(0), Br = ".".charCodeAt(0), Ap = p.CustomToken, Di = Ap++, Jl = function(t) { + Rp(e, t); function e() { return t !== null && t.apply(this, arguments) || this; } return e.prototype.scanNext = function(n) { var r = this.escapedJavaScript(); - return r !== null ? this.finishToken(n, r) : this.stream.advanceIfChars([Pr, Pr, Pr]) ? this.finishToken(n, xi) : t.prototype.scanNext.call(this, n); + return r !== null ? this.finishToken(n, r) : this.stream.advanceIfChars([Br, Br, Br]) ? this.finishToken(n, Di) : t.prototype.scanNext.call(this, n); }, e.prototype.comment = function() { - return t.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Bo, Bo]) ? (this.stream.advanceWhileChar(function(n) { + return t.prototype.comment.call(this) ? !0 : !this.inURL && this.stream.advanceIfChars([Yo, Yo]) ? (this.stream.advanceWhileChar(function(n) { switch (n) { - case mp: - case gp: - case bp: + case Fp: + case Ep: + case Dp: return !1; default: return !0; @@ -14824,11 +15097,11 @@ var fp = function() { }), !0) : !1; }, e.prototype.escapedJavaScript = function() { var n = this.stream.peekChar(); - return n === zr ? (this.stream.advance(1), this.stream.advanceWhileChar(function(r) { - return r !== zr; - }), this.stream.advanceIfChar(zr) ? p.EscapedJavaScript : p.BadEscapedJavaScript) : null; + return n === Vr ? (this.stream.advance(1), this.stream.advanceWhileChar(function(r) { + return r !== Vr; + }), this.stream.advanceIfChar(Vr) ? p.EscapedJavaScript : p.BadEscapedJavaScript) : null; }, e; -}(_n), yp = function() { +}(Nn), Np = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -14846,37 +15119,37 @@ var fp = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), wp = function(t) { - yp(e, t); +}(), Mp = function(t) { + Np(e, t); function e() { - return t.call(this, new ql()) || this; + return t.call(this, new Jl()) || this; } return e.prototype._parseStylesheetStatement = function(n) { return n === void 0 && (n = !1), this.peek(p.AtKeyword) ? this._parseVariableDeclaration() || this._parsePlugin() || t.prototype._parseStylesheetAtStatement.call(this, n) : this._tryParseMixinDeclaration() || this._tryParseMixinReference() || this._parseFunction() || this._parseRuleset(!0); }, e.prototype._parseImport = function() { if (!this.peekKeyword("@import") && !this.peekKeyword("@import-once")) return null; - var n = this.create(zi); + var n = this.create(Bi); if (this.consumeToken(), this.accept(p.ParenthesisL)) { if (!this.accept(p.Ident)) - return this.finish(n, S.IdentifierExpected, [p.SemiColon]); + return this.finish(n, C.IdentifierExpected, [p.SemiColon]); do if (!this.accept(p.Comma)) break; while (this.accept(p.Ident)); if (!this.accept(p.ParenthesisR)) - return this.finish(n, S.RightParenthesisExpected, [p.SemiColon]); + return this.finish(n, C.RightParenthesisExpected, [p.SemiColon]); } - return !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral()) ? this.finish(n, S.URIOrStringExpected, [p.SemiColon]) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n)); + return !n.addChild(this._parseURILiteral()) && !n.addChild(this._parseStringLiteral()) ? this.finish(n, C.URIOrStringExpected, [p.SemiColon]) : (!this.peek(p.SemiColon) && !this.peek(p.EOF) && n.setMedialist(this._parseMediaQueryList()), this.finish(n)); }, e.prototype._parsePlugin = function() { if (!this.peekKeyword("@plugin")) return null; var n = this.createNode(v.Plugin); - return this.consumeToken(), n.addChild(this._parseStringLiteral()) ? this.accept(p.SemiColon) ? this.finish(n) : this.finish(n, S.SemiColonExpected) : this.finish(n, S.StringLiteralExpected); + return this.consumeToken(), n.addChild(this._parseStringLiteral()) ? this.accept(p.SemiColon) ? this.finish(n) : this.finish(n, C.SemiColonExpected) : this.finish(n, C.StringLiteralExpected); }, e.prototype._parseMediaQuery = function() { var n = t.prototype._parseMediaQuery.call(this); if (!n) { - var r = this.create(kl); + var r = this.create(El); return r.addChild(this._parseVariable()) ? this.finish(r) : null; } return n; @@ -14886,14 +15159,14 @@ var fp = function() { return this._parseIdent() || this._parseVariable(); }, e.prototype._parseVariableDeclaration = function(n) { n === void 0 && (n = []); - var r = this.create(fr), i = this.mark(); + var r = this.create(yr), i = this.mark(); if (!r.setVariable(this._parseVariable(!0))) return null; if (this.accept(p.Colon)) { if (this.prevToken && (r.colonPosition = this.prevToken.offset), r.setValue(this._parseDetachedRuleSet())) r.needsSemicolon = !1; else if (!r.setValue(this._parseExpr())) - return this.finish(r, S.VariableValueExpected, [], n); + return this.finish(r, C.VariableValueExpected, [], n); r.addChild(this._parsePrio()); } else return this.restoreAtMark(i), null; @@ -14902,17 +15175,17 @@ var fp = function() { var n = this.mark(); if (this.peekDelim("#") || this.peekDelim(".")) if (this.consumeToken(), !this.hasWhitespace() && this.accept(p.ParenthesisL)) { - var r = this.create(gn); + var r = this.create(Sn); if (r.getParameters().addChild(this._parseMixinParameter())) for (; (this.accept(p.Comma) || this.accept(p.SemiColon)) && !this.peek(p.ParenthesisR); ) - r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, S.IdentifierExpected, [], [p.ParenthesisR]); + r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, C.IdentifierExpected, [], [p.ParenthesisR]); if (!this.accept(p.ParenthesisR)) return this.restoreAtMark(n), null; } else return this.restoreAtMark(n), null; if (!this.peek(p.CurlyL)) return null; - var i = this.create(ae); + var i = this.create(ce); return this._parseBody(i, this._parseDetachedRuleSetBody.bind(this)), this.finish(i); }, e.prototype._parseDetachedRuleSetBody = function() { return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration(); @@ -14923,14 +15196,14 @@ var fp = function() { r = !1; return !r; }, e.prototype._parseLookupValue = function() { - var n = this.create(W), r = this.mark(); + var n = this.create(V), r = this.mark(); return this.accept(p.BracketL) ? (n.addChild(this._parseVariable(!1, !0)) || n.addChild(this._parsePropertyIdentifier())) && this.accept(p.BracketR) || this.accept(p.BracketR) ? n : (this.restoreAtMark(r), null) : (this.restoreAtMark(r), null); }, e.prototype._parseVariable = function(n, r) { n === void 0 && (n = !1), r === void 0 && (r = !1); var i = !n && this.peekDelim("$"); if (!this.peekDelim("@") && !i && !this.peek(p.AtKeyword)) return null; - for (var s = this.create(Ti), a = this.mark(); this.acceptDelim("@") || !n && this.acceptDelim("$"); ) + for (var s = this.create(Hi), a = this.mark(); this.acceptDelim("@") || !n && this.acceptDelim("$"); ) if (this.hasWhitespace()) return this.restoreAtMark(a), null; return !this.accept(p.AtKeyword) && !this.accept(p.Ident) ? (this.restoreAtMark(a), null) : !r && this.peek(p.BracketL) && !this._addLookupChildren(s) ? (this.restoreAtMark(a), null) : s; @@ -14943,7 +15216,7 @@ var fp = function() { } if (this.peekDelim("~")) { var n = this.createNode(v.EscapedValue); - return this.consumeToken(), this.accept(p.String) || this.accept(p.EscapedJavaScript) ? this.finish(n) : this.finish(n, S.TermExpected); + return this.consumeToken(), this.accept(p.String) || this.accept(p.EscapedJavaScript) ? this.finish(n) : this.finish(n, C.TermExpected); } return null; }, e.prototype._parseOperator = function() { @@ -14964,13 +15237,13 @@ var fp = function() { }, e.prototype._parseRuleSetDeclaration = function() { return this.peek(p.AtKeyword) ? this._parseKeyframe() || this._parseMedia(!0) || this._parseImport() || this._parseSupports(!0) || this._parseDetachedRuleSetMixin() || this._parseVariableDeclaration() || t.prototype._parseRuleSetDeclarationAtStatement.call(this) : this._tryParseMixinDeclaration() || this._tryParseRuleset(!0) || this._tryParseMixinReference() || this._parseFunction() || this._parseExtend() || t.prototype._parseRuleSetDeclaration.call(this); }, e.prototype._parseKeyframeIdent = function() { - return this._parseIdent([Y.Keyframe]) || this._parseVariable(); + return this._parseIdent([Q.Keyframe]) || this._parseVariable(); }, e.prototype._parseKeyframeSelector = function() { return this._parseDetachedRuleSetMixin() || t.prototype._parseKeyframeSelector.call(this); }, e.prototype._parseSimpleSelectorBody = function() { return this._parseSelectorCombinator() || t.prototype._parseSimpleSelectorBody.call(this); }, e.prototype._parseSelector = function(n) { - var r = this.create(Fn), i = !1; + var r = this.create(Mn), i = !1; for (n && (i = r.addChild(this._parseCombinator())); r.addChild(this._parseSimpleSelector()); ) { i = !0; var s = this.mark(); @@ -14997,7 +15270,7 @@ var fp = function() { var r = /^[\w-]+/; if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, r)) return null; - var i = this.mark(), s = this.create(Oe); + var i = this.mark(), s = this.create(Ue); s.isCustomProperty = this.acceptDelim("-") && this.acceptDelim("-"); var a = !1; return n ? s.isCustomProperty ? a = s.addChild(this._parseIdent()) : a = s.addChild(this._parseRegexp(r)) : s.isCustomProperty ? a = this._acceptInterpolatedIdent(s) : a = this._acceptInterpolatedIdent(s, r), a ? (!n && !this.hasWhitespace() && (this.acceptDelim("+"), this.hasWhitespace() || this.acceptIdent("_")), this.finish(s)) : (this.restoreAtMark(i), null); @@ -15018,57 +15291,57 @@ var fp = function() { var n = this.mark(); if (this.peekDelim("@") || this.peekDelim("$")) { var r = this.createNode(v.Interpolation); - return this.consumeToken(), this.hasWhitespace() || !this.accept(p.CurlyL) ? (this.restoreAtMark(n), null) : r.addChild(this._parseIdent()) ? this.accept(p.CurlyR) ? this.finish(r) : this.finish(r, S.RightCurlyExpected) : this.finish(r, S.IdentifierExpected); + return this.consumeToken(), this.hasWhitespace() || !this.accept(p.CurlyL) ? (this.restoreAtMark(n), null) : r.addChild(this._parseIdent()) ? this.accept(p.CurlyR) ? this.finish(r) : this.finish(r, C.RightCurlyExpected) : this.finish(r, C.IdentifierExpected); } return null; }, e.prototype._tryParseMixinDeclaration = function() { - var n = this.mark(), r = this.create(gn); + var n = this.mark(), r = this.create(Sn); if (!r.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(p.ParenthesisL)) return this.restoreAtMark(n), null; if (r.getParameters().addChild(this._parseMixinParameter())) for (; (this.accept(p.Comma) || this.accept(p.SemiColon)) && !this.peek(p.ParenthesisR); ) - r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, S.IdentifierExpected, [], [p.ParenthesisR]); + r.getParameters().addChild(this._parseMixinParameter()) || this.markError(r, C.IdentifierExpected, [], [p.ParenthesisR]); return this.accept(p.ParenthesisR) ? (r.setGuard(this._parseGuard()), this.peek(p.CurlyL) ? this._parseBody(r, this._parseMixInBodyDeclaration.bind(this)) : (this.restoreAtMark(n), null)) : (this.restoreAtMark(n), null); }, e.prototype._parseMixInBodyDeclaration = function() { return this._parseFontFace() || this._parseRuleSetDeclaration(); }, e.prototype._parseMixinDeclarationIdentifier = function() { var n; if (this.peekDelim("#") || this.peekDelim(".")) { - if (n = this.create(Oe), this.consumeToken(), this.hasWhitespace() || !n.addChild(this._parseIdent())) + if (n = this.create(Ue), this.consumeToken(), this.hasWhitespace() || !n.addChild(this._parseIdent())) return null; } else if (this.peek(p.Hash)) - n = this.create(Oe), this.consumeToken(); + n = this.create(Ue), this.consumeToken(); else return null; - return n.referenceTypes = [Y.Mixin], this.finish(n); + return n.referenceTypes = [Q.Mixin], this.finish(n); }, e.prototype._parsePseudo = function() { if (!this.peek(p.Colon)) return null; - var n = this.mark(), r = this.create(mn); + var n = this.mark(), r = this.create(xn); return this.consumeToken(), this.acceptIdent("extend") ? this._completeExtends(r) : (this.restoreAtMark(n), t.prototype._parsePseudo.call(this)); }, e.prototype._parseExtend = function() { if (!this.peekDelim("&")) return null; - var n = this.mark(), r = this.create(mn); + var n = this.mark(), r = this.create(xn); return this.consumeToken(), this.hasWhitespace() || !this.accept(p.Colon) || !this.acceptIdent("extend") ? (this.restoreAtMark(n), null) : this._completeExtends(r); }, e.prototype._completeExtends = function(n) { if (!this.accept(p.ParenthesisL)) - return this.finish(n, S.LeftParenthesisExpected); + return this.finish(n, C.LeftParenthesisExpected); var r = n.getSelectors(); if (!r.addChild(this._parseSelector(!0))) - return this.finish(n, S.SelectorExpected); + return this.finish(n, C.SelectorExpected); for (; this.accept(p.Comma); ) if (!r.addChild(this._parseSelector(!0))) - return this.finish(n, S.SelectorExpected); - return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, S.RightParenthesisExpected); + return this.finish(n, C.SelectorExpected); + return this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, C.RightParenthesisExpected); }, e.prototype._parseDetachedRuleSetMixin = function() { if (!this.peek(p.AtKeyword)) return null; - var n = this.mark(), r = this.create(Zn); - return r.addChild(this._parseVariable(!0)) && (this.hasWhitespace() || !this.accept(p.ParenthesisL)) ? (this.restoreAtMark(n), null) : this.accept(p.ParenthesisR) ? this.finish(r) : this.finish(r, S.RightParenthesisExpected); + var n = this.mark(), r = this.create(sr); + return r.addChild(this._parseVariable(!0)) && (this.hasWhitespace() || !this.accept(p.ParenthesisL)) ? (this.restoreAtMark(n), null) : this.accept(p.ParenthesisR) ? this.finish(r) : this.finish(r, C.RightParenthesisExpected); }, e.prototype._tryParseMixinReference = function(n) { n === void 0 && (n = !0); - for (var r = this.mark(), i = this.create(Zn), s = this._parseMixinDeclarationIdentifier(); s; ) { + for (var r = this.mark(), i = this.create(sr), s = this._parseMixinDeclarationIdentifier(); s; ) { this.acceptDelim(">"); var a = this._parseMixinDeclarationIdentifier(); if (a) @@ -15083,25 +15356,25 @@ var fp = function() { if (o = !0, i.getArguments().addChild(this._parseMixinArgument())) { for (; (this.accept(p.Comma) || this.accept(p.SemiColon)) && !this.peek(p.ParenthesisR); ) if (!i.getArguments().addChild(this._parseMixinArgument())) - return this.finish(i, S.ExpressionExpected); + return this.finish(i, C.ExpressionExpected); } if (!this.accept(p.ParenthesisR)) - return this.finish(i, S.RightParenthesisExpected); - s.referenceTypes = [Y.Mixin]; + return this.finish(i, C.RightParenthesisExpected); + s.referenceTypes = [Q.Mixin]; } else - s.referenceTypes = [Y.Mixin, Y.Rule]; + s.referenceTypes = [Q.Mixin, Q.Rule]; return this.peek(p.BracketL) ? n || this._addLookupChildren(i) : i.addChild(this._parsePrio()), !o && !this.peek(p.SemiColon) && !this.peek(p.CurlyR) && !this.peek(p.EOF) ? (this.restoreAtMark(r), null) : this.finish(i); }, e.prototype._parseMixinArgument = function() { - var n = this.create(Gt), r = this.mark(), i = this._parseVariable(); + var n = this.create(Xt), r = this.mark(), i = this._parseVariable(); return i && (this.accept(p.Colon) ? n.setIdentifier(i) : this.restoreAtMark(r)), n.setValue(this._parseDetachedRuleSet() || this._parseExpr(!0)) ? this.finish(n) : (this.restoreAtMark(r), null); }, e.prototype._parseMixinParameter = function() { - var n = this.create(pr); + var n = this.create(vr); if (this.peekKeyword("@rest")) { - var r = this.create(W); - return this.consumeToken(), this.accept(xi) ? (n.setIdentifier(this.finish(r)), this.finish(n)) : this.finish(n, S.DotExpected, [], [p.Comma, p.ParenthesisR]); + var r = this.create(V); + return this.consumeToken(), this.accept(Di) ? (n.setIdentifier(this.finish(r)), this.finish(n)) : this.finish(n, C.DotExpected, [], [p.Comma, p.ParenthesisR]); } - if (this.peek(xi)) { - var i = this.create(W); + if (this.peek(Di)) { + var i = this.create(V); return this.consumeToken(), n.setIdentifier(this.finish(i)), this.finish(n); } var s = !1; @@ -15109,20 +15382,20 @@ var fp = function() { }, e.prototype._parseGuard = function() { if (!this.peekIdent("when")) return null; - var n = this.create(Qd); + var n = this.create(hu); if (this.consumeToken(), n.isNegated = this.acceptIdent("not"), !n.getConditions().addChild(this._parseGuardCondition())) - return this.finish(n, S.ConditionExpected); + return this.finish(n, C.ConditionExpected); for (; this.acceptIdent("and") || this.accept(p.Comma); ) if (!n.getConditions().addChild(this._parseGuardCondition())) - return this.finish(n, S.ConditionExpected); + return this.finish(n, C.ConditionExpected); return this.finish(n); }, e.prototype._parseGuardCondition = function() { if (!this.peek(p.ParenthesisL)) return null; - var n = this.create(Zd); - return this.consumeToken(), n.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, S.RightParenthesisExpected); + var n = this.create(du); + return this.consumeToken(), n.addChild(this._parseExpr()), this.accept(p.ParenthesisR) ? this.finish(n) : this.finish(n, C.RightParenthesisExpected); }, e.prototype._parseFunction = function() { - var n = this.mark(), r = this.create(Rn); + var n = this.mark(), r = this.create(zn); if (!r.setIdentifier(this._parseFunctionIdentifier())) return null; if (this.hasWhitespace() || !this.accept(p.ParenthesisL)) @@ -15130,25 +15403,25 @@ var fp = function() { if (r.getArguments().addChild(this._parseMixinArgument())) { for (; (this.accept(p.Comma) || this.accept(p.SemiColon)) && !this.peek(p.ParenthesisR); ) if (!r.getArguments().addChild(this._parseMixinArgument())) - return this.finish(r, S.ExpressionExpected); + return this.finish(r, C.ExpressionExpected); } - return this.accept(p.ParenthesisR) ? this.finish(r) : this.finish(r, S.RightParenthesisExpected); + return this.accept(p.ParenthesisR) ? this.finish(r) : this.finish(r, C.RightParenthesisExpected); }, e.prototype._parseFunctionIdentifier = function() { if (this.peekDelim("%")) { - var n = this.create(Oe); - return n.referenceTypes = [Y.Function], this.consumeToken(), this.finish(n); + var n = this.create(Ue); + return n.referenceTypes = [Q.Function], this.consumeToken(), this.finish(n); } return t.prototype._parseFunctionIdentifier.call(this); }, e.prototype._parseURLArgument = function() { var n = this.mark(), r = t.prototype._parseURLArgument.call(this); if (!r || !this.peek(p.ParenthesisR)) { this.restoreAtMark(n); - var i = this.create(W); + var i = this.create(V); return i.addChild(this._parseBinaryExpr()), this.finish(i); } return r; }, e; -}(Wi), xp = function() { +}(Gi), zp = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -15166,8 +15439,8 @@ var fp = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), U = Je(), Sp = function(t) { - xp(e, t); +}(), B = Ge(), Pp = function(t) { + zp(e, t); function e(n, r) { return t.call(this, "@", n, r) || this; } @@ -15177,9 +15450,9 @@ var fp = function() { label: l.name, detail: l.example, documentation: l.description, - textEdit: $.replace(this.getCompletionRange(r), l.name + "($0)"), + textEdit: H.replace(this.getCompletionRange(r), l.name + "($0)"), insertTextFormat: ze.Snippet, - kind: q.Function + kind: $.Function }; i && (c.sortText = "z"), s.items.push(c); } @@ -15197,291 +15470,291 @@ var fp = function() { { name: "if", example: "if(condition, trueValue [, falseValue]);", - description: U("less.builtin.if", "returns one of two values depending on a condition.") + description: B("less.builtin.if", "returns one of two values depending on a condition.") }, { name: "boolean", example: "boolean(condition);", - description: U("less.builtin.boolean", '"store" a boolean test for later evaluation in a guard or if().') + description: B("less.builtin.boolean", '"store" a boolean test for later evaluation in a guard or if().') }, { name: "length", example: "length(@list);", - description: U("less.builtin.length", "returns the number of elements in a value list") + description: B("less.builtin.length", "returns the number of elements in a value list") }, { name: "extract", example: "extract(@list, index);", - description: U("less.builtin.extract", "returns a value at the specified position in the list") + description: B("less.builtin.extract", "returns a value at the specified position in the list") }, { name: "range", example: "range([start, ] end [, step]);", - description: U("less.builtin.range", "generate a list spanning a range of values") + description: B("less.builtin.range", "generate a list spanning a range of values") }, { name: "each", example: "each(@list, ruleset);", - description: U("less.builtin.each", "bind the evaluation of a ruleset to each member of a list.") + description: B("less.builtin.each", "bind the evaluation of a ruleset to each member of a list.") }, { name: "escape", example: "escape(@string);", - description: U("less.builtin.escape", "URL encodes a string") + description: B("less.builtin.escape", "URL encodes a string") }, { name: "e", example: "e(@string);", - description: U("less.builtin.e", "escape string content") + description: B("less.builtin.e", "escape string content") }, { name: "replace", example: "replace(@string, @pattern, @replacement[, @flags]);", - description: U("less.builtin.replace", "string replace") + description: B("less.builtin.replace", "string replace") }, { name: "unit", example: "unit(@dimension, [@unit: '']);", - description: U("less.builtin.unit", "remove or change the unit of a dimension") + description: B("less.builtin.unit", "remove or change the unit of a dimension") }, { name: "color", example: "color(@string);", - description: U("less.builtin.color", "parses a string to a color"), + description: B("less.builtin.color", "parses a string to a color"), type: "color" }, { name: "convert", example: "convert(@value, unit);", - description: U("less.builtin.convert", "converts numbers from one type into another") + description: B("less.builtin.convert", "converts numbers from one type into another") }, { name: "data-uri", example: "data-uri([mimetype,] url);", - description: U("less.builtin.data-uri", "inlines a resource and falls back to `url()`"), + description: B("less.builtin.data-uri", "inlines a resource and falls back to `url()`"), type: "url" }, { name: "abs", - description: U("less.builtin.abs", "absolute value of a number"), + description: B("less.builtin.abs", "absolute value of a number"), example: "abs(number);" }, { name: "acos", - description: U("less.builtin.acos", "arccosine - inverse of cosine function"), + description: B("less.builtin.acos", "arccosine - inverse of cosine function"), example: "acos(number);" }, { name: "asin", - description: U("less.builtin.asin", "arcsine - inverse of sine function"), + description: B("less.builtin.asin", "arcsine - inverse of sine function"), example: "asin(number);" }, { name: "ceil", example: "ceil(@number);", - description: U("less.builtin.ceil", "rounds up to an integer") + description: B("less.builtin.ceil", "rounds up to an integer") }, { name: "cos", - description: U("less.builtin.cos", "cosine function"), + description: B("less.builtin.cos", "cosine function"), example: "cos(number);" }, { name: "floor", - description: U("less.builtin.floor", "rounds down to an integer"), + description: B("less.builtin.floor", "rounds down to an integer"), example: "floor(@number);" }, { name: "percentage", - description: U("less.builtin.percentage", "converts to a %, e.g. 0.5 > 50%"), + description: B("less.builtin.percentage", "converts to a %, e.g. 0.5 > 50%"), example: "percentage(@number);", type: "percentage" }, { name: "round", - description: U("less.builtin.round", "rounds a number to a number of places"), + description: B("less.builtin.round", "rounds a number to a number of places"), example: "round(number, [places: 0]);" }, { name: "sqrt", - description: U("less.builtin.sqrt", "calculates square root of a number"), + description: B("less.builtin.sqrt", "calculates square root of a number"), example: "sqrt(number);" }, { name: "sin", - description: U("less.builtin.sin", "sine function"), + description: B("less.builtin.sin", "sine function"), example: "sin(number);" }, { name: "tan", - description: U("less.builtin.tan", "tangent function"), + description: B("less.builtin.tan", "tangent function"), example: "tan(number);" }, { name: "atan", - description: U("less.builtin.atan", "arctangent - inverse of tangent function"), + description: B("less.builtin.atan", "arctangent - inverse of tangent function"), example: "atan(number);" }, { name: "pi", - description: U("less.builtin.pi", "returns pi"), + description: B("less.builtin.pi", "returns pi"), example: "pi();" }, { name: "pow", - description: U("less.builtin.pow", "first argument raised to the power of the second argument"), + description: B("less.builtin.pow", "first argument raised to the power of the second argument"), example: "pow(@base, @exponent);" }, { name: "mod", - description: U("less.builtin.mod", "first argument modulus second argument"), + description: B("less.builtin.mod", "first argument modulus second argument"), example: "mod(number, number);" }, { name: "min", - description: U("less.builtin.min", "returns the lowest of one or more values"), + description: B("less.builtin.min", "returns the lowest of one or more values"), example: "min(@x, @y);" }, { name: "max", - description: U("less.builtin.max", "returns the lowest of one or more values"), + description: B("less.builtin.max", "returns the lowest of one or more values"), example: "max(@x, @y);" } ], e.colorProposals = [ { name: "argb", example: "argb(@color);", - description: U("less.builtin.argb", "creates a #AARRGGBB") + description: B("less.builtin.argb", "creates a #AARRGGBB") }, { name: "hsl", example: "hsl(@hue, @saturation, @lightness);", - description: U("less.builtin.hsl", "creates a color") + description: B("less.builtin.hsl", "creates a color") }, { name: "hsla", example: "hsla(@hue, @saturation, @lightness, @alpha);", - description: U("less.builtin.hsla", "creates a color") + description: B("less.builtin.hsla", "creates a color") }, { name: "hsv", example: "hsv(@hue, @saturation, @value);", - description: U("less.builtin.hsv", "creates a color") + description: B("less.builtin.hsv", "creates a color") }, { name: "hsva", example: "hsva(@hue, @saturation, @value, @alpha);", - description: U("less.builtin.hsva", "creates a color") + description: B("less.builtin.hsva", "creates a color") }, { name: "hue", example: "hue(@color);", - description: U("less.builtin.hue", "returns the `hue` channel of `@color` in the HSL space") + description: B("less.builtin.hue", "returns the `hue` channel of `@color` in the HSL space") }, { name: "saturation", example: "saturation(@color);", - description: U("less.builtin.saturation", "returns the `saturation` channel of `@color` in the HSL space") + description: B("less.builtin.saturation", "returns the `saturation` channel of `@color` in the HSL space") }, { name: "lightness", example: "lightness(@color);", - description: U("less.builtin.lightness", "returns the `lightness` channel of `@color` in the HSL space") + description: B("less.builtin.lightness", "returns the `lightness` channel of `@color` in the HSL space") }, { name: "hsvhue", example: "hsvhue(@color);", - description: U("less.builtin.hsvhue", "returns the `hue` channel of `@color` in the HSV space") + description: B("less.builtin.hsvhue", "returns the `hue` channel of `@color` in the HSV space") }, { name: "hsvsaturation", example: "hsvsaturation(@color);", - description: U("less.builtin.hsvsaturation", "returns the `saturation` channel of `@color` in the HSV space") + description: B("less.builtin.hsvsaturation", "returns the `saturation` channel of `@color` in the HSV space") }, { name: "hsvvalue", example: "hsvvalue(@color);", - description: U("less.builtin.hsvvalue", "returns the `value` channel of `@color` in the HSV space") + description: B("less.builtin.hsvvalue", "returns the `value` channel of `@color` in the HSV space") }, { name: "red", example: "red(@color);", - description: U("less.builtin.red", "returns the `red` channel of `@color`") + description: B("less.builtin.red", "returns the `red` channel of `@color`") }, { name: "green", example: "green(@color);", - description: U("less.builtin.green", "returns the `green` channel of `@color`") + description: B("less.builtin.green", "returns the `green` channel of `@color`") }, { name: "blue", example: "blue(@color);", - description: U("less.builtin.blue", "returns the `blue` channel of `@color`") + description: B("less.builtin.blue", "returns the `blue` channel of `@color`") }, { name: "alpha", example: "alpha(@color);", - description: U("less.builtin.alpha", "returns the `alpha` channel of `@color`") + description: B("less.builtin.alpha", "returns the `alpha` channel of `@color`") }, { name: "luma", example: "luma(@color);", - description: U("less.builtin.luma", "returns the `luma` value (perceptual brightness) of `@color`") + description: B("less.builtin.luma", "returns the `luma` value (perceptual brightness) of `@color`") }, { name: "saturate", example: "saturate(@color, 10%);", - description: U("less.builtin.saturate", "return `@color` 10% points more saturated") + description: B("less.builtin.saturate", "return `@color` 10% points more saturated") }, { name: "desaturate", example: "desaturate(@color, 10%);", - description: U("less.builtin.desaturate", "return `@color` 10% points less saturated") + description: B("less.builtin.desaturate", "return `@color` 10% points less saturated") }, { name: "lighten", example: "lighten(@color, 10%);", - description: U("less.builtin.lighten", "return `@color` 10% points lighter") + description: B("less.builtin.lighten", "return `@color` 10% points lighter") }, { name: "darken", example: "darken(@color, 10%);", - description: U("less.builtin.darken", "return `@color` 10% points darker") + description: B("less.builtin.darken", "return `@color` 10% points darker") }, { name: "fadein", example: "fadein(@color, 10%);", - description: U("less.builtin.fadein", "return `@color` 10% points less transparent") + description: B("less.builtin.fadein", "return `@color` 10% points less transparent") }, { name: "fadeout", example: "fadeout(@color, 10%);", - description: U("less.builtin.fadeout", "return `@color` 10% points more transparent") + description: B("less.builtin.fadeout", "return `@color` 10% points more transparent") }, { name: "fade", example: "fade(@color, 50%);", - description: U("less.builtin.fade", "return `@color` with 50% transparency") + description: B("less.builtin.fade", "return `@color` with 50% transparency") }, { name: "spin", example: "spin(@color, 10);", - description: U("less.builtin.spin", "return `@color` with a 10 degree larger in hue") + description: B("less.builtin.spin", "return `@color` with a 10 degree larger in hue") }, { name: "mix", example: "mix(@color1, @color2, [@weight: 50%]);", - description: U("less.builtin.mix", "return a mix of `@color1` and `@color2`") + description: B("less.builtin.mix", "return a mix of `@color1` and `@color2`") }, { name: "greyscale", example: "greyscale(@color);", - description: U("less.builtin.greyscale", "returns a grey, 100% desaturated color") + description: B("less.builtin.greyscale", "returns a grey, 100% desaturated color") }, { name: "contrast", example: "contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);", - description: U("less.builtin.contrast", "return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes") + description: B("less.builtin.contrast", "return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes") }, { name: "multiply", @@ -15520,12 +15793,12 @@ var fp = function() { example: "negation(@color1, @color2);" } ], e; -}(Ui); -function Cp(t, e) { - var n = kp(t); - return _p(n, e); +}(Xi); +function Lp(t, e) { + var n = Ip(t); + return Tp(n, e); } -function kp(t) { +function Ip(t) { function e(u) { return t.positionAt(u.offset).line; } @@ -15535,19 +15808,19 @@ function kp(t) { function r() { switch (t.languageId) { case "scss": - return new jl(); + return new Gl(); case "less": - return new ql(); + return new Jl(); default: - return new _n(); + return new Nn(); } } - function i(u, f) { - var m = e(u), g = n(u); - return m !== g ? { - startLine: m, + function i(u, m) { + var f = e(u), g = n(u); + return f !== g ? { + startLine: f, endLine: g, - kind: f + kind: m } : null; } var s = [], a = [], o = r(); @@ -15555,35 +15828,35 @@ function kp(t) { for (var l = o.scan(), c = null, h = function() { switch (l.type) { case p.CurlyL: - case hr: { + case gr: { a.push({ line: e(l), type: "brace", isStart: !0 }); break; } case p.CurlyR: { if (a.length !== 0) { - var u = jo(a, "brace"); + var u = Ko(a, "brace"); if (!u) break; - var f = n(l); - u.type === "brace" && (c && n(c) !== f && f--, u.line !== f && s.push({ + var m = n(l); + u.type === "brace" && (c && n(c) !== m && m--, u.line !== m && s.push({ startLine: u.line, - endLine: f, + endLine: m, kind: void 0 })); } break; } case p.Comment: { - var m = function(w) { - return w === "#region" ? { line: e(l), type: "comment", isStart: !0 } : { line: n(l), type: "comment", isStart: !1 }; - }, g = function(w) { - var x = w.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//); - if (x) - return m(x[1]); + var f = function(x) { + return x === "#region" ? { line: e(l), type: "comment", isStart: !0 } : { line: n(l), type: "comment", isStart: !1 }; + }, g = function(x) { + var S = x.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//); + if (S) + return f(S[1]); if (t.languageId === "scss" || t.languageId === "less") { - var k = w.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/); - if (k) - return m(k[1]); + var w = x.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/); + if (w) + return f(w[1]); } return null; }, b = g(l); @@ -15591,7 +15864,7 @@ function kp(t) { if (b.isStart) a.push(b); else { - var u = jo(a, "comment"); + var u = Ko(a, "comment"); if (!u) break; u.type === "comment" && u.line !== b.line && s.push({ @@ -15612,7 +15885,7 @@ function kp(t) { h(); return s; } -function jo(t, e) { +function Ko(t, e) { if (t.length === 0) return null; for (var n = t.length - 1; n >= 0; n--) @@ -15620,7 +15893,7 @@ function jo(t, e) { return t.splice(n, 1)[0]; return null; } -function _p(t, e) { +function Tp(t, e) { var n = e && e.rangeLimit || Number.MAX_VALUE, r = t.sort(function(a, o) { var l = a.startLine - o.startLine; return l === 0 && (l = a.endLine - o.endLine), l; @@ -15629,7 +15902,7 @@ function _p(t, e) { a.startLine < s && s < a.endLine || (i.push(a), s = a.endLine); }), i.length < n ? i : i.slice(0, n); } -var $l; +var Xl; (function() { var t = [ , @@ -15904,17 +16177,17 @@ You passed in: '` + this.raw_options[l] + "'"); function(i, s, a) { var o = a(16).Beautifier, l = a(17).Options; function c(h, u) { - var f = new o(h, u); - return f.beautify(); + var m = new o(h, u); + return m.beautify(); } i.exports = c, i.exports.defaultOptions = function() { return new l(); }; }, function(i, s, a) { - var o = a(17).Options, l = a(2).Output, c = a(8).InputScanner, h = a(13).Directives, u = new h(/\/\*/, /\*\//), f = /\r\n|[\r\n]/, m = /\r\n|[\r\n]/g, g = /\s/, b = /(?:\s|\n)+/g, y = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, w = /\/\/(?:[^\n\r\u2028\u2029]*)/g; - function x(k, F) { - this._source_text = k || "", this._options = new o(F), this._ch = null, this._input = null, this.NESTED_AT_RULE = { + var o = a(17).Options, l = a(2).Output, c = a(8).InputScanner, h = a(13).Directives, u = new h(/\/\*/, /\*\//), m = /\r\n|[\r\n]/, f = /\r\n|[\r\n]/g, g = /\s/, b = /(?:\s|\n)+/g, y = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, x = /\/\/(?:[^\n\r\u2028\u2029]*)/g; + function S(w, E) { + this._source_text = w || "", this._options = new o(E), this._ch = null, this._input = null, this.NESTED_AT_RULE = { "@page": !0, "@font-face": !0, "@keyframes": !0, @@ -15927,74 +16200,74 @@ You passed in: '` + this.raw_options[l] + "'"); "@document": !0 }; } - x.prototype.eatString = function(k) { - var F = ""; + S.prototype.eatString = function(w) { + var E = ""; for (this._ch = this._input.next(); this._ch; ) { - if (F += this._ch, this._ch === "\\") - F += this._input.next(); - else if (k.indexOf(this._ch) !== -1 || this._ch === ` + if (E += this._ch, this._ch === "\\") + E += this._input.next(); + else if (w.indexOf(this._ch) !== -1 || this._ch === ` `) break; this._ch = this._input.next(); } - return F; - }, x.prototype.eatWhitespace = function(k) { - for (var F = g.test(this._input.peek()), N = 0; g.test(this._input.peek()); ) - this._ch = this._input.next(), k && this._ch === ` -` && (N === 0 || N < this._options.max_preserve_newlines) && (N++, this._output.add_new_line(!0)); - return F; - }, x.prototype.foundNestedPseudoClass = function() { - for (var k = 0, F = 1, N = this._input.peek(F); N; ) { - if (N === "{") + return E; + }, S.prototype.eatWhitespace = function(w) { + for (var E = g.test(this._input.peek()), R = 0; g.test(this._input.peek()); ) + this._ch = this._input.next(), w && this._ch === ` +` && (R === 0 || R < this._options.max_preserve_newlines) && (R++, this._output.add_new_line(!0)); + return E; + }, S.prototype.foundNestedPseudoClass = function() { + for (var w = 0, E = 1, R = this._input.peek(E); R; ) { + if (R === "{") return !0; - if (N === "(") - k += 1; - else if (N === ")") { - if (k === 0) + if (R === "(") + w += 1; + else if (R === ")") { + if (w === 0) return !1; - k -= 1; - } else if (N === ";" || N === "}") + w -= 1; + } else if (R === ";" || R === "}") return !1; - F++, N = this._input.peek(F); + E++, R = this._input.peek(E); } return !1; - }, x.prototype.print_string = function(k) { - this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(k); - }, x.prototype.preserveSingleSpace = function(k) { - k && (this._output.space_before_token = !0); - }, x.prototype.indent = function() { + }, S.prototype.print_string = function(w) { + this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(w); + }, S.prototype.preserveSingleSpace = function(w) { + w && (this._output.space_before_token = !0); + }, S.prototype.indent = function() { this._indentLevel++; - }, x.prototype.outdent = function() { + }, S.prototype.outdent = function() { this._indentLevel > 0 && this._indentLevel--; - }, x.prototype.beautify = function() { + }, S.prototype.beautify = function() { if (this._options.disabled) return this._source_text; - var k = this._source_text, F = this._options.eol; - F === "auto" && (F = ` -`, k && f.test(k || "") && (F = k.match(f)[0])), k = k.replace(m, ` + var w = this._source_text, E = this._options.eol; + E === "auto" && (E = ` +`, w && m.test(w || "") && (E = w.match(m)[0])), w = w.replace(f, ` `); - var N = k.match(/^[\t ]*/)[0]; - this._output = new l(this._options, N), this._input = new c(k), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null; - for (var j = 0, H = !1, B = !1, P = !1, z = !1, A = !1, R = this._ch, L, O, K; L = this._input.read(b), O = L !== "", K = R, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), R = this._ch, this._ch; ) + var R = w.match(/^[\t ]*/)[0]; + this._output = new l(this._options, R), this._input = new c(w), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null; + for (var T = 0, W = !1, L = !1, q = !1, z = !1, F = !1, D = this._ch, I, O, J; I = this._input.read(b), O = I !== "", J = D, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), D = this._ch, this._ch; ) if (this._ch === "/" && this._input.peek() === "*") { this._output.add_new_line(), this._input.back(); - var re = this._input.read(y), E = u.get_directives(re); - E && E.ignore === "start" && (re += u.readIgnored(this._input)), this.print_string(re), this.eatWhitespace(!0), this._output.add_new_line(); + var Y = this._input.read(y), A = u.get_directives(Y); + A && A.ignore === "start" && (Y += u.readIgnored(this._input)), this.print_string(Y), this.eatWhitespace(!0), this._output.add_new_line(); } else if (this._ch === "/" && this._input.peek() === "/") - this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(w)), this.eatWhitespace(!0); + this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(x)), this.eatWhitespace(!0); else if (this._ch === "@") if (this.preserveSingleSpace(O), this._input.peek() === "{") this.print_string(this._ch + this.eatString("}")); else { this.print_string(this._ch); - var C = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g); - C.match(/[ :]$/) && (C = this.eatString(": ").replace(/\s$/, ""), this.print_string(C), this._output.space_before_token = !0), C = C.replace(/\s$/, ""), C === "extend" ? z = !0 : C === "import" && (A = !0), C in this.NESTED_AT_RULE ? (this._nestedLevel += 1, C in this.CONDITIONAL_GROUP_RULE && (P = !0)) : !H && j === 0 && C.indexOf(":") !== -1 && (B = !0, this.indent()); + var k = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g); + k.match(/[ :]$/) && (k = this.eatString(": ").replace(/\s$/, ""), this.print_string(k), this._output.space_before_token = !0), k = k.replace(/\s$/, ""), k === "extend" ? z = !0 : k === "import" && (F = !0), k in this.NESTED_AT_RULE ? (this._nestedLevel += 1, k in this.CONDITIONAL_GROUP_RULE && (q = !0)) : !W && T === 0 && k.indexOf(":") !== -1 && (L = !0, this.indent()); } else - this._ch === "#" && this._input.peek() === "{" ? (this.preserveSingleSpace(O), this.print_string(this._ch + this.eatString("}"))) : this._ch === "{" ? (B && (B = !1, this.outdent()), P ? (P = !1, H = this._indentLevel >= this._nestedLevel) : H = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && H && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : (this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line()) : this._ch === "}" ? (this.outdent(), this._output.add_new_line(), K === "{" && this._output.trim(!0), A = !1, z = !1, B && (this.outdent(), B = !1), this.print_string(this._ch), H = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0)) : this._ch === ":" ? (H || P) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !z && j === 0 ? (this.print_string(":"), B || (B = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":")) : this._ch === '"' || this._ch === "'" ? (this.preserveSingleSpace(O), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0)) : this._ch === ";" ? j === 0 ? (B && (this.outdent(), B = !1), z = !1, A = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0) : this._ch === "(" ? this._input.lookBack("url") ? (this.print_string(this._ch), this.eatWhitespace(), j++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), j && (j--, this.outdent()))) : (this.preserveSingleSpace(O), this.print_string(this._ch), this.eatWhitespace(), j++, this.indent()) : this._ch === ")" ? (j && (j--, this.outdent()), this.print_string(this._ch)) : this._ch === "," ? (this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && !B && j === 0 && !A && !z ? this._output.add_new_line() : this._output.space_before_token = !0) : (this._ch === ">" || this._ch === "+" || this._ch === "~") && !B && j === 0 ? this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && g.test(this._ch) && (this._ch = "")) : this._ch === "]" ? this.print_string(this._ch) : this._ch === "[" ? (this.preserveSingleSpace(O), this.print_string(this._ch)) : this._ch === "=" ? (this.eatWhitespace(), this.print_string("="), g.test(this._ch) && (this._ch = "")) : this._ch === "!" && !this._input.lookBack("\\") ? (this.print_string(" "), this.print_string(this._ch)) : (this.preserveSingleSpace(O), this.print_string(this._ch)); - var D = this._output.get_code(F); - return D; - }, i.exports.Beautifier = x; + this._ch === "#" && this._input.peek() === "{" ? (this.preserveSingleSpace(O), this.print_string(this._ch + this.eatString("}"))) : this._ch === "{" ? (L && (L = !1, this.outdent()), q ? (q = !1, W = this._indentLevel >= this._nestedLevel) : W = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && W && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : (this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line()) : this._ch === "}" ? (this.outdent(), this._output.add_new_line(), J === "{" && this._output.trim(!0), F = !1, z = !1, L && (this.outdent(), L = !1), this.print_string(this._ch), W = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0)) : this._ch === ":" ? (W || q) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !z && T === 0 ? (this.print_string(":"), L || (L = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":")) : this._ch === '"' || this._ch === "'" ? (this.preserveSingleSpace(O), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0)) : this._ch === ";" ? T === 0 ? (L && (this.outdent(), L = !1), z = !1, F = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0) : this._ch === "(" ? this._input.lookBack("url") ? (this.print_string(this._ch), this.eatWhitespace(), T++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), T && (T--, this.outdent()))) : (this.preserveSingleSpace(O), this.print_string(this._ch), this.eatWhitespace(), T++, this.indent()) : this._ch === ")" ? (T && (T--, this.outdent()), this.print_string(this._ch)) : this._ch === "," ? (this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && !L && T === 0 && !F && !z ? this._output.add_new_line() : this._output.space_before_token = !0) : (this._ch === ">" || this._ch === "+" || this._ch === "~") && !L && T === 0 ? this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && g.test(this._ch) && (this._ch = "")) : this._ch === "]" ? this.print_string(this._ch) : this._ch === "[" ? (this.preserveSingleSpace(O), this.print_string(this._ch)) : this._ch === "=" ? (this.eatWhitespace(), this.print_string("="), g.test(this._ch) && (this._ch = "")) : this._ch === "!" && !this._input.lookBack("\\") ? (this.print_string(" "), this.print_string(this._ch)) : (this.preserveSingleSpace(O), this.print_string(this._ch)); + var N = this._output.get_code(E); + return N; + }, i.exports.Beautifier = S; }, function(i, s, a) { var o = a(6).Options; @@ -16004,8 +16277,8 @@ You passed in: '` + this.raw_options[l] + "'"); this.space_around_combinator = this._get_boolean("space_around_combinator") || h; var u = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]); this.brace_style = "collapse"; - for (var f = 0; f < u.length; f++) - u[f] !== "expand" ? this.brace_style = "collapse" : this.brace_style = u[f]; + for (var m = 0; m < u.length; m++) + u[m] !== "expand" ? this.brace_style = "collapse" : this.brace_style = u[m]; } l.prototype = new o(), i.exports.Options = l; } @@ -16020,42 +16293,42 @@ You passed in: '` + this.raw_options[l] + "'"); return t[i](a, a.exports, n), a.exports; } var r = n(15); - $l = r; + Xl = r; })(); -var Fp = $l; -function Rp(t, e, n) { +var Wp = Xl; +function Op(t, e, n) { var r = t.getText(), i = !0, s = 0, a = !1, o = n.tabSize || 4; if (e) { - for (var l = t.offsetAt(e.start), c = l; c > 0 && Ho(r, c - 1); ) + for (var l = t.offsetAt(e.start), c = l; c > 0 && el(r, c - 1); ) c--; - c === 0 || $o(r, c - 1) ? l = c : c < l && (l = c + 1); - for (var h = t.offsetAt(e.end), u = h; u < r.length && Ho(r, u); ) + c === 0 || Zo(r, c - 1) ? l = c : c < l && (l = c + 1); + for (var h = t.offsetAt(e.end), u = h; u < r.length && el(r, u); ) u++; - if ((u === r.length || $o(r, u)) && (h = u), e = te.create(t.positionAt(l), t.positionAt(h)), a = Ap(r, l), i = h === r.length, r = r.substring(l, h), l !== 0) { - var f = t.offsetAt(Fe.create(e.start.line, 0)); - s = Mp(t.getText(), f, n); + if ((u === r.length || Zo(r, u)) && (h = u), e = ie.create(t.positionAt(l), t.positionAt(h)), a = Bp(r, l), i = h === r.length, r = r.substring(l, h), l !== 0) { + var m = t.offsetAt(_e.create(e.start.line, 0)); + s = jp(t.getText(), m, n); } a && (r = `{ -`.concat(qo(r))); +`.concat(Qo(r))); } else - e = te.create(Fe.create(0, 0), t.positionAt(r.length)); - var m = { + e = ie.create(_e.create(0, 0), t.positionAt(r.length)); + var f = { indent_size: o, indent_char: n.insertSpaces ? " " : " ", - end_with_newline: i && it(n, "insertFinalNewline", !1), - selector_separator_newline: it(n, "newlineBetweenSelectors", !0), - newline_between_rules: it(n, "newlineBetweenRules", !0), - space_around_selector_separator: it(n, "spaceAroundSelectorSeparator", !1), - brace_style: it(n, "braceStyle", "collapse"), - indent_empty_lines: it(n, "indentEmptyLines", !1), - max_preserve_newlines: it(n, "maxPreserveNewLines", void 0), - preserve_newlines: it(n, "preserveNewLines", !0), - wrap_line_length: it(n, "wrapLineLength", void 0), + end_with_newline: i && rt(n, "insertFinalNewline", !1), + selector_separator_newline: rt(n, "newlineBetweenSelectors", !0), + newline_between_rules: rt(n, "newlineBetweenRules", !0), + space_around_selector_separator: rt(n, "spaceAroundSelectorSeparator", !1), + brace_style: rt(n, "braceStyle", "collapse"), + indent_empty_lines: rt(n, "indentEmptyLines", !1), + max_preserve_newlines: rt(n, "maxPreserveNewLines", void 0), + preserve_newlines: rt(n, "preserveNewLines", !0), + wrap_line_length: rt(n, "wrapLineLength", void 0), eol: ` ` - }, g = Fp(r, m); - if (a && (g = qo(g.substring(2))), s > 0) { - var b = n.insertSpaces ? Na(" ", o * s) : Na(" ", s); + }, g = Wp(r, f); + if (a && (g = Qo(g.substring(2))), s > 0) { + var b = n.insertSpaces ? Ua(" ", o * s) : Ua(" ", s); g = g.split(` `).join(` ` + b), e.start.character === 0 && (g = b + g); @@ -16065,22 +16338,22 @@ function Rp(t, e, n) { newText: g }]; } -function qo(t) { +function Qo(t) { return t.replace(/^\s+/, ""); } -var Ep = "{".charCodeAt(0), Dp = "}".charCodeAt(0); -function Ap(t, e) { +var Up = "{".charCodeAt(0), Vp = "}".charCodeAt(0); +function Bp(t, e) { for (; e >= 0; ) { var n = t.charCodeAt(e); - if (n === Ep) + if (n === Up) return !0; - if (n === Dp) + if (n === Vp) return !1; e--; } return !1; } -function it(t, e, n) { +function rt(t, e, n) { if (t && t.hasOwnProperty(e)) { var r = t[e]; if (r !== null) @@ -16088,7 +16361,7 @@ function it(t, e, n) { } return n; } -function Mp(t, e, n) { +function jp(t, e, n) { for (var r = e, i = 0, s = n.tabSize || 4; r < t.length; ) { var a = t.charAt(r); if (a === " ") @@ -16101,14 +16374,14 @@ function Mp(t, e, n) { } return Math.floor(i / s); } -function $o(t, e) { +function Zo(t, e) { return `\r `.indexOf(t.charAt(e)) !== -1; } -function Ho(t, e) { +function el(t, e) { return " ".indexOf(t.charAt(e)) !== -1; } -var Np = { +var qp = { version: 1.1, properties: [ { @@ -38087,7 +38360,7 @@ In order to let ::-webkit-progress-value take effect, -webkit-appearance needs t description: "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled." } ] -}, Hl = function() { +}, Yl = function() { function t(e) { this._properties = [], this._atDirectives = [], this._pseudoClasses = [], this._pseudoElements = [], this.addData(e); } @@ -38103,44 +38376,44 @@ In order to let ::-webkit-progress-value take effect, -webkit-appearance needs t if (Array.isArray(e.properties)) for (var n = 0, r = e.properties; n < r.length; n++) { var i = r[n]; - zp(i) && this._properties.push(i); + $p(i) && this._properties.push(i); } if (Array.isArray(e.atDirectives)) for (var s = 0, a = e.atDirectives; s < a.length; s++) { var i = a[s]; - Pp(i) && this._atDirectives.push(i); + Hp(i) && this._atDirectives.push(i); } if (Array.isArray(e.pseudoClasses)) for (var o = 0, l = e.pseudoClasses; o < l.length; o++) { var i = l[o]; - Ip(i) && this._pseudoClasses.push(i); + Gp(i) && this._pseudoClasses.push(i); } if (Array.isArray(e.pseudoElements)) for (var c = 0, h = e.pseudoElements; c < h.length; c++) { var i = h[c]; - Lp(i) && this._pseudoElements.push(i); + Jp(i) && this._pseudoElements.push(i); } }, t; }(); -function zp(t) { +function $p(t) { return typeof t.name == "string"; } -function Pp(t) { +function Hp(t) { return typeof t.name == "string"; } -function Ip(t) { +function Gp(t) { return typeof t.name == "string"; } -function Lp(t) { +function Jp(t) { return typeof t.name == "string"; } -var Hi = function() { +var ts = function() { function t(e) { this.dataProviders = [], this._propertySet = {}, this._atDirectiveSet = {}, this._pseudoClassSet = {}, this._pseudoElementSet = {}, this._properties = [], this._atDirectives = [], this._pseudoClasses = [], this._pseudoElements = [], this.setDataProviders((e == null ? void 0 : e.useDefaultDataProvider) !== !1, (e == null ? void 0 : e.customDataProviders) || []); } return t.prototype.setDataProviders = function(e, n) { var r; - this.dataProviders = [], e && this.dataProviders.push(new Hl(Np)), (r = this.dataProviders).push.apply(r, n), this.collectData(); + this.dataProviders = [], e && this.dataProviders.push(new Yl(qp)), (r = this.dataProviders).push.apply(r, n), this.collectData(); }, t.prototype.collectData = function() { var e = this; this._propertySet = {}, this._atDirectiveSet = {}, this._pseudoClassSet = {}, this._pseudoElementSet = {}, this.dataProviders.forEach(function(n) { @@ -38153,7 +38426,7 @@ var Hi = function() { }), n.providePseudoElements().forEach(function(r) { e._pseudoElementSet[r.name] || (e._pseudoElementSet[r.name] = r); }); - }), this._properties = In(this._propertySet), this._atDirectives = In(this._atDirectiveSet), this._pseudoClasses = In(this._pseudoClassSet), this._pseudoElements = In(this._pseudoElementSet); + }), this._properties = Bn(this._propertySet), this._atDirectives = Bn(this._atDirectiveSet), this._pseudoClasses = Bn(this._pseudoClassSet), this._pseudoElements = Bn(this._pseudoElementSet); }, t.prototype.getProperty = function(e) { return this._propertySet[e]; }, t.prototype.getAtDirective = function(e) { @@ -38176,11 +38449,11 @@ var Hi = function() { return this.isKnownProperty(e) && (!this._propertySet[e.toLowerCase()].status || this._propertySet[e.toLowerCase()].status === "standard"); }, t; }(); -function Tp(t, e, n) { +function Xp(t, e, n) { function r(s) { for (var a = i(s), o = void 0, l = a.length - 1; l >= 0; l--) - o = sr.create(te.create(t.positionAt(a[l][0]), t.positionAt(a[l][1])), o); - return o || (o = sr.create(te.create(s, s))), o; + o = dr.create(ie.create(t.positionAt(a[l][0]), t.positionAt(a[l][1])), o); + return o || (o = dr.create(ie.create(s, s))), o; } return e.map(r); function i(s) { @@ -38197,7 +38470,7 @@ function Tp(t, e, n) { return l; } } -var Wp = function() { +var Yp = function() { var t = function(e, n) { return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, i) { r.__proto__ = i; @@ -38215,7 +38488,7 @@ var Wp = function() { } e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r()); }; -}(), Op = function(t, e, n, r) { +}(), Kp = function(t, e, n, r) { function i(s) { return s instanceof n ? s : new n(function(a) { a(s); @@ -38241,7 +38514,7 @@ var Wp = function() { } c((r = r.apply(t, e || [])).next()); }); -}, Up = function(t, e) { +}, Qp = function(t, e) { var n = { label: 0, sent: function() { if (s[0] & 1) throw s[1]; @@ -38305,15 +38578,15 @@ var Wp = function() { throw c[1]; return { value: c[0] ? c[1] : void 0, done: !0 }; } -}, Vp = function(t) { - Wp(e, t); +}, Zp = function(t) { + Yp(e, t); function e(n) { return t.call(this, n, !0) || this; } return e.prototype.isRawStringDocumentLinkNode = function(n) { return t.prototype.isRawStringDocumentLinkNode.call(this, n) || n.type === v.Use || n.type === v.Forward; }, e.prototype.resolveRelativeReference = function(n, r, i, s) { - return Op(this, void 0, void 0, function() { + return Kp(this, void 0, void 0, function() { function a(u) { if (u.path !== "" && !(u.path.endsWith(".scss") || u.path.endsWith(".css"))) { if (u.path.endsWith("/")) @@ -38321,24 +38594,24 @@ var Wp = function() { u.with({ path: u.path + "index.scss" }).toString(), u.with({ path: u.path + "_index.scss" }).toString() ]; - var f = u.path.split("/"), m = f[f.length - 1], g = u.path.slice(0, -m.length); - if (m.startsWith("_")) + var m = u.path.split("/"), f = m[m.length - 1], g = u.path.slice(0, -f.length); + if (f.startsWith("_")) return u.path.endsWith(".scss") ? void 0 : [u.with({ path: u.path + ".scss" }).toString()]; - var b = m + ".scss", y = function(j) { - return u.with({ path: g + j }).toString(); - }, w = y(b), x = y("_" + b), k = y(b.slice(0, -5) + "/index.scss"), F = y(b.slice(0, -5) + "/_index.scss"), N = y(b.slice(0, -5) + ".css"); - return [w, x, k, F, N]; + var b = f + ".scss", y = function(T) { + return u.with({ path: g + T }).toString(); + }, x = y(b), S = y("_" + b), w = y(b.slice(0, -5) + "/index.scss"), E = y(b.slice(0, -5) + "/_index.scss"), R = y(b.slice(0, -5) + ".css"); + return [x, S, w, E, R]; } } var o, l, c, h; - return Up(this, function(u) { + return Qp(this, function(u) { switch (u.label) { case 0: return fe(n, "sass:") ? [2, void 0] : [4, t.prototype.resolveRelativeReference.call(this, n, r, i, s)]; case 1: if (o = u.sent(), !(this.fileSystemProvider && o && s)) return [3, 8]; - l = Oi.parse(o), u.label = 2; + l = Ji.parse(o), u.label = 2; case 2: if (u.trys.push([2, 7, , 8]), c = a(l), !c) return [3, 6]; @@ -38361,11 +38634,11 @@ var Wp = function() { }); }); }, e; -}(ji); -function Bp(t) { - return new Hl(t); +}(Qi); +function ef(t) { + return new Yl(t); } -function Gi(t, e, n, r, i, s, a) { +function ns(t, e, n, r, i, s, a) { return { configure: function(o) { s.configure(o), e.configure(o == null ? void 0 : o.completion), n.configure(o == null ? void 0 : o.hover); @@ -38377,7 +38650,7 @@ function Gi(t, e, n, r, i, s, a) { doComplete2: e.doComplete2.bind(e), setCompletionParticipants: e.setCompletionParticipants.bind(e), doHover: n.doHover.bind(n), - format: Rp, + format: Op, findDefinition: r.findDefinition.bind(r), findReferences: r.findReferences.bind(r), findDocumentHighlights: r.findDocumentHighlights.bind(r), @@ -38389,50 +38662,50 @@ function Gi(t, e, n, r, i, s, a) { findDocumentColors: r.findDocumentColors.bind(r), getColorPresentations: r.getColorPresentations.bind(r), doRename: r.doRename.bind(r), - getFoldingRanges: Cp, - getSelectionRanges: Tp + getFoldingRanges: Lp, + getSelectionRanges: Xp }; } -var Ji = {}; -function jp(t) { - t === void 0 && (t = Ji); - var e = new Hi(t); - return Gi(new Wi(), new Ui(null, t, e), new Bi(t && t.clientCapabilities, e), new ji(t && t.fileSystemProvider, !1), new qi(e), new $i(e), e); +var rs = {}; +function tf(t) { + t === void 0 && (t = rs); + var e = new ts(t); + return ns(new Gi(), new Xi(null, t, e), new Ki(t && t.clientCapabilities, e), new Qi(t && t.fileSystemProvider, !1), new Zi(e), new es(e), e); } -function qp(t) { - t === void 0 && (t = Ji); - var e = new Hi(t); - return Gi(new dp(), new pp(t, e), new Bi(t && t.clientCapabilities, e), new Vp(t && t.fileSystemProvider), new qi(e), new $i(e), e); +function nf(t) { + t === void 0 && (t = rs); + var e = new ts(t); + return ns(new Cp(), new _p(t, e), new Ki(t && t.clientCapabilities, e), new Zp(t && t.fileSystemProvider), new Zi(e), new es(e), e); } -function $p(t) { - t === void 0 && (t = Ji); - var e = new Hi(t); - return Gi(new wp(), new Sp(t, e), new Bi(t && t.clientCapabilities, e), new ji(t && t.fileSystemProvider, !0), new qi(e), new $i(e), e); +function rf(t) { + t === void 0 && (t = rs); + var e = new ts(t); + return ns(new Mp(), new Pp(t, e), new Ki(t && t.clientCapabilities, e), new Qi(t && t.fileSystemProvider, !0), new Zi(e), new es(e), e); } -var Hp = class { +var sf = class { constructor(t, e) { - Yt(this, "_ctx"); - Yt(this, "_languageService"); - Yt(this, "_languageSettings"); - Yt(this, "_languageId"); + Qt(this, "_ctx"); + Qt(this, "_languageService"); + Qt(this, "_languageSettings"); + Qt(this, "_languageId"); this._ctx = t, this._languageSettings = e.options, this._languageId = e.languageId; const n = e.options.data, r = n == null ? void 0 : n.useDefaultDataProvider, i = []; if (n != null && n.dataProviders) for (const a in n.dataProviders) - i.push(Bp(n.dataProviders[a])); + i.push(ef(n.dataProviders[a])); const s = { customDataProviders: i, useDefaultDataProvider: r }; switch (this._languageId) { case "css": - this._languageService = jp(s); + this._languageService = tf(s); break; case "less": - this._languageService = $p(s); + this._languageService = rf(s); break; case "scss": - this._languageService = qp(s); + this._languageService = nf(s); break; default: throw new Error("Invalid language id: " + this._languageId); @@ -38542,10 +38815,10 @@ var Hp = class { const e = this._ctx.getMirrorModels(); for (const n of e) if (n.uri.toString() === t) - return ui.create(t, this._languageId, n.version, n.getValue()); + return wi.create(t, this._languageId, n.version, n.getValue()); return null; } }; self.onmessage = () => { - ml((t, e) => new Hp(t, e)); + yl((t, e) => new sf(t, e)); }; diff --git a/frontend/static/workers/cssWorker-iife.js b/frontend/static/workers/cssWorker-iife.js index 4546052818..deb7af0cda 100644 --- a/frontend/static/workers/cssWorker-iife.js +++ b/frontend/static/workers/cssWorker-iife.js @@ -1,50 +1,53 @@ -var qp=Object.defineProperty;var $p=(St,tt,ct)=>tt in St?qp(St,tt,{enumerable:!0,configurable:!0,writable:!0,value:ct}):St[tt]=ct;var An=(St,tt,ct)=>($p(St,typeof tt!="symbol"?tt+"":tt,ct),ct);(function(){"use strict";class St{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?zt.isErrorNoTelemetry(e)?new zt(e.message+` +var nf=Object.defineProperty;var rf=(St,et,ct)=>et in St?nf(St,et,{enumerable:!0,configurable:!0,writable:!0,value:ct}):St[et]=ct;var In=(St,et,ct)=>(rf(St,typeof et!="symbol"?et+"":et,ct),ct);(function(){"use strict";class St{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?zt.isErrorNoTelemetry(e)?new zt(e.message+` `+e.stack):new Error(e.message+` -`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(n=>{n(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const tt=new St;function ct(t){Xl(t)||tt.onUnexpectedError(t)}function Qi(t){if(t instanceof Error){const{name:e,message:n}=t,r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r,noTelemetry:zt.isErrorNoTelemetry(t)}}return t}const vr="Canceled";function Xl(t){return t instanceof Yl?!0:t instanceof Error&&t.name===vr&&t.message===vr}class Yl extends Error{constructor(){super(vr),this.name=this.message}}class zt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof zt)return e;const n=new zt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class Ct extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ct.prototype);debugger}}function Kl(t){const e=this;let n=!1,r;return function(){return n||(n=!0,r=t.apply(e,arguments)),r}}var Mn;(function(t){function e(x){return x&&typeof x=="object"&&typeof x[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(x){yield x}t.single=i;function s(x){return e(x)?x:i(x)}t.wrap=s;function a(x){return x||n}t.from=a;function o(x){return!x||x[Symbol.iterator]().next().done===!0}t.isEmpty=o;function l(x){return x[Symbol.iterator]().next().value}t.first=l;function c(x,w){for(const k of x)if(w(k))return!0;return!1}t.some=c;function h(x,w){for(const k of x)if(w(k))return k}t.find=h;function*u(x,w){for(const k of x)w(k)&&(yield k)}t.filter=u;function*f(x,w){let k=0;for(const R of x)yield w(R,k++)}t.map=f;function*m(...x){for(const w of x)for(const k of w)yield k}t.concat=m;function g(x,w,k){let R=k;for(const z of x)R=w(R,z);return R}t.reduce=g;function*b(x,w,k=x.length){for(w<0&&(w+=x.length),k<0?k+=x.length:k>x.length&&(k=x.length);w1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Ql(...t){return Nn(()=>Zi(t))}function Nn(t){return{dispose:Kl(()=>{t()})}}class kt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Zi(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?kt.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):this._toDispose.add(e),e}}kt.DISABLE_DISPOSED_WARNING=!1;class zn{constructor(){this._store=new kt,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}zn.None=Object.freeze({dispose(){}});class Zl{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let n=e;return this.unset=()=>n=void 0,this.isset=()=>n!==void 0,this.dispose=()=>{n&&(n(),n=void 0)},this}}let se=class Ki{constructor(e){this.element=e,this.next=Ki.Undefined,this.prev=Ki.Undefined}};se.Undefined=new se(void 0);class Pn{constructor(){this._first=se.Undefined,this._last=se.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===se.Undefined}clear(){let e=this._first;for(;e!==se.Undefined;){const n=e.next;e.prev=se.Undefined,e.next=se.Undefined,e=n}this._first=se.Undefined,this._last=se.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new se(e);if(this._first===se.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==se.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==se.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==se.Undefined&&e.next!==se.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===se.Undefined&&e.next===se.Undefined?(this._first=se.Undefined,this._last=se.Undefined):e.next===se.Undefined?(this._last=this._last.prev,this._last.next=se.Undefined):e.prev===se.Undefined&&(this._first=this._first.next,this._first.prev=se.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==se.Undefined;)yield e.element,e=e.next}}globalThis&&globalThis.__awaiter;let ec=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function tc(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),ec&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function nc(t,e,...n){return tc(e,n)}function Jp(t){}var yr;const Pt="en";let wr=!1,xr=!1,Sr=!1,es=!1,In,Ln=Pt,ts=Pt,rc,je;const Re=typeof self=="object"?self:typeof global=="object"?global:{};let we;typeof Re.vscode<"u"&&typeof Re.vscode.process<"u"?we=Re.vscode.process:typeof process<"u"&&(we=process);const ic=typeof((yr=we==null?void 0:we.versions)===null||yr===void 0?void 0:yr.electron)=="string"&&(we==null?void 0:we.type)==="renderer";if(typeof navigator=="object"&&!ic)je=navigator.userAgent,wr=je.indexOf("Windows")>=0,xr=je.indexOf("Macintosh")>=0,(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Sr=je.indexOf("Linux")>=0,(je==null?void 0:je.indexOf("Mobi"))>=0,es=!0,nc({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),In=Pt,Ln=In,ts=navigator.language;else if(typeof we=="object"){wr=we.platform==="win32",xr=we.platform==="darwin",Sr=we.platform==="linux",Sr&&we.env.SNAP&&we.env.SNAP_REVISION,we.env.CI||we.env.BUILD_ARTIFACTSTAGINGDIRECTORY,In=Pt,Ln=Pt;const t=we.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t),n=e.availableLanguages["*"];In=e.locale,ts=e.osLocale,Ln=n||Pt,rc=e._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const Zt=wr,sc=xr;es&&Re.importScripts;const Xe=je,ht=Ln;var ns;(function(t){function e(){return ht}t.value=e;function n(){return ht.length===2?ht==="en":ht.length>=3?ht[0]==="e"&&ht[1]==="n"&&ht[2]==="-":!1}t.isDefaultVariant=n;function r(){return ht==="en"}t.isDefault=r})(ns||(ns={}));const ac=typeof Re.postMessage=="function"&&!Re.importScripts;(()=>{if(ac){const t=[];Re.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{const r=++e;t.push({id:r,callback:n}),Re.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();const oc=!!(Xe&&Xe.indexOf("Chrome")>=0);Xe&&Xe.indexOf("Firefox")>=0,!oc&&Xe&&Xe.indexOf("Safari")>=0,Xe&&Xe.indexOf("Edg/")>=0,Xe&&Xe.indexOf("Android")>=0;const lc=Re.performance&&typeof Re.performance.now=="function";class Tn{static create(e=!0){return new Tn(e)}constructor(e){this._highResolution=lc&&e,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Re.performance.now():Date.now()}}globalThis&&globalThis.__awaiter;var Cr;(function(t){t.None=()=>zn.None;function e(P,N){return h(P,()=>{},0,void 0,!0,void 0,N)}t.defer=e;function n(P){return(N,A=null,F)=>{let L=!1,V;return V=P(K=>{if(!L)return V?V.dispose():L=!0,N.call(A,K)},null,F),L&&V.dispose(),V}}t.once=n;function r(P,N,A){return c((F,L=null,V)=>P(K=>F.call(L,N(K)),null,V),A)}t.map=r;function i(P,N,A){return c((F,L=null,V)=>P(K=>{N(K),F.call(L,K)},null,V),A)}t.forEach=i;function s(P,N,A){return c((F,L=null,V)=>P(K=>N(K)&&F.call(L,K),null,V),A)}t.filter=s;function a(P){return P}t.signal=a;function o(...P){return(N,A=null,F)=>Ql(...P.map(L=>L(V=>N.call(A,V),null,F)))}t.any=o;function l(P,N,A,F){let L=A;return r(P,V=>(L=N(L,V),L),F)}t.reduce=l;function c(P,N){let A;const F={onWillAddFirstListener(){A=P(L.fire,L)},onDidRemoveLastListener(){A==null||A.dispose()}},L=new Ye(F);return N==null||N.add(L),L.event}function h(P,N,A=100,F=!1,L=!1,V,K){let ie,E,C,D=0,I;const J={leakWarningThreshold:V,onWillAddFirstListener(){ie=P(ee=>{D++,E=N(E,ee),F&&!C&&(H.fire(E),E=void 0),I=()=>{const Be=E;E=void 0,C=void 0,(!F||D>1)&&H.fire(Be),D=0},typeof A=="number"?(clearTimeout(C),C=setTimeout(I,A)):C===void 0&&(C=0,queueMicrotask(I))})},onWillRemoveListener(){L&&D>0&&(I==null||I())},onDidRemoveLastListener(){I=void 0,ie.dispose()}},H=new Ye(J);return K==null||K.add(H),H.event}t.debounce=h;function u(P,N=0,A){return t.debounce(P,(F,L)=>F?(F.push(L),F):[L],N,void 0,!0,void 0,A)}t.accumulate=u;function f(P,N=(F,L)=>F===L,A){let F=!0,L;return s(P,V=>{const K=F||!N(V,L);return F=!1,L=V,K},A)}t.latch=f;function m(P,N,A){return[t.filter(P,N,A),t.filter(P,F=>!N(F),A)]}t.split=m;function g(P,N=!1,A=[]){let F=A.slice(),L=P(ie=>{F?F.push(ie):K.fire(ie)});const V=()=>{F==null||F.forEach(ie=>K.fire(ie)),F=null},K=new Ye({onWillAddFirstListener(){L||(L=P(ie=>K.fire(ie)))},onDidAddFirstListener(){F&&(N?setTimeout(V):V())},onDidRemoveLastListener(){L&&L.dispose(),L=null}});return K.event}t.buffer=g;class b{constructor(N){this.event=N,this.disposables=new kt}map(N){return new b(r(this.event,N,this.disposables))}forEach(N){return new b(i(this.event,N,this.disposables))}filter(N){return new b(s(this.event,N,this.disposables))}reduce(N,A){return new b(l(this.event,N,A,this.disposables))}latch(){return new b(f(this.event,void 0,this.disposables))}debounce(N,A=100,F=!1,L=!1,V){return new b(h(this.event,N,A,F,L,V,this.disposables))}on(N,A,F){return this.event(N,A,F)}once(N,A,F){return n(this.event)(N,A,F)}dispose(){this.disposables.dispose()}}function y(P){return new b(P)}t.chain=y;function x(P,N,A=F=>F){const F=(...ie)=>K.fire(A(...ie)),L=()=>P.on(N,F),V=()=>P.removeListener(N,F),K=new Ye({onWillAddFirstListener:L,onDidRemoveLastListener:V});return K.event}t.fromNodeEventEmitter=x;function w(P,N,A=F=>F){const F=(...ie)=>K.fire(A(...ie)),L=()=>P.addEventListener(N,F),V=()=>P.removeEventListener(N,F),K=new Ye({onWillAddFirstListener:L,onDidRemoveLastListener:V});return K.event}t.fromDOMEventEmitter=w;function k(P){return new Promise(N=>n(P)(N))}t.toPromise=k;function R(P,N){return N(void 0),P(A=>N(A))}t.runAndSubscribe=R;function z(P,N){let A=null;function F(V){A==null||A.dispose(),A=new kt,N(V,A)}F(void 0);const L=P(V=>F(V));return Nn(()=>{L.dispose(),A==null||A.dispose()})}t.runAndSubscribeWithStore=z;class ${constructor(N,A){this._observable=N,this._counter=0,this._hasChanged=!1;const F={onWillAddFirstListener:()=>{N.addObserver(this)},onDidRemoveLastListener:()=>{N.removeObserver(this)}};this.emitter=new Ye(F),A&&A.add(this.emitter)}beginUpdate(N){this._counter++}handlePossibleChange(N){}handleChange(N,A){this._hasChanged=!0}endUpdate(N){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function X(P,N){return new $(P,N).emitter.event}t.fromObservable=X;function B(P){return N=>{let A=0,F=!1;const L={beginUpdate(){A++},endUpdate(){A--,A===0&&(P.reportChanges(),F&&(F=!1,N()))},handlePossibleChange(){},handleChange(){F=!0}};return P.addObserver(L),{dispose(){P.removeObserver(L)}}}}t.fromObservableLight=B})(Cr||(Cr={}));class It{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${It._idPool++}`,It.all.add(this)}start(e){this._stopWatch=new Tn(!0),this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}It.all=new Set,It._idPool=0;let cc=-1;class hc{constructor(e,n=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}}class kr{static create(){var e;return new kr((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const et=new St;function ct(t){Zl(t)||et.onUnexpectedError(t)}function os(t){if(t instanceof Error){const{name:e,message:n}=t,r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r,noTelemetry:zt.isErrorNoTelemetry(t)}}return t}const Cr="Canceled";function Zl(t){return t instanceof ec?!0:t instanceof Error&&t.name===Cr&&t.message===Cr}class ec extends Error{constructor(){super(Cr),this.name=this.message}}class zt extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof zt)return e;const n=new zt;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class tt extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,tt.prototype)}}function tc(t){const e=this;let n=!1,r;return function(){return n||(n=!0,r=t.apply(e,arguments)),r}}var Tn;(function(t){function e(x){return x&&typeof x=="object"&&typeof x[Symbol.iterator]=="function"}t.is=e;const n=Object.freeze([]);function r(){return n}t.empty=r;function*i(x){yield x}t.single=i;function s(x){return e(x)?x:i(x)}t.wrap=s;function a(x){return x||n}t.from=a;function o(x){return!x||x[Symbol.iterator]().next().done===!0}t.isEmpty=o;function l(x){return x[Symbol.iterator]().next().value}t.first=l;function c(x,S){for(const w of x)if(S(w))return!0;return!1}t.some=c;function h(x,S){for(const w of x)if(S(w))return w}t.find=h;function*u(x,S){for(const w of x)S(w)&&(yield w)}t.filter=u;function*f(x,S){let w=0;for(const E of x)yield S(E,w++)}t.map=f;function*m(...x){for(const S of x)for(const w of S)yield w}t.concat=m;function g(x,S,w){let E=w;for(const R of x)E=S(E,R);return E}t.reduce=g;function*b(x,S,w=x.length){for(S<0&&(S+=x.length),w<0?w+=x.length:w>x.length&&(w=x.length);S1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function nc(...t){return tn(()=>ls(t))}function tn(t){return{dispose:tc(()=>{t()})}}class Ct{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{ls(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ct.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):this._toDispose.add(e),e}}Ct.DISABLE_DISPOSED_WARNING=!1;class nn{constructor(){this._store=new Ct,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}nn.None=Object.freeze({dispose(){}});let le=class as{constructor(e){this.element=e,this.next=as.Undefined,this.prev=as.Undefined}};le.Undefined=new le(void 0);class rc{constructor(){this._first=le.Undefined,this._last=le.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===le.Undefined}clear(){let e=this._first;for(;e!==le.Undefined;){const n=e.next;e.prev=le.Undefined,e.next=le.Undefined,e=n}this._first=le.Undefined,this._last=le.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new le(e);if(this._first===le.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==le.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==le.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==le.Undefined&&e.next!==le.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===le.Undefined&&e.next===le.Undefined?(this._first=le.Undefined,this._last=le.Undefined):e.next===le.Undefined?(this._last=this._last.prev,this._last.next=le.Undefined):e.prev===le.Undefined&&(this._first=this._first.next,this._first.prev=le.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==le.Undefined;)yield e.element,e=e.next}}const ic=globalThis.performance&&typeof globalThis.performance.now=="function";class Wn{static create(e){return new Wn(e)}constructor(e){this._now=ic&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var kr;(function(t){t.None=()=>nn.None;function e(z,F){return h(z,()=>{},0,void 0,!0,void 0,F)}t.defer=e;function n(z){return(F,D=null,I)=>{let W=!1,J;return J=z(Y=>{if(!W)return J?J.dispose():W=!0,F.call(D,Y)},null,I),W&&J.dispose(),J}}t.once=n;function r(z,F,D){return c((I,W=null,J)=>z(Y=>I.call(W,F(Y)),null,J),D)}t.map=r;function i(z,F,D){return c((I,W=null,J)=>z(Y=>{F(Y),I.call(W,Y)},null,J),D)}t.forEach=i;function s(z,F,D){return c((I,W=null,J)=>z(Y=>F(Y)&&I.call(W,Y),null,J),D)}t.filter=s;function a(z){return z}t.signal=a;function o(...z){return(F,D=null,I)=>nc(...z.map(W=>W(J=>F.call(D,J),null,I)))}t.any=o;function l(z,F,D,I){let W=D;return r(z,J=>(W=F(W,J),W),I)}t.reduce=l;function c(z,F){let D;const I={onWillAddFirstListener(){D=z(W.fire,W)},onDidRemoveLastListener(){D==null||D.dispose()}},W=new Be(I);return F==null||F.add(W),W.event}function h(z,F,D=100,I=!1,W=!1,J,Y){let A,k,N,P=0,G;const K={leakWarningThreshold:J,onWillAddFirstListener(){A=z(Ue=>{P++,k=F(k,Ue),I&&!N&&(ee.fire(k),k=void 0),G=()=>{const we=k;k=void 0,N=void 0,(!I||P>1)&&ee.fire(we),P=0},typeof D=="number"?(clearTimeout(N),N=setTimeout(G,D)):N===void 0&&(N=0,queueMicrotask(G))})},onWillRemoveListener(){W&&P>0&&(G==null||G())},onDidRemoveLastListener(){G=void 0,A.dispose()}},ee=new Be(K);return Y==null||Y.add(ee),ee.event}t.debounce=h;function u(z,F=0,D){return t.debounce(z,(I,W)=>I?(I.push(W),I):[W],F,void 0,!0,void 0,D)}t.accumulate=u;function f(z,F=(I,W)=>I===W,D){let I=!0,W;return s(z,J=>{const Y=I||!F(J,W);return I=!1,W=J,Y},D)}t.latch=f;function m(z,F,D){return[t.filter(z,F,D),t.filter(z,I=>!F(I),D)]}t.split=m;function g(z,F=!1,D=[]){let I=D.slice(),W=z(A=>{I?I.push(A):Y.fire(A)});const J=()=>{I==null||I.forEach(A=>Y.fire(A)),I=null},Y=new Be({onWillAddFirstListener(){W||(W=z(A=>Y.fire(A)))},onDidAddFirstListener(){I&&(F?setTimeout(J):J())},onDidRemoveLastListener(){W&&W.dispose(),W=null}});return Y.event}t.buffer=g;class b{constructor(F){this.event=F,this.disposables=new Ct}map(F){return new b(r(this.event,F,this.disposables))}forEach(F){return new b(i(this.event,F,this.disposables))}filter(F){return new b(s(this.event,F,this.disposables))}reduce(F,D){return new b(l(this.event,F,D,this.disposables))}latch(){return new b(f(this.event,void 0,this.disposables))}debounce(F,D=100,I=!1,W=!1,J){return new b(h(this.event,F,D,I,W,J,this.disposables))}on(F,D,I){return this.event(F,D,I)}once(F,D,I){return n(this.event)(F,D,I)}dispose(){this.disposables.dispose()}}function y(z){return new b(z)}t.chain=y;function x(z,F,D=I=>I){const I=(...A)=>Y.fire(D(...A)),W=()=>z.on(F,I),J=()=>z.removeListener(F,I),Y=new Be({onWillAddFirstListener:W,onDidRemoveLastListener:J});return Y.event}t.fromNodeEventEmitter=x;function S(z,F,D=I=>I){const I=(...A)=>Y.fire(D(...A)),W=()=>z.addEventListener(F,I),J=()=>z.removeEventListener(F,I),Y=new Be({onWillAddFirstListener:W,onDidRemoveLastListener:J});return Y.event}t.fromDOMEventEmitter=S;function w(z){return new Promise(F=>n(z)(F))}t.toPromise=w;function E(z){const F=new Be;return z.then(D=>{F.fire(D)},()=>{F.fire(void 0)}).finally(()=>{F.dispose()}),F.event}t.fromPromise=E;function R(z,F){return F(void 0),z(D=>F(D))}t.runAndSubscribe=R;function T(z,F){let D=null;function I(J){D==null||D.dispose(),D=new Ct,F(J,D)}I(void 0);const W=z(J=>I(J));return tn(()=>{W.dispose(),D==null||D.dispose()})}t.runAndSubscribeWithStore=T;class O{constructor(F,D){this._observable=F,this._counter=0,this._hasChanged=!1;const I={onWillAddFirstListener:()=>{F.addObserver(this)},onDidRemoveLastListener:()=>{F.removeObserver(this)}};this.emitter=new Be(I),D&&D.add(this.emitter)}beginUpdate(F){this._counter++}handlePossibleChange(F){}handleChange(F,D){this._hasChanged=!0}endUpdate(F){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function L(z,F){return new O(z,F).emitter.event}t.fromObservable=L;function q(z){return F=>{let D=0,I=!1;const W={beginUpdate(){D++},endUpdate(){D--,D===0&&(z.reportChanges(),I&&(I=!1,F()))},handlePossibleChange(){},handleChange(){I=!0}};return z.addObserver(W),z.reportChanges(),{dispose(){z.removeObserver(W)}}}}t.fromObservableLight=q})(kr||(kr={}));class Pt{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Pt._idPool++}`,Pt.all.add(this)}start(e){this._stopWatch=new Wn,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}Pt.all=new Set,Pt._idPool=0;let sc=-1;class ac{constructor(e,n=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}}class _r{static create(){var e;return new _r((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` `).slice(2).join(` -`))}}class dc{constructor(e,n,r){this.callback=e,this.callbackThis=n,this.stack=r,this.subscription=new Zl}invoke(e){this.callback.call(this.callbackThis,e)}}class Ye{constructor(e){var n,r,i,s,a;this._disposed=!1,this._options=e,this._leakageMon=!((n=this._options)===null||n===void 0)&&n.leakWarningThreshold?new hc((i=(r=this._options)===null||r===void 0?void 0:r.leakWarningThreshold)!==null&&i!==void 0?i:cc):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new It(this._options._profName):void 0,this._deliveryQueue=(a=this._options)===null||a===void 0?void 0:a.deliveryQueue}dispose(){var e,n,r,i;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),(e=this._deliveryQueue)===null||e===void 0||e.clear(this),(r=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||r===void 0||r.call(n),(i=this._leakageMon)===null||i===void 0||i.dispose())}get event(){return this._event||(this._event=(e,n,r)=>{var i,s,a;if(this._listeners||(this._listeners=new Pn),this._leakageMon&&this._listeners.size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),zn.None;const o=this._listeners.isEmpty();o&&(!((i=this._options)===null||i===void 0)&&i.onWillAddFirstListener)&&this._options.onWillAddFirstListener(this);let l,c;this._leakageMon&&this._listeners.size>=Math.ceil(this._leakageMon.threshold*.2)&&(c=kr.create(),l=this._leakageMon.check(c,this._listeners.size+1));const h=new dc(e,n,c),u=this._listeners.push(h);o&&(!((s=this._options)===null||s===void 0)&&s.onDidAddFirstListener)&&this._options.onDidAddFirstListener(this),!((a=this._options)===null||a===void 0)&&a.onDidAddListener&&this._options.onDidAddListener(this,e,n);const f=h.subscription.set(()=>{var m,g;l==null||l(),this._disposed||((g=(m=this._options)===null||m===void 0?void 0:m.onWillRemoveListener)===null||g===void 0||g.call(m,this),u(),this._options&&this._options.onDidRemoveLastListener&&(this._listeners&&!this._listeners.isEmpty()||this._options.onDidRemoveLastListener(this)))});return r instanceof kt?r.add(f):Array.isArray(r)&&r.push(f),f}),this._event}fire(e){var n,r,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new pc((n=this._options)===null||n===void 0?void 0:n.onListenerError));for(const s of this._listeners)this._deliveryQueue.push(this,s,e);(r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),(i=this._perfMon)===null||i===void 0||i.stop()}}hasListeners(){return this._listeners?!this._listeners.isEmpty():!1}}class uc{constructor(e=ct){this._onListenerError=e,this._queue=new Pn}get size(){return this._queue.size}push(e,n,r){this._queue.push(new fc(e,n,r))}clear(e){const n=new Pn;for(const r of this._queue)r.emitter!==e&&n.push(r);this._queue=n}deliver(){for(;this._queue.size>0;){const e=this._queue.shift();try{e.listener.invoke(e.event)}catch(n){this._onListenerError(n)}}}}class pc extends uc{clear(e){this._queue.clear()}}class fc{constructor(e,n,r){this.emitter=e,this.listener=n,this.event=r}}function mc(t){return typeof t=="string"}function gc(t){let e=[],n=Object.getPrototypeOf(t);for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function _r(t){const e=[];for(const n of gc(t))typeof t[n]=="function"&&e.push(n);return e}function bc(t,e){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return e(i,s)},r={};for(const i of t)r[i]=n(i);return r}const rs=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var Wn;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof On?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Cr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:rs})})(Wn||(Wn={}));class On{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?rs:(this._emitter||(this._emitter=new Ye),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class vc{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new On),this._token}cancel(){this._token?this._token instanceof On&&this._token.cancel():this._token=Wn.Cancelled}dispose(e=!1){var n;e&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof On&&this._token.dispose():this._token=Wn.None}}class yc{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const n=JSON.stringify(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this.fn(e)),this.lastCache}}class is{constructor(e){this.executor=e,this._didRun=!1}get hasValue(){return this._didRun}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var ss;function wc(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function xc(t){return t.split(/\r\n|\r|\n/)}function Sc(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function as(t){return t>=65&&t<=90}function Fr(t){return 55296<=t&&t<=56319}function kc(t){return 56320<=t&&t<=57343}function _c(t,e){return(t-55296<<10)+(e-56320)+65536}function Fc(t,e,n){const r=t.charCodeAt(n);if(Fr(r)&&n+1JSON.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]}')),Ie.cache=new yc(t=>{function e(c){const h=new Map;for(let u=0;u!c.startsWith("_")&&c in i);s.length===0&&(s=["_default"]);let a;for(const c of s){const h=e(i[c]);a=r(a,h)}const o=e(i._common),l=n(o,a);return new Ie(l)}),Ie._locales=new is(()=>Object.keys(Ie.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")));class dt{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(){return this._data||(this._data=new Set(dt.getRawData())),this._data}static isInvisibleCharacter(e){return dt.getData().has(e)}static get codePoints(){return dt.getData()}}dt._data=void 0;const Dc="$initialize";class Ac{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.method=r,this.args=i,this.type=0}}class os{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}}class Mc{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.eventName=r,this.arg=i,this.type=2}}class Nc{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}}class zc{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Pc{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new Ac(this._workerId,r,e,n))})}listen(e,n){let r=null;const i=new Ye({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new Mc(this._workerId,r,e,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new zc(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;e.err.$isError&&(r=new Error,r.name=e.err.name,r.message=e.err.message,r.stack=e.err.stack),n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.method,e.args).then(i=>{this._send(new os(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Qi(i.detail)),this._send(new os(this._workerId,n,void 0,Qi(i)))})}_handleSubscribeEventMessage(e){const n=e.req,r=this._handler.handleEvent(e.eventName,e.arg)(i=>{this._send(new Nc(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let r=0;rfunction(){const o=Array.prototype.slice.call(arguments,0);return e(a,o)},i=a=>function(o){return n(a,o)},s={};for(const a of t){if(cs(a)){s[a]=i(a);continue}if(ls(a)){s[a]=n(a,void 0);continue}s[a]=r(a)}return s}class Lc{constructor(e,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new Pc({sendMessage:(r,i)=>{e(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n){if(e===Dc)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(cs(e)){const r=this._requestHandler[e].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${e} on request handler.`);return r}if(ls(e)){const r=this._requestHandler[e];if(typeof r!="function")throw new Error(`Missing event ${e} on request handler.`);return r}throw new Error(`Malformed event name ${e}`)}initialize(e,n,r,i){this._protocol.setWorkerId(e);const o=Ic(i,(l,c)=>this._protocol.sendMessage(l,c),(l,c)=>this._protocol.listen(l,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(_r(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((l,c)=>{const h=globalThis.require;h([r],u=>{if(this._requestHandler=u.create(o),!this._requestHandler){c(new Error("No RequestHandler!"));return}l(_r(this._requestHandler))},c)}))}}class ut{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function hs(t,e){return(e<<5)-e+t|0}function Tc(t,e){e=hs(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ut(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(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class pt{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=pt._getElements(e),[o,l,c]=pt._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(pt._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(Lt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new ut(e,0,r,i-r+1)]):e<=n?(Lt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new ut(e,n-e+1,r,0)]):(Lt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),Lt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],o=[0],l=this.ComputeRecursionPoint(e,n,r,i,a,o,s),c=a[0],h=o[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,r,h,s);let f=[];return s[0]?f=[new ut(c+1,n-(c+1)+1,h+1,i-(h+1)+1)]:f=this.ComputeDiffRecursive(c+1,n,h+1,i,s),this.ConcatenateChanges(u,f)}return[new ut(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,l,c,h,u,f,m,g,b,y,x,w){let k=null,R=null,z=new us,$=n,X=r,B=m[0]-y[0]-i,P=-1073741824,N=this.m_forwardHistory.length-1;do{const A=B+e;A===$||A=0&&(c=this.m_forwardHistory[N],e=c[0],$=1,X=c.length-1)}while(--N>=-1);if(k=z.getReverseChanges(),w[0]){let A=m[0]+1,F=y[0]+1;if(k!==null&&k.length>0){const L=k[k.length-1];A=Math.max(A,L.getOriginalEnd()),F=Math.max(F,L.getModifiedEnd())}R=[new ut(A,f-A+1,F,b-F+1)]}else{z=new us,$=a,X=o,B=m[0]-y[0]-l,P=1073741824,N=x?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const A=B+s;A===$||A=h[A+1]?(u=h[A+1]-1,g=u-B-l,u>P&&z.MarkNextChange(),P=u+1,z.AddOriginalElement(u+1,g+1),B=A+1-s):(u=h[A-1],g=u-B-l,u>P&&z.MarkNextChange(),P=u,z.AddModifiedElement(u+1,g+1),B=A-1-s),N>=0&&(h=this.m_reverseHistory[N],s=h[0],$=1,X=h.length-1)}while(--N>=-1);R=z.getChanges()}return this.ConcatenateChanges(k,R)}ComputeRecursionPoint(e,n,r,i,s,a,o){let l=0,c=0,h=0,u=0,f=0,m=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),b=g+1,y=new Int32Array(b),x=new Int32Array(b),w=i-r,k=n-e,R=e-r,z=n-i,X=(k-w)%2===0;y[w]=e,x[k]=n,o[0]=!1;for(let B=1;B<=g/2+1;B++){let P=0,N=0;h=this.ClipDiagonalBound(w-B,B,w,b),u=this.ClipDiagonalBound(w+B,B,w,b);for(let F=h;F<=u;F+=2){F===h||FP+N&&(P=l,N=c),!X&&Math.abs(F-k)<=B-1&&l>=x[F])return s[0]=l,a[0]=c,L<=x[F]&&1447>0&&B<=1447+1?this.WALKTRACE(w,h,u,R,k,f,m,z,y,x,l,n,s,c,i,a,X,o):null}const A=(P-e+(N-r)-B)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,A))return o[0]=!0,s[0]=P,a[0]=N,A>0&&1447>0&&B<=1447+1?this.WALKTRACE(w,h,u,R,k,f,m,z,y,x,l,n,s,c,i,a,X,o):(e++,r++,[new ut(e,n-e+1,r,i-r+1)]);f=this.ClipDiagonalBound(k-B,B,k,b),m=this.ClipDiagonalBound(k+B,B,k,b);for(let F=f;F<=m;F+=2){F===f||F=x[F+1]?l=x[F+1]-1:l=x[F-1],c=l-(F-k)-z;const L=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(x[F]=l,X&&Math.abs(F-w)<=B&&l<=y[F])return s[0]=l,a[0]=c,L>=y[F]&&1447>0&&B<=1447+1?this.WALKTRACE(w,h,u,R,k,f,m,z,y,x,l,n,s,c,i,a,X,o):null}if(B<=1447){let F=new Int32Array(u-h+2);F[0]=w-h+1,Tt.Copy2(y,h,F,1,u-h+1),this.m_forwardHistory.push(F),F=new Int32Array(m-f+2),F[0]=k-f+1,Tt.Copy2(x,f,F,1,m-f+1),this.m_reverseHistory.push(F)}}return this.WALKTRACE(w,h,u,R,k,f,m,z,y,x,l,n,s,c,i,a,X,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const f=r.originalStart-u,m=r.modifiedStart-u;if(fc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;const h=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],h)){e[n-1]=h[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&m>l&&(l=m,c=u,h=f)}return l>0?[c,h]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){const r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return Tt.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],Tt.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return Tt.Copy(e,0,i,0,e.length),Tt.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(Lt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Lt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new ut(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&e=Vc&&t<=jc||t>=Bc&&t<=qc}function Vn(t,e,n,r){let i="",s=0,a=-1,o=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),a=c,o=0;continue}else if(i.length!==0){i="",s=0,a=c,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,c)}`:i=t.slice(a+1,c),s=c-a-1;a=c,o=0}else l===ft&&o!==-1?++o:o=-1}return i}function fs(t,e){Hc(e,"pathObject");const n=e.dir||e.root,r=e.base||`${e.name||""}${e.ext||""}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const le={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],oe(s,"path"),s.length===0)continue}else e.length===0?s=Un():(s=Oc[`=${e}`]||Un(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Ee)&&(s=`${e}\\`));const a=s.length;let o=0,l="",c=!1;const h=s.charCodeAt(0);if(a===1)G(h)&&(o=1,c=!0);else if(G(h))if(c=!0,G(s.charCodeAt(1))){let u=2,f=u;for(;u2&&G(s.charCodeAt(2))&&(c=!0,o=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=c,c&&e.length>0)break}return n=Vn(n,!r,"\\",G),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){oe(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return Rr(s)?"\\":t;if(G(s))if(i=!0,G(t.charCodeAt(1))){let o=2,l=o;for(;o2&&G(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&G(t.charCodeAt(e-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){oe(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return G(n)||e>2&>(n)&&t.charCodeAt(1)===mt&&G(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&G(n.charCodeAt(0))){++i;const s=n.length;s>1&&G(n.charCodeAt(1))&&(++i,s>2&&(G(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return le.normalize(e)},relative(t,e){if(oe(t,"from"),oe(e,"to"),t===e)return"";const n=le.resolve(t),r=le.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";let i=0;for(;ii&&t.charCodeAt(s-1)===Ee;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(l-1)===Ee;)l--;const c=l-o,h=ah){if(e.charCodeAt(o+f)===Ee)return r.slice(o+f+1);if(f===2)return r.slice(o+f)}a>h&&(t.charCodeAt(i+f)===Ee?u=f:f===2&&(u=3)),u===-1&&(u=0)}let m="";for(f=i+u+1;f<=s;++f)(f===s||t.charCodeAt(f)===Ee)&&(m+=m.length===0?"..":"\\..");return o+=u,m.length>0?`${m}${r.slice(o,l)}`:(r.charCodeAt(o)===Ee&&++o,r.slice(o,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=le.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Ee){if(e.charCodeAt(1)===Ee){const n=e.charCodeAt(2);if(n!==$c&&n!==ft)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(gt(e.charCodeAt(0))&&e.charCodeAt(1)===mt&&e.charCodeAt(2)===Ee)return`\\\\?\\${e}`;return t},dirname(t){oe(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return G(i)?t:".";if(G(i)){if(n=r=1,G(t.charCodeAt(1))){let o=2,l=o;for(;o2&&G(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(G(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&oe(e,"ext"),oe(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&>(t.charCodeAt(0))&&t.charCodeAt(1)===mt&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const l=t.charCodeAt(s);if(G(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(G(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){oe(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===mt&>(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const l=t.charCodeAt(o);if(G(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===ft?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:fs.bind(null,"\\"),parse(t){oe(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return G(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(G(i)){if(r=1,G(t.charCodeAt(1))){let u=2,f=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,l=!0,c=t.length-1,h=0;for(;c>=r;--c){if(i=t.charCodeAt(c),G(i)){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),i===ft?s===-1?s=c:h!==1&&(h=1):s!==-1&&(h=-1)}return o!==-1&&(s===-1||h===0||h===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Gc=(()=>{if(De){const t=/\\/g;return()=>{const e=Un().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Un()})(),pe={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:Gc();oe(i,"path"),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===ye)}return e=Vn(e,!n,"/",Rr),n?`/${e}`:e.length>0?e:"."},normalize(t){if(oe(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ye,n=t.charCodeAt(t.length-1)===ye;return t=Vn(t,!e,"/",Rr),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return oe(t,"path"),t.length>0&&t.charCodeAt(0)===ye},join(...t){if(t.length===0)return".";let e;for(let n=0;n0&&(e===void 0?e=r:e+=`/${r}`)}return e===void 0?".":pe.normalize(e)},relative(t,e){if(oe(t,"from"),oe(e,"to"),t===e||(t=pe.resolve(t),e=pe.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+c)===ye)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>o&&(t.charCodeAt(n+c)===ye?l=c:c===0&&(l=0));let h="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===ye)&&(h+=h.length===0?"..":"/..");return`${h}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(oe(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ye;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===ye){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&oe(e,"ext"),oe(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const l=t.charCodeAt(s);if(l===ye){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ye){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){oe(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t.charCodeAt(a);if(o===ye){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o===ft?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:fs.bind(null,"/"),parse(t){oe(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===ye;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=t.length-1,c=0;for(;l>=r;--l){const h=t.charCodeAt(l);if(h===ye){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),h===ft?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const h=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(h,a):(e.name=t.slice(h,i),e.base=t.slice(h,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};pe.win32=le.win32=le,pe.posix=le.posix=pe,De?le.normalize:pe.normalize,De?le.isAbsolute:pe.isAbsolute,De?le.join:pe.join,De?le.resolve:pe.resolve,De?le.relative:pe.relative,De?le.dirname:pe.dirname,De?le.basename:pe.basename,De?le.extname:pe.extname,De?le.format:pe.format,De?le.parse:pe.parse,De?le.toNamespacedPath:pe.toNamespacedPath,De?le.sep:pe.sep,De?le.delimiter:pe.delimiter;const Jc=/^\w[\w\d+.-]*$/,Xc=/^\//,Yc=/^\/\//;function ms(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!Jc.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Xc.test(t.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(Yc.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Kc(t,e){return!t&&!e?"file":t}function Qc(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==qe&&(e=qe+e):e=qe;break}return e}const re="",qe="/",Zc=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Er=class br{static isUri(e){return e instanceof br?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||re,this.authority=e.authority||re,this.path=e.path||re,this.query=e.query||re,this.fragment=e.fragment||re):(this.scheme=Kc(e,a),this.authority=n||re,this.path=Qc(this.scheme,r||re),this.query=i||re,this.fragment=s||re,ms(this,a))}get fsPath(){return Dr(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=re),r===void 0?r=this.authority:r===null&&(r=re),i===void 0?i=this.path:i===null&&(i=re),s===void 0?s=this.query:s===null&&(s=re),a===void 0?a=this.fragment:a===null&&(a=re),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Wt(n,r,i,s,a)}static parse(e,n=!1){const r=Zc.exec(e);return r?new Wt(r[2]||re,Bn(r[4]||re),Bn(r[5]||re),Bn(r[7]||re),Bn(r[9]||re),n):new Wt(re,re,re,re,re)}static file(e){let n=re;if(Zt&&(e=e.replace(/\\/g,qe)),e[0]===qe&&e[1]===qe){const r=e.indexOf(qe,2);r===-1?(n=e.substring(2),e=qe):(n=e.substring(2,r),e=e.substring(r)||qe)}return new Wt("file",n,e,re,re)}static from(e){const n=new Wt(e.scheme,e.authority,e.path,e.query,e.fragment);return ms(n,!0),n}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Zt&&e.scheme==="file"?r=br.file(le.join(Dr(e,!0),...n)).path:r=pe.join(e.path,...n),e.with({path:r})}toString(e=!1){return Ar(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof br)return e;{const n=new Wt(e);return n._formatted=e.external,n._fsPath=e._sep===gs?e.fsPath:null,n}}else return e}};const gs=Zt?1:void 0;class Wt extends Er{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Dr(this,!1)),this._fsPath}toString(e=!1){return e?Ar(this,!0):(this._formatted||(this._formatted=Ar(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=gs),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const bs={[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"};function vs(t,e,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));const o=bs[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function eh(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,Zt&&(n=n.replace(/\//g,"\\")),n}function Ar(t,e){const n=e?eh:vs;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=qe,r+=qe),s){let c=s.indexOf("@");if(c!==-1){const h=s.substr(0,c);s=s.substr(c+1),c=h.lastIndexOf(":"),c===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,c),!1,!1),r+=":",r+=n(h.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:vs(l,!1,!1)),r}function ys(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+ys(t.substr(3)):t}}const ws=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Bn(t){return t.match(ws)?t.replace(ws,e=>ys(e)):t}let $e=class Nt{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new Nt(e,n)}delta(e=0,n=0){return this.with(this.lineNumber+e,this.column+n)}equals(e){return Nt.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return Nt.isBefore(this,e)}static isBefore(e,n){return e.lineNumberr||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ue.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return ue.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return ue.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return ue.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return ue.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new ue(r,i,s,a)}intersectRanges(e){return ue.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn;const o=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,h=n.endColumn;return rc?(s=c,a=h):s===c&&(a=Math.min(a,h)),r>s||r===s&&i>a?null:new ue(r,i,s,a)}equalsRange(e){return ue.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return ue.getEndPosition(this)}static getEndPosition(e){return new $e(e.endLineNumber,e.endColumn)}getStartPosition(){return ue.getStartPosition(this)}static getStartPosition(e){return new $e(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new ue(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new ue(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ue.collapseToStart(this)}static collapseToStart(e){return new ue(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return ue.collapseToEnd(this)}static collapseToEnd(e){return new ue(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new ue(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,n=e){return new ue(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new ue(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};globalThis&&globalThis.__awaiter;var xs;(function(t){function e(i){return i<0}t.isLessThan=e;function n(i){return i>0}t.isGreaterThan=n;function r(i){return i===0}t.isNeitherLessOrGreaterThan=r,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(xs||(xs={}));function Ss(t){return t<0?0:t>255?255:t|0}function Ot(t){return t<0?0:t>4294967295?4294967295:t|0}class th{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(e,n){e=Ot(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Ot(e),n=Ot(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Ot(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new nh(i,e-a)}}class nh{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class rh{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new $e(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function sh(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of ih)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const Cs=sh();function ah(t){let e=Cs;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const ks=new Pn;ks.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mr(t,e,n,r,i){if(i||(i=Mn.first(ks)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),Mr(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const h=a-i.windowSize*c;e.lastIndex=Math.max(0,h);const u=oh(e,n,a,o);if(!u&&l||(l=u,h<=0))break;o=h}if(l){const c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function oh(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class Nr{constructor(e){const n=Ss(e);this._defaultValue=n,this._asciiMap=Nr._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const r=Ss(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class lh{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=l),o>r&&(r=o),c>r&&(r=c)}n++,r++;const i=new lh(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let zr=null;function hh(){return zr===null&&(zr=new ch([[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]])),zr}let en=null;function dh(){if(en===null){en=new Nr(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=hh()){const r=dh(),i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),l=o.length;let c=0,h=0,u=0,f=1,m=!1,g=!1,b=!1,y=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}Pr.INSTANCE=new Pr;class Ir{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const qn=new Ir,Lr=new Ir,Tr=new Ir,ph=new Array(230),fh=Object.create(null),mh=Object.create(null);(function(){const t="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[1,1,"Hyper",0,t,0,t,t,t],[1,2,"Super",0,t,0,t,t,t],[1,3,"Fn",0,t,0,t,t,t],[1,4,"FnLock",0,t,0,t,t,t],[1,5,"Suspend",0,t,0,t,t,t],[1,6,"Resume",0,t,0,t,t,t],[1,7,"Turbo",0,t,0,t,t,t],[1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[1,9,"WakeUp",0,t,0,t,t,t],[0,10,"KeyA",31,"A",65,"VK_A",t,t],[0,11,"KeyB",32,"B",66,"VK_B",t,t],[0,12,"KeyC",33,"C",67,"VK_C",t,t],[0,13,"KeyD",34,"D",68,"VK_D",t,t],[0,14,"KeyE",35,"E",69,"VK_E",t,t],[0,15,"KeyF",36,"F",70,"VK_F",t,t],[0,16,"KeyG",37,"G",71,"VK_G",t,t],[0,17,"KeyH",38,"H",72,"VK_H",t,t],[0,18,"KeyI",39,"I",73,"VK_I",t,t],[0,19,"KeyJ",40,"J",74,"VK_J",t,t],[0,20,"KeyK",41,"K",75,"VK_K",t,t],[0,21,"KeyL",42,"L",76,"VK_L",t,t],[0,22,"KeyM",43,"M",77,"VK_M",t,t],[0,23,"KeyN",44,"N",78,"VK_N",t,t],[0,24,"KeyO",45,"O",79,"VK_O",t,t],[0,25,"KeyP",46,"P",80,"VK_P",t,t],[0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[0,27,"KeyR",48,"R",82,"VK_R",t,t],[0,28,"KeyS",49,"S",83,"VK_S",t,t],[0,29,"KeyT",50,"T",84,"VK_T",t,t],[0,30,"KeyU",51,"U",85,"VK_U",t,t],[0,31,"KeyV",52,"V",86,"VK_V",t,t],[0,32,"KeyW",53,"W",87,"VK_W",t,t],[0,33,"KeyX",54,"X",88,"VK_X",t,t],[0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[0,36,"Digit1",22,"1",49,"VK_1",t,t],[0,37,"Digit2",23,"2",50,"VK_2",t,t],[0,38,"Digit3",24,"3",51,"VK_3",t,t],[0,39,"Digit4",25,"4",52,"VK_4",t,t],[0,40,"Digit5",26,"5",53,"VK_5",t,t],[0,41,"Digit6",27,"6",54,"VK_6",t,t],[0,42,"Digit7",28,"7",55,"VK_7",t,t],[0,43,"Digit8",29,"8",56,"VK_8",t,t],[0,44,"Digit9",30,"9",57,"VK_9",t,t],[0,45,"Digit0",21,"0",48,"VK_0",t,t],[1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[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,t,0,t,t,t],[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",t,t],[1,64,"F1",59,"F1",112,"VK_F1",t,t],[1,65,"F2",60,"F2",113,"VK_F2",t,t],[1,66,"F3",61,"F3",114,"VK_F3",t,t],[1,67,"F4",62,"F4",115,"VK_F4",t,t],[1,68,"F5",63,"F5",116,"VK_F5",t,t],[1,69,"F6",64,"F6",117,"VK_F6",t,t],[1,70,"F7",65,"F7",118,"VK_F7",t,t],[1,71,"F8",66,"F8",119,"VK_F8",t,t],[1,72,"F9",67,"F9",120,"VK_F9",t,t],[1,73,"F10",68,"F10",121,"VK_F10",t,t],[1,74,"F11",69,"F11",122,"VK_F11",t,t],[1,75,"F12",70,"F12",123,"VK_F12",t,t],[1,76,"PrintScreen",0,t,0,t,t,t],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",t,t],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[1,80,"Home",14,"Home",36,"VK_HOME",t,t],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[1,83,"End",13,"End",35,"VK_END",t,t],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",t,t],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",t,t],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",t,t],[1,94,"NumpadEnter",3,t,0,t,t,t],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",t,t],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",t,t],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",t,t],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",t,t],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",t,t],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",t,t],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",t,t],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",t,t],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",t,t],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",t,t],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",t,t],[1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[1,108,"Power",0,t,0,t,t,t],[1,109,"NumpadEqual",0,t,0,t,t,t],[1,110,"F13",71,"F13",124,"VK_F13",t,t],[1,111,"F14",72,"F14",125,"VK_F14",t,t],[1,112,"F15",73,"F15",126,"VK_F15",t,t],[1,113,"F16",74,"F16",127,"VK_F16",t,t],[1,114,"F17",75,"F17",128,"VK_F17",t,t],[1,115,"F18",76,"F18",129,"VK_F18",t,t],[1,116,"F19",77,"F19",130,"VK_F19",t,t],[1,117,"F20",78,"F20",0,"VK_F20",t,t],[1,118,"F21",79,"F21",0,"VK_F21",t,t],[1,119,"F22",80,"F22",0,"VK_F22",t,t],[1,120,"F23",81,"F23",0,"VK_F23",t,t],[1,121,"F24",82,"F24",0,"VK_F24",t,t],[1,122,"Open",0,t,0,t,t,t],[1,123,"Help",0,t,0,t,t,t],[1,124,"Select",0,t,0,t,t,t],[1,125,"Again",0,t,0,t,t,t],[1,126,"Undo",0,t,0,t,t,t],[1,127,"Cut",0,t,0,t,t,t],[1,128,"Copy",0,t,0,t,t,t],[1,129,"Paste",0,t,0,t,t,t],[1,130,"Find",0,t,0,t,t,t],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",t,t],[1,136,"KanaMode",0,t,0,t,t,t],[0,137,"IntlYen",0,t,0,t,t,t],[1,138,"Convert",0,t,0,t,t,t],[1,139,"NonConvert",0,t,0,t,t,t],[1,140,"Lang1",0,t,0,t,t,t],[1,141,"Lang2",0,t,0,t,t,t],[1,142,"Lang3",0,t,0,t,t,t],[1,143,"Lang4",0,t,0,t,t,t],[1,144,"Lang5",0,t,0,t,t,t],[1,145,"Abort",0,t,0,t,t,t],[1,146,"Props",0,t,0,t,t,t],[1,147,"NumpadParenLeft",0,t,0,t,t,t],[1,148,"NumpadParenRight",0,t,0,t,t,t],[1,149,"NumpadBackspace",0,t,0,t,t,t],[1,150,"NumpadMemoryStore",0,t,0,t,t,t],[1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[1,152,"NumpadMemoryClear",0,t,0,t,t,t],[1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",t,t],[1,156,"NumpadClearEntry",0,t,0,t,t,t],[1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[1,0,t,6,"Alt",18,"VK_MENU",t,t],[1,0,t,57,"Meta",91,"VK_COMMAND",t,t],[1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[1,165,"BrightnessUp",0,t,0,t,t,t],[1,166,"BrightnessDown",0,t,0,t,t,t],[1,167,"MediaPlay",0,t,0,t,t,t],[1,168,"MediaRecord",0,t,0,t,t,t],[1,169,"MediaFastForward",0,t,0,t,t,t],[1,170,"MediaRewind",0,t,0,t,t,t],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",t,t],[1,174,"Eject",0,t,0,t,t,t],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[1,180,"SelectTask",0,t,0,t,t,t],[1,181,"LaunchScreenSaver",0,t,0,t,t,t],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[1,189,"ZoomToggle",0,t,0,t,t,t],[1,190,"MailReply",0,t,0,t,t,t],[1,191,"MailForward",0,t,0,t,t,t],[1,192,"MailSend",0,t,0,t,t,t],[1,0,t,114,"KeyInComposition",229,t,t,t],[1,0,t,116,"ABNT_C2",194,"VK_ABNT_C2",t,t],[1,0,t,96,"OEM_8",223,"VK_OEM_8",t,t],[1,0,t,0,t,0,"VK_KANA",t,t],[1,0,t,0,t,0,"VK_HANGUL",t,t],[1,0,t,0,t,0,"VK_JUNJA",t,t],[1,0,t,0,t,0,"VK_FINAL",t,t],[1,0,t,0,t,0,"VK_HANJA",t,t],[1,0,t,0,t,0,"VK_KANJI",t,t],[1,0,t,0,t,0,"VK_CONVERT",t,t],[1,0,t,0,t,0,"VK_NONCONVERT",t,t],[1,0,t,0,t,0,"VK_ACCEPT",t,t],[1,0,t,0,t,0,"VK_MODECHANGE",t,t],[1,0,t,0,t,0,"VK_SELECT",t,t],[1,0,t,0,t,0,"VK_PRINT",t,t],[1,0,t,0,t,0,"VK_EXECUTE",t,t],[1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[1,0,t,0,t,0,"VK_HELP",t,t],[1,0,t,0,t,0,"VK_APPS",t,t],[1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[1,0,t,0,t,0,"VK_PACKET",t,t],[1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[1,0,t,0,t,0,"VK_ATTN",t,t],[1,0,t,0,t,0,"VK_CRSEL",t,t],[1,0,t,0,t,0,"VK_EXSEL",t,t],[1,0,t,0,t,0,"VK_EREOF",t,t],[1,0,t,0,t,0,"VK_PLAY",t,t],[1,0,t,0,t,0,"VK_ZOOM",t,t],[1,0,t,0,t,0,"VK_NONAME",t,t],[1,0,t,0,t,0,"VK_PA1",t,t],[1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]],n=[],r=[];for(const i of e){const[s,a,o,l,c,h,u,f,m]=i;if(r[a]||(r[a]=!0,fh[o]=a,mh[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);qn.define(l,c),Lr.define(l,f||c),Tr.define(l,m||f||c)}h&&(ph[h]=l)}})();var _s;(function(t){function e(o){return qn.keyCodeToStr(o)}t.toString=e;function n(o){return qn.strToKeyCode(o)}t.fromString=n;function r(o){return Lr.keyCodeToStr(o)}t.toUserSettingsUS=r;function i(o){return Tr.keyCodeToStr(o)}t.toUserSettingsGeneral=i;function s(o){return Lr.strToKeyCode(o)||Tr.strToKeyCode(o)}t.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return qn.keyCodeToStr(o)}t.toElectronAccelerator=a})(_s||(_s={}));function gh(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}class Me extends Ae{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Me.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new Me(this.startLineNumber,this.startColumn,e,n):new Me(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new $e(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new $e(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new Me(e,n,this.endLineNumber,this.endColumn):new Me(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new Me(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new Me(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Me(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Me(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){var r;(r=this._factories.get(e))===null||r===void 0||r.dispose();const i=new vh(this,e,n);return this._factories.set(e,i),Nn(()=>{const s=this._factories.get(e);!s||s!==i||(this._factories.delete(e),s.dispose())})}getOrCreate(e){return Wr(this,void 0,void 0,function*(){const n=this.get(e);if(n)return n;const r=this._factories.get(e);return!r||r.isResolved?null:(yield r.resolve(),this.get(e))})}isResolved(e){if(this.get(e))return!0;const r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class vh extends zn{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return Wr(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return Wr(this,void 0,void 0,function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}class yh{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Rs;(function(t){const e=new Map;e.set(0,O.symbolMethod),e.set(1,O.symbolFunction),e.set(2,O.symbolConstructor),e.set(3,O.symbolField),e.set(4,O.symbolVariable),e.set(5,O.symbolClass),e.set(6,O.symbolStruct),e.set(7,O.symbolInterface),e.set(8,O.symbolModule),e.set(9,O.symbolProperty),e.set(10,O.symbolEvent),e.set(11,O.symbolOperator),e.set(12,O.symbolUnit),e.set(13,O.symbolValue),e.set(15,O.symbolEnum),e.set(14,O.symbolConstant),e.set(15,O.symbolEnum),e.set(16,O.symbolEnumMember),e.set(17,O.symbolKeyword),e.set(27,O.symbolSnippet),e.set(18,O.symbolText),e.set(19,O.symbolColor),e.set(20,O.symbolFile),e.set(21,O.symbolReference),e.set(22,O.symbolCustomColor),e.set(23,O.symbolFolder),e.set(24,O.symbolTypeParameter),e.set(25,O.account),e.set(26,O.issues);function n(s){let a=e.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=O.symbolProperty),a}t.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,a){let o=r.get(s);return typeof o>"u"&&!a&&(o=9),o}t.fromString=i})(Rs||(Rs={}));var Es;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Es||(Es={}));var Ds;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Ds||(Ds={}));var As;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(As||(As={}));var Ms;(function(t){const e=new Map;e.set(0,O.symbolFile),e.set(1,O.symbolModule),e.set(2,O.symbolNamespace),e.set(3,O.symbolPackage),e.set(4,O.symbolClass),e.set(5,O.symbolMethod),e.set(6,O.symbolProperty),e.set(7,O.symbolField),e.set(8,O.symbolConstructor),e.set(9,O.symbolEnum),e.set(10,O.symbolInterface),e.set(11,O.symbolFunction),e.set(12,O.symbolVariable),e.set(13,O.symbolConstant),e.set(14,O.symbolString),e.set(15,O.symbolNumber),e.set(16,O.symbolBoolean),e.set(17,O.symbolArray),e.set(18,O.symbolObject),e.set(19,O.symbolKey),e.set(20,O.symbolNull),e.set(21,O.symbolEnumMember),e.set(22,O.symbolStruct),e.set(23,O.symbolEvent),e.set(24,O.symbolOperator),e.set(25,O.symbolTypeParameter);function n(r){let i=e.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=O.symbolProperty),i}t.toIcon=n})(Ms||(Ms={}));var Ns;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(Ns||(Ns={}));var zs;(function(t){t[t.Collapsed=0]="Collapsed",t[t.Expanded=1]="Expanded"})(zs||(zs={}));var Ps;(function(t){t[t.Unresolved=0]="Unresolved",t[t.Resolved=1]="Resolved"})(Ps||(Ps={}));var Is;(function(t){t[t.Editing=0]="Editing",t[t.Preview=1]="Preview"})(Is||(Is={}));var Ls;(function(t){t[t.Published=0]="Published",t[t.Draft=1]="Draft"})(Ls||(Ls={}));var Ts;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Ts||(Ts={})),new bh;var Ws;(function(t){t[t.None=0]="None",t[t.Option=1]="Option",t[t.Default=2]="Default",t[t.Preferred=3]="Preferred"})(Ws||(Ws={}));var Os;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(Os||(Os={}));var Us;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(Us||(Us={}));var Vs;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(Vs||(Vs={}));var Bs;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(Bs||(Bs={}));var js;(function(t){t[t.Deprecated=1]="Deprecated"})(js||(js={}));var qs;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(qs||(qs={}));var $s;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})($s||($s={}));var Hs;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Hs||(Hs={}));var Gs;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Gs||(Gs={}));var Js;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Js||(Js={}));var Xs;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Xs||(Xs={}));var Ys;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.autoClosingBrackets=5]="autoClosingBrackets",t[t.screenReaderAnnounceInlineSuggestion=6]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=7]="autoClosingDelete",t[t.autoClosingOvertype=8]="autoClosingOvertype",t[t.autoClosingQuotes=9]="autoClosingQuotes",t[t.autoIndent=10]="autoIndent",t[t.automaticLayout=11]="automaticLayout",t[t.autoSurround=12]="autoSurround",t[t.bracketPairColorization=13]="bracketPairColorization",t[t.guides=14]="guides",t[t.codeLens=15]="codeLens",t[t.codeLensFontFamily=16]="codeLensFontFamily",t[t.codeLensFontSize=17]="codeLensFontSize",t[t.colorDecorators=18]="colorDecorators",t[t.colorDecoratorsLimit=19]="colorDecoratorsLimit",t[t.columnSelection=20]="columnSelection",t[t.comments=21]="comments",t[t.contextmenu=22]="contextmenu",t[t.copyWithSyntaxHighlighting=23]="copyWithSyntaxHighlighting",t[t.cursorBlinking=24]="cursorBlinking",t[t.cursorSmoothCaretAnimation=25]="cursorSmoothCaretAnimation",t[t.cursorStyle=26]="cursorStyle",t[t.cursorSurroundingLines=27]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=28]="cursorSurroundingLinesStyle",t[t.cursorWidth=29]="cursorWidth",t[t.disableLayerHinting=30]="disableLayerHinting",t[t.disableMonospaceOptimizations=31]="disableMonospaceOptimizations",t[t.domReadOnly=32]="domReadOnly",t[t.dragAndDrop=33]="dragAndDrop",t[t.dropIntoEditor=34]="dropIntoEditor",t[t.emptySelectionClipboard=35]="emptySelectionClipboard",t[t.experimentalWhitespaceRendering=36]="experimentalWhitespaceRendering",t[t.extraEditorClassName=37]="extraEditorClassName",t[t.fastScrollSensitivity=38]="fastScrollSensitivity",t[t.find=39]="find",t[t.fixedOverflowWidgets=40]="fixedOverflowWidgets",t[t.folding=41]="folding",t[t.foldingStrategy=42]="foldingStrategy",t[t.foldingHighlight=43]="foldingHighlight",t[t.foldingImportsByDefault=44]="foldingImportsByDefault",t[t.foldingMaximumRegions=45]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=46]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=47]="fontFamily",t[t.fontInfo=48]="fontInfo",t[t.fontLigatures=49]="fontLigatures",t[t.fontSize=50]="fontSize",t[t.fontWeight=51]="fontWeight",t[t.fontVariations=52]="fontVariations",t[t.formatOnPaste=53]="formatOnPaste",t[t.formatOnType=54]="formatOnType",t[t.glyphMargin=55]="glyphMargin",t[t.gotoLocation=56]="gotoLocation",t[t.hideCursorInOverviewRuler=57]="hideCursorInOverviewRuler",t[t.hover=58]="hover",t[t.inDiffEditor=59]="inDiffEditor",t[t.inlineSuggest=60]="inlineSuggest",t[t.letterSpacing=61]="letterSpacing",t[t.lightbulb=62]="lightbulb",t[t.lineDecorationsWidth=63]="lineDecorationsWidth",t[t.lineHeight=64]="lineHeight",t[t.lineNumbers=65]="lineNumbers",t[t.lineNumbersMinChars=66]="lineNumbersMinChars",t[t.linkedEditing=67]="linkedEditing",t[t.links=68]="links",t[t.matchBrackets=69]="matchBrackets",t[t.minimap=70]="minimap",t[t.mouseStyle=71]="mouseStyle",t[t.mouseWheelScrollSensitivity=72]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=73]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=74]="multiCursorMergeOverlapping",t[t.multiCursorModifier=75]="multiCursorModifier",t[t.multiCursorPaste=76]="multiCursorPaste",t[t.multiCursorLimit=77]="multiCursorLimit",t[t.occurrencesHighlight=78]="occurrencesHighlight",t[t.overviewRulerBorder=79]="overviewRulerBorder",t[t.overviewRulerLanes=80]="overviewRulerLanes",t[t.padding=81]="padding",t[t.parameterHints=82]="parameterHints",t[t.peekWidgetDefaultFocus=83]="peekWidgetDefaultFocus",t[t.definitionLinkOpensInPeek=84]="definitionLinkOpensInPeek",t[t.quickSuggestions=85]="quickSuggestions",t[t.quickSuggestionsDelay=86]="quickSuggestionsDelay",t[t.readOnly=87]="readOnly",t[t.renameOnType=88]="renameOnType",t[t.renderControlCharacters=89]="renderControlCharacters",t[t.renderFinalNewline=90]="renderFinalNewline",t[t.renderLineHighlight=91]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=92]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=93]="renderValidationDecorations",t[t.renderWhitespace=94]="renderWhitespace",t[t.revealHorizontalRightPadding=95]="revealHorizontalRightPadding",t[t.roundedSelection=96]="roundedSelection",t[t.rulers=97]="rulers",t[t.scrollbar=98]="scrollbar",t[t.scrollBeyondLastColumn=99]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=100]="scrollBeyondLastLine",t[t.scrollPredominantAxis=101]="scrollPredominantAxis",t[t.selectionClipboard=102]="selectionClipboard",t[t.selectionHighlight=103]="selectionHighlight",t[t.selectOnLineNumbers=104]="selectOnLineNumbers",t[t.showFoldingControls=105]="showFoldingControls",t[t.showUnused=106]="showUnused",t[t.snippetSuggestions=107]="snippetSuggestions",t[t.smartSelect=108]="smartSelect",t[t.smoothScrolling=109]="smoothScrolling",t[t.stickyScroll=110]="stickyScroll",t[t.stickyTabStops=111]="stickyTabStops",t[t.stopRenderingLineAfter=112]="stopRenderingLineAfter",t[t.suggest=113]="suggest",t[t.suggestFontSize=114]="suggestFontSize",t[t.suggestLineHeight=115]="suggestLineHeight",t[t.suggestOnTriggerCharacters=116]="suggestOnTriggerCharacters",t[t.suggestSelection=117]="suggestSelection",t[t.tabCompletion=118]="tabCompletion",t[t.tabIndex=119]="tabIndex",t[t.unicodeHighlighting=120]="unicodeHighlighting",t[t.unusualLineTerminators=121]="unusualLineTerminators",t[t.useShadowDOM=122]="useShadowDOM",t[t.useTabStops=123]="useTabStops",t[t.wordBreak=124]="wordBreak",t[t.wordSeparators=125]="wordSeparators",t[t.wordWrap=126]="wordWrap",t[t.wordWrapBreakAfterCharacters=127]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=128]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=129]="wordWrapColumn",t[t.wordWrapOverride1=130]="wordWrapOverride1",t[t.wordWrapOverride2=131]="wordWrapOverride2",t[t.wrappingIndent=132]="wrappingIndent",t[t.wrappingStrategy=133]="wrappingStrategy",t[t.showDeprecated=134]="showDeprecated",t[t.inlayHints=135]="inlayHints",t[t.editorClassName=136]="editorClassName",t[t.pixelRatio=137]="pixelRatio",t[t.tabFocusMode=138]="tabFocusMode",t[t.layoutInfo=139]="layoutInfo",t[t.wrappingInfo=140]="wrappingInfo",t[t.defaultColorDecorators=141]="defaultColorDecorators"})(Ys||(Ys={}));var Ks;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Ks||(Ks={}));var Qs;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Qs||(Qs={}));var Zs;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(Zs||(Zs={}));var ea;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(ea||(ea={}));var ta;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(ta||(ta={}));var na;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(na||(na={}));var ra;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ra||(ra={}));var Or;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(Or||(Or={}));var Ur;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Ur||(Ur={}));var Vr;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(Vr||(Vr={}));var ia;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(ia||(ia={}));var sa;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(sa||(sa={}));var aa;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(aa||(aa={}));var oa;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(oa||(oa={}));var la;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(la||(la={}));var ca;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(ca||(ca={}));var ha;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(ha||(ha={}));var da;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(da||(da={}));var ua;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(ua||(ua={}));var Br;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Br||(Br={}));var pa;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(pa||(pa={}));var fa;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(fa||(fa={}));var ma;(function(t){t[t.Deprecated=1]="Deprecated"})(ma||(ma={}));var ga;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(ga||(ga={}));var ba;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(ba||(ba={}));var va;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(va||(va={}));var ya;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(ya||(ya={}));class tn{static chord(e,n){return gh(e,n)}}tn.CtrlCmd=2048,tn.Shift=1024,tn.Alt=512,tn.WinCtrl=256;function wh(){return{editor:void 0,languages:void 0,CancellationTokenSource:vc,Emitter:Ye,KeyCode:Or,KeyMod:tn,Position:$e,Range:Ae,Selection:Me,SelectionDirection:Br,MarkerSeverity:Ur,MarkerTag:Vr,Uri:Er,Token:yh}}var wa;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(wa||(wa={}));var xa;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(xa||(xa={}));var Sa;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(Sa||(Sa={}));var Ca;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Ca||(Ca={}));function xh(t,e,n,r,i){if(r===0)return!0;const s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Sh(t,e,n,r,i){if(r+i===n)return!0;const s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r+i-1);if(t.get(a)!==0)return!0}return!1}function Ch(t,e,n,r,i){return xh(t,e,n,r,i)&&Sh(t,e,n,r,i)}class kh{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Fc(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Ch(this._wordSeparators,e,n,i,s))return r}while(r);return null}}function _h(t,e="Unreachable"){throw new Error(e)}function jr(t){if(!t()){debugger;t(),ct(new Ct("Assertion Failed"))}}function ka(t,e){let n=0;for(;n0){const P=w.charCodeAt(R-1);Fr(P)&&R--}if(z+1=P){u=!0;break e}h.push(new Ae(y,R+1,y,z+1))}}while(f)}return{ranges:h,hasMore:u,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){const r=new _a(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=Ie.getLocales().filter(l=>!Ie.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function Rh(t,e){return`[${wc(t.map(r=>String.fromCodePoint(r)).join(""))}]`}class _a{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Ie.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of dt.codePoints)Fa(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=Ec(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!dt.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Fa(e)&&dt.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Fa(t){return t===" "||t===` -`||t===" "}class Ra{constructor(e,n){this.changes=e,this.hitTimeout=n}}class $n{constructor(e,n,r){this.originalRange=e,this.modifiedRange=n,this.innerChanges=r}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}}class Ea{constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}class He{static joinMany(e){if(e.length===0)return[];let n=e[0];for(let r=1;r=o.startLineNumber?a=new He(a.startLineNumber,Math.max(a.endLineNumberExclusive,o.endLineNumberExclusive)):(r.push(a),a=o)}return a!==null&&r.push(a),r}constructor(e,n){if(e>n)throw new Ct(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&enew Ea(new Ae(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new Ae(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));l&&(l.modifiedRange.endLineNumberExclusive===f.modifiedRange.startLineNumber||l.originalRange.endLineNumberExclusive===f.originalRange.startLineNumber)&&(f=new $n(l.originalRange.join(f.originalRange),l.modifiedRange.join(f.modifiedRange),l.innerChanges&&f.innerChanges?l.innerChanges.concat(f.innerChanges):void 0),o.pop()),o.push(f),l=f}return jr(()=>ka(o,(c,h)=>h.originalRange.startLineNumber-c.originalRange.endLineNumberExclusive===h.modifiedRange.startLineNumber-c.modifiedRange.endLineNumberExclusive&&c.originalRange.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class Ut{constructor(e,n,r,i,s,a,o,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){const i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),o=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),h=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new Ut(i,s,a,o,l,c,h,u)}}function Mh(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let b=Da(m,g,s,!0).changes;o&&(b=Mh(b)),f=[];for(let y=0,x=b.length;y1&&b>1;){const y=f.charCodeAt(g-2),x=m.charCodeAt(b-2);if(y!==x)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,b)}{let g=$r(f,1),b=$r(m,1);const y=f.length+1,x=m.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-en))return new ce(e,n)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new Ct(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new ce(this.start+e,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e ${this.seq2Range}`}join(e){return new Le(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}}class rn{isValid(){return!0}}rn.instance=new rn;class Nh{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Ct("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime!0,this.valid=!0}}class Hr{constructor(e,n){this.width=e,this.height=n,this.array=[],this.array=new Array(e*n)}get(e,n){return this.array[e+n*this.width]}set(e,n,r){this.array[e+n*this.width]=r}}class zh{compute(e,n,r=rn.instance,i){if(e.length===0||n.length===0)return nt.trivial(e,n);const s=new Hr(e.length,n.length),a=new Hr(e.length,n.length),o=new Hr(e.length,n.length);for(let g=0;g0&&b>0&&a.get(g-1,b-1)===3&&(w+=o.get(g-1,b-1)),w+=i?i(g,b):1):w=-1;const k=Math.max(y,x,w);if(k===w){const R=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,R+1),a.set(g,b,3)}else k===y?(o.set(g,b,0),a.set(g,b,1)):k===x&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,k)}const l=[];let c=e.length,h=n.length;function u(g,b){(g+1!==c||b+1!==h)&&l.push(new Le(new ce(g+1,c),new ce(b+1,h))),c=g,h=b}let f=e.length-1,m=n.length-1;for(;f>=0&&m>=0;)a.get(f,m)===3?(u(f,m),f--,m--):a.get(f,m)===1?f--:m--;return u(-1,-1),l.reverse(),new nt(l,!1)}}function za(t,e,n){let r=n;return r=Ih(t,e,r),r=Lh(t,e,r),r}function Ph(t,e,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new Le(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Ih(t,e,n){const r=[];n.length>0&&r.push(n[0]);for(let i=1;i0?n[r-1].seq2Range.endExclusive:-1,a=r+10?n[r-1].seq1Range.endExclusive:-1,a=r+1i&&n.getElement(t.seq2Range.start-a)===n.getElement(t.seq2Range.endExclusive-a)&&a<20;)a++;a--;let o=0;for(;t.seq2Range.start+oc&&(c=g,l=h)}return l!==0?new Le(t.seq1Range.delta(l),t.seq2Range.delta(l)):t}class Th{compute(e,n,r=rn.instance){if(e.length===0||n.length===0)return nt.trivial(e,n);function i(m,g){for(;m=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Oh{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Uh{constructor(){this.dynamicProgrammingDiffing=new zh,this.myersDiffingAlgorithm=new Th}computeDiff(e,n,r){const i=r.maxComputationTimeMs===0?rn.instance:new Nh(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(R){let z=a.get(R);return z===void 0&&(z=a.size,a.set(R,z)),z}const l=e.map(R=>o(R.trim())),c=n.map(R=>o(R.trim())),h=new La(l,e),u=new La(c,n),f=(()=>h.length+u.length<1500?this.dynamicProgrammingDiffing.compute(h,u,i,(R,z)=>e[R]===n[z]?n[z].length===0?.1:1+Math.log(1+n[z].length):.99):this.myersDiffingAlgorithm.compute(h,u))();let m=f.diffs,g=f.hitTimeout;m=za(h,u,m);const b=[],y=R=>{if(s)for(let z=0;zR.seq1Range.start-x===R.seq2Range.start-w);const z=R.seq1Range.start-x;y(z),x=R.seq1Range.endExclusive,w=R.seq2Range.endExclusive;const $=this.refineDiff(e,n,R,i,s);$.hitTimeout&&(g=!0);for(const X of $.mappings)b.push(X)}y(e.length-x);const k=jh(b,e,n);return new Ra(k,g)}refineDiff(e,n,r,i,s){const a=new Wa(e,r.seq1Range,s),o=new Wa(n,r.seq2Range,s),l=a.length+o.length<500?this.dynamicProgrammingDiffing.compute(a,o,i):this.myersDiffingAlgorithm.compute(a,o,i);let c=l.diffs;return c=za(a,o,c),c=Vh(a,o,c),c=Ph(a,o,c),{mappings:c.map(u=>new Ea(a.translateRange(u.seq1Range),o.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}function Vh(t,e,n){const r=[];let i;function s(){if(!i)return;const o=i.s1Range.length-i.deleted;i.s2Range.length-i.added,Math.max(i.deleted,i.added)+(i.count-1)>o&&r.push(new Le(i.s1Range,i.s2Range)),i=void 0}for(const o of n){let l=function(m,g){var b,y,x,w;if(!i||!i.s1Range.containsRange(m)||!i.s2Range.containsRange(g))if(i&&!(i.s1Range.endExclusive0||e.length>0;){const r=t[0],i=e[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function jh(t,e,n){const r=[];for(const i of $h(t.map(s=>qh(s,e,n)),(s,a)=>s.originalRange.overlapOrTouch(a.originalRange)||s.modifiedRange.overlapOrTouch(a.modifiedRange))){const s=i[0],a=i[i.length-1];r.push(new $n(s.originalRange.join(a.originalRange),s.modifiedRange.join(a.modifiedRange),i.map(o=>o.innerChanges[0])))}return jr(()=>ka(r,(i,s)=>s.originalRange.startLineNumber-i.originalRange.endLineNumberExclusive===s.modifiedRange.startLineNumber-i.modifiedRange.endLineNumberExclusive&&i.originalRange.endLineNumberExclusive=n[t.modifiedRange.startLineNumber-1].length&&t.originalRange.startColumn-1>=e[t.originalRange.startLineNumber-1].length&&(r=1),t.modifiedRange.endColumn===1&&t.originalRange.endColumn===1&&t.originalRange.startLineNumber+r<=t.originalRange.endLineNumber&&t.modifiedRange.startLineNumber+r<=t.modifiedRange.endLineNumber&&(i=-1);const s=new He(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),a=new He(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new $n(s,a,[t])}function*$h(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}class La{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:Ta(this.lines[e-1]),r=e===this.lines.length?0:Ta(this.lines[e]);return 1e3-(n+r)}}function Ta(t){let e=0;for(;e0&&n.endExclusive>=e.length&&(n=new ce(n.start-1,n.endExclusive),i=!0),this.lineRange=n;for(let s=this.lineRange.start;sString.fromCharCode(e)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Ua(e>0?this.elements[e-1]:-1),r=Ua(ee?r=s:n=s+1}const i=n===0?0:this.firstCharOffsetByLineMinusOne[n-1];return new $e(this.lineRange.start+n+1,e-i+1+this.offsetByLine[n])}translateRange(e){return Ae.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!Gr(this.elements[e]))return;let n=e;for(;n>0&&Gr(this.elements[n-1]);)n--;let r=e;for(;r=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}const Hh={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function Oa(t){return Hh[t]}function Ua(t){return t===10?7:t===13?6:Gh(t)?5:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:4}function Gh(t){return t===32||t===9}const Jr={legacy:new Dh,advanced:new Uh};function bt(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class he{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Te{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=bt(Math.max(Math.min(1,n),0),3),this.l=bt(Math.max(Math.min(1,r),0),3),this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const h=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(h<=.5?u/(2*h):u/(2-2*h),1),a){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,h=2*i-c;a=Te._hue2rgb(h,c,n+1/3),o=Te._hue2rgb(h,c,n),l=Te._hue2rgb(h,c,n-1/3)}return new he(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Vt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=bt(Math.max(Math.min(1,n),0),3),this.v=bt(Math.max(Math.min(1,r),0),3),this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Vt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,h,u]=[0,0,0];return n<60?(c=a,h=o):n<120?(c=o,h=a):n<180?(h=a,u=o):n<240?(h=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),h=Math.round((h+l)*255),u=Math.round((u+l)*255),new he(c,h,u,s)}}let fe=class Ce{static fromHex(e){return Ce.Format.CSS.parseHex(e)||Ce.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Te.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Vt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof he)this.rgba=e;else if(e instanceof Te)this._hsla=e,this.rgba=Te.toRGBA(e);else if(e instanceof Vt)this._hsva=e,this.rgba=Vt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&he.equals(this.rgba,e.rgba)&&Te.equals(this.hsla,e.hsla)&&Vt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Ce._relativeLuminanceForComponent(this.rgba.r),n=Ce._relativeLuminanceForComponent(this.rgba.g),r=Ce._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return bt(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}getContrastRatio(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return nCe._flatten(i,r));return Ce._flatten(this,n)}static _flatten(e,n){const r=1-e.rgba.a;return new Ce(new he(r*n.rgba.r+e.rgba.a*e.rgba.r,r*n.rgba.g+e.rgba.a*e.rgba.g,r*n.rgba.b+e.rgba.a*e.rgba.b))}toString(){return this._toString||(this._toString=Ce.Format.CSS.format(this)),this._toString}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,e.darken(r)}};fe.white=new fe(new he(255,255,255,1)),fe.black=new fe(new he(0,0,0,1)),fe.red=new fe(new he(255,0,0,1)),fe.blue=new fe(new he(0,0,255,1)),fe.green=new fe(new he(0,255,0,1)),fe.cyan=new fe(new he(0,255,255,1)),fe.lightgrey=new fe(new he(211,211,211,1)),fe.transparent=new fe(new he(0,0,0,0)),function(t){(function(e){(function(n){function r(m){return m.rgba.a===1?`rgb(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b})`:t.Format.CSS.formatRGBA(m)}n.formatRGB=r;function i(m){return`rgba(${m.rgba.r}, ${m.rgba.g}, ${m.rgba.b}, ${+m.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(m){return m.hsla.a===1?`hsl(${m.hsla.h}, ${(m.hsla.s*100).toFixed(2)}%, ${(m.hsla.l*100).toFixed(2)}%)`:t.Format.CSS.formatHSLA(m)}n.formatHSL=s;function a(m){return`hsla(${m.hsla.h}, ${(m.hsla.s*100).toFixed(2)}%, ${(m.hsla.l*100).toFixed(2)}%, ${m.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(m){const g=m.toString(16);return g.length!==2?"0"+g:g}function l(m){return`#${o(m.rgba.r)}${o(m.rgba.g)}${o(m.rgba.b)}`}n.formatHex=l;function c(m,g=!1){return g&&m.rgba.a===1?t.Format.CSS.formatHex(m):`#${o(m.rgba.r)}${o(m.rgba.g)}${o(m.rgba.b)}${o(Math.round(m.rgba.a*255))}`}n.formatHexA=c;function h(m){return m.isOpaque()?t.Format.CSS.formatHex(m):t.Format.CSS.formatRGBA(m)}n.format=h;function u(m){const g=m.length;if(g===0||m.charCodeAt(0)!==35)return null;if(g===7){const b=16*f(m.charCodeAt(1))+f(m.charCodeAt(2)),y=16*f(m.charCodeAt(3))+f(m.charCodeAt(4)),x=16*f(m.charCodeAt(5))+f(m.charCodeAt(6));return new t(new he(b,y,x,1))}if(g===9){const b=16*f(m.charCodeAt(1))+f(m.charCodeAt(2)),y=16*f(m.charCodeAt(3))+f(m.charCodeAt(4)),x=16*f(m.charCodeAt(5))+f(m.charCodeAt(6)),w=16*f(m.charCodeAt(7))+f(m.charCodeAt(8));return new t(new he(b,y,x,w/255))}if(g===4){const b=f(m.charCodeAt(1)),y=f(m.charCodeAt(2)),x=f(m.charCodeAt(3));return new t(new he(16*b+b,16*y+y,16*x+x))}if(g===5){const b=f(m.charCodeAt(1)),y=f(m.charCodeAt(2)),x=f(m.charCodeAt(3)),w=f(m.charCodeAt(4));return new t(new he(16*b+b,16*y+y,16*x+x,(16*w+w)/255))}return null}n.parseHex=u;function f(m){switch(m){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))}(fe||(fe={}));function Va(t){const e=[];for(const n of t){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function Xr(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function sn(t,e){const n=e.index,r=e[0].length;if(!n)return;const i=t.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function Jh(t,e){if(!t)return;const n=fe.Format.CSS.parseHex(e);if(n)return{range:t,color:Xr(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function Ba(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Va(i);return{range:t,color:Xr(s[0],s[1],s[2],n?s[3]:1)}}function ja(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=Va(i),a=new fe(new Te(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:t,color:Xr(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function an(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function Xh(t){const e=[],r=an(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const c=/^\(\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;l=Ba(sn(t,i),an(o,c),!1)}else if(a==="rgba"){const c=/^\(\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;l=Ba(sn(t,i),an(o,c),!0)}else if(a==="hsl"){const c=/^\(\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;l=ja(sn(t,i),an(o,c),!1)}else if(a==="hsla"){const c=/^\(\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;l=ja(sn(t,i),an(o,c),!0)}else a==="#"&&(l=Jh(sn(t,i),a+o));l&&e.push(l)}return e}function Yh(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:Xh(t)}var Ke=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(h){try{c(r.next(h))}catch(u){a(u)}}function l(h){try{c(r.throw(h))}catch(u){a(u)}}function c(h){h.done?s(h.value):i(h.value).then(o,l)}c((r=r.apply(t,e||[])).next())})};class Kh extends rh{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}class vt{constructor(e,n){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}acceptNewModel(e){this._models[e.url]=new Kh(Er.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,n,r){return Ke(this,void 0,void 0,function*(){const i=this._getModel(e);return i?Fh.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,n,r,i){return Ke(this,void 0,void 0,function*(){const s=this._getModel(e),a=this._getModel(n);return!s||!a?null:vt.computeDiff(s,a,r,i)})}static computeDiff(e,n,r,i){const s=i==="advanced"?Jr.advanced:Jr.legacy,a=e.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r);return{identical:l.changes.length>0?!1:this._modelsAreIdentical(e,n),quitEarly:l.hitTimeout,changes:l.changes.map(h=>{var u;return[h.originalRange.startLineNumber,h.originalRange.endLineNumberExclusive,h.modifiedRange.startLineNumber,h.modifiedRange.endLineNumberExclusive,(u=h.innerChanges)===null||u===void 0?void 0:u.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])]})}}static _modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}computeDirtyDiff(e,n,r){return Ke(this,void 0,void 0,function*(){const i=this._getModel(e),s=this._getModel(n);if(!i||!s)return null;const a=i.getLinesContent(),o=s.getLinesContent();return new Ma(a,o,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:r,shouldMakePrettyDiff:!0,maxComputationTime:1e3}).computeDiff().changes})}computeMoreMinimalEdits(e,n,r){return Ke(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((o,l)=>{if(o.range&&l.range)return Ae.compareRangesUsingStarts(o.range,l.range);const c=o.range?0:1,h=l.range?0:1;return c-h});for(let{range:o,text:l,eol:c}of n){if(typeof c=="number"&&(a=c),Ae.isEmpty(o)&&!l)continue;const h=i.getValueInRange(o);if(l=l.replace(/\r\n|\n|\r/g,i.eol),h===l)continue;if(Math.max(l.length,h.length)>vt._diffLimit){s.push({range:o,text:l});continue}const u=Wc(h,l,r),f=i.offsetAt(Ae.lift(o).getStartPosition());for(const m of u){const g=i.positionAt(f+m.originalStart),b=i.positionAt(f+m.originalStart+m.originalLength),y={text:l.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:b.lineNumber,endColumn:b.column}};i.getValueInRange(y.range)!==y.text&&s.push(y)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s})}computeHumanReadableDiff(e,n,r){return Ke(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((o,l)=>{if(o.range&&l.range)return Ae.compareRangesUsingStarts(o.range,l.range);const c=o.range?0:1,h=l.range?0:1;return c-h});for(let{range:o,text:l,eol:c}of n){let b=function(x,w){return new $e(x.lineNumber+w.lineNumber-1,w.lineNumber===1?x.column+w.column-1:w.column)},y=function(x,w){const k=[];for(let R=w.startLineNumber;R<=w.endLineNumber;R++){const z=x[R-1];R===w.startLineNumber&&R===w.endLineNumber?k.push(z.substring(w.startColumn-1,w.endColumn-1)):R===w.startLineNumber?k.push(z.substring(w.startColumn-1)):R===w.endLineNumber?k.push(z.substring(0,w.endColumn-1)):k.push(z)}return k};if(typeof c=="number"&&(a=c),Ae.isEmpty(o)&&!l)continue;const h=i.getValueInRange(o);if(l=l.replace(/\r\n|\n|\r/g,i.eol),h===l)continue;if(Math.max(l.length,h.length)>vt._diffLimit){s.push({range:o,text:l});continue}const u=h.split(/\r\n|\n|\r/),f=l.split(/\r\n|\n|\r/),m=Jr.advanced.computeDiff(u,f,r),g=Ae.lift(o).getStartPosition();for(const x of m.changes)if(x.innerChanges)for(const w of x.innerChanges)s.push({range:Ae.fromPositions(b(g,w.originalRange.getStartPosition()),b(g,w.originalRange.getEndPosition())),text:y(f,w.modifiedRange).join(i.eol)});else throw new Ct("The experimental diff algorithm always produces inner changes")}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s})}computeLinks(e){return Ke(this,void 0,void 0,function*(){const n=this._getModel(e);return n?uh(n):null})}computeDefaultDocumentColors(e){return Ke(this,void 0,void 0,function*(){const n=this._getModel(e);return n?Yh(n):null})}textualSuggest(e,n,r,i){return Ke(this,void 0,void 0,function*(){const s=new Tn(!0),a=new RegExp(r,i),o=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const h of c.words(a))if(!(h===n||!isNaN(Number(h)))&&(o.add(h),o.size>vt._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(e,n,r,i){return Ke(this,void 0,void 0,function*(){const s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let l=n.startLineNumber;lthis._host.fhr(o,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,n),Promise.resolve(_r(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,n){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}vt._diffLimit=1e5,vt._suggestionsLimit=1e4,typeof importScripts=="function"&&(globalThis.monaco=wh());let Yr=!1;function qa(t){if(Yr)return;Yr=!0;const e=new Lc(n=>{globalThis.postMessage(n)},n=>new vt(n,t));globalThis.onmessage=n=>{e.onmessage(n.data)}}globalThis.onmessage=t=>{Yr||qa(null)};/*!----------------------------------------------------------------------------- +`))}}class Rr{constructor(e){this.value=e}}const oc=2;class Be{constructor(e){var n,r,i,s,a;this._size=0,this._options=e,this._leakageMon=!((n=this._options)===null||n===void 0)&&n.leakWarningThreshold?new ac((i=(r=this._options)===null||r===void 0?void 0:r.leakWarningThreshold)!==null&&i!==void 0?i:sc):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new Pt(this._options._profName):void 0,this._deliveryQueue=(a=this._options)===null||a===void 0?void 0:a.deliveryQueue}dispose(){var e,n,r,i;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||r===void 0||r.call(n),(i=this._leakageMon)===null||i===void 0||i.dispose())}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(n,r,i)=>{var s,a,o,l,c;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),nn.None;if(this._disposed)return nn.None;r&&(n=n.bind(r));const h=new Rr(n);let u;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(h.stack=_r.create(),u=this._leakageMon.check(h.stack,this._size+1)),this._listeners?this._listeners instanceof Rr?((c=this._deliveryQueue)!==null&&c!==void 0||(this._deliveryQueue=new lc),this._listeners=[this._listeners,h]):this._listeners.push(h):((a=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||a===void 0||a.call(s,this),this._listeners=h,(l=(o=this._options)===null||o===void 0?void 0:o.onDidAddFirstListener)===null||l===void 0||l.call(o,this)),this._size++;const f=tn(()=>{u==null||u(),this._removeListener(h)});return i instanceof Ct?i.add(f):Array.isArray(i)&&i.push(f),f}),this._event}_removeListener(e){var n,r,i,s;if((r=(n=this._options)===null||n===void 0?void 0:n.onWillRemoveListener)===null||r===void 0||r.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||s===void 0||s.call(i,this),this._size=0;return}const a=this._listeners,o=a.indexOf(e);if(o===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,a[o]=void 0;const l=this._deliveryQueue.current===this;if(this._size*oc<=a.length){let c=0;for(let h=0;h0}}class lc{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function cc(t){return typeof t=="string"}function hc(t){let e=[];for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function Fr(t){const e=[];for(const n of hc(t))typeof t[n]=="function"&&e.push(n);return e}function dc(t,e){const n=i=>function(){const s=Array.prototype.slice.call(arguments,0);return e(i,s)},r={};for(const i of t)r[i]=n(i);return r}globalThis&&globalThis.__awaiter;let uc=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function pc(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),uc&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function ae(t,e,...n){return pc(e,n)}function of(t){}var Er;const Lt="en";let Dr=!1,Ar=!1,Nr=!1,cs=!1,On,Mr=Lt,hs=Lt,fc,je;const qe=typeof self=="object"?self:typeof global=="object"?global:{};let xe;typeof qe.vscode<"u"&&typeof qe.vscode.process<"u"?xe=qe.vscode.process:typeof process<"u"&&(xe=process);const mc=typeof((Er=xe==null?void 0:xe.versions)===null||Er===void 0?void 0:Er.electron)=="string"&&(xe==null?void 0:xe.type)==="renderer";if(typeof navigator=="object"&&!mc)je=navigator.userAgent,Dr=je.indexOf("Windows")>=0,Ar=je.indexOf("Macintosh")>=0,(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Nr=je.indexOf("Linux")>=0,(je==null?void 0:je.indexOf("Mobi"))>=0,cs=!0,ae({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),On=Lt,Mr=On,hs=navigator.language;else if(typeof xe=="object"){Dr=xe.platform==="win32",Ar=xe.platform==="darwin",Nr=xe.platform==="linux",Nr&&xe.env.SNAP&&xe.env.SNAP_REVISION,xe.env.CI||xe.env.BUILD_ARTIFACTSTAGINGDIRECTORY,On=Lt,Mr=Lt;const t=xe.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t),n=e.availableLanguages["*"];On=e.locale,hs=e.osLocale,Mr=n||Lt,fc=e._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const rn=Dr,gc=Ar;cs&&qe.importScripts;const Je=je,bc=typeof qe.postMessage=="function"&&!qe.importScripts;(()=>{if(bc){const t=[];qe.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{const r=++e;t.push({id:r,callback:n}),qe.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();const vc=!!(Je&&Je.indexOf("Chrome")>=0);Je&&Je.indexOf("Firefox")>=0,!vc&&Je&&Je.indexOf("Safari")>=0,Je&&Je.indexOf("Edg/")>=0,Je&&Je.indexOf("Android")>=0;class yc{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const n=JSON.stringify(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this.fn(e)),this.lastCache}}class ds{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var It;function wc(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function xc(t){return t.split(/\r\n|\r|\n/)}function Sc(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function us(t){return t>=65&&t<=90}function zr(t){return 55296<=t&&t<=56319}function kc(t){return 56320<=t&&t<=57343}function _c(t,e){return(t-55296<<10)+(e-56320)+65536}function Rc(t,e,n){const r=t.charCodeAt(n);if(zr(r)&&n+1JSON.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]}')),kt.cache=new yc(t=>{function e(c){const h=new Map;for(let u=0;u!c.startsWith("_")&&c in i);s.length===0&&(s=["_default"]);let a;for(const c of s){const h=e(i[c]);a=r(a,h)}const o=e(i._common),l=n(o,a);return new It(l)}),kt._locales=new ds(()=>Object.keys(It.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")));class ht{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(){return this._data||(this._data=new Set(ht.getRawData())),this._data}static isInvisibleCharacter(e){return ht.getData().has(e)}static get codePoints(){return ht.getData()}}ht._data=void 0;const Dc="$initialize";class Ac{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.method=r,this.args=i,this.type=0}}class ps{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}}class Nc{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.eventName=r,this.arg=i,this.type=2}}class Mc{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}}class zc{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Pc{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,n){const r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new Ac(this._workerId,r,e,n))})}listen(e,n){let r=null;const i=new Be({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new Nc(this._workerId,r,e,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new zc(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;e.err.$isError&&(r=new Error,r.name=e.err.name,r.message=e.err.message,r.stack=e.err.stack),n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.method,e.args).then(i=>{this._send(new ps(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=os(i.detail)),this._send(new ps(this._workerId,n,void 0,os(i)))})}_handleSubscribeEventMessage(e){const n=e.req,r=this._handler.handleEvent(e.eventName,e.arg)(i=>{this._send(new Mc(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let r=0;rfunction(){const o=Array.prototype.slice.call(arguments,0);return e(a,o)},i=a=>function(o){return n(a,o)},s={};for(const a of t){if(ms(a)){s[a]=i(a);continue}if(fs(a)){s[a]=n(a,void 0);continue}s[a]=r(a)}return s}class Ic{constructor(e,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new Pc({sendMessage:(r,i)=>{e(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n){if(e===Dc)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(ms(e)){const r=this._requestHandler[e].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${e} on request handler.`);return r}if(fs(e)){const r=this._requestHandler[e];if(typeof r!="function")throw new Error(`Missing event ${e} on request handler.`);return r}throw new Error(`Malformed event name ${e}`)}initialize(e,n,r,i){this._protocol.setWorkerId(e);const o=Lc(i,(l,c)=>this._protocol.sendMessage(l,c),(l,c)=>this._protocol.listen(l,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(Fr(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((l,c)=>{const h=globalThis.require;h([r],u=>{if(this._requestHandler=u.create(o),!this._requestHandler){c(new Error("No RequestHandler!"));return}l(Fr(this._requestHandler))},c)}))}}class dt{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function gs(t,e){return(e<<5)-e+t|0}function Tc(t,e){e=gs(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new dt(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(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class ut{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=ut._getElements(e),[o,l,c]=ut._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(ut._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(Tt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new dt(e,0,r,i-r+1)]):e<=n?(Tt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new dt(e,n-e+1,r,0)]):(Tt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),Tt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],o=[0],l=this.ComputeRecursionPoint(e,n,r,i,a,o,s),c=a[0],h=o[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,r,h,s);let f=[];return s[0]?f=[new dt(c+1,n-(c+1)+1,h+1,i-(h+1)+1)]:f=this.ComputeDiffRecursive(c+1,n,h+1,i,s),this.ConcatenateChanges(u,f)}return[new dt(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,l,c,h,u,f,m,g,b,y,x,S){let w=null,E=null,R=new vs,T=n,O=r,L=m[0]-y[0]-i,q=-1073741824,z=this.m_forwardHistory.length-1;do{const F=L+e;F===T||F=0&&(c=this.m_forwardHistory[z],e=c[0],T=1,O=c.length-1)}while(--z>=-1);if(w=R.getReverseChanges(),S[0]){let F=m[0]+1,D=y[0]+1;if(w!==null&&w.length>0){const I=w[w.length-1];F=Math.max(F,I.getOriginalEnd()),D=Math.max(D,I.getModifiedEnd())}E=[new dt(F,f-F+1,D,b-D+1)]}else{R=new vs,T=a,O=o,L=m[0]-y[0]-l,q=1073741824,z=x?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const F=L+s;F===T||F=h[F+1]?(u=h[F+1]-1,g=u-L-l,u>q&&R.MarkNextChange(),q=u+1,R.AddOriginalElement(u+1,g+1),L=F+1-s):(u=h[F-1],g=u-L-l,u>q&&R.MarkNextChange(),q=u,R.AddModifiedElement(u+1,g+1),L=F-1-s),z>=0&&(h=this.m_reverseHistory[z],s=h[0],T=1,O=h.length-1)}while(--z>=-1);E=R.getChanges()}return this.ConcatenateChanges(w,E)}ComputeRecursionPoint(e,n,r,i,s,a,o){let l=0,c=0,h=0,u=0,f=0,m=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),b=g+1,y=new Int32Array(b),x=new Int32Array(b),S=i-r,w=n-e,E=e-r,R=n-i,O=(w-S)%2===0;y[S]=e,x[w]=n,o[0]=!1;for(let L=1;L<=g/2+1;L++){let q=0,z=0;h=this.ClipDiagonalBound(S-L,L,S,b),u=this.ClipDiagonalBound(S+L,L,S,b);for(let D=h;D<=u;D+=2){D===h||Dq+z&&(q=l,z=c),!O&&Math.abs(D-w)<=L-1&&l>=x[D])return s[0]=l,a[0]=c,I<=x[D]&&1447>0&&L<=1447+1?this.WALKTRACE(S,h,u,E,w,f,m,R,y,x,l,n,s,c,i,a,O,o):null}const F=(q-e+(z-r)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(q,F))return o[0]=!0,s[0]=q,a[0]=z,F>0&&1447>0&&L<=1447+1?this.WALKTRACE(S,h,u,E,w,f,m,R,y,x,l,n,s,c,i,a,O,o):(e++,r++,[new dt(e,n-e+1,r,i-r+1)]);f=this.ClipDiagonalBound(w-L,L,w,b),m=this.ClipDiagonalBound(w+L,L,w,b);for(let D=f;D<=m;D+=2){D===f||D=x[D+1]?l=x[D+1]-1:l=x[D-1],c=l-(D-w)-R;const I=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(x[D]=l,O&&Math.abs(D-S)<=L&&l<=y[D])return s[0]=l,a[0]=c,I>=y[D]&&1447>0&&L<=1447+1?this.WALKTRACE(S,h,u,E,w,f,m,R,y,x,l,n,s,c,i,a,O,o):null}if(L<=1447){let D=new Int32Array(u-h+2);D[0]=S-h+1,Wt.Copy2(y,h,D,1,u-h+1),this.m_forwardHistory.push(D),D=new Int32Array(m-f+2),D[0]=w-f+1,Wt.Copy2(x,f,D,1,m-f+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(S,h,u,E,w,f,m,R,y,x,l,n,s,c,i,a,O,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const f=r.originalStart-u,m=r.modifiedStart-u;if(fc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;const h=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],h)){e[n-1]=h[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&m>l&&(l=m,c=u,h=f)}return l>0?[c,h]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){const r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return Wt.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],Wt.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return Wt.Copy(e,0,i,0,e.length),Wt.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(Tt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Tt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new dt(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&e=Vc&&t<=jc||t>=Bc&&t<=qc}function Vn(t,e,n,r){let i="",s=0,a=-1,o=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),a=c,o=0;continue}else if(i.length!==0){i="",s=0,a=c,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,c)}`:i=t.slice(a+1,c),s=c-a-1;a=c,o=0}else l===pt&&o!==-1?++o:o=-1}return i}function ws(t,e){Hc(e,"pathObject");const n=e.dir||e.root,r=e.base||`${e.name||""}${e.ext||""}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const _e={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],he(s,"path"),s.length===0)continue}else e.length===0?s=Un():(s=Oc[`=${e}`]||Un(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Ee)&&(s=`${e}\\`));const a=s.length;let o=0,l="",c=!1;const h=s.charCodeAt(0);if(a===1)X(h)&&(o=1,c=!0);else if(X(h))if(c=!0,X(s.charCodeAt(1))){let u=2,f=u;for(;u2&&X(s.charCodeAt(2))&&(c=!0,o=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=c,c&&e.length>0)break}return n=Vn(n,!r,"\\",X),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){he(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return Pr(s)?"\\":t;if(X(s))if(i=!0,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&X(t.charCodeAt(e-1))&&(a+="\\"),r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){he(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return X(n)||e>2&>(n)&&t.charCodeAt(1)===ft&&X(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&X(n.charCodeAt(0))){++i;const s=n.length;s>1&&X(n.charCodeAt(1))&&(++i,s>2&&(X(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return _e.normalize(e)},relative(t,e){if(he(t,"from"),he(e,"to"),t===e)return"";const n=_e.resolve(t),r=_e.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";let i=0;for(;ii&&t.charCodeAt(s-1)===Ee;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(l-1)===Ee;)l--;const c=l-o,h=ah){if(e.charCodeAt(o+f)===Ee)return r.slice(o+f+1);if(f===2)return r.slice(o+f)}a>h&&(t.charCodeAt(i+f)===Ee?u=f:f===2&&(u=3)),u===-1&&(u=0)}let m="";for(f=i+u+1;f<=s;++f)(f===s||t.charCodeAt(f)===Ee)&&(m+=m.length===0?"..":"\\..");return o+=u,m.length>0?`${m}${r.slice(o,l)}`:(r.charCodeAt(o)===Ee&&++o,r.slice(o,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=_e.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Ee){if(e.charCodeAt(1)===Ee){const n=e.charCodeAt(2);if(n!==$c&&n!==pt)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(gt(e.charCodeAt(0))&&e.charCodeAt(1)===ft&&e.charCodeAt(2)===Ee)return`\\\\?\\${e}`;return t},dirname(t){he(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return X(i)?t:".";if(X(i)){if(n=r=1,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(X(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&he(e,"ext"),he(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&>(t.charCodeAt(0))&&t.charCodeAt(1)===ft&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const l=t.charCodeAt(s);if(X(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(X(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===ft&>(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const l=t.charCodeAt(o);if(X(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===pt?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:ws.bind(null,"\\"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return X(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(X(i)){if(r=1,X(t.charCodeAt(1))){let u=2,f=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,l=!0,c=t.length-1,h=0;for(;c>=r;--c){if(i=t.charCodeAt(c),X(i)){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),i===pt?s===-1?s=c:h!==1&&(h=1):s!==-1&&(h=-1)}return o!==-1&&(s===-1||h===0||h===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Gc=(()=>{if(mt){const t=/\\/g;return()=>{const e=Un().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Un()})(),De={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:Gc();he(i,"path"),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===ye)}return e=Vn(e,!n,"/",Pr),n?`/${e}`:e.length>0?e:"."},normalize(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ye,n=t.charCodeAt(t.length-1)===ye;return t=Vn(t,!e,"/",Pr),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return he(t,"path"),t.length>0&&t.charCodeAt(0)===ye},join(...t){if(t.length===0)return".";let e;for(let n=0;n0&&(e===void 0?e=r:e+=`/${r}`)}return e===void 0?".":De.normalize(e)},relative(t,e){if(he(t,"from"),he(e,"to"),t===e||(t=De.resolve(t),e=De.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+c)===ye)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>o&&(t.charCodeAt(n+c)===ye?l=c:c===0&&(l=0));let h="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===ye)&&(h+=h.length===0?"..":"/..");return`${h}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(he(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===ye;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===ye){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&he(e,"ext"),he(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const l=t.charCodeAt(s);if(l===ye){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===ye){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){he(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t.charCodeAt(a);if(o===ye){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o===pt?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:ws.bind(null,"/"),parse(t){he(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===ye;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=t.length-1,c=0;for(;l>=r;--l){const h=t.charCodeAt(l);if(h===ye){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),h===pt?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const h=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(h,a):(e.name=t.slice(h,i),e.base=t.slice(h,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};De.win32=_e.win32=_e,De.posix=_e.posix=De,mt?_e.normalize:De.normalize,mt?_e.resolve:De.resolve,mt?_e.relative:De.relative,mt?_e.dirname:De.dirname,mt?_e.basename:De.basename,mt?_e.extname:De.extname,mt?_e.sep:De.sep;const Jc=/^\w[\w\d+.-]*$/,Xc=/^\//,Yc=/^\/\//;function Kc(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!Jc.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Xc.test(t.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(Yc.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Qc(t,e){return!t&&!e?"file":t}function Zc(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==$e&&(e=$e+e):e=$e;break}return e}const oe="",$e="/",eh=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Lr=class Sr{static isUri(e){return e instanceof Sr?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||oe,this.authority=e.authority||oe,this.path=e.path||oe,this.query=e.query||oe,this.fragment=e.fragment||oe):(this.scheme=Qc(e,a),this.authority=n||oe,this.path=Zc(this.scheme,r||oe),this.query=i||oe,this.fragment=s||oe,Kc(this,a))}get fsPath(){return Ir(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=oe),r===void 0?r=this.authority:r===null&&(r=oe),i===void 0?i=this.path:i===null&&(i=oe),s===void 0?s=this.query:s===null&&(s=oe),a===void 0?a=this.fragment:a===null&&(a=oe),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new Ut(n,r,i,s,a)}static parse(e,n=!1){const r=eh.exec(e);return r?new Ut(r[2]||oe,Bn(r[4]||oe),Bn(r[5]||oe),Bn(r[7]||oe),Bn(r[9]||oe),n):new Ut(oe,oe,oe,oe,oe)}static file(e){let n=oe;if(rn&&(e=e.replace(/\\/g,$e)),e[0]===$e&&e[1]===$e){const r=e.indexOf($e,2);r===-1?(n=e.substring(2),e=$e):(n=e.substring(2,r),e=e.substring(r)||$e)}return new Ut("file",n,e,oe,oe)}static from(e,n){return new Ut(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return rn&&e.scheme==="file"?r=Sr.file(_e.join(Ir(e,!0),...n)).path:r=De.join(e.path,...n),e.with({path:r})}toString(e=!1){return Tr(this,e)}toJSON(){return this}static revive(e){var n,r;if(e){if(e instanceof Sr)return e;{const i=new Ut(e);return i._formatted=(n=e.external)!==null&&n!==void 0?n:null,i._fsPath=e._sep===xs&&(r=e.fsPath)!==null&&r!==void 0?r:null,i}}else return e}};const xs=rn?1:void 0;class Ut extends Lr{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ir(this,!1)),this._fsPath}toString(e=!1){return e?Tr(this,!0):(this._formatted||(this._formatted=Tr(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=xs),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Ss={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"};function Cs(t,e,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));const o=Ss[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function th(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,rn&&(n=n.replace(/\//g,"\\")),n}function Tr(t,e){const n=e?th:Cs;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=$e,r+=$e),s){let c=s.indexOf("@");if(c!==-1){const h=s.substr(0,c);s=s.substr(c+1),c=h.lastIndexOf(":"),c===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,c),!1,!1),r+=":",r+=n(h.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:Cs(l,!1,!1)),r}function ks(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+ks(t.substr(3)):t}}const _s=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Bn(t){return t.match(_s)?t.replace(_s,e=>ks(e)):t}let Xe=class Mt{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new Mt(e,n)}delta(e=0,n=0){return this.with(this.lineNumber+e,this.column+n)}equals(e){return Mt.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return Mt.isBefore(this,e)}static isBefore(e,n){return e.lineNumberr||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return ue.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return ue.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return ue.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return ue.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return ue.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new ue(r,i,s,a)}intersectRanges(e){return ue.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn;const o=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,h=n.endColumn;return rc?(s=c,a=h):s===c&&(a=Math.min(a,h)),r>s||r===s&&i>a?null:new ue(r,i,s,a)}equalsRange(e){return ue.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return ue.getEndPosition(this)}static getEndPosition(e){return new Xe(e.endLineNumber,e.endColumn)}getStartPosition(){return ue.getStartPosition(this)}static getStartPosition(e){return new Xe(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new ue(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new ue(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return ue.collapseToStart(this)}static collapseToStart(e){return new ue(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return ue.collapseToEnd(this)}static collapseToEnd(e){return new ue(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new ue(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,n=e){return new ue(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new ue(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function nh(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r=0;n--){const r=t[n];if(e(r))return n}return-1}var jn;(function(t){function e(s){return s<0}t.isLessThan=e;function n(s){return s<=0}t.isLessThanOrEqual=n;function r(s){return s>0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(jn||(jn={}));function Wr(t,e){return(n,r)=>e(t(n),t(r))}const qn=(t,e)=>t-e;function rh(t){return(e,n)=>-t(e,n)}function Fs(t){return t<0?0:t>255?255:t|0}function Vt(t){return t<0?0:t>4294967295?4294967295:t|0}class ih{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Vt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Vt(e),n=Vt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Vt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new sh(i,e-a)}}class sh{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class ah{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new Xe(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function lh(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of oh)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const Es=lh();function ch(t){let e=Es;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const Ds=new rc;Ds.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Or(t,e,n,r,i){if(i||(i=Tn.first(Ds)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),Or(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const h=a-i.windowSize*c;e.lastIndex=Math.max(0,h);const u=hh(e,n,a,o);if(!u&&l||(l=u,h<=0))break;o=h}if(l){const c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function hh(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class Ur{constructor(e){const n=Fs(e);this._defaultValue=n,this._asciiMap=Ur._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const r=Fs(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class dh{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=l),o>r&&(r=o),c>r&&(r=c)}n++,r++;const i=new dh(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let Vr=null;function ph(){return Vr===null&&(Vr=new uh([[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]])),Vr}let sn=null;function fh(){if(sn===null){sn=new Ur(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=ph()){const r=fh(),i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),l=o.length;let c=0,h=0,u=0,f=1,m=!1,g=!1,b=!1,y=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}Br.INSTANCE=new Br;const As=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var Hn;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Gn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:kr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:As})})(Hn||(Hn={}));class Gn{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?As:(this._emitter||(this._emitter=new Be),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class gh{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Gn),this._token}cancel(){this._token?this._token instanceof Gn&&this._token.cancel():this._token=Hn.Cancelled}dispose(e=!1){var n;e&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof Gn&&this._token.dispose():this._token=Hn.None}}class jr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const Jn=new jr,qr=new jr,$r=new jr,bh=new Array(230),vh=Object.create(null),yh=Object.create(null);(function(){const t="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[1,1,"Hyper",0,t,0,t,t,t],[1,2,"Super",0,t,0,t,t,t],[1,3,"Fn",0,t,0,t,t,t],[1,4,"FnLock",0,t,0,t,t,t],[1,5,"Suspend",0,t,0,t,t,t],[1,6,"Resume",0,t,0,t,t,t],[1,7,"Turbo",0,t,0,t,t,t],[1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[1,9,"WakeUp",0,t,0,t,t,t],[0,10,"KeyA",31,"A",65,"VK_A",t,t],[0,11,"KeyB",32,"B",66,"VK_B",t,t],[0,12,"KeyC",33,"C",67,"VK_C",t,t],[0,13,"KeyD",34,"D",68,"VK_D",t,t],[0,14,"KeyE",35,"E",69,"VK_E",t,t],[0,15,"KeyF",36,"F",70,"VK_F",t,t],[0,16,"KeyG",37,"G",71,"VK_G",t,t],[0,17,"KeyH",38,"H",72,"VK_H",t,t],[0,18,"KeyI",39,"I",73,"VK_I",t,t],[0,19,"KeyJ",40,"J",74,"VK_J",t,t],[0,20,"KeyK",41,"K",75,"VK_K",t,t],[0,21,"KeyL",42,"L",76,"VK_L",t,t],[0,22,"KeyM",43,"M",77,"VK_M",t,t],[0,23,"KeyN",44,"N",78,"VK_N",t,t],[0,24,"KeyO",45,"O",79,"VK_O",t,t],[0,25,"KeyP",46,"P",80,"VK_P",t,t],[0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[0,27,"KeyR",48,"R",82,"VK_R",t,t],[0,28,"KeyS",49,"S",83,"VK_S",t,t],[0,29,"KeyT",50,"T",84,"VK_T",t,t],[0,30,"KeyU",51,"U",85,"VK_U",t,t],[0,31,"KeyV",52,"V",86,"VK_V",t,t],[0,32,"KeyW",53,"W",87,"VK_W",t,t],[0,33,"KeyX",54,"X",88,"VK_X",t,t],[0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[0,36,"Digit1",22,"1",49,"VK_1",t,t],[0,37,"Digit2",23,"2",50,"VK_2",t,t],[0,38,"Digit3",24,"3",51,"VK_3",t,t],[0,39,"Digit4",25,"4",52,"VK_4",t,t],[0,40,"Digit5",26,"5",53,"VK_5",t,t],[0,41,"Digit6",27,"6",54,"VK_6",t,t],[0,42,"Digit7",28,"7",55,"VK_7",t,t],[0,43,"Digit8",29,"8",56,"VK_8",t,t],[0,44,"Digit9",30,"9",57,"VK_9",t,t],[0,45,"Digit0",21,"0",48,"VK_0",t,t],[1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[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,t,0,t,t,t],[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",t,t],[1,64,"F1",59,"F1",112,"VK_F1",t,t],[1,65,"F2",60,"F2",113,"VK_F2",t,t],[1,66,"F3",61,"F3",114,"VK_F3",t,t],[1,67,"F4",62,"F4",115,"VK_F4",t,t],[1,68,"F5",63,"F5",116,"VK_F5",t,t],[1,69,"F6",64,"F6",117,"VK_F6",t,t],[1,70,"F7",65,"F7",118,"VK_F7",t,t],[1,71,"F8",66,"F8",119,"VK_F8",t,t],[1,72,"F9",67,"F9",120,"VK_F9",t,t],[1,73,"F10",68,"F10",121,"VK_F10",t,t],[1,74,"F11",69,"F11",122,"VK_F11",t,t],[1,75,"F12",70,"F12",123,"VK_F12",t,t],[1,76,"PrintScreen",0,t,0,t,t,t],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",t,t],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[1,80,"Home",14,"Home",36,"VK_HOME",t,t],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[1,83,"End",13,"End",35,"VK_END",t,t],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",t,t],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",t,t],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",t,t],[1,94,"NumpadEnter",3,t,0,t,t,t],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",t,t],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",t,t],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",t,t],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",t,t],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",t,t],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",t,t],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",t,t],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",t,t],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",t,t],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",t,t],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",t,t],[1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[1,108,"Power",0,t,0,t,t,t],[1,109,"NumpadEqual",0,t,0,t,t,t],[1,110,"F13",71,"F13",124,"VK_F13",t,t],[1,111,"F14",72,"F14",125,"VK_F14",t,t],[1,112,"F15",73,"F15",126,"VK_F15",t,t],[1,113,"F16",74,"F16",127,"VK_F16",t,t],[1,114,"F17",75,"F17",128,"VK_F17",t,t],[1,115,"F18",76,"F18",129,"VK_F18",t,t],[1,116,"F19",77,"F19",130,"VK_F19",t,t],[1,117,"F20",78,"F20",131,"VK_F20",t,t],[1,118,"F21",79,"F21",132,"VK_F21",t,t],[1,119,"F22",80,"F22",133,"VK_F22",t,t],[1,120,"F23",81,"F23",134,"VK_F23",t,t],[1,121,"F24",82,"F24",135,"VK_F24",t,t],[1,122,"Open",0,t,0,t,t,t],[1,123,"Help",0,t,0,t,t,t],[1,124,"Select",0,t,0,t,t,t],[1,125,"Again",0,t,0,t,t,t],[1,126,"Undo",0,t,0,t,t,t],[1,127,"Cut",0,t,0,t,t,t],[1,128,"Copy",0,t,0,t,t,t],[1,129,"Paste",0,t,0,t,t,t],[1,130,"Find",0,t,0,t,t,t],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",t,t],[1,136,"KanaMode",0,t,0,t,t,t],[0,137,"IntlYen",0,t,0,t,t,t],[1,138,"Convert",0,t,0,t,t,t],[1,139,"NonConvert",0,t,0,t,t,t],[1,140,"Lang1",0,t,0,t,t,t],[1,141,"Lang2",0,t,0,t,t,t],[1,142,"Lang3",0,t,0,t,t,t],[1,143,"Lang4",0,t,0,t,t,t],[1,144,"Lang5",0,t,0,t,t,t],[1,145,"Abort",0,t,0,t,t,t],[1,146,"Props",0,t,0,t,t,t],[1,147,"NumpadParenLeft",0,t,0,t,t,t],[1,148,"NumpadParenRight",0,t,0,t,t,t],[1,149,"NumpadBackspace",0,t,0,t,t,t],[1,150,"NumpadMemoryStore",0,t,0,t,t,t],[1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[1,152,"NumpadMemoryClear",0,t,0,t,t,t],[1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",t,t],[1,156,"NumpadClearEntry",0,t,0,t,t,t],[1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[1,0,t,6,"Alt",18,"VK_MENU",t,t],[1,0,t,57,"Meta",91,"VK_COMMAND",t,t],[1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[1,165,"BrightnessUp",0,t,0,t,t,t],[1,166,"BrightnessDown",0,t,0,t,t,t],[1,167,"MediaPlay",0,t,0,t,t,t],[1,168,"MediaRecord",0,t,0,t,t,t],[1,169,"MediaFastForward",0,t,0,t,t,t],[1,170,"MediaRewind",0,t,0,t,t,t],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",t,t],[1,174,"Eject",0,t,0,t,t,t],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[1,180,"SelectTask",0,t,0,t,t,t],[1,181,"LaunchScreenSaver",0,t,0,t,t,t],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[1,189,"ZoomToggle",0,t,0,t,t,t],[1,190,"MailReply",0,t,0,t,t,t],[1,191,"MailForward",0,t,0,t,t,t],[1,192,"MailSend",0,t,0,t,t,t],[1,0,t,114,"KeyInComposition",229,t,t,t],[1,0,t,116,"ABNT_C2",194,"VK_ABNT_C2",t,t],[1,0,t,96,"OEM_8",223,"VK_OEM_8",t,t],[1,0,t,0,t,0,"VK_KANA",t,t],[1,0,t,0,t,0,"VK_HANGUL",t,t],[1,0,t,0,t,0,"VK_JUNJA",t,t],[1,0,t,0,t,0,"VK_FINAL",t,t],[1,0,t,0,t,0,"VK_HANJA",t,t],[1,0,t,0,t,0,"VK_KANJI",t,t],[1,0,t,0,t,0,"VK_CONVERT",t,t],[1,0,t,0,t,0,"VK_NONCONVERT",t,t],[1,0,t,0,t,0,"VK_ACCEPT",t,t],[1,0,t,0,t,0,"VK_MODECHANGE",t,t],[1,0,t,0,t,0,"VK_SELECT",t,t],[1,0,t,0,t,0,"VK_PRINT",t,t],[1,0,t,0,t,0,"VK_EXECUTE",t,t],[1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[1,0,t,0,t,0,"VK_HELP",t,t],[1,0,t,0,t,0,"VK_APPS",t,t],[1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[1,0,t,0,t,0,"VK_PACKET",t,t],[1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[1,0,t,0,t,0,"VK_ATTN",t,t],[1,0,t,0,t,0,"VK_CRSEL",t,t],[1,0,t,0,t,0,"VK_EXSEL",t,t],[1,0,t,0,t,0,"VK_EREOF",t,t],[1,0,t,0,t,0,"VK_PLAY",t,t],[1,0,t,0,t,0,"VK_ZOOM",t,t],[1,0,t,0,t,0,"VK_NONAME",t,t],[1,0,t,0,t,0,"VK_PA1",t,t],[1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]],n=[],r=[];for(const i of e){const[s,a,o,l,c,h,u,f,m]=i;if(r[a]||(r[a]=!0,vh[o]=a,yh[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);Jn.define(l,c),qr.define(l,f||c),$r.define(l,m||f||c)}h&&(bh[h]=l)}})();var Ns;(function(t){function e(o){return Jn.keyCodeToStr(o)}t.toString=e;function n(o){return Jn.strToKeyCode(o)}t.fromString=n;function r(o){return qr.keyCodeToStr(o)}t.toUserSettingsUS=r;function i(o){return $r.keyCodeToStr(o)}t.toUserSettingsGeneral=i;function s(o){return qr.strToKeyCode(o)||$r.strToKeyCode(o)}t.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Jn.keyCodeToStr(o)}t.toElectronAccelerator=a})(Ns||(Ns={}));function wh(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}class Ne extends Ae{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Ne.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new Ne(this.startLineNumber,this.startColumn,e,n):new Ne(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new Xe(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Xe(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new Ne(e,n,this.endLineNumber,this.endColumn):new Ne(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new Ne(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new Ne(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Ne(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Ne(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){var r;(r=this._factories.get(e))===null||r===void 0||r.dispose();const i=new Sh(this,e,n);return this._factories.set(e,i),tn(()=>{const s=this._factories.get(e);!s||s!==i||(this._factories.delete(e),s.dispose())})}getOrCreate(e){return Hr(this,void 0,void 0,function*(){const n=this.get(e);if(n)return n;const r=this._factories.get(e);return!r||r.isResolved?null:(yield r.resolve(),this.get(e))})}isResolved(e){if(this.get(e))return!0;const r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Sh extends nn{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return Hr(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return Hr(this,void 0,void 0,function*(){const e=yield this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))})}}class Ch{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var zs;(function(t){const e=new Map;e.set(0,B.symbolMethod),e.set(1,B.symbolFunction),e.set(2,B.symbolConstructor),e.set(3,B.symbolField),e.set(4,B.symbolVariable),e.set(5,B.symbolClass),e.set(6,B.symbolStruct),e.set(7,B.symbolInterface),e.set(8,B.symbolModule),e.set(9,B.symbolProperty),e.set(10,B.symbolEvent),e.set(11,B.symbolOperator),e.set(12,B.symbolUnit),e.set(13,B.symbolValue),e.set(15,B.symbolEnum),e.set(14,B.symbolConstant),e.set(15,B.symbolEnum),e.set(16,B.symbolEnumMember),e.set(17,B.symbolKeyword),e.set(27,B.symbolSnippet),e.set(18,B.symbolText),e.set(19,B.symbolColor),e.set(20,B.symbolFile),e.set(21,B.symbolReference),e.set(22,B.symbolCustomColor),e.set(23,B.symbolFolder),e.set(24,B.symbolTypeParameter),e.set(25,B.account),e.set(26,B.issues);function n(s){let a=e.get(s);return a||(console.info("No codicon found for CompletionItemKind "+s),a=B.symbolProperty),a}t.toIcon=n;const r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,a){let o=r.get(s);return typeof o>"u"&&!a&&(o=9),o}t.fromString=i})(zs||(zs={}));var Ps;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Ps||(Ps={}));var Ls;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Ls||(Ls={}));var Is;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Is||(Is={})),ae("Array","array"),ae("Boolean","boolean"),ae("Class","class"),ae("Constant","constant"),ae("Constructor","constructor"),ae("Enum","enumeration"),ae("EnumMember","enumeration member"),ae("Event","event"),ae("Field","field"),ae("File","file"),ae("Function","function"),ae("Interface","interface"),ae("Key","key"),ae("Method","method"),ae("Module","module"),ae("Namespace","namespace"),ae("Null","null"),ae("Number","number"),ae("Object","object"),ae("Operator","operator"),ae("Package","package"),ae("Property","property"),ae("String","string"),ae("Struct","struct"),ae("TypeParameter","type parameter"),ae("Variable","variable");var Ts;(function(t){const e=new Map;e.set(0,B.symbolFile),e.set(1,B.symbolModule),e.set(2,B.symbolNamespace),e.set(3,B.symbolPackage),e.set(4,B.symbolClass),e.set(5,B.symbolMethod),e.set(6,B.symbolProperty),e.set(7,B.symbolField),e.set(8,B.symbolConstructor),e.set(9,B.symbolEnum),e.set(10,B.symbolInterface),e.set(11,B.symbolFunction),e.set(12,B.symbolVariable),e.set(13,B.symbolConstant),e.set(14,B.symbolString),e.set(15,B.symbolNumber),e.set(16,B.symbolBoolean),e.set(17,B.symbolArray),e.set(18,B.symbolObject),e.set(19,B.symbolKey),e.set(20,B.symbolNull),e.set(21,B.symbolEnumMember),e.set(22,B.symbolStruct),e.set(23,B.symbolEvent),e.set(24,B.symbolOperator),e.set(25,B.symbolTypeParameter);function n(r){let i=e.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=B.symbolProperty),i}t.toIcon=n})(Ts||(Ts={}));var Ws;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(Ws||(Ws={}));var Os;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Os||(Os={})),new xh;var Us;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(Us||(Us={}));var Vs;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(Vs||(Vs={}));var Bs;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(Bs||(Bs={}));var js;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(js||(js={}));var qs;(function(t){t[t.Deprecated=1]="Deprecated"})(qs||(qs={}));var $s;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})($s||($s={}));var Hs;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(Hs||(Hs={}));var Gs;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Gs||(Gs={}));var Js;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Js||(Js={}));var Xs;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Xs||(Xs={}));var Ys;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Ys||(Ys={}));var Ks;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.ariaRequired=5]="ariaRequired",t[t.autoClosingBrackets=6]="autoClosingBrackets",t[t.screenReaderAnnounceInlineSuggestion=7]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=8]="autoClosingDelete",t[t.autoClosingOvertype=9]="autoClosingOvertype",t[t.autoClosingQuotes=10]="autoClosingQuotes",t[t.autoIndent=11]="autoIndent",t[t.automaticLayout=12]="automaticLayout",t[t.autoSurround=13]="autoSurround",t[t.bracketPairColorization=14]="bracketPairColorization",t[t.guides=15]="guides",t[t.codeLens=16]="codeLens",t[t.codeLensFontFamily=17]="codeLensFontFamily",t[t.codeLensFontSize=18]="codeLensFontSize",t[t.colorDecorators=19]="colorDecorators",t[t.colorDecoratorsLimit=20]="colorDecoratorsLimit",t[t.columnSelection=21]="columnSelection",t[t.comments=22]="comments",t[t.contextmenu=23]="contextmenu",t[t.copyWithSyntaxHighlighting=24]="copyWithSyntaxHighlighting",t[t.cursorBlinking=25]="cursorBlinking",t[t.cursorSmoothCaretAnimation=26]="cursorSmoothCaretAnimation",t[t.cursorStyle=27]="cursorStyle",t[t.cursorSurroundingLines=28]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=29]="cursorSurroundingLinesStyle",t[t.cursorWidth=30]="cursorWidth",t[t.disableLayerHinting=31]="disableLayerHinting",t[t.disableMonospaceOptimizations=32]="disableMonospaceOptimizations",t[t.domReadOnly=33]="domReadOnly",t[t.dragAndDrop=34]="dragAndDrop",t[t.dropIntoEditor=35]="dropIntoEditor",t[t.emptySelectionClipboard=36]="emptySelectionClipboard",t[t.experimentalWhitespaceRendering=37]="experimentalWhitespaceRendering",t[t.extraEditorClassName=38]="extraEditorClassName",t[t.fastScrollSensitivity=39]="fastScrollSensitivity",t[t.find=40]="find",t[t.fixedOverflowWidgets=41]="fixedOverflowWidgets",t[t.folding=42]="folding",t[t.foldingStrategy=43]="foldingStrategy",t[t.foldingHighlight=44]="foldingHighlight",t[t.foldingImportsByDefault=45]="foldingImportsByDefault",t[t.foldingMaximumRegions=46]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=47]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=48]="fontFamily",t[t.fontInfo=49]="fontInfo",t[t.fontLigatures=50]="fontLigatures",t[t.fontSize=51]="fontSize",t[t.fontWeight=52]="fontWeight",t[t.fontVariations=53]="fontVariations",t[t.formatOnPaste=54]="formatOnPaste",t[t.formatOnType=55]="formatOnType",t[t.glyphMargin=56]="glyphMargin",t[t.gotoLocation=57]="gotoLocation",t[t.hideCursorInOverviewRuler=58]="hideCursorInOverviewRuler",t[t.hover=59]="hover",t[t.inDiffEditor=60]="inDiffEditor",t[t.inlineSuggest=61]="inlineSuggest",t[t.letterSpacing=62]="letterSpacing",t[t.lightbulb=63]="lightbulb",t[t.lineDecorationsWidth=64]="lineDecorationsWidth",t[t.lineHeight=65]="lineHeight",t[t.lineNumbers=66]="lineNumbers",t[t.lineNumbersMinChars=67]="lineNumbersMinChars",t[t.linkedEditing=68]="linkedEditing",t[t.links=69]="links",t[t.matchBrackets=70]="matchBrackets",t[t.minimap=71]="minimap",t[t.mouseStyle=72]="mouseStyle",t[t.mouseWheelScrollSensitivity=73]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=74]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=75]="multiCursorMergeOverlapping",t[t.multiCursorModifier=76]="multiCursorModifier",t[t.multiCursorPaste=77]="multiCursorPaste",t[t.multiCursorLimit=78]="multiCursorLimit",t[t.occurrencesHighlight=79]="occurrencesHighlight",t[t.overviewRulerBorder=80]="overviewRulerBorder",t[t.overviewRulerLanes=81]="overviewRulerLanes",t[t.padding=82]="padding",t[t.pasteAs=83]="pasteAs",t[t.parameterHints=84]="parameterHints",t[t.peekWidgetDefaultFocus=85]="peekWidgetDefaultFocus",t[t.definitionLinkOpensInPeek=86]="definitionLinkOpensInPeek",t[t.quickSuggestions=87]="quickSuggestions",t[t.quickSuggestionsDelay=88]="quickSuggestionsDelay",t[t.readOnly=89]="readOnly",t[t.readOnlyMessage=90]="readOnlyMessage",t[t.renameOnType=91]="renameOnType",t[t.renderControlCharacters=92]="renderControlCharacters",t[t.renderFinalNewline=93]="renderFinalNewline",t[t.renderLineHighlight=94]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=95]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=96]="renderValidationDecorations",t[t.renderWhitespace=97]="renderWhitespace",t[t.revealHorizontalRightPadding=98]="revealHorizontalRightPadding",t[t.roundedSelection=99]="roundedSelection",t[t.rulers=100]="rulers",t[t.scrollbar=101]="scrollbar",t[t.scrollBeyondLastColumn=102]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=103]="scrollBeyondLastLine",t[t.scrollPredominantAxis=104]="scrollPredominantAxis",t[t.selectionClipboard=105]="selectionClipboard",t[t.selectionHighlight=106]="selectionHighlight",t[t.selectOnLineNumbers=107]="selectOnLineNumbers",t[t.showFoldingControls=108]="showFoldingControls",t[t.showUnused=109]="showUnused",t[t.snippetSuggestions=110]="snippetSuggestions",t[t.smartSelect=111]="smartSelect",t[t.smoothScrolling=112]="smoothScrolling",t[t.stickyScroll=113]="stickyScroll",t[t.stickyTabStops=114]="stickyTabStops",t[t.stopRenderingLineAfter=115]="stopRenderingLineAfter",t[t.suggest=116]="suggest",t[t.suggestFontSize=117]="suggestFontSize",t[t.suggestLineHeight=118]="suggestLineHeight",t[t.suggestOnTriggerCharacters=119]="suggestOnTriggerCharacters",t[t.suggestSelection=120]="suggestSelection",t[t.tabCompletion=121]="tabCompletion",t[t.tabIndex=122]="tabIndex",t[t.unicodeHighlighting=123]="unicodeHighlighting",t[t.unusualLineTerminators=124]="unusualLineTerminators",t[t.useShadowDOM=125]="useShadowDOM",t[t.useTabStops=126]="useTabStops",t[t.wordBreak=127]="wordBreak",t[t.wordSeparators=128]="wordSeparators",t[t.wordWrap=129]="wordWrap",t[t.wordWrapBreakAfterCharacters=130]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=131]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=132]="wordWrapColumn",t[t.wordWrapOverride1=133]="wordWrapOverride1",t[t.wordWrapOverride2=134]="wordWrapOverride2",t[t.wrappingIndent=135]="wrappingIndent",t[t.wrappingStrategy=136]="wrappingStrategy",t[t.showDeprecated=137]="showDeprecated",t[t.inlayHints=138]="inlayHints",t[t.editorClassName=139]="editorClassName",t[t.pixelRatio=140]="pixelRatio",t[t.tabFocusMode=141]="tabFocusMode",t[t.layoutInfo=142]="layoutInfo",t[t.wrappingInfo=143]="wrappingInfo",t[t.defaultColorDecorators=144]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=145]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=146]="inlineCompletionsAccessibilityVerbose"})(Ks||(Ks={}));var Qs;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Qs||(Qs={}));var Zs;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Zs||(Zs={}));var ea;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(ea||(ea={}));var ta;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(ta||(ta={}));var na;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(na||(na={}));var ra;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(ra||(ra={}));var ia;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ia||(ia={}));var Gr;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(Gr||(Gr={}));var Jr;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Jr||(Jr={}));var Xr;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(Xr||(Xr={}));var sa;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(sa||(sa={}));var aa;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(aa||(aa={}));var oa;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(oa||(oa={}));var la;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(la||(la={}));var ca;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(ca||(ca={}));var ha;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(ha||(ha={}));var da;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(da||(da={}));var ua;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(ua||(ua={}));var pa;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(pa||(pa={}));var Yr;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Yr||(Yr={}));var fa;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(fa||(fa={}));var ma;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(ma||(ma={}));var ga;(function(t){t[t.Deprecated=1]="Deprecated"})(ga||(ga={}));var ba;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(ba||(ba={}));var va;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(va||(va={}));var ya;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(ya||(ya={}));var wa;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(wa||(wa={}));class an{static chord(e,n){return wh(e,n)}}an.CtrlCmd=2048,an.Shift=1024,an.Alt=512,an.WinCtrl=256;function kh(){return{editor:void 0,languages:void 0,CancellationTokenSource:gh,Emitter:Be,KeyCode:Gr,KeyMod:an,Position:Xe,Range:Ae,Selection:Ne,SelectionDirection:Yr,MarkerSeverity:Jr,MarkerTag:Xr,Uri:Lr,Token:Ch}}var xa;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(xa||(xa={}));var Sa;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(Sa||(Sa={}));var Ca;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(Ca||(Ca={}));var ka;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(ka||(ka={}));function _h(t,e,n,r,i){if(r===0)return!0;const s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Rh(t,e,n,r,i){if(r+i===n)return!0;const s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r+i-1);if(t.get(a)!==0)return!0}return!1}function Fh(t,e,n,r,i){return _h(t,e,n,r,i)&&Rh(t,e,n,r,i)}class Eh{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Rc(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Fh(this._wordSeparators,e,n,i,s))return r}while(r);return null}}function Dh(t,e="Unreachable"){throw new Error(e)}function Xn(t){if(!t()){debugger;t(),ct(new tt("Assertion Failed"))}}function _a(t,e){let n=0;for(;n0){const q=S.charCodeAt(E-1);zr(q)&&E--}if(R+1=q){u=!0;break e}h.push(new Ae(y,E+1,y,R+1))}}while(f)}return{ranges:h,hasMore:u,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){const r=new Ra(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=kt.getLocales().filter(l=>!kt.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function Nh(t,e){return`[${wc(t.map(r=>String.fromCodePoint(r)).join(""))}]`}class Ra{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=kt.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of ht.codePoints)Fa(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=Ec(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!ht.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Fa(e)&&ht.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Fa(t){return t===" "||t===` +`||t===" "}class Z{static addRange(e,n){let r=0;for(;rn))return new Z(e,n)}static ofLength(e){return new Z(0,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new tt(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Z(this.start+e,this.endExclusive+e)}deltaStart(e){return new Z(this.start+e,this.endExclusive)}deltaEnd(e){return new Z(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}containsRange(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive}contains(e){return this.start<=e&&e=this.endExclusive?this.start+(e-this.start)%this.length:e}}class te{static fromRange(e){return new te(e.startLineNumber,e.endLineNumber)}static subtract(e,n){return n?e.startLineNumber=o.startLineNumber?a=new te(a.startLineNumber,Math.max(a.endLineNumberExclusive,o.endLineNumberExclusive)):(r.push(a),a=o)}return a!==null&&r.push(a),r}static ofLength(e,n){return new te(e,e+n)}static deserialize(e){return new te(e[0],e[1])}constructor(e,n){if(e>n)throw new tt(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&e${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}flip(){var e;return new Ye(this.modifiedRange,this.originalRange,(e=this.innerChanges)===null||e===void 0?void 0:e.map(n=>n.flip()))}}class on{constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new on(this.modifiedRange,this.originalRange)}}class ln{constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ln(this.modified,this.original)}join(e){return new ln(this.original.join(e.original),this.modified.join(e.modified))}}class Kr{constructor(e,n){this.lineRangeMapping=e,this.changes=n}flip(){return new Kr(this.lineRangeMapping.flip(),this.changes.map(e=>e.flip()))}}const Mh=3;class zh{computeDiff(e,n,r){var i;const a=new Ih(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let l=null;for(const c of a.changes){let h;c.originalEndLineNumber===0?h=new te(c.originalStartLineNumber+1,c.originalStartLineNumber+1):h=new te(c.originalStartLineNumber,c.originalEndLineNumber+1);let u;c.modifiedEndLineNumber===0?u=new te(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):u=new te(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let f=new Ye(h,u,(i=c.charChanges)===null||i===void 0?void 0:i.map(m=>new on(new Ae(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new Ae(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));l&&(l.modifiedRange.endLineNumberExclusive===f.modifiedRange.startLineNumber||l.originalRange.endLineNumberExclusive===f.originalRange.startLineNumber)&&(f=new Ye(l.originalRange.join(f.originalRange),l.modifiedRange.join(f.modifiedRange),l.innerChanges&&f.innerChanges?l.innerChanges.concat(f.innerChanges):void 0),o.pop()),o.push(f),l=f}return Xn(()=>_a(o,(c,h)=>h.originalRange.startLineNumber-c.originalRange.endLineNumberExclusive===h.modifiedRange.startLineNumber-c.modifiedRange.endLineNumberExclusive&&c.originalRange.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class Bt{constructor(e,n,r,i,s,a,o,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){const i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),o=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),h=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new Bt(i,s,a,o,l,c,h,u)}}function Lh(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const m=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let b=Ea(m,g,s,!0).changes;o&&(b=Lh(b)),f=[];for(let y=0,x=b.length;y1&&b>1;){const y=f.charCodeAt(g-2),x=m.charCodeAt(b-2);if(y!==x)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,b)}{let g=Zr(f,1),b=Zr(m,1);const y=f.length+1,x=m.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-e ${this.seq2Range}`}join(e){return new Re(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new Re(this.seq1Range.delta(e),this.seq2Range.delta(e))}}class hn{isValid(){return!0}}hn.instance=new hn;class Wh{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new tt("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&b>0&&a.get(g-1,b-1)===3&&(S+=o.get(g-1,b-1)),S+=i?i(g,b):1):S=-1;const w=Math.max(y,x,S);if(w===S){const E=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,E+1),a.set(g,b,3)}else w===y?(o.set(g,b,0),a.set(g,b,1)):w===x&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,w)}const l=[];let c=e.length,h=n.length;function u(g,b){(g+1!==c||b+1!==h)&&l.push(new Re(new Z(g+1,c),new Z(b+1,h))),c=g,h=b}let f=e.length-1,m=n.length-1;for(;f>=0&&m>=0;)a.get(f,m)===3?(u(f,m),f--,m--):a.get(f,m)===1?f--:m--;return u(-1,-1),l.reverse(),new nt(l,!1)}}function Na(t,e,n){let r=n;return r=jh(t,e,r),r=qh(t,e,r),r}function Uh(t,e,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new Re(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Vh(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||m.seq1Range.length+m.seq2Range.length>5)};const l=r[o],c=a[a.length-1];h(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);return r}function Bh(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const a=[r[0]];for(let o=1;o5||g.length>500)return!1;const y=t.getText(g).trim();if(y.length>20||y.split(/\r\n|\r|\n/).length>1)return!1;const x=t.countLinesIn(f.seq1Range),S=f.seq1Range.length,w=e.countLinesIn(f.seq2Range),E=f.seq2Range.length,R=t.countLinesIn(m.seq1Range),T=m.seq1Range.length,O=e.countLinesIn(m.seq2Range),L=m.seq2Range.length,q=2*40+50;function z(F){return Math.min(F,q)}return Math.pow(Math.pow(z(x*40+S),1.5)+Math.pow(z(w*40+E),1.5),1.5)+Math.pow(Math.pow(z(R*40+T),1.5)+Math.pow(z(O*40+L),1.5),1.5)>Math.pow(Math.pow(q,1.5),1.5)*1.3};const l=r[o],c=a[a.length-1];h(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);for(let a=0;a0&&u.trim().length<=3&&o.seq1Range.length+o.seq2Range.length>100&&(l=o.seq1Range.deltaStart(-u.length),c=o.seq2Range.deltaStart(-u.length));const f=t.getText(new Z(o.seq1Range.endExclusive,h.endExclusive));f.length>0&&f.trim().length<=3&&o.seq1Range.length+o.seq2Range.length>150&&(l=l.deltaEnd(f.length),c=c.deltaEnd(f.length)),r[a]=new Re(l,c)}return r}function jh(t,e,n){if(n.length===0)return n;const r=[];r.push(n[0]);for(let s=1;s0&&(o=o.delta(c))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function qh(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&t.seq2Range.start-a>=i.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;t.seq1Range.start+oc&&(c=g,l=h)}return t.delta(l)}class $h{compute(e,n,r=hn.instance){if(e.length===0||n.length===0)return nt.trivial(e,n);function i(m,g){for(;me.length||S>n.length)continue;const w=i(x,S);a.set(l,w);const E=x===b?o.get(l+1):o.get(l-1);if(o.set(l,w!==x?new za(E,x,S,w-x):E),a.get(l)===e.length&&a.get(l)-l===n.length)break e}}let c=o.get(l);const h=[];let u=e.length,f=n.length;for(;;){const m=c?c.x+c.length:0,g=c?c.y+c.length:0;if((m!==u||g!==f)&&h.push(new Re(new Z(m,u),new Z(g,f))),!c)break;u=c.x,f=c.y,c=c.prev}return h.reverse(),new nt(h,!1)}}class za{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class Hh{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Gh{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class Jh{constructor(){this.dynamicProgrammingDiffing=new Oh,this.myersDiffingAlgorithm=new $h}computeDiff(e,n,r){if(e.length<=1&&nh(e,n,(R,T)=>R===T))return new Yn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Yn([new Ye(new te(1,e.length+1),new te(1,n.length+1),[new on(new Ae(1,1,e.length,e[0].length+1),new Ae(1,1,n.length,n[0].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?hn.instance:new Wh(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(R){let T=a.get(R);return T===void 0&&(T=a.size,a.set(R,T)),T}const l=e.map(R=>o(R.trim())),c=n.map(R=>o(R.trim())),h=new Ta(l,e),u=new Ta(c,n),f=(()=>h.length+u.length<1700?this.dynamicProgrammingDiffing.compute(h,u,i,(R,T)=>e[R]===n[T]?n[T].length===0?.1:1+Math.log(1+n[T].length):.99):this.myersDiffingAlgorithm.compute(h,u))();let m=f.diffs,g=f.hitTimeout;m=Na(h,u,m),m=Vh(h,u,m);const b=[],y=R=>{if(s)for(let T=0;TR.seq1Range.start-x===R.seq2Range.start-S);const T=R.seq1Range.start-x;y(T),x=R.seq1Range.endExclusive,S=R.seq2Range.endExclusive;const O=this.refineDiff(e,n,R,i,s);O.hitTimeout&&(g=!0);for(const L of O.mappings)b.push(L)}y(e.length-x);const w=Ia(b,e,n);let E=[];return r.computeMoves&&(E=this.computeMoves(w,e,n,l,c,i,s)),Xn(()=>{function R(O,L){if(O.lineNumber<1||O.lineNumber>L.length)return!1;const q=L[O.lineNumber-1];return!(O.column<1||O.column>q.length+1)}function T(O,L){return!(O.startLineNumber<1||O.startLineNumber>L.length+1||O.endLineNumberExclusive<1||O.endLineNumberExclusive>L.length+1)}for(const O of w){if(!O.innerChanges)return!1;for(const L of O.innerChanges)if(!(R(L.modifiedRange.getStartPosition(),n)&&R(L.modifiedRange.getEndPosition(),n)&&R(L.originalRange.getStartPosition(),e)&&R(L.originalRange.getEndPosition(),e)))return!1;if(!T(O.modifiedRange,n)||!T(O.originalRange,e))return!1}return!0}),new Yn(w,E,g)}computeMoves(e,n,r,i,s,a,o){const l=[],c=e.filter(w=>w.modifiedRange.isEmpty&&w.originalRange.length>=3).map(w=>new ja(w.originalRange,n,w)),h=new Set(e.filter(w=>w.originalRange.isEmpty&&w.modifiedRange.length>=3).map(w=>new ja(w.modifiedRange,r,w))),u=new Set;for(const w of c){let E=-1,R;for(const T of h){const O=w.computeSimilarity(T);O>E&&(E=O,R=T)}if(E>.9&&R&&(h.delete(R),l.push(new ln(w.range,R.range)),u.add(w.source),u.add(R.source)),!a.isValid())return[]}const f=new Th;for(const w of e)if(!u.has(w))for(let E=w.originalRange.startLineNumber;Ew.modifiedRange.startLineNumber,qn));for(const w of e){if(u.has(w))continue;let E=[];for(let R=w.modifiedRange.startLineNumber;R{for(const F of E)if(F.originalLineRange.endLineNumberExclusive+1===q.endLineNumberExclusive&&F.modifiedLineRange.endLineNumberExclusive+1===O.endLineNumberExclusive){F.originalLineRange=new te(F.originalLineRange.startLineNumber,q.endLineNumberExclusive),F.modifiedLineRange=new te(F.modifiedLineRange.startLineNumber,O.endLineNumberExclusive),L.push(F);return}const z={modifiedLineRange:O,originalLineRange:q};m.push(z),L.push(z)}),E=L}if(!a.isValid())return[]}m.sort(rh(Wr(w=>w.modifiedLineRange.length,qn)));const g=new Pa,b=new Pa;for(const w of m){const E=w.modifiedLineRange.startLineNumber-w.originalLineRange.startLineNumber,R=g.subtractFrom(w.modifiedLineRange),T=b.subtractFrom(w.originalLineRange).map(L=>L.delta(E)),O=Xh(R,T);for(const L of O){if(L.length<3)continue;const q=L,z=L.delta(-E);l.push(new ln(z,q)),g.addRange(q),b.addRange(z)}}if(l.sort(Wr(w=>w.original.startLineNumber,qn)),l.length===0)return[];let y=[l[0]];for(let w=1;w=0&&O>=0&&T+O<=2){y[y.length-1]=E.join(R);continue}R.original.toOffsetRange().slice(n).map(z=>z.trim()).join(` +`).length<=10||y.push(R)}const x=ti.createOfSorted(e,w=>w.originalRange.endLineNumberExclusive,qn);return y=y.filter(w=>{const E=x.findLastItemBeforeOrEqual(w.original.startLineNumber)||new Ye(new te(1,1),new te(1,1),[]),R=w.modified.startLineNumber-E.modifiedRange.endLineNumberExclusive,T=w.original.startLineNumber-E.originalRange.endLineNumberExclusive;return R!==T}),y.map(w=>{const E=this.refineDiff(n,r,new Re(w.original.toOffsetRange(),w.modified.toOffsetRange()),a,o),R=Ia(E.mappings,n,r,!0);return new Kr(w,R)})}refineDiff(e,n,r,i,s){const a=new Oa(e,r.seq1Range,s),o=new Oa(n,r.seq2Range,s),l=a.length+o.length<500?this.dynamicProgrammingDiffing.compute(a,o,i):this.myersDiffingAlgorithm.compute(a,o,i);let c=l.diffs;return c=Na(a,o,c),c=Yh(a,o,c),c=Uh(a,o,c),c=Bh(a,o,c),{mappings:c.map(u=>new on(a.translateRange(u.seq1Range),o.translateRange(u.seq2Range))),hitTimeout:l.hitTimeout}}}class ti{static createOfSorted(e,n,r){return new ti(e,n,r)}constructor(e,n,r){this._items=e,this._itemToDomain=n,this._domainComparator=r,this._currentIdx=0,this._lastValue=void 0,this._hasLastValue=!1}findLastItemBeforeOrEqual(e){if(this._hasLastValue&&jn.isLessThan(this._domainComparator(e,this._lastValue)))throw new tt;for(this._lastValue=e,this._hasLastValue=!0;this._currentIdxi.endLineNumberExclusive>=e.startLineNumber),this._normalizedRanges.length),r=Rs(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}subtractFrom(e){const n=La(this._normalizedRanges.findIndex(a=>a.endLineNumberExclusive>=e.startLineNumber),this._normalizedRanges.length),r=Rs(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return[e];const i=[];let s=e.startLineNumber;for(let a=n;as&&i.push(new te(s,o.startLineNumber)),s=o.endLineNumberExclusive}return so&&r.push(new Re(i.s1Range,i.s2Range)),i=void 0}for(const o of n){let l=function(m,g){var b,y,x,S;if(!i||!i.s1Range.containsRange(m)||!i.s2Range.containsRange(g))if(i&&!(i.s1Range.endExclusive0||e.length>0;){const r=t[0],i=e[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Ia(t,e,n,r=!1){const i=[];for(const s of Zh(t.map(a=>Qh(a,e,n)),(a,o)=>a.originalRange.overlapOrTouch(o.originalRange)||a.modifiedRange.overlapOrTouch(o.modifiedRange))){const a=s[0],o=s[s.length-1];i.push(new Ye(a.originalRange.join(o.originalRange),a.modifiedRange.join(o.modifiedRange),s.map(l=>l.innerChanges[0])))}return Xn(()=>!r&&i.length>0&&i[0].originalRange.startLineNumber!==i[0].modifiedRange.startLineNumber?!1:_a(i,(s,a)=>a.originalRange.startLineNumber-s.originalRange.endLineNumberExclusive===a.modifiedRange.startLineNumber-s.modifiedRange.endLineNumberExclusive&&s.originalRange.endLineNumberExclusive=n[t.modifiedRange.startLineNumber-1].length&&t.originalRange.startColumn-1>=e[t.originalRange.startLineNumber-1].length&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);const s=new te(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),a=new te(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new Ye(s,a,[t])}function*Zh(t,e){let n,r;for(const i of t)r!==void 0&&e(r,i)?n.push(i):(n&&(yield n),n=[i]),r=i;n&&(yield n)}class Ta{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:Wa(this.lines[e-1]),r=e===this.lines.length?0:Wa(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function Wa(t){let e=0;for(;e0&&n.endExclusive>=e.length&&(n=new Z(n.start-1,n.endExclusive),i=!0),this.lineRange=n;for(let s=this.lineRange.start;sString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Va(e>0?this.elements[e-1]:-1),r=Va(ee?r=s:n=s+1}const i=n===0?0:this.firstCharOffsetByLineMinusOne[n-1];return new Xe(this.lineRange.start+n+1,e-i+1+this.additionalOffsetByLine[n])}translateRange(e){return Ae.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!ni(this.elements[e]))return;let n=e;for(;n>0&&ni(this.elements[n-1]);)n--;let r=e;for(;ra<=e.start))!==null&&n!==void 0?n:0,s=(r=rd(this.firstCharOffsetByLineMinusOne,a=>e.endExclusive<=a))!==null&&r!==void 0?r:this.elements.length;return new Z(i,s)}}function ed(t,e){let n=0,r=t.length;for(;n=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}const id={0:0,1:0,2:0,3:10,4:2,5:3,6:10,7:10};function Ua(t){return id[t]}function Va(t){return t===10?7:t===13?6:sd(t)?5:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:4}function sd(t){return t===32||t===9}const ri=new Map;function Ba(t){let e=ri.get(t);return e===void 0&&(e=ri.size,ri.set(t,e)),e}class ja{constructor(e,n,r){this.range=e,this.lines=n,this.source=r,this.histogram=[];let i=0;for(let s=e.startLineNumber-1;snew zh,getAdvanced:()=>new Jh};function bt(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class be{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Le{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=bt(Math.max(Math.min(1,n),0),3),this.l=bt(Math.max(Math.min(1,r),0),3),this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const h=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(h<=.5?u/(2*h):u/(2-2*h),1),a){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,h=2*i-c;a=Le._hue2rgb(h,c,n+1/3),o=Le._hue2rgb(h,c,n),l=Le._hue2rgb(h,c,n-1/3)}return new be(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class jt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=bt(Math.max(Math.min(1,n),0),3),this.v=bt(Math.max(Math.min(1,r),0),3),this.a=bt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new jt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,h,u]=[0,0,0];return n<60?(c=a,h=o):n<120?(c=o,h=a):n<180?(h=a,u=o):n<240?(h=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),h=Math.round((h+l)*255),u=Math.round((u+l)*255),new be(c,h,u,s)}}let pe=class Ve{static fromHex(e){return Ve.Format.CSS.parseHex(e)||Ve.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Le.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:jt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof be)this.rgba=e;else if(e instanceof Le)this._hsla=e,this.rgba=Le.toRGBA(e);else if(e instanceof jt)this._hsva=e,this.rgba=jt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&be.equals(this.rgba,e.rgba)&&Le.equals(this.hsla,e.hsla)&&jt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=Ve._relativeLuminanceForComponent(this.rgba.r),n=Ve._relativeLuminanceForComponent(this.rgba.g),r=Ve._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return bt(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const c=/^\(\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;l=Ha(dn(t,i),un(o,c),!1)}else if(a==="rgba"){const c=/^\(\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;l=Ha(dn(t,i),un(o,c),!0)}else if(a==="hsl"){const c=/^\(\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;l=Ga(dn(t,i),un(o,c),!1)}else if(a==="hsla"){const c=/^\(\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;l=Ga(dn(t,i),un(o,c),!0)}else a==="#"&&(l=ad(dn(t,i),a+o));l&&e.push(l)}return e}function ld(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:od(t)}var vt=globalThis&&globalThis.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(h){try{c(r.next(h))}catch(u){a(u)}}function l(h){try{c(r.throw(h))}catch(u){a(u)}}function c(h){h.done?s(h.value):i(h.value).then(o,l)}c((r=r.apply(t,e||[])).next())})};class cd extends ah{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}class _t{constructor(e,n){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}acceptNewModel(e){this._models[e.url]=new cd(Lr.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,n,r){return vt(this,void 0,void 0,function*(){const i=this._getModel(e);return i?Ah.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(e,n,r,i){return vt(this,void 0,void 0,function*(){const s=this._getModel(e),a=this._getModel(n);return!s||!a?null:_t.computeDiff(s,a,r,i)})}static computeDiff(e,n,r,i){const s=i==="advanced"?qa.getAdvanced():qa.getLegacy(),a=e.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function h(u){return u.map(f=>{var m;return[f.originalRange.startLineNumber,f.originalRange.endLineNumberExclusive,f.modifiedRange.startLineNumber,f.modifiedRange.endLineNumberExclusive,(m=f.innerChanges)===null||m===void 0?void 0:m.map(g=>[g.originalRange.startLineNumber,g.originalRange.startColumn,g.originalRange.endLineNumber,g.originalRange.endColumn,g.modifiedRange.startLineNumber,g.modifiedRange.startColumn,g.modifiedRange.endLineNumber,g.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:h(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,h(u.changes)])}}static _modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(e,n,r){return vt(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((o,l)=>{if(o.range&&l.range)return Ae.compareRangesUsingStarts(o.range,l.range);const c=o.range?0:1,h=l.range?0:1;return c-h});for(let{range:o,text:l,eol:c}of n){if(typeof c=="number"&&(a=c),Ae.isEmpty(o)&&!l)continue;const h=i.getValueInRange(o);if(l=l.replace(/\r\n|\n|\r/g,i.eol),h===l)continue;if(Math.max(l.length,h.length)>_t._diffLimit){s.push({range:o,text:l});continue}const u=Wc(h,l,r),f=i.offsetAt(Ae.lift(o).getStartPosition());for(const m of u){const g=i.positionAt(f+m.originalStart),b=i.positionAt(f+m.originalStart+m.originalLength),y={text:l.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:b.lineNumber,endColumn:b.column}};i.getValueInRange(y.range)!==y.text&&s.push(y)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s})}computeLinks(e){return vt(this,void 0,void 0,function*(){const n=this._getModel(e);return n?mh(n):null})}computeDefaultDocumentColors(e){return vt(this,void 0,void 0,function*(){const n=this._getModel(e);return n?ld(n):null})}textualSuggest(e,n,r,i){return vt(this,void 0,void 0,function*(){const s=new Wn,a=new RegExp(r,i),o=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const h of c.words(a))if(!(h===n||!isNaN(Number(h)))&&(o.add(h),o.size>_t._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(e,n,r,i){return vt(this,void 0,void 0,function*(){const s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let l=n.startLineNumber;lthis._host.fhr(o,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,n),Promise.resolve(Fr(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,n){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}_t._diffLimit=1e5,_t._suggestionsLimit=1e4,typeof importScripts=="function"&&(globalThis.monaco=kh());let si=!1;function Ja(t){if(si)return;si=!0;const e=new Ic(n=>{globalThis.postMessage(n)},n=>new _t(n,t));globalThis.onmessage=n=>{e.onmessage(n.data)}}globalThis.onmessage=t=>{si||Ja(null)};/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0) + * Version: 0.43.0(94c055bcbdd49f04a0fa15515e848542a79fb948) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.CustomToken=42]="CustomToken"})(p||(p={}));var $a=function(){function t(e){this.source=e,this.len=e.length,this.position=0}return t.prototype.substring=function(e,n){return n===void 0&&(n=this.position),this.source.substring(e,n)},t.prototype.eos=function(){return this.len<=this.position},t.prototype.pos=function(){return this.position},t.prototype.goBackTo=function(e){this.position=e},t.prototype.goBack=function(e){this.position-=e},t.prototype.advance=function(e){this.position+=e},t.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},t.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},t.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},t.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},t.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var n=0;n=on&&n<=ln?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=on&&r<=ln||e===0&&r===no}),!0):!1},t.prototype._newline=function(e){var n=this.stream.peekChar();switch(n){case jt:case hn:case Bt:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===jt&&this.stream.advanceIfChar(Bt)&&e.push(` -`),!0}return!1},t.prototype._escape=function(e,n){var r=this.stream.peekChar();if(r===Qr){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=on&&r<=ln||r>=Hn&&r<=Ha||r>=Gn&&r<=Ja);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===Zr||r===ei?this.stream.advance(1):this._newline([]),!0}if(r!==jt&&r!==hn&&r!==Bt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1},t.prototype._stringChar=function(e,n){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==Qr&&r!==jt&&r!==hn&&r!==Bt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1},t.prototype._string=function(e){if(this.stream.peekChar()===to||this.stream.peekChar()===eo){var n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null},t.prototype._unquotedChar=function(e){var n=this.stream.peekChar();return n!==0&&n!==Qr&&n!==to&&n!==eo&&n!==Ka&&n!==Qa&&n!==Zr&&n!==ei&&n!==Bt&&n!==hn&&n!==jt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unquotedString=function(e){for(var n=!1;this._unquotedChar(e)||this._escape(e);)n=!0;return n},t.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(n){return n===Zr||n===ei||n===Bt||n===hn||n===jt});return e>0},t.prototype._name=function(e){for(var n=!1;this._identChar(e)||this._escape(e);)n=!0;return n},t.prototype.ident=function(e){var n=this.stream.pos(),r=this._minus(e);if(r){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1},t.prototype._identFirstChar=function(e){var n=this.stream.peekChar();return n===Ya||n>=Hn&&n<=Ga||n>=Gn&&n<=Xa||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._minus=function(e){var n=this.stream.peekChar();return n===Ft?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._identChar=function(e){var n=this.stream.peekChar();return n===Ya||n===Ft||n>=Hn&&n<=Ga||n>=Gn&&n<=Xa||n>=on&&n<=ln||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unicodeRange=function(){if(this.stream.advanceIfChar(md)){var e=function(i){return i>=on&&i<=ln||i>=Hn&&i<=Ha||i>=Gn&&i<=Ja},n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(function(i){return i===fd});if(n>=1&&n<=6)if(this.stream.advanceIfChar(Ft)){var r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1},t}();function ge(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function gd(t,e,n){n===void 0&&(n=4);var r=Math.abs(t.length-e.length);if(r>n)return 0;var i=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var T=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange"})(v||(v={}));var Y;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility"})(Y||(Y={}));function ti(t,e){var n=null;return!t||et.end?null:(t.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1}),n)}function ni(t,e){for(var n=ti(t,e),r=[];n;)r.unshift(n),n=n.parent;return r}function vd(t){var e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var W=function(){function t(e,n,r){e===void 0&&(e=-1),n===void 0&&(n=-1),this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}return Object.defineProperty(t.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.nodeType||v.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),t.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},t.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},t.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},t.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},t.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},t.prototype.accept=function(e){if(e(this)&&this.children)for(var n=0,r=this.children;n=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),n!==-1?i.splice(n,0,e):i.push(e),e},t.prototype.attachTo=function(e,n){return n===void 0&&(n=-1),e&&e.adoptChild(this,n),this},t.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},t.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},t.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(n){return n.getRule()===e})},t.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(n){return n.isErroneous(!0)})},t.prototype.setNode=function(e,n,r){return r===void 0&&(r=-1),n?(n.attachTo(this,r),this[e]=n,!0):!1},t.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},t.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)},t.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},t.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},t.prototype.getChild=function(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null},t.prototype.findChildAtOffset=function(e,n){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null},t.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},t.prototype.getParent=function(){for(var e=this.parent;e instanceof xe;)e=e.parent;return e},t.prototype.findParent=function(e){for(var n=this;n&&n.type!==e;)n=n.parent;return n},t.prototype.findAParent=function(){for(var e=[],n=0;n{let s=i[0];return typeof e[s]<"u"?e[s]:r}),n}function Zd(t,e,...n){return Qd(e,n)}function Ge(t){return Zd}var Q=Ge(),Z=function(){function t(e,n){this.id=e,this.message=n}return t}(),S={NumberExpected:new Z("css-numberexpected",Q("expected.number","number expected")),ConditionExpected:new Z("css-conditionexpected",Q("expected.condt","condition expected")),RuleOrSelectorExpected:new Z("css-ruleorselectorexpected",Q("expected.ruleorselector","at-rule or selector expected")),DotExpected:new Z("css-dotexpected",Q("expected.dot","dot expected")),ColonExpected:new Z("css-colonexpected",Q("expected.colon","colon expected")),SemiColonExpected:new Z("css-semicolonexpected",Q("expected.semicolon","semi-colon expected")),TermExpected:new Z("css-termexpected",Q("expected.term","term expected")),ExpressionExpected:new Z("css-expressionexpected",Q("expected.expression","expression expected")),OperatorExpected:new Z("css-operatorexpected",Q("expected.operator","operator expected")),IdentifierExpected:new Z("css-identifierexpected",Q("expected.ident","identifier expected")),PercentageExpected:new Z("css-percentageexpected",Q("expected.percentage","percentage expected")),URIOrStringExpected:new Z("css-uriorstringexpected",Q("expected.uriorstring","uri or string expected")),URIExpected:new Z("css-uriexpected",Q("expected.uri","URI expected")),VariableNameExpected:new Z("css-varnameexpected",Q("expected.varname","variable name expected")),VariableValueExpected:new Z("css-varvalueexpected",Q("expected.varvalue","variable value expected")),PropertyValueExpected:new Z("css-propertyvalueexpected",Q("expected.propvalue","property value expected")),LeftCurlyExpected:new Z("css-lcurlyexpected",Q("expected.lcurly","{ expected")),RightCurlyExpected:new Z("css-rcurlyexpected",Q("expected.rcurly","} expected")),LeftSquareBracketExpected:new Z("css-rbracketexpected",Q("expected.lsquare","[ expected")),RightSquareBracketExpected:new Z("css-lbracketexpected",Q("expected.rsquare","] expected")),LeftParenthesisExpected:new Z("css-lparentexpected",Q("expected.lparen","( expected")),RightParenthesisExpected:new Z("css-rparentexpected",Q("expected.rparent",") expected")),CommaExpected:new Z("css-commaexpected",Q("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new Z("css-pagedirordeclexpected",Q("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new Z("css-unknownatrule",Q("unknown.atrule","at-rule unknown")),UnknownKeyword:new Z("css-unknownkeyword",Q("unknown.keyword","unknown keyword")),SelectorExpected:new Z("css-selectorexpected",Q("expected.selector","selector expected")),StringLiteralExpected:new Z("css-stringliteralexpected",Q("expected.stringliteral","string literal expected")),WhitespaceExpected:new Z("css-whitespaceexpected",Q("expected.whitespace","whitespace expected")),MediaQueryExpected:new Z("css-mediaqueryexpected",Q("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new Z("css-idorwildcardexpected",Q("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new Z("css-wildcardexpected",Q("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new Z("css-idorvarexpected",Q("expected.idorvar","identifier or variable expected"))},yo;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(yo||(yo={}));var Qn;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(Qn||(Qn={}));var Fe;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Qn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Qn.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){var i=r;return _.objectLiteral(i)&&_.uinteger(i.line)&&_.uinteger(i.character)}t.is=n})(Fe||(Fe={}));var te;(function(t){function e(r,i,s,a){if(_.uinteger(r)&&_.uinteger(i)&&_.uinteger(s)&&_.uinteger(a))return{start:Fe.create(r,i),end:Fe.create(s,a)};if(Fe.is(r)&&Fe.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+s+", "+a+"]")}t.create=e;function n(r){var i=r;return _.objectLiteral(i)&&Fe.is(i.start)&&Fe.is(i.end)}t.is=n})(te||(te={}));var bn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&te.is(i.range)&&(_.string(i.uri)||_.undefined(i.uri))}t.is=n})(bn||(bn={}));var wo;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){var i=r;return _.defined(i)&&te.is(i.targetRange)&&_.string(i.targetUri)&&(te.is(i.targetSelectionRange)||_.undefined(i.targetSelectionRange))&&(te.is(i.originSelectionRange)||_.undefined(i.originSelectionRange))}t.is=n})(wo||(wo={}));var pi;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){var i=r;return _.numberRange(i.red,0,1)&&_.numberRange(i.green,0,1)&&_.numberRange(i.blue,0,1)&&_.numberRange(i.alpha,0,1)}t.is=n})(pi||(pi={}));var xo;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){var i=r;return te.is(i.range)&&pi.is(i.color)}t.is=n})(xo||(xo={}));var So;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){var i=r;return _.string(i.label)&&(_.undefined(i.textEdit)||q.is(i))&&(_.undefined(i.additionalTextEdits)||_.typedArray(i.additionalTextEdits,q.is))}t.is=n})(So||(So={}));var Co;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Co||(Co={}));var ko;(function(t){function e(r,i,s,a,o){var l={startLine:r,endLine:i};return _.defined(s)&&(l.startCharacter=s),_.defined(a)&&(l.endCharacter=a),_.defined(o)&&(l.kind=o),l}t.create=e;function n(r){var i=r;return _.uinteger(i.startLine)&&_.uinteger(i.startLine)&&(_.undefined(i.startCharacter)||_.uinteger(i.startCharacter))&&(_.undefined(i.endCharacter)||_.uinteger(i.endCharacter))&&(_.undefined(i.kind)||_.string(i.kind))}t.is=n})(ko||(ko={}));var fi;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&bn.is(i.location)&&_.string(i.message)}t.is=n})(fi||(fi={}));var Zn;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Zn||(Zn={}));var _o;(function(t){t.Unnecessary=1,t.Deprecated=2})(_o||(_o={}));var Fo;(function(t){function e(n){var r=n;return r!=null&&_.string(r.href)}t.is=e})(Fo||(Fo={}));var er;(function(t){function e(r,i,s,a,o,l){var c={range:r,message:i};return _.defined(s)&&(c.severity=s),_.defined(a)&&(c.code=a),_.defined(o)&&(c.source=o),_.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i,s=r;return _.defined(s)&&te.is(s.range)&&_.string(s.message)&&(_.number(s.severity)||_.undefined(s.severity))&&(_.integer(s.code)||_.string(s.code)||_.undefined(s.code))&&(_.undefined(s.codeDescription)||_.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(_.string(s.source)||_.undefined(s.source))&&(_.undefined(s.relatedInformation)||_.typedArray(s.relatedInformation,fi.is))}t.is=n})(er||(er={}));var Gt;(function(t){function e(r,i){for(var s=[],a=2;a0&&(o.arguments=s),o}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.title)&&_.string(i.command)}t.is=n})(Gt||(Gt={}));var q;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){var a=s;return _.objectLiteral(a)&&_.string(a.newText)&&te.is(a.range)}t.is=i})(q||(q={}));var Jt;(function(t){function e(r,i,s){var a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){var i=r;return i!==void 0&&_.objectLiteral(i)&&_.string(i.label)&&(_.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(_.string(i.description)||i.description===void 0)}t.is=n})(Jt||(Jt={}));var ke;(function(t){function e(n){var r=n;return typeof r=="string"}t.is=e})(ke||(ke={}));var yt;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){var a=s;return q.is(a)&&(Jt.is(a.annotationId)||ke.is(a.annotationId))}t.is=i})(yt||(yt={}));var vn;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&nr.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(vn||(vn={}));var yn;(function(t){function e(r,i,s){var a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="create"&&_.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||_.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||_.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(yn||(yn={}));var wn;(function(t){function e(r,i,s,a){var o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){var i=r;return i&&i.kind==="rename"&&_.string(i.oldUri)&&_.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||_.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||_.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(wn||(wn={}));var xn;(function(t){function e(r,i,s){var a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="delete"&&_.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||_.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||_.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(xn||(xn={}));var mi;(function(t){function e(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return _.string(i.kind)?yn.is(i)||wn.is(i)||xn.is(i):vn.is(i)}))}t.is=e})(mi||(mi={}));var tr=function(){function t(e,n){this.edits=e,this.changeAnnotations=n}return t.prototype.insert=function(e,n,r){var i,s;if(r===void 0?i=q.insert(e,n):ke.is(r)?(s=r,i=yt.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=yt.insert(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.replace=function(e,n,r){var i,s;if(r===void 0?i=q.replace(e,n):ke.is(r)?(s=r,i=yt.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=yt.replace(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.delete=function(e,n){var r,i;if(n===void 0?r=q.del(e):ke.is(n)?(i=n,r=yt.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=yt.del(e,i)),this.edits.push(r),i!==void 0)return i},t.prototype.add=function(e){this.edits.push(e)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),Ro=function(){function t(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(e,n){var r;if(ke.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}();(function(){function t(e){var n=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ro(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(r){if(vn.is(r)){var i=new tr(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(r){var i=new tr(e.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(e){if(nr.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:e.uri,version:e.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new tr(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[e];if(!r){var i=[];this._workspaceEdit.changes[e]=i,r=new tr(i),this._textEditChanges[e]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ro,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Jt.is(n)||ke.is(n)?i=n:r=n;var s,a;if(i===void 0?s=yn.create(e,r):(a=ke.is(i)?i:this._changeAnnotations.manage(i),s=yn.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t.prototype.renameFile=function(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Jt.is(r)||ke.is(r)?s=r:i=r;var a,o;if(s===void 0?a=wn.create(e,n,i):(o=ke.is(s)?s:this._changeAnnotations.manage(s),a=wn.create(e,n,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t.prototype.deleteFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Jt.is(n)||ke.is(n)?i=n:r=n;var s,a;if(i===void 0?s=xn.create(e,r):(a=ke.is(i)?i:this._changeAnnotations.manage(i),s=xn.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t})();var Eo;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)}t.is=n})(Eo||(Eo={}));var gi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&_.integer(i.version)}t.is=n})(gi||(gi={}));var nr;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&(i.version===null||_.integer(i.version))}t.is=n})(nr||(nr={}));var Do;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&_.string(i.languageId)&&_.integer(i.version)&&_.string(i.text)}t.is=n})(Do||(Do={}));var Oe;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(Oe||(Oe={})),function(t){function e(n){var r=n;return r===t.PlainText||r===t.Markdown}t.is=e}(Oe||(Oe={}));var bi;(function(t){function e(n){var r=n;return _.objectLiteral(n)&&Oe.is(r.kind)&&_.string(r.value)}t.is=e})(bi||(bi={}));var j;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(j||(j={}));var ze;(function(t){t.PlainText=1,t.Snippet=2})(ze||(ze={}));var Rt;(function(t){t.Deprecated=1})(Rt||(Rt={}));var Ao;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){var i=r;return i&&_.string(i.newText)&&te.is(i.insert)&&te.is(i.replace)}t.is=n})(Ao||(Ao={}));var Mo;(function(t){t.asIs=1,t.adjustIndentation=2})(Mo||(Mo={}));var No;(function(t){function e(n){return{label:n}}t.create=e})(No||(No={}));var zo;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(zo||(zo={}));var rr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){var i=r;return _.string(i)||_.objectLiteral(i)&&_.string(i.language)&&_.string(i.value)}t.is=n})(rr||(rr={}));var Po;(function(t){function e(n){var r=n;return!!r&&_.objectLiteral(r)&&(bi.is(r.contents)||rr.is(r.contents)||_.typedArray(r.contents,rr.is))&&(n.range===void 0||te.is(n.range))}t.is=e})(Po||(Po={}));var Io;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Io||(Io={}));var Lo;(function(t){function e(n,r){for(var i=[],s=2;s=0;h--){var u=l[h],f=s.offsetAt(u.range.start),m=s.offsetAt(u.range.end);if(m<=c)o=o.substring(0,f)+u.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");c=f}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);for(var h=0,u=0,f=0;hthis.source.length)return!1;for(var n=0;n=pn&&n<=fn?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=pn&&r<=fn||e===0&&r===ao}),!0):!1},t.prototype._newline=function(e){var n=this.stream.peekChar();switch(n){case $t:case gn:case qt:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===$t&&this.stream.advanceIfChar(qt)&&e.push(` +`),!0}return!1},t.prototype._escape=function(e,n){var r=this.stream.peekChar();if(r===oi){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=pn&&r<=fn||r>=Kn&&r<=Ya||r>=Qn&&r<=Qa);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===li||r===ci?this.stream.advance(1):this._newline([]),!0}if(r!==$t&&r!==gn&&r!==qt)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1},t.prototype._stringChar=function(e,n){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==oi&&r!==$t&&r!==gn&&r!==qt?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1},t.prototype._string=function(e){if(this.stream.peekChar()===so||this.stream.peekChar()===io){var n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null},t.prototype._unquotedChar=function(e){var n=this.stream.peekChar();return n!==0&&n!==oi&&n!==so&&n!==io&&n!==to&&n!==no&&n!==li&&n!==ci&&n!==qt&&n!==gn&&n!==$t?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unquotedString=function(e){for(var n=!1;this._unquotedChar(e)||this._escape(e);)n=!0;return n},t.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(n){return n===li||n===ci||n===qt||n===gn||n===$t});return e>0},t.prototype._name=function(e){for(var n=!1;this._identChar(e)||this._escape(e);)n=!0;return n},t.prototype.ident=function(e){var n=this.stream.pos(),r=this._minus(e);if(r){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1},t.prototype._identFirstChar=function(e){var n=this.stream.peekChar();return n===eo||n>=Kn&&n<=Ka||n>=Qn&&n<=Za||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._minus=function(e){var n=this.stream.peekChar();return n===Rt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._identChar=function(e){var n=this.stream.peekChar();return n===eo||n===Rt||n>=Kn&&n<=Ka||n>=Qn&&n<=Za||n>=pn&&n<=fn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unicodeRange=function(){if(this.stream.advanceIfChar(Fd)){var e=function(i){return i>=pn&&i<=fn||i>=Kn&&i<=Ya||i>=Qn&&i<=Qa},n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(function(i){return i===Rd});if(n>=1&&n<=6)if(this.stream.advanceIfChar(Rt)){var r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1},t}();function me(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function Ed(t,e,n){n===void 0&&(n=4);var r=Math.abs(t.length-e.length);if(r>n)return 0;var i=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange"})(v||(v={}));var Q;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility"})(Q||(Q={}));function hi(t,e){var n=null;return!t||et.end?null:(t.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1}),n)}function di(t,e){for(var n=hi(t,e),r=[];n;)r.unshift(n),n=n.parent;return r}function Ad(t){var e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var V=function(){function t(e,n,r){e===void 0&&(e=-1),n===void 0&&(n=-1),this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}return Object.defineProperty(t.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.nodeType||v.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),t.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},t.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},t.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},t.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},t.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},t.prototype.accept=function(e){if(e(this)&&this.children)for(var n=0,r=this.children;n=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),n!==-1?i.splice(n,0,e):i.push(e),e},t.prototype.attachTo=function(e,n){return n===void 0&&(n=-1),e&&e.adoptChild(this,n),this},t.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},t.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},t.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(n){return n.getRule()===e})},t.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(n){return n.isErroneous(!0)})},t.prototype.setNode=function(e,n,r){return r===void 0&&(r=-1),n?(n.attachTo(this,r),this[e]=n,!0):!1},t.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},t.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)},t.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},t.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},t.prototype.getChild=function(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null},t.prototype.findChildAtOffset=function(e,n){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null},t.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},t.prototype.getParent=function(){for(var e=this.parent;e instanceof Se;)e=e.parent;return e},t.prototype.findParent=function(e){for(var n=this;n&&n.type!==e;)n=n.parent;return n},t.prototype.findAParent=function(){for(var e=[],n=0;n{let s=i[0];return typeof e[s]<"u"?e[s]:r}),n}function du(t,e,...n){return hu(e,n)}function He(t){return du}var ne=He(),re=function(){function t(e,n){this.id=e,this.message=n}return t}(),C={NumberExpected:new re("css-numberexpected",ne("expected.number","number expected")),ConditionExpected:new re("css-conditionexpected",ne("expected.condt","condition expected")),RuleOrSelectorExpected:new re("css-ruleorselectorexpected",ne("expected.ruleorselector","at-rule or selector expected")),DotExpected:new re("css-dotexpected",ne("expected.dot","dot expected")),ColonExpected:new re("css-colonexpected",ne("expected.colon","colon expected")),SemiColonExpected:new re("css-semicolonexpected",ne("expected.semicolon","semi-colon expected")),TermExpected:new re("css-termexpected",ne("expected.term","term expected")),ExpressionExpected:new re("css-expressionexpected",ne("expected.expression","expression expected")),OperatorExpected:new re("css-operatorexpected",ne("expected.operator","operator expected")),IdentifierExpected:new re("css-identifierexpected",ne("expected.ident","identifier expected")),PercentageExpected:new re("css-percentageexpected",ne("expected.percentage","percentage expected")),URIOrStringExpected:new re("css-uriorstringexpected",ne("expected.uriorstring","uri or string expected")),URIExpected:new re("css-uriexpected",ne("expected.uri","URI expected")),VariableNameExpected:new re("css-varnameexpected",ne("expected.varname","variable name expected")),VariableValueExpected:new re("css-varvalueexpected",ne("expected.varvalue","variable value expected")),PropertyValueExpected:new re("css-propertyvalueexpected",ne("expected.propvalue","property value expected")),LeftCurlyExpected:new re("css-lcurlyexpected",ne("expected.lcurly","{ expected")),RightCurlyExpected:new re("css-rcurlyexpected",ne("expected.rcurly","} expected")),LeftSquareBracketExpected:new re("css-rbracketexpected",ne("expected.lsquare","[ expected")),RightSquareBracketExpected:new re("css-lbracketexpected",ne("expected.rsquare","] expected")),LeftParenthesisExpected:new re("css-lparentexpected",ne("expected.lparen","( expected")),RightParenthesisExpected:new re("css-rparentexpected",ne("expected.rparent",") expected")),CommaExpected:new re("css-commaexpected",ne("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new re("css-pagedirordeclexpected",ne("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new re("css-unknownatrule",ne("unknown.atrule","at-rule unknown")),UnknownKeyword:new re("css-unknownkeyword",ne("unknown.keyword","unknown keyword")),SelectorExpected:new re("css-selectorexpected",ne("expected.selector","selector expected")),StringLiteralExpected:new re("css-stringliteralexpected",ne("expected.stringliteral","string literal expected")),WhitespaceExpected:new re("css-whitespaceexpected",ne("expected.whitespace","whitespace expected")),MediaQueryExpected:new re("css-mediaqueryexpected",ne("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new re("css-idorwildcardexpected",ne("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new re("css-wildcardexpected",ne("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new re("css-idorvarexpected",ne("expected.idorvar","identifier or variable expected"))},Co;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(Co||(Co={}));var rr;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(rr||(rr={}));var Fe;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=rr.MAX_VALUE),i===Number.MAX_VALUE&&(i=rr.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){var i=r;return _.objectLiteral(i)&&_.uinteger(i.line)&&_.uinteger(i.character)}t.is=n})(Fe||(Fe={}));var ie;(function(t){function e(r,i,s,a){if(_.uinteger(r)&&_.uinteger(i)&&_.uinteger(s)&&_.uinteger(a))return{start:Fe.create(r,i),end:Fe.create(s,a)};if(Fe.is(r)&&Fe.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+s+", "+a+"]")}t.create=e;function n(r){var i=r;return _.objectLiteral(i)&&Fe.is(i.start)&&Fe.is(i.end)}t.is=n})(ie||(ie={}));var Cn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&ie.is(i.range)&&(_.string(i.uri)||_.undefined(i.uri))}t.is=n})(Cn||(Cn={}));var ko;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){var i=r;return _.defined(i)&&ie.is(i.targetRange)&&_.string(i.targetUri)&&(ie.is(i.targetSelectionRange)||_.undefined(i.targetSelectionRange))&&(ie.is(i.originSelectionRange)||_.undefined(i.originSelectionRange))}t.is=n})(ko||(ko={}));var Si;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){var i=r;return _.numberRange(i.red,0,1)&&_.numberRange(i.green,0,1)&&_.numberRange(i.blue,0,1)&&_.numberRange(i.alpha,0,1)}t.is=n})(Si||(Si={}));var _o;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){var i=r;return ie.is(i.range)&&Si.is(i.color)}t.is=n})(_o||(_o={}));var Ro;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){var i=r;return _.string(i.label)&&(_.undefined(i.textEdit)||H.is(i))&&(_.undefined(i.additionalTextEdits)||_.typedArray(i.additionalTextEdits,H.is))}t.is=n})(Ro||(Ro={}));var Fo;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Fo||(Fo={}));var Eo;(function(t){function e(r,i,s,a,o){var l={startLine:r,endLine:i};return _.defined(s)&&(l.startCharacter=s),_.defined(a)&&(l.endCharacter=a),_.defined(o)&&(l.kind=o),l}t.create=e;function n(r){var i=r;return _.uinteger(i.startLine)&&_.uinteger(i.startLine)&&(_.undefined(i.startCharacter)||_.uinteger(i.startCharacter))&&(_.undefined(i.endCharacter)||_.uinteger(i.endCharacter))&&(_.undefined(i.kind)||_.string(i.kind))}t.is=n})(Eo||(Eo={}));var Ci;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&Cn.is(i.location)&&_.string(i.message)}t.is=n})(Ci||(Ci={}));var ir;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(ir||(ir={}));var Do;(function(t){t.Unnecessary=1,t.Deprecated=2})(Do||(Do={}));var Ao;(function(t){function e(n){var r=n;return r!=null&&_.string(r.href)}t.is=e})(Ao||(Ao={}));var sr;(function(t){function e(r,i,s,a,o,l){var c={range:r,message:i};return _.defined(s)&&(c.severity=s),_.defined(a)&&(c.code=a),_.defined(o)&&(c.source=o),_.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i,s=r;return _.defined(s)&&ie.is(s.range)&&_.string(s.message)&&(_.number(s.severity)||_.undefined(s.severity))&&(_.integer(s.code)||_.string(s.code)||_.undefined(s.code))&&(_.undefined(s.codeDescription)||_.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(_.string(s.source)||_.undefined(s.source))&&(_.undefined(s.relatedInformation)||_.typedArray(s.relatedInformation,Ci.is))}t.is=n})(sr||(sr={}));var Xt;(function(t){function e(r,i){for(var s=[],a=2;a0&&(o.arguments=s),o}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.title)&&_.string(i.command)}t.is=n})(Xt||(Xt={}));var H;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){var a=s;return _.objectLiteral(a)&&_.string(a.newText)&&ie.is(a.range)}t.is=i})(H||(H={}));var Yt;(function(t){function e(r,i,s){var a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){var i=r;return i!==void 0&&_.objectLiteral(i)&&_.string(i.label)&&(_.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(_.string(i.description)||i.description===void 0)}t.is=n})(Yt||(Yt={}));var ke;(function(t){function e(n){var r=n;return typeof r=="string"}t.is=e})(ke||(ke={}));var yt;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){var a=s;return H.is(a)&&(Yt.is(a.annotationId)||ke.is(a.annotationId))}t.is=i})(yt||(yt={}));var kn;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&or.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(kn||(kn={}));var _n;(function(t){function e(r,i,s){var a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="create"&&_.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||_.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||_.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(_n||(_n={}));var Rn;(function(t){function e(r,i,s,a){var o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){var i=r;return i&&i.kind==="rename"&&_.string(i.oldUri)&&_.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||_.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||_.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(Rn||(Rn={}));var Fn;(function(t){function e(r,i,s){var a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){var i=r;return i&&i.kind==="delete"&&_.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||_.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||_.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ke.is(i.annotationId))}t.is=n})(Fn||(Fn={}));var ki;(function(t){function e(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return _.string(i.kind)?_n.is(i)||Rn.is(i)||Fn.is(i):kn.is(i)}))}t.is=e})(ki||(ki={}));var ar=function(){function t(e,n){this.edits=e,this.changeAnnotations=n}return t.prototype.insert=function(e,n,r){var i,s;if(r===void 0?i=H.insert(e,n):ke.is(r)?(s=r,i=yt.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=yt.insert(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.replace=function(e,n,r){var i,s;if(r===void 0?i=H.replace(e,n):ke.is(r)?(s=r,i=yt.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=yt.replace(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.delete=function(e,n){var r,i;if(n===void 0?r=H.del(e):ke.is(n)?(i=n,r=yt.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=yt.del(e,i)),this.edits.push(r),i!==void 0)return i},t.prototype.add=function(e){this.edits.push(e)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),No=function(){function t(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(e,n){var r;if(ke.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}();(function(){function t(e){var n=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new No(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(r){if(kn.is(r)){var i=new ar(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(r){var i=new ar(e.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(e){if(or.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:e.uri,version:e.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new ar(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[e];if(!r){var i=[];this._workspaceEdit.changes[e]=i,r=new ar(i),this._textEditChanges[e]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new No,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Yt.is(n)||ke.is(n)?i=n:r=n;var s,a;if(i===void 0?s=_n.create(e,r):(a=ke.is(i)?i:this._changeAnnotations.manage(i),s=_n.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t.prototype.renameFile=function(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Yt.is(r)||ke.is(r)?s=r:i=r;var a,o;if(s===void 0?a=Rn.create(e,n,i):(o=ke.is(s)?s:this._changeAnnotations.manage(s),a=Rn.create(e,n,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t.prototype.deleteFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Yt.is(n)||ke.is(n)?i=n:r=n;var s,a;if(i===void 0?s=Fn.create(e,r):(a=ke.is(i)?i:this._changeAnnotations.manage(i),s=Fn.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},t})();var Mo;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)}t.is=n})(Mo||(Mo={}));var _i;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&_.integer(i.version)}t.is=n})(_i||(_i={}));var or;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&(i.version===null||_.integer(i.version))}t.is=n})(or||(or={}));var zo;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){var i=r;return _.defined(i)&&_.string(i.uri)&&_.string(i.languageId)&&_.integer(i.version)&&_.string(i.text)}t.is=n})(zo||(zo={}));var Te;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(Te||(Te={})),function(t){function e(n){var r=n;return r===t.PlainText||r===t.Markdown}t.is=e}(Te||(Te={}));var Ri;(function(t){function e(n){var r=n;return _.objectLiteral(n)&&Te.is(r.kind)&&_.string(r.value)}t.is=e})(Ri||(Ri={}));var $;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})($||($={}));var ze;(function(t){t.PlainText=1,t.Snippet=2})(ze||(ze={}));var Ft;(function(t){t.Deprecated=1})(Ft||(Ft={}));var Po;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){var i=r;return i&&_.string(i.newText)&&ie.is(i.insert)&&ie.is(i.replace)}t.is=n})(Po||(Po={}));var Lo;(function(t){t.asIs=1,t.adjustIndentation=2})(Lo||(Lo={}));var Io;(function(t){function e(n){return{label:n}}t.create=e})(Io||(Io={}));var To;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(To||(To={}));var lr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){var i=r;return _.string(i)||_.objectLiteral(i)&&_.string(i.language)&&_.string(i.value)}t.is=n})(lr||(lr={}));var Wo;(function(t){function e(n){var r=n;return!!r&&_.objectLiteral(r)&&(Ri.is(r.contents)||lr.is(r.contents)||_.typedArray(r.contents,lr.is))&&(n.range===void 0||ie.is(n.range))}t.is=e})(Wo||(Wo={}));var Oo;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Oo||(Oo={}));var Uo;(function(t){function e(n,r){for(var i=[],s=2;s=0;h--){var u=l[h],f=s.offsetAt(u.range.start),m=s.offsetAt(u.range.end);if(m<=c)o=o.substring(0,f)+u.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");c=f}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);for(var h=0,u=0,f=0;h0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},t.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Fe.create(0,e);for(;re?i=s:r=s+1}var a=r-1;return Fe.create(a,e-n[a])},t.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(m){return m===!0||m===!1}t.boolean=i;function s(m){return e.call(m)==="[object String]"}t.string=s;function a(m){return e.call(m)==="[object Number]"}t.number=a;function o(m,g,b){return e.call(m)==="[object Number]"&&g<=m&&m<=b}t.numberRange=o;function l(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=l;function c(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=c;function h(m){return e.call(m)==="[object Function]"}t.func=h;function u(m){return m!==null&&typeof m=="object"}t.objectLiteral=u;function f(m,g){return Array.isArray(m)&&m.every(g)}t.typedArray=f})(_||(_={}));var sr=class{constructor(t,e,n,r){this._uri=t,this._languageId=e,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(e,n)}return this._content}update(t,e){for(let n of t)if(sr.isIncremental(n)){const r=Go(n.range),i=this.offsetAt(r.start),s=this.offsetAt(r.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(s,this._content.length);const a=Math.max(r.start.line,0),o=Math.max(r.end.line,0);let l=this._lineOffsets;const c=Ho(n.text,!1,i);if(o-a===c.length)for(let u=0,f=c.length;ut?r=s:n=s+1}let i=n-1;return{line:i,character:t-e[i]}}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let n=e[t.line],r=t.line+1{let f=h.range.start.line-u.range.start.line;return f===0?h.range.start.character-u.range.start.character:f}),l=0;const c=[];for(const h of o){let u=i.offsetAt(h.range.start);if(ul&&c.push(a.substring(l,u)),h.newText.length&&c.push(h.newText),l=i.offsetAt(h.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(wi||(wi={}));function xi(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);xi(r,e),xi(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function tu(t){const e=Go(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Jo;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Oe.Markdown,Oe.PlainText]}},hover:{contentFormat:[Oe.Markdown,Oe.PlainText]}}}})(Jo||(Jo={}));var Sn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Sn||(Sn={}));var Xo={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function Yo(t){switch(t){case"experimental":return`⚠️ Property is experimental. Be cautious when using it.️ +`&&i++}r&&n.length>0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},t.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Fe.create(0,e);for(;re?i=s:r=s+1}var a=r-1;return Fe.create(a,e-n[a])},t.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(m){return m===!0||m===!1}t.boolean=i;function s(m){return e.call(m)==="[object String]"}t.string=s;function a(m){return e.call(m)==="[object Number]"}t.number=a;function o(m,g,b){return e.call(m)==="[object Number]"&&g<=m&&m<=b}t.numberRange=o;function l(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=l;function c(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=c;function h(m){return e.call(m)==="[object Function]"}t.func=h;function u(m){return m!==null&&typeof m=="object"}t.objectLiteral=u;function f(m,g){return Array.isArray(m)&&m.every(g)}t.typedArray=f})(_||(_={}));var hr=class{constructor(t,e,n,r){this._uri=t,this._languageId=e,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(e,n)}return this._content}update(t,e){for(let n of t)if(hr.isIncremental(n)){const r=Ko(n.range),i=this.offsetAt(r.start),s=this.offsetAt(r.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(s,this._content.length);const a=Math.max(r.start.line,0),o=Math.max(r.end.line,0);let l=this._lineOffsets;const c=Yo(n.text,!1,i);if(o-a===c.length)for(let u=0,f=c.length;ut?r=s:n=s+1}let i=n-1;return{line:i,character:t-e[i]}}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let n=e[t.line],r=t.line+1{let f=h.range.start.line-u.range.start.line;return f===0?h.range.start.character-u.range.start.character:f}),l=0;const c=[];for(const h of o){let u=i.offsetAt(h.range.start);if(ul&&c.push(a.substring(l,u)),h.newText.length&&c.push(h.newText),l=i.offsetAt(h.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(Di||(Di={}));function Ai(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Ai(r,e),Ai(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function pu(t){const e=Ko(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Qo;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Te.Markdown,Te.PlainText]}},hover:{contentFormat:[Te.Markdown,Te.PlainText]}}}})(Qo||(Qo={}));var En;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(En||(En={}));var Zo={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function el(t){switch(t){case"experimental":return`⚠️ Property is experimental. Be cautious when using it.️ `;case"nonstandard":return`🚨️ Property is nonstandard. Avoid using it. `;case"obsolete":return`🚨️️️ Property is obsolete. Avoid using it. -`;default:return""}}function wt(t,e,n){var r;if(e?r={kind:"markdown",value:ru(t,n)}:r={kind:"plaintext",value:nu(t,n)},r.value!=="")return r}function ar(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(//g,">")}function nu(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=Yo(t.status)),n+=t.description;var r=Ko(t.browsers);r&&(n+=` +`;default:return""}}function wt(t,e,n){var r;if(e?r={kind:"markdown",value:mu(t,n)}:r={kind:"plaintext",value:fu(t,n)},r.value!=="")return r}function dr(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(//g,">")}function fu(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=el(t.status)),n+=t.description;var r=tl(t.browsers);r&&(n+=` (`+r+")"),"syntax"in t&&(n+=` Syntax: `.concat(t.syntax))}return t.references&&t.references.length>0&&(e==null?void 0:e.references)!==!1&&(n.length>0&&(n+=` -`),n+=t.references.map(function(i){return"".concat(i.name,": ").concat(i.url)}).join(" | ")),n}function ru(t,e){if(!t.description||t.description==="")return"";var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=Yo(t.status)),typeof t.description=="string"?n+=ar(t.description):n+=t.description.kind===Oe.Markdown?t.description.value:ar(t.description.value);var r=Ko(t.browsers);r&&(n+=` +`),n+=t.references.map(function(i){return"".concat(i.name,": ").concat(i.url)}).join(" | ")),n}function mu(t,e){if(!t.description||t.description==="")return"";var n="";if((e==null?void 0:e.documentation)!==!1){t.status&&(n+=el(t.status)),typeof t.description=="string"?n+=dr(t.description):n+=t.description.kind===Te.Markdown?t.description.value:dr(t.description.value);var r=tl(t.browsers);r&&(n+=` -(`+ar(r)+")"),"syntax"in t&&t.syntax&&(n+=` +(`+dr(r)+")"),"syntax"in t&&t.syntax&&(n+=` -Syntax: `.concat(ar(t.syntax)))}return t.references&&t.references.length>0&&(e==null?void 0:e.references)!==!1&&(n.length>0&&(n+=` +Syntax: `.concat(dr(t.syntax)))}return t.references&&t.references.length>0&&(e==null?void 0:e.references)!==!1&&(n.length>0&&(n+=` -`),n+=t.references.map(function(i){return"[".concat(i.name,"](").concat(i.url,")")}).join(" | ")),n}function Ko(t){return t===void 0&&(t=[]),t.length===0?null:t.map(function(e){var n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Xo&&(n+=Xo[i]),s&&(n+=" "+s),n}).join(", ")}var Cn=Ge(),iu=[{func:"rgb($red, $green, $blue)",desc:Cn("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:Cn("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:Cn("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:Cn("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")},{func:"hwb($hue $white $black)",desc:Cn("css.builtin.hwb","Creates a Color from hue, white and black.")}],or={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Qo={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function xt(t,e){var n=t.getText(),r=n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);var i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function Zo(t){var e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function su(t){var e=t.getName();return e?/^(rgb|rgba|hsl|hsla|hwb)$/gi.test(e):!1}var el=48,au=57,ou=65,lr=97,lu=102;function de(t){return t=lr&&t<=lu?t-lr+10:0)}function tl(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:de(t.charCodeAt(4))*17/255};case 7:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:(de(t.charCodeAt(7))*16+de(t.charCodeAt(8)))/255}}return null}function nl(t,e,n,r){if(r===void 0&&(r=1),t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};var i=function(o,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}function rl(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r),o=0,l=0,c=(a+s)/2,h=s-a;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:o=(n-r)/h+(n=1){var i=e/(e+n);return{red:i,green:i,blue:i,alpha:r}}var s=nl(t,1,.5,r),a=s.red;a*=1-e-n,a+=e;var o=s.green;o*=1-e-n,o+=e;var l=s.blue;return l*=1-e-n,l+=e,{red:a,green:o,blue:l,alpha:r}}function hu(t){var e=rl(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function du(t){if(t.type===v.HexColorValue){var e=t.getText();return tl(e)}else if(t.type===v.Function){var n=t,r=n.getName(),i=n.getArguments().getChildren();if(i.length===1){var s=i[0].getChildren();if(s.length===1&&s[0].type===v.Expression&&(i=s[0].getChildren(),i.length===3)){var a=i[2];if(a instanceof li){var o=a.getLeft(),l=a.getRight(),c=a.getOperator();o&&l&&c&&c.matches("/")&&(i=[i[0],i[1],o,l])}}}if(!r||i.length<3||i.length>4)return null;try{var h=i.length===4?xt(i[3],1):1;if(r==="rgb"||r==="rgba")return{red:xt(i[0],255),green:xt(i[1],255),blue:xt(i[2],255),alpha:h};if(r==="hsl"||r==="hsla"){var u=Zo(i[0]),f=xt(i[1],100),m=xt(i[2],100);return nl(u,f,m,h)}else if(r==="hwb"){var u=Zo(i[0]),g=xt(i[1],100),b=xt(i[2],100);return cu(u,g,b,h)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;var y=t.parent;if(y&&y.parent&&y.parent.type===v.BinaryExpression){var x=y.parent;if(x.parent&&x.parent.type===v.ListEntry&&x.parent.key===x)return null}var w=t.getText().toLowerCase();if(w==="none")return null;var k=or[w];if(k)return tl(k)}return null}var il={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},sl={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},al={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},uu=["medium","thick","thin"],ol={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},ll={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},cl={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},hl={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},dl={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},ul={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},pl={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},fl={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},pu=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],fu=["circle","clipPath","cursor","defs","desc","ellipse","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","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],mu=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function cr(t){return Object.keys(t).map(function(e){return t[e]})}function Ue(t){return typeof t<"u"}var ml=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;re.offset?s-e.offset:0}return e},t.prototype.markError=function(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new vo(e,n,Ne.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)},t.prototype.parseStylesheet=function(e){var n=e.version,r=e.getText(),i=function(s,a){if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)},t.prototype.internalParse=function(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();var i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=function(s,a){return e.substr(s,a)}),i},t.prototype._parseStylesheet=function(){for(var e=this.create(wd);e.addChild(this._parseStylesheetStart()););var n=!1;do{var r=!1;do{r=!1;var i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,S.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,S.UnknownAtRule):this.markError(e,S.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)},t.prototype._parseStylesheetStart=function(){return this._parseCharset()},t.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},t.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},t.prototype._tryParseRuleset=function(e){var n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null},t.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var n=this.create(qt),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,S.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},t.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},t.prototype._needsSemicolonAfter=function(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1},t.prototype._parseDeclarations=function(e){var n=this.create(ri);if(!this.accept(p.CurlyL))return null;for(var r=e();n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,S.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseBody=function(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,S.LeftCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseSelector=function(e){var n=this.create(un),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null},t.prototype._parseDeclaration=function(e){var n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;var r=this.create(Ze);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,S.PropertyValueExpected)):this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]):null},t.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(p.Ident,/^--/))return null;var n=this.create(Sd);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var r=this.mark();if(this.peek(p.CurlyL)){var i=this.create(xd),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(s)&&!s.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(i),n.setPropertySet(i),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}var a=this._parseExpr();return a&&!a.isErroneous(!0)&&(this._parsePrio(),this.peekOne.apply(this,ml(ml([],e||[],!1),[p.SemiColon,p.EOF],!1)))?(n.setValue(a),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Ue(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,S.PropertyValueExpected):this.finish(n))},t.prototype._parseCustomPropertyValue=function(e){var n=this;e===void 0&&(e=[p.CurlyR]);var r=this.create(W),i=function(){return a===0&&o===0&&l===0},s=function(){return e.indexOf(n.token.type)!==-1},a=0,o=0,l=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(i())break e;break;case p.Exclamation:if(i())break e;break;case p.CurlyL:a++;break;case p.CurlyR:if(a--,a<0){if(s()&&o===0&&l===0)break e;return this.finish(r,S.LeftCurlyExpected)}break;case p.ParenthesisL:o++;break;case p.ParenthesisR:if(o--,o<0){if(s()&&l===0&&a===0)break e;return this.finish(r,S.LeftParenthesisExpected)}break;case p.BracketL:l++;break;case p.BracketR:if(l--,l<0)return this.finish(r,S.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:var c=S.RightCurlyExpected;return l>0?c=S.RightSquareBracketExpected:o>0&&(c=S.RightParenthesisExpected),this.finish(r,c)}this.consumeToken()}return this.finish(r)},t.prototype._tryToParseDeclaration=function(e){var n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)},t.prototype._parseProperty=function(){var e=this.create(si),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},t.prototype._parseCharset=function(){if(!this.peek(p.Charset))return null;var e=this.create(W);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.IdentifierExpected)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(ai);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},t.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Pd);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,S.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected)},t.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(oo);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Dd);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseKeyframe=function(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;var e=this.create(co),n=this.create(W);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,S.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,S.IdentifierExpected,[p.CurlyR])},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([Y.Keyframe])},t.prototype._parseKeyframeSelector=function(){var e=this.create(ho);if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.finish(e,S.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._tryParseKeyframeSelector=function(){var e=this.create(ho),n=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)},t.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var n=this.create(oi);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))},t.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseSupportsCondition=function(){var e=this.create(fn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i))for(var n=this.token.text.toLowerCase();this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},t.prototype._parseSupportsConditionInParens=function(){var e=this.create(fn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,S.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){var n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){for(var r=1;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,S.LeftParenthesisExpected,[],[p.ParenthesisL])},t.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var n=this.create(uo);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,S.MediaQueryExpected)},t.prototype._parseMediaQueryList=function(){var e=this.create(po);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);return this.finish(e)},t.prototype._parseMediaQuery=function(){var e=this.create(fo),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)},t.prototype._parseRatio=function(){var e=this.mark(),n=this.create(Bd);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,S.NumberExpected):(this.restoreAtMark(e),null):null},t.prototype._parseMediaCondition=function(){var e=this.create(Ld);this.acceptIdent("not");for(var n=!0;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)},t.prototype._parseMediaFeature=function(){var e=this,n=[p.ParenthesisR],r=this.create(Td),i=function(){return e.acceptDelim("<")||e.acceptDelim(">")?(e.hasWhitespace()||e.acceptDelim("="),!0):!!e.acceptDelim("=")};if(r.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}else if(i()){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}}else if(r.addChild(this._parseMediaFeatureValue())){if(!i())return this.finish(r,S.OperatorExpected,[],n);if(!r.addChild(this._parseMediaFeatureName()))return this.finish(r,S.IdentifierExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}else return this.finish(r,S.IdentifierExpected,[],n);return this.finish(r)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()},t.prototype._parseMediaFeatureValue=function(){return this._parseRatio()||this._parseTermExpression()},t.prototype._parseMedium=function(){var e=this.create(W);return e.addChild(this._parseIdent())?this.finish(e):null},t.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},t.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(Wd);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,S.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},t.prototype._parsePageMarginBox=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create(Od);return this.acceptOneKeyword(mu)||this.markError(e,S.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parsePageSelector=function(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;var e=this.create(W);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)},t.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Id);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},t.prototype._parseUnknownAtRule=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create(go);e.addChild(this._parseUnknownAtRuleName());var n=function(){return i===0&&s===0&&a===0},r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,S.RightCurlyExpected):a>0?this.finish(e,S.RightSquareBracketExpected):s>0?this.finish(e,S.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,S.RightSquareBracketExpected);if(s>0)return this.finish(e,S.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,S.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,S.LeftParenthesisExpected);break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(e,S.LeftSquareBracketExpected);break}this.consumeToken()}return e},t.prototype._parseUnknownAtRuleName=function(){var e=this.create(W);return this.accept(p.AtKeyword)?this.finish(e):e},t.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null},t.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(W);return this.consumeToken(),this.finish(e)},t.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(W);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(W);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null},t.prototype._parseSimpleSelector=function(){var e=this.create($t),n=0;for(e.addChild(this._parseElementName())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null},t.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},t.prototype._parseSelectorIdent=function(){return this._parseIdent()},t.prototype._parseHash=function(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,S.IdentifierExpected)}else this.consumeToken();return this.finish(e)},t.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)},t.prototype._parseElementName=function(){var e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)},t.prototype._parseNamespacePrefix=function(){var e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)},t.prototype._parseAttrib=function(){if(!this.peek(p.BracketL))return null;var e=this.create(Vd);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)):this.finish(e,S.IdentifierExpected)},t.prototype._parsePseudo=function(){var e=this,n=this._tryParsePseudoIdentifier();if(n){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=function(){var i=e.create(W);if(!i.addChild(e._parseSelector(!1)))return null;for(;e.accept(p.Comma)&&i.addChild(e._parseSelector(!1)););return e.peek(p.ParenthesisR)?e.finish(i):null};if(n.addChild(this.try(r)||this._parseBinaryExpr()),!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return this.finish(n)}return null},t.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(p.Colon))return null;var e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,S.IdentifierExpected):this.finish(n))},t.prototype._tryParsePrio=function(){var e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)},t.prototype._parsePrio=function(){if(!this.peek(p.Exclamation))return null;var e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},t.prototype._parseExpr=function(e){e===void 0&&(e=!1);var n=this.create(mo);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}else if(!this.hasWhitespace())break;if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)},t.prototype._parseUnicodeRange=function(){if(!this.peekIdent("u"))return null;var e=this.create(yd);return this.acceptUnicodeRange()?this.finish(e):null},t.prototype._parseNamedLine=function(){if(!this.peek(p.BracketL))return null;var e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)},t.prototype._parseBinaryExpr=function(e,n){var r=this.create(li);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,S.TermExpected);r=this.finish(r);var i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)},t.prototype._parseTerm=function(){var e=this.create(Ud);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},t.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},t.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var e=this.create(W);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)},t.prototype._parseNumeric=function(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.Freq)){var e=this.create(hi);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseStringLiteral=function(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;var e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)},t.prototype._parseURILiteral=function(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected))},t.prototype._parseURLArgument=function(){var e=this.create(W);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},t.prototype._parseIdent=function(e){if(!this.peek(p.Ident))return null;var n=this.create(We);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)},t.prototype._parseFunction=function(){var e=this.mark(),n=this.create(pn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,S.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(!this.peek(p.Ident))return null;var e=this.create(We);if(e.referenceTypes=[Y.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},t.prototype._parseFunctionArgument=function(){var e=this.create(Ht);return e.setValue(this._parseExpr(!0))?this.finish(e):null},t.prototype._parseHexColor=function(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(ci);return this.consumeToken(),this.finish(e)}else return null},t}();function gu(t,e){var n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null},t.prototype.findInScope=function(e,n){n===void 0&&(n=0);var r=e+n,i=gu(this.children,function(a){return a.offset>r});if(i===0)return this;var s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this},t.prototype.addSymbol=function(e){this.symbols.push(e)},t.prototype.getSymbol=function(e,n){for(var r=0;r{var t={470:r=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,l){for(var c,h="",u=0,f=-1,m=0,g=0;g<=o.length;++g){if(g2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",u=0):u=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),f=g,m=0;continue}}else if(h.length===2||h.length===1){h="",u=0,f=g,m=0;continue}}l&&(h.length>0?h+="/..":h="..",u=2)}else h.length>0?h+="/"+o.slice(f+1,g):h=o.slice(f+1,g),u=g-f-1;f=g,m=0}else c===46&&m!==-1?++m:m=-1}return h}var a={resolve:function(){for(var o,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var u;h>=0?u=arguments[h]:(o===void 0&&(o=process.cwd()),u=o),i(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(o){if(i(o),o.length===0)return".";var l=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return(o=s(o,!l)).length!==0||l||(o="."),o.length>0&&c&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":a.normalize(o)},relative:function(o,l){if(i(o),i(l),o===l||(o=a.resolve(o))===(l=a.resolve(l)))return"";for(var c=1;cg){if(l.charCodeAt(f+y)===47)return l.slice(f+y+1);if(y===0)return l.slice(f+y)}else u>g&&(o.charCodeAt(c+y)===47?b=y:y===0&&(b=0));break}var x=o.charCodeAt(c+y);if(x!==l.charCodeAt(f+y))break;x===47&&(b=y)}var w="";for(y=c+b+1;y<=h;++y)y!==h&&o.charCodeAt(y)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+l.slice(f+b):(f+=b,l.charCodeAt(f)===47&&++f,l.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,h=-1,u=!0,f=o.length-1;f>=1;--f)if((l=o.charCodeAt(f))===47){if(!u){h=f;break}}else u=!1;return h===-1?c?"/":".":c&&h===1?"//":o.slice(0,h)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(o);var c,h=0,u=-1,f=!0;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var m=l.length-1,g=-1;for(c=o.length-1;c>=0;--c){var b=o.charCodeAt(c);if(b===47){if(!f){h=c+1;break}}else g===-1&&(f=!1,g=c+1),m>=0&&(b===l.charCodeAt(m)?--m==-1&&(u=c):(m=-1,u=g))}return h===u?u=g:u===-1&&(u=o.length),o.slice(h,u)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!f){h=c+1;break}}else u===-1&&(f=!1,u=c+1);return u===-1?"":o.slice(h,u)},extname:function(o){i(o);for(var l=-1,c=0,h=-1,u=!0,f=0,m=o.length-1;m>=0;--m){var g=o.charCodeAt(m);if(g!==47)h===-1&&(u=!1,h=m+1),g===46?l===-1?l=m:f!==1&&(f=1):l!==-1&&(f=-1);else if(!u){c=m+1;break}}return l===-1||h===-1||f===0||f===1&&l===h-1&&l===c+1?"":o.slice(l,h)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(l,c){var h=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+u:h+"/"+u:u}(0,o)},parse:function(o){i(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c,h=o.charCodeAt(0),u=h===47;u?(l.root="/",c=1):c=0;for(var f=-1,m=0,g=-1,b=!0,y=o.length-1,x=0;y>=c;--y)if((h=o.charCodeAt(y))!==47)g===-1&&(b=!1,g=y+1),h===46?f===-1?f=y:x!==1&&(x=1):f!==-1&&(x=-1);else if(!b){m=y+1;break}return f===-1||g===-1||x===0||x===1&&f===g-1&&f===m+1?g!==-1&&(l.base=l.name=m===0&&u?o.slice(1,g):o.slice(m,g)):(m===0&&u?(l.name=o.slice(1,f),l.base=o.slice(1,g)):(l.name=o.slice(m,f),l.base=o.slice(m,g)),l.ext=o.slice(f,g)),m>0?l.dir=o.slice(0,m-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,r.exports=a},447:(r,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>w,Utils:()=>L}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var l,c,h=(l=function(E,C){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,I){D.__proto__=I}||function(D,I){for(var J in I)Object.prototype.hasOwnProperty.call(I,J)&&(D[J]=I[J])})(E,C)},function(E,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function D(){this.constructor=E}l(E,C),E.prototype=C===null?Object.create(C):(D.prototype=C.prototype,new D)}),u=/^\w[\w\d+.-]*$/,f=/^\//,m=/^\/\//;function g(E,C){if(!E.scheme&&C)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(E.authority,'", path: "').concat(E.path,'", query: "').concat(E.query,'", fragment: "').concat(E.fragment,'"}'));if(E.scheme&&!u.test(E.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(E.path){if(E.authority){if(!f.test(E.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(m.test(E.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var b="",y="/",x=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,w=function(){function E(C,D,I,J,H,ee){ee===void 0&&(ee=!1),typeof C=="object"?(this.scheme=C.scheme||b,this.authority=C.authority||b,this.path=C.path||b,this.query=C.query||b,this.fragment=C.fragment||b):(this.scheme=function(Be,_e){return Be||_e?Be:"file"}(C,ee),this.authority=D||b,this.path=function(Be,_e){switch(Be){case"https":case"http":case"file":_e?_e[0]!==y&&(_e=y+_e):_e=y}return _e}(this.scheme,I||b),this.query=J||b,this.fragment=H||b,g(this,ee))}return E.isUri=function(C){return C instanceof E||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"},Object.defineProperty(E.prototype,"fsPath",{get:function(){return B(this,!1)},enumerable:!1,configurable:!0}),E.prototype.with=function(C){if(!C)return this;var D=C.scheme,I=C.authority,J=C.path,H=C.query,ee=C.fragment;return D===void 0?D=this.scheme:D===null&&(D=b),I===void 0?I=this.authority:I===null&&(I=b),J===void 0?J=this.path:J===null&&(J=b),H===void 0?H=this.query:H===null&&(H=b),ee===void 0?ee=this.fragment:ee===null&&(ee=b),D===this.scheme&&I===this.authority&&J===this.path&&H===this.query&&ee===this.fragment?this:new R(D,I,J,H,ee)},E.parse=function(C,D){D===void 0&&(D=!1);var I=x.exec(C);return I?new R(I[2]||b,F(I[4]||b),F(I[5]||b),F(I[7]||b),F(I[9]||b),D):new R(b,b,b,b,b)},E.file=function(C){var D=b;if(a&&(C=C.replace(/\\/g,y)),C[0]===y&&C[1]===y){var I=C.indexOf(y,2);I===-1?(D=C.substring(2),C=y):(D=C.substring(2,I),C=C.substring(I)||y)}return new R("file",D,C,b,b)},E.from=function(C){var D=new R(C.scheme,C.authority,C.path,C.query,C.fragment);return g(D,!0),D},E.prototype.toString=function(C){return C===void 0&&(C=!1),P(this,C)},E.prototype.toJSON=function(){return this},E.revive=function(C){if(C){if(C instanceof E)return C;var D=new R(C);return D._formatted=C.external,D._fsPath=C._sep===k?C.fsPath:null,D}return C},E}(),k=a?1:void 0,R=function(E){function C(){var D=E!==null&&E.apply(this,arguments)||this;return D._formatted=null,D._fsPath=null,D}return h(C,E),Object.defineProperty(C.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=B(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),C.prototype.toString=function(D){return D===void 0&&(D=!1),D?P(this,!0):(this._formatted||(this._formatted=P(this,!1)),this._formatted)},C.prototype.toJSON=function(){var D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=k),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D},C}(w),z=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function $(E,C){for(var D=void 0,I=-1,J=0;J=97&&H<=122||H>=65&&H<=90||H>=48&&H<=57||H===45||H===46||H===95||H===126||C&&H===47)I!==-1&&(D+=encodeURIComponent(E.substring(I,J)),I=-1),D!==void 0&&(D+=E.charAt(J));else{D===void 0&&(D=E.substr(0,J));var ee=z[H];ee!==void 0?(I!==-1&&(D+=encodeURIComponent(E.substring(I,J)),I=-1),D+=ee):I===-1&&(I=J)}}return I!==-1&&(D+=encodeURIComponent(E.substring(I))),D!==void 0?D:E}function X(E){for(var C=void 0,D=0;D1&&E.scheme==="file"?"//".concat(E.authority).concat(E.path):E.path.charCodeAt(0)===47&&(E.path.charCodeAt(1)>=65&&E.path.charCodeAt(1)<=90||E.path.charCodeAt(1)>=97&&E.path.charCodeAt(1)<=122)&&E.path.charCodeAt(2)===58?C?E.path.substr(1):E.path[1].toLowerCase()+E.path.substr(2):E.path,a&&(D=D.replace(/\//g,"\\")),D}function P(E,C){var D=C?X:$,I="",J=E.scheme,H=E.authority,ee=E.path,Be=E.query,_e=E.fragment;if(J&&(I+=J,I+=":"),(H||J==="file")&&(I+=y,I+=y),H){var Pe=H.indexOf("@");if(Pe!==-1){var Mt=H.substr(0,Pe);H=H.substr(Pe+1),(Pe=Mt.indexOf(":"))===-1?I+=D(Mt,!1):(I+=D(Mt.substr(0,Pe),!1),I+=":",I+=D(Mt.substr(Pe+1),!1)),I+="@"}(Pe=(H=H.toLowerCase()).indexOf(":"))===-1?I+=D(H,!1):(I+=D(H.substr(0,Pe),!1),I+=H.substr(Pe))}if(ee){if(ee.length>=3&&ee.charCodeAt(0)===47&&ee.charCodeAt(2)===58)(lt=ee.charCodeAt(1))>=65&<<=90&&(ee="/".concat(String.fromCharCode(lt+32),":").concat(ee.substr(3)));else if(ee.length>=2&&ee.charCodeAt(1)===58){var lt;(lt=ee.charCodeAt(0))>=65&<<=90&&(ee="".concat(String.fromCharCode(lt+32),":").concat(ee.substr(2)))}I+=D(ee,!0)}return Be&&(I+="?",I+=D(Be,!1)),_e&&(I+="#",I+=C?_e:$(_e,!1)),I}function N(E){try{return decodeURIComponent(E)}catch{return E.length>3?E.substr(0,3)+N(E.substr(3)):E}}var A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function F(E){return E.match(A)?E.replace(A,function(C){return N(C)}):E}var L,V=s(470),K=function(E,C,D){if(D||arguments.length===2)for(var I,J=0,H=C.length;J{for(var s in i)n.o(i,s)&&!n.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();var{URI:ki,Utils:_i}=vl,wu=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=0;a--){var o=this.nodePath[a];if(o instanceof si)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof mo)o.parent instanceof di?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof $t){var l=o.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Ht)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof ri)this.getCompletionsForDeclarations(o,s);else if(o instanceof Yn)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof qt)this.getCompletionsForRuleSet(o,s);else if(o instanceof di)this.getCompletionsForInterpolation(o,s);else if(o instanceof Xn)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof Kn)this.getCompletionsForMixinReference(o,s);else if(o instanceof pn)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof oi)this.getCompletionsForSupports(o,s);else if(o instanceof fn)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof mn)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===v.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===v.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},t.prototype.isImportPathParent=function(e){return e===v.Import},t.prototype.finalize=function(e){return e},t.prototype.findInNodePath=function(){for(var e=[],n=0;n=0;r--){var i=this.nodePath[r];if(e.indexOf(i.type)!==-1)return i}return null},t.prototype.getCompletionsForDeclarationProperty=function(e,n){return this.getPropertyProposals(e,n)},t.prototype.getPropertyProposals=function(e,n){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,a=this.cssDataManager.getProperties();return a.forEach(function(o){var l,c,h=!1;e?(l=r.getCompletionRange(e.getProperty()),c=o.name,Ue(e.colonPosition)||(c+=": ",h=!0)):(l=r.getCompletionRange(null),c=o.name+": ",h=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&r.offset>=r.textDocument.offsetAt(l.end)&&(c+="$0;");var u={label:o.name,documentation:wt(o,r.doesSupportMarkdown()),tags:kn(o)?[Rt.Deprecated]:[],textEdit:q.replace(l,c),insertTextFormat:ze.Snippet,kind:j.Property};o.restrictions||(h=!1),i&&h&&(u.command=xl);var f=typeof o.relevance=="number"?Math.min(Math.max(o.relevance,0),99):50,m=(255-f).toString(16),g=ge(o.name,"-")?et.VendorPrefixed:et.Normal;u.sortText=g+"_"+m,n.items.push(u)}),this.completionParticipants.forEach(function(o){o.onCssProperty&&o.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})}),n},Object.defineProperty(t.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),t.prototype.getCompletionsForDeclarationValue=function(e,n){for(var r=this,i=e.getFullPropertyName(),s=this.cssDataManager.getProperty(i),a=e.getValue()||null;a&&a.hasChildren();)a=a.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(g){g.onCssPropertyValue&&g.onCssPropertyValue({propertyName:i,propertyValue:r.currentWord,range:r.getCompletionRange(a)})}),s){if(s.restrictions)for(var o=0,l=s.restrictions;o=e.offset+2&&this.getVariableProposals(null,n),n},t.prototype.getVariableProposals=function(e,n){for(var r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Y.Variable),i=0,s=r;i0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(var a=0,o=e.restrictions;a=r.end;if(i)return this.getCompletionForTopLevel(n);var s=!r||this.offset<=r.offset;return s?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)},t.prototype.getCompletionsForSelector=function(e,n,r){var i=this,s=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=te.create(Fe.create(this.position.line,this.position.character-this.currentWord.length),this.position));var a=this.cssDataManager.getPseudoClasses();a.forEach(function(y){var x=Yt(y.name),w={label:y.name,textEdit:q.replace(i.getCompletionRange(s),x),documentation:wt(y,i.doesSupportMarkdown()),tags:kn(y)?[Rt.Deprecated]:[],kind:j.Function,insertTextFormat:y.name!==x?rt:void 0};ge(y.name,":-")&&(w.sortText=et.VendorPrefixed),r.items.push(w)});var o=this.cssDataManager.getPseudoElements();if(o.forEach(function(y){var x=Yt(y.name),w={label:y.name,textEdit:q.replace(i.getCompletionRange(s),x),documentation:wt(y,i.doesSupportMarkdown()),tags:kn(y)?[Rt.Deprecated]:[],kind:j.Function,insertTextFormat:y.name!==x?rt:void 0};ge(y.name,"::-")&&(w.sortText=et.VendorPrefixed),r.items.push(w)}),!n){for(var l=0,c=pu;l0){var x=g.substr(y.offset,y.length);return x.charAt(0)==="."&&!m[x]&&(m[x]=!0,r.items.push({label:x,textEdit:q.replace(i.getCompletionRange(s),x),kind:j.Keyword})),!1}return!0}),e&&e.isNested()){var b=e.getSelectors().findFirstChildBeforeOffset(this.offset);b&&e.getSelectors().getChildren().indexOf(b)===0&&this.getPropertyProposals(null,r)}return r},t.prototype.getCompletionsForDeclarations=function(e,n){if(!e||this.offset===e.offset)return n;var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof ii){var i=r;if(!Ue(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Ue(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),n),n},t.prototype.getCompletionsForExpression=function(e,n){var r=e.getParent();if(r instanceof Ht)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;var i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof hi||s instanceof We?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)},t.prototype.getCompletionsForFunctionArgument=function(e,n,r){var i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r},t.prototype.getCompletionsForFunctionDeclaration=function(e,n){var r=e.getDeclarations();return r&&this.offset>r.offset&&this.offsete.lParent&&(!Ue(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n},t.prototype.getCompletionsForSupports=function(e,n){var r=e.getDeclarations(),i=!r||this.offset<=r.offset;if(i){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof fn?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)},t.prototype.getCompletionsForExtendsReference=function(e,n,r){return r},t.prototype.getCompletionForUriLiteralValue=function(e,n){var r,i,s;if(e.hasChildren()){var o=e.getChild(0);r=o.getText(),i=this.position,s=this.getCompletionRange(o)}else{r="",i=this.position;var a=this.textDocument.positionAt(e.offset+4);s=te.create(a,a)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n},t.prototype.getCompletionForImportPath=function(e,n){var r=this;return this.completionParticipants.forEach(function(i){i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:r.position,range:r.getCompletionRange(e)})}),n},t.prototype.hasCharacterAtPosition=function(e,n){var r=this.textDocument.getText();return e>=0&&e=0&&` -\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}function Sl(t){return t.toLowerCase()in or||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}var Cl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zu=Ge(),Mi=function(){function t(){this.parent=null,this.children=null,this.attributes=null}return t.prototype.findAttribute=function(e){if(this.attributes)for(var n=0,r=this.attributes;n"),this.writeLine(n,i.join(""))},t}(),it;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){var i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(it||(it={}));var _l=function(){function t(){this.id=0,this.attr=0,this.tag=0}return t}();function Fl(t,e){for(var n=new Mi,r=0,i=t.getChildren();r1){var c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(a[l])}}break;case v.SelectorPlaceholder:if(s.matches("@at-root"))return n;case v.ElementNameSelector:var h=s.getText();n.addAttr("name",h==="*"?"element":Ve(h));break;case v.ClassSelector:n.addAttr("class",Ve(s.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Ve(s.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",s.getName());break;case v.PseudoSelector:n.addAttr(Ve(s.getText()),"");break;case v.AttributeSelector:var u=s,f=u.getIdentifier();if(f){var m=u.getValue(),g=u.getOperator(),b=void 0;if(m&&g)switch(Ve(g.getText())){case"|=":b="".concat(it.remove(Ve(m.getText())),"-…");break;case"^=":b="".concat(it.remove(Ve(m.getText())),"…");break;case"$=":b="…".concat(it.remove(Ve(m.getText())));break;case"~=":b=" … ".concat(it.remove(Ve(m.getText()))," … ");break;case"*=":b="…".concat(it.remove(Ve(m.getText())),"…");break;default:b=it.remove(Ve(m.getText()));break}n.addAttr(Ve(f.getText()),b)}break}}return n}function Ve(t){var e=new dn;e.setSource(t);var n=e.scanUnquotedString();return n?n.text:t}var Pu=function(){function t(e){this.cssDataManager=e}return t.prototype.selectorToMarkedString=function(e){var n=Tu(e);if(n){var r=new kl('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]},t.prototype.simpleSelectorToMarkedString=function(e){var n=Fl(e),r=new kl('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r},t.prototype.isPseudoElementIdentifier=function(e){var n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1},t.prototype.selectorToSpecificityMarkedString=function(e){var n=this,r=function(s){var a=new _l;e:for(var o=0,l=s.getChildren();o0){for(var u=new _l,f=0,m=c.getChildren();fu.id){u=w;continue}else if(w.idu.attr){u=w;continue}else if(w.attru.tag){u=w;continue}}}a.id+=u.id,a.attr+=u.attr,a.tag+=u.tag;continue e}a.attr++;break}if(c.getChildren().length>0){var w=r(c);a.id+=w.id,a.attr+=w.attr,a.tag+=w.tag}}return a},i=r(e);return zu("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",i.id,i.attr,i.tag)},t}(),Iu=function(){function t(e){this.prev=null,this.element=e}return t.prototype.processSelector=function(e){var n=null;if(!(this.element instanceof Kt)&&e.getChildren().some(function(h){return h.hasChildren()&&h.getChild(0).type===v.SelectorCombinator})){var r=this.element.findRoot();r.parent instanceof Kt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,s=e.getChildren();i=0;a--){var o=n[a].getSelectors().getChild(0);o&&s.processSelector(o)}return s.processSelector(t),e}var zi=function(){function t(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new Pu(n)}return t.prototype.configure=function(e){this.defaultSettings=e},t.prototype.doHover=function(e,n,r,i){i===void 0&&(i=this.defaultSettings);function s(y){return te.create(e.positionAt(y.offset),e.positionAt(y.end))}for(var a=e.offsetAt(n),o=ni(r,a),l=null,c=0;c0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=s.length/2&&a.push({property:x.name,score:w})}),a.sort(function(x,w){return w.score-x.score||x.property.localeCompare(w.property)});for(var o=3,l=0,c=a;l=0;l--){var c=o[l];if(c instanceof Ze){var h=c.getProperty();if(h&&h.offset===s&&h.end===a){this.getFixesForUnknownProperty(e,h,r,i);return}}}},t}(),$u=function(){function t(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return t}();function Rn(t,e,n,r){var i=t[e];i.value=n,n&&(gl(i.properties,r)||i.properties.push(r))}function Hu(t,e,n){Rn(t,"top",e,n),Rn(t,"right",e,n),Rn(t,"bottom",e,n),Rn(t,"left",e,n)}function Se(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Rn(t,e,n,r):Hu(t,n,r)}function Li(t,e,n){switch(e.length){case 1:Se(t,void 0,e[0],n);break;case 2:Se(t,"top",e[0],n),Se(t,"bottom",e[0],n),Se(t,"right",e[1],n),Se(t,"left",e[1],n);break;case 3:Se(t,"top",e[0],n),Se(t,"right",e[1],n),Se(t,"left",e[1],n),Se(t,"bottom",e[2],n);break;case 4:Se(t,"top",e[0],n),Se(t,"right",e[1],n),Se(t,"bottom",e[2],n),Se(t,"left",e[3],n);break}}function Ti(t,e){for(var n=0,r=e;n"u"))switch(i.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=i;break;case"height":e.height=i;break;default:var a=i.fullPropertyName.split("-");switch(a[0]){case"border":switch(a[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(a[2]){case void 0:Se(e,a[1],Ju(s),i);break;case"width":Se(e,a[1],En(s,!1),i);break;case"style":Se(e,a[1],fr(s,!0),i);break}break;case"width":Li(e,Nl(s.getChildren(),!1),i);break;case"style":Li(e,Gu(s.getChildren(),!0),i);break}break;case"padding":a.length===1?Li(e,Nl(s.getChildren(),!0),i):Se(e,a[1],En(s,!0),i);break}break}}return e}var st=Ge(),zl=function(){function t(){this.data={}}return t.prototype.add=function(e,n,r){var i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)},t}(),Yu=function(){function t(e,n,r){var i=this;this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new zl,this.validProperties={};var s=n.getSetting(Vu.ValidProperties);Array.isArray(s)&&s.forEach(function(a){if(typeof a=="string"){var o=a.trim().toLowerCase();o.length&&(i.validProperties[o]=!0)}})}return t.entries=function(e,n,r,i,s){var a=new t(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)},t.prototype.isValidPropertyDeclaration=function(e){var n=e.fullPropertyName;return this.validProperties[n]},t.prototype.fetch=function(e,n){for(var r=[],i=0,s=e;i0)for(var b=this.fetch(r,"float"),y=0;y0)for(var b=this.fetch(r,"vertical-align"),y=0;y1)for(var $=0;$")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var n=this.createNode(v.Operator);return this.consumeToken(),this.finish(n)}return t.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var n=this.create(W);return this.consumeToken(),this.finish(n)}return t.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(n){var r=this._tryParseCustomPropertyDeclaration(n);if(r)return r;var i=this.create(Ze);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(i,S.ColonExpected,[p.Colon],n||[p.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);var s=!1;if(i.setValue(this._parseExpr())&&(s=!0,i.addChild(this._parsePrio())),this.peek(p.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(i,S.PropertyValueExpected);return this.peek(p.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseNestedProperties=function(){var n=this.create(lo);return this._parseBody(n,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var n=this.create(mn);if(this.consumeToken(),!n.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(n,S.SelectorExpected);for(;this.accept(p.Comma);)n.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(n,S.UnknownKeyword):this.finish(n)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(n)}else if(this.peekKeyword("@at-root")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this.finish(n)}return null},e.prototype._parseElementName=function(){var n=this.mark(),r=t.prototype._parseElementName.call(this);return r&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(n),null):r},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||t.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var n=this.createNode(v.Debug);return this.consumeToken(),n.addChild(this._parseExpr()),this.finish(n)},e.prototype._parseControlStatement=function(n){return n===void 0&&(n=this._parseRuleSetDeclaration.bind(this)),this.peek(p.AtKeyword)?this._parseIfStatement(n)||this._parseForStatement(n)||this._parseEachStatement(n)||this._parseWhileStatement(n):null},e.prototype._parseIfStatement=function(n){return this.peekKeyword("@if")?this._internalParseIfStatement(n):null},e.prototype._internalParseIfStatement=function(n){var r=this.create(kd);if(this.consumeToken(),!r.setExpression(this._parseExpr(!0)))return this.finish(r,S.ExpressionExpected);if(this._parseBody(r,n),this.acceptKeyword("@else")){if(this.peekIdent("if"))r.setElseClause(this._internalParseIfStatement(n));else if(this.peek(p.CurlyL)){var i=this.create(Ed);this._parseBody(i,n),r.setElseClause(i)}}return this.finish(r)},e.prototype._parseForStatement=function(n){if(!this.peekKeyword("@for"))return null;var r=this.create(_d);return this.consumeToken(),r.setVariable(this._parseVariable())?this.acceptIdent("from")?r.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(r,ji.ThroughOrToExpected,[p.CurlyR]):r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,ji.FromExpected,[p.CurlyR]):this.finish(r,S.VariableNameExpected,[p.CurlyR])},e.prototype._parseEachStatement=function(n){if(!this.peekKeyword("@each"))return null;var r=this.create(Fd);this.consumeToken();var i=r.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(r,S.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(r,S.VariableNameExpected,[p.CurlyR]);return this.finish(i),this.acceptIdent("in")?r.addChild(this._parseExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,ji.InExpected,[p.CurlyR])},e.prototype._parseWhileStatement=function(n){if(!this.peekKeyword("@while"))return null;var r=this.create(Rd);return this.consumeToken(),r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var n=this.create(Xn);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Y.Function])))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.CurlyR]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(n,this._parseFunctionBodyDeclaration.bind(this)):this.finish(n,S.RightParenthesisExpected,[p.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var n=this.createNode(v.ReturnStatement);return this.consumeToken(),n.addChild(this._parseExpr())?this.finish(n):this.finish(n,S.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var n=this.create(gn);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Y.Mixin])))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var n=this.create(Jn);return n.setIdentifier(this._parseVariable())?(this.accept(gr),this.accept(p.Colon)&&!n.setDefaultValue(this._parseExpr(!0))?this.finish(n,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(n)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var n=this.create(Hd);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return this.finish(n)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var n=this.create(Kn);this.consumeToken();var r=this._parseIdent([Y.Mixin]);if(!n.setIdentifier(r))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var i=this._parseIdent([Y.Mixin]);if(!i)return this.finish(n,S.IdentifierExpected,[p.CurlyR]);var s=this.create(bo);r.referenceTypes=[Y.Module],s.setIdentifier(r),n.setIdentifier(i),n.addChild(s)}if(this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&n.setContent(this._parseMixinContentDeclaration()),this.finish(n)},e.prototype._parseMixinContentDeclaration=function(){var n=this.create(Gd);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.CurlyL]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(n,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(n)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var n=this.create(Ht),r=this.mark(),i=this._parseVariable();if(i)if(this.accept(p.Colon))n.setIdentifier(i);else{if(this.accept(gr))return n.setValue(i),this.finish(n);this.restoreAtMark(r)}return n.setValue(this._parseExpr(!0))?(this.accept(gr),n.addChild(this._parsePrio()),this.finish(n)):n.setValue(this._tryParsePrio())?this.finish(n):null},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(W);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(W);for(this.consumeToken();n.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseListElement=function(){var n=this.create(Jd),r=this._parseBinaryExpr();if(!r)return null;if(this.accept(p.Colon)){if(n.setKey(r),!n.setValue(this._parseBinaryExpr()))return this.finish(n,S.ExpressionExpected)}else n.setValue(r);return this.finish(n)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var n=this.create(Ad);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,S.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(n,S.UnknownKeyword);if(this.acceptIdent("as")&&!n.setIdentifier(this._parseIdent([Y.Module]))&&!this.acceptDelim("*"))return this.finish(n,S.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,S.SemiColonExpected):this.finish(n)},e.prototype._parseModuleConfigDeclaration=function(){var n=this.create(Md);return n.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!n.setValue(this._parseExpr(!0))?this.finish(n,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(n,S.UnknownKeyword):this.finish(n):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var n=this.create(Nd);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,S.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|hide|show/))return this.finish(n,S.UnknownKeyword);if(this.acceptIdent("as")){var r=this._parseIdent([Y.Forward]);if(!n.setIdentifier(r))return this.finish(n,S.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(n,S.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!n.addChild(this._parseForwardVisibility()))return this.finish(n,S.IdentifierOrVariableExpected)}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,S.SemiColonExpected):this.finish(n)},e.prototype._parseForwardVisibility=function(){var n=this.create(zd);for(n.setIdentifier(this._parseIdent());n.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return n.getChildren().length>1?n:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||t.prototype._parseSupportsCondition.call(this)},e}(Si),cp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=Ge(),hp=function(t){cp(e,t);function e(n,r){var i=t.call(this,"$",n,r)||this;return Ul(e.scssModuleLoaders),Ul(e.scssModuleBuiltIns),i}return e.prototype.isImportPathParent=function(n){return n===v.Forward||n===v.Use||t.prototype.isImportPathParent.call(this,n)},e.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===v.Forward||i===v.Use)for(var s=0,a=e.scssModuleBuiltIns;s=0&&i<=1)return i}throw new Error}function rl(t){var e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function bu(t){var e=t.getName();return e?/^(rgb|rgba|hsl|hsla|hwb)$/gi.test(e):!1}var il=48,vu=57,yu=65,pr=97,wu=102;function de(t){return t=pr&&t<=wu?t-pr+10:0)}function sl(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:de(t.charCodeAt(1))*17/255,green:de(t.charCodeAt(2))*17/255,blue:de(t.charCodeAt(3))*17/255,alpha:de(t.charCodeAt(4))*17/255};case 7:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(de(t.charCodeAt(1))*16+de(t.charCodeAt(2)))/255,green:(de(t.charCodeAt(3))*16+de(t.charCodeAt(4)))/255,blue:(de(t.charCodeAt(5))*16+de(t.charCodeAt(6)))/255,alpha:(de(t.charCodeAt(7))*16+de(t.charCodeAt(8)))/255}}return null}function al(t,e,n,r){if(r===void 0&&(r=1),t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};var i=function(o,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}function ol(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r),o=0,l=0,c=(a+s)/2,h=s-a;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:o=(n-r)/h+(n=1){var i=e/(e+n);return{red:i,green:i,blue:i,alpha:r}}var s=al(t,1,.5,r),a=s.red;a*=1-e-n,a+=e;var o=s.green;o*=1-e-n,o+=e;var l=s.blue;return l*=1-e-n,l+=e,{red:a,green:o,blue:l,alpha:r}}function Su(t){var e=ol(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function Cu(t){if(t.type===v.HexColorValue){var e=t.getText();return sl(e)}else if(t.type===v.Function){var n=t,r=n.getName(),i=n.getArguments().getChildren();if(i.length===1){var s=i[0].getChildren();if(s.length===1&&s[0].type===v.Expression&&(i=s[0].getChildren(),i.length===3)){var a=i[2];if(a instanceof bi){var o=a.getLeft(),l=a.getRight(),c=a.getOperator();o&&l&&c&&c.matches("/")&&(i=[i[0],i[1],o,l])}}}if(!r||i.length<3||i.length>4)return null;try{var h=i.length===4?xt(i[3],1):1;if(r==="rgb"||r==="rgba")return{red:xt(i[0],255),green:xt(i[1],255),blue:xt(i[2],255),alpha:h};if(r==="hsl"||r==="hsla"){var u=rl(i[0]),f=xt(i[1],100),m=xt(i[2],100);return al(u,f,m,h)}else if(r==="hwb"){var u=rl(i[0]),g=xt(i[1],100),b=xt(i[2],100);return xu(u,g,b,h)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;var y=t.parent;if(y&&y.parent&&y.parent.type===v.BinaryExpression){var x=y.parent;if(x.parent&&x.parent.type===v.ListEntry&&x.parent.key===x)return null}var S=t.getText().toLowerCase();if(S==="none")return null;var w=ur[S];if(w)return sl(w)}return null}var ll={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},cl={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},hl={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},ku=["medium","thick","thin"],dl={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},ul={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},pl={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},fl={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},ml={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},gl={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},bl={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},vl={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},_u=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Ru=["circle","clipPath","cursor","defs","desc","ellipse","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","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Fu=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function fr(t){return Object.keys(t).map(function(e){return t[e]})}function We(t){return typeof t<"u"}var yl=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;re.offset?s-e.offset:0}return e},t.prototype.markError=function(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new So(e,n,Me.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)},t.prototype.parseStylesheet=function(e){var n=e.version,r=e.getText(),i=function(s,a){if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)},t.prototype.internalParse=function(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();var i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=function(s,a){return e.substr(s,a)}),i},t.prototype._parseStylesheet=function(){for(var e=this.create(Md);e.addChild(this._parseStylesheetStart()););var n=!1;do{var r=!1;do{r=!1;var i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,C.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,C.UnknownAtRule):this.markError(e,C.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)},t.prototype._parseStylesheetStart=function(){return this._parseCharset()},t.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},t.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},t.prototype._tryParseRuleset=function(e){var n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null},t.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var n=this.create(Ht),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,C.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},t.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},t.prototype._needsSemicolonAfter=function(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1},t.prototype._parseDeclarations=function(e){var n=this.create(ui);if(!this.accept(p.CurlyL))return null;for(var r=e();n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,C.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,C.RightCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseBody=function(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,C.LeftCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseSelector=function(e){var n=this.create(vn),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null},t.prototype._parseDeclaration=function(e){var n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;var r=this.create(Qe);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,C.PropertyValueExpected)):this.finish(r,C.ColonExpected,[p.Colon],e||[p.SemiColon]):null},t.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(p.Ident,/^--/))return null;var n=this.create(Pd);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,C.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var r=this.mark();if(this.peek(p.CurlyL)){var i=this.create(zd),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(s)&&!s.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(i),n.setPropertySet(i),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}var a=this._parseExpr();return a&&!a.isErroneous(!0)&&(this._parsePrio(),this.peekOne.apply(this,yl(yl([],e||[],!1),[p.SemiColon,p.EOF],!1)))?(n.setValue(a),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),We(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,C.PropertyValueExpected):this.finish(n))},t.prototype._parseCustomPropertyValue=function(e){var n=this;e===void 0&&(e=[p.CurlyR]);var r=this.create(V),i=function(){return a===0&&o===0&&l===0},s=function(){return e.indexOf(n.token.type)!==-1},a=0,o=0,l=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(i())break e;break;case p.Exclamation:if(i())break e;break;case p.CurlyL:a++;break;case p.CurlyR:if(a--,a<0){if(s()&&o===0&&l===0)break e;return this.finish(r,C.LeftCurlyExpected)}break;case p.ParenthesisL:o++;break;case p.ParenthesisR:if(o--,o<0){if(s()&&l===0&&a===0)break e;return this.finish(r,C.LeftParenthesisExpected)}break;case p.BracketL:l++;break;case p.BracketR:if(l--,l<0)return this.finish(r,C.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:var c=C.RightCurlyExpected;return l>0?c=C.RightSquareBracketExpected:o>0&&(c=C.RightParenthesisExpected),this.finish(r,c)}this.consumeToken()}return this.finish(r)},t.prototype._tryToParseDeclaration=function(e){var n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)},t.prototype._parseProperty=function(){var e=this.create(fi),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},t.prototype._parseCharset=function(){if(!this.peek(p.Charset))return null;var e=this.create(V);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,C.SemiColonExpected):this.finish(e,C.IdentifierExpected)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(mi);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,C.URIOrStringExpected):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},t.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Hd);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,C.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,C.SemiColonExpected)},t.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(uo);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Vd);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseKeyframe=function(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;var e=this.create(fo),n=this.create(V);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,C.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,C.IdentifierExpected,[p.CurlyR])},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([Q.Keyframe])},t.prototype._parseKeyframeSelector=function(){var e=this.create(mo);if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.finish(e,C.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._tryParseKeyframeSelector=function(){var e=this.create(mo),n=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)},t.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var n=this.create(gi);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))},t.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseSupportsCondition=function(){var e=this.create(wn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i))for(var n=this.token.text.toLowerCase();this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},t.prototype._parseSupportsConditionInParens=function(){var e=this.create(wn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,C.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,C.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){var n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){for(var r=1;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,C.LeftParenthesisExpected,[],[p.ParenthesisL])},t.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var n=this.create(go);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,C.MediaQueryExpected)},t.prototype._parseMediaQueryList=function(){var e=this.create(bo);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,C.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,C.MediaQueryExpected);return this.finish(e)},t.prototype._parseMediaQuery=function(){var e=this.create(vo),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)},t.prototype._parseRatio=function(){var e=this.mark(),n=this.create(eu);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,C.NumberExpected):(this.restoreAtMark(e),null):null},t.prototype._parseMediaCondition=function(){var e=this.create(Jd);this.acceptIdent("not");for(var n=!0;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,C.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,C.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)},t.prototype._parseMediaFeature=function(){var e=this,n=[p.ParenthesisR],r=this.create(Xd),i=function(){return e.acceptDelim("<")||e.acceptDelim(">")?(e.hasWhitespace()||e.acceptDelim("="),!0):!!e.acceptDelim("=")};if(r.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,C.TermExpected,[],n)}else if(i()){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,C.TermExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,C.TermExpected,[],n)}}else if(r.addChild(this._parseMediaFeatureValue())){if(!i())return this.finish(r,C.OperatorExpected,[],n);if(!r.addChild(this._parseMediaFeatureName()))return this.finish(r,C.IdentifierExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,C.TermExpected,[],n)}else return this.finish(r,C.IdentifierExpected,[],n);return this.finish(r)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()},t.prototype._parseMediaFeatureValue=function(){return this._parseRatio()||this._parseTermExpression()},t.prototype._parseMedium=function(){var e=this.create(V);return e.addChild(this._parseIdent())?this.finish(e):null},t.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},t.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(Yd);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,C.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},t.prototype._parsePageMarginBox=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create(Kd);return this.acceptOneKeyword(Fu)||this.markError(e,C.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parsePageSelector=function(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;var e=this.create(V);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,C.IdentifierExpected):this.finish(e)},t.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Gd);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},t.prototype._parseUnknownAtRule=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create(wo);e.addChild(this._parseUnknownAtRuleName());var n=function(){return i===0&&s===0&&a===0},r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,C.RightCurlyExpected):a>0?this.finish(e,C.RightSquareBracketExpected):s>0?this.finish(e,C.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,C.RightSquareBracketExpected);if(s>0)return this.finish(e,C.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,C.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,C.LeftParenthesisExpected);break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(e,C.LeftSquareBracketExpected);break}this.consumeToken()}return e},t.prototype._parseUnknownAtRuleName=function(){var e=this.create(V);return this.accept(p.AtKeyword)?this.finish(e):e},t.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null},t.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(V);return this.consumeToken(),this.finish(e)},t.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(V);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(V);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(V);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(V);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null},t.prototype._parseSimpleSelector=function(){var e=this.create(Gt),n=0;for(e.addChild(this._parseElementName())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null},t.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},t.prototype._parseSelectorIdent=function(){return this._parseIdent()},t.prototype._parseHash=function(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,C.IdentifierExpected)}else this.consumeToken();return this.finish(e)},t.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,C.IdentifierExpected):this.finish(e)},t.prototype._parseElementName=function(){var e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)},t.prototype._parseNamespacePrefix=function(){var e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)},t.prototype._parseAttrib=function(){if(!this.peek(p.BracketL))return null;var e=this.create(Zd);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,C.RightSquareBracketExpected)):this.finish(e,C.IdentifierExpected)},t.prototype._parsePseudo=function(){var e=this,n=this._tryParsePseudoIdentifier();if(n){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=function(){var i=e.create(V);if(!i.addChild(e._parseSelector(!1)))return null;for(;e.accept(p.Comma)&&i.addChild(e._parseSelector(!1)););return e.peek(p.ParenthesisR)?e.finish(i):null};if(n.addChild(this.try(r)||this._parseBinaryExpr()),!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected)}return this.finish(n)}return null},t.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(p.Colon))return null;var e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,C.IdentifierExpected):this.finish(n))},t.prototype._tryParsePrio=function(){var e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)},t.prototype._parsePrio=function(){if(!this.peek(p.Exclamation))return null;var e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},t.prototype._parseExpr=function(e){e===void 0&&(e=!1);var n=this.create(yo);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}else if(!this.hasWhitespace())break;if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)},t.prototype._parseUnicodeRange=function(){if(!this.peekIdent("u"))return null;var e=this.create(Nd);return this.acceptUnicodeRange()?this.finish(e):null},t.prototype._parseNamedLine=function(){if(!this.peek(p.BracketL))return null;var e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,C.RightSquareBracketExpected)},t.prototype._parseBinaryExpr=function(e,n){var r=this.create(bi);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,C.TermExpected);r=this.finish(r);var i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)},t.prototype._parseTerm=function(){var e=this.create(Qd);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},t.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},t.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var e=this.create(V);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,C.RightParenthesisExpected)},t.prototype._parseNumeric=function(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.Freq)){var e=this.create(yi);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseStringLiteral=function(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;var e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)},t.prototype._parseURILiteral=function(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,C.RightParenthesisExpected))},t.prototype._parseURLArgument=function(){var e=this.create(V);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},t.prototype._parseIdent=function(e){if(!this.peek(p.Ident))return null;var n=this.create(Ie);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)},t.prototype._parseFunction=function(){var e=this.mark(),n=this.create(yn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,C.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,C.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(!this.peek(p.Ident))return null;var e=this.create(Ie);if(e.referenceTypes=[Q.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},t.prototype._parseFunctionArgument=function(){var e=this.create(Jt);return e.setValue(this._parseExpr(!0))?this.finish(e):null},t.prototype._parseHexColor=function(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(vi);return this.consumeToken(),this.finish(e)}else return null},t}();function Eu(t,e){var n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null},t.prototype.findInScope=function(e,n){n===void 0&&(n=0);var r=e+n,i=Eu(this.children,function(a){return a.offset>r});if(i===0)return this;var s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this},t.prototype.addSymbol=function(e){this.symbols.push(e)},t.prototype.getSymbol=function(e,n){for(var r=0;r{var t={470:r=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,l){for(var c,h="",u=0,f=-1,m=0,g=0;g<=o.length;++g){if(g2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",u=0):u=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),f=g,m=0;continue}}else if(h.length===2||h.length===1){h="",u=0,f=g,m=0;continue}}l&&(h.length>0?h+="/..":h="..",u=2)}else h.length>0?h+="/"+o.slice(f+1,g):h=o.slice(f+1,g),u=g-f-1;f=g,m=0}else c===46&&m!==-1?++m:m=-1}return h}var a={resolve:function(){for(var o,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var u;h>=0?u=arguments[h]:(o===void 0&&(o=process.cwd()),u=o),i(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(o){if(i(o),o.length===0)return".";var l=o.charCodeAt(0)===47,c=o.charCodeAt(o.length-1)===47;return(o=s(o,!l)).length!==0||l||(o="."),o.length>0&&c&&(o+="/"),l?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,l=0;l0&&(o===void 0?o=c:o+="/"+c)}return o===void 0?".":a.normalize(o)},relative:function(o,l){if(i(o),i(l),o===l||(o=a.resolve(o))===(l=a.resolve(l)))return"";for(var c=1;cg){if(l.charCodeAt(f+y)===47)return l.slice(f+y+1);if(y===0)return l.slice(f+y)}else u>g&&(o.charCodeAt(c+y)===47?b=y:y===0&&(b=0));break}var x=o.charCodeAt(c+y);if(x!==l.charCodeAt(f+y))break;x===47&&(b=y)}var S="";for(y=c+b+1;y<=h;++y)y!==h&&o.charCodeAt(y)!==47||(S.length===0?S+="..":S+="/..");return S.length>0?S+l.slice(f+b):(f+=b,l.charCodeAt(f)===47&&++f,l.slice(f))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var l=o.charCodeAt(0),c=l===47,h=-1,u=!0,f=o.length-1;f>=1;--f)if((l=o.charCodeAt(f))===47){if(!u){h=f;break}}else u=!1;return h===-1?c?"/":".":c&&h===1?"//":o.slice(0,h)},basename:function(o,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(o);var c,h=0,u=-1,f=!0;if(l!==void 0&&l.length>0&&l.length<=o.length){if(l.length===o.length&&l===o)return"";var m=l.length-1,g=-1;for(c=o.length-1;c>=0;--c){var b=o.charCodeAt(c);if(b===47){if(!f){h=c+1;break}}else g===-1&&(f=!1,g=c+1),m>=0&&(b===l.charCodeAt(m)?--m==-1&&(u=c):(m=-1,u=g))}return h===u?u=g:u===-1&&(u=o.length),o.slice(h,u)}for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!f){h=c+1;break}}else u===-1&&(f=!1,u=c+1);return u===-1?"":o.slice(h,u)},extname:function(o){i(o);for(var l=-1,c=0,h=-1,u=!0,f=0,m=o.length-1;m>=0;--m){var g=o.charCodeAt(m);if(g!==47)h===-1&&(u=!1,h=m+1),g===46?l===-1?l=m:f!==1&&(f=1):l!==-1&&(f=-1);else if(!u){c=m+1;break}}return l===-1||h===-1||f===0||f===1&&l===h-1&&l===c+1?"":o.slice(l,h)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(l,c){var h=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+u:h+"/"+u:u}(0,o)},parse:function(o){i(o);var l={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return l;var c,h=o.charCodeAt(0),u=h===47;u?(l.root="/",c=1):c=0;for(var f=-1,m=0,g=-1,b=!0,y=o.length-1,x=0;y>=c;--y)if((h=o.charCodeAt(y))!==47)g===-1&&(b=!1,g=y+1),h===46?f===-1?f=y:x!==1&&(x=1):f!==-1&&(x=-1);else if(!b){m=y+1;break}return f===-1||g===-1||x===0||x===1&&f===g-1&&f===m+1?g!==-1&&(l.base=l.name=m===0&&u?o.slice(1,g):o.slice(m,g)):(m===0&&u?(l.name=o.slice(1,f),l.base=o.slice(1,g)):(l.name=o.slice(m,f),l.base=o.slice(m,g)),l.ext=o.slice(f,g)),m>0?l.dir=o.slice(0,m-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,r.exports=a},447:(r,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>S,Utils:()=>I}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var l,c,h=(l=function(A,k){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,P){N.__proto__=P}||function(N,P){for(var G in P)Object.prototype.hasOwnProperty.call(P,G)&&(N[G]=P[G])})(A,k)},function(A,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function N(){this.constructor=A}l(A,k),A.prototype=k===null?Object.create(k):(N.prototype=k.prototype,new N)}),u=/^\w[\w\d+.-]*$/,f=/^\//,m=/^\/\//;function g(A,k){if(!A.scheme&&k)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(A.authority,'", path: "').concat(A.path,'", query: "').concat(A.query,'", fragment: "').concat(A.fragment,'"}'));if(A.scheme&&!u.test(A.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(A.path){if(A.authority){if(!f.test(A.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(m.test(A.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var b="",y="/",x=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,S=function(){function A(k,N,P,G,K,ee){ee===void 0&&(ee=!1),typeof k=="object"?(this.scheme=k.scheme||b,this.authority=k.authority||b,this.path=k.path||b,this.query=k.query||b,this.fragment=k.fragment||b):(this.scheme=function(Ue,we){return Ue||we?Ue:"file"}(k,ee),this.authority=N||b,this.path=function(Ue,we){switch(Ue){case"https":case"http":case"file":we?we[0]!==y&&(we=y+we):we=y}return we}(this.scheme,P||b),this.query=G||b,this.fragment=K||b,g(this,ee))}return A.isUri=function(k){return k instanceof A||!!k&&typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="string"&&typeof k.with=="function"&&typeof k.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return L(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(k){if(!k)return this;var N=k.scheme,P=k.authority,G=k.path,K=k.query,ee=k.fragment;return N===void 0?N=this.scheme:N===null&&(N=b),P===void 0?P=this.authority:P===null&&(P=b),G===void 0?G=this.path:G===null&&(G=b),K===void 0?K=this.query:K===null&&(K=b),ee===void 0?ee=this.fragment:ee===null&&(ee=b),N===this.scheme&&P===this.authority&&G===this.path&&K===this.query&&ee===this.fragment?this:new E(N,P,G,K,ee)},A.parse=function(k,N){N===void 0&&(N=!1);var P=x.exec(k);return P?new E(P[2]||b,D(P[4]||b),D(P[5]||b),D(P[7]||b),D(P[9]||b),N):new E(b,b,b,b,b)},A.file=function(k){var N=b;if(a&&(k=k.replace(/\\/g,y)),k[0]===y&&k[1]===y){var P=k.indexOf(y,2);P===-1?(N=k.substring(2),k=y):(N=k.substring(2,P),k=k.substring(P)||y)}return new E("file",N,k,b,b)},A.from=function(k){var N=new E(k.scheme,k.authority,k.path,k.query,k.fragment);return g(N,!0),N},A.prototype.toString=function(k){return k===void 0&&(k=!1),q(this,k)},A.prototype.toJSON=function(){return this},A.revive=function(k){if(k){if(k instanceof A)return k;var N=new E(k);return N._formatted=k.external,N._fsPath=k._sep===w?k.fsPath:null,N}return k},A}(),w=a?1:void 0,E=function(A){function k(){var N=A!==null&&A.apply(this,arguments)||this;return N._formatted=null,N._fsPath=null,N}return h(k,A),Object.defineProperty(k.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=L(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),k.prototype.toString=function(N){return N===void 0&&(N=!1),N?q(this,!0):(this._formatted||(this._formatted=q(this,!1)),this._formatted)},k.prototype.toJSON=function(){var N={$mid:1};return this._fsPath&&(N.fsPath=this._fsPath,N._sep=w),this._formatted&&(N.external=this._formatted),this.path&&(N.path=this.path),this.scheme&&(N.scheme=this.scheme),this.authority&&(N.authority=this.authority),this.query&&(N.query=this.query),this.fragment&&(N.fragment=this.fragment),N},k}(S),R=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function T(A,k){for(var N=void 0,P=-1,G=0;G=97&&K<=122||K>=65&&K<=90||K>=48&&K<=57||K===45||K===46||K===95||K===126||k&&K===47)P!==-1&&(N+=encodeURIComponent(A.substring(P,G)),P=-1),N!==void 0&&(N+=A.charAt(G));else{N===void 0&&(N=A.substr(0,G));var ee=R[K];ee!==void 0?(P!==-1&&(N+=encodeURIComponent(A.substring(P,G)),P=-1),N+=ee):P===-1&&(P=G)}}return P!==-1&&(N+=encodeURIComponent(A.substring(P))),N!==void 0?N:A}function O(A){for(var k=void 0,N=0;N1&&A.scheme==="file"?"//".concat(A.authority).concat(A.path):A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?k?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,a&&(N=N.replace(/\//g,"\\")),N}function q(A,k){var N=k?O:T,P="",G=A.scheme,K=A.authority,ee=A.path,Ue=A.query,we=A.fragment;if(G&&(P+=G,P+=":"),(K||G==="file")&&(P+=y,P+=y),K){var Pe=K.indexOf("@");if(Pe!==-1){var Nt=K.substr(0,Pe);K=K.substr(Pe+1),(Pe=Nt.indexOf(":"))===-1?P+=N(Nt,!1):(P+=N(Nt.substr(0,Pe),!1),P+=":",P+=N(Nt.substr(Pe+1),!1)),P+="@"}(Pe=(K=K.toLowerCase()).indexOf(":"))===-1?P+=N(K,!1):(P+=N(K.substr(0,Pe),!1),P+=K.substr(Pe))}if(ee){if(ee.length>=3&&ee.charCodeAt(0)===47&&ee.charCodeAt(2)===58)(lt=ee.charCodeAt(1))>=65&<<=90&&(ee="/".concat(String.fromCharCode(lt+32),":").concat(ee.substr(3)));else if(ee.length>=2&&ee.charCodeAt(1)===58){var lt;(lt=ee.charCodeAt(0))>=65&<<=90&&(ee="".concat(String.fromCharCode(lt+32),":").concat(ee.substr(2)))}P+=N(ee,!0)}return Ue&&(P+="?",P+=N(Ue,!1)),we&&(P+="#",P+=k?we:T(we,!1)),P}function z(A){try{return decodeURIComponent(A)}catch{return A.length>3?A.substr(0,3)+z(A.substr(3)):A}}var F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(A){return A.match(F)?A.replace(F,function(k){return z(k)}):A}var I,W=s(470),J=function(A,k,N){if(N||arguments.length===2)for(var P,G=0,K=k.length;G{for(var s in i)n.o(i,s)&&!n.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();var{URI:zi,Utils:Pi}=Sl,Mu=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=0;a--){var o=this.nodePath[a];if(o instanceof fi)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof yo)o.parent instanceof wi?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof Gt){var l=o.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Jt)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof ui)this.getCompletionsForDeclarations(o,s);else if(o instanceof tr)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof Ht)this.getCompletionsForRuleSet(o,s);else if(o instanceof wi)this.getCompletionsForInterpolation(o,s);else if(o instanceof er)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof nr)this.getCompletionsForMixinReference(o,s);else if(o instanceof yn)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof gi)this.getCompletionsForSupports(o,s);else if(o instanceof wn)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof xn)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===v.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===v.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},t.prototype.isImportPathParent=function(e){return e===v.Import},t.prototype.finalize=function(e){return e},t.prototype.findInNodePath=function(){for(var e=[],n=0;n=0;r--){var i=this.nodePath[r];if(e.indexOf(i.type)!==-1)return i}return null},t.prototype.getCompletionsForDeclarationProperty=function(e,n){return this.getPropertyProposals(e,n)},t.prototype.getPropertyProposals=function(e,n){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,a=this.cssDataManager.getProperties();return a.forEach(function(o){var l,c,h=!1;e?(l=r.getCompletionRange(e.getProperty()),c=o.name,We(e.colonPosition)||(c+=": ",h=!0)):(l=r.getCompletionRange(null),c=o.name+": ",h=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&r.offset>=r.textDocument.offsetAt(l.end)&&(c+="$0;");var u={label:o.name,documentation:wt(o,r.doesSupportMarkdown()),tags:An(o)?[Ft.Deprecated]:[],textEdit:H.replace(l,c),insertTextFormat:ze.Snippet,kind:$.Property};o.restrictions||(h=!1),i&&h&&(u.command=_l);var f=typeof o.relevance=="number"?Math.min(Math.max(o.relevance,0),99):50,m=(255-f).toString(16),g=me(o.name,"-")?Ze.VendorPrefixed:Ze.Normal;u.sortText=g+"_"+m,n.items.push(u)}),this.completionParticipants.forEach(function(o){o.onCssProperty&&o.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})}),n},Object.defineProperty(t.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),t.prototype.getCompletionsForDeclarationValue=function(e,n){for(var r=this,i=e.getFullPropertyName(),s=this.cssDataManager.getProperty(i),a=e.getValue()||null;a&&a.hasChildren();)a=a.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(g){g.onCssPropertyValue&&g.onCssPropertyValue({propertyName:i,propertyValue:r.currentWord,range:r.getCompletionRange(a)})}),s){if(s.restrictions)for(var o=0,l=s.restrictions;o=e.offset+2&&this.getVariableProposals(null,n),n},t.prototype.getVariableProposals=function(e,n){for(var r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Q.Variable),i=0,s=r;i0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(var a=0,o=e.restrictions;a=r.end;if(i)return this.getCompletionForTopLevel(n);var s=!r||this.offset<=r.offset;return s?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)},t.prototype.getCompletionsForSelector=function(e,n,r){var i=this,s=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=ie.create(Fe.create(this.position.line,this.position.character-this.currentWord.length),this.position));var a=this.cssDataManager.getPseudoClasses();a.forEach(function(y){var x=Qt(y.name),S={label:y.name,textEdit:H.replace(i.getCompletionRange(s),x),documentation:wt(y,i.doesSupportMarkdown()),tags:An(y)?[Ft.Deprecated]:[],kind:$.Function,insertTextFormat:y.name!==x?rt:void 0};me(y.name,":-")&&(S.sortText=Ze.VendorPrefixed),r.items.push(S)});var o=this.cssDataManager.getPseudoElements();if(o.forEach(function(y){var x=Qt(y.name),S={label:y.name,textEdit:H.replace(i.getCompletionRange(s),x),documentation:wt(y,i.doesSupportMarkdown()),tags:An(y)?[Ft.Deprecated]:[],kind:$.Function,insertTextFormat:y.name!==x?rt:void 0};me(y.name,"::-")&&(S.sortText=Ze.VendorPrefixed),r.items.push(S)}),!n){for(var l=0,c=_u;l0){var x=g.substr(y.offset,y.length);return x.charAt(0)==="."&&!m[x]&&(m[x]=!0,r.items.push({label:x,textEdit:H.replace(i.getCompletionRange(s),x),kind:$.Keyword})),!1}return!0}),e&&e.isNested()){var b=e.getSelectors().findFirstChildBeforeOffset(this.offset);b&&e.getSelectors().getChildren().indexOf(b)===0&&this.getPropertyProposals(null,r)}return r},t.prototype.getCompletionsForDeclarations=function(e,n){if(!e||this.offset===e.offset)return n;var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof pi){var i=r;if(!We(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(We(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),n),n},t.prototype.getCompletionsForExpression=function(e,n){var r=e.getParent();if(r instanceof Jt)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;var i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof yi||s instanceof Ie?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)},t.prototype.getCompletionsForFunctionArgument=function(e,n,r){var i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r},t.prototype.getCompletionsForFunctionDeclaration=function(e,n){var r=e.getDeclarations();return r&&this.offset>r.offset&&this.offsete.lParent&&(!We(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n},t.prototype.getCompletionsForSupports=function(e,n){var r=e.getDeclarations(),i=!r||this.offset<=r.offset;if(i){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof wn?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)},t.prototype.getCompletionsForExtendsReference=function(e,n,r){return r},t.prototype.getCompletionForUriLiteralValue=function(e,n){var r,i,s;if(e.hasChildren()){var o=e.getChild(0);r=o.getText(),i=this.position,s=this.getCompletionRange(o)}else{r="",i=this.position;var a=this.textDocument.positionAt(e.offset+4);s=ie.create(a,a)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n},t.prototype.getCompletionForImportPath=function(e,n){var r=this;return this.completionParticipants.forEach(function(i){i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:r.position,range:r.getCompletionRange(e)})}),n},t.prototype.hasCharacterAtPosition=function(e,n){var r=this.textDocument.getText();return e>=0&&e=0&&` +\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}function Rl(t){return t.toLowerCase()in ur||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}var Fl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$u=He(),Ui=function(){function t(){this.parent=null,this.children=null,this.attributes=null}return t.prototype.findAttribute=function(e){if(this.attributes)for(var n=0,r=this.attributes;n"),this.writeLine(n,i.join(""))},t}(),it;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){var i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(it||(it={}));var Dl=function(){function t(){this.id=0,this.attr=0,this.tag=0}return t}();function Al(t,e){for(var n=new Ui,r=0,i=t.getChildren();r1){var c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(a[l])}}break;case v.SelectorPlaceholder:if(s.matches("@at-root"))return n;case v.ElementNameSelector:var h=s.getText();n.addAttr("name",h==="*"?"element":Oe(h));break;case v.ClassSelector:n.addAttr("class",Oe(s.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Oe(s.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",s.getName());break;case v.PseudoSelector:n.addAttr(Oe(s.getText()),"");break;case v.AttributeSelector:var u=s,f=u.getIdentifier();if(f){var m=u.getValue(),g=u.getOperator(),b=void 0;if(m&&g)switch(Oe(g.getText())){case"|=":b="".concat(it.remove(Oe(m.getText())),"-…");break;case"^=":b="".concat(it.remove(Oe(m.getText())),"…");break;case"$=":b="…".concat(it.remove(Oe(m.getText())));break;case"~=":b=" … ".concat(it.remove(Oe(m.getText()))," … ");break;case"*=":b="…".concat(it.remove(Oe(m.getText())),"…");break;default:b=it.remove(Oe(m.getText()));break}n.addAttr(Oe(f.getText()),b)}break}}return n}function Oe(t){var e=new bn;e.setSource(t);var n=e.scanUnquotedString();return n?n.text:t}var Hu=function(){function t(e){this.cssDataManager=e}return t.prototype.selectorToMarkedString=function(e){var n=Xu(e);if(n){var r=new El('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]},t.prototype.simpleSelectorToMarkedString=function(e){var n=Al(e),r=new El('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r},t.prototype.isPseudoElementIdentifier=function(e){var n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1},t.prototype.selectorToSpecificityMarkedString=function(e){var n=this,r=function(s){var a=new Dl;e:for(var o=0,l=s.getChildren();o0){for(var u=new Dl,f=0,m=c.getChildren();fu.id){u=S;continue}else if(S.idu.attr){u=S;continue}else if(S.attru.tag){u=S;continue}}}a.id+=u.id,a.attr+=u.attr,a.tag+=u.tag;continue e}a.attr++;break}if(c.getChildren().length>0){var S=r(c);a.id+=S.id,a.attr+=S.attr,a.tag+=S.tag}}return a},i=r(e);return $u("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",i.id,i.attr,i.tag)},t}(),Gu=function(){function t(e){this.prev=null,this.element=e}return t.prototype.processSelector=function(e){var n=null;if(!(this.element instanceof Zt)&&e.getChildren().some(function(h){return h.hasChildren()&&h.getChild(0).type===v.SelectorCombinator})){var r=this.element.findRoot();r.parent instanceof Zt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,s=e.getChildren();i=0;a--){var o=n[a].getSelectors().getChild(0);o&&s.processSelector(o)}return s.processSelector(t),e}var Bi=function(){function t(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new Hu(n)}return t.prototype.configure=function(e){this.defaultSettings=e},t.prototype.doHover=function(e,n,r,i){i===void 0&&(i=this.defaultSettings);function s(y){return ie.create(e.positionAt(y.offset),e.positionAt(y.end))}for(var a=e.offsetAt(n),o=di(r,a),l=null,c=0;c0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=s.length/2&&a.push({property:x.name,score:S})}),a.sort(function(x,S){return S.score-x.score||x.property.localeCompare(S.property)});for(var o=3,l=0,c=a;l=0;l--){var c=o[l];if(c instanceof Qe){var h=c.getProperty();if(h&&h.offset===s&&h.end===a){this.getFixesForUnknownProperty(e,h,r,i);return}}}},t}(),rp=function(){function t(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return t}();function zn(t,e,n,r){var i=t[e];i.value=n,n&&(wl(i.properties,r)||i.properties.push(r))}function ip(t,e,n){zn(t,"top",e,n),zn(t,"right",e,n),zn(t,"bottom",e,n),zn(t,"left",e,n)}function Ce(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?zn(t,e,n,r):ip(t,n,r)}function $i(t,e,n){switch(e.length){case 1:Ce(t,void 0,e[0],n);break;case 2:Ce(t,"top",e[0],n),Ce(t,"bottom",e[0],n),Ce(t,"right",e[1],n),Ce(t,"left",e[1],n);break;case 3:Ce(t,"top",e[0],n),Ce(t,"right",e[1],n),Ce(t,"left",e[1],n),Ce(t,"bottom",e[2],n);break;case 4:Ce(t,"top",e[0],n),Ce(t,"right",e[1],n),Ce(t,"bottom",e[2],n),Ce(t,"left",e[3],n);break}}function Hi(t,e){for(var n=0,r=e;n"u"))switch(i.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=i;break;case"height":e.height=i;break;default:var a=i.fullPropertyName.split("-");switch(a[0]){case"border":switch(a[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(a[2]){case void 0:Ce(e,a[1],ap(s),i);break;case"width":Ce(e,a[1],Pn(s,!1),i);break;case"style":Ce(e,a[1],yr(s,!0),i);break}break;case"width":$i(e,Il(s.getChildren(),!1),i);break;case"style":$i(e,sp(s.getChildren(),!0),i);break}break;case"padding":a.length===1?$i(e,Il(s.getChildren(),!0),i):Ce(e,a[1],Pn(s,!0),i);break}break}}return e}var st=He(),Tl=function(){function t(){this.data={}}return t.prototype.add=function(e,n,r){var i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)},t}(),lp=function(){function t(e,n,r){var i=this;this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new Tl,this.validProperties={};var s=n.getSetting(Zu.ValidProperties);Array.isArray(s)&&s.forEach(function(a){if(typeof a=="string"){var o=a.trim().toLowerCase();o.length&&(i.validProperties[o]=!0)}})}return t.entries=function(e,n,r,i,s){var a=new t(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)},t.prototype.isValidPropertyDeclaration=function(e){var n=e.fullPropertyName;return this.validProperties[n]},t.prototype.fetch=function(e,n){for(var r=[],i=0,s=e;i0)for(var b=this.fetch(r,"float"),y=0;y0)for(var b=this.fetch(r,"vertical-align"),y=0;y1)for(var T=0;T")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var n=this.createNode(v.Operator);return this.consumeToken(),this.finish(n)}return t.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var n=this.create(V);return this.consumeToken(),this.finish(n)}return t.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(n){var r=this._tryParseCustomPropertyDeclaration(n);if(r)return r;var i=this.create(Qe);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(i,C.ColonExpected,[p.Colon],n||[p.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);var s=!1;if(i.setValue(this._parseExpr())&&(s=!0,i.addChild(this._parsePrio())),this.peek(p.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(i,C.PropertyValueExpected);return this.peek(p.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseNestedProperties=function(){var n=this.create(po);return this._parseBody(n,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var n=this.create(xn);if(this.consumeToken(),!n.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(n,C.SelectorExpected);for(;this.accept(p.Comma);)n.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(n,C.UnknownKeyword):this.finish(n)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(n)}else if(this.peekKeyword("@at-root")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this.finish(n)}return null},e.prototype._parseElementName=function(){var n=this.mark(),r=t.prototype._parseElementName.call(this);return r&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(n),null):r},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||t.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var n=this.createNode(v.Debug);return this.consumeToken(),n.addChild(this._parseExpr()),this.finish(n)},e.prototype._parseControlStatement=function(n){return n===void 0&&(n=this._parseRuleSetDeclaration.bind(this)),this.peek(p.AtKeyword)?this._parseIfStatement(n)||this._parseForStatement(n)||this._parseEachStatement(n)||this._parseWhileStatement(n):null},e.prototype._parseIfStatement=function(n){return this.peekKeyword("@if")?this._internalParseIfStatement(n):null},e.prototype._internalParseIfStatement=function(n){var r=this.create(Id);if(this.consumeToken(),!r.setExpression(this._parseExpr(!0)))return this.finish(r,C.ExpressionExpected);if(this._parseBody(r,n),this.acceptKeyword("@else")){if(this.peekIdent("if"))r.setElseClause(this._internalParseIfStatement(n));else if(this.peek(p.CurlyL)){var i=this.create(Ud);this._parseBody(i,n),r.setElseClause(i)}}return this.finish(r)},e.prototype._parseForStatement=function(n){if(!this.peekKeyword("@for"))return null;var r=this.create(Td);return this.consumeToken(),r.setVariable(this._parseVariable())?this.acceptIdent("from")?r.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(r,Qi.ThroughOrToExpected,[p.CurlyR]):r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,C.ExpressionExpected,[p.CurlyR]):this.finish(r,C.ExpressionExpected,[p.CurlyR]):this.finish(r,Qi.FromExpected,[p.CurlyR]):this.finish(r,C.VariableNameExpected,[p.CurlyR])},e.prototype._parseEachStatement=function(n){if(!this.peekKeyword("@each"))return null;var r=this.create(Wd);this.consumeToken();var i=r.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(r,C.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(r,C.VariableNameExpected,[p.CurlyR]);return this.finish(i),this.acceptIdent("in")?r.addChild(this._parseExpr())?this._parseBody(r,n):this.finish(r,C.ExpressionExpected,[p.CurlyR]):this.finish(r,Qi.InExpected,[p.CurlyR])},e.prototype._parseWhileStatement=function(n){if(!this.peekKeyword("@while"))return null;var r=this.create(Od);return this.consumeToken(),r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,C.ExpressionExpected,[p.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var n=this.create(er);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Q.Function])))return this.finish(n,C.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(n,C.LeftParenthesisExpected,[p.CurlyR]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,C.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(n,this._parseFunctionBodyDeclaration.bind(this)):this.finish(n,C.RightParenthesisExpected,[p.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var n=this.createNode(v.ReturnStatement);return this.consumeToken(),n.addChild(this._parseExpr())?this.finish(n):this.finish(n,C.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var n=this.create(Sn);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Q.Mixin])))return this.finish(n,C.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,C.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var n=this.create(Zn);return n.setIdentifier(this._parseVariable())?(this.accept(xr),this.accept(p.Colon)&&!n.setDefaultValue(this._parseExpr(!0))?this.finish(n,C.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(n)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var n=this.create(iu);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,C.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected)}return this.finish(n)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var n=this.create(nr);this.consumeToken();var r=this._parseIdent([Q.Mixin]);if(!n.setIdentifier(r))return this.finish(n,C.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var i=this._parseIdent([Q.Mixin]);if(!i)return this.finish(n,C.IdentifierExpected,[p.CurlyR]);var s=this.create(xo);r.referenceTypes=[Q.Module],s.setIdentifier(r),n.setIdentifier(i),n.addChild(s)}if(this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,C.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&n.setContent(this._parseMixinContentDeclaration()),this.finish(n)},e.prototype._parseMixinContentDeclaration=function(){var n=this.create(su);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(n,C.LeftParenthesisExpected,[p.CurlyL]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,C.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(n,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(n)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var n=this.create(Jt),r=this.mark(),i=this._parseVariable();if(i)if(this.accept(p.Colon))n.setIdentifier(i);else{if(this.accept(xr))return n.setValue(i),this.finish(n);this.restoreAtMark(r)}return n.setValue(this._parseExpr(!0))?(this.accept(xr),n.addChild(this._parsePrio()),this.finish(n)):n.setValue(this._tryParsePrio())?this.finish(n):null},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(V);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(V);for(this.consumeToken();n.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,C.RightParenthesisExpected)},e.prototype._parseListElement=function(){var n=this.create(au),r=this._parseBinaryExpr();if(!r)return null;if(this.accept(p.Colon)){if(n.setKey(r),!n.setValue(this._parseBinaryExpr()))return this.finish(n,C.ExpressionExpected)}else n.setValue(r);return this.finish(n)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var n=this.create(Bd);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,C.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(n,C.UnknownKeyword);if(this.acceptIdent("as")&&!n.setIdentifier(this._parseIdent([Q.Module]))&&!this.acceptDelim("*"))return this.finish(n,C.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,C.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,C.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,C.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,C.SemiColonExpected):this.finish(n)},e.prototype._parseModuleConfigDeclaration=function(){var n=this.create(jd);return n.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!n.setValue(this._parseExpr(!0))?this.finish(n,C.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(n,C.UnknownKeyword):this.finish(n):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var n=this.create(qd);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,C.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,C.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,C.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,C.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected)}if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|hide|show/))return this.finish(n,C.UnknownKeyword);if(this.acceptIdent("as")){var r=this._parseIdent([Q.Forward]);if(!n.setIdentifier(r))return this.finish(n,C.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(n,C.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!n.addChild(this._parseForwardVisibility()))return this.finish(n,C.IdentifierOrVariableExpected)}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,C.SemiColonExpected):this.finish(n)},e.prototype._parseForwardVisibility=function(){var n=this.create($d);for(n.setIdentifier(this._parseIdent());n.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return n.getChildren().length>1?n:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||t.prototype._parseSupportsCondition.call(this)},e}(Ni),xp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=He(),Sp=function(t){xp(e,t);function e(n,r){var i=t.call(this,"$",n,r)||this;return ql(e.scssModuleLoaders),ql(e.scssModuleBuiltIns),i}return e.prototype.isImportPathParent=function(n){return n===v.Forward||n===v.Use||t.prototype.isImportPathParent.call(this,n)},e.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===v.Forward||i===v.Use)for(var s=0,a=e.scssModuleBuiltIns;s0){var n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` +}`,insertTextFormat:ze.Snippet,kind:$.Keyword},{label:"@include",documentation:M("scss.builtin.@include","Includes the styles defined by another mixin into the current rule."),kind:$.Keyword},{label:"@function",documentation:M("scss.builtin.@function","Defines complex operations that can be re-used throughout stylesheets."),kind:$.Keyword}],e.scssModuleLoaders=[{label:"@use",documentation:M("scss.builtin.@use","Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:ze.Snippet,kind:$.Keyword},{label:"@forward",documentation:M("scss.builtin.@forward","Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:ze.Snippet,kind:$.Keyword}],e.scssModuleBuiltIns=[{label:"sass:math",documentation:M("scss.builtin.sass:math","Provides functions that operate on numbers."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:M("scss.builtin.sass:string","Makes it easy to combine, search, or split apart strings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:M("scss.builtin.sass:color","Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:M("scss.builtin.sass:list","Lets you access and modify values in lists."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:M("scss.builtin.sass:map","Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:M("scss.builtin.sass:selector","Provides access to Sass’s powerful selector engine."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:M("scss.builtin.sass:meta","Exposes the details of Sass’s inner workings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/meta"}]}],e}(Wi);function ql(t){t.forEach(function(e){if(e.documentation&&e.references&&e.references.length>0){var n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` -`,n.value+=e.references.map(function(r){return"[".concat(r.name,"](").concat(r.url,")")}).join(" | "),e.documentation=n}})}var dp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vl="/".charCodeAt(0),up=` -`.charCodeAt(0),pp="\r".charCodeAt(0),fp="\f".charCodeAt(0),qi="`".charCodeAt(0),$i=".".charCodeAt(0),mp=p.CustomToken,Hi=mp++,Bl=function(t){dp(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.scanNext=function(n){var r=this.escapedJavaScript();return r!==null?this.finishToken(n,r):this.stream.advanceIfChars([$i,$i,$i])?this.finishToken(n,Hi):t.prototype.scanNext.call(this,n)},e.prototype.comment=function(){return t.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([Vl,Vl])?(this.stream.advanceWhileChar(function(n){switch(n){case up:case pp:case fp:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var n=this.stream.peekChar();return n===qi?(this.stream.advance(1),this.stream.advanceWhileChar(function(r){return r!==qi}),this.stream.advanceIfChar(qi)?p.EscapedJavaScript:p.BadEscapedJavaScript):null},e}(dn),gp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),bp=function(t){gp(e,t);function e(){return t.call(this,new Bl)||this}return e.prototype._parseStylesheetStatement=function(n){return n===void 0&&(n=!1),this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||t.prototype._parseStylesheetAtStatement.call(this,n):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var n=this.create(ai);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(n,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.SemiColon])}return!n.addChild(this._parseURILiteral())&&!n.addChild(this._parseStringLiteral())?this.finish(n,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&n.setMedialist(this._parseMediaQueryList()),this.finish(n))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var n=this.createNode(v.Plugin);return this.consumeToken(),n.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(n):this.finish(n,S.SemiColonExpected):this.finish(n,S.StringLiteralExpected)},e.prototype._parseMediaQuery=function(){var n=t.prototype._parseMediaQuery.call(this);if(!n){var r=this.create(fo);return r.addChild(this._parseVariable())?this.finish(r):null}return n},e.prototype._parseMediaDeclaration=function(n){return n===void 0&&(n=!1),this._tryParseRuleset(n)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(n)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(n){n===void 0&&(n=[]);var r=this.create(Yn),i=this.mark();if(!r.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseDetachedRuleSet()))r.needsSemicolon=!1;else if(!r.setValue(this._parseExpr()))return this.finish(r,S.VariableValueExpected,[],n);r.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)},e.prototype._parseDetachedRuleSet=function(){var n=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=this.create(gn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(n),null}else return this.restoreAtMark(n),null;if(!this.peek(p.CurlyL))return null;var i=this.create(ae);return this._parseBody(i,this._parseDetachedRuleSetBody.bind(this)),this.finish(i)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(n){if(!n.addChild(this._parseLookupValue()))return!1;for(var r=!1;this.peek(p.BracketL)&&(r=!0),!!n.addChild(this._parseLookupValue());)r=!1;return!r},e.prototype._parseLookupValue=function(){var n=this.create(W),r=this.mark();return this.accept(p.BracketL)?(n.addChild(this._parseVariable(!1,!0))||n.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?n:(this.restoreAtMark(r),null):(this.restoreAtMark(r),null)},e.prototype._parseVariable=function(n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var i=!n&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(p.AtKeyword))return null;for(var s=this.create(ui),a=this.mark();this.acceptDelim("@")||!n&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(a),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(a),null):!r&&this.peek(p.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(a),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||t.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(n)}if(this.peekDelim("~")){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(n):this.finish(n,S.TermExpected)}return null},e.prototype._parseOperator=function(){var n=this._parseGuardOperator();return n||t.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}else if(this.peekDelim("=")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),n}else if(this.peekDelim("<")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([Y.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||t.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(n){var r=this.create(un),i=!1;for(n&&(i=r.addChild(this._parseCombinator()));r.addChild(this._parseSimpleSelector());){i=!0;var s=this.mark();if(r.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(s),r.addChild(this._parseCombinator())}return i?this.finish(r):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var n=this.createNode(v.SelectorInterpolation),r=this._acceptInterpolatedIdent(n);return r?this.finish(n):null},e.prototype._parsePropertyIdentifier=function(n){n===void 0&&(n=!1);var r=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,r))return null;var i=this.mark(),s=this.create(We);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var a=!1;return n?s.isCustomProperty?a=s.addChild(this._parseIdent()):a=s.addChild(this._parseRegexp(r)):s.isCustomProperty?a=this._acceptInterpolatedIdent(s):a=this._acceptInterpolatedIdent(s,r),a?(!n&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(i),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(n,r){for(var i=this,s=!1,a=function(){var l=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(l),null):i._parseInterpolation()},o=r?function(){return i.acceptRegexp(r)}:function(){return i.accept(p.Ident)};(o()||n.addChild(this._parseInterpolation()||this.try(a)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var n=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var r=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(n),null):r.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(r):this.finish(r,S.RightCurlyExpected):this.finish(r,S.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var n=this.mark(),r=this.create(gn);if(!r.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(r.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(r,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(n),null)):(this.restoreAtMark(n),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var n;if(this.peekDelim("#")||this.peekDelim(".")){if(n=this.create(We),this.consumeToken(),this.hasWhitespace()||!n.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))n=this.create(We),this.consumeToken();else return null;return n.referenceTypes=[Y.Mixin],this.finish(n)},e.prototype._parsePseudo=function(){if(!this.peek(p.Colon))return null;var n=this.mark(),r=this.create(mn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(r):(this.restoreAtMark(n),t.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var n=this.mark(),r=this.create(mn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(n),null):this._completeExtends(r)},e.prototype._completeExtends=function(n){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected);var r=n.getSelectors();if(!r.addChild(this._parseSelector(!0)))return this.finish(n,S.SelectorExpected);for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(!0)))return this.finish(n,S.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(p.AtKeyword))return null;var n=this.mark(),r=this.create(Kn);return r.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(n),null):this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,S.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(n){n===void 0&&(n=!0);for(var r=this.mark(),i=this.create(Kn),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var a=this._parseMixinDeclarationIdentifier();if(a)i.getNamespaces().addChild(s),s=a;else break}if(!i.setIdentifier(s))return this.restoreAtMark(r),null;var o=!1;if(this.accept(p.ParenthesisL)){if(o=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(i,S.RightParenthesisExpected);s.referenceTypes=[Y.Mixin]}else s.referenceTypes=[Y.Mixin,Y.Rule];return this.peek(p.BracketL)?n||this._addLookupChildren(i):i.addChild(this._parsePrio()),!o&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(r),null):this.finish(i)},e.prototype._parseMixinArgument=function(){var n=this.create(Ht),r=this.mark(),i=this._parseVariable();return i&&(this.accept(p.Colon)?n.setIdentifier(i):this.restoreAtMark(r)),n.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(n):(this.restoreAtMark(r),null)},e.prototype._parseMixinParameter=function(){var n=this.create(Jn);if(this.peekKeyword("@rest")){var r=this.create(W);return this.consumeToken(),this.accept(Hi)?(n.setIdentifier(this.finish(r)),this.finish(n)):this.finish(n,S.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(Hi)){var i=this.create(W);return this.consumeToken(),n.setIdentifier(this.finish(i)),this.finish(n)}var s=!1;return n.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),s=!0),!n.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(n)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var n=this.create(Xd);if(this.consumeToken(),n.isNegated=this.acceptIdent("not"),!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,S.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,S.ConditionExpected);return this.finish(n)},e.prototype._parseGuardCondition=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(Yd);return this.consumeToken(),n.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseFunction=function(){var n=this.mark(),r=this.create(pn);if(!r.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,S.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,S.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var n=this.create(We);return n.referenceTypes=[Y.Function],this.consumeToken(),this.finish(n)}return t.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(W);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e}(Si),vp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=Ge(),yp=function(t){vp(e,t);function e(n,r){return t.call(this,"@",n,r)||this}return e.prototype.createFunctionProposals=function(n,r,i,s){for(var a=0,o=n;a 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:U("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:U("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:U("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:U("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:U("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:U("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:U("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:U("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:U("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:U("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:U("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:U("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:U("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:U("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:U("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:U("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:U("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:U("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:U("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:U("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:U("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:U("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:U("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:U("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:U("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:U("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:U("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:U("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:U("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:U("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:U("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:U("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:U("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:U("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:U("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:U("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:U("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e}(Di);function wp(t,e){var n=xp(t);return Sp(n,e)}function xp(t){function e(u){return t.positionAt(u.offset).line}function n(u){return t.positionAt(u.offset+u.len).line}function r(){switch(t.languageId){case"scss":return new Ol;case"less":return new Bl;default:return new dn}}function i(u,f){var m=e(u),g=n(u);return m!==g?{startLine:m,endLine:g,kind:f}:null}var s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());for(var l=o.scan(),c=null,h=function(){switch(l.type){case p.CurlyL:case mr:{a.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){var u=jl(a,"brace");if(!u)break;var f=n(l);u.type==="brace"&&(c&&n(c)!==f&&f--,u.line!==f&&s.push({startLine:u.line,endLine:f,kind:void 0}))}break}case p.Comment:{var m=function(x){return x==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1}},g=function(x){var w=x.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(w)return m(w[1]);if(t.languageId==="scss"||t.languageId==="less"){var k=x.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(k)return m(k[1])}return null},b=g(l);if(b)if(b.isStart)a.push(b);else{var u=jl(a,"comment");if(!u)break;u.type==="comment"&&u.line!==b.line&&s.push({startLine:u.line,endLine:b.line,kind:"region"})}else{var y=i(l,"comment");y&&s.push(y)}break}}c=l,l=o.scan()};l.type!==p.EOF;)h();return s}function jl(t,e){if(t.length===0)return null;for(var n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function Sp(t,e){var n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort(function(a,o){var l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),i=[],s=-1;return r.forEach(function(a){a.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` +`,n.value+=e.references.map(function(r){return"[".concat(r.name,"](").concat(r.url,")")}).join(" | "),e.documentation=n}})}var Cp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$l="/".charCodeAt(0),kp=` +`.charCodeAt(0),_p="\r".charCodeAt(0),Rp="\f".charCodeAt(0),Zi="`".charCodeAt(0),es=".".charCodeAt(0),Fp=p.CustomToken,ts=Fp++,Hl=function(t){Cp(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.scanNext=function(n){var r=this.escapedJavaScript();return r!==null?this.finishToken(n,r):this.stream.advanceIfChars([es,es,es])?this.finishToken(n,ts):t.prototype.scanNext.call(this,n)},e.prototype.comment=function(){return t.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([$l,$l])?(this.stream.advanceWhileChar(function(n){switch(n){case kp:case _p:case Rp:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var n=this.stream.peekChar();return n===Zi?(this.stream.advance(1),this.stream.advanceWhileChar(function(r){return r!==Zi}),this.stream.advanceIfChar(Zi)?p.EscapedJavaScript:p.BadEscapedJavaScript):null},e}(bn),Ep=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dp=function(t){Ep(e,t);function e(){return t.call(this,new Hl)||this}return e.prototype._parseStylesheetStatement=function(n){return n===void 0&&(n=!1),this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||t.prototype._parseStylesheetAtStatement.call(this,n):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var n=this.create(mi);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(n,C.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(n,C.RightParenthesisExpected,[p.SemiColon])}return!n.addChild(this._parseURILiteral())&&!n.addChild(this._parseStringLiteral())?this.finish(n,C.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&n.setMedialist(this._parseMediaQueryList()),this.finish(n))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var n=this.createNode(v.Plugin);return this.consumeToken(),n.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(n):this.finish(n,C.SemiColonExpected):this.finish(n,C.StringLiteralExpected)},e.prototype._parseMediaQuery=function(){var n=t.prototype._parseMediaQuery.call(this);if(!n){var r=this.create(vo);return r.addChild(this._parseVariable())?this.finish(r):null}return n},e.prototype._parseMediaDeclaration=function(n){return n===void 0&&(n=!1),this._tryParseRuleset(n)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(n)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(n){n===void 0&&(n=[]);var r=this.create(tr),i=this.mark();if(!r.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseDetachedRuleSet()))r.needsSemicolon=!1;else if(!r.setValue(this._parseExpr()))return this.finish(r,C.VariableValueExpected,[],n);r.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)},e.prototype._parseDetachedRuleSet=function(){var n=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=this.create(Sn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,C.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(n),null}else return this.restoreAtMark(n),null;if(!this.peek(p.CurlyL))return null;var i=this.create(ce);return this._parseBody(i,this._parseDetachedRuleSetBody.bind(this)),this.finish(i)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(n){if(!n.addChild(this._parseLookupValue()))return!1;for(var r=!1;this.peek(p.BracketL)&&(r=!0),!!n.addChild(this._parseLookupValue());)r=!1;return!r},e.prototype._parseLookupValue=function(){var n=this.create(V),r=this.mark();return this.accept(p.BracketL)?(n.addChild(this._parseVariable(!1,!0))||n.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?n:(this.restoreAtMark(r),null):(this.restoreAtMark(r),null)},e.prototype._parseVariable=function(n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var i=!n&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(p.AtKeyword))return null;for(var s=this.create(xi),a=this.mark();this.acceptDelim("@")||!n&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(a),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(a),null):!r&&this.peek(p.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(a),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||t.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(n)}if(this.peekDelim("~")){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(n):this.finish(n,C.TermExpected)}return null},e.prototype._parseOperator=function(){var n=this._parseGuardOperator();return n||t.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}else if(this.peekDelim("=")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),n}else if(this.peekDelim("<")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([Q.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||t.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(n){var r=this.create(vn),i=!1;for(n&&(i=r.addChild(this._parseCombinator()));r.addChild(this._parseSimpleSelector());){i=!0;var s=this.mark();if(r.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(s),r.addChild(this._parseCombinator())}return i?this.finish(r):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var n=this.createNode(v.SelectorInterpolation),r=this._acceptInterpolatedIdent(n);return r?this.finish(n):null},e.prototype._parsePropertyIdentifier=function(n){n===void 0&&(n=!1);var r=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,r))return null;var i=this.mark(),s=this.create(Ie);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var a=!1;return n?s.isCustomProperty?a=s.addChild(this._parseIdent()):a=s.addChild(this._parseRegexp(r)):s.isCustomProperty?a=this._acceptInterpolatedIdent(s):a=this._acceptInterpolatedIdent(s,r),a?(!n&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(i),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(n,r){for(var i=this,s=!1,a=function(){var l=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(l),null):i._parseInterpolation()},o=r?function(){return i.acceptRegexp(r)}:function(){return i.accept(p.Ident)};(o()||n.addChild(this._parseInterpolation()||this.try(a)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var n=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var r=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(n),null):r.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(r):this.finish(r,C.RightCurlyExpected):this.finish(r,C.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var n=this.mark(),r=this.create(Sn);if(!r.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,C.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(r.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(r,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(n),null)):(this.restoreAtMark(n),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var n;if(this.peekDelim("#")||this.peekDelim(".")){if(n=this.create(Ie),this.consumeToken(),this.hasWhitespace()||!n.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))n=this.create(Ie),this.consumeToken();else return null;return n.referenceTypes=[Q.Mixin],this.finish(n)},e.prototype._parsePseudo=function(){if(!this.peek(p.Colon))return null;var n=this.mark(),r=this.create(xn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(r):(this.restoreAtMark(n),t.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var n=this.mark(),r=this.create(xn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(n),null):this._completeExtends(r)},e.prototype._completeExtends=function(n){if(!this.accept(p.ParenthesisL))return this.finish(n,C.LeftParenthesisExpected);var r=n.getSelectors();if(!r.addChild(this._parseSelector(!0)))return this.finish(n,C.SelectorExpected);for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(!0)))return this.finish(n,C.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,C.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(p.AtKeyword))return null;var n=this.mark(),r=this.create(nr);return r.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(n),null):this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,C.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(n){n===void 0&&(n=!0);for(var r=this.mark(),i=this.create(nr),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var a=this._parseMixinDeclarationIdentifier();if(a)i.getNamespaces().addChild(s),s=a;else break}if(!i.setIdentifier(s))return this.restoreAtMark(r),null;var o=!1;if(this.accept(p.ParenthesisL)){if(o=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,C.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(i,C.RightParenthesisExpected);s.referenceTypes=[Q.Mixin]}else s.referenceTypes=[Q.Mixin,Q.Rule];return this.peek(p.BracketL)?n||this._addLookupChildren(i):i.addChild(this._parsePrio()),!o&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(r),null):this.finish(i)},e.prototype._parseMixinArgument=function(){var n=this.create(Jt),r=this.mark(),i=this._parseVariable();return i&&(this.accept(p.Colon)?n.setIdentifier(i):this.restoreAtMark(r)),n.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(n):(this.restoreAtMark(r),null)},e.prototype._parseMixinParameter=function(){var n=this.create(Zn);if(this.peekKeyword("@rest")){var r=this.create(V);return this.consumeToken(),this.accept(ts)?(n.setIdentifier(this.finish(r)),this.finish(n)):this.finish(n,C.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(ts)){var i=this.create(V);return this.consumeToken(),n.setIdentifier(this.finish(i)),this.finish(n)}var s=!1;return n.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),s=!0),!n.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(n)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var n=this.create(ou);if(this.consumeToken(),n.isNegated=this.acceptIdent("not"),!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,C.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,C.ConditionExpected);return this.finish(n)},e.prototype._parseGuardCondition=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(lu);return this.consumeToken(),n.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,C.RightParenthesisExpected)},e.prototype._parseFunction=function(){var n=this.mark(),r=this.create(yn);if(!r.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,C.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,C.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var n=this.create(Ie);return n.referenceTypes=[Q.Function],this.consumeToken(),this.finish(n)}return t.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(V);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e}(Ni),Ap=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=He(),Np=function(t){Ap(e,t);function e(n,r){return t.call(this,"@",n,r)||this}return e.prototype.createFunctionProposals=function(n,r,i,s){for(var a=0,o=n;a 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:j("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:j("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:j("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:j("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:j("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:j("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:j("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:j("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:j("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:j("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:j("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:j("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:j("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:j("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:j("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:j("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:j("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:j("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:j("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:j("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:j("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:j("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:j("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:j("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:j("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:j("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:j("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:j("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:j("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:j("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:j("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:j("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:j("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:j("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:j("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:j("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:j("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e}(Wi);function Mp(t,e){var n=zp(t);return Pp(n,e)}function zp(t){function e(u){return t.positionAt(u.offset).line}function n(u){return t.positionAt(u.offset+u.len).line}function r(){switch(t.languageId){case"scss":return new jl;case"less":return new Hl;default:return new bn}}function i(u,f){var m=e(u),g=n(u);return m!==g?{startLine:m,endLine:g,kind:f}:null}var s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());for(var l=o.scan(),c=null,h=function(){switch(l.type){case p.CurlyL:case wr:{a.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){var u=Gl(a,"brace");if(!u)break;var f=n(l);u.type==="brace"&&(c&&n(c)!==f&&f--,u.line!==f&&s.push({startLine:u.line,endLine:f,kind:void 0}))}break}case p.Comment:{var m=function(x){return x==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1}},g=function(x){var S=x.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(S)return m(S[1]);if(t.languageId==="scss"||t.languageId==="less"){var w=x.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(w)return m(w[1])}return null},b=g(l);if(b)if(b.isStart)a.push(b);else{var u=Gl(a,"comment");if(!u)break;u.type==="comment"&&u.line!==b.line&&s.push({startLine:u.line,endLine:b.line,kind:"region"})}else{var y=i(l,"comment");y&&s.push(y)}break}}c=l,l=o.scan()};l.type!==p.EOF;)h();return s}function Gl(t,e){if(t.length===0)return null;for(var n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function Pp(t,e){var n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort(function(a,o){var l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),i=[],s=-1;return r.forEach(function(a){a.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` `);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function a(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}a.prototype.get_indent_size=function(l,c){var h=this.__base_string_length;return c=c||0,l<0&&(h=0),h+=l*this.__indent_size,h+=c,h},a.prototype.get_indent_string=function(l,c){var h=this.__base_string;return c=c||0,l<0&&(l=0,h=""),c+=l*this.__indent_size,this.__ensure_cache(c),h+=this.__cache[c],h},a.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var l=this.__cache.length,c=0,h="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,h=new Array(c+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function o(l,c){this.__indent_cache=new a(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},o.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` `&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` `);return l!==` @@ -53,16 +56,16 @@ Syntax: `.concat(ar(t.syntax)))}return t.references&&t.references.length>0&&(e== `+c+` You passed in: '`+this.raw_options[l]+"'");return u[0]},s.prototype._get_selection_list=function(l,c,h){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[c[0]],!this._is_valid_selection(h,c))throw new Error("Invalid Default Value!");var u=this._get_array(l,h);if(!this._is_valid_selection(u,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: `+c+` -You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(h){return c.indexOf(h)===-1})};function a(l,c){var h={};l=o(l);var u;for(u in l)u!==c&&(h[u]=l[u]);if(c&&l[c])for(u in l[c])h[u]=l[c][u];return h}function o(l){var c={},h;for(h in l){var u=h.replace(/-/g,"_");c[u]=l[h]}return c}i.exports.Options=s,i.exports.normalizeOpts=o,i.exports.mergeOpts=a},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},i.exports.InputScanner=a},,,,,function(i){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(h,u){var f=new o(h,u);return f.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}},function(i,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,h=a(13).Directives,u=new h(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,x=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function w(k,R){this._source_text=k||"",this._options=new o(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}w.prototype.eatString=function(k){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(k.indexOf(this._ch)!==-1||this._ch===` -`)break;this._ch=this._input.next()}return R},w.prototype.eatWhitespace=function(k){for(var R=g.test(this._input.peek()),z=0;g.test(this._input.peek());)this._ch=this._input.next(),k&&this._ch===` -`&&(z===0||z0&&this._indentLevel--},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,R=this._options.eol;R==="auto"&&(R=` -`,k&&f.test(k||"")&&(R=k.match(f)[0])),k=k.replace(m,` -`);var z=k.match(/^[\t ]*/)[0];this._output=new l(this._options,z),this._input=new c(k),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var $=0,X=!1,B=!1,P=!1,N=!1,A=!1,F=this._ch,L,V,K;L=this._input.read(b),V=L!=="",K=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var ie=this._input.read(y),E=u.get_directives(ie);E&&E.ignore==="start"&&(ie+=u.readIgnored(this._input)),this.print_string(ie),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(x)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(V),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var C=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);C.match(/[ :]$/)&&(C=this.eatString(": ").replace(/\s$/,""),this.print_string(C),this._output.space_before_token=!0),C=C.replace(/\s$/,""),C==="extend"?N=!0:C==="import"&&(A=!0),C in this.NESTED_AT_RULE?(this._nestedLevel+=1,C in this.CONDITIONAL_GROUP_RULE&&(P=!0)):!X&&$===0&&C.indexOf(":")!==-1&&(B=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(V),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(B&&(B=!1,this.outdent()),P?(P=!1,X=this._indentLevel>=this._nestedLevel):X=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&X&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),K==="{"&&this._output.trim(!0),A=!1,N=!1,B&&(this.outdent(),B=!1),this.print_string(this._ch),X=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(X||P)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&$===0?(this.print_string(":"),B||(B=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(V),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?$===0?(B&&(this.outdent(),B=!1),N=!1,A=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),$++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),$&&($--,this.outdent()))):(this.preserveSingleSpace(V),this.print_string(this._ch),this.eatWhitespace(),$++,this.indent()):this._ch===")"?($&&($--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!B&&$===0&&!A&&!N?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!B&&$===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(V),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(V),this.print_string(this._ch));var D=this._output.get_code(R);return D},i.exports.Beautifier=w},function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f0&&Gl(r,c-1);)c--;c===0||Hl(r,c-1)?l=c:c0){var b=n.insertSpaces?ao(" ",o*s):ao(" ",s);g=g.split(` +You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(h){return c.indexOf(h)===-1})};function a(l,c){var h={};l=o(l);var u;for(u in l)u!==c&&(h[u]=l[u]);if(c&&l[c])for(u in l[c])h[u]=l[c][u];return h}function o(l){var c={},h;for(h in l){var u=h.replace(/-/g,"_");c[u]=l[h]}return c}i.exports.Options=s,i.exports.normalizeOpts=o,i.exports.mergeOpts=a},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},i.exports.InputScanner=a},,,,,function(i){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(h,u){var f=new o(h,u);return f.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}},function(i,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,h=a(13).Directives,u=new h(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,x=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function S(w,E){this._source_text=w||"",this._options=new o(E),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}S.prototype.eatString=function(w){var E="";for(this._ch=this._input.next();this._ch;){if(E+=this._ch,this._ch==="\\")E+=this._input.next();else if(w.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return E},S.prototype.eatWhitespace=function(w){for(var E=g.test(this._input.peek()),R=0;g.test(this._input.peek());)this._ch=this._input.next(),w&&this._ch===` +`&&(R===0||R0&&this._indentLevel--},S.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,E=this._options.eol;E==="auto"&&(E=` +`,w&&f.test(w||"")&&(E=w.match(f)[0])),w=w.replace(m,` +`);var R=w.match(/^[\t ]*/)[0];this._output=new l(this._options,R),this._input=new c(w),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var T=0,O=!1,L=!1,q=!1,z=!1,F=!1,D=this._ch,I,W,J;I=this._input.read(b),W=I!=="",J=D,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),D=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(y),A=u.get_directives(Y);A&&A.ignore==="start"&&(Y+=u.readIgnored(this._input)),this.print_string(Y),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(x)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(W),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s$/,""),this.print_string(k),this._output.space_before_token=!0),k=k.replace(/\s$/,""),k==="extend"?z=!0:k==="import"&&(F=!0),k in this.NESTED_AT_RULE?(this._nestedLevel+=1,k in this.CONDITIONAL_GROUP_RULE&&(q=!0)):!O&&T===0&&k.indexOf(":")!==-1&&(L=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(L&&(L=!1,this.outdent()),q?(q=!1,O=this._indentLevel>=this._nestedLevel):O=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&O&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),J==="{"&&this._output.trim(!0),F=!1,z=!1,L&&(this.outdent(),L=!1),this.print_string(this._ch),O=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(O||q)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!z&&T===0?(this.print_string(":"),L||(L=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?T===0?(L&&(this.outdent(),L=!1),z=!1,F=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),T++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),T&&(T--,this.outdent()))):(this.preserveSingleSpace(W),this.print_string(this._ch),this.eatWhitespace(),T++,this.indent()):this._ch===")"?(T&&(T--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!L&&T===0&&!F&&!z?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!L&&T===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(W),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(W),this.print_string(this._ch));var N=this._output.get_code(E);return N},i.exports.Beautifier=S},function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f0&&Kl(r,c-1);)c--;c===0||Yl(r,c-1)?l=c:c0){var b=n.insertSpaces?ho(" ",o*s):ho(" ",s);g=g.split(` `).join(` -`+b),e.start.character===0&&(g=b+g)}return[{range:e,newText:g}]}function $l(t){return t.replace(/^\s+/,"")}var _p="{".charCodeAt(0),Fp="}".charCodeAt(0);function Rp(t,e){for(;e>=0;){var n=t.charCodeAt(e);if(n===_p)return!0;if(n===Fp)return!1;e--}return!1}function ot(t,e,n){if(t&&t.hasOwnProperty(e)){var r=t[e];if(r!==null)return r}return n}function Ep(t,e,n){for(var r=e,i=0,s=n.tabSize||4;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:62,description:"Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:85,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:53,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item’s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:72,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"