+ !nameHasComments || n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a
+ // string literal with newlines
+
+ const shouldBreak = n.attributes && n.attributes.some(attr => attr.value && isStringLiteral$1(attr.value) && attr.value.value.includes("\n"));
+ return group$2(concat$6(["<", path.call(print, "name"), path.call(print, "typeParameters"), concat$6([indent$3(concat$6(path.map(attr => concat$6([line$4, print(attr)]), "attributes"))), n.selfClosing ? line$4 : bracketSameLine ? ">" : softline$2]), n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), {
+ shouldBreak
+ });
+ }
+
+ case "JSXClosingElement":
+ return concat$6(["", path.call(print, "name"), ">"]);
+
+ case "JSXOpeningFragment":
+ case "JSXClosingFragment":
+ {
+ const hasComment = n.comments && n.comments.length;
+ const hasOwnLineComment = hasComment && !n.comments.every(comments$1.isBlockComment);
+ const isOpeningFragment = n.type === "JSXOpeningFragment";
+ return concat$6([isOpeningFragment ? "<" : "", indent$3(concat$6([hasOwnLineComment ? hardline$4 : hasComment && !isOpeningFragment ? " " : "", comments.printDanglingComments(path, options, true)])), hasOwnLineComment ? hardline$4 : "", ">"]);
+ }
+
+ case "JSXText":
+ /* istanbul ignore next */
+ throw new Error("JSXTest should be handled by JSXElement");
+
+ case "JSXEmptyExpression":
+ {
+ const requiresHardline = n.comments && !n.comments.every(comments$1.isBlockComment);
+ return concat$6([comments.printDanglingComments(path, options,
+ /* sameIndent */
+ !requiresHardline), requiresHardline ? hardline$4 : ""]);
+ }
+
+ case "ClassBody":
+ if (!n.comments && n.body.length === 0) {
+ return "{}";
+ }
+
+ return concat$6(["{", n.body.length > 0 ? indent$3(concat$6([hardline$4, path.call(bodyPath => {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body")])) : comments.printDanglingComments(path, options), hardline$4, "}"]);
+
+ case "ClassProperty":
+ case "TSAbstractClassProperty":
+ case "ClassPrivateProperty":
+ {
+ if (n.decorators && n.decorators.length !== 0) {
+ parts.push(printDecorators(path, options, print));
+ }
+
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.type === "TSAbstractClassProperty" || n.abstract) {
+ parts.push("abstract ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ const variance = getFlowVariance$1(n);
+
+ if (variance) {
+ parts.push(variance);
+ }
+
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path), printTypeAnnotation(path, options, print));
+
+ if (n.value) {
+ parts.push(" =", printAssignmentRight(n.key, n.value, path.call(print, "value"), options));
+ }
+
+ parts.push(semi);
+ return group$2(concat$6(parts));
+ }
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push(concat$6(printClass(path, options, print)));
+ return concat$6(parts);
+
+ case "TSInterfaceHeritage":
+ case "TSExpressionWithTypeArguments":
+ // Babel AST
+ parts.push(path.call(print, "expression"));
+
+ if (n.typeParameters) {
+ parts.push(path.call(print, "typeParameters"));
+ }
+
+ return concat$6(parts);
+
+ case "TemplateElement":
+ return join$4(literalline$2, n.value.raw.split(/\r?\n/g));
+
+ case "TemplateLiteral":
+ {
+ let expressions = path.map(print, "expressions");
+ const parentNode = path.getParentNode();
+
+ if (isJestEachTemplateLiteral$1(n, parentNode)) {
+ const printed = printJestEachTemplateLiteral(n, expressions, options);
+
+ if (printed) {
+ return printed;
+ }
+ }
+
+ const isSimple = isSimpleTemplateLiteral$1(n);
+
+ if (isSimple) {
+ expressions = expressions.map(doc => printDocToString$2(doc, Object.assign({}, options, {
+ printWidth: Infinity
+ })).formatted);
+ }
+
+ parts.push(lineSuffixBoundary$1, "`");
+ path.each(childPath => {
+ const i = childPath.getName();
+ parts.push(print(childPath));
+
+ if (i < expressions.length) {
+ // For a template literal of the following form:
+ // `someQuery {
+ // ${call({
+ // a,
+ // b,
+ // })}
+ // }`
+ // the expression is on its own line (there is a \n in the previous
+ // quasi literal), therefore we want to indent the JavaScript
+ // expression inside at the beginning of ${ instead of the beginning
+ // of the `.
+ const {
+ tabWidth
+ } = options;
+ const quasi = childPath.getValue();
+ const indentSize = getIndentSize$2(quasi.value.raw, tabWidth);
+ let printed = expressions[i];
+
+ if (!isSimple) {
+ // Breaks at the template element boundaries (${ and }) are preferred to breaking
+ // in the middle of a MemberExpression
+ if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "SequenceExpression" || n.expressions[i].type === "TSAsExpression" || isBinaryish$1(n.expressions[i])) {
+ printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
+ }
+ }
+
+ const aligned = indentSize === 0 && quasi.value.raw.endsWith("\n") ? align$1(-Infinity, printed) : addAlignmentToDoc$2(printed, indentSize, tabWidth);
+ parts.push(group$2(concat$6(["${", aligned, lineSuffixBoundary$1, "}"])));
+ }
+ }, "quasis");
+ parts.push("`");
+ return concat$6(parts);
+ }
+ // These types are unprintable because they serve as abstract
+ // supertypes for other (printable) types.
+
+ case "TaggedTemplateExpression":
+ return concat$6([path.call(print, "tag"), path.call(print, "typeParameters"), path.call(print, "quasi")]);
+
+ 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": // Flow
+
+ case "Type":
+ /* istanbul ignore next */
+ throw new Error("unprintable type: " + JSON.stringify(n.type));
+ // Type Annotations for Facebook Flow, typically stripped out or
+ // transformed away before printing.
+
+ case "TypeAnnotation":
+ case "TSTypeAnnotation":
+ if (n.typeAnnotation) {
+ return path.call(print, "typeAnnotation");
+ }
+ /* istanbul ignore next */
+
+
+ return "";
+
+ case "TSTupleType":
+ case "TupleTypeAnnotation":
+ {
+ const typesField = n.type === "TSTupleType" ? "elementTypes" : "types";
+ const hasRest = n[typesField].length > 0 && getLast$2(n[typesField]).type === "TSRestType";
+ return group$2(concat$6(["[", indent$3(concat$6([softline$2, printArrayItems(path, options, typesField, print)])), ifBreak$1(shouldPrintComma(options, "all") && !hasRest ? "," : ""), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), softline$2, "]"]));
+ }
+
+ case "ExistsTypeAnnotation":
+ return "*";
+
+ case "EmptyTypeAnnotation":
+ return "empty";
+
+ case "AnyTypeAnnotation":
+ return "any";
+
+ case "MixedTypeAnnotation":
+ return "mixed";
+
+ case "ArrayTypeAnnotation":
+ return concat$6([path.call(print, "elementType"), "[]"]);
+
+ case "BooleanTypeAnnotation":
+ return "boolean";
+
+ case "BooleanLiteralTypeAnnotation":
+ return "" + n.value;
+
+ case "DeclareClass":
+ return printFlowDeclaration(path, printClass(path, options, print));
+
+ case "TSDeclareFunction":
+ // For TypeScript the TSDeclareFunction node shares the AST
+ // structure with FunctionDeclaration
+ return concat$6([n.declare ? "declare " : "", printFunctionDeclaration(path, print, options), semi]);
+
+ case "DeclareFunction":
+ return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]);
+
+ case "DeclareModule":
+ return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]);
+
+ case "DeclareModuleExports":
+ return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]);
+
+ case "DeclareVariable":
+ return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]);
+
+ case "DeclareExportAllDeclaration":
+ return concat$6(["declare export * from ", path.call(print, "source")]);
+
+ case "DeclareExportDeclaration":
+ return concat$6(["declare ", printExportDeclaration(path, options, print)]);
+
+ case "DeclareOpaqueType":
+ case "OpaqueType":
+ {
+ parts.push("opaque type ", path.call(print, "id"), path.call(print, "typeParameters"));
+
+ if (n.supertype) {
+ parts.push(": ", path.call(print, "supertype"));
+ }
+
+ if (n.impltype) {
+ parts.push(" = ", path.call(print, "impltype"));
+ }
+
+ parts.push(semi);
+
+ if (n.type === "DeclareOpaqueType") {
+ return printFlowDeclaration(path, parts);
+ }
+
+ return concat$6(parts);
+ }
+
+ case "EnumDeclaration":
+ return concat$6(["enum ", path.call(print, "id"), " ", path.call(print, "body")]);
+
+ case "EnumBooleanBody":
+ case "EnumNumberBody":
+ case "EnumStringBody":
+ case "EnumSymbolBody":
+ {
+ if (n.type === "EnumSymbolBody" || n.explicitType) {
+ let type = null;
+
+ switch (n.type) {
+ case "EnumBooleanBody":
+ type = "boolean";
+ break;
+
+ case "EnumNumberBody":
+ type = "number";
+ break;
+
+ case "EnumStringBody":
+ type = "string";
+ break;
+
+ case "EnumSymbolBody":
+ type = "symbol";
+ break;
+ }
+
+ parts.push("of ", type, " ");
+ }
+
+ if (n.members.length === 0) {
+ parts.push(group$2(concat$6(["{", comments.printDanglingComments(path, options), softline$2, "}"])));
+ } else {
+ parts.push(group$2(concat$6(["{", indent$3(concat$6([hardline$4, printArrayItems(path, options, "members", print), shouldPrintComma(options) ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$4, "}"])));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "EnumBooleanMember":
+ case "EnumNumberMember":
+ case "EnumStringMember":
+ return concat$6([path.call(print, "id"), " = ", typeof n.init === "object" ? path.call(print, "init") : String(n.init)]);
+
+ case "EnumDefaultedMember":
+ return path.call(print, "id");
+
+ case "FunctionTypeAnnotation":
+ case "TSFunctionType":
+ {
+ // FunctionTypeAnnotation is ambiguous:
+ // declare function foo(a: B): void; OR
+ // var A: (a: B) => void;
+ const parent = path.getParentNode(0);
+ const parentParent = path.getParentNode(1);
+ const parentParentParent = path.getParentNode(2);
+ let isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((parent.type === "ObjectTypeProperty" || parent.type === "ObjectTypeInternalSlot") && !getFlowVariance$1(parent) && !parent.optional && options.locStart(parent) === options.locStart(n) || parent.type === "ObjectTypeCallProperty" || parentParentParent && parentParentParent.type === "DeclareFunction");
+ let needsColon = isArrowFunctionTypeAnnotation && (parent.type === "TypeAnnotation" || parent.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are
+ // printing ":" as part of the expression and it would put parenthesis
+ // around :(
+
+ const needsParens = needsColon && isArrowFunctionTypeAnnotation && (parent.type === "TypeAnnotation" || parent.type === "TSTypeAnnotation") && parentParent.type === "ArrowFunctionExpression";
+
+ if (isObjectTypePropertyAFunction$1(parent, options)) {
+ isArrowFunctionTypeAnnotation = true;
+ needsColon = true;
+ }
+
+ if (needsParens) {
+ parts.push("(");
+ }
+
+ parts.push(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)); // The returnType is not wrapped in a TypeAnnotation, so the colon
+ // needs to be added separately.
+
+ if (n.returnType || n.predicate || n.typeAnnotation) {
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation"));
+ }
+
+ if (needsParens) {
+ parts.push(")");
+ }
+
+ return group$2(concat$6(parts));
+ }
+
+ case "TSRestType":
+ return concat$6(["...", path.call(print, "typeAnnotation")]);
+
+ case "TSOptionalType":
+ return concat$6([path.call(print, "typeAnnotation"), "?"]);
+
+ case "FunctionTypeParam":
+ return concat$6([path.call(print, "name"), printOptionalToken(path), n.name ? ": " : "", path.call(print, "typeAnnotation")]);
+
+ case "GenericTypeAnnotation":
+ return concat$6([path.call(print, "id"), path.call(print, "typeParameters")]);
+
+ case "DeclareInterface":
+ case "InterfaceDeclaration":
+ case "InterfaceTypeAnnotation":
+ {
+ if (n.type === "DeclareInterface" || n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push("interface");
+
+ if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") {
+ parts.push(" ", path.call(print, "id"), path.call(print, "typeParameters"));
+ }
+
+ if (n.extends.length > 0) {
+ parts.push(group$2(indent$3(concat$6([line$4, "extends ", (n.extends.length === 1 ? identity$2 : indent$3)(join$4(concat$6([",", line$4]), path.map(print, "extends")))]))));
+ }
+
+ parts.push(" ", path.call(print, "body"));
+ return group$2(concat$6(parts));
+ }
+
+ case "ClassImplements":
+ case "InterfaceExtends":
+ return concat$6([path.call(print, "id"), path.call(print, "typeParameters")]);
+
+ case "TSClassImplements":
+ return concat$6([path.call(print, "expression"), path.call(print, "typeParameters")]);
+
+ case "TSIntersectionType":
+ case "IntersectionTypeAnnotation":
+ {
+ const types = path.map(print, "types");
+ const result = [];
+ let wasIndented = false;
+
+ for (let i = 0; i < types.length; ++i) {
+ if (i === 0) {
+ result.push(types[i]);
+ } else if (isObjectType$1(n.types[i - 1]) && isObjectType$1(n.types[i])) {
+ // If both are objects, don't indent
+ result.push(concat$6([" & ", wasIndented ? indent$3(types[i]) : types[i]]));
+ } else if (!isObjectType$1(n.types[i - 1]) && !isObjectType$1(n.types[i])) {
+ // If no object is involved, go to the next line if it breaks
+ result.push(indent$3(concat$6([" &", line$4, types[i]])));
+ } else {
+ // If you go from object to non-object or vis-versa, then inline it
+ if (i > 1) {
+ wasIndented = true;
+ }
+
+ result.push(" & ", i > 1 ? indent$3(types[i]) : types[i]);
+ }
+ }
+
+ return group$2(concat$6(result));
+ }
+
+ case "TSUnionType":
+ case "UnionTypeAnnotation":
+ {
+ // single-line variation
+ // A | B | C
+ // multi-line variation
+ // | A
+ // | B
+ // | C
+ const parent = path.getParentNode(); // If there's a leading comment, the parent is doing the indentation
+
+ const shouldIndent = parent.type !== "TypeParameterInstantiation" && parent.type !== "TSTypeParameterInstantiation" && parent.type !== "GenericTypeAnnotation" && parent.type !== "TSTypeReference" && parent.type !== "TSTypeAssertion" && parent.type !== "TupleTypeAnnotation" && parent.type !== "TSTupleType" && !(parent.type === "FunctionTypeParam" && !parent.name) && !((parent.type === "TypeAlias" || parent.type === "VariableDeclarator" || parent.type === "TSTypeAliasDeclaration") && hasLeadingOwnLineComment$1(options.originalText, n, options)); // {
+ // a: string
+ // } | null | void
+ // should be inlined and not be printed in the multi-line variant
+
+ const shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like
+ // | child1
+ // // comment
+ // | child2
+
+ const printed = path.map(typePath => {
+ let printedType = typePath.call(print);
+
+ if (!shouldHug) {
+ printedType = align$1(2, printedType);
+ }
+
+ return comments.printComments(typePath, () => printedType, options);
+ }, "types");
+
+ if (shouldHug) {
+ return join$4(" | ", printed);
+ }
+
+ const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment$1(options.originalText, n, options);
+ const code = concat$6([ifBreak$1(concat$6([shouldAddStartLine ? line$4 : "", "| "])), join$4(concat$6([line$4, "| "]), printed)]);
+
+ if (needsParens_1(path, options)) {
+ return group$2(concat$6([indent$3(code), softline$2]));
+ }
+
+ if (parent.type === "TupleTypeAnnotation" && parent.types.length > 1 || parent.type === "TSTupleType" && parent.elementTypes.length > 1) {
+ return group$2(concat$6([indent$3(concat$6([ifBreak$1(concat$6(["(", softline$2])), code])), softline$2, ifBreak$1(")")]));
+ }
+
+ return group$2(shouldIndent ? indent$3(code) : code);
+ }
+
+ case "NullableTypeAnnotation":
+ return concat$6(["?", path.call(print, "typeAnnotation")]);
+
+ case "TSNullKeyword":
+ case "NullLiteralTypeAnnotation":
+ return "null";
+
+ case "ThisTypeAnnotation":
+ return "this";
+
+ case "NumberTypeAnnotation":
+ return "number";
+
+ case "SymbolTypeAnnotation":
+ return "symbol";
+
+ case "ObjectTypeCallProperty":
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ parts.push(path.call(print, "value"));
+ return concat$6(parts);
+
+ case "ObjectTypeIndexer":
+ {
+ const variance = getFlowVariance$1(n);
+ return concat$6([variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]);
+ }
+
+ case "ObjectTypeProperty":
+ {
+ const variance = getFlowVariance$1(n);
+ let modifier = "";
+
+ if (n.proto) {
+ modifier = "proto ";
+ } else if (n.static) {
+ modifier = "static ";
+ }
+
+ return concat$6([modifier, isGetterOrSetter$1(n) ? n.kind + " " : "", variance || "", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation$1(n, options) ? "" : ": ", path.call(print, "value")]);
+ }
+
+ case "QualifiedTypeIdentifier":
+ return concat$6([path.call(print, "qualification"), ".", path.call(print, "id")]);
+
+ case "StringLiteralTypeAnnotation":
+ return nodeStr(n, options);
+
+ case "NumberLiteralTypeAnnotation":
+ assert$1.strictEqual(typeof n.value, "number");
+
+ if (n.extra != null) {
+ return printNumber$1(n.extra.raw);
+ }
+
+ return printNumber$1(n.raw);
+
+ case "StringTypeAnnotation":
+ return "string";
+
+ case "DeclareTypeAlias":
+ case "TypeAlias":
+ {
+ if (n.type === "DeclareTypeAlias" || n.declare) {
+ parts.push("declare ");
+ }
+
+ const printed = printAssignmentRight(n.id, n.right, path.call(print, "right"), options);
+ parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", printed, semi);
+ return group$2(concat$6(parts));
+ }
+
+ case "TypeCastExpression":
+ {
+ return concat$6(["(", path.call(print, "expression"), printTypeAnnotation(path, options, print), ")"]);
+ }
+
+ case "TypeParameterDeclaration":
+ case "TypeParameterInstantiation":
+ {
+ const value = path.getValue();
+ const commentStart = value.range ? options.originalText.slice(0, value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here
+ // because we know for sure that this is a type definition.
+
+ const commentSyntax = commentStart >= 0 && options.originalText.slice(commentStart).match(/^\/\*\s*::/);
+
+ if (commentSyntax) {
+ return concat$6(["/*:: ", printTypeParameters(path, options, print, "params"), " */"]);
+ }
+
+ return printTypeParameters(path, options, print, "params");
+ }
+
+ case "TSTypeParameterDeclaration":
+ case "TSTypeParameterInstantiation":
+ return printTypeParameters(path, options, print, "params");
+
+ case "TSTypeParameter":
+ case "TypeParameter":
+ {
+ const parent = path.getParentNode();
+
+ if (parent.type === "TSMappedType") {
+ parts.push("[", path.call(print, "name"));
+
+ if (n.constraint) {
+ parts.push(" in ", path.call(print, "constraint"));
+ }
+
+ parts.push("]");
+ return concat$6(parts);
+ }
+
+ const variance = getFlowVariance$1(n);
+
+ if (variance) {
+ parts.push(variance);
+ }
+
+ parts.push(path.call(print, "name"));
+
+ if (n.bound) {
+ parts.push(": ");
+ parts.push(path.call(print, "bound"));
+ }
+
+ if (n.constraint) {
+ parts.push(" extends ", path.call(print, "constraint"));
+ }
+
+ if (n.default) {
+ parts.push(" = ", path.call(print, "default"));
+ } // Keep comma if the file extension is .tsx and
+ // has one type parameter that isn't extend with any types.
+ // Because, otherwise formatted result will be invalid as tsx.
+
+
+ const grandParent = path.getNode(2);
+
+ if (parent.params && parent.params.length === 1 && isTSXFile$1(options) && !n.constraint && grandParent.type === "ArrowFunctionExpression") {
+ parts.push(",");
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TypeofTypeAnnotation":
+ return concat$6(["typeof ", path.call(print, "argument")]);
+
+ case "VoidTypeAnnotation":
+ return "void";
+
+ case "InferredPredicate":
+ return "%checks";
+ // Unhandled types below. If encountered, nodes of these types should
+ // be either left alone or desugared into AST types that are fully
+ // supported by the pretty-printer.
+
+ case "DeclaredPredicate":
+ return concat$6(["%checks(", path.call(print, "value"), ")"]);
+
+ case "TSAbstractKeyword":
+ return "abstract";
+
+ case "TSAnyKeyword":
+ return "any";
+
+ case "TSAsyncKeyword":
+ return "async";
+
+ case "TSBooleanKeyword":
+ return "boolean";
+
+ case "TSBigIntKeyword":
+ return "bigint";
+
+ case "TSConstKeyword":
+ return "const";
+
+ case "TSDeclareKeyword":
+ return "declare";
+
+ case "TSExportKeyword":
+ return "export";
+
+ case "TSNeverKeyword":
+ return "never";
+
+ case "TSNumberKeyword":
+ return "number";
+
+ case "TSObjectKeyword":
+ return "object";
+
+ case "TSProtectedKeyword":
+ return "protected";
+
+ case "TSPrivateKeyword":
+ return "private";
+
+ case "TSPublicKeyword":
+ return "public";
+
+ case "TSReadonlyKeyword":
+ return "readonly";
+
+ case "TSSymbolKeyword":
+ return "symbol";
+
+ case "TSStaticKeyword":
+ return "static";
+
+ case "TSStringKeyword":
+ return "string";
+
+ case "TSUndefinedKeyword":
+ return "undefined";
+
+ case "TSUnknownKeyword":
+ return "unknown";
+
+ case "TSVoidKeyword":
+ return "void";
+
+ case "TSAsExpression":
+ return concat$6([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]);
+
+ case "TSArrayType":
+ return concat$6([path.call(print, "elementType"), "[]"]);
+
+ case "TSPropertySignature":
+ {
+ if (n.export) {
+ parts.push("export ");
+ }
+
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path));
+
+ if (n.typeAnnotation) {
+ parts.push(": ");
+ parts.push(path.call(print, "typeAnnotation"));
+ } // This isn't valid semantically, but it's in the AST so we can print it.
+
+
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TSParameterProperty":
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.export) {
+ parts.push("export ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ parts.push(path.call(print, "parameter"));
+ return concat$6(parts);
+
+ case "TSTypeReference":
+ return concat$6([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]);
+
+ case "TSTypeQuery":
+ return concat$6(["typeof ", path.call(print, "exprName")]);
+
+ case "TSIndexSignature":
+ {
+ const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
+ // using them, it makes sense to have a trailing comma. But if you
+ // aren't, this is more like a computed property name than an array.
+ // So we leave off the trailing comma when there's just one parameter.
+
+ const trailingComma = n.parameters.length > 1 ? ifBreak$1(shouldPrintComma(options) ? "," : "") : "";
+ const parametersGroup = group$2(concat$6([indent$3(concat$6([softline$2, join$4(concat$6([", ", softline$2]), path.map(print, "parameters"))])), trailingComma, softline$2]));
+ return concat$6([n.export ? "export " : "", n.accessibility ? concat$6([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? parametersGroup : "", n.typeAnnotation ? "]: " : "]", n.typeAnnotation ? path.call(print, "typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""]);
+ }
+
+ case "TSTypePredicate":
+ return concat$6([n.asserts ? "asserts " : "", path.call(print, "parameterName"), n.typeAnnotation ? concat$6([" is ", path.call(print, "typeAnnotation")]) : ""]);
+
+ case "TSNonNullExpression":
+ return concat$6([path.call(print, "expression"), "!"]);
+
+ case "TSThisType":
+ return "this";
+
+ case "TSImportType":
+ return concat$6([!n.isTypeOf ? "" : "typeof ", "import(", path.call(print, n.parameter ? "parameter" : "argument"), ")", !n.qualifier ? "" : concat$6([".", path.call(print, "qualifier")]), printTypeParameters(path, options, print, "typeParameters")]);
+
+ case "TSLiteralType":
+ return path.call(print, "literal");
+
+ case "TSIndexedAccessType":
+ return concat$6([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]);
+
+ case "TSConstructSignatureDeclaration":
+ case "TSCallSignatureDeclaration":
+ case "TSConstructorType":
+ {
+ if (n.type !== "TSCallSignatureDeclaration") {
+ parts.push("new ");
+ }
+
+ parts.push(group$2(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)));
+
+ if (n.returnType || n.typeAnnotation) {
+ const isType = n.type === "TSConstructorType";
+ parts.push(isType ? " => " : ": ", path.call(print, "returnType"), path.call(print, "typeAnnotation"));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TSTypeOperator":
+ return concat$6([n.operator, " ", path.call(print, "typeAnnotation")]);
+
+ case "TSMappedType":
+ {
+ const shouldBreak = hasNewlineInRange$3(options.originalText, options.locStart(n), options.locEnd(n));
+ return group$2(concat$6(["{", indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, n.readonly ? concat$6([getTypeScriptMappedTypeModifier$1(n.readonly, "readonly"), " "]) : "", printTypeScriptModifiers(path, options, print), path.call(print, "typeParameter"), n.optional ? getTypeScriptMappedTypeModifier$1(n.optional, "?") : "", n.typeAnnotation ? ": " : "", path.call(print, "typeAnnotation"), ifBreak$1(semi, "")])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), options.bracketSpacing ? line$4 : softline$2, "}"]), {
+ shouldBreak
+ });
+ }
+
+ case "TSMethodSignature":
+ parts.push(n.accessibility ? concat$6([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path), printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true));
+
+ if (n.returnType || n.typeAnnotation) {
+ parts.push(": ", path.call(print, "returnType"), path.call(print, "typeAnnotation"));
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSNamespaceExportDeclaration":
+ parts.push("export as namespace ", path.call(print, "id"));
+
+ if (options.semi) {
+ parts.push(";");
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSEnumDeclaration":
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ if (n.modifiers) {
+ parts.push(printTypeScriptModifiers(path, options, print));
+ }
+
+ if (n.const) {
+ parts.push("const ");
+ }
+
+ parts.push("enum ", path.call(print, "id"), " ");
+
+ if (n.members.length === 0) {
+ parts.push(group$2(concat$6(["{", comments.printDanglingComments(path, options), softline$2, "}"])));
+ } else {
+ parts.push(group$2(concat$6(["{", indent$3(concat$6([hardline$4, printArrayItems(path, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$4, "}"])));
+ }
+
+ return concat$6(parts);
+
+ case "TSEnumMember":
+ parts.push(path.call(print, "id"));
+
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
+ }
+
+ return concat$6(parts);
+
+ case "TSImportEqualsDeclaration":
+ if (n.isExport) {
+ parts.push("export ");
+ }
+
+ parts.push("import ", path.call(print, "id"), " = ", path.call(print, "moduleReference"));
+
+ if (options.semi) {
+ parts.push(";");
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSExternalModuleReference":
+ return concat$6(["require(", path.call(print, "expression"), ")"]);
+
+ case "TSModuleDeclaration":
+ {
+ const parent = path.getParentNode();
+ const isExternalModule = isLiteral$1(n.id);
+ const parentIsDeclaration = parent.type === "TSModuleDeclaration";
+ const bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration";
+
+ if (parentIsDeclaration) {
+ parts.push(".");
+ } else {
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push(printTypeScriptModifiers(path, options, print));
+ const textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this:
+ // (declare)? global { ... }
+
+ const isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId);
+
+ if (!isGlobalDeclaration) {
+ parts.push(isExternalModule || /(^|\s)module(\s|$)/.test(textBetweenNodeAndItsId) ? "module " : "namespace ");
+ }
+ }
+
+ parts.push(path.call(print, "id"));
+
+ if (bodyIsDeclaration) {
+ parts.push(path.call(print, "body"));
+ } else if (n.body) {
+ parts.push(" ", group$2(path.call(print, "body")));
+ } else {
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+ }
+
+ case "PrivateName":
+ return concat$6(["#", path.call(print, "id")]);
+ // TODO: Temporary auto-generated node type. To remove when typescript-estree has proper support for private fields.
+
+ case "TSPrivateIdentifier":
+ return n.escapedText;
+
+ case "TSConditionalType":
+ return printTernaryOperator(path, options, print, {
+ beforeParts: () => [path.call(print, "checkType"), " ", "extends", " ", path.call(print, "extendsType")],
+ afterParts: () => [],
+ shouldCheckJsx: false,
+ conditionalNodeType: "TSConditionalType",
+ consequentNodePropertyName: "trueType",
+ alternateNodePropertyName: "falseType",
+ testNodePropertyNames: ["checkType", "extendsType"]
+ });
+
+ case "TSInferType":
+ return concat$6(["infer", " ", path.call(print, "typeParameter")]);
+
+ case "InterpreterDirective":
+ parts.push("#!", n.value, hardline$4);
+
+ if (isNextLineEmpty$2(options.originalText, n, options.locEnd)) {
+ parts.push(hardline$4);
+ }
+
+ return concat$6(parts);
+
+ case "NGRoot":
+ return concat$6([].concat(path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$6([" //", n.node.comments[0].value.trimEnd()])));
+
+ case "NGChainedExpression":
+ return group$2(join$4(concat$6([";", line$4]), path.map(childPath => hasNgSideEffect$1(childPath) ? print(childPath) : concat$6(["(", print(childPath), ")"]), "expressions")));
+
+ case "NGEmptyExpression":
+ return "";
+
+ case "NGQuotedExpression":
+ return concat$6([n.prefix, ": ", n.value.trim()]);
+
+ case "NGMicrosyntax":
+ return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
+
+ case "NGMicrosyntaxKey":
+ return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name);
+
+ case "NGMicrosyntaxExpression":
+ return concat$6([path.call(print, "expression"), n.alias === null ? "" : concat$6([" as ", path.call(print, "alias")])]);
+
+ case "NGMicrosyntaxKeyedExpression":
+ {
+ const index = path.getName();
+ const parentNode = path.getParentNode();
+ const shouldNotPrintColon = isNgForOf$1(n, index, parentNode) || (index === 1 && (n.key.name === "then" || n.key.name === "else") || index === 2 && n.key.name === "else" && parentNode.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && parentNode.body[index - 1].key.name === "then") && parentNode.body[0].type === "NGMicrosyntaxExpression";
+ return concat$6([path.call(print, "key"), shouldNotPrintColon ? " " : ": ", path.call(print, "expression")]);
+ }
+
+ case "NGMicrosyntaxLet":
+ return concat$6(["let ", path.call(print, "key"), n.value === null ? "" : concat$6([" = ", path.call(print, "value")])]);
+
+ case "NGMicrosyntaxAs":
+ return concat$6([path.call(print, "key"), " as ", path.call(print, "alias")]);
+
+ case "ArgumentPlaceholder":
+ return "?";
+ // These are not valid TypeScript. Printing them just for the sake of error recovery.
+
+ case "TSJSDocAllType":
+ return "*";
+
+ case "TSJSDocUnknownType":
+ return "?";
+
+ case "TSJSDocNullableType":
+ return concat$6(["?", path.call(print, "typeAnnotation")]);
+
+ case "TSJSDocNonNullableType":
+ return concat$6(["!", path.call(print, "typeAnnotation")]);
+
+ case "TSJSDocFunctionType":
+ return concat$6(["function(", // The parameters could be here, but typescript-estree doesn't convert them anyway (throws an error).
+ "): ", path.call(print, "typeAnnotation")]);
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(n.type));
+ }
+}
+
+function printStatementSequence(path, options, print) {
+ const printed = [];
+ const bodyNode = path.getNode();
+ const isClass = bodyNode.type === "ClassBody";
+ path.map((stmtPath, i) => {
+ const stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy
+ // "statements," it's safer simply to skip them.
+
+ /* istanbul ignore if */
+
+ if (!stmt) {
+ return;
+ } // Skip printing EmptyStatement nodes to avoid leaving stray
+ // semicolons lying around.
+
+
+ if (stmt.type === "EmptyStatement") {
+ return;
+ }
+
+ const stmtPrinted = print(stmtPath);
+ const text = options.originalText;
+ const parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI
+ // don't prepend the only JSX element in a program with semicolon
+
+ if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown$1(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) {
+ if (stmt.comments && stmt.comments.some(comment => comment.leading)) {
+ parts.push(print(stmtPath, {
+ needsSemi: true
+ }));
+ } else {
+ parts.push(";", stmtPrinted);
+ }
+ } else {
+ parts.push(stmtPrinted);
+ }
+
+ if (!options.semi && isClass) {
+ if (classPropMayCauseASIProblems$1(stmtPath)) {
+ parts.push(";");
+ } else if (stmt.type === "ClassProperty") {
+ const nextChild = bodyNode.body[i + 1];
+
+ if (classChildNeedsASIProtection$1(nextChild)) {
+ parts.push(";");
+ }
+ }
+ }
+
+ if (isNextLineEmpty$2(text, stmt, options.locEnd) && !isLastStatement$1(stmtPath)) {
+ parts.push(hardline$4);
+ }
+
+ printed.push(concat$6(parts));
+ });
+ return join$4(hardline$4, printed);
+}
+
+function printPropertyKey(path, options, print) {
+ const node = path.getNode();
+
+ if (node.computed) {
+ return concat$6(["[", path.call(print, "key"), "]"]);
+ }
+
+ const parent = path.getParentNode();
+ const {
+ key
+ } = node;
+
+ if (node.type === "ClassPrivateProperty" && // flow has `Identifier` key, and babel has `PrivateName` key
+ key.type === "Identifier") {
+ return concat$6(["#", path.call(print, "key")]);
+ }
+
+ if (options.quoteProps === "consistent" && !needsQuoteProps.has(parent)) {
+ const objectHasStringProp = (parent.properties || parent.body || parent.members).some(prop => !prop.computed && prop.key && isStringLiteral$1(prop.key) && !isStringPropSafeToCoerceToIdentifier$1(prop, options));
+ needsQuoteProps.set(parent, objectHasStringProp);
+ }
+
+ if (key.type === "Identifier" && (options.parser === "json" || options.quoteProps === "consistent" && needsQuoteProps.get(parent))) {
+ // a -> "a"
+ const prop = printString$1(JSON.stringify(key.name), options);
+ return path.call(keyPath => comments.printComments(keyPath, () => prop, options), "key");
+ }
+
+ if (isStringPropSafeToCoerceToIdentifier$1(node, options) && (options.quoteProps === "as-needed" || options.quoteProps === "consistent" && !needsQuoteProps.get(parent))) {
+ // 'a' -> a
+ return path.call(keyPath => comments.printComments(keyPath, () => key.value, options), "key");
+ }
+
+ return path.call(print, "key");
+}
+
+function printMethod(path, options, print) {
+ const node = path.getNode();
+ const {
+ kind
+ } = node;
+ const value = node.value || node;
+ const parts = [];
+
+ if (!kind || kind === "init" || kind === "method" || kind === "constructor") {
+ if (value.async) {
+ parts.push("async ");
+ }
+
+ if (value.generator) {
+ parts.push("*");
+ }
+ } else {
+ assert$1.ok(kind === "get" || kind === "set");
+ parts.push(kind, " ");
+ }
+
+ parts.push(printPropertyKey(path, options, print), node.optional || node.key.optional ? "?" : "", node === value ? printMethodInternal(path, options, print) : path.call(path => printMethodInternal(path, options, print), "value"));
+ return concat$6(parts);
+}
+
+function printMethodInternal(path, options, print) {
+ const parts = [printFunctionTypeParameters(path, options, print), group$2(concat$6([printFunctionParams(path, print, options), printReturnType(path, print, options)]))];
+
+ if (path.getNode().body) {
+ parts.push(" ", path.call(print, "body"));
+ } else {
+ parts.push(options.semi ? ";" : "");
+ }
+
+ return concat$6(parts);
+}
+
+function couldGroupArg(arg) {
+ return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertion" && couldGroupArg(arg.expression) || arg.type === "TSAsExpression" && couldGroupArg(arg.expression) || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && ( // we want to avoid breaking inside composite return types but not simple keywords
+ // https://github.com/prettier/prettier/issues/4070
+ // export class Thing implements OtherThing {
+ // do: (type: Type) => Provider
= memoize(
+ // (type: ObjectType): Provider => {}
+ // );
+ // }
+ // https://github.com/prettier/prettier/issues/6099
+ // app.get("/", (req, res): void => {
+ // res.send("Hello World!");
+ // });
+ !arg.returnType || !arg.returnType.typeAnnotation || arg.returnType.typeAnnotation.type !== "TSTypeReference") && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode$1(arg.body));
+}
+
+function shouldGroupLastArg(args) {
+ const lastArg = getLast$2(args);
+ const penultimateArg = getPenultimate$1(args);
+ return !hasLeadingComment$3(lastArg) && !hasTrailingComment$1(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type,
+ // disable last element expansion.
+ !penultimateArg || penultimateArg.type !== lastArg.type);
+}
+
+function shouldGroupFirstArg(args) {
+ if (args.length !== 2) {
+ return false;
+ }
+
+ const [firstArg, secondArg] = args;
+ return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg);
+}
+
+function printJestEachTemplateLiteral(node, expressions, options) {
+ /**
+ * a | b | expected
+ * ${1} | ${1} | ${2}
+ * ${1} | ${2} | ${3}
+ * ${2} | ${1} | ${3}
+ */
+ const headerNames = node.quasis[0].value.raw.trim().split(/\s*\|\s*/);
+
+ if (headerNames.length > 1 || headerNames.some(headerName => headerName.length !== 0)) {
+ const parts = [];
+ const stringifiedExpressions = expressions.map(doc => "${" + printDocToString$2(doc, Object.assign({}, options, {
+ printWidth: Infinity,
+ endOfLine: "lf"
+ })).formatted + "}");
+ const tableBody = [{
+ hasLineBreak: false,
+ cells: []
+ }];
+
+ for (let i = 1; i < node.quasis.length; i++) {
+ const row = tableBody[tableBody.length - 1];
+ const correspondingExpression = stringifiedExpressions[i - 1];
+ row.cells.push(correspondingExpression);
+
+ if (correspondingExpression.includes("\n")) {
+ row.hasLineBreak = true;
+ }
+
+ if (node.quasis[i].value.raw.includes("\n")) {
+ tableBody.push({
+ hasLineBreak: false,
+ cells: []
+ });
+ }
+ }
+
+ const maxColumnCount = Math.max(headerNames.length, ...tableBody.map(row => row.cells.length));
+ const maxColumnWidths = Array.from({
+ length: maxColumnCount
+ }).fill(0);
+ const table = [{
+ cells: headerNames
+ }, ...tableBody.filter(row => row.cells.length !== 0)];
+
+ for (const {
+ cells
+ } of table.filter(row => !row.hasLineBreak)) {
+ cells.forEach((cell, index) => {
+ maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$3(cell));
+ });
+ }
+
+ parts.push(lineSuffixBoundary$1, "`", indent$3(concat$6([hardline$4, join$4(hardline$4, table.map(row => join$4(" | ", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$3(cell))))))])), hardline$4, "`");
+ return concat$6(parts);
+ }
+}
+
+function printArgumentsList(path, options, print) {
+ const node = path.getValue();
+ const args = node.arguments;
+
+ if (args.length === 0) {
+ return concat$6(["(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), ")"]);
+ } // useEffect(() => { ... }, [foo, bar, baz])
+
+
+ if (args.length === 2 && args[0].type === "ArrowFunctionExpression" && args[0].params.length === 0 && args[0].body.type === "BlockStatement" && args[1].type === "ArrayExpression" && !args.find(arg => arg.comments)) {
+ return concat$6(["(", path.call(print, "arguments", 0), ", ", path.call(print, "arguments", 1), ")"]);
+ } // func(
+ // ({
+ // a,
+ // b
+ // }) => {}
+ // );
+
+
+ function shouldBreakForArrowFunctionInArguments(arg, argPath) {
+ if (!arg || arg.type !== "ArrowFunctionExpression" || !arg.body || arg.body.type !== "BlockStatement" || !arg.params || arg.params.length < 1) {
+ return false;
+ }
+
+ let shouldBreak = false;
+ argPath.each(paramPath => {
+ const printed = concat$6([print(paramPath)]);
+ shouldBreak = shouldBreak || willBreak$1(printed);
+ }, "params");
+ return shouldBreak;
+ }
+
+ let anyArgEmptyLine = false;
+ let shouldBreakForArrowFunction = false;
+ let hasEmptyLineFollowingFirstArg = false;
+ const lastArgIndex = args.length - 1;
+ const printedArguments = path.map((argPath, index) => {
+ const arg = argPath.getNode();
+ const parts = [print(argPath)];
+
+ if (index === lastArgIndex) ; else if (isNextLineEmpty$2(options.originalText, arg, options.locEnd)) {
+ if (index === 0) {
+ hasEmptyLineFollowingFirstArg = true;
+ }
+
+ anyArgEmptyLine = true;
+ parts.push(",", hardline$4, hardline$4);
+ } else {
+ parts.push(",", line$4);
+ }
+
+ shouldBreakForArrowFunction = shouldBreakForArrowFunctionInArguments(arg, argPath);
+ return concat$6(parts);
+ }, "arguments");
+ const maybeTrailingComma = // Dynamic imports cannot have trailing commas
+ !(node.callee && node.callee.type === "Import") && shouldPrintComma(options, "all") ? "," : "";
+
+ function allArgsBrokenOut() {
+ return group$2(concat$6(["(", indent$3(concat$6([line$4, concat$6(printedArguments)])), maybeTrailingComma, line$4, ")"]), {
+ shouldBreak: true
+ });
+ }
+
+ if (path.getParentNode().type !== "Decorator" && isFunctionCompositionArgs$1(args)) {
+ return allArgsBrokenOut();
+ }
+
+ const shouldGroupFirst = shouldGroupFirstArg(args);
+ const shouldGroupLast = shouldGroupLastArg(args);
+
+ if (shouldGroupFirst || shouldGroupLast) {
+ const shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine || shouldBreakForArrowFunction; // We want to print the last argument with a special flag
+
+ let printedExpanded;
+ let i = 0;
+ path.each(argPath => {
+ if (shouldGroupFirst && i === 0) {
+ printedExpanded = [concat$6([argPath.call(p => print(p, {
+ expandFirstArg: true
+ })), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$4 : line$4, hasEmptyLineFollowingFirstArg ? hardline$4 : ""])].concat(printedArguments.slice(1));
+ }
+
+ if (shouldGroupLast && i === args.length - 1) {
+ printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(p => print(p, {
+ expandLastArg: true
+ })));
+ }
+
+ i++;
+ }, "arguments");
+ const somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1);
+ const simpleConcat = concat$6(["(", concat$6(printedExpanded), ")"]);
+ return concat$6([somePrintedArgumentsWillBreak ? breakParent$2 : "", conditionalGroup$1([!somePrintedArgumentsWillBreak && !node.typeArguments && !node.typeParameters ? simpleConcat : ifBreak$1(allArgsBrokenOut(), simpleConcat), shouldGroupFirst ? concat$6(["(", group$2(printedExpanded[0], {
+ shouldBreak: true
+ }), concat$6(printedExpanded.slice(1)), ")"]) : concat$6(["(", concat$6(printedArguments.slice(0, -1)), group$2(getLast$2(printedExpanded), {
+ shouldBreak: true
+ }), ")"]), allArgsBrokenOut()], {
+ shouldBreak
+ })]);
+ }
+
+ const contents = concat$6(["(", indent$3(concat$6([softline$2, concat$6(printedArguments)])), ifBreak$1(maybeTrailingComma), softline$2, ")"]);
+
+ if (isLongCurriedCallExpression$1(path)) {
+ // By not wrapping the arguments in a group, the printer prioritizes
+ // breaking up these arguments rather than the args of the parent call.
+ return contents;
+ }
+
+ return group$2(contents, {
+ shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine
+ });
+}
+
+function printTypeAnnotation(path, options, print) {
+ const node = path.getValue();
+
+ if (!node.typeAnnotation) {
+ return "";
+ }
+
+ const parentNode = path.getParentNode();
+ const isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite;
+ const isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node;
+
+ if (isFlowAnnotationComment$1(options.originalText, node.typeAnnotation, options)) {
+ return concat$6([" /*: ", path.call(print, "typeAnnotation"), " */"]);
+ }
+
+ return concat$6([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path.call(print, "typeAnnotation")]);
+}
+
+function printFunctionTypeParameters(path, options, print) {
+ const fun = path.getValue();
+
+ if (fun.typeArguments) {
+ return path.call(print, "typeArguments");
+ }
+
+ if (fun.typeParameters) {
+ return path.call(print, "typeParameters");
+ }
+
+ return "";
+}
+
+function printFunctionParams(path, print, options, expandArg, printTypeParams) {
+ const fun = path.getValue();
+ const parent = path.getParentNode();
+ const paramsField = fun.parameters ? "parameters" : "params";
+ const isParametersInTestCall = isTestCall$1(parent);
+ const shouldHugParameters = shouldHugArguments(fun);
+ const shouldExpandParameters = expandArg && !(fun[paramsField] && fun[paramsField].some(n => n.comments));
+ const typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : "";
+ let printed = [];
+
+ if (fun[paramsField]) {
+ const lastArgIndex = fun[paramsField].length - 1;
+ printed = path.map((childPath, index) => {
+ const parts = [];
+ const param = childPath.getValue();
+ parts.push(print(childPath));
+
+ if (index === lastArgIndex) {
+ if (fun.rest) {
+ parts.push(",", line$4);
+ }
+ } else if (isParametersInTestCall || shouldHugParameters || shouldExpandParameters) {
+ parts.push(", ");
+ } else if (isNextLineEmpty$2(options.originalText, param, options.locEnd)) {
+ parts.push(",", hardline$4, hardline$4);
+ } else {
+ parts.push(",", line$4);
+ }
+
+ return concat$6(parts);
+ }, paramsField);
+ }
+
+ if (fun.rest) {
+ printed.push(concat$6(["...", path.call(print, "rest")]));
+ }
+
+ if (printed.length === 0) {
+ return concat$6([typeParams, "(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true, comment => getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")"), ")"]);
+ }
+
+ const lastParam = getLast$2(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the
+ // params of the first/last argument, we don't want the arguments to break and instead
+ // want the whole expression to be on a new line.
+ //
+ // Good: Bad:
+ // verylongcall( verylongcall((
+ // (a, b) => { a,
+ // } b,
+ // }) ) => {
+ // })
+
+ if (shouldExpandParameters) {
+ return group$2(concat$6([removeLines$1(typeParams), "(", concat$6(printed.map(removeLines$1)), ")"]));
+ } // Single object destructuring should hug
+ //
+ // function({
+ // a,
+ // b,
+ // c
+ // }) {}
+
+
+ const hasNotParameterDecorator = fun[paramsField].every(param => !param.decorators);
+
+ if (shouldHugParameters && hasNotParameterDecorator) {
+ return concat$6([typeParams, "(", concat$6(printed), ")"]);
+ } // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})`
+
+
+ if (isParametersInTestCall) {
+ return concat$6([typeParams, "(", concat$6(printed), ")"]);
+ }
+
+ const isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction$1(parent, options) || isTypeAnnotationAFunction$1(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType$1(fun[paramsField][0].typeAnnotation) && !fun.rest;
+
+ if (isFlowShorthandWithOneArg) {
+ if (options.arrowParens === "always") {
+ return concat$6(["(", concat$6(printed), ")"]);
+ }
+
+ return concat$6(printed);
+ }
+
+ const canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest;
+ return concat$6([typeParams, "(", indent$3(concat$6([softline$2, concat$6(printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$2, ")"]);
+}
+
+function shouldPrintParamsWithoutParens(path, options) {
+ if (options.arrowParens === "always") {
+ return false;
+ }
+
+ if (options.arrowParens === "avoid") {
+ const node = path.getValue();
+ return canPrintParamsWithoutParens(node);
+ } // Fallback default; should be unreachable
+
+
+ return false;
+}
+
+function canPrintParamsWithoutParens(node) {
+ return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments$1(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType;
+}
+
+function printFunctionDeclaration(path, print, options) {
+ const n = path.getValue();
+ const parts = [];
+
+ if (n.async) {
+ parts.push("async ");
+ }
+
+ if (n.generator) {
+ parts.push("function* ");
+ } else {
+ parts.push("function ");
+ }
+
+ if (n.id) {
+ parts.push(path.call(print, "id"));
+ }
+
+ parts.push(printFunctionTypeParameters(path, options, print), group$2(concat$6([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? " " : "", path.call(print, "body"));
+ return concat$6(parts);
+}
+
+function printReturnType(path, print, options) {
+ const n = path.getValue();
+ const returnType = path.call(print, "returnType");
+
+ if (n.returnType && isFlowAnnotationComment$1(options.originalText, n.returnType, options)) {
+ return concat$6([" /*: ", returnType, " */"]);
+ }
+
+ const parts = [returnType]; // prepend colon to TypeScript type annotation
+
+ if (n.returnType && n.returnType.typeAnnotation) {
+ parts.unshift(": ");
+ }
+
+ if (n.predicate) {
+ // The return type will already add the colon, but otherwise we
+ // need to do it ourselves
+ parts.push(n.returnType ? " " : ": ", path.call(print, "predicate"));
+ }
+
+ return concat$6(parts);
+}
+
+function printExportDeclaration(path, options, print) {
+ const decl = path.getValue();
+ const semi = options.semi ? ";" : "";
+ const parts = ["export "];
+ const isDefault = decl.default || decl.type === "ExportDefaultDeclaration";
+
+ if (isDefault) {
+ parts.push("default ");
+ }
+
+ parts.push(comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
+
+ if (needsHardlineAfterDanglingComment$1(decl)) {
+ parts.push(hardline$4);
+ }
+
+ if (decl.declaration) {
+ parts.push(path.call(print, "declaration"));
+
+ if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
+ parts.push(semi);
+ }
+ } else {
+ if (decl.specifiers && decl.specifiers.length > 0) {
+ const specifiers = [];
+ const defaultSpecifiers = [];
+ const namespaceSpecifiers = [];
+ path.each(specifierPath => {
+ const specifierType = path.getValue().type;
+
+ if (specifierType === "ExportSpecifier") {
+ specifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportDefaultSpecifier") {
+ defaultSpecifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportNamespaceSpecifier") {
+ namespaceSpecifiers.push(concat$6(["* as ", print(specifierPath)]));
+ }
+ }, "specifiers");
+ const isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0;
+ const isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0);
+ const canBreak = specifiers.length > 1 || defaultSpecifiers.length > 0 || decl.specifiers && decl.specifiers.some(node => node.comments);
+ let printed = "";
+
+ if (specifiers.length !== 0) {
+ if (canBreak) {
+ printed = group$2(concat$6(["{", indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, join$4(concat$6([",", line$4]), specifiers)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$4 : softline$2, "}"]));
+ } else {
+ printed = concat$6(["{", options.bracketSpacing ? " " : "", concat$6(specifiers), options.bracketSpacing ? " " : "", "}"]);
+ }
+ }
+
+ parts.push(decl.exportKind === "type" ? "type " : "", concat$6(defaultSpecifiers), concat$6([isDefaultFollowed ? ", " : ""]), concat$6(namespaceSpecifiers), concat$6([isNamespaceFollowed ? ", " : ""]), printed);
+ } else {
+ parts.push("{}");
+ }
+
+ if (decl.source) {
+ parts.push(" from ", path.call(print, "source"));
+ }
+
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+}
+
+function printFlowDeclaration(path, parts) {
+ const parentExportDecl = getParentExportDeclaration$1(path);
+
+ if (parentExportDecl) {
+ assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
+ } else {
+ // If the parent node has type DeclareExportDeclaration, then it
+ // will be responsible for printing the "declare" token. Otherwise
+ // it needs to be printed with this non-exported declaration node.
+ parts.unshift("declare ");
+ }
+
+ return concat$6(parts);
+}
+
+function printTypeScriptModifiers(path, options, print) {
+ const n = path.getValue();
+
+ if (!n.modifiers || !n.modifiers.length) {
+ return "";
+ }
+
+ return concat$6([join$4(" ", path.map(print, "modifiers")), " "]);
+}
+
+function printTypeParameters(path, options, print, paramsKey) {
+ const n = path.getValue();
+
+ if (!n[paramsKey]) {
+ return "";
+ } // for TypeParameterDeclaration typeParameters is a single node
+
+
+ if (!Array.isArray(n[paramsKey])) {
+ return path.call(print, paramsKey);
+ }
+
+ const grandparent = path.getNode(2);
+ const greatGrandParent = path.getNode(3);
+ const greatGreatGrandParent = path.getNode(4);
+ const isParameterInTestCall = grandparent != null && isTestCall$1(grandparent);
+ const shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation" || // See https://github.com/prettier/prettier/pull/6467 for the context.
+ greatGreatGrandParent && greatGreatGrandParent.type === "VariableDeclarator" && grandparent.type === "TSTypeAnnotation" && greatGrandParent.type !== "ArrowFunctionExpression" && n[paramsKey][0].type !== "TSUnionType" && n[paramsKey][0].type !== "UnionTypeAnnotation" && n[paramsKey][0].type !== "TSIntersectionType" && n[paramsKey][0].type !== "IntersectionTypeAnnotation" && n[paramsKey][0].type !== "TSConditionalType" && n[paramsKey][0].type !== "TSMappedType" && n[paramsKey][0].type !== "TSTypeOperator" && n[paramsKey][0].type !== "TSIndexedAccessType" && n[paramsKey][0].type !== "TSArrayType");
+
+ function printDanglingCommentsForInline(n) {
+ if (!hasDanglingComments$1(n)) {
+ return "";
+ }
+
+ const hasOnlyBlockComments = n.comments.every(comments$1.isBlockComment);
+ const printed = comments.printDanglingComments(path, options,
+ /* sameIndent */
+ hasOnlyBlockComments);
+
+ if (hasOnlyBlockComments) {
+ return printed;
+ }
+
+ return concat$6([printed, hardline$4]);
+ }
+
+ if (shouldInline) {
+ return concat$6(["<", join$4(", ", path.map(print, paramsKey)), printDanglingCommentsForInline(n), ">"]);
+ }
+
+ return group$2(concat$6(["<", indent$3(concat$6([softline$2, join$4(concat$6([",", line$4]), path.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && options.parser !== "babel-ts" && shouldPrintComma(options, "all") ? "," : ""), softline$2, ">"]));
+}
+
+function printClass(path, options, print) {
+ const n = path.getValue();
+ const parts = [];
+
+ if (n.abstract) {
+ parts.push("abstract ");
+ }
+
+ parts.push("class");
+
+ if (n.id) {
+ parts.push(" ", path.call(print, "id"));
+ }
+
+ parts.push(path.call(print, "typeParameters"));
+ const partsGroup = [];
+
+ if (n.superClass) {
+ const printed = concat$6(["extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line
+ // If there is only on extends and there are not comments
+
+ if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) {
+ parts.push(concat$6([" ", path.call(superClass => comments.printComments(superClass, () => printed, options), "superClass")]));
+ } else {
+ partsGroup.push(group$2(concat$6([line$4, path.call(superClass => comments.printComments(superClass, () => printed, options), "superClass")])));
+ }
+ } else if (n.extends && n.extends.length > 0) {
+ parts.push(" extends ", join$4(", ", path.map(print, "extends")));
+ }
+
+ if (n.mixins && n.mixins.length > 0) {
+ partsGroup.push(line$4, "mixins ", group$2(indent$3(join$4(concat$6([",", line$4]), path.map(print, "mixins")))));
+ }
+
+ if (n.implements && n.implements.length > 0) {
+ partsGroup.push(line$4, "implements", group$2(indent$3(concat$6([line$4, join$4(concat$6([",", line$4]), path.map(print, "implements"))]))));
+ }
+
+ if (partsGroup.length > 0) {
+ parts.push(group$2(indent$3(concat$6(partsGroup))));
+ }
+
+ if (n.body && n.body.comments && hasLeadingOwnLineComment$1(options.originalText, n.body, options)) {
+ parts.push(hardline$4);
+ } else {
+ parts.push(" ");
+ }
+
+ parts.push(path.call(print, "body"));
+ return parts;
+}
+
+function printOptionalToken(path) {
+ const node = path.getValue();
+
+ if (!node.optional || // It's an optional computed method parsed by typescript-estree.
+ // "?" is printed in `printMethod`.
+ node.type === "Identifier" && node === path.getParentNode().key) {
+ return "";
+ }
+
+ if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) {
+ return "?.";
+ }
+
+ return "?";
+}
+
+function printMemberLookup(path, options, print) {
+ const property = path.call(print, "property");
+ const n = path.getValue();
+ const optional = printOptionalToken(path);
+
+ if (!n.computed) {
+ return concat$6([optional, ".", property]);
+ }
+
+ if (!n.property || isNumericLiteral$1(n.property)) {
+ return concat$6([optional, "[", property, "]"]);
+ }
+
+ return group$2(concat$6([optional, "[", indent$3(concat$6([softline$2, property])), softline$2, "]"]));
+}
+
+function printBindExpressionCallee(path, options, print) {
+ return concat$6(["::", path.call(print, "callee")]);
+} // We detect calls on member expressions specially to format a
+// common pattern better. The pattern we are looking for is this:
+//
+// arr
+// .map(x => x + 1)
+// .filter(x => x > 10)
+// .some(x => x % 2)
+//
+// The way it is structured in the AST is via a nested sequence of
+// MemberExpression and CallExpression. We need to traverse the AST
+// and make groups out of it to print it in the desired way.
+
+
+function printMemberChain(path, options, print) {
+ // The first phase is to linearize the AST by traversing it down.
+ //
+ // a().b()
+ // has the following AST structure:
+ // CallExpression(MemberExpression(CallExpression(Identifier)))
+ // and we transform it into
+ // [Identifier, CallExpression, MemberExpression, CallExpression]
+ const printedNodes = []; // Here we try to retain one typed empty line after each call expression or
+ // the first group whether it is in parentheses or not
+
+ function shouldInsertEmptyLineAfter(node) {
+ const {
+ originalText
+ } = options;
+ const nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$3(originalText, node, options.locEnd);
+ const nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty
+ // line after that parenthesis
+
+ if (nextChar === ")") {
+ return isNextLineEmptyAfterIndex$2(originalText, nextCharIndex + 1, options.locEnd);
+ }
+
+ return isNextLineEmpty$2(originalText, node, options.locEnd);
+ }
+
+ function rec(path) {
+ const node = path.getValue();
+
+ if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish$1(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) {
+ printedNodes.unshift({
+ node,
+ printed: concat$6([comments.printComments(path, () => concat$6([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]), options), shouldInsertEmptyLineAfter(node) ? hardline$4 : ""])
+ });
+ path.call(callee => rec(callee), "callee");
+ } else if (isMemberish$1(node)) {
+ printedNodes.unshift({
+ node,
+ needsParens: needsParens_1(path, options),
+ printed: comments.printComments(path, () => node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print), options)
+ });
+ path.call(object => rec(object), "object");
+ } else if (node.type === "TSNonNullExpression") {
+ printedNodes.unshift({
+ node,
+ printed: comments.printComments(path, () => "!", options)
+ });
+ path.call(expression => rec(expression), "expression");
+ } else {
+ printedNodes.unshift({
+ node,
+ printed: path.call(print)
+ });
+ }
+ } // Note: the comments of the root node have already been printed, so we
+ // need to extract this first call without printing them as they would
+ // if handled inside of the recursive call.
+
+
+ const node = path.getValue();
+ printedNodes.unshift({
+ node,
+ printed: concat$6([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)])
+ });
+ path.call(callee => rec(callee), "callee"); // Once we have a linear list of printed nodes, we want to create groups out
+ // of it.
+ //
+ // a().b.c().d().e
+ // will be grouped as
+ // [
+ // [Identifier, CallExpression],
+ // [MemberExpression, MemberExpression, CallExpression],
+ // [MemberExpression, CallExpression],
+ // [MemberExpression],
+ // ]
+ // so that we can print it as
+ // a()
+ // .b.c()
+ // .d()
+ // .e
+ // The first group is the first node followed by
+ // - as many CallExpression as possible
+ // < fn()()() >.something()
+ // - as many array accessors as possible
+ // < fn()[0][1][2] >.something()
+ // - then, as many MemberExpression as possible but the last one
+ // < this.items >.something()
+
+ const groups = [];
+ let currentGroup = [printedNodes[0]];
+ let i = 1;
+
+ for (; i < printedNodes.length; ++i) {
+ if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
+ currentGroup.push(printedNodes[i]);
+ } else {
+ break;
+ }
+ }
+
+ if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") {
+ for (; i + 1 < printedNodes.length; ++i) {
+ if (isMemberish$1(printedNodes[i].node) && isMemberish$1(printedNodes[i + 1].node)) {
+ currentGroup.push(printedNodes[i]);
+ } else {
+ break;
+ }
+ }
+ }
+
+ groups.push(currentGroup);
+ currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by
+ // a sequence of CallExpression. To compute it, we keep adding things to the
+ // group until we has seen a CallExpression in the past and reach a
+ // MemberExpression
+
+ let hasSeenCallExpression = false;
+
+ for (; i < printedNodes.length; ++i) {
+ if (hasSeenCallExpression && isMemberish$1(printedNodes[i].node)) {
+ // [0] should be appended at the end of the group instead of the
+ // beginning of the next one
+ if (printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
+ currentGroup.push(printedNodes[i]);
+ continue;
+ }
+
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
+ }
+
+ if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") {
+ hasSeenCallExpression = true;
+ }
+
+ currentGroup.push(printedNodes[i]);
+
+ if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(comment => comment.trailing)) {
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
+ }
+ }
+
+ if (currentGroup.length > 0) {
+ groups.push(currentGroup);
+ } // There are cases like Object.keys(), Observable.of(), _.values() where
+ // they are the subject of all the chained calls and therefore should
+ // be kept on the same line:
+ //
+ // Object.keys(items)
+ // .filter(x => x)
+ // .map(x => x)
+ //
+ // In order to detect those cases, we use an heuristic: if the first
+ // node is an identifier with the name starting with a capital
+ // letter or just a sequence of _$. The rationale is that they are
+ // likely to be factories.
+
+
+ function isFactory(name) {
+ return /^[A-Z]|^[_$]+$/.test(name);
+ } // In case the Identifier is shorter than tab width, we can keep the
+ // first call in a single line, if it's an ExpressionStatement.
+ //
+ // d3.scaleLinear()
+ // .domain([0, 100])
+ // .range([0, width]);
+ //
+
+
+ function isShort(name) {
+ return name.length <= options.tabWidth;
+ }
+
+ function shouldNotWrap(groups) {
+ const parent = path.getParentNode();
+ const isExpression = parent && parent.type === "ExpressionStatement";
+ const hasComputed = groups[1].length && groups[1][0].node.computed;
+
+ if (groups[0].length === 1) {
+ const firstNode = groups[0][0].node;
+ return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed);
+ }
+
+ const lastNode = getLast$2(groups[0]).node;
+ return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed);
+ }
+
+ const shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups);
+
+ function printGroup(printedGroup) {
+ const printed = printedGroup.map(tuple => tuple.printed); // Checks if the last node (i.e. the parent node) needs parens and print
+ // accordingly
+
+ if (printedGroup.length > 0 && printedGroup[printedGroup.length - 1].needsParens) {
+ return concat$6(["(", ...printed, ")"]);
+ }
+
+ return concat$6(printed);
+ }
+
+ function printIndentedGroup(groups) {
+ if (groups.length === 0) {
+ return "";
+ }
+
+ return indent$3(group$2(concat$6([hardline$4, join$4(hardline$4, groups.map(printGroup))])));
+ }
+
+ const printedGroups = groups.map(printGroup);
+ const oneLine = concat$6(printedGroups);
+ const cutoff = shouldMerge ? 3 : 2;
+ const flatGroups = groups.reduce((res, group) => res.concat(group), []);
+ const hasComment = flatGroups.slice(1, -1).some(node => hasLeadingComment$3(node.node)) || flatGroups.slice(0, -1).some(node => hasTrailingComment$1(node.node)) || groups[cutoff] && hasLeadingComment$3(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just
+ // render everything concatenated together.
+
+ if (groups.length <= cutoff && !hasComment) {
+ if (isLongCurriedCallExpression$1(path)) {
+ return oneLine;
+ }
+
+ return group$2(oneLine);
+ } // Find out the last node in the first group and check if it has an
+ // empty line after
+
+
+ const lastNodeBeforeIndent = getLast$2(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node;
+ const shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent);
+ const expanded = concat$6([printGroup(groups[0]), shouldMerge ? concat$6(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$4 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]);
+ const callExpressions = printedNodes.map(({
+ node
+ }) => node).filter(isCallOrOptionalCallExpression$1); // We don't want to print in one line if the chain has:
+ // * A comment.
+ // * Non-trivial arguments.
+ // * Any group but the last one has a hard line.
+ // If the last group is a function it's okay to inline if it fits.
+
+ if (hasComment || callExpressions.length > 2 && callExpressions.some(expr => !expr.arguments.every(arg => isSimpleCallArgument$1(arg, 0))) || printedGroups.slice(0, -1).some(willBreak$1) ||
+ /**
+ * scopes.filter(scope => scope.value !== '').map((scope, i) => {
+ * // multi line content
+ * })
+ */
+ ((lastGroupDoc, lastGroupNode) => isCallOrOptionalCallExpression$1(lastGroupNode) && willBreak$1(lastGroupDoc))(getLast$2(printedGroups), getLast$2(getLast$2(groups)).node) && callExpressions.slice(0, -1).some(n => n.arguments.some(isFunctionOrArrowExpression$1))) {
+ return group$2(expanded);
+ }
+
+ return concat$6([// We only need to check `oneLine` because if `expanded` is chosen
+ // that means that the parent group has already been broken
+ // naturally
+ willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$2 : "", conditionalGroup$1([oneLine, expanded])]);
+}
+
+function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return "";
+ }
+
+ if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) {
+ return child.length === 1 ? softline$2 : hardline$4;
+ }
+
+ return softline$2;
+}
+
+function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return hardline$4;
+ }
+
+ if (child.length === 1) {
+ return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$4 : softline$2;
+ }
+
+ return hardline$4;
+} // JSX Children are strange, mostly for two reasons:
+// 1. JSX reads newlines into string values, instead of skipping them like JS
+// 2. up to one whitespace between elements within a line is significant,
+// but not between lines.
+//
+// Leading, trailing, and lone whitespace all need to
+// turn themselves into the rather ugly `{' '}` when breaking.
+//
+// We print JSX using the `fill` doc primitive.
+// This requires that we give it an array of alternating
+// content and whitespace elements.
+// To ensure this we add dummy `""` content elements as needed.
+
+
+function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) {
+ const n = path.getValue();
+ const children = []; // using `map` instead of `each` because it provides `i`
+
+ path.map((childPath, i) => {
+ const child = childPath.getValue();
+
+ if (isLiteral$1(child)) {
+ const text = rawText$1(child); // Contains a non-whitespace character
+
+ if (isMeaningfulJSXText$1(child)) {
+ const words = text.split(matchJsxWhitespaceRegex$1); // Starts with whitespace
+
+ if (words[0] === "") {
+ children.push("");
+ words.shift();
+
+ if (/\n/.test(words[0])) {
+ const next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next));
+ } else {
+ children.push(jsxWhitespace);
+ }
+
+ words.shift();
+ }
+
+ let endWhitespace; // Ends with whitespace
+
+ if (getLast$2(words) === "") {
+ words.pop();
+ endWhitespace = words.pop();
+ } // This was whitespace only without a new line.
+
+
+ if (words.length === 0) {
+ return;
+ }
+
+ words.forEach((word, i) => {
+ if (i % 2 === 1) {
+ children.push(line$4);
+ } else {
+ children.push(word);
+ }
+ });
+
+ if (endWhitespace !== undefined) {
+ if (/\n/.test(endWhitespace)) {
+ const next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$2(children), child, next));
+ } else {
+ children.push(jsxWhitespace);
+ }
+ } else {
+ const next = n.children[i + 1];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$2(children), child, next));
+ }
+ } else if (/\n/.test(text)) {
+ // Keep (up to one) blank line between tags/expressions/text.
+ // Note: We don't keep blank lines between text elements.
+ if (text.match(/\n/g).length > 1) {
+ children.push("");
+ children.push(hardline$4);
+ }
+ } else {
+ children.push("");
+ children.push(jsxWhitespace);
+ }
+ } else {
+ const printedChild = print(childPath);
+ children.push(printedChild);
+ const next = n.children[i + 1];
+ const directlyFollowedByMeaningfulText = next && isMeaningfulJSXText$1(next);
+
+ if (directlyFollowedByMeaningfulText) {
+ const firstWord = rawText$1(next).trim().split(matchJsxWhitespaceRegex$1)[0];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, next));
+ } else {
+ children.push(hardline$4);
+ }
+ }
+ }, "children");
+ return children;
+} // JSX expands children from the inside-out, instead of the outside-in.
+// This is both to break children before attributes,
+// and to ensure that when children break, their parents do as well.
+//
+// Any element that is written without any newlines and fits on a single line
+// is left that way.
+// Not only that, any user-written-line containing multiple JSX siblings
+// should also be kept on one line if possible,
+// so each user-written-line is wrapped in its own group.
+//
+// Elements that contain newlines or don't fit on a single line (recursively)
+// are fully-split, using hardline and shouldBreak: true.
+//
+// To support that case properly, all leading and trailing spaces
+// are stripped from the list of children, and replaced with a single hardline.
+
+
+function printJSXElement(path, options, print) {
+ const n = path.getValue();
+
+ if (n.type === "JSXElement" && isEmptyJSXElement$1(n)) {
+ return concat$6([path.call(print, "openingElement"), path.call(print, "closingElement")]);
+ }
+
+ const openingLines = n.type === "JSXElement" ? path.call(print, "openingElement") : path.call(print, "openingFragment");
+ const closingLines = n.type === "JSXElement" ? path.call(print, "closingElement") : path.call(print, "closingFragment");
+
+ if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) {
+ return concat$6([openingLines, concat$6(path.map(print, "children")), closingLines]);
+ } // Convert `{" "}` to text nodes containing a space.
+ // This makes it easy to turn them into `jsxWhitespace` which
+ // can then print as either a space or `{" "}` when breaking.
+
+
+ n.children = n.children.map(child => {
+ if (isJSXWhitespaceExpression$1(child)) {
+ return {
+ type: "JSXText",
+ value: " ",
+ raw: " "
+ };
+ }
+
+ return child;
+ });
+ const containsTag = n.children.filter(isJSXNode$1).length > 0;
+ const containsMultipleExpressions = n.children.filter(child => child.type === "JSXExpressionContainer").length > 1;
+ const containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true.
+
+ let forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions;
+ const isMdxBlock = path.getParentNode().rootMarker === "mdx";
+ const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
+ const jsxWhitespace = isMdxBlock ? concat$6([" "]) : ifBreak$1(concat$6([rawJsxWhitespace, softline$2]), " ");
+ const isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt";
+ const children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag);
+ const containsText = n.children.some(child => isMeaningfulJSXText$1(child)); // We can end up we multiple whitespace elements with empty string
+ // content between them.
+ // We need to remove empty whitespace and softlines before JSX whitespace
+ // to get the correct output.
+
+ for (let i = children.length - 2; i >= 0; i--) {
+ const isPairOfEmptyStrings = children[i] === "" && children[i + 1] === "";
+ const isPairOfHardlines = children[i] === hardline$4 && children[i + 1] === "" && children[i + 2] === hardline$4;
+ const isLineFollowedByJSXWhitespace = (children[i] === softline$2 || children[i] === hardline$4) && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ const isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$2 || children[i + 2] === hardline$4);
+ const isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ const isPairOfHardOrSoftLines = children[i] === softline$2 && children[i + 1] === "" && children[i + 2] === hardline$4 || children[i] === hardline$4 && children[i + 1] === "" && children[i + 2] === softline$2;
+
+ if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) {
+ children.splice(i, 2);
+ } else if (isJSXWhitespaceFollowedByLine) {
+ children.splice(i + 1, 2);
+ }
+ } // Trim trailing lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(getLast$2(children)) || isEmpty$1(getLast$2(children)))) {
+ children.pop();
+ } // Trim leading lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) {
+ children.shift();
+ children.shift();
+ } // Tweak how we format children if outputting this element over multiple lines.
+ // Also detect whether we will force this element to output over multiple lines.
+
+
+ const multilineChildren = [];
+ children.forEach((child, i) => {
+ // There are a number of situations where we need to ensure we display
+ // whitespace as `{" "}` when outputting this element over multiple lines.
+ if (child === jsxWhitespace) {
+ if (i === 1 && children[i - 1] === "") {
+ if (children.length === 2) {
+ // Solitary whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } // Leading whitespace
+
+
+ multilineChildren.push(concat$6([rawJsxWhitespace, hardline$4]));
+ return;
+ } else if (i === children.length - 1) {
+ // Trailing whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } else if (children[i - 1] === "" && children[i - 2] === hardline$4) {
+ // Whitespace after line break
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ }
+ }
+
+ multilineChildren.push(child);
+
+ if (willBreak$1(child)) {
+ forcedBreak = true;
+ }
+ }); // If there is text we use `fill` to fit as much onto each line as possible.
+ // When there is no text (just tags and expressions) we use `group`
+ // to output each on a separate line.
+
+ const content = containsText ? fill$3(multilineChildren) : group$2(concat$6(multilineChildren), {
+ shouldBreak: true
+ });
+
+ if (isMdxBlock) {
+ return content;
+ }
+
+ const multiLineElem = group$2(concat$6([openingLines, indent$3(concat$6([hardline$4, content])), hardline$4, closingLines]));
+
+ if (forcedBreak) {
+ return multiLineElem;
+ }
+
+ return conditionalGroup$1([group$2(concat$6([openingLines, concat$6(children), closingLines])), multiLineElem]);
+}
+
+function maybeWrapJSXElementInParens(path, elem, options) {
+ const parent = path.getParentNode();
+
+ if (!parent) {
+ return elem;
+ }
+
+ const NO_WRAP_PARENTS = {
+ ArrayExpression: true,
+ JSXAttribute: true,
+ JSXElement: true,
+ JSXExpressionContainer: true,
+ JSXFragment: true,
+ ExpressionStatement: true,
+ CallExpression: true,
+ OptionalCallExpression: true,
+ ConditionalExpression: true,
+ JsExpressionRoot: true
+ };
+
+ if (NO_WRAP_PARENTS[parent.type]) {
+ return elem;
+ }
+
+ const shouldBreak = path.match(undefined, node => node.type === "ArrowFunctionExpression", isCallOrOptionalCallExpression$1, node => node.type === "JSXExpressionContainer");
+ const needsParens = needsParens_1(path, options);
+ return group$2(concat$6([needsParens ? "" : ifBreak$1("("), indent$3(concat$6([softline$2, elem])), softline$2, needsParens ? "" : ifBreak$1(")")]), {
+ shouldBreak
+ });
+}
+
+function shouldInlineLogicalExpression(node) {
+ if (node.type !== "LogicalExpression") {
+ return false;
+ }
+
+ if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) {
+ return true;
+ }
+
+ if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) {
+ return true;
+ }
+
+ if (isJSXNode$1(node.right)) {
+ return true;
+ }
+
+ return false;
+} // For binary expressions to be consistent, we need to group
+// subsequent operators with the same precedence level under a single
+// group. Otherwise they will be nested such that some of them break
+// onto new lines but not all. Operators with the same precedence
+// level should either all break or not. Because we group them by
+// precedence level and the AST is structured based on precedence
+// level, things are naturally broken up correctly, i.e. `&&` is
+// broken before `+`.
+
+
+function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {
+ let parts = [];
+ const node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.
+
+ if (isBinaryish$1(node)) {
+ // Put all operators with the same precedence level in the same
+ // group. The reason we only need to do this with the `left`
+ // expression is because given an expression like `1 + 2 - 3`, it
+ // is always parsed like `((1 + 2) - 3)`, meaning the `left` side
+ // is where the rest of the expression will exist. Binary
+ // expressions on the right side mean they have a difference
+ // precedence level and should be treated as a separate group, so
+ // print them normally. (This doesn't hold for the `**` operator,
+ // which is unique in that it is right-associative.)
+ if (shouldFlatten$1(node.operator, node.left.operator)) {
+ // Flatten them out by recursively calling this function.
+ parts = parts.concat(path.call(left => printBinaryishExpressions(left, print, options,
+ /* isNested */
+ true, isInsideParenthesis), "left"));
+ } else {
+ parts.push(path.call(print, "left"));
+ }
+
+ const shouldInline = shouldInlineLogicalExpression(node);
+ const lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment$1(options.originalText, node.right, options);
+ const operator = node.type === "NGPipeExpression" ? "|" : node.operator;
+ const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$2(indent$3(concat$6([softline$2, ": ", join$4(concat$6([softline$2, ":", ifBreak$1(" ")]), path.map(print, "arguments").map(arg => align$1(2, group$2(arg))))]))) : "";
+ const right = shouldInline ? concat$6([operator, " ", path.call(print, "right"), rightSuffix]) : concat$6([lineBeforeOperator ? softline$2 : "", operator, lineBeforeOperator ? " " : line$4, path.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group
+ // in order to avoid having a small right part like -1 be on its own line.
+
+ const parent = path.getParentNode();
+ const shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;
+ parts.push(" ", shouldGroup ? group$2(right) : right); // The root comments are already printed, but we need to manually print
+ // the other ones since we don't call the normal print on BinaryExpression,
+ // only for the left and right parts
+
+ if (isNested && node.comments) {
+ parts = comments.printComments(path, () => concat$6(parts), options);
+ }
+ } else {
+ // Our stopping case. Simply print the node normally.
+ parts.push(path.call(print));
+ }
+
+ return parts;
+}
+
+function printAssignmentRight(leftNode, rightNode, printedRight, options) {
+ if (hasLeadingOwnLineComment$1(options.originalText, rightNode, options)) {
+ return indent$3(concat$6([line$4, printedRight]));
+ }
+
+ const canBreak = isBinaryish$1(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish$1(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral$1(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral$1(rightNode) || isMemberExpressionChain$1(rightNode)) && // do not put values on a separate line from the key in json
+ options.parser !== "json" && options.parser !== "json5" || rightNode.type === "SequenceExpression";
+
+ if (canBreak) {
+ return group$2(indent$3(concat$6([line$4, printedRight])));
+ }
+
+ return concat$6([" ", printedRight]);
+}
+
+function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) {
+ if (!rightNode) {
+ return printedLeft;
+ }
+
+ const printed = printAssignmentRight(leftNode, rightNode, printedRight, options);
+ return group$2(concat$6([printedLeft, operator, printed]));
+}
+
+function adjustClause(node, clause, forceSpace) {
+ if (node.type === "EmptyStatement") {
+ return ";";
+ }
+
+ if (node.type === "BlockStatement" || forceSpace) {
+ return concat$6([" ", clause]);
+ }
+
+ return indent$3(concat$6([line$4, clause]));
+}
+
+function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) {
+ const raw = rawText$1(node);
+ const isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral";
+ return printString$1(raw, options, isDirectiveLiteral);
+}
+
+function printRegex(node) {
+ const flags = node.flags.split("").sort().join("");
+ return `/${node.pattern}/${flags}`;
+}
+
+function exprNeedsASIProtection(path, options) {
+ const node = path.getValue();
+ const maybeASIProblem = needsParens_1(path, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode$1(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex;
+
+ if (maybeASIProblem) {
+ return true;
+ }
+
+ if (!hasNakedLeftSide$2(node)) {
+ return false;
+ }
+
+ return path.call(childPath => exprNeedsASIProtection(childPath, options), ...getLeftSidePathName$2(path, node));
+}
+
+function stmtNeedsASIProtection(path, options) {
+ const node = path.getNode();
+
+ if (node.type !== "ExpressionStatement") {
+ return false;
+ }
+
+ return path.call(childPath => exprNeedsASIProtection(childPath, options), "expression");
+}
+
+function shouldHugType(node) {
+ if (isSimpleFlowType$1(node) || isObjectType$1(node)) {
+ return true;
+ }
+
+ if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") {
+ const voidCount = node.types.filter(n => n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword").length;
+ const hasObject = node.types.some(n => n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}>
+ n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference");
+
+ if (node.types.length - 1 === voidCount && hasObject) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function shouldHugArguments(fun) {
+ if (!fun || fun.rest) {
+ return false;
+ }
+
+ const params = fun.params || fun.parameters;
+
+ if (!params || params.length !== 1) {
+ return false;
+ }
+
+ const param = params[0];
+ return !param.comments && (param.type === "ObjectPattern" || param.type === "ArrayPattern" || param.type === "Identifier" && param.typeAnnotation && (param.typeAnnotation.type === "TypeAnnotation" || param.typeAnnotation.type === "TSTypeAnnotation") && isObjectType$1(param.typeAnnotation.typeAnnotation) || param.type === "FunctionTypeParam" && isObjectType$1(param.typeAnnotation) || param.type === "AssignmentPattern" && (param.left.type === "ObjectPattern" || param.left.type === "ArrayPattern") && (param.right.type === "Identifier" || param.right.type === "ObjectExpression" && param.right.properties.length === 0 || param.right.type === "ArrayExpression" && param.right.elements.length === 0));
+}
+
+function printArrayItems(path, options, printPath, print) {
+ const printedElements = [];
+ let separatorParts = [];
+ path.each(childPath => {
+ printedElements.push(concat$6(separatorParts));
+ printedElements.push(group$2(print(childPath)));
+ separatorParts = [",", line$4];
+
+ if (childPath.getValue() && isNextLineEmpty$2(options.originalText, childPath.getValue(), options.locEnd)) {
+ separatorParts.push(softline$2);
+ }
+ }, printPath);
+ return concat$6(printedElements);
+}
+
+function printReturnAndThrowArgument(path, options, print) {
+ const node = path.getValue();
+ const semi = options.semi ? ";" : "";
+ const parts = [];
+
+ if (node.argument) {
+ if (returnArgumentHasLeadingComment$1(options, node.argument)) {
+ parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
+ } else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
+ parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
+ } else {
+ parts.push(" ", path.call(print, "argument"));
+ }
+ }
+
+ const lastComment = Array.isArray(node.comments) && node.comments[node.comments.length - 1];
+ const isLastCommentLine = lastComment && (lastComment.type === "CommentLine" || lastComment.type === "Line");
+
+ if (isLastCommentLine) {
+ parts.push(semi);
+ }
+
+ if (hasDanglingComments$1(node)) {
+ parts.push(" ", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
+ }
+
+ if (!isLastCommentLine) {
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+}
+
+function willPrintOwnComments(path
+/*, options */
+) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && (!hasIgnoreComment$2(path) || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType");
+}
+
+function canAttachComment(node) {
+ return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import";
+}
+
+function printComment$1(commentPath, options) {
+ const comment = commentPath.getValue();
+
+ switch (comment.type) {
+ case "CommentBlock":
+ case "Block":
+ {
+ if (isIndentableBlockComment(comment)) {
+ const printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment
+ // printed as a `lineSuffix` which causes the comments to be
+ // interleaved. See https://github.com/prettier/prettier/issues/4412
+
+ if (comment.trailing && !hasNewline$4(options.originalText, options.locStart(comment), {
+ backwards: true
+ })) {
+ return concat$6([hardline$4, printed]);
+ }
+
+ return printed;
+ }
+
+ const commentEnd = options.locEnd(comment);
+ const isInsideFlowComment = options.originalText.slice(commentEnd - 3, commentEnd) === "*-/";
+ return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/");
+ }
+
+ case "CommentLine":
+ case "Line":
+ // Print shebangs with the proper comment characters
+ if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) {
+ return "#!" + comment.value.trimEnd();
+ }
+
+ return "//" + comment.value.trimEnd();
+
+ default:
+ throw new Error("Not a comment: " + JSON.stringify(comment));
+ }
+}
+
+function isIndentableBlockComment(comment) {
+ // If the comment has multiple lines and every line starts with a star
+ // we can fix the indentation of each line. The stars in the `/*` and
+ // `*/` delimiters are not included in the comment value, so add them
+ // back first.
+ const lines = `*${comment.value}*`.split("\n");
+ return lines.length > 1 && lines.every(line => line.trim()[0] === "*");
+}
+
+function printIndentableBlockComment(comment) {
+ const lines = comment.value.split("\n");
+ return concat$6(["/*", join$4(hardline$4, lines.map((line, index) => index === 0 ? line.trimEnd() : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()))), "*/"]);
+}
+
+var printerEstree = {
+ preprocess: preprocess_1,
+ print: genericPrint,
+ embed: embed_1,
+ insertPragma: insertPragma$1,
+ massageAstNode: clean_1,
+ hasPrettierIgnore: hasPrettierIgnore$1,
+ willPrintOwnComments,
+ canAttachComment,
+ printComment: printComment$1,
+ isBlockComment: comments$1.isBlockComment,
+ handleComments: {
+ ownLine: comments$1.handleOwnLineComment,
+ endOfLine: comments$1.handleEndOfLineComment,
+ remaining: comments$1.handleRemainingComment
+ },
+ getGapRegex: comments$1.getGapRegex,
+ getCommentChildNodes: comments$1.getCommentChildNodes
+};
+
+const {
+ concat: concat$7,
+ hardline: hardline$5,
+ indent: indent$4,
+ join: join$5
+} = document.builders;
+
+function genericPrint$1(path, options, print) {
+ const node = path.getValue();
+
+ switch (node.type) {
+ case "JsonRoot":
+ return concat$7([path.call(print, "node"), hardline$5]);
+
+ case "ArrayExpression":
+ return node.elements.length === 0 ? "[]" : concat$7(["[", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path.map(print, "elements"))])), hardline$5, "]"]);
+
+ case "ObjectExpression":
+ return node.properties.length === 0 ? "{}" : concat$7(["{", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path.map(print, "properties"))])), hardline$5, "}"]);
+
+ case "ObjectProperty":
+ return concat$7([path.call(print, "key"), ": ", path.call(print, "value")]);
+
+ case "UnaryExpression":
+ return concat$7([node.operator === "+" ? "" : node.operator, path.call(print, "argument")]);
+
+ case "NullLiteral":
+ return "null";
+
+ case "BooleanLiteral":
+ return node.value ? "true" : "false";
+
+ case "StringLiteral":
+ case "NumericLiteral":
+ return JSON.stringify(node.value);
+
+ case "Identifier":
+ return JSON.stringify(node.name);
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(node.type));
+ }
+}
+
+function clean$1(node, newNode
+/*, parent*/
+) {
+ delete newNode.start;
+ delete newNode.end;
+ delete newNode.extra;
+ delete newNode.loc;
+ delete newNode.comments;
+ delete newNode.errors;
+
+ if (node.type === "Identifier") {
+ return {
+ type: "StringLiteral",
+ value: node.name
+ };
+ }
+
+ if (node.type === "UnaryExpression" && node.operator === "+") {
+ return newNode.argument;
+ }
+}
+
+var printerEstreeJson = {
+ preprocess: preprocess_1,
+ print: genericPrint$1,
+ massageAstNode: clean$1
+};
+
+const CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+
+var commonOptions = {
+ bracketSpacing: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: true,
+ description: "Print spaces between brackets.",
+ oppositeDescription: "Do not print spaces between brackets."
+ },
+ singleQuote: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes instead of double quotes."
+ },
+ proseWrap: {
+ since: "1.8.2",
+ category: CATEGORY_COMMON,
+ 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."
+ }]
+ }
+};
+
+const CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+
+var options$2 = {
+ arrowParens: {
+ since: "1.9.0",
+ category: CATEGORY_JAVASCRIPT,
+ 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`"
+ }]
+ },
+ bracketSpacing: commonOptions.bracketSpacing,
+ jsxBracketSameLine: {
+ since: "0.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Put > on the last line instead of at a new line."
+ },
+ semi: {
+ since: "1.0.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: true,
+ description: "Print semicolons.",
+ oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them."
+ },
+ singleQuote: commonOptions.singleQuote,
+ jsxSingleQuote: {
+ since: "1.15.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes in JSX."
+ },
+ quoteProps: {
+ since: "1.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ 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: CATEGORY_JAVASCRIPT,
+ 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)."
+ }]
+ }
+};
+
+var createLanguage = function (linguistData, override) {
+ const {
+ languageId
+ } = linguistData,
+ rest = _objectWithoutPropertiesLoose(linguistData, ["languageId"]);
+
+ return Object.assign({
+ linguistLanguageId: languageId
+ }, rest, {}, override(linguistData));
+};
+
+var name$2 = "JavaScript";
+var type = "programming";
+var tmScope = "source.js";
+var aceMode = "javascript";
+var codemirrorMode = "javascript";
+var codemirrorMimeType = "text/javascript";
+var color = "#f1e05a";
+var aliases = [
+ "js",
+ "node"
+];
+var extensions = [
+ ".js",
+ "._js",
+ ".bones",
+ ".cjs",
+ ".es",
+ ".es6",
+ ".frag",
+ ".gs",
+ ".jake",
+ ".jsb",
+ ".jscad",
+ ".jsfl",
+ ".jsm",
+ ".jss",
+ ".mjs",
+ ".njs",
+ ".pac",
+ ".sjs",
+ ".ssjs",
+ ".xsjs",
+ ".xsjslib"
+];
+var filenames = [
+ "Jakefile"
+];
+var interpreters = [
+ "chakra",
+ "d8",
+ "gjs",
+ "js",
+ "node",
+ "qjs",
+ "rhino",
+ "v8",
+ "v8-shell"
+];
+var languageId = 183;
+var JavaScript = {
+ name: name$2,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ aliases: aliases,
+ extensions: extensions,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId
+};
+
+var JavaScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$2,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ aliases: aliases,
+ extensions: extensions,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId,
+ 'default': JavaScript
+});
+
+var name$3 = "JSX";
+var type$1 = "programming";
+var group$3 = "JavaScript";
+var extensions$1 = [
+ ".jsx"
+];
+var tmScope$1 = "source.js.jsx";
+var aceMode$1 = "javascript";
+var codemirrorMode$1 = "jsx";
+var codemirrorMimeType$1 = "text/jsx";
+var languageId$1 = 178;
+var JSX = {
+ name: name$3,
+ type: type$1,
+ group: group$3,
+ extensions: extensions$1,
+ tmScope: tmScope$1,
+ aceMode: aceMode$1,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$1
+};
+
+var JSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$3,
+ type: type$1,
+ group: group$3,
+ extensions: extensions$1,
+ tmScope: tmScope$1,
+ aceMode: aceMode$1,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$1,
+ 'default': JSX
+});
+
+var name$4 = "TypeScript";
+var type$2 = "programming";
+var color$1 = "#2b7489";
+var aliases$1 = [
+ "ts"
+];
+var interpreters$1 = [
+ "deno",
+ "ts-node"
+];
+var extensions$2 = [
+ ".ts"
+];
+var tmScope$2 = "source.ts";
+var aceMode$2 = "typescript";
+var codemirrorMode$2 = "javascript";
+var codemirrorMimeType$2 = "application/typescript";
+var languageId$2 = 378;
+var TypeScript = {
+ name: name$4,
+ type: type$2,
+ color: color$1,
+ aliases: aliases$1,
+ interpreters: interpreters$1,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ languageId: languageId$2
+};
+
+var TypeScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$4,
+ type: type$2,
+ color: color$1,
+ aliases: aliases$1,
+ interpreters: interpreters$1,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ languageId: languageId$2,
+ 'default': TypeScript
+});
+
+var name$5 = "TSX";
+var type$3 = "programming";
+var group$4 = "TypeScript";
+var extensions$3 = [
+ ".tsx"
+];
+var tmScope$3 = "source.tsx";
+var aceMode$3 = "javascript";
+var codemirrorMode$3 = "jsx";
+var codemirrorMimeType$3 = "text/jsx";
+var languageId$3 = 94901924;
+var TSX = {
+ name: name$5,
+ type: type$3,
+ group: group$4,
+ extensions: extensions$3,
+ tmScope: tmScope$3,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ languageId: languageId$3
+};
+
+var TSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$5,
+ type: type$3,
+ group: group$4,
+ extensions: extensions$3,
+ tmScope: tmScope$3,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ languageId: languageId$3,
+ 'default': TSX
+});
+
+var name$6 = "JSON";
+var type$4 = "data";
+var tmScope$4 = "source.json";
+var aceMode$4 = "json";
+var codemirrorMode$4 = "javascript";
+var codemirrorMimeType$4 = "application/json";
+var searchable = false;
+var extensions$4 = [
+ ".json",
+ ".avsc",
+ ".geojson",
+ ".gltf",
+ ".har",
+ ".ice",
+ ".JSON-tmLanguage",
+ ".jsonl",
+ ".mcmeta",
+ ".tfstate",
+ ".tfstate.backup",
+ ".topojson",
+ ".webapp",
+ ".webmanifest",
+ ".yy",
+ ".yyp"
+];
+var filenames$1 = [
+ ".arcconfig",
+ ".htmlhintrc",
+ ".tern-config",
+ ".tern-project",
+ ".watchmanconfig",
+ "composer.lock",
+ "mcmod.info"
+];
+var languageId$4 = 174;
+var _JSON = {
+ name: name$6,
+ type: type$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ searchable: searchable,
+ extensions: extensions$4,
+ filenames: filenames$1,
+ languageId: languageId$4
+};
+
+var _JSON$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$6,
+ type: type$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ searchable: searchable,
+ extensions: extensions$4,
+ filenames: filenames$1,
+ languageId: languageId$4,
+ 'default': _JSON
+});
+
+var name$7 = "JSON with Comments";
+var type$5 = "data";
+var group$5 = "JSON";
+var tmScope$5 = "source.js";
+var aceMode$5 = "javascript";
+var codemirrorMode$5 = "javascript";
+var codemirrorMimeType$5 = "text/javascript";
+var aliases$2 = [
+ "jsonc"
+];
+var extensions$5 = [
+ ".jsonc",
+ ".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"
+];
+var filenames$2 = [
+ ".babelrc",
+ ".eslintrc.json",
+ ".jscsrc",
+ ".jshintrc",
+ ".jslintrc",
+ "jsconfig.json",
+ "language-configuration.json",
+ "tsconfig.json"
+];
+var languageId$5 = 423;
+var JSON_with_Comments = {
+ name: name$7,
+ type: type$5,
+ group: group$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ aliases: aliases$2,
+ extensions: extensions$5,
+ filenames: filenames$2,
+ languageId: languageId$5
+};
+
+var JSON_with_Comments$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$7,
+ type: type$5,
+ group: group$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ aliases: aliases$2,
+ extensions: extensions$5,
+ filenames: filenames$2,
+ languageId: languageId$5,
+ 'default': JSON_with_Comments
+});
+
+var name$8 = "JSON5";
+var type$6 = "data";
+var extensions$6 = [
+ ".json5"
+];
+var tmScope$6 = "source.js";
+var aceMode$6 = "javascript";
+var codemirrorMode$6 = "javascript";
+var codemirrorMimeType$6 = "application/json";
+var languageId$6 = 175;
+var JSON5 = {
+ name: name$8,
+ type: type$6,
+ extensions: extensions$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$6
+};
+
+var JSON5$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$8,
+ type: type$6,
+ extensions: extensions$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$6,
+ 'default': JSON5
+});
+
+var require$$0$1 = getCjsExportFromNamespace(JavaScript$1);
+
+var require$$1$1 = getCjsExportFromNamespace(JSX$1);
+
+var require$$2 = getCjsExportFromNamespace(TypeScript$1);
+
+var require$$3 = getCjsExportFromNamespace(TSX$1);
+
+var require$$4$1 = getCjsExportFromNamespace(_JSON$1);
+
+var require$$5 = getCjsExportFromNamespace(JSON_with_Comments$1);
+
+var require$$6 = getCjsExportFromNamespace(JSON5$1);
+
+const languages = [createLanguage(require$$0$1, data => ({
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript", "mongo"],
+ interpreters: data.interpreters.concat(["nodejs"])
+})), createLanguage(require$$0$1, () => ({
+ name: "Flow",
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript"],
+ aliases: [],
+ filenames: [],
+ extensions: [".js.flow"]
+})), createLanguage(require$$1$1, () => ({
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascriptreact"]
+})), createLanguage(require$$2, () => ({
+ since: "1.4.0",
+ parsers: ["typescript", "babel-ts"],
+ vscodeLanguageIds: ["typescript"]
+})), createLanguage(require$$3, () => ({
+ since: "1.4.0",
+ parsers: ["typescript", "babel-ts"],
+ vscodeLanguageIds: ["typescriptreact"]
+})), createLanguage(require$$4$1, () => ({
+ name: "JSON.stringify",
+ since: "1.13.0",
+ parsers: ["json-stringify"],
+ vscodeLanguageIds: ["json"],
+ extensions: [],
+ // .json file defaults to json instead of json-stringify
+ filenames: ["package.json", "package-lock.json", "composer.json"]
+})), createLanguage(require$$4$1, data => ({
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["json"],
+ filenames: data.filenames.concat([".prettierrc"])
+})), createLanguage(require$$5, data => ({
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["jsonc"],
+ filenames: data.filenames.concat([".eslintrc"])
+})), createLanguage(require$$6, () => ({
+ since: "1.13.0",
+ parsers: ["json5"],
+ vscodeLanguageIds: ["json5"]
+}))];
+const printers = {
+ estree: printerEstree,
+ "estree-json": printerEstreeJson
+};
+var languageJs = {
+ languages,
+ options: options$2,
+ printers
+};
+
+function clean$2(ast, newObj, parent) {
+ ["raw", // front-matter
+ "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(name => {
+ delete newObj[name];
+ });
+
+ if (ast.type === "yaml") {
+ delete newObj.value;
+ } // --insert-pragma
+
+
+ if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment
+ parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) {
+ /**
+ * something
+ *
+ * @format
+ */
+ delete newObj.text; // standalone pragma
+
+ if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) {
+ return null;
+ }
+ }
+
+ if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") {
+ delete newObj.value;
+ }
+
+ if (ast.type === "css-rule") {
+ delete newObj.params;
+ }
+
+ if (ast.type === "selector-combinator") {
+ newObj.value = newObj.value.replace(/\s+/g, " ");
+ }
+
+ if (ast.type === "media-feature") {
+ newObj.value = newObj.value.replace(/ /g, "");
+ }
+
+ if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].includes(newObj.value.replace().toLowerCase())) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") {
+ newObj.value = newObj.value.toLowerCase();
+ }
+
+ if (ast.type === "css-decl") {
+ newObj.prop = newObj.prop.toLowerCase();
+ }
+
+ if (ast.type === "css-atrule" || ast.type === "css-import") {
+ newObj.name = newObj.name.toLowerCase();
+ }
+
+ if (ast.type === "value-number") {
+ newObj.unit = newObj.unit.toLowerCase();
+ }
+
+ if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) {
+ newObj.value = cleanCSSStrings(newObj.value);
+ }
+
+ if (ast.type === "selector-attribute") {
+ newObj.attribute = newObj.attribute.trim();
+
+ if (newObj.namespace) {
+ if (typeof newObj.namespace === "string") {
+ newObj.namespace = newObj.namespace.trim();
+
+ if (newObj.namespace.length === 0) {
+ newObj.namespace = true;
+ }
+ }
+ }
+
+ if (newObj.value) {
+ newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, "");
+ delete newObj.quoted;
+ }
+ }
+
+ if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) {
+ newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, (match, numStr, unit) => {
+ const num = Number(numStr);
+ return isNaN(num) ? match : num + unit.toLowerCase();
+ });
+ }
+
+ if (ast.type === "selector-tag") {
+ const lowercasedValue = ast.value.toLowerCase();
+
+ if (["from", "to"].includes(lowercasedValue)) {
+ newObj.value = lowercasedValue;
+ }
+ } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func`
+
+
+ if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") {
+ delete newObj.value;
+ } // Workaround for SCSS nested properties
+
+
+ if (ast.type === "selector-unknown") {
+ delete newObj.value;
+ }
+}
+
+function cleanCSSStrings(value) {
+ return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1");
+}
+
+var clean_1$1 = clean$2;
+
+const {
+ builders: {
+ hardline: hardline$6,
+ literalline: literalline$3,
+ concat: concat$8,
+ markAsRoot: markAsRoot$1
+ },
+ utils: {
+ mapDoc: mapDoc$2
+ }
+} = document;
+
+function embed$1(path, print, textToDoc
+/*, options */
+) {
+ const node = path.getValue();
+
+ if (node.type === "yaml") {
+ return markAsRoot$1(concat$8(["---", hardline$6, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---", hardline$6]));
+ }
+
+ return null;
+
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$2(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$8(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$3)) : currentDoc);
+ }
+}
+
+var embed_1$1 = embed$1;
+
+const DELIMITER_MAP = {
+ "---": "yaml",
+ "+++": "toml"
+};
+
+function parse$5(text) {
+ const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
+ const match = text.match( // trailing spaces after delimiters are allowed
+ new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
+
+ if (match === null) {
+ return {
+ frontMatter: null,
+ content: text
+ };
+ }
+
+ const [raw, delimiter, value] = match;
+ return {
+ frontMatter: {
+ type: DELIMITER_MAP[delimiter],
+ value,
+ raw: raw.replace(/\n$/, "")
+ },
+ content: raw.replace(/[^\n]/g, " ") + text.slice(raw.length)
+ };
+}
+
+var frontMatter = parse$5;
+
+function hasPragma$1(text) {
+ return pragma.hasPragma(frontMatter(text).content);
+}
+
+function insertPragma$2(text) {
+ const {
+ frontMatter: frontMatter$1,
+ content
+ } = frontMatter(text);
+ return (frontMatter$1 ? frontMatter$1.raw + "\n\n" : "") + pragma.insertPragma(content);
+}
+
+var pragma$1 = {
+ hasPragma: hasPragma$1,
+ insertPragma: insertPragma$2
+};
+
+var lineColumnToIndex = function (lineColumn, text) {
+ let index = 0;
+
+ for (let i = 0; i < lineColumn.line - 1; ++i) {
+ index = text.indexOf("\n", index) + 1;
+
+ if (index === -1) {
+ return -1;
+ }
+ }
+
+ return index + lineColumn.column;
+};
+
+const {
+ getLast: getLast$3,
+ skipEverythingButNewLine: skipEverythingButNewLine$2
+} = util$1;
+
+function calculateLocStart(node, text) {
+ if (node.source) {
+ return lineColumnToIndex(node.source.start, text) - 1;
+ }
+
+ return null;
+}
+
+function calculateLocEnd(node, text) {
+ if (node.type === "css-comment" && node.inline) {
+ return skipEverythingButNewLine$2(text, node.source.startOffset);
+ }
+
+ const endNode = node.nodes && getLast$3(node.nodes);
+
+ if (endNode && node.source && !node.source.end) {
+ node = endNode;
+ }
+
+ if (node.source && node.source.end) {
+ return lineColumnToIndex(node.source.end, text);
+ }
+
+ return null;
+}
+
+function calculateLoc(node, text) {
+ if (node && typeof node === "object") {
+ if (node.source) {
+ node.source.startOffset = calculateLocStart(node, text);
+ node.source.endOffset = calculateLocEnd(node, text);
+ }
+
+ for (const key in node) {
+ calculateLoc(node[key], text);
+ }
+ }
+}
+/**
+ * Workaround for a bug: quotes in inline comments corrupt loc data of subsequent nodes.
+ * This function replaces the quotes with U+FFFE and U+FFFF. Later, when the comments are printed,
+ * their content is extracted from the original text or restored by replacing the placeholder
+ * characters back with quotes.
+ * - https://github.com/prettier/prettier/issues/7780
+ * - https://github.com/shellscape/postcss-less/issues/145
+ * - About noncharacters (U+FFFE and U+FFFF): http://www.unicode.org/faq/private_use.html#nonchar1
+ * @param text {string}
+ */
+
+
+function replaceQuotesInInlineComments(text) {
+ /** @typedef { 'initial' | 'single-quotes' | 'double-quotes' | 'url' | 'comment-block' | 'comment-inline' } State */
+
+ /** @type {State} */
+ let state = "initial";
+ /** @type {State} */
+
+ let stateToReturnFromQuotes = "initial";
+ let inlineCommentStartIndex;
+ let inlineCommentContainsQuotes = false;
+ const inlineCommentsToReplace = [];
+
+ for (let i = 0; i < text.length; i++) {
+ const c = text[i];
+
+ switch (state) {
+ case "initial":
+ if (c === "'") {
+ state = "single-quotes";
+ continue;
+ }
+
+ if (c === '"') {
+ state = "double-quotes";
+ continue;
+ }
+
+ if ((c === "u" || c === "U") && text.slice(i, i + 4).toLowerCase() === "url(") {
+ state = "url";
+ i += 3;
+ continue;
+ }
+
+ if (c === "*" && text[i - 1] === "/") {
+ state = "comment-block";
+ continue;
+ }
+
+ if (c === "/" && text[i - 1] === "/") {
+ state = "comment-inline";
+ inlineCommentStartIndex = i - 1;
+ continue;
+ }
+
+ continue;
+
+ case "single-quotes":
+ if (c === "'" && text[i - 1] !== "\\") {
+ state = stateToReturnFromQuotes;
+ stateToReturnFromQuotes = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ continue;
+
+ case "double-quotes":
+ if (c === '"' && text[i - 1] !== "\\") {
+ state = stateToReturnFromQuotes;
+ stateToReturnFromQuotes = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ continue;
+
+ case "url":
+ if (c === ")") {
+ state = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ if (c === "'") {
+ state = "single-quotes";
+ stateToReturnFromQuotes = "url";
+ continue;
+ }
+
+ if (c === '"') {
+ state = "double-quotes";
+ stateToReturnFromQuotes = "url";
+ continue;
+ }
+
+ continue;
+
+ case "comment-block":
+ if (c === "/" && text[i - 1] === "*") {
+ state = "initial";
+ }
+
+ continue;
+
+ case "comment-inline":
+ if (c === '"' || c === "'") {
+ inlineCommentContainsQuotes = true;
+ }
+
+ if (c === "\n" || c === "\r") {
+ if (inlineCommentContainsQuotes) {
+ inlineCommentsToReplace.push([inlineCommentStartIndex, i]);
+ }
+
+ state = "initial";
+ inlineCommentContainsQuotes = false;
+ }
+
+ continue;
+ }
+ }
+
+ for (const [start, end] of inlineCommentsToReplace) {
+ text = text.slice(0, start) + text.slice(start, end).replace(/'/g, "\ufffe").replace(/"/g, "\uffff") + text.slice(end);
+ }
+
+ return text;
+}
+
+function restoreQuotesInInlineComments(text) {
+ return text.replace(/\ufffe/g, "'").replace(/\uffff/g, '"');
+}
+
+var loc$1 = {
+ calculateLoc,
+ replaceQuotesInInlineComments,
+ restoreQuotesInInlineComments
+};
+
+const colorAdjusterFunctions = ["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 getAncestorCounter(path, typeOrTypes) {
+ const types = [].concat(typeOrTypes);
+ let counter = -1;
+ let ancestorNode;
+
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.includes(ancestorNode.type)) {
+ return counter;
+ }
+ }
+
+ return -1;
+}
+
+function getAncestorNode(path, typeOrTypes) {
+ const counter = getAncestorCounter(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+}
+
+function getPropOfDeclNode(path) {
+ const declAncestorNode = getAncestorNode(path, "css-decl");
+ return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase();
+}
+
+function isSCSS(parser, text) {
+ const hasExplicitParserChoice = parser === "less" || parser === "scss";
+ const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
+ return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
+}
+
+function isWideKeywords(value) {
+ return ["initial", "inherit", "unset", "revert"].includes(value.toLowerCase());
+}
+
+function isKeyframeAtRuleKeywords(path, value) {
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(value.toLowerCase());
+}
+
+function maybeToLowerCase(value) {
+ return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase();
+}
+
+function insideValueFunctionNode(path, functionName) {
+ const funcAncestorNode = getAncestorNode(path, "value-func");
+ return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName;
+}
+
+function insideICSSRuleNode(path) {
+ const ruleAncestorNode = getAncestorNode(path, "css-rule");
+ return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export"));
+}
+
+function insideAtRuleNode(path, atRuleNameOrAtRuleNames) {
+ const atRuleNames = [].concat(atRuleNameOrAtRuleNames);
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleNames.includes(atRuleAncestorNode.name.toLowerCase());
+}
+
+function insideURLFunctionInImportAtRuleNode(path) {
+ const node = path.getValue();
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2;
+}
+
+function isURLFunctionNode(node) {
+ return node.type === "value-func" && node.value.toLowerCase() === "url";
+}
+
+function isLastNode(path, node) {
+ const parentNode = path.getParentNode();
+
+ if (!parentNode) {
+ return false;
+ }
+
+ const {
+ nodes
+ } = parentNode;
+ return nodes && nodes.indexOf(node) === nodes.length - 1;
+}
+
+function isDetachedRulesetDeclarationNode(node) {
+ // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as atrules with names ending
+ // with a colon, so keep the original case then.
+ if (!node.selector) {
+ return false;
+ }
+
+ return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value);
+}
+
+function isForKeywordNode(node) {
+ return node.type === "value-word" && ["from", "through", "end"].includes(node.value);
+}
+
+function isIfElseKeywordNode(node) {
+ return node.type === "value-word" && ["and", "or", "not"].includes(node.value);
+}
+
+function isEachKeywordNode(node) {
+ return node.type === "value-word" && node.value === "in";
+}
+
+function isMultiplicationNode(node) {
+ return node.type === "value-operator" && node.value === "*";
+}
+
+function isDivisionNode(node) {
+ return node.type === "value-operator" && node.value === "/";
+}
+
+function isAdditionNode(node) {
+ return node.type === "value-operator" && node.value === "+";
+}
+
+function isSubtractionNode(node) {
+ return node.type === "value-operator" && node.value === "-";
+}
+
+function isModuloNode(node) {
+ return node.type === "value-operator" && node.value === "%";
+}
+
+function isMathOperatorNode(node) {
+ return isMultiplicationNode(node) || isDivisionNode(node) || isAdditionNode(node) || isSubtractionNode(node) || isModuloNode(node);
+}
+
+function isEqualityOperatorNode(node) {
+ return node.type === "value-word" && ["==", "!="].includes(node.value);
+}
+
+function isRelationalOperatorNode(node) {
+ return node.type === "value-word" && ["<", ">", "<=", ">="].includes(node.value);
+}
+
+function isSCSSControlDirectiveNode(node) {
+ return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].includes(node.name);
+}
+
+function isSCSSNestedPropertyNode(node) {
+ if (!node.selector) {
+ return false;
+ }
+
+ return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":");
+}
+
+function isDetachedRulesetCallNode(node) {
+ return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params);
+}
+
+function isTemplatePlaceholderNode(node) {
+ return node.name.startsWith("prettier-placeholder");
+}
+
+function isTemplatePropNode(node) {
+ return node.prop.startsWith("@prettier-placeholder");
+}
+
+function isPostcssSimpleVarNode(currentNode, nextNode) {
+ return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before;
+}
+
+function hasComposesNode(node) {
+ return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes";
+}
+
+function hasParensAroundNode(node) {
+ return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null;
+}
+
+function hasEmptyRawBefore(node) {
+ return node.raws && node.raws.before === "";
+}
+
+function isKeyValuePairNode(node) {
+ return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon";
+}
+
+function isKeyValuePairInParenGroupNode(node) {
+ return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode(node.groups[0]);
+}
+
+function isSCSSMapItemNode(path) {
+ const node = path.getValue(); // Ignore empty item (i.e. `$key: ()`)
+
+ if (node.groups.length === 0) {
+ return false;
+ }
+
+ const parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`)
+
+ if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) {
+ return false;
+ }
+
+ const declNode = getAncestorNode(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`)
+
+ if (declNode && declNode.prop && declNode.prop.startsWith("$")) {
+ return true;
+ } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`)
+
+
+ if (isKeyValuePairInParenGroupNode(parentParentNode)) {
+ return true;
+ } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`)
+
+
+ if (parentParentNode.type === "value-func") {
+ return true;
+ }
+
+ return false;
+}
+
+function isInlineValueCommentNode(node) {
+ return node.type === "value-comment" && node.inline;
+}
+
+function isHashNode(node) {
+ return node.type === "value-word" && node.value === "#";
+}
+
+function isLeftCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "{";
+}
+
+function isRightCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "}";
+}
+
+function isWordNode(node) {
+ return ["value-word", "value-atword"].includes(node.type);
+}
+
+function isColonNode(node) {
+ return node.type === "value-colon";
+}
+
+function isMediaAndSupportsKeywords(node) {
+ return node.value && ["not", "and", "or"].includes(node.value.toLowerCase());
+}
+
+function isColorAdjusterFuncNode(node) {
+ if (node.type !== "value-func") {
+ return false;
+ }
+
+ return colorAdjusterFunctions.includes(node.value.toLowerCase());
+} // TODO: only check `less` when we don't use `less` to parse `css`
+
+
+function isLessParser(options) {
+ return options.parser === "css" || options.parser === "less";
+}
+
+function lastLineHasInlineComment(text) {
+ return /\/\//.test(text.split(/[\r\n]/).pop());
+}
+
+var utils$7 = {
+ getAncestorCounter,
+ getAncestorNode,
+ getPropOfDeclNode,
+ maybeToLowerCase,
+ insideValueFunctionNode,
+ insideICSSRuleNode,
+ insideAtRuleNode,
+ insideURLFunctionInImportAtRuleNode,
+ isKeyframeAtRuleKeywords,
+ isWideKeywords,
+ isSCSS,
+ isLastNode,
+ isLessParser,
+ isSCSSControlDirectiveNode,
+ isDetachedRulesetDeclarationNode,
+ isRelationalOperatorNode,
+ isEqualityOperatorNode,
+ isMultiplicationNode,
+ isDivisionNode,
+ isAdditionNode,
+ isSubtractionNode,
+ isModuloNode,
+ isMathOperatorNode,
+ isEachKeywordNode,
+ isForKeywordNode,
+ isURLFunctionNode,
+ isIfElseKeywordNode,
+ hasComposesNode,
+ hasParensAroundNode,
+ hasEmptyRawBefore,
+ isSCSSNestedPropertyNode,
+ isDetachedRulesetCallNode,
+ isTemplatePlaceholderNode,
+ isTemplatePropNode,
+ isPostcssSimpleVarNode,
+ isKeyValuePairNode,
+ isKeyValuePairInParenGroupNode,
+ isSCSSMapItemNode,
+ isInlineValueCommentNode,
+ isHashNode,
+ isLeftCurlyBraceNode,
+ isRightCurlyBraceNode,
+ isWordNode,
+ isColonNode,
+ isMediaAndSupportsKeywords,
+ isColorAdjusterFuncNode,
+ lastLineHasInlineComment
+};
+
+const {
+ insertPragma: insertPragma$3
+} = pragma$1;
+const {
+ printNumber: printNumber$2,
+ printString: printString$2,
+ hasIgnoreComment: hasIgnoreComment$3,
+ hasNewline: hasNewline$5
+} = util$1;
+const {
+ isNextLineEmpty: isNextLineEmpty$3
+} = utilShared;
+const {
+ restoreQuotesInInlineComments: restoreQuotesInInlineComments$1
+} = loc$1;
+const {
+ builders: {
+ concat: concat$9,
+ join: join$6,
+ line: line$5,
+ hardline: hardline$7,
+ softline: softline$3,
+ group: group$6,
+ fill: fill$4,
+ indent: indent$5,
+ dedent: dedent$2,
+ ifBreak: ifBreak$2
+ },
+ utils: {
+ removeLines: removeLines$2
+ }
+} = document;
+const {
+ getAncestorNode: getAncestorNode$1,
+ getPropOfDeclNode: getPropOfDeclNode$1,
+ maybeToLowerCase: maybeToLowerCase$1,
+ insideValueFunctionNode: insideValueFunctionNode$1,
+ insideICSSRuleNode: insideICSSRuleNode$1,
+ insideAtRuleNode: insideAtRuleNode$1,
+ insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1,
+ isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1,
+ isWideKeywords: isWideKeywords$1,
+ isSCSS: isSCSS$1,
+ isLastNode: isLastNode$1,
+ isLessParser: isLessParser$1,
+ isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1,
+ isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1,
+ isRelationalOperatorNode: isRelationalOperatorNode$1,
+ isEqualityOperatorNode: isEqualityOperatorNode$1,
+ isMultiplicationNode: isMultiplicationNode$1,
+ isDivisionNode: isDivisionNode$1,
+ isAdditionNode: isAdditionNode$1,
+ isSubtractionNode: isSubtractionNode$1,
+ isMathOperatorNode: isMathOperatorNode$1,
+ isEachKeywordNode: isEachKeywordNode$1,
+ isForKeywordNode: isForKeywordNode$1,
+ isURLFunctionNode: isURLFunctionNode$1,
+ isIfElseKeywordNode: isIfElseKeywordNode$1,
+ hasComposesNode: hasComposesNode$1,
+ hasParensAroundNode: hasParensAroundNode$1,
+ hasEmptyRawBefore: hasEmptyRawBefore$1,
+ isKeyValuePairNode: isKeyValuePairNode$1,
+ isDetachedRulesetCallNode: isDetachedRulesetCallNode$1,
+ isTemplatePlaceholderNode: isTemplatePlaceholderNode$1,
+ isTemplatePropNode: isTemplatePropNode$1,
+ isPostcssSimpleVarNode: isPostcssSimpleVarNode$1,
+ isSCSSMapItemNode: isSCSSMapItemNode$1,
+ isInlineValueCommentNode: isInlineValueCommentNode$1,
+ isHashNode: isHashNode$1,
+ isLeftCurlyBraceNode: isLeftCurlyBraceNode$1,
+ isRightCurlyBraceNode: isRightCurlyBraceNode$1,
+ isWordNode: isWordNode$1,
+ isColonNode: isColonNode$1,
+ isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1,
+ isColorAdjusterFuncNode: isColorAdjusterFuncNode$1,
+ lastLineHasInlineComment: lastLineHasInlineComment$1
+} = utils$7;
+
+function shouldPrintComma$1(options) {
+ switch (options.trailingComma) {
+ case "all":
+ case "es5":
+ return true;
+
+ case "none":
+ default:
+ return false;
+ }
+}
+
+function genericPrint$2(path, options, print) {
+ const node = path.getValue();
+ /* istanbul ignore if */
+
+ if (!node) {
+ return "";
+ }
+
+ if (typeof node === "string") {
+ return node;
+ }
+
+ switch (node.type) {
+ case "yaml":
+ case "toml":
+ return concat$9([node.raw, hardline$7]);
+
+ case "css-root":
+ {
+ const nodes = printNodeSequence(path, options, print);
+
+ if (nodes.parts.length) {
+ return concat$9([nodes, options.__isHTMLStyleAttribute ? "" : hardline$7]);
+ }
+
+ return nodes;
+ }
+
+ case "css-comment":
+ {
+ const isInlineComment = node.inline || node.raws.inline;
+ const text = options.originalText.slice(options.locStart(node), options.locEnd(node));
+ return isInlineComment ? text.trimEnd() : text;
+ }
+
+ case "css-rule":
+ {
+ return concat$9([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$9([node.selector && node.selector.type === "selector-unknown" && lastLineHasInlineComment$1(node.selector.value) ? line$5 : " ", "{", node.nodes.length > 0 ? indent$5(concat$9([hardline$7, printNodeSequence(path, options, print)])) : "", hardline$7, "}", isDetachedRulesetDeclarationNode$1(node) ? ";" : ""]) : ";"]);
+ }
+
+ case "css-decl":
+ {
+ const parentNode = path.getParentNode();
+ return concat$9([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode$1(path) ? node.prop : maybeToLowerCase$1(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode$1(node) ? removeLines$2(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$9([" {", indent$5(concat$9([softline$3, printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePropNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
+ }
+
+ case "css-atrule":
+ {
+ const parentNode = path.getParentNode();
+ const isTemplatePlaceholderNodeWithoutSemiColon = isTemplatePlaceholderNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";";
+
+ if (isLessParser$1(options)) {
+ if (node.mixin) {
+ return concat$9([path.call(print, "selector"), node.important ? " !important" : "", isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+
+ if (node.function) {
+ return concat$9([node.name, concat$9([path.call(print, "params")]), isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+
+ if (node.variable) {
+ return concat$9(["@", node.name, ": ", node.value ? concat$9([path.call(print, "value")]) : "", node.raws.between.trim() ? node.raws.between.trim() + " " : "", node.nodes ? concat$9(["{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : "", isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+ }
+
+ return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as at-rules with names ending
+ // with a colon, so keep the original case then.
+ isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) ? node.raws.afterName === "" ? "" : node.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$9([hardline$7, hardline$7]) : /^\s*\n/.test(node.raws.afterName) ? hardline$7 : " " : " ", path.call(print, "params")]) : "", node.selector ? indent$5(concat$9([" ", path.call(print, "selector")])) : "", node.value ? group$6(concat$9([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$9([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+ // postcss-media-query-parser
+
+ case "media-query-list":
+ {
+ const parts = [];
+ path.each(childPath => {
+ const node = childPath.getValue();
+
+ if (node.type === "media-query" && node.value === "") {
+ return;
+ }
+
+ parts.push(childPath.call(print));
+ }, "nodes");
+ return group$6(indent$5(join$6(line$5, parts)));
+ }
+
+ case "media-query":
+ {
+ return concat$9([join$6(" ", path.map(print, "nodes")), isLastNode$1(path, node) ? "" : ","]);
+ }
+
+ case "media-type":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
+
+ case "media-feature-expression":
+ {
+ if (!node.nodes) {
+ return node.value;
+ }
+
+ return concat$9(["(", concat$9(path.map(print, "nodes")), ")"]);
+ }
+
+ case "media-feature":
+ {
+ return maybeToLowerCase$1(adjustStrings(node.value.replace(/ +/g, " "), options));
+ }
+
+ case "media-colon":
+ {
+ return concat$9([node.value, " "]);
+ }
+
+ case "media-value":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
+
+ case "media-keyword":
+ {
+ return adjustStrings(node.value, options);
+ }
+
+ case "media-url":
+ {
+ return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options);
+ }
+
+ case "media-unknown":
+ {
+ return node.value;
+ }
+ // postcss-selector-parser
+
+ case "selector-root":
+ {
+ return group$6(concat$9([insideAtRuleNode$1(path, "custom-selector") ? concat$9([getAncestorNode$1(path, "css-atrule").customSelector, line$5]) : "", join$6(concat$9([",", insideAtRuleNode$1(path, ["extend", "custom-selector", "nest"]) ? line$5 : hardline$7]), path.map(print, "nodes"))]));
+ }
+
+ case "selector-selector":
+ {
+ return group$6(indent$5(concat$9(path.map(print, "nodes"))));
+ }
+
+ case "selector-comment":
+ {
+ return node.value;
+ }
+
+ case "selector-string":
+ {
+ return adjustStrings(node.value, options);
+ }
+
+ case "selector-tag":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode && parentNode.nodes.indexOf(node);
+ const prevNode = index && parentNode.nodes[index - 1];
+ return concat$9([node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isKeyframeAtRuleKeywords$1(path, node.value) ? node.value.toLowerCase() : node.value)]);
+ }
+
+ case "selector-id":
+ {
+ return concat$9(["#", node.value]);
+ }
+
+ case "selector-class":
+ {
+ return concat$9([".", adjustNumbers(adjustStrings(node.value, options))]);
+ }
+
+ case "selector-attribute":
+ {
+ return concat$9(["[", node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]);
+ }
+
+ case "selector-combinator":
+ {
+ if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") {
+ const parentNode = path.getParentNode();
+ const leading = parentNode.type === "selector-selector" && parentNode.nodes[0] === node ? "" : line$5;
+ return concat$9([leading, node.value, isLastNode$1(path, node) ? "" : " "]);
+ }
+
+ const leading = node.value.trim().startsWith("(") ? line$5 : "";
+ const value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$5;
+ return concat$9([leading, value]);
+ }
+
+ case "selector-universal":
+ {
+ return concat$9([node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]);
+ }
+
+ case "selector-pseudo":
+ {
+ return concat$9([maybeToLowerCase$1(node.value), node.nodes && node.nodes.length > 0 ? concat$9(["(", join$6(", ", path.map(print, "nodes")), ")"]) : ""]);
+ }
+
+ case "selector-nesting":
+ {
+ return node.value;
+ }
+
+ case "selector-unknown":
+ {
+ const ruleAncestorNode = getAncestorNode$1(path, "css-rule"); // Nested SCSS property
+
+ if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) {
+ return adjustNumbers(adjustStrings(maybeToLowerCase$1(node.value), options));
+ } // originalText has to be used for Less, see replaceQuotesInInlineComments in loc.js
+
+
+ const parentNode = path.getParentNode();
+
+ if (parentNode.raws && parentNode.raws.selector) {
+ const start = options.locStart(parentNode);
+ const end = start + parentNode.raws.selector.length;
+ return options.originalText.slice(start, end).trim();
+ }
+
+ return node.value;
+ }
+ // postcss-values-parser
+
+ case "value-value":
+ case "value-root":
+ {
+ return path.call(print, "group");
+ }
+
+ case "value-comment":
+ {
+ return concat$9([node.inline ? "//" : "/*", // see replaceQuotesInInlineComments in loc.js
+ // value-* nodes don't have correct location data, so we have to rely on placeholder characters.
+ restoreQuotesInInlineComments$1(node.value), node.inline ? "" : "*/"]);
+ }
+
+ case "value-comma_group":
+ {
+ const parentNode = path.getParentNode();
+ const parentParentNode = path.getParentNode(1);
+ const declAncestorProp = getPropOfDeclNode$1(path);
+ const isGridValue = declAncestorProp && parentNode.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template"));
+ const atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
+ const isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode$1(atRuleAncestorNode);
+ const printed = path.map(print, "groups");
+ const parts = [];
+ const insideURLFunction = insideValueFunctionNode$1(path, "url");
+ let insideSCSSInterpolationInString = false;
+ let didBreak = false;
+
+ for (let i = 0; i < node.groups.length; ++i) {
+ parts.push(printed[i]);
+ const iPrevNode = node.groups[i - 1];
+ const iNode = node.groups[i];
+ const iNextNode = node.groups[i + 1];
+ const iNextNextNode = node.groups[i + 2];
+
+ if (insideURLFunction) {
+ if (iNextNode && isAdditionNode$1(iNextNode) || isAdditionNode$1(iNode)) {
+ parts.push(" ");
+ }
+
+ continue;
+ } // Ignore after latest node (i.e. before semicolon)
+
+
+ if (!iNextNode) {
+ continue;
+ } // styled.div` background: var(--${one}); `
+
+
+ if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
+ continue;
+ } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
+
+
+ const isStartSCSSInterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{");
+ const isEndingSCSSInterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}");
+
+ if (isStartSCSSInterpolationInString || isEndingSCSSInterpolationInString) {
+ insideSCSSInterpolationInString = !insideSCSSInterpolationInString;
+ continue;
+ }
+
+ if (insideSCSSInterpolationInString) {
+ continue;
+ } // Ignore colon (i.e. `:`)
+
+
+ if (isColonNode$1(iNode) || isColonNode$1(iNextNode)) {
+ continue;
+ } // Ignore `@` in Less (i.e. `@@var;`)
+
+
+ if (iNode.type === "value-atword" && iNode.value === "") {
+ continue;
+ } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`)
+
+
+ if (iNode.value === "~") {
+ continue;
+ } // Ignore escape `\`
+
+
+ if (iNode.value && iNode.value.includes("\\") && iNextNode && iNextNode.type !== "value-comment") {
+ continue;
+ } // Ignore escaped `/`
+
+
+ if (iPrevNode && iPrevNode.value && iPrevNode.value.indexOf("\\") === iPrevNode.value.length - 1 && iNode.type === "value-operator" && iNode.value === "/") {
+ continue;
+ } // Ignore `\` (i.e. `$variable: \@small;`)
+
+
+ if (iNode.value === "\\") {
+ continue;
+ } // Ignore `$$` (i.e. `background-color: $$(style)Color;`)
+
+
+ if (isPostcssSimpleVarNode$1(iNode, iNextNode)) {
+ continue;
+ } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`)
+
+
+ if (isHashNode$1(iNode) || isLeftCurlyBraceNode$1(iNode) || isRightCurlyBraceNode$1(iNextNode) || isLeftCurlyBraceNode$1(iNextNode) && hasEmptyRawBefore$1(iNextNode) || isRightCurlyBraceNode$1(iNode) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`)
+
+
+ if (iNode.value === "--" && isHashNode$1(iNextNode)) {
+ continue;
+ } // Formatting math operations
+
+
+ const isMathOperator = isMathOperatorNode$1(iNode);
+ const isNextMathOperator = isMathOperatorNode$1(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is
+ // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`)
+ // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`)
+
+ if ((isMathOperator && isHashNode$1(iNextNode) || isNextMathOperator && isRightCurlyBraceNode$1(iNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces before and after addition and subtraction math operators as is in `calc` function
+ // due to the fact that it is not valid syntax
+ // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`)
+
+
+ if (insideValueFunctionNode$1(path, "calc") && (isAdditionNode$1(iNode) || isAdditionNode$1(iNextNode) || isSubtractionNode$1(iNode) || isSubtractionNode$1(iNextNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`)
+ // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is.
+
+
+ const isColorAdjusterNode = (isAdditionNode$1(iNode) || isSubtractionNode$1(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode$1(parentParentNode) && !hasEmptyRawBefore$1(iNextNode);
+ const requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode$1(iNextNextNode) || iNode.type === "value-func" || isWordNode$1(iNode);
+ const requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode$1(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode$1(iPrevNode); // Formatting `/`, `+`, `-` sign
+
+ if (!(isMultiplicationNode$1(iNextNode) || isMultiplicationNode$1(iNode)) && !insideValueFunctionNode$1(path, "calc") && !isColorAdjusterNode && (isDivisionNode$1(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode$1(iNode) && !requireSpaceAfterOperator || isAdditionNode$1(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode$1(iNode) && !requireSpaceAfterOperator || isSubtractionNode$1(iNextNode) || isSubtractionNode$1(iNode)) && (hasEmptyRawBefore$1(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode$1(iPrevNode)))) {
+ continue;
+ } // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`)
+
+
+ if (isInlineValueCommentNode$1(iNode)) {
+ parts.push(hardline$7);
+ continue;
+ } // Handle keywords in SCSS control directive
+
+
+ if (isControlDirective && (isEqualityOperatorNode$1(iNextNode) || isRelationalOperatorNode$1(iNextNode) || isIfElseKeywordNode$1(iNextNode) || isEachKeywordNode$1(iNode) || isForKeywordNode$1(iNode))) {
+ parts.push(" ");
+ continue;
+ } // At-rule `namespace` should be in one line
+
+
+ if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") {
+ parts.push(" ");
+ continue;
+ } // Formatting `grid` property
+
+
+ if (isGridValue) {
+ if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) {
+ parts.push(hardline$7);
+ didBreak = true;
+ } else {
+ parts.push(" ");
+ }
+
+ continue;
+ } // Add `space` before next math operation
+ // Note: `grip` property have `/` delimiter and it is not math operation, so
+ // `grid` property handles above
+
+
+ if (isNextMathOperator) {
+ parts.push(" ");
+ continue;
+ } // Be default all values go through `line`
+
+
+ parts.push(line$5);
+ }
+
+ if (didBreak) {
+ parts.unshift(hardline$7);
+ }
+
+ if (isControlDirective) {
+ return group$6(indent$5(concat$9(parts)));
+ } // Indent is not needed for import url when url is very long
+ // and node has two groups
+ // when type is value-comma_group
+ // example @import url("verylongurl") projection,tv
+
+
+ if (insideURLFunctionInImportAtRuleNode$1(path)) {
+ return group$6(fill$4(parts));
+ }
+
+ return group$6(indent$5(fill$4(parts)));
+ }
+
+ case "value-paren_group":
+ {
+ const parentNode = path.getParentNode();
+
+ if (parentNode && isURLFunctionNode$1(parentNode) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
+ return concat$9([node.open ? path.call(print, "open") : "", join$6(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]);
+ }
+
+ if (!node.open) {
+ const printed = path.map(print, "groups");
+ const res = [];
+
+ for (let i = 0; i < printed.length; i++) {
+ if (i !== 0) {
+ res.push(concat$9([",", line$5]));
+ }
+
+ res.push(printed[i]);
+ }
+
+ return group$6(indent$5(fill$4(res)));
+ }
+
+ const isSCSSMapItem = isSCSSMapItemNode$1(path);
+ const lastItem = node.groups[node.groups.length - 1];
+ const isLastItemComment = lastItem && lastItem.type === "value-comment";
+ return group$6(concat$9([node.open ? path.call(print, "open") : "", indent$5(concat$9([softline$3, join$6(concat$9([",", line$5]), path.map(childPath => {
+ const node = childPath.getValue();
+ const printed = print(childPath); // Key/Value pair in open paren already indented
+
+ if (isKeyValuePairNode$1(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") {
+ printed.contents.contents.parts[1] = group$6(printed.contents.contents.parts[1]);
+ return group$6(dedent$2(printed));
+ }
+
+ return printed;
+ }, "groups"))])), ifBreak$2(!isLastItemComment && isSCSS$1(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma$1(options) ? "," : ""), softline$3, node.close ? path.call(print, "close") : ""]), {
+ shouldBreak: isSCSSMapItem
+ });
+ }
+
+ case "value-func":
+ {
+ return concat$9([node.value, insideAtRuleNode$1(path, "supports") && isMediaAndSupportsKeywords$1(node) ? " " : "", path.call(print, "group")]);
+ }
+
+ case "value-paren":
+ {
+ return node.value;
+ }
+
+ case "value-number":
+ {
+ return concat$9([printCssNumber(node.value), maybeToLowerCase$1(node.unit)]);
+ }
+
+ case "value-operator":
+ {
+ return node.value;
+ }
+
+ case "value-word":
+ {
+ if (node.isColor && node.isHex || isWideKeywords$1(node.value)) {
+ return node.value.toLowerCase();
+ }
+
+ return node.value;
+ }
+
+ case "value-colon":
+ {
+ return concat$9([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`)
+ insideValueFunctionNode$1(path, "url") ? "" : line$5]);
+ }
+
+ case "value-comma":
+ {
+ return concat$9([node.value, " "]);
+ }
+
+ case "value-string":
+ {
+ return printString$2(node.raws.quote + node.value + node.raws.quote, options);
+ }
+
+ case "value-atword":
+ {
+ return concat$9(["@", node.value]);
+ }
+
+ case "value-unicode-range":
+ {
+ return node.value;
+ }
+
+ case "value-unknown":
+ {
+ return node.value;
+ }
+
+ default:
+ /* istanbul ignore next */
+ throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`);
+ }
+}
+
+function printNodeSequence(path, options, print) {
+ const node = path.getValue();
+ const parts = [];
+ let i = 0;
+ path.map(pathChild => {
+ const prevNode = node.nodes[i - 1];
+
+ if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") {
+ const childNode = pathChild.getValue();
+ parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode)));
+ } else {
+ parts.push(pathChild.call(print));
+ }
+
+ if (i !== node.nodes.length - 1) {
+ if (node.nodes[i + 1].type === "css-comment" && !hasNewline$5(options.originalText, options.locStart(node.nodes[i + 1]), {
+ backwards: true
+ }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") {
+ parts.push(" ");
+ } else {
+ parts.push(options.__isHTMLStyleAttribute ? line$5 : hardline$7);
+
+ if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options.locEnd) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") {
+ parts.push(hardline$7);
+ }
+ }
+ }
+
+ i++;
+ }, "nodes");
+ return concat$9(parts);
+}
+
+const STRING_REGEX$3 = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;
+const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;
+const STANDARD_UNIT_REGEX = /[a-zA-Z]+/g;
+const WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g;
+const ADJUST_NUMBERS_REGEX = new RegExp(STRING_REGEX$3.source + "|" + `(${WORD_PART_REGEX.source})?` + `(${NUMBER_REGEX.source})` + `(${STANDARD_UNIT_REGEX.source})?`, "g");
+
+function adjustStrings(value, options) {
+ return value.replace(STRING_REGEX$3, match => printString$2(match, options));
+}
+
+function quoteAttributeValue(value, options) {
+ const quote = options.singleQuote ? "'" : '"';
+ return value.includes('"') || value.includes("'") ? value : quote + value + quote;
+}
+
+function adjustNumbers(value) {
+ return value.replace(ADJUST_NUMBERS_REGEX, (match, quote, wordPart, number, unit) => !wordPart && number ? printCssNumber(number) + maybeToLowerCase$1(unit || "") : match);
+}
+
+function printCssNumber(rawNumber) {
+ return printNumber$2(rawNumber) // Remove trailing `.0`.
+ .replace(/\.0(?=$|e)/, "");
+}
+
+var printerPostcss = {
+ print: genericPrint$2,
+ embed: embed_1$1,
+ insertPragma: insertPragma$3,
+ hasPrettierIgnore: hasIgnoreComment$3,
+ massageAstNode: clean_1$1
+};
+
+var options$3 = {
+ singleQuote: commonOptions.singleQuote
+};
+
+var name$9 = "CSS";
+var type$7 = "markup";
+var tmScope$7 = "source.css";
+var aceMode$7 = "css";
+var codemirrorMode$7 = "css";
+var codemirrorMimeType$7 = "text/css";
+var color$2 = "#563d7c";
+var extensions$7 = [
+ ".css"
+];
+var languageId$7 = 50;
+var CSS = {
+ name: name$9,
+ type: type$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ color: color$2,
+ extensions: extensions$7,
+ languageId: languageId$7
+};
+
+var CSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$9,
+ type: type$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ color: color$2,
+ extensions: extensions$7,
+ languageId: languageId$7,
+ 'default': CSS
+});
+
+var name$a = "PostCSS";
+var type$8 = "markup";
+var tmScope$8 = "source.postcss";
+var group$7 = "CSS";
+var extensions$8 = [
+ ".pcss",
+ ".postcss"
+];
+var aceMode$8 = "text";
+var languageId$8 = 262764437;
+var PostCSS = {
+ name: name$a,
+ type: type$8,
+ tmScope: tmScope$8,
+ group: group$7,
+ extensions: extensions$8,
+ aceMode: aceMode$8,
+ languageId: languageId$8
+};
+
+var PostCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$a,
+ type: type$8,
+ tmScope: tmScope$8,
+ group: group$7,
+ extensions: extensions$8,
+ aceMode: aceMode$8,
+ languageId: languageId$8,
+ 'default': PostCSS
+});
+
+var name$b = "Less";
+var type$9 = "markup";
+var group$8 = "CSS";
+var extensions$9 = [
+ ".less"
+];
+var tmScope$9 = "source.css.less";
+var aceMode$9 = "less";
+var codemirrorMode$8 = "css";
+var codemirrorMimeType$8 = "text/css";
+var languageId$9 = 198;
+var Less = {
+ name: name$b,
+ type: type$9,
+ group: group$8,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ languageId: languageId$9
+};
+
+var Less$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$b,
+ type: type$9,
+ group: group$8,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ languageId: languageId$9,
+ 'default': Less
+});
+
+var name$c = "SCSS";
+var type$a = "markup";
+var tmScope$a = "source.css.scss";
+var group$9 = "CSS";
+var aceMode$a = "scss";
+var codemirrorMode$9 = "css";
+var codemirrorMimeType$9 = "text/x-scss";
+var extensions$a = [
+ ".scss"
+];
+var languageId$a = 329;
+var SCSS = {
+ name: name$c,
+ type: type$a,
+ tmScope: tmScope$a,
+ group: group$9,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ extensions: extensions$a,
+ languageId: languageId$a
+};
+
+var SCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$c,
+ type: type$a,
+ tmScope: tmScope$a,
+ group: group$9,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ extensions: extensions$a,
+ languageId: languageId$a,
+ 'default': SCSS
+});
+
+var require$$0$2 = getCjsExportFromNamespace(CSS$1);
+
+var require$$1$2 = getCjsExportFromNamespace(PostCSS$1);
+
+var require$$2$1 = getCjsExportFromNamespace(Less$1);
+
+var require$$3$1 = getCjsExportFromNamespace(SCSS$1);
+
+const languages$1 = [createLanguage(require$$0$2, () => ({
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["css"]
+})), createLanguage(require$$1$2, () => ({
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["postcss"]
+})), createLanguage(require$$2$1, () => ({
+ since: "1.4.0",
+ parsers: ["less"],
+ vscodeLanguageIds: ["less"]
+})), createLanguage(require$$3$1, () => ({
+ since: "1.4.0",
+ parsers: ["scss"],
+ vscodeLanguageIds: ["scss"]
+}))];
+const printers$1 = {
+ postcss: printerPostcss
+};
+var languageCss = {
+ languages: languages$1,
+ options: options$3,
+ printers: printers$1
+};
+
+var clean$3 = function (ast, newNode) {
+ delete newNode.loc;
+ delete newNode.selfClosing; // (Glimmer/HTML) ignore TextNode whitespace
+
+ if (ast.type === "TextNode") {
+ const trimmed = ast.chars.trim();
+
+ if (!trimmed) {
+ return null;
+ }
+
+ newNode.chars = trimmed;
+ }
+};
+
+function isUppercase(string) {
+ return string.toUpperCase() === string;
+}
+
+function isGlimmerComponent(node) {
+ return isNodeOfSomeType(node, ["ElementNode"]) && typeof node.tag === "string" && (isUppercase(node.tag[0]) || node.tag.includes("."));
+}
+
+function isWhitespaceNode(node) {
+ return isNodeOfSomeType(node, ["TextNode"]) && !/\S/.test(node.chars);
+}
+
+function isNodeOfSomeType(node, types) {
+ return node && types.some(type => node.type === type);
+}
+
+function isParentOfSomeType(path, types) {
+ const parentNode = path.getParentNode(0);
+ return isNodeOfSomeType(parentNode, types);
+}
+
+function isPreviousNodeOfSomeType(path, types) {
+ const previousNode = getPreviousNode(path);
+ return isNodeOfSomeType(previousNode, types);
+}
+
+function isNextNodeOfSomeType(path, types) {
+ const nextNode = getNextNode(path);
+ return isNodeOfSomeType(nextNode, types);
+}
+
+function getSiblingNode(path, offset) {
+ const node = path.getValue();
+ const parentNode = path.getParentNode(0) || {};
+ const children = parentNode.children || parentNode.body || [];
+ const index = children.indexOf(node);
+ return index !== -1 && children[index + offset];
+}
+
+function getPreviousNode(path, lookBack = 1) {
+ return getSiblingNode(path, -lookBack);
+}
+
+function getNextNode(path) {
+ return getSiblingNode(path, 1);
+}
+
+function isPrettierIgnoreNode(node) {
+ return isNodeOfSomeType(node, ["MustacheCommentStatement"]) && typeof node.value === "string" && node.value.trim() === "prettier-ignore";
+}
+
+function hasPrettierIgnore$2(path) {
+ const node = path.getValue();
+ const previousPreviousNode = getPreviousNode(path, 2);
+ return isPrettierIgnoreNode(node) || isPrettierIgnoreNode(previousPreviousNode);
+}
+
+var utils$8 = {
+ getNextNode,
+ getPreviousNode,
+ hasPrettierIgnore: hasPrettierIgnore$2,
+ isGlimmerComponent,
+ isNextNodeOfSomeType,
+ isNodeOfSomeType,
+ isParentOfSomeType,
+ isPreviousNodeOfSomeType,
+ isWhitespaceNode
+};
+
+const {
+ concat: concat$a,
+ join: join$7,
+ softline: softline$4,
+ hardline: hardline$8,
+ line: line$6,
+ group: group$a,
+ indent: indent$6,
+ ifBreak: ifBreak$3
+} = document.builders;
+const {
+ getNextNode: getNextNode$1,
+ getPreviousNode: getPreviousNode$1,
+ hasPrettierIgnore: hasPrettierIgnore$3,
+ isGlimmerComponent: isGlimmerComponent$1,
+ isNextNodeOfSomeType: isNextNodeOfSomeType$1,
+ isParentOfSomeType: isParentOfSomeType$1,
+ isPreviousNodeOfSomeType: isPreviousNodeOfSomeType$1,
+ isWhitespaceNode: isWhitespaceNode$1
+} = utils$8; // http://w3c.github.io/html/single-page.html#void-elements
+
+const voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter:
+// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts
+
+function print(path, options, print) {
+ const n = path.getValue();
+ /* istanbul ignore if*/
+
+ if (!n) {
+ return "";
+ }
+
+ if (hasPrettierIgnore$3(path)) {
+ const startOffset = locationToOffset(options.originalText, n.loc.start.line - 1, n.loc.start.column);
+ const endOffset = locationToOffset(options.originalText, n.loc.end.line - 1, n.loc.end.column);
+ const ignoredText = options.originalText.slice(startOffset, endOffset);
+ return ignoredText;
+ }
+
+ switch (n.type) {
+ case "Block":
+ case "Program":
+ case "Template":
+ {
+ return group$a(concat$a(path.map(print, "body")));
+ }
+
+ case "ElementNode":
+ {
+ const hasChildren = n.children.length > 0;
+ const hasNonWhitespaceChildren = n.children.some(n => !isWhitespaceNode$1(n));
+ const isVoid = isGlimmerComponent$1(n) && (!hasChildren || !hasNonWhitespaceChildren) || voidTags.includes(n.tag);
+ const closeTagForNoBreak = isVoid ? concat$a([" />", softline$4]) : ">";
+ const closeTagForBreak = isVoid ? "/>" : ">";
+
+ const printParams = (path, print) => indent$6(concat$a([n.attributes.length ? line$6 : "", join$7(line$6, path.map(print, "attributes")), n.modifiers.length ? line$6 : "", join$7(line$6, path.map(print, "modifiers")), n.comments.length ? line$6 : "", join$7(line$6, path.map(print, "comments"))]));
+
+ const nextNode = getNextNode$1(path);
+ return concat$a([group$a(concat$a(["<", n.tag, printParams(path, print), n.blockParams.length ? ` as |${n.blockParams.join(" ")}|` : "", ifBreak$3(softline$4, ""), ifBreak$3(closeTagForBreak, closeTagForNoBreak)])), !isVoid ? group$a(concat$a([hasNonWhitespaceChildren ? indent$6(printChildren(path, options, print)) : "", ifBreak$3(hasChildren ? hardline$8 : "", ""), concat$a(["", n.tag, ">"])])) : "", nextNode && nextNode.type === "ElementNode" ? hardline$8 : ""]);
+ }
+
+ case "BlockStatement":
+ {
+ const pp = path.getParentNode(1);
+ const isElseIf = pp && pp.inverse && pp.inverse.body.length === 1 && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if";
+ const hasElseIf = n.inverse && n.inverse.body.length === 1 && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if";
+ const indentElse = hasElseIf ? a => a : indent$6;
+ const inverseElseStatement = (n.inverseStrip.open ? "{{~" : "{{") + "else" + (n.inverseStrip.close ? "~}}" : "}}");
+
+ if (n.inverse) {
+ return concat$a([isElseIf ? concat$a([n.openStrip.open ? "{{~else " : "{{else ", printPathParams(path, print), n.openStrip.close ? "~}}" : "}}"]) : printOpenBlock(path, print, n.openStrip), indent$6(concat$a([hardline$8, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$a([hardline$8, inverseElseStatement]) : "", n.inverse ? indentElse(concat$a([hardline$8, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$a([hardline$8, printCloseBlock(path, print, n.closeStrip)])]);
+ } else if (isElseIf) {
+ return concat$a([concat$a([n.openStrip.open ? "{{~else" : "{{else ", printPathParams(path, print), n.openStrip.close ? "~}}" : "}}"]), indent$6(concat$a([hardline$8, path.call(print, "program")]))]);
+ }
+
+ const hasNonWhitespaceChildren = n.program.body.some(n => !isWhitespaceNode$1(n));
+ return concat$a([printOpenBlock(path, print, n.openStrip), group$a(concat$a([indent$6(concat$a([softline$4, path.call(print, "program")])), hasNonWhitespaceChildren ? hardline$8 : softline$4, printCloseBlock(path, print, n.closeStrip)]))]);
+ }
+
+ case "ElementModifierStatement":
+ {
+ return group$a(concat$a(["{{", printPathParams(path, print), softline$4, "}}"]));
+ }
+
+ case "MustacheStatement":
+ {
+ const isEscaped = n.escaped === false;
+ const {
+ open: openStrip,
+ close: closeStrip
+ } = n.strip;
+ const opening = (isEscaped ? "{{{" : "{{") + (openStrip ? "~" : "");
+ const closing = (closeStrip ? "~" : "") + (isEscaped ? "}}}" : "}}");
+ const leading = isParentOfSomeType$1(path, ["AttrNode", "ConcatStatement", "ElementNode"]) ? [opening, indent$6(softline$4)] : [opening];
+ return group$a(concat$a([...leading, printPathParams(path, print), softline$4, closing]));
+ }
+
+ case "SubExpression":
+ {
+ const params = printParams(path, print);
+ const printedParams = params.length > 0 ? indent$6(concat$a([line$6, group$a(join$7(line$6, params))])) : "";
+ return group$a(concat$a(["(", printPath(path, print), printedParams, softline$4, ")"]));
+ }
+
+ case "AttrNode":
+ {
+ const isText = n.value.type === "TextNode";
+ const isEmptyText = isText && n.value.chars === ""; // If the text is empty and the value's loc start and end columns are the
+ // same, there is no value for this AttrNode and it should be printed
+ // without the `=""`. Example: `
` -> `
`
+
+ const isEmptyValue = isEmptyText && n.value.loc.start.column === n.value.loc.end.column;
+
+ if (isEmptyValue) {
+ return concat$a([n.name]);
+ }
+
+ const value = path.call(print, "value");
+ const quotedValue = isText ? printStringLiteral(value.parts.join(), options) : value;
+ return concat$a([n.name, "=", quotedValue]);
+ }
+
+ case "ConcatStatement":
+ {
+ return concat$a(['"', concat$a(path.map(partPath => print(partPath), "parts").filter(a => a !== "")), '"']);
+ }
+
+ case "Hash":
+ {
+ return concat$a([join$7(line$6, path.map(print, "pairs"))]);
+ }
+
+ case "HashPair":
+ {
+ return concat$a([n.key, "=", path.call(print, "value")]);
+ }
+
+ case "TextNode":
+ {
+ const maxLineBreaksToPreserve = 2;
+ const isFirstElement = !getPreviousNode$1(path);
+ const isLastElement = !getNextNode$1(path);
+ const isWhitespaceOnly = !/\S/.test(n.chars);
+ const lineBreaksCount = countNewLines(n.chars);
+ const hasBlockParent = path.getParentNode(0).type === "Block";
+ const hasElementParent = path.getParentNode(0).type === "ElementNode";
+ const hasTemplateParent = path.getParentNode(0).type === "Template";
+ let leadingLineBreaksCount = countLeadingNewLines(n.chars);
+ let trailingLineBreaksCount = countTrailingNewLines(n.chars);
+
+ if ((isFirstElement || isLastElement) && isWhitespaceOnly && (hasBlockParent || hasElementParent || hasTemplateParent)) {
+ return "";
+ }
+
+ if (isWhitespaceOnly && lineBreaksCount) {
+ leadingLineBreaksCount = Math.min(lineBreaksCount, maxLineBreaksToPreserve);
+ trailingLineBreaksCount = 0;
+ } else {
+ if (isNextNodeOfSomeType$1(path, ["BlockStatement", "ElementNode"])) {
+ trailingLineBreaksCount = Math.max(trailingLineBreaksCount, 1);
+ }
+
+ if (isPreviousNodeOfSomeType$1(path, ["ElementNode"]) || isPreviousNodeOfSomeType$1(path, ["BlockStatement"])) {
+ leadingLineBreaksCount = Math.max(leadingLineBreaksCount, 1);
+ }
+ }
+
+ let leadingSpace = "";
+ let trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present,
+ // when next to mustache statement.
+
+ const inAttrNode = path.stack.includes("attributes");
+
+ if (inAttrNode) {
+ const parentNode = path.getParentNode(0);
+ const isConcat = parentNode.type === "ConcatStatement";
+
+ if (isConcat) {
+ const {
+ parts
+ } = parentNode;
+ const partIndex = parts.indexOf(n);
+
+ if (partIndex > 0) {
+ const partType = parts[partIndex - 1].type;
+ const isMustache = partType === "MustacheStatement";
+
+ if (isMustache) {
+ leadingSpace = " ";
+ }
+ }
+
+ if (partIndex < parts.length - 1) {
+ const partType = parts[partIndex + 1].type;
+ const isMustache = partType === "MustacheStatement";
+
+ if (isMustache) {
+ trailingSpace = " ";
+ }
+ }
+ }
+ } else {
+ if (trailingLineBreaksCount === 0 && isNextNodeOfSomeType$1(path, ["MustacheStatement"])) {
+ trailingSpace = " ";
+ }
+
+ if (leadingLineBreaksCount === 0 && isPreviousNodeOfSomeType$1(path, ["MustacheStatement"])) {
+ leadingSpace = " ";
+ }
+
+ if (isFirstElement) {
+ leadingLineBreaksCount = 0;
+ leadingSpace = "";
+ }
+
+ if (isLastElement) {
+ trailingLineBreaksCount = 0;
+ trailingSpace = "";
+ }
+ }
+
+ return concat$a([...generateHardlines(leadingLineBreaksCount, maxLineBreaksToPreserve), n.chars.replace(/^[\s ]+/g, leadingSpace).replace(/[\s ]+$/, trailingSpace), ...generateHardlines(trailingLineBreaksCount, maxLineBreaksToPreserve)].filter(Boolean));
+ }
+
+ case "MustacheCommentStatement":
+ {
+ const dashes = n.value.includes("}}") ? "--" : "";
+ return concat$a(["{{!", dashes, n.value, dashes, "}}"]);
+ }
+
+ case "PathExpression":
+ {
+ return n.original;
+ }
+
+ case "BooleanLiteral":
+ {
+ return String(n.value);
+ }
+
+ case "CommentStatement":
+ {
+ return concat$a([""]);
+ }
+
+ case "StringLiteral":
+ {
+ return printStringLiteral(n.value, options);
+ }
+
+ case "NumberLiteral":
+ {
+ return String(n.value);
+ }
+
+ case "UndefinedLiteral":
+ {
+ return "undefined";
+ }
+
+ case "NullLiteral":
+ {
+ return "null";
+ }
+
+ /* istanbul ignore next */
+
+ default:
+ throw new Error("unknown glimmer type: " + JSON.stringify(n.type));
+ }
+}
+
+function printChildren(path, options, print) {
+ return concat$a(path.map((childPath, childIndex) => {
+ const childNode = path.getValue();
+ const isFirstNode = childIndex === 0;
+ const isLastNode = childIndex === path.getParentNode(0).children.length - 1;
+ const isLastNodeInMultiNodeList = isLastNode && !isFirstNode;
+ const isWhitespace = isWhitespaceNode$1(childNode);
+
+ if (isWhitespace && isLastNodeInMultiNodeList) {
+ return print(childPath, options, print);
+ } else if (isFirstNode) {
+ return concat$a([softline$4, print(childPath, options, print)]);
+ }
+
+ return print(childPath, options, print);
+ }, "children"));
+}
+/**
+ * Prints a string literal with the correct surrounding quotes based on
+ * `options.singleQuote` and the number of escaped quotes contained in
+ * the string literal. This function is the glimmer equivalent of `printString`
+ * in `common/util`, but has differences because of the way escaped characters
+ * are treated in hbs string literals.
+ * @param {string} stringLiteral - the string literal value
+ * @param {object} options - the prettier options object
+ */
+
+
+function printStringLiteral(stringLiteral, options) {
+ const double = {
+ quote: '"',
+ regex: /"/g
+ };
+ const single = {
+ quote: "'",
+ regex: /'/g
+ };
+ const preferred = options.singleQuote ? single : double;
+ const alternate = preferred === single ? double : single;
+ let shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for
+ // enclosing the string, we might want to enclose with the alternate quote
+ // instead, to minimize the number of escaped quotes.
+
+ if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) {
+ const numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length;
+ const numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length;
+ shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes;
+ }
+
+ const enclosingQuote = shouldUseAlternateQuote ? alternate : preferred;
+ const escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, `\\${enclosingQuote.quote}`);
+ return concat$a([enclosingQuote.quote, escapedStringLiteral, enclosingQuote.quote]);
+}
+
+function printPath(path, print) {
+ return path.call(print, "path");
+}
+
+function printParams(path, print) {
+ const node = path.getValue();
+ let parts = [];
+
+ if (node.params.length > 0) {
+ parts = parts.concat(path.map(print, "params"));
+ }
+
+ if (node.hash && node.hash.pairs.length > 0) {
+ parts.push(path.call(print, "hash"));
+ }
+
+ return parts;
+}
+
+function printPathParams(path, print) {
+ const printedPath = printPath(path, print);
+ const printedParams = printParams(path, print);
+ const parts = [printedPath, ...printedParams];
+ return indent$6(group$a(join$7(line$6, parts)));
+}
+
+function printBlockParams(path) {
+ const block = path.getValue();
+
+ if (!block.program || !block.program.blockParams.length) {
+ return "";
+ }
+
+ return concat$a([" as |", block.program.blockParams.join(" "), "|"]);
+}
+
+function printOpenBlock(path, print, {
+ open: isOpenStrip = false,
+ close: isCloseStrip = false
+} = {}) {
+ return group$a(concat$a([isOpenStrip ? "{{~#" : "{{#", printPathParams(path, print), printBlockParams(path), softline$4, isCloseStrip ? "~}}" : "}}"]));
+}
+
+function printCloseBlock(path, print, {
+ open: isOpenStrip = false,
+ close: isCloseStrip = false
+} = {}) {
+ return concat$a([isOpenStrip ? "{{~/" : "{{/", path.call(print, "path"), isCloseStrip ? "~}}" : "}}"]);
+}
+
+function countNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ return string.split("\n").length - 1;
+}
+
+function countLeadingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ const newLines = (string.match(/^([^\S\r\n]*[\r\n])+/g) || [])[0] || "";
+ return countNewLines(newLines);
+}
+
+function countTrailingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ const newLines = (string.match(/([\r\n][^\S\r\n]*)+$/g) || [])[0] || "";
+ return countNewLines(newLines);
+}
+
+function generateHardlines(number = 0, max = 0) {
+ return new Array(Math.min(number, max)).fill(hardline$8);
+}
+/* istanbul ignore next
+ https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/compiler/lib/location.ts#L5-L29
+*/
+
+
+function locationToOffset(source, line, column) {
+ let seenLines = 0;
+ let seenChars = 0; // eslint-disable-next-line no-constant-condition
+
+ while (true) {
+ if (seenChars === source.length) {
+ return null;
+ }
+
+ let nextLine = source.indexOf("\n", seenChars);
+
+ if (nextLine === -1) {
+ nextLine = source.length;
+ }
+
+ if (seenLines === line) {
+ if (seenChars + column > nextLine) {
+ return null;
+ }
+
+ return seenChars + column;
+ } else if (nextLine === -1) {
+ return null;
+ }
+
+ seenLines += 1;
+ seenChars = nextLine + 1;
+ }
+}
+
+var printerGlimmer = {
+ print,
+ massageAstNode: clean$3
+};
+
+var name$d = "Handlebars";
+var type$b = "markup";
+var group$b = "HTML";
+var aliases$3 = [
+ "hbs",
+ "htmlbars"
+];
+var extensions$b = [
+ ".handlebars",
+ ".hbs"
+];
+var tmScope$b = "text.html.handlebars";
+var aceMode$b = "handlebars";
+var languageId$b = 155;
+var Handlebars = {
+ name: name$d,
+ type: type$b,
+ group: group$b,
+ aliases: aliases$3,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ languageId: languageId$b
+};
+
+var Handlebars$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$d,
+ type: type$b,
+ group: group$b,
+ aliases: aliases$3,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ languageId: languageId$b,
+ 'default': Handlebars
+});
+
+var require$$0$3 = getCjsExportFromNamespace(Handlebars$1);
+
+const languages$2 = [createLanguage(require$$0$3, () => ({
+ since: null,
+ // unreleased
+ parsers: ["glimmer"],
+ vscodeLanguageIds: ["handlebars"]
+}))];
+const printers$2 = {
+ glimmer: printerGlimmer
+};
+var languageHandlebars = {
+ languages: languages$2,
+ printers: printers$2
+};
+
+function hasPragma$2(text) {
+ return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text);
+}
+
+function insertPragma$4(text) {
+ return "# @format\n\n" + text;
+}
+
+var pragma$2 = {
+ hasPragma: hasPragma$2,
+ insertPragma: insertPragma$4
+};
+
+const {
+ concat: concat$b,
+ join: join$8,
+ hardline: hardline$9,
+ line: line$7,
+ softline: softline$5,
+ group: group$c,
+ indent: indent$7,
+ ifBreak: ifBreak$4
+} = document.builders;
+const {
+ hasIgnoreComment: hasIgnoreComment$4
+} = util$1;
+const {
+ isNextLineEmpty: isNextLineEmpty$4
+} = utilShared;
+const {
+ insertPragma: insertPragma$5
+} = pragma$2;
+
+function genericPrint$3(path, options, print) {
+ const n = path.getValue();
+
+ if (!n) {
+ return "";
+ }
+
+ if (typeof n === "string") {
+ return n;
+ }
+
+ switch (n.kind) {
+ case "Document":
+ {
+ const parts = [];
+ path.map((pathChild, index) => {
+ parts.push(concat$b([pathChild.call(print)]));
+
+ if (index !== n.definitions.length - 1) {
+ parts.push(hardline$9);
+
+ if (isNextLineEmpty$4(options.originalText, pathChild.getValue(), options.locEnd)) {
+ parts.push(hardline$9);
+ }
+ }
+ }, "definitions");
+ return concat$b([concat$b(parts), hardline$9]);
+ }
+
+ case "OperationDefinition":
+ {
+ const hasOperation = options.originalText[options.locStart(n)] !== "{";
+ const hasName = !!n.name;
+ return concat$b([hasOperation ? n.operation : "", hasOperation && hasName ? concat$b([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]);
+ }
+
+ case "FragmentDefinition":
+ {
+ return concat$b(["fragment ", path.call(print, "name"), n.variableDefinitions && n.variableDefinitions.length ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
+
+ case "SelectionSet":
+ {
+ return concat$b(["{", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(selectionsPath => printSequence(selectionsPath, options, print), "selections"))])), hardline$9, "}"]);
+ }
+
+ case "Field":
+ {
+ return group$c(concat$b([n.alias ? concat$b([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")]));
+ }
+
+ case "Name":
+ {
+ return n.value;
+ }
+
+ case "StringValue":
+ {
+ if (n.block) {
+ return concat$b(['"""', hardline$9, join$8(hardline$9, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$9, '"""']);
+ }
+
+ return concat$b(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']);
+ }
+
+ case "IntValue":
+ case "FloatValue":
+ case "EnumValue":
+ {
+ return n.value;
+ }
+
+ case "BooleanValue":
+ {
+ return n.value ? "true" : "false";
+ }
+
+ case "NullValue":
+ {
+ return "null";
+ }
+
+ case "Variable":
+ {
+ return concat$b(["$", path.call(print, "name")]);
+ }
+
+ case "ListValue":
+ {
+ return group$c(concat$b(["[", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "values"))])), softline$5, "]"]));
+ }
+
+ case "ObjectValue":
+ {
+ return group$c(concat$b(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "fields"))])), softline$5, ifBreak$4("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"]));
+ }
+
+ case "ObjectField":
+ case "Argument":
+ {
+ return concat$b([path.call(print, "name"), ": ", path.call(print, "value")]);
+ }
+
+ case "Directive":
+ {
+ return concat$b(["@", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : ""]);
+ }
+
+ case "NamedType":
+ {
+ return path.call(print, "name");
+ }
+
+ case "VariableDefinition":
+ {
+ return concat$b([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$b([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
+
+ case "TypeExtensionDefinition":
+ {
+ return concat$b(["extend ", path.call(print, "definition")]);
+ }
+
+ case "ObjectTypeExtension":
+ case "ObjectTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$b([" implements ", concat$b(printInterfaces(path, options, print))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "FieldDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]);
+ }
+
+ case "DirectiveDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", n.repeatable ? " repeatable" : "", concat$b([" on ", join$8(" | ", path.map(print, "locations"))])]);
+ }
+
+ case "EnumTypeExtension":
+ case "EnumTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(valuesPath => printSequence(valuesPath, options, print), "values"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "EnumValueDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "InputValueDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? n.description.block ? hardline$9 : line$7 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$b([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
+
+ case "InputObjectTypeExtension":
+ case "InputObjectTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "SchemaDefinition":
+ {
+ return concat$b(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(opsPath => printSequence(opsPath, options, print), "operationTypes"))])) : "", hardline$9, "}"]);
+ }
+
+ case "OperationTypeDefinition":
+ {
+ return concat$b([path.call(print, "operation"), ": ", path.call(print, "type")]);
+ }
+
+ case "InterfaceTypeExtension":
+ case "InterfaceTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "FragmentSpread":
+ {
+ return concat$b(["...", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "InlineFragment":
+ {
+ return concat$b(["...", n.typeCondition ? concat$b([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
+
+ case "UnionTypeExtension":
+ case "UnionTypeDefinition":
+ {
+ return group$c(concat$b([path.call(print, "description"), n.description ? hardline$9 : "", group$c(concat$b([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$b([" =", ifBreak$4("", " "), indent$7(concat$b([ifBreak$4(concat$b([line$7, " "])), join$8(concat$b([line$7, "| "]), path.map(print, "types"))]))]) : ""]))]));
+ }
+
+ case "ScalarTypeExtension":
+ case "ScalarTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "NonNullType":
+ {
+ return concat$b([path.call(print, "type"), "!"]);
+ }
+
+ case "ListType":
+ {
+ return concat$b(["[", path.call(print, "type"), "]"]);
+ }
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
+ }
+}
+
+function printDirectives(path, print, n) {
+ if (n.directives.length === 0) {
+ return "";
+ }
+
+ return concat$b([" ", group$c(indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", " "), softline$5]), path.map(print, "directives"))])))]);
+}
+
+function printSequence(sequencePath, options, print) {
+ const count = sequencePath.getValue().length;
+ return sequencePath.map((path, i) => {
+ const printed = print(path);
+
+ if (isNextLineEmpty$4(options.originalText, path.getValue(), options.locEnd) && i < count - 1) {
+ return concat$b([printed, hardline$9]);
+ }
+
+ return printed;
+ });
+}
+
+function canAttachComment$1(node) {
+ return node.kind && node.kind !== "Comment";
+}
+
+function printComment$2(commentPath) {
+ const comment = commentPath.getValue();
+
+ if (comment.kind === "Comment") {
+ return "#" + comment.value.trimEnd();
+ }
+
+ throw new Error("Not a comment: " + JSON.stringify(comment));
+}
+
+function determineInterfaceSeparatorBetween(first, second, options) {
+ const textBetween = options.originalText.slice(first.loc.end, second.loc.start).replace(/#.*/g, "").trim();
+ return textBetween === "," ? ", " : " & ";
+}
+
+function printInterfaces(path, options, print) {
+ const node = path.getNode();
+ const parts = [];
+ const {
+ interfaces
+ } = node;
+ const printed = path.map(node => print(node), "interfaces");
+
+ for (let index = 0; index < interfaces.length; index++) {
+ const interfaceNode = interfaces[index];
+
+ if (index > 0) {
+ parts.push(determineInterfaceSeparatorBetween(interfaces[index - 1], interfaceNode, options));
+ }
+
+ parts.push(printed[index]);
+ }
+
+ return parts;
+}
+
+function clean$4(node, newNode
+/*, parent*/
+) {
+ delete newNode.loc;
+ delete newNode.comments;
+}
+
+var printerGraphql = {
+ print: genericPrint$3,
+ massageAstNode: clean$4,
+ hasPrettierIgnore: hasIgnoreComment$4,
+ insertPragma: insertPragma$5,
+ printComment: printComment$2,
+ canAttachComment: canAttachComment$1
+};
+
+var options$4 = {
+ bracketSpacing: commonOptions.bracketSpacing
+};
+
+var name$e = "GraphQL";
+var type$c = "data";
+var extensions$c = [
+ ".graphql",
+ ".gql",
+ ".graphqls"
+];
+var tmScope$c = "source.graphql";
+var aceMode$c = "text";
+var languageId$c = 139;
+var GraphQL = {
+ name: name$e,
+ type: type$c,
+ extensions: extensions$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ languageId: languageId$c
+};
+
+var GraphQL$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$e,
+ type: type$c,
+ extensions: extensions$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ languageId: languageId$c,
+ 'default': GraphQL
+});
+
+var require$$0$4 = getCjsExportFromNamespace(GraphQL$1);
+
+const languages$3 = [createLanguage(require$$0$4, () => ({
+ since: "1.5.0",
+ parsers: ["graphql"],
+ vscodeLanguageIds: ["graphql"]
+}))];
+const printers$3 = {
+ graphql: printerGraphql
+};
+var languageGraphql = {
+ languages: languages$3,
+ options: options$4,
+ printers: printers$3
+};
+
+var json = {
+ "cjkPattern": "[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\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]",
+ "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]"
+};
+
+const {
+ cjkPattern,
+ kPattern,
+ punctuationPattern
+} = json;
+const {
+ getLast: getLast$4
+} = util$1;
+const INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"];
+const INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]);
+const kRegex = new RegExp(kPattern);
+const punctuationRegex = new RegExp(punctuationPattern);
+/**
+ * split text into whitespaces and words
+ * @param {string} text
+ * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>}
+ */
+
+function splitText(text, options) {
+ const KIND_NON_CJK = "non-cjk";
+ const KIND_CJ_LETTER = "cj-letter";
+ const KIND_K_LETTER = "k-letter";
+ const KIND_CJK_PUNCTUATION = "cjk-punctuation";
+ const nodes = [];
+ (options.proseWrap === "preserve" ? text : text.replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2")).split(/([ \t\n]+)/).forEach((token, index, tokens) => {
+ // whitespace
+ if (index % 2 === 1) {
+ nodes.push({
+ type: "whitespace",
+ value: /\n/.test(token) ? "\n" : " "
+ });
+ return;
+ } // word separated by whitespace
+
+
+ if ((index === 0 || index === tokens.length - 1) && token === "") {
+ return;
+ }
+
+ token.split(new RegExp(`(${cjkPattern})`)).forEach((innerToken, innerIndex, innerTokens) => {
+ if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") {
+ return;
+ } // non-CJK word
+
+
+ if (innerIndex % 2 === 0) {
+ if (innerToken !== "") {
+ appendNode({
+ type: "word",
+ value: innerToken,
+ kind: KIND_NON_CJK,
+ hasLeadingPunctuation: punctuationRegex.test(innerToken[0]),
+ hasTrailingPunctuation: punctuationRegex.test(getLast$4(innerToken))
+ });
+ }
+
+ return;
+ } // CJK character
+
+
+ appendNode(punctuationRegex.test(innerToken) ? {
+ type: "word",
+ value: innerToken,
+ kind: KIND_CJK_PUNCTUATION,
+ hasLeadingPunctuation: true,
+ hasTrailingPunctuation: true
+ } : {
+ type: "word",
+ value: innerToken,
+ kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER,
+ hasLeadingPunctuation: false,
+ hasTrailingPunctuation: false
+ });
+ });
+ });
+ return nodes;
+
+ function appendNode(node) {
+ const lastNode = getLast$4(nodes);
+
+ if (lastNode && lastNode.type === "word") {
+ if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) {
+ nodes.push({
+ type: "whitespace",
+ value: " "
+ });
+ } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace
+ ![lastNode.value, node.value].some(value => /\u3000/.test(value))) {
+ nodes.push({
+ type: "whitespace",
+ value: ""
+ });
+ }
+ }
+
+ nodes.push(node);
+
+ function isBetween(kind1, kind2) {
+ return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1;
+ }
+ }
+}
+
+function getOrderedListItemInfo(orderListItem, originalText) {
+ const [, numberText, marker, leadingSpaces] = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);
+ return {
+ numberText,
+ marker,
+ leadingSpaces
+ };
+}
+
+function hasGitDiffFriendlyOrderedList(node, options) {
+ if (!node.ordered) {
+ return false;
+ }
+
+ if (node.children.length < 2) {
+ return false;
+ }
+
+ const firstNumber = Number(getOrderedListItemInfo(node.children[0], options.originalText).numberText);
+ const secondNumber = Number(getOrderedListItemInfo(node.children[1], options.originalText).numberText);
+
+ if (firstNumber === 0 && node.children.length > 2) {
+ const thirdNumber = Number(getOrderedListItemInfo(node.children[2], options.originalText).numberText);
+ return secondNumber === 1 && thirdNumber === 1;
+ }
+
+ return secondNumber === 1;
+} // workaround for https://github.com/remarkjs/remark/issues/351
+// leading and trailing newlines are stripped by remark
+
+
+function getFencedCodeBlockValue(node, originalText) {
+ const text = originalText.slice(node.position.start.offset, node.position.end.offset);
+ const leadingSpaceCount = text.match(/^\s*/)[0].length;
+ const replaceRegex = new RegExp(`^\\s{0,${leadingSpaceCount}}`);
+ const lineContents = text.split("\n");
+ const markerStyle = text[leadingSpaceCount]; // ` or ~
+
+ const marker = text.slice(leadingSpaceCount).match(new RegExp(`^[${markerStyle}]+`))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces
+ // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence
+
+ const hasEndMarker = new RegExp(`^\\s{0,3}${marker}`).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1)));
+ return lineContents.slice(1, hasEndMarker ? -1 : undefined).map((x, i) => x.slice(getIndent(i + 1)).replace(replaceRegex, "")).join("\n");
+
+ function getIndent(lineIndex) {
+ return node.position.indent[lineIndex - 1] - 1;
+ }
+}
+
+function mapAst(ast, handler) {
+ return function preorder(node, index, parentStack) {
+ parentStack = parentStack || [];
+ const newNode = Object.assign({}, handler(node, index, parentStack));
+
+ if (newNode.children) {
+ newNode.children = newNode.children.map((child, index) => {
+ return preorder(child, index, [newNode].concat(parentStack));
+ });
+ }
+
+ return newNode;
+ }(ast, null, null);
+}
+
+var utils$9 = {
+ mapAst,
+ splitText,
+ punctuationPattern,
+ getFencedCodeBlockValue,
+ getOrderedListItemInfo,
+ hasGitDiffFriendlyOrderedList,
+ INLINE_NODE_TYPES,
+ INLINE_NODE_WRAPPER_TYPES
+};
+
+const {
+ builders: {
+ hardline: hardline$a,
+ literalline: literalline$4,
+ concat: concat$c,
+ markAsRoot: markAsRoot$2
+ },
+ utils: {
+ mapDoc: mapDoc$3
+ }
+} = document;
+const {
+ getFencedCodeBlockValue: getFencedCodeBlockValue$1
+} = utils$9;
+
+function embed$2(path, print, textToDoc, options) {
+ const node = path.getValue();
+
+ if (node.type === "code" && node.lang !== null) {
+ // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk)
+ const langMatch = node.lang.match(/^[A-Za-z0-9_-]+/);
+ const lang = langMatch ? langMatch[0] : "";
+ const parser = getParserName(lang);
+
+ if (parser) {
+ const styleUnit = options.__inJsTemplate ? "~" : "`";
+ const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));
+ const doc = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), {
+ parser
+ });
+ return markAsRoot$2(concat$c([style, node.lang, hardline$a, replaceNewlinesWithLiterallines(doc), style]));
+ }
+ }
+
+ if (node.type === "yaml") {
+ return markAsRoot$2(concat$c(["---", hardline$a, node.value && node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---"]));
+ } // MDX
+
+
+ switch (node.type) {
+ case "importExport":
+ return textToDoc(node.value, {
+ parser: "babel"
+ });
+
+ case "jsx":
+ return textToDoc(`<$>${node.value}$>`, {
+ parser: "__js_expression",
+ rootMarker: "mdx"
+ });
+ }
+
+ return null;
+
+ function getParserName(lang) {
+ const supportInfo = support.getSupportInfo({
+ plugins: options.plugins
+ });
+ const language = supportInfo.languages.find(language => language.name.toLowerCase() === lang || language.aliases && language.aliases.includes(lang) || language.extensions && language.extensions.find(ext => ext === `.${lang}`));
+
+ if (language) {
+ return language.parsers[0];
+ }
+
+ return null;
+ }
+
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$3(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$c(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$4)) : currentDoc);
+ }
+}
+
+var embed_1$2 = embed$2;
+
+const pragmas = ["format", "prettier"];
+
+function startWithPragma(text) {
+ const pragma = `@(${pragmas.join("|")})`;
+ const regex = new RegExp([``, ``].join("|"), "m");
+ const matched = text.match(regex);
+ return matched && matched.index === 0;
+}
+
+var pragma$3 = {
+ startWithPragma,
+ hasPragma: text => startWithPragma(frontMatter(text).content.trimStart()),
+ insertPragma: text => {
+ const extracted = frontMatter(text);
+ const pragma = ``;
+ return extracted.frontMatter ? `${extracted.frontMatter.raw}\n\n${pragma}\n\n${extracted.content}` : `${pragma}\n\n${extracted.content}`;
+ }
+};
+
+const {
+ getOrderedListItemInfo: getOrderedListItemInfo$1,
+ mapAst: mapAst$1,
+ splitText: splitText$1
+} = utils$9; // 0x0 ~ 0x10ffff
+// eslint-disable-next-line no-control-regex
+
+const isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/;
+
+function preprocess$1(ast, options) {
+ ast = restoreUnescapedCharacter(ast, options);
+ ast = mergeContinuousTexts(ast);
+ ast = transformInlineCode(ast);
+ ast = transformIndentedCodeblockAndMarkItsParentList(ast, options);
+ ast = markAlignedList(ast, options);
+ ast = splitTextIntoSentences(ast, options);
+ ast = transformImportExport(ast);
+ ast = mergeContinuousImportExport(ast);
+ return ast;
+}
+
+function transformImportExport(ast) {
+ return mapAst$1(ast, node => {
+ if (node.type !== "import" && node.type !== "export") {
+ return node;
+ }
+
+ return Object.assign({}, node, {
+ type: "importExport"
+ });
+ });
+}
+
+function transformInlineCode(ast) {
+ return mapAst$1(ast, node => {
+ if (node.type !== "inlineCode") {
+ return node;
+ }
+
+ return Object.assign({}, node, {
+ value: node.value.replace(/\s+/g, " ")
+ });
+ });
+}
+
+function restoreUnescapedCharacter(ast, options) {
+ return mapAst$1(ast, node => {
+ return node.type !== "text" ? node : Object.assign({}, node, {
+ value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer
+ isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value
+ });
+ });
+}
+
+function mergeContinuousImportExport(ast) {
+ return mergeChildren(ast, (prevNode, node) => prevNode.type === "importExport" && node.type === "importExport", (prevNode, node) => ({
+ type: "importExport",
+ value: prevNode.value + "\n\n" + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ }));
+}
+
+function mergeChildren(ast, shouldMerge, mergeNode) {
+ return mapAst$1(ast, node => {
+ if (!node.children) {
+ return node;
+ }
+
+ const children = node.children.reduce((current, child) => {
+ const lastChild = current[current.length - 1];
+
+ if (lastChild && shouldMerge(lastChild, child)) {
+ current.splice(-1, 1, mergeNode(lastChild, child));
+ } else {
+ current.push(child);
+ }
+
+ return current;
+ }, []);
+ return Object.assign({}, node, {
+ children
+ });
+ });
+}
+
+function mergeContinuousTexts(ast) {
+ return mergeChildren(ast, (prevNode, node) => prevNode.type === "text" && node.type === "text", (prevNode, node) => ({
+ type: "text",
+ value: prevNode.value + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ }));
+}
+
+function splitTextIntoSentences(ast, options) {
+ return mapAst$1(ast, (node, index, [parentNode]) => {
+ if (node.type !== "text") {
+ return node;
+ }
+
+ let {
+ value
+ } = node;
+
+ if (parentNode.type === "paragraph") {
+ if (index === 0) {
+ value = value.trimStart();
+ }
+
+ if (index === parentNode.children.length - 1) {
+ value = value.trimEnd();
+ }
+ }
+
+ return {
+ type: "sentence",
+ position: node.position,
+ children: splitText$1(value, options)
+ };
+ });
+}
+
+function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
+ return mapAst$1(ast, (node, index, parentStack) => {
+ if (node.type === "code") {
+ // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it
+ const isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
+ node.isIndented = isIndented;
+
+ if (isIndented) {
+ for (let i = 0; i < parentStack.length; i++) {
+ const parent = parentStack[i]; // no need to check checked items
+
+ if (parent.hasIndentedCodeblock) {
+ break;
+ }
+
+ if (parent.type === "list") {
+ parent.hasIndentedCodeblock = true;
+ }
+ }
+ }
+ }
+
+ return node;
+ });
+}
+
+function markAlignedList(ast, options) {
+ return mapAst$1(ast, (node, index, parentStack) => {
+ if (node.type === "list" && node.children.length !== 0) {
+ // if one of its parents is not aligned, it's not possible to be aligned in sub-lists
+ for (let i = 0; i < parentStack.length; i++) {
+ const parent = parentStack[i];
+
+ if (parent.type === "list" && !parent.isAligned) {
+ node.isAligned = false;
+ return node;
+ }
+ }
+
+ node.isAligned = isAligned(node);
+ }
+
+ return node;
+ });
+
+ function getListItemStart(listItem) {
+ return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1;
+ }
+
+ function isAligned(list) {
+ if (!list.ordered) {
+ /**
+ * - 123
+ * - 123
+ */
+ return true;
+ }
+
+ const [firstItem, secondItem] = list.children;
+ const firstInfo = getOrderedListItemInfo$1(firstItem, options.originalText);
+
+ if (firstInfo.leadingSpaces.length > 1) {
+ /**
+ * 1. 123
+ *
+ * 1. 123
+ * 1. 123
+ */
+ return true;
+ }
+
+ const firstStart = getListItemStart(firstItem);
+
+ if (firstStart === -1) {
+ /**
+ * 1.
+ *
+ * 1.
+ * 1.
+ */
+ return false;
+ }
+
+ if (list.children.length === 1) {
+ /**
+ * aligned:
+ *
+ * 11. 123
+ *
+ * not aligned:
+ *
+ * 1. 123
+ */
+ return firstStart % options.tabWidth === 0;
+ }
+
+ const secondStart = getListItemStart(secondItem);
+
+ if (firstStart !== secondStart) {
+ /**
+ * 11. 123
+ * 1. 123
+ *
+ * 1. 123
+ * 11. 123
+ */
+ return false;
+ }
+
+ if (firstStart % options.tabWidth === 0) {
+ /**
+ * 11. 123
+ * 12. 123
+ */
+ return true;
+ }
+ /**
+ * aligned:
+ *
+ * 11. 123
+ * 1. 123
+ *
+ * not aligned:
+ *
+ * 1. 123
+ * 2. 123
+ */
+
+
+ const secondInfo = getOrderedListItemInfo$1(secondItem, options.originalText);
+ return secondInfo.leadingSpaces.length > 1;
+ }
+}
+
+var preprocess_1$1 = preprocess$1;
+
+const {
+ builders: {
+ breakParent: breakParent$3,
+ concat: concat$d,
+ join: join$9,
+ line: line$8,
+ literalline: literalline$5,
+ markAsRoot: markAsRoot$3,
+ hardline: hardline$b,
+ softline: softline$6,
+ ifBreak: ifBreak$5,
+ fill: fill$5,
+ align: align$2,
+ indent: indent$8,
+ group: group$d
+ },
+ utils: {
+ mapDoc: mapDoc$4
+ },
+ printer: {
+ printDocToString: printDocToString$3
+ }
+} = document;
+const {
+ getFencedCodeBlockValue: getFencedCodeBlockValue$2,
+ hasGitDiffFriendlyOrderedList: hasGitDiffFriendlyOrderedList$1,
+ splitText: splitText$2,
+ punctuationPattern: punctuationPattern$1,
+ INLINE_NODE_TYPES: INLINE_NODE_TYPES$1,
+ INLINE_NODE_WRAPPER_TYPES: INLINE_NODE_WRAPPER_TYPES$1
+} = utils$9;
+const {
+ replaceEndOfLineWith: replaceEndOfLineWith$1
+} = util$1;
+const TRAILING_HARDLINE_NODES = ["importExport"];
+const SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"];
+const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"];
+
+function genericPrint$4(path, options, print) {
+ const node = path.getValue();
+
+ if (shouldRemainTheSameContent(path)) {
+ return concat$d(splitText$2(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(node => node.type === "word" ? node.value : node.value === "" ? "" : printLine(path, node.value, options)));
+ }
+
+ switch (node.type) {
+ case "root":
+ if (node.children.length === 0) {
+ return "";
+ }
+
+ return concat$d([normalizeDoc(printRoot(path, options, print)), !TRAILING_HARDLINE_NODES.includes(getLastDescendantNode(node).type) ? hardline$b : ""]);
+
+ case "paragraph":
+ return printChildren$1(path, options, print, {
+ postprocessor: fill$5
+ });
+
+ case "sentence":
+ return printChildren$1(path, options, print);
+
+ case "word":
+ return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math)
+ .replace(new RegExp([`(^|${punctuationPattern$1})(_+)`, `(_+)(${punctuationPattern$1}|$)`].join("|"), "g"), (_, text1, underscore1, underscore2, text2) => (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text2}`).replace(/_/g, "\\_"));
+ // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis
+
+ case "whitespace":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode.children.indexOf(node);
+ const nextNode = parentNode.children[index + 1];
+ const proseWrap = // leading char that may cause different syntax
+ nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap;
+ return printLine(path, node.value, {
+ proseWrap
+ });
+ }
+
+ case "emphasis":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode.children.indexOf(node);
+ const prevNode = parentNode.children[index - 1];
+ const nextNode = parentNode.children[index + 1];
+ const hasPrevOrNextWord = // `1*2*3` is considered emphasis but `1_2_3` is not
+ prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util$1.getLast(prevNode.children).type === "word" && !util$1.getLast(prevNode.children).hasTrailingPunctuation || nextNode && nextNode.type === "sentence" && nextNode.children.length > 0 && nextNode.children[0].type === "word" && !nextNode.children[0].hasLeadingPunctuation;
+ const style = hasPrevOrNextWord || getAncestorNode$2(path, "emphasis") ? "*" : "_";
+ return concat$d([style, printChildren$1(path, options, print), style]);
+ }
+
+ case "strong":
+ return concat$d(["**", printChildren$1(path, options, print), "**"]);
+
+ case "delete":
+ return concat$d(["~~", printChildren$1(path, options, print), "~~"]);
+
+ case "inlineCode":
+ {
+ const backtickCount = util$1.getMinNotPresentContinuousCount(node.value, "`");
+ const style = "`".repeat(backtickCount || 1);
+ const gap = backtickCount ? " " : "";
+ return concat$d([style, gap, node.value, gap, style]);
+ }
+
+ case "link":
+ switch (options.originalText[node.position.start.offset]) {
+ case "<":
+ {
+ const mailto = "mailto:";
+ const url = // is parsed as { url: "mailto:hello@example.com" }
+ node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url;
+ return concat$d(["<", url, ">"]);
+ }
+
+ case "[":
+ return concat$d(["[", printChildren$1(path, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
+
+ default:
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+ }
+
+ case "image":
+ return concat$d([""), printTitle(node.title, options), ")"]);
+
+ case "blockquote":
+ return concat$d(["> ", align$2("> ", printChildren$1(path, options, print))]);
+
+ case "heading":
+ return concat$d(["#".repeat(node.depth) + " ", printChildren$1(path, options, print)]);
+
+ case "code":
+ {
+ if (node.isIndented) {
+ // indented code block
+ const alignment = " ".repeat(4);
+ return align$2(alignment, concat$d([alignment, concat$d(replaceEndOfLineWith$1(node.value, hardline$b))]));
+ } // fenced code block
+
+
+ const styleUnit = options.__inJsTemplate ? "~" : "`";
+ const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));
+ return concat$d([style, node.lang || "", hardline$b, concat$d(replaceEndOfLineWith$1(getFencedCodeBlockValue$2(node, options.originalText), hardline$b)), hardline$b, style]);
+ }
+
+ case "yaml":
+ case "toml":
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+
+ case "html":
+ {
+ const parentNode = path.getParentNode();
+ const value = parentNode.type === "root" && util$1.getLast(parentNode.children) === node ? node.value.trimEnd() : node.value;
+ const isHtmlComment = /^$/.test(value);
+ return concat$d(replaceEndOfLineWith$1(value, isHtmlComment ? hardline$b : markAsRoot$3(literalline$5)));
+ }
+
+ case "list":
+ {
+ const nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
+ const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList$1(node, options);
+ return printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ const prefix = getPrefix();
+ const childNode = childPath.getValue();
+
+ if (childNode.children.length === 2 && childNode.children[1].type === "html" && childNode.children[0].position.start.column !== childNode.children[1].position.start.column) {
+ return concat$d([prefix, printListItem(childPath, options, print, prefix)]);
+ }
+
+ return concat$d([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]);
+
+ function getPrefix() {
+ const rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
+ return node.isAligned ||
+ /* workaround for https://github.com/remarkjs/remark/issues/315 */
+ node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
+ }
+ }
+ });
+ }
+
+ case "thematicBreak":
+ {
+ const counter = getAncestorCounter$1(path, "list");
+
+ if (counter === -1) {
+ return "---";
+ }
+
+ const nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1));
+ return nthSiblingIndex % 2 === 0 ? "***" : "---";
+ }
+
+ case "linkReference":
+ return concat$d(["[", printChildren$1(path, options, print), "]", node.referenceType === "full" ? concat$d(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]);
+
+ case "imageReference":
+ switch (node.referenceType) {
+ case "full":
+ return concat$d(["![", node.alt || "", "][", node.identifier, "]"]);
+
+ default:
+ return concat$d(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]);
+ }
+
+ case "definition":
+ {
+ const lineOrSpace = options.proseWrap === "always" ? line$8 : " ";
+ return group$d(concat$d([concat$d(["[", node.identifier, "]:"]), indent$8(concat$d([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$d([lineOrSpace, printTitle(node.title, options, false)])]))]));
+ }
+
+ case "footnote":
+ return concat$d(["[^", printChildren$1(path, options, print), "]"]);
+
+ case "footnoteReference":
+ return concat$d(["[^", node.identifier, "]"]);
+
+ case "footnoteDefinition":
+ {
+ const nextNode = path.getParentNode().children[path.getName() + 1];
+ const shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
+ return concat$d(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren$1(path, options, print) : group$d(concat$d([align$2(" ".repeat(options.tabWidth), printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ return index === 0 ? group$d(concat$d([softline$6, childPath.call(print)])) : childPath.call(print);
+ }
+ })), nextNode && nextNode.type === "footnoteDefinition" ? softline$6 : ""]))]);
+ }
+
+ case "table":
+ return printTable(path, options, print);
+
+ case "tableCell":
+ return printChildren$1(path, options, print);
+
+ case "break":
+ return /\s/.test(options.originalText[node.position.start.offset]) ? concat$d([" ", markAsRoot$3(literalline$5)]) : concat$d(["\\", hardline$b]);
+
+ case "liquidNode":
+ return concat$d(replaceEndOfLineWith$1(node.value, hardline$b));
+ // MDX
+
+ case "importExport":
+ case "jsx":
+ return node.value;
+ // fallback to the original text if multiparser failed
+
+ case "math":
+ return concat$d(["$$", hardline$b, node.value ? concat$d([concat$d(replaceEndOfLineWith$1(node.value, hardline$b)), hardline$b]) : "", "$$"]);
+
+ case "inlineMath":
+ {
+ // remark-math trims content but we don't want to remove whitespaces
+ // since it's very possible that it's recognized as math accidentally
+ return options.originalText.slice(options.locStart(node), options.locEnd(node));
+ }
+
+ case "tableRow": // handled in "table"
+
+ case "listItem": // handled in "list"
+
+ default:
+ throw new Error(`Unknown markdown type ${JSON.stringify(node.type)}`);
+ }
+}
+
+function printListItem(path, options, print, listPrefix) {
+ const node = path.getValue();
+ const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
+ return concat$d([prefix, printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ if (index === 0 && childPath.getValue().type !== "list") {
+ return align$2(" ".repeat(prefix.length), childPath.call(print));
+ }
+
+ const alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block
+ );
+ return concat$d([alignment, align$2(alignment, childPath.call(print))]);
+ }
+ })]);
+}
+
+function alignListPrefix(prefix, options) {
+ const additionalSpaces = getAdditionalSpaces();
+ return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block
+ );
+
+ function getAdditionalSpaces() {
+ const restSpaces = prefix.length % options.tabWidth;
+ return restSpaces === 0 ? 0 : options.tabWidth - restSpaces;
+ }
+}
+
+function getNthListSiblingIndex(node, parentNode) {
+ return getNthSiblingIndex(node, parentNode, siblingNode => siblingNode.ordered === node.ordered);
+}
+
+function getNthSiblingIndex(node, parentNode, condition) {
+ condition = condition || (() => true);
+
+ let index = -1;
+
+ for (const childNode of parentNode.children) {
+ if (childNode.type === node.type && condition(childNode)) {
+ index++;
+ } else {
+ index = -1;
+ }
+
+ if (childNode === node) {
+ return index;
+ }
+ }
+}
+
+function getAncestorCounter$1(path, typeOrTypes) {
+ const types = [].concat(typeOrTypes);
+ let counter = -1;
+ let ancestorNode;
+
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.includes(ancestorNode.type)) {
+ return counter;
+ }
+ }
+
+ return -1;
+}
+
+function getAncestorNode$2(path, typeOrTypes) {
+ const counter = getAncestorCounter$1(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+}
+
+function printLine(path, value, options) {
+ if (options.proseWrap === "preserve" && value === "\n") {
+ return hardline$b;
+ }
+
+ const isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES);
+ return value !== "" ? isBreakable ? line$8 : " " : isBreakable ? softline$6 : "";
+}
+
+function printTable(path, options, print) {
+ const hardlineWithoutBreakParent = hardline$b.parts[0];
+ const node = path.getValue();
+ const contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } }
+
+ path.map(rowPath => {
+ const rowContents = [];
+ rowPath.map(cellPath => {
+ rowContents.push(printDocToString$3(cellPath.call(print), options).formatted);
+ }, "children");
+ contents.push(rowContents);
+ }, "children"); // Get the width of each column
+
+ const columnMaxWidths = contents.reduce((currentWidths, rowContents) => currentWidths.map((width, columnIndex) => Math.max(width, util$1.getStringWidth(rowContents[columnIndex]))), contents[0].map(() => 3) // minimum width = 3 (---, :--, :-:, --:)
+ );
+ const alignedTable = join$9(hardlineWithoutBreakParent, [printRow(contents[0]), printSeparator(), join$9(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents)))]);
+
+ if (options.proseWrap !== "never") {
+ return concat$d([breakParent$3, alignedTable]);
+ } // Only if the --prose-wrap never is set and it exceeds the print width.
+
+
+ const compactTable = join$9(hardlineWithoutBreakParent, [printRow(contents[0],
+ /* isCompact */
+ true), printSeparator(
+ /* isCompact */
+ true), join$9(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents,
+ /* isCompact */
+ true)))]);
+ return concat$d([breakParent$3, group$d(ifBreak$5(compactTable, alignedTable))]);
+
+ function printSeparator(isCompact) {
+ return concat$d(["| ", join$9(" | ", columnMaxWidths.map((width, index) => {
+ const spaces = isCompact ? 3 : width;
+
+ switch (node.align[index]) {
+ case "left":
+ return ":" + "-".repeat(spaces - 1);
+
+ case "right":
+ return "-".repeat(spaces - 1) + ":";
+
+ case "center":
+ return ":" + "-".repeat(spaces - 2) + ":";
+
+ default:
+ return "-".repeat(spaces);
+ }
+ })), " |"]);
+ }
+
+ function printRow(rowContents, isCompact) {
+ return concat$d(["| ", join$9(" | ", isCompact ? rowContents : rowContents.map((rowContent, columnIndex) => {
+ switch (node.align[columnIndex]) {
+ case "right":
+ return alignRight(rowContent, columnMaxWidths[columnIndex]);
+
+ case "center":
+ return alignCenter(rowContent, columnMaxWidths[columnIndex]);
+
+ default:
+ return alignLeft(rowContent, columnMaxWidths[columnIndex]);
+ }
+ })), " |"]);
+ }
+
+ function alignLeft(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ return concat$d([text, " ".repeat(spaces)]);
+ }
+
+ function alignRight(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ return concat$d([" ".repeat(spaces), text]);
+ }
+
+ function alignCenter(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ const left = Math.floor(spaces / 2);
+ const right = spaces - left;
+ return concat$d([" ".repeat(left), text, " ".repeat(right)]);
+ }
+}
+
+function printRoot(path, options, print) {
+ /** @typedef {{ index: number, offset: number }} IgnorePosition */
+
+ /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */
+ const ignoreRanges = [];
+ /** @type {IgnorePosition | null} */
+
+ let ignoreStart = null;
+ const {
+ children
+ } = path.getValue();
+ children.forEach((childNode, index) => {
+ switch (isPrettierIgnore(childNode)) {
+ case "start":
+ if (ignoreStart === null) {
+ ignoreStart = {
+ index,
+ offset: childNode.position.end.offset
+ };
+ }
+
+ break;
+
+ case "end":
+ if (ignoreStart !== null) {
+ ignoreRanges.push({
+ start: ignoreStart,
+ end: {
+ index,
+ offset: childNode.position.start.offset
+ }
+ });
+ ignoreStart = null;
+ }
+
+ break;
+ }
+ });
+ return printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ if (ignoreRanges.length !== 0) {
+ const ignoreRange = ignoreRanges[0];
+
+ if (index === ignoreRange.start.index) {
+ return concat$d([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]);
+ }
+
+ if (ignoreRange.start.index < index && index < ignoreRange.end.index) {
+ return false;
+ }
+
+ if (index === ignoreRange.end.index) {
+ ignoreRanges.shift();
+ return false;
+ }
+ }
+
+ return childPath.call(print);
+ }
+ });
+}
+
+function printChildren$1(path, options, print, events) {
+ events = events || {};
+ const postprocessor = events.postprocessor || concat$d;
+
+ const processor = events.processor || (childPath => childPath.call(print));
+
+ const node = path.getValue();
+ const parts = [];
+ let lastChildNode;
+ path.map((childPath, index) => {
+ const childNode = childPath.getValue();
+ const result = processor(childPath, index);
+
+ if (result !== false) {
+ const data = {
+ parts,
+ prevNode: lastChildNode,
+ parentNode: node,
+ options
+ };
+
+ if (!shouldNotPrePrintHardline(childNode, data)) {
+ parts.push(hardline$b);
+
+ if (lastChildNode && TRAILING_HARDLINE_NODES.includes(lastChildNode.type)) {
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+ } else {
+ if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+ }
+ }
+
+ parts.push(result);
+ lastChildNode = childNode;
+ }
+ }, "children");
+ return postprocessor(parts);
+}
+
+function getLastDescendantNode(node) {
+ let current = node;
+
+ while (current.children && current.children.length !== 0) {
+ current = current.children[current.children.length - 1];
+ }
+
+ return current;
+}
+/** @return {false | 'next' | 'start' | 'end'} */
+
+
+function isPrettierIgnore(node) {
+ if (node.type !== "html") {
+ return false;
+ }
+
+ const match = node.value.match(/^$/);
+ return match === null ? false : match[1] ? match[1] : "next";
+}
+
+function shouldNotPrePrintHardline(node, data) {
+ const isFirstNode = data.parts.length === 0;
+ const isInlineNode = INLINE_NODE_TYPES$1.includes(node.type);
+ const isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES$1.includes(data.parentNode.type);
+ return isFirstNode || isInlineNode || isInlineHTML;
+}
+
+function shouldPrePrintDoubleHardline(node, data) {
+ const isSequence = (data.prevNode && data.prevNode.type) === node.type;
+ const isSiblingNode = isSequence && SIBLING_NODE_TYPES.includes(node.type);
+ const isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose;
+ const isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose;
+ const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next";
+ const isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line;
+ const isHtmlDirectAfterListItem = node.type === "html" && data.parentNode.type === "listItem" && data.prevNode && data.prevNode.type === "paragraph" && data.prevNode.position.end.line + 1 === node.position.start.line;
+ return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml || isHtmlDirectAfterListItem);
+}
+
+function shouldPrePrintTripleHardline(node, data) {
+ const isPrevNodeList = data.prevNode && data.prevNode.type === "list";
+ const isIndentedCode = node.type === "code" && node.isIndented;
+ return isPrevNodeList && isIndentedCode;
+}
+
+function shouldRemainTheSameContent(path) {
+ const ancestorNode = getAncestorNode$2(path, ["linkReference", "imageReference"]);
+ return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full");
+}
+
+function normalizeDoc(doc) {
+ return mapDoc$4(doc, currentDoc => {
+ if (!currentDoc.parts) {
+ return currentDoc;
+ }
+
+ if (currentDoc.type === "concat" && currentDoc.parts.length === 1) {
+ return currentDoc.parts[0];
+ }
+
+ const parts = currentDoc.parts.reduce((parts, part) => {
+ if (part.type === "concat") {
+ parts.push(...part.parts);
+ } else if (part !== "") {
+ parts.push(part);
+ }
+
+ return parts;
+ }, []);
+ return Object.assign({}, currentDoc, {
+ parts: normalizeParts(parts)
+ });
+ });
+}
+
+function printUrl(url, dangerousCharOrChars) {
+ const dangerousChars = [" "].concat(dangerousCharOrChars || []);
+ return new RegExp(dangerousChars.map(x => `\\${x}`).join("|")).test(url) ? `<${url}>` : url;
+}
+
+function printTitle(title, options, printSpace) {
+ if (printSpace == null) {
+ printSpace = true;
+ }
+
+ if (!title) {
+ return "";
+ }
+
+ if (printSpace) {
+ return " " + printTitle(title, options, false);
+ }
+
+ if (title.includes('"') && title.includes("'") && !title.includes(")")) {
+ return `(${title})`; // avoid escaped quotes
+ } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split
+
+
+ const singleCount = title.split("'").length - 1;
+ const doubleCount = title.split('"').length - 1;
+ const quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"';
+ title = title.replace(new RegExp(`(${quote})`, "g"), "\\$1");
+ return `${quote}${title}${quote}`;
+}
+
+function normalizeParts(parts) {
+ return parts.reduce((current, part) => {
+ const lastPart = util$1.getLast(current);
+
+ if (typeof lastPart === "string" && typeof part === "string") {
+ current.splice(-1, 1, lastPart + part);
+ } else {
+ current.push(part);
+ }
+
+ return current;
+ }, []);
+}
+
+function clamp(value, min, max) {
+ return value < min ? min : value > max ? max : value;
+}
+
+function clean$5(ast, newObj, parent) {
+ delete newObj.position;
+ delete newObj.raw; // front-matter
+ // for codeblock
+
+ if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") {
+ delete newObj.value;
+ }
+
+ if (ast.type === "list") {
+ delete newObj.isAligned;
+ } // texts can be splitted or merged
+
+
+ if (ast.type === "text") {
+ return null;
+ }
+
+ if (ast.type === "inlineCode") {
+ newObj.value = ast.value.replace(/[ \t\n]+/g, " ");
+ } // for insert pragma
+
+
+ if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$3.startWithPragma(ast.value)) {
+ return null;
+ }
+}
+
+function hasPrettierIgnore$4(path) {
+ const index = +path.getName();
+
+ if (index === 0) {
+ return false;
+ }
+
+ const prevNode = path.getParentNode().children[index - 1];
+ return isPrettierIgnore(prevNode) === "next";
+}
+
+var printerMarkdown = {
+ preprocess: preprocess_1$1,
+ print: genericPrint$4,
+ embed: embed_1$2,
+ massageAstNode: clean$5,
+ hasPrettierIgnore: hasPrettierIgnore$4,
+ insertPragma: pragma$3.insertPragma
+};
+
+var options$5 = {
+ proseWrap: commonOptions.proseWrap,
+ singleQuote: commonOptions.singleQuote
+};
+
+var name$f = "Markdown";
+var type$d = "prose";
+var aliases$4 = [
+ "pandoc"
+];
+var aceMode$d = "markdown";
+var codemirrorMode$a = "gfm";
+var codemirrorMimeType$a = "text/x-gfm";
+var wrap = true;
+var extensions$d = [
+ ".md",
+ ".markdown",
+ ".mdown",
+ ".mdwn",
+ ".mdx",
+ ".mkd",
+ ".mkdn",
+ ".mkdown",
+ ".ronn",
+ ".workbook"
+];
+var filenames$3 = [
+ "contents.lr"
+];
+var tmScope$d = "source.gfm";
+var languageId$d = 222;
+var Markdown = {
+ name: name$f,
+ type: type$d,
+ aliases: aliases$4,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ wrap: wrap,
+ extensions: extensions$d,
+ filenames: filenames$3,
+ tmScope: tmScope$d,
+ languageId: languageId$d
+};
+
+var Markdown$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$f,
+ type: type$d,
+ aliases: aliases$4,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ wrap: wrap,
+ extensions: extensions$d,
+ filenames: filenames$3,
+ tmScope: tmScope$d,
+ languageId: languageId$d,
+ 'default': Markdown
+});
+
+var require$$0$5 = getCjsExportFromNamespace(Markdown$1);
+
+const languages$4 = [createLanguage(require$$0$5, data => ({
+ since: "1.8.0",
+ parsers: ["markdown"],
+ vscodeLanguageIds: ["markdown"],
+ filenames: data.filenames.concat(["README"]),
+ extensions: data.extensions.filter(extension => extension !== ".mdx")
+})), createLanguage(require$$0$5, () => ({
+ name: "MDX",
+ since: "1.15.0",
+ parsers: ["mdx"],
+ vscodeLanguageIds: ["mdx"],
+ filenames: [],
+ extensions: [".mdx"]
+}))];
+const printers$4 = {
+ mdast: printerMarkdown
+};
+var languageMarkdown = {
+ languages: languages$4,
+ options: options$5,
+ printers: printers$4
+};
+
+var clean$6 = function (ast, newNode) {
+ delete newNode.sourceSpan;
+ delete newNode.startSourceSpan;
+ delete newNode.endSourceSpan;
+ delete newNode.nameSpan;
+ delete newNode.valueSpan;
+
+ if (ast.type === "text" || ast.type === "comment") {
+ return null;
+ } // may be formatted by multiparser
+
+
+ if (ast.type === "yaml" || ast.type === "toml") {
+ return null;
+ }
+
+ if (ast.type === "attribute") {
+ delete newNode.value;
+ }
+
+ if (ast.type === "docType") {
+ delete newNode.value;
+ }
+};
+
+var json$1 = {
+ "CSS_DISPLAY_TAGS": {
+ "area": "none",
+ "base": "none",
+ "basefont": "none",
+ "datalist": "none",
+ "head": "none",
+ "link": "none",
+ "meta": "none",
+ "noembed": "none",
+ "noframes": "none",
+ "param": "none",
+ "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",
+ "video": "inline-block",
+ "audio": "inline-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"
+};
+
+var index = [
+ "a",
+ "abbr",
+ "acronym",
+ "address",
+ "applet",
+ "area",
+ "article",
+ "aside",
+ "audio",
+ "b",
+ "base",
+ "basefont",
+ "bdi",
+ "bdo",
+ "bgsound",
+ "big",
+ "blink",
+ "blockquote",
+ "body",
+ "br",
+ "button",
+ "canvas",
+ "caption",
+ "center",
+ "cite",
+ "code",
+ "col",
+ "colgroup",
+ "command",
+ "content",
+ "data",
+ "datalist",
+ "dd",
+ "del",
+ "details",
+ "dfn",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "element",
+ "em",
+ "embed",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "font",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hgroup",
+ "hr",
+ "html",
+ "i",
+ "iframe",
+ "image",
+ "img",
+ "input",
+ "ins",
+ "isindex",
+ "kbd",
+ "keygen",
+ "label",
+ "legend",
+ "li",
+ "link",
+ "listing",
+ "main",
+ "map",
+ "mark",
+ "marquee",
+ "math",
+ "menu",
+ "menuitem",
+ "meta",
+ "meter",
+ "multicol",
+ "nav",
+ "nextid",
+ "nobr",
+ "noembed",
+ "noframes",
+ "noscript",
+ "object",
+ "ol",
+ "optgroup",
+ "option",
+ "output",
+ "p",
+ "param",
+ "picture",
+ "plaintext",
+ "pre",
+ "progress",
+ "q",
+ "rb",
+ "rbc",
+ "rp",
+ "rt",
+ "rtc",
+ "ruby",
+ "s",
+ "samp",
+ "script",
+ "section",
+ "select",
+ "shadow",
+ "slot",
+ "small",
+ "source",
+ "spacer",
+ "span",
+ "strike",
+ "strong",
+ "style",
+ "sub",
+ "summary",
+ "sup",
+ "svg",
+ "table",
+ "tbody",
+ "td",
+ "template",
+ "textarea",
+ "tfoot",
+ "th",
+ "thead",
+ "time",
+ "title",
+ "tr",
+ "track",
+ "tt",
+ "u",
+ "ul",
+ "var",
+ "video",
+ "wbr",
+ "xmp"
+];
+
+var htmlTagNames = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ 'default': index
+});
+
+var a = [
+ "accesskey",
+ "charset",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "name",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+];
+var abbr = [
+ "title"
+];
+var applet = [
+ "align",
+ "alt",
+ "archive",
+ "code",
+ "codebase",
+ "height",
+ "hspace",
+ "name",
+ "object",
+ "vspace",
+ "width"
+];
+var area = [
+ "accesskey",
+ "alt",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "nohref",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+];
+var audio = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "loop",
+ "muted",
+ "preload",
+ "src"
+];
+var base = [
+ "href",
+ "target"
+];
+var basefont = [
+ "color",
+ "face",
+ "size"
+];
+var bdo = [
+ "dir"
+];
+var blockquote = [
+ "cite"
+];
+var body = [
+ "alink",
+ "background",
+ "bgcolor",
+ "link",
+ "text",
+ "vlink"
+];
+var br = [
+ "clear"
+];
+var button = [
+ "accesskey",
+ "autofocus",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "name",
+ "tabindex",
+ "type",
+ "value"
+];
+var canvas = [
+ "height",
+ "width"
+];
+var caption = [
+ "align"
+];
+var col = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+];
+var colgroup = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+];
+var data$1 = [
+ "value"
+];
+var del$1 = [
+ "cite",
+ "datetime"
+];
+var details = [
+ "open"
+];
+var dfn = [
+ "title"
+];
+var dialog = [
+ "open"
+];
+var dir = [
+ "compact"
+];
+var div = [
+ "align"
+];
+var dl = [
+ "compact"
+];
+var embed$3 = [
+ "height",
+ "src",
+ "type",
+ "width"
+];
+var fieldset = [
+ "disabled",
+ "form",
+ "name"
+];
+var font = [
+ "color",
+ "face",
+ "size"
+];
+var form = [
+ "accept",
+ "accept-charset",
+ "action",
+ "autocomplete",
+ "enctype",
+ "method",
+ "name",
+ "novalidate",
+ "target"
+];
+var frame = [
+ "frameborder",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "noresize",
+ "scrolling",
+ "src"
+];
+var frameset = [
+ "cols",
+ "rows"
+];
+var h1 = [
+ "align"
+];
+var h2 = [
+ "align"
+];
+var h3 = [
+ "align"
+];
+var h4 = [
+ "align"
+];
+var h5 = [
+ "align"
+];
+var h6 = [
+ "align"
+];
+var head = [
+ "profile"
+];
+var hr = [
+ "align",
+ "noshade",
+ "size",
+ "width"
+];
+var html = [
+ "manifest",
+ "version"
+];
+var iframe = [
+ "align",
+ "allow",
+ "allowfullscreen",
+ "allowpaymentrequest",
+ "allowusermedia",
+ "frameborder",
+ "height",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "referrerpolicy",
+ "sandbox",
+ "scrolling",
+ "src",
+ "srcdoc",
+ "width"
+];
+var img = [
+ "align",
+ "alt",
+ "border",
+ "crossorigin",
+ "decoding",
+ "height",
+ "hspace",
+ "ismap",
+ "longdesc",
+ "name",
+ "referrerpolicy",
+ "sizes",
+ "src",
+ "srcset",
+ "usemap",
+ "vspace",
+ "width"
+];
+var input = [
+ "accept",
+ "accesskey",
+ "align",
+ "alt",
+ "autocomplete",
+ "autofocus",
+ "checked",
+ "dirname",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "height",
+ "ismap",
+ "list",
+ "max",
+ "maxlength",
+ "min",
+ "minlength",
+ "multiple",
+ "name",
+ "pattern",
+ "placeholder",
+ "readonly",
+ "required",
+ "size",
+ "src",
+ "step",
+ "tabindex",
+ "title",
+ "type",
+ "usemap",
+ "value",
+ "width"
+];
+var ins = [
+ "cite",
+ "datetime"
+];
+var isindex = [
+ "prompt"
+];
+var label = [
+ "accesskey",
+ "for",
+ "form"
+];
+var legend = [
+ "accesskey",
+ "align"
+];
+var li = [
+ "type",
+ "value"
+];
+var link$3 = [
+ "as",
+ "charset",
+ "color",
+ "crossorigin",
+ "href",
+ "hreflang",
+ "imagesizes",
+ "imagesrcset",
+ "integrity",
+ "media",
+ "nonce",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "sizes",
+ "target",
+ "title",
+ "type"
+];
+var map$1 = [
+ "name"
+];
+var menu = [
+ "compact"
+];
+var meta = [
+ "charset",
+ "content",
+ "http-equiv",
+ "name",
+ "scheme"
+];
+var meter = [
+ "high",
+ "low",
+ "max",
+ "min",
+ "optimum",
+ "value"
+];
+var object = [
+ "align",
+ "archive",
+ "border",
+ "classid",
+ "codebase",
+ "codetype",
+ "data",
+ "declare",
+ "form",
+ "height",
+ "hspace",
+ "name",
+ "standby",
+ "tabindex",
+ "type",
+ "typemustmatch",
+ "usemap",
+ "vspace",
+ "width"
+];
+var ol = [
+ "compact",
+ "reversed",
+ "start",
+ "type"
+];
+var optgroup = [
+ "disabled",
+ "label"
+];
+var option = [
+ "disabled",
+ "label",
+ "selected",
+ "value"
+];
+var output = [
+ "for",
+ "form",
+ "name"
+];
+var p = [
+ "align"
+];
+var param = [
+ "name",
+ "type",
+ "value",
+ "valuetype"
+];
+var pre = [
+ "width"
+];
+var progress = [
+ "max",
+ "value"
+];
+var q = [
+ "cite"
+];
+var script = [
+ "async",
+ "charset",
+ "crossorigin",
+ "defer",
+ "integrity",
+ "language",
+ "nomodule",
+ "nonce",
+ "referrerpolicy",
+ "src",
+ "type"
+];
+var select = [
+ "autocomplete",
+ "autofocus",
+ "disabled",
+ "form",
+ "multiple",
+ "name",
+ "required",
+ "size",
+ "tabindex"
+];
+var slot = [
+ "name"
+];
+var source$1 = [
+ "media",
+ "sizes",
+ "src",
+ "srcset",
+ "type"
+];
+var style = [
+ "media",
+ "nonce",
+ "title",
+ "type"
+];
+var table = [
+ "align",
+ "bgcolor",
+ "border",
+ "cellpadding",
+ "cellspacing",
+ "frame",
+ "rules",
+ "summary",
+ "width"
+];
+var tbody = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var td = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+];
+var textarea = [
+ "accesskey",
+ "autocomplete",
+ "autofocus",
+ "cols",
+ "dirname",
+ "disabled",
+ "form",
+ "maxlength",
+ "minlength",
+ "name",
+ "placeholder",
+ "readonly",
+ "required",
+ "rows",
+ "tabindex",
+ "wrap"
+];
+var tfoot = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var th = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+];
+var thead = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var time = [
+ "datetime"
+];
+var tr = [
+ "align",
+ "bgcolor",
+ "char",
+ "charoff",
+ "valign"
+];
+var track = [
+ "default",
+ "kind",
+ "label",
+ "src",
+ "srclang"
+];
+var ul = [
+ "compact",
+ "type"
+];
+var video = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "height",
+ "loop",
+ "muted",
+ "playsinline",
+ "poster",
+ "preload",
+ "src",
+ "width"
+];
+var index$1 = {
+ "*": [
+ "accesskey",
+ "autocapitalize",
+ "autofocus",
+ "class",
+ "contenteditable",
+ "dir",
+ "draggable",
+ "enterkeyhint",
+ "hidden",
+ "id",
+ "inputmode",
+ "is",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "nonce",
+ "slot",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+],
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data$1,
+ del: del$1,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$3,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$3,
+ map: map$1,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source$1,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video
+};
+
+var htmlElementAttributes = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data$1,
+ del: del$1,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$3,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$3,
+ map: map$1,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source$1,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video,
+ 'default': index$1
+});
+
+var htmlTagNames$1 = getCjsExportFromNamespace(htmlTagNames);
+
+var htmlElementAttributes$1 = getCjsExportFromNamespace(htmlElementAttributes);
+
+const {
+ CSS_DISPLAY_TAGS,
+ CSS_DISPLAY_DEFAULT,
+ CSS_WHITE_SPACE_TAGS,
+ CSS_WHITE_SPACE_DEFAULT
+} = json$1;
+const HTML_TAGS = arrayToMap(htmlTagNames$1);
+const HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap);
+
+function arrayToMap(array) {
+ const map = Object.create(null);
+
+ for (const value of array) {
+ map[value] = true;
+ }
+
+ return map;
+}
+
+function mapObject(object, fn) {
+ const newObject = Object.create(null);
+
+ for (const key of Object.keys(object)) {
+ newObject[key] = fn(object[key], key);
+ }
+
+ return newObject;
+}
+
+function shouldPreserveContent(node, options) {
+ if (!node.endSourceSpan) {
+ return false;
+ }
+
+ if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") {
+ return true;
+ } // unterminated node in ie conditional comment
+ // e.g.
+
+
+ if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) {
+ return true;
+ } // incomplete html in ie conditional comment
+ // e.g.
+
+
+ if (node.type === "ieConditionalComment" && !node.complete) {
+ return true;
+ } // top-level elements (excluding ,
+ * css``
+ * css.global``
+ * css.resolve``
+ */
+
+
+function isStyledJsx(path) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ const parentParent = path.getParentNode(1);
+ return parentParent && node.quasis && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXElement" && parentParent.openingElement.name.name === "style" && parentParent.openingElement.attributes.some(attribute => attribute.name.name === "jsx") || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "Identifier" && parent.tag.name === "css" || parent && parent.type === "TaggedTemplateExpression" && parent.tag.type === "MemberExpression" && parent.tag.object.name === "css" && (parent.tag.property.name === "global" || parent.tag.property.name === "resolve");
+}
+/**
+ * Angular Components can have:
+ * - Inline HTML template
+ * - Inline CSS styles
+ *
+ * ...which are both within template literals somewhere
+ * inside of the Component decorator factory.
+ *
+ * E.g.
+ * @Component({
+ * template: `...
`,
+ * styles: [`h1 { color: blue; }`]
+ * })
+ */
+
+
+function isAngularComponentStyles(path) {
+ return path.match(node => node.type === "TemplateLiteral", (node, name) => node.type === "ArrayExpression" && name === "elements", (node, name) => (node.type === "Property" || node.type === "ObjectProperty") && node.key.type === "Identifier" && node.key.name === "styles" && name === "value", ...angularComponentObjectExpressionPredicates);
+}
+
+function isAngularComponentTemplate(path) {
+ return path.match(node => node.type === "TemplateLiteral", (node, name) => (node.type === "Property" || node.type === "ObjectProperty") && node.key.type === "Identifier" && node.key.name === "template" && name === "value", ...angularComponentObjectExpressionPredicates);
+}
+
+const angularComponentObjectExpressionPredicates = [(node, name) => node.type === "ObjectExpression" && name === "properties", (node, name) => node.type === "CallExpression" && node.callee.type === "Identifier" && node.callee.name === "Component" && name === "arguments", (node, name) => node.type === "Decorator" && name === "expression"];
+/**
+ * styled-components template literals
+ */
+
+function isStyledComponents(path) {
+ const parent = path.getParentNode();
+
+ if (!parent || parent.type !== "TaggedTemplateExpression") {
+ return false;
+ }
+
+ const {
+ tag
+ } = parent;
+
+ switch (tag.type) {
+ case "MemberExpression":
+ return (// styled.foo``
+ isStyledIdentifier(tag.object) || // Component.extend``
+ isStyledExtend(tag)
+ );
+
+ case "CallExpression":
+ return (// styled(Component)``
+ isStyledIdentifier(tag.callee) || tag.callee.type === "MemberExpression" && (tag.callee.object.type === "MemberExpression" && ( // styled.foo.attrs({})``
+ isStyledIdentifier(tag.callee.object.object) || // Component.extend.attrs({})``
+ isStyledExtend(tag.callee.object)) || // styled(Component).attrs({})``
+ tag.callee.object.type === "CallExpression" && isStyledIdentifier(tag.callee.object.callee))
+ );
+
+ case "Identifier":
+ // css``
+ return tag.name === "css";
+
+ default:
+ return false;
+ }
+}
+/**
+ * JSX element with CSS prop
+ */
+
+
+function isCssProp(path) {
+ const parent = path.getParentNode();
+ const parentParent = path.getParentNode(1);
+ return parentParent && parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" && parentParent.name.type === "JSXIdentifier" && parentParent.name.name === "css";
+}
+
+function isStyledIdentifier(node) {
+ return node.type === "Identifier" && node.name === "styled";
+}
+
+function isStyledExtend(node) {
+ return /^[A-Z]/.test(node.object.name) && node.property.name === "extend";
+}
+/*
+ * react-relay and graphql-tag
+ * graphql`...`
+ * graphql.experimental`...`
+ * gql`...`
+ * GraphQL comment block
+ *
+ * This intentionally excludes Relay Classic tags, as Prettier does not
+ * support Relay Classic formatting.
+ */
+
+
+function isGraphQL(path) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ return hasLanguageComment(node, "GraphQL") || parent && (parent.type === "TaggedTemplateExpression" && (parent.tag.type === "MemberExpression" && parent.tag.object.name === "graphql" && parent.tag.property.name === "experimental" || parent.tag.type === "Identifier" && (parent.tag.name === "gql" || parent.tag.name === "graphql")) || parent.type === "CallExpression" && parent.callee.type === "Identifier" && parent.callee.name === "graphql");
+}
+
+function hasLanguageComment(node, languageName) {
+ // This checks for a leading comment that is exactly `/* GraphQL */`
+ // In order to be in line with other implementations of this comment tag
+ // we will not trim the comment value and we will expect exactly one space on
+ // either side of the GraphQL string
+ // Also see ./clean.js
+ return hasLeadingComment$1(node, comment => isBlockComment$1(comment) && comment.value === ` ${languageName} `);
+}
+/**
+ * - html`...`
+ * - HTML comment block
+ */
+
+
+function isHtml(path) {
+ return hasLanguageComment(path.getValue(), "HTML") || path.match(node => node.type === "TemplateLiteral", (node, name) => node.type === "TaggedTemplateExpression" && node.tag.type === "Identifier" && node.tag.name === "html" && name === "quasi");
+} // The counter is needed to distinguish nested embeds.
+
+
+let htmlTemplateLiteralCounter = 0;
+
+function printHtmlTemplateLiteral(path, print, textToDoc, parser, options) {
+ const node = path.getValue();
+ const counter = htmlTemplateLiteralCounter;
+ htmlTemplateLiteralCounter = htmlTemplateLiteralCounter + 1 >>> 0;
+
+ const composePlaceholder = index => `PRETTIER_HTML_PLACEHOLDER_${index}_${counter}_IN_JS`;
+
+ const text = node.quasis.map((quasi, index, quasis) => index === quasis.length - 1 ? quasi.value.cooked : quasi.value.cooked + composePlaceholder(index)).join("");
+ const expressionDocs = path.map(print, "expressions");
+
+ if (expressionDocs.length === 0 && text.trim().length === 0) {
+ return "``";
+ }
+
+ const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
+ let topLevelCount = 0;
+ const contentDoc = mapDoc$1(stripTrailingHardline$1(textToDoc(text, {
+ parser,
+
+ __onHtmlRoot(root) {
+ topLevelCount = root.children.length;
+ }
+
+ })), doc => {
+ if (typeof doc !== "string") {
+ return doc;
+ }
+
+ const parts = [];
+ const components = doc.split(placeholderRegex);
+
+ for (let i = 0; i < components.length; i++) {
+ let component = components[i];
+
+ if (i % 2 === 0) {
+ if (component) {
+ component = uncook(component);
+
+ if (options.embeddedInHtml) {
+ component = component.replace(/<\/(script)\b/gi, "<\\/$1");
+ }
+
+ parts.push(component);
+ }
+
+ continue;
+ }
+
+ const placeholderIndex = +component;
+ parts.push(concat$4(["${", group$1(expressionDocs[placeholderIndex]), "}"]));
+ }
+
+ return concat$4(parts);
+ });
+ const leadingWhitespace = /^\s/.test(text) ? " " : "";
+ const trailingWhitespace = /\s$/.test(text) ? " " : "";
+ const linebreak = options.htmlWhitespaceSensitivity === "ignore" ? hardline$3 : leadingWhitespace && trailingWhitespace ? line$2 : null;
+
+ if (linebreak) {
+ return group$1(concat$4(["`", indent$2(concat$4([linebreak, group$1(contentDoc)])), linebreak, "`"]));
+ }
+
+ return group$1(concat$4(["`", leadingWhitespace, topLevelCount > 1 ? indent$2(group$1(contentDoc)) : group$1(contentDoc), trailingWhitespace, "`"]));
+}
+
+var embed_1 = embed;
+
+function clean(ast, newObj, parent) {
+ ["range", "raw", "comments", "leadingComments", "trailingComments", "innerComments", "extra", "start", "end", "flags", "errors"].forEach(name => {
+ delete newObj[name];
+ });
+
+ if (ast.loc && ast.loc.source === null) {
+ delete newObj.loc.source;
+ }
+
+ if (ast.type === "BigIntLiteral") {
+ newObj.value = newObj.value.toLowerCase();
+ } // We remove extra `;` and add them when needed
+
+
+ if (ast.type === "EmptyStatement") {
+ return null;
+ } // We move text around, including whitespaces and add {" "}
+
+
+ if (ast.type === "JSXText") {
+ return null;
+ }
+
+ if (ast.type === "JSXExpressionContainer" && ast.expression.type === "Literal" && ast.expression.value === " ") {
+ return null;
+ } // (TypeScript) Ignore `static` in `constructor(static p) {}`
+ // and `export` in `constructor(export p) {}`
+
+
+ if (ast.type === "TSParameterProperty" && ast.accessibility === null && !ast.readonly) {
+ return {
+ type: "Identifier",
+ name: ast.parameter.name,
+ typeAnnotation: newObj.parameter.typeAnnotation,
+ decorators: newObj.decorators
+ };
+ } // (TypeScript) ignore empty `specifiers` array
+
+
+ if (ast.type === "TSNamespaceExportDeclaration" && ast.specifiers && ast.specifiers.length === 0) {
+ delete newObj.specifiers;
+ } // We convert to
+
+
+ if (ast.type === "JSXOpeningElement") {
+ delete newObj.selfClosing;
+ }
+
+ if (ast.type === "JSXElement") {
+ delete newObj.closingElement;
+ } // We change {'key': value} into {key: value}
+
+
+ if ((ast.type === "Property" || ast.type === "ObjectProperty" || ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && typeof ast.key === "object" && ast.key && (ast.key.type === "Literal" || ast.key.type === "StringLiteral" || ast.key.type === "Identifier")) {
+ delete newObj.key;
+ }
+
+ if (ast.type === "OptionalMemberExpression" && ast.optional === false) {
+ newObj.type = "MemberExpression";
+ delete newObj.optional;
+ } // Remove raw and cooked values from TemplateElement when it's CSS
+ // styled-jsx
+
+
+ if (ast.type === "JSXElement" && ast.openingElement.name.name === "style" && ast.openingElement.attributes.some(attr => attr.name.name === "jsx")) {
+ const templateLiterals = newObj.children.filter(child => child.type === "JSXExpressionContainer" && child.expression.type === "TemplateLiteral").map(container => container.expression);
+ const quasis = templateLiterals.reduce((quasis, templateLiteral) => quasis.concat(templateLiteral.quasis), []);
+ quasis.forEach(q => delete q.value);
+ } // CSS template literals in css prop
+
+
+ if (ast.type === "JSXAttribute" && ast.name.name === "css" && ast.value.type === "JSXExpressionContainer" && ast.value.expression.type === "TemplateLiteral") {
+ newObj.value.expression.quasis.forEach(q => delete q.value);
+ } // Angular Components: Inline HTML template and Inline CSS styles
+
+
+ const expression = ast.expression || ast.callee;
+
+ if (ast.type === "Decorator" && expression.type === "CallExpression" && expression.callee.name === "Component" && expression.arguments.length === 1) {
+ const astProps = ast.expression.arguments[0].properties;
+ newObj.expression.arguments[0].properties.forEach((prop, index) => {
+ let templateLiteral = null;
+
+ switch (astProps[index].key.name) {
+ case "styles":
+ if (prop.value.type === "ArrayExpression") {
+ templateLiteral = prop.value.elements[0];
+ }
+
+ break;
+
+ case "template":
+ if (prop.value.type === "TemplateLiteral") {
+ templateLiteral = prop.value;
+ }
+
+ break;
+ }
+
+ if (templateLiteral) {
+ templateLiteral.quasis.forEach(q => delete q.value);
+ }
+ });
+ } // styled-components, graphql, markdown
+
+
+ if (ast.type === "TaggedTemplateExpression" && (ast.tag.type === "MemberExpression" || ast.tag.type === "Identifier" && (ast.tag.name === "gql" || ast.tag.name === "graphql" || ast.tag.name === "css" || ast.tag.name === "md" || ast.tag.name === "markdown" || ast.tag.name === "html") || ast.tag.type === "CallExpression")) {
+ newObj.quasi.quasis.forEach(quasi => delete quasi.value);
+ }
+
+ if (ast.type === "TemplateLiteral") {
+ // This checks for a leading comment that is exactly `/* GraphQL */`
+ // In order to be in line with other implementations of this comment tag
+ // we will not trim the comment value and we will expect exactly one space on
+ // either side of the GraphQL string
+ // Also see ./embed.js
+ const hasLanguageComment = ast.leadingComments && ast.leadingComments.some(comment => comment.type === "CommentBlock" && ["GraphQL", "HTML"].some(languageName => comment.value === ` ${languageName} `));
+
+ if (hasLanguageComment || parent.type === "CallExpression" && parent.callee.name === "graphql") {
+ newObj.quasis.forEach(quasi => delete quasi.value);
+ }
+ }
+}
+
+var clean_1 = clean;
+
+const detectNewline = string => {
+ if (typeof string !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ const newlines = string.match(/(?:\r?\n)/g) || [];
+
+ if (newlines.length === 0) {
+ return;
+ }
+
+ const crlf = newlines.filter(newline => newline === '\r\n').length;
+ const lf = newlines.length - crlf;
+ return crlf > lf ? '\r\n' : '\n';
+};
+
+var detectNewline_1 = detectNewline;
+
+var graceful = string => typeof string === 'string' && detectNewline(string) || '\n';
+detectNewline_1.graceful = graceful;
+
+var build = createCommonjsModule(function (module, exports) {
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+ exports.extract = extract;
+ exports.strip = strip;
+ exports.parse = parse;
+ exports.parseWithComments = parseWithComments;
+ exports.print = print;
+
+ function _os() {
+ const data = os$1;
+
+ _os = function () {
+ return data;
+ };
+
+ return data;
+ }
+
+ function _detectNewline() {
+ const data = _interopRequireDefault(detectNewline_1);
+
+ _detectNewline = function () {
+ return data;
+ };
+
+ return data;
+ }
+
+ function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ default: obj
+ };
+ }
+ /**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+ const commentEndRe = /\*\/$/;
+ const commentStartRe = /^\/\*\*/;
+ const docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
+ const lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g;
+ const ltrimNewlineRe = /^(\r?\n)+/;
+ const multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;
+ const propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;
+ const stringStartRe = /(\r?\n|^) *\* ?/g;
+
+ function extract(contents) {
+ const match = contents.match(docblockRe);
+ return match ? match[0].trimLeft() : '';
+ }
+
+ function strip(contents) {
+ const match = contents.match(docblockRe);
+ return match && match[0] ? contents.substring(match[0].length) : contents;
+ }
+
+ function parse(docblock) {
+ return parseWithComments(docblock).pragmas;
+ }
+
+ function parseWithComments(docblock) {
+ const line = (0, _detectNewline().default)(docblock) || _os().EOL;
+
+ docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives
+
+ let prev = '';
+
+ while (prev !== docblock) {
+ prev = docblock;
+ docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`);
+ }
+
+ docblock = docblock.replace(ltrimNewlineRe, '').trimRight();
+ const result = Object.create(null);
+ const comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight();
+ let match;
+
+ while (match = propertyRe.exec(docblock)) {
+ // strip linecomments from pragmas
+ const nextPragma = match[2].replace(lineCommentRe, '');
+
+ if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) {
+ result[match[1]] = [].concat(result[match[1]], nextPragma);
+ } else {
+ result[match[1]] = nextPragma;
+ }
+ }
+
+ return {
+ comments,
+ pragmas: result
+ };
+ }
+
+ function print({
+ comments = '',
+ pragmas = {}
+ }) {
+ const line = (0, _detectNewline().default)(comments) || _os().EOL;
+
+ const head = '/**';
+ const start = ' *';
+ const tail = ' */';
+ const keys = Object.keys(pragmas);
+ const printedObject = keys.map(key => printKeyValues(key, pragmas[key])).reduce((arr, next) => arr.concat(next), []).map(keyValue => start + ' ' + keyValue + line).join('');
+
+ if (!comments) {
+ if (keys.length === 0) {
+ return '';
+ }
+
+ if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) {
+ const value = pragmas[keys[0]];
+ return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`;
+ }
+ }
+
+ const printedComments = comments.split(line).map(textLine => `${start} ${textLine}`).join(line) + line;
+ return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail;
+ }
+
+ function printKeyValues(key, valueOrArray) {
+ return [].concat(valueOrArray).map(value => `@${key} ${value}`.trim());
+ }
+});
+unwrapExports(build);
+var build_1 = build.extract;
+var build_2 = build.strip;
+var build_3 = build.parse;
+var build_4 = build.parseWithComments;
+var build_5 = build.print;
+
+function hasPragma(text) {
+ const pragmas = Object.keys(build.parse(build.extract(text)));
+ return pragmas.includes("prettier") || pragmas.includes("format");
+}
+
+function insertPragma(text) {
+ const parsedDocblock = build.parseWithComments(build.extract(text));
+ const pragmas = Object.assign({
+ format: ""
+ }, parsedDocblock.pragmas);
+ const newDocblock = build.print({
+ pragmas,
+ comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines
+
+ }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock)
+
+ const strippedText = build.strip(text);
+ const separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n";
+ return newDocblock + separatingNewlines + strippedText;
+}
+
+var pragma = {
+ hasPragma,
+ insertPragma
+};
+
+const {
+ getLast: getLast$1,
+ hasNewline: hasNewline$3,
+ hasNewlineInRange: hasNewlineInRange$2,
+ hasIgnoreComment: hasIgnoreComment$1,
+ hasNodeIgnoreComment: hasNodeIgnoreComment$1,
+ skipWhitespace: skipWhitespace$2
+} = util$1;
+const isIdentifierName = utils$1.keyword.isIdentifierNameES5; // We match any whitespace except line terminators because
+// Flow annotation comments cannot be split across lines. For example:
+//
+// (this /*
+// : any */).foo = 5;
+//
+// is not picked up by Flow (see https://github.com/facebook/flow/issues/7050), so
+// removing the newline would create a type annotation that the user did not intend
+// to create.
+
+const NON_LINE_TERMINATING_WHITE_SPACE = "(?:(?=.)\\s)";
+const FLOW_SHORTHAND_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*:`);
+const FLOW_ANNOTATION = new RegExp(`^${NON_LINE_TERMINATING_WHITE_SPACE}*::`);
+
+function hasFlowShorthandAnnotationComment(node) {
+ // https://flow.org/en/docs/types/comments/
+ // Syntax example: const r = new (window.Request /*: Class */)("");
+ return node.extra && node.extra.parenthesized && node.trailingComments && node.trailingComments[0].value.match(FLOW_SHORTHAND_ANNOTATION);
+}
+
+function hasFlowAnnotationComment(comments) {
+ return comments && comments[0].value.match(FLOW_ANNOTATION);
+}
+
+function hasNode(node, fn) {
+ if (!node || typeof node !== "object") {
+ return false;
+ }
+
+ if (Array.isArray(node)) {
+ return node.some(value => hasNode(value, fn));
+ }
+
+ const result = fn(node);
+ return typeof result === "boolean" ? result : Object.keys(node).some(key => hasNode(node[key], fn));
+}
+
+function hasNakedLeftSide(node) {
+ return node.type === "AssignmentExpression" || node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression" || node.type === "ConditionalExpression" || node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "BindExpression" || node.type === "UpdateExpression" && !node.prefix || node.type === "TSAsExpression" || node.type === "TSNonNullExpression";
+}
+
+function getLeftSide(node) {
+ if (node.expressions) {
+ return node.expressions[0];
+ }
+
+ return node.left || node.test || node.callee || node.object || node.tag || node.argument || node.expression;
+}
+
+function getLeftSidePathName(path, node) {
+ if (node.expressions) {
+ return ["expressions", 0];
+ }
+
+ if (node.left) {
+ return ["left"];
+ }
+
+ if (node.test) {
+ return ["test"];
+ }
+
+ if (node.object) {
+ return ["object"];
+ }
+
+ if (node.callee) {
+ return ["callee"];
+ }
+
+ if (node.tag) {
+ return ["tag"];
+ }
+
+ if (node.argument) {
+ return ["argument"];
+ }
+
+ if (node.expression) {
+ return ["expression"];
+ }
+
+ throw new Error("Unexpected node has no left side", node);
+}
+
+const exportDeclarationTypes = new Set(["ExportDefaultDeclaration", "ExportDefaultSpecifier", "DeclareExportDeclaration", "ExportNamedDeclaration", "ExportAllDeclaration"]);
+
+function isExportDeclaration(node) {
+ return node && exportDeclarationTypes.has(node.type);
+}
+
+function getParentExportDeclaration(path) {
+ const parentNode = path.getParentNode();
+
+ if (path.getName() === "declaration" && isExportDeclaration(parentNode)) {
+ return parentNode;
+ }
+
+ return null;
+}
+
+function isLiteral(node) {
+ return node.type === "BooleanLiteral" || node.type === "DirectiveLiteral" || node.type === "Literal" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "RegExpLiteral" || node.type === "StringLiteral" || node.type === "TemplateLiteral" || node.type === "TSTypeLiteral" || node.type === "JSXText";
+}
+
+function isNumericLiteral(node) {
+ return node.type === "NumericLiteral" || node.type === "Literal" && typeof node.value === "number";
+}
+
+function isStringLiteral(node) {
+ return node.type === "StringLiteral" || node.type === "Literal" && typeof node.value === "string";
+}
+
+function isObjectType(n) {
+ return n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral";
+}
+
+function isFunctionOrArrowExpression(node) {
+ return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression";
+}
+
+function isFunctionOrArrowExpressionWithBody(node) {
+ return node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement";
+}
+
+function isTemplateLiteral(node) {
+ return node.type === "TemplateLiteral";
+} // `inject` is used in AngularJS 1.x, `async` in Angular 2+
+// example: https://docs.angularjs.org/guide/unit-testing#using-beforeall-
+
+
+function isAngularTestWrapper(node) {
+ return (node.type === "CallExpression" || node.type === "OptionalCallExpression") && node.callee.type === "Identifier" && (node.callee.name === "async" || node.callee.name === "inject" || node.callee.name === "fakeAsync");
+}
+
+function isJSXNode(node) {
+ return node.type === "JSXElement" || node.type === "JSXFragment";
+}
+
+function isTheOnlyJSXElementInMarkdown(options, path) {
+ if (options.parentParser !== "markdown" && options.parentParser !== "mdx") {
+ return false;
+ }
+
+ const node = path.getNode();
+
+ if (!node.expression || !isJSXNode(node.expression)) {
+ return false;
+ }
+
+ const parent = path.getParentNode();
+ return parent.type === "Program" && parent.body.length === 1;
+} // Detect an expression node representing `{" "}`
+
+
+function isJSXWhitespaceExpression(node) {
+ return node.type === "JSXExpressionContainer" && isLiteral(node.expression) && node.expression.value === " " && !node.expression.comments;
+}
+
+function isMemberExpressionChain(node) {
+ if (node.type !== "MemberExpression" && node.type !== "OptionalMemberExpression") {
+ return false;
+ }
+
+ if (node.object.type === "Identifier") {
+ return true;
+ }
+
+ return isMemberExpressionChain(node.object);
+}
+
+function isGetterOrSetter(node) {
+ return node.kind === "get" || node.kind === "set";
+}
+
+function sameLocStart(nodeA, nodeB, options) {
+ return options.locStart(nodeA) === options.locStart(nodeB);
+} // TODO: This is a bad hack and we need a better way to distinguish between
+// arrow functions and otherwise
+
+
+function isFunctionNotation(node, options) {
+ return isGetterOrSetter(node) || sameLocStart(node, node.value, options);
+} // Hack to differentiate between the following two which have the same ast
+// type T = { method: () => void };
+// type T = { method(): void };
+
+
+function isObjectTypePropertyAFunction(node, options) {
+ return (node.type === "ObjectTypeProperty" || node.type === "ObjectTypeInternalSlot") && node.value.type === "FunctionTypeAnnotation" && !node.static && !isFunctionNotation(node, options);
+} // Hack to differentiate between the following two which have the same ast
+// declare function f(a): void;
+// var f: (a) => void;
+
+
+function isTypeAnnotationAFunction(node, options) {
+ return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
+}
+
+const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
+
+function isBinaryish(node) {
+ return binaryishNodeTypes.has(node.type);
+}
+
+function isMemberish(node) {
+ return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "BindExpression" && node.object;
+}
+
+function isSimpleFlowType(node) {
+ const flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"];
+ return node && flowTypeAnnotations.includes(node.type) && !(node.type === "GenericTypeAnnotation" && node.typeParameters);
+}
+
+const unitTestRe = /^(skip|[fx]?(it|describe|test))$/;
+
+function isSkipOrOnlyBlock(node) {
+ return (node.callee.type === "MemberExpression" || node.callee.type === "OptionalMemberExpression") && node.callee.object.type === "Identifier" && node.callee.property.type === "Identifier" && unitTestRe.test(node.callee.object.name) && (node.callee.property.name === "only" || node.callee.property.name === "skip");
+}
+
+function isUnitTestSetUp(n) {
+ const unitTestSetUpRe = /^(before|after)(Each|All)$/;
+ return n.callee.type === "Identifier" && unitTestSetUpRe.test(n.callee.name) && n.arguments.length === 1;
+} // eg; `describe("some string", (done) => {})`
+
+
+function isTestCall(n, parent) {
+ if (n.type !== "CallExpression") {
+ return false;
+ }
+
+ if (n.arguments.length === 1) {
+ if (isAngularTestWrapper(n) && parent && isTestCall(parent)) {
+ return isFunctionOrArrowExpression(n.arguments[0]);
+ }
+
+ if (isUnitTestSetUp(n)) {
+ return isAngularTestWrapper(n.arguments[0]);
+ }
+ } else if (n.arguments.length === 2 || n.arguments.length === 3) {
+ if ((n.callee.type === "Identifier" && unitTestRe.test(n.callee.name) || isSkipOrOnlyBlock(n)) && (isTemplateLiteral(n.arguments[0]) || isStringLiteral(n.arguments[0]))) {
+ // it("name", () => { ... }, 2500)
+ if (n.arguments[2] && !isNumericLiteral(n.arguments[2])) {
+ return false;
+ }
+
+ return (n.arguments.length === 2 ? isFunctionOrArrowExpression(n.arguments[1]) : isFunctionOrArrowExpressionWithBody(n.arguments[1]) && n.arguments[1].params.length <= 1) || isAngularTestWrapper(n.arguments[1]);
+ }
+ }
+
+ return false;
+}
+
+function hasLeadingComment$2(node) {
+ return node.comments && node.comments.some(comment => comment.leading);
+}
+
+function hasTrailingComment(node) {
+ return node.comments && node.comments.some(comment => comment.trailing);
+}
+
+function isCallOrOptionalCallExpression(node) {
+ return node.type === "CallExpression" || node.type === "OptionalCallExpression";
+}
+
+function hasDanglingComments(node) {
+ return node.comments && node.comments.some(comment => !comment.leading && !comment.trailing);
+}
+/** identify if an angular expression seems to have side effects */
+
+
+function hasNgSideEffect(path) {
+ return hasNode(path.getValue(), node => {
+ switch (node.type) {
+ case undefined:
+ return false;
+
+ case "CallExpression":
+ case "OptionalCallExpression":
+ case "AssignmentExpression":
+ return true;
+ }
+ });
+}
+
+function isNgForOf(node, index, parentNode) {
+ return node.type === "NGMicrosyntaxKeyedExpression" && node.key.name === "of" && index === 1 && parentNode.body[0].type === "NGMicrosyntaxLet" && parentNode.body[0].value === null;
+}
+/** @param node {import("estree").TemplateLiteral} */
+
+
+function isSimpleTemplateLiteral(node) {
+ if (node.expressions.length === 0) {
+ return false;
+ }
+
+ return node.expressions.every(expr => {
+ // Disallow comments since printDocToString can't print them here
+ if (expr.comments) {
+ return false;
+ } // Allow `x` and `this`
+
+
+ if (expr.type === "Identifier" || expr.type === "ThisExpression") {
+ return true;
+ } // Allow `a.b.c`, `a.b[c]`, and `this.x.y`
+
+
+ if (expr.type === "MemberExpression" || expr.type === "OptionalMemberExpression") {
+ let head = expr;
+
+ while (head.type === "MemberExpression" || head.type === "OptionalMemberExpression") {
+ if (head.property.type !== "Identifier" && head.property.type !== "Literal" && head.property.type !== "StringLiteral" && head.property.type !== "NumericLiteral") {
+ return false;
+ }
+
+ head = head.object;
+
+ if (head.comments) {
+ return false;
+ }
+ }
+
+ if (head.type === "Identifier" || head.type === "ThisExpression") {
+ return true;
+ }
+
+ return false;
+ }
+
+ return false;
+ });
+}
+
+function getFlowVariance(path) {
+ if (!path.variance) {
+ return null;
+ } // Babel 7.0 currently uses variance node type, and flow should
+ // follow suit soon:
+ // https://github.com/babel/babel/issues/4722
+
+
+ const variance = path.variance.kind || path.variance;
+
+ switch (variance) {
+ case "plus":
+ return "+";
+
+ case "minus":
+ return "-";
+
+ default:
+ /* istanbul ignore next */
+ return variance;
+ }
+}
+
+function classPropMayCauseASIProblems(path) {
+ const node = path.getNode();
+
+ if (node.type !== "ClassProperty") {
+ return false;
+ }
+
+ const name = node.key && node.key.name; // this isn't actually possible yet with most parsers available today
+ // so isn't properly tested yet.
+
+ if ((name === "static" || name === "get" || name === "set") && !node.value && !node.typeAnnotation) {
+ return true;
+ }
+}
+
+function classChildNeedsASIProtection(node) {
+ if (!node) {
+ return;
+ }
+
+ if (node.static || node.accessibility // TypeScript
+ ) {
+ return false;
+ }
+
+ if (!node.computed) {
+ const name = node.key && node.key.name;
+
+ if (name === "in" || name === "instanceof") {
+ return true;
+ }
+ }
+
+ switch (node.type) {
+ case "ClassProperty":
+ case "TSAbstractClassProperty":
+ return node.computed;
+
+ case "MethodDefinition": // Flow
+
+ case "TSAbstractMethodDefinition": // TypeScript
+
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ {
+ // Babel
+ const isAsync = node.value ? node.value.async : node.async;
+ const isGenerator = node.value ? node.value.generator : node.generator;
+
+ if (isAsync || node.kind === "get" || node.kind === "set") {
+ return false;
+ }
+
+ if (node.computed || isGenerator) {
+ return true;
+ }
+
+ return false;
+ }
+
+ case "TSIndexSignature":
+ return true;
+
+ default:
+ /* istanbul ignore next */
+ return false;
+ }
+}
+
+function getTypeScriptMappedTypeModifier(tokenNode, keyword) {
+ if (tokenNode === "+") {
+ return "+" + keyword;
+ } else if (tokenNode === "-") {
+ return "-" + keyword;
+ }
+
+ return keyword;
+}
+
+function hasNewlineBetweenOrAfterDecorators(node, options) {
+ return hasNewlineInRange$2(options.originalText, options.locStart(node.decorators[0]), options.locEnd(getLast$1(node.decorators))) || hasNewline$3(options.originalText, options.locEnd(getLast$1(node.decorators)));
+} // Only space, newline, carriage return, and tab are treated as whitespace
+// inside JSX.
+
+
+const jsxWhitespaceChars = " \n\r\t";
+const matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)");
+const containsNonJsxWhitespaceRegex = new RegExp("[^" + jsxWhitespaceChars + "]"); // Meaningful if it contains non-whitespace characters,
+// or it contains whitespace without a new line.
+
+function isMeaningfulJSXText(node) {
+ return isLiteral(node) && (containsNonJsxWhitespaceRegex.test(rawText(node)) || !/\n/.test(rawText(node)));
+}
+
+function hasJsxIgnoreComment(path) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+
+ if (!parent || !node || !isJSXNode(node) || !isJSXNode(parent)) {
+ return false;
+ } // Lookup the previous sibling, ignoring any empty JSXText elements
+
+
+ const index = parent.children.indexOf(node);
+ let prevSibling = null;
+
+ for (let i = index; i > 0; i--) {
+ const candidate = parent.children[i - 1];
+
+ if (candidate.type === "JSXText" && !isMeaningfulJSXText(candidate)) {
+ continue;
+ }
+
+ prevSibling = candidate;
+ break;
+ }
+
+ return prevSibling && prevSibling.type === "JSXExpressionContainer" && prevSibling.expression.type === "JSXEmptyExpression" && prevSibling.expression.comments && prevSibling.expression.comments.find(comment => comment.value.trim() === "prettier-ignore");
+}
+
+function isEmptyJSXElement(node) {
+ if (node.children.length === 0) {
+ return true;
+ }
+
+ if (node.children.length > 1) {
+ return false;
+ } // if there is one text child and does not contain any meaningful text
+ // we can treat the element as empty.
+
+
+ const child = node.children[0];
+ return isLiteral(child) && !isMeaningfulJSXText(child);
+}
+
+function hasPrettierIgnore(path) {
+ return hasIgnoreComment$1(path) || hasJsxIgnoreComment(path);
+}
+
+function isLastStatement(path) {
+ const parent = path.getParentNode();
+
+ if (!parent) {
+ return true;
+ }
+
+ const node = path.getValue();
+ const body = (parent.body || parent.consequent).filter(stmt => stmt.type !== "EmptyStatement");
+ return body && body[body.length - 1] === node;
+}
+
+function isFlowAnnotationComment(text, typeAnnotation, options) {
+ const start = options.locStart(typeAnnotation);
+ const end = skipWhitespace$2(text, options.locEnd(typeAnnotation));
+ return text.slice(start, start + 2) === "/*" && text.slice(end, end + 2) === "*/";
+}
+
+function hasLeadingOwnLineComment(text, node, options) {
+ if (isJSXNode(node)) {
+ return hasNodeIgnoreComment$1(node);
+ }
+
+ const res = node.comments && node.comments.some(comment => comment.leading && hasNewline$3(text, options.locEnd(comment)));
+ return res;
+} // This recurses the return argument, looking for the first token
+// (the leftmost leaf node) and, if it (or its parents) has any
+// leadingComments, returns true (so it can be wrapped in parens).
+
+
+function returnArgumentHasLeadingComment(options, argument) {
+ if (hasLeadingOwnLineComment(options.originalText, argument, options)) {
+ return true;
+ }
+
+ if (hasNakedLeftSide(argument)) {
+ let leftMost = argument;
+ let newLeftMost;
+
+ while (newLeftMost = getLeftSide(leftMost)) {
+ leftMost = newLeftMost;
+
+ if (hasLeadingOwnLineComment(options.originalText, leftMost, options)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function isStringPropSafeToCoerceToIdentifier(node, options) {
+ return isStringLiteral(node.key) && isIdentifierName(node.key.value) && options.parser !== "json" && // With `--strictPropertyInitialization`, TS treats properties with quoted names differently than unquoted ones.
+ // See https://github.com/microsoft/TypeScript/pull/20075
+ !((options.parser === "typescript" || options.parser === "babel-ts") && node.type === "ClassProperty");
+}
+
+function isJestEachTemplateLiteral(node, parentNode) {
+ /**
+ * describe.each`table`(name, fn)
+ * describe.only.each`table`(name, fn)
+ * describe.skip.each`table`(name, fn)
+ * test.each`table`(name, fn)
+ * test.only.each`table`(name, fn)
+ * test.skip.each`table`(name, fn)
+ *
+ * Ref: https://github.com/facebook/jest/pull/6102
+ */
+ const jestEachTriggerRegex = /^[xf]?(describe|it|test)$/;
+ return parentNode.type === "TaggedTemplateExpression" && parentNode.quasi === node && parentNode.tag.type === "MemberExpression" && parentNode.tag.property.type === "Identifier" && parentNode.tag.property.name === "each" && (parentNode.tag.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.name) || parentNode.tag.object.type === "MemberExpression" && parentNode.tag.object.property.type === "Identifier" && (parentNode.tag.object.property.name === "only" || parentNode.tag.object.property.name === "skip") && parentNode.tag.object.object.type === "Identifier" && jestEachTriggerRegex.test(parentNode.tag.object.object.name));
+}
+
+function templateLiteralHasNewLines(template) {
+ return template.quasis.some(quasi => quasi.value.raw.includes("\n"));
+}
+
+function isTemplateOnItsOwnLine(n, text, options) {
+ return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !hasNewline$3(text, options.locStart(n), {
+ backwards: true
+ });
+}
+
+function needsHardlineAfterDanglingComment(node) {
+ if (!node.comments) {
+ return false;
+ }
+
+ const lastDanglingComment = getLast$1(node.comments.filter(comment => !comment.leading && !comment.trailing));
+ return lastDanglingComment && !comments$1.isBlockComment(lastDanglingComment);
+} // If we have nested conditional expressions, we want to print them in JSX mode
+// if there's at least one JSXElement somewhere in the tree.
+//
+// A conditional expression chain like this should be printed in normal mode,
+// because there aren't JSXElements anywhere in it:
+//
+// isA ? "A" : isB ? "B" : isC ? "C" : "Unknown";
+//
+// But a conditional expression chain like this should be printed in JSX mode,
+// because there is a JSXElement in the last ConditionalExpression:
+//
+// isA ? "A" : isB ? "B" : isC ? "C" : Unknown;
+//
+// This type of ConditionalExpression chain is structured like this in the AST:
+//
+// ConditionalExpression {
+// test: ...,
+// consequent: ...,
+// alternate: ConditionalExpression {
+// test: ...,
+// consequent: ...,
+// alternate: ConditionalExpression {
+// test: ...,
+// consequent: ...,
+// alternate: ...,
+// }
+// }
+// }
+//
+// We want to traverse over that shape and convert it into a flat structure so
+// that we can find if there's a JSXElement somewhere inside.
+
+
+function getConditionalChainContents(node) {
+ // Given this code:
+ //
+ // // Using a ConditionalExpression as the consequent is uncommon, but should
+ // // be handled.
+ // A ? B : C ? D : E ? F ? G : H : I
+ //
+ // which has this AST:
+ //
+ // ConditionalExpression {
+ // test: Identifier(A),
+ // consequent: Identifier(B),
+ // alternate: ConditionalExpression {
+ // test: Identifier(C),
+ // consequent: Identifier(D),
+ // alternate: ConditionalExpression {
+ // test: Identifier(E),
+ // consequent: ConditionalExpression {
+ // test: Identifier(F),
+ // consequent: Identifier(G),
+ // alternate: Identifier(H),
+ // },
+ // alternate: Identifier(I),
+ // }
+ // }
+ // }
+ //
+ // we should return this Array:
+ //
+ // [
+ // Identifier(A),
+ // Identifier(B),
+ // Identifier(C),
+ // Identifier(D),
+ // Identifier(E),
+ // Identifier(F),
+ // Identifier(G),
+ // Identifier(H),
+ // Identifier(I)
+ // ];
+ //
+ // This loses the information about whether each node was the test,
+ // consequent, or alternate, but we don't care about that here- we are only
+ // flattening this structure to find if there's any JSXElements inside.
+ const nonConditionalExpressions = [];
+
+ function recurse(node) {
+ if (node.type === "ConditionalExpression") {
+ recurse(node.test);
+ recurse(node.consequent);
+ recurse(node.alternate);
+ } else {
+ nonConditionalExpressions.push(node);
+ }
+ }
+
+ recurse(node);
+ return nonConditionalExpressions;
+}
+
+function conditionalExpressionChainContainsJSX(node) {
+ return Boolean(getConditionalChainContents(node).find(isJSXNode));
+} // Logic to check for args with multiple anonymous functions. For instance,
+// the following call should be split on multiple lines for readability:
+// source.pipe(map((x) => x + x), filter((x) => x % 2 === 0))
+
+
+function isFunctionCompositionArgs(args) {
+ if (args.length <= 1) {
+ return false;
+ }
+
+ let count = 0;
+
+ for (const arg of args) {
+ if (isFunctionOrArrowExpression(arg)) {
+ count += 1;
+
+ if (count > 1) {
+ return true;
+ }
+ } else if (isCallOrOptionalCallExpression(arg)) {
+ for (const childArg of arg.arguments) {
+ if (isFunctionOrArrowExpression(childArg)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+} // Logic to determine if a call is a “long curried function call”.
+// See https://github.com/prettier/prettier/issues/1420.
+//
+// `connect(a, b, c)(d)`
+// In the above call expression, the second call is the parent node and the
+// first call is the current node.
+
+
+function isLongCurriedCallExpression(path) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ return isCallOrOptionalCallExpression(node) && isCallOrOptionalCallExpression(parent) && parent.callee === node && node.arguments.length > parent.arguments.length && parent.arguments.length > 0;
+}
+/**
+ * @param {import('estree').Node} node
+ * @param {number} depth
+ * @returns {boolean}
+ */
+
+
+function isSimpleCallArgument(node, depth) {
+ if (depth >= 2) {
+ return false;
+ }
+
+ const isChildSimple = child => isSimpleCallArgument(child, depth + 1);
+
+ const regexpPattern = node.type === "Literal" && node.regex && node.regex.pattern || node.type === "RegExpLiteral" && node.pattern;
+
+ if (regexpPattern && regexpPattern.length > 5) {
+ return false;
+ }
+
+ if (node.type === "Literal" || node.type === "BooleanLiteral" || node.type === "NullLiteral" || node.type === "NumericLiteral" || node.type === "StringLiteral" || node.type === "Identifier" || node.type === "ThisExpression" || node.type === "Super" || node.type === "BigIntLiteral" || node.type === "PrivateName" || node.type === "ArgumentPlaceholder" || node.type === "RegExpLiteral" || node.type === "Import") {
+ return true;
+ }
+
+ if (node.type === "TemplateLiteral") {
+ return node.expressions.every(isChildSimple);
+ }
+
+ if (node.type === "ObjectExpression") {
+ return node.properties.every(p => !p.computed && (p.shorthand || p.value && isChildSimple(p.value)));
+ }
+
+ if (node.type === "ArrayExpression") {
+ return node.elements.every(x => x == null || isChildSimple(x));
+ }
+
+ if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
+ return isSimpleCallArgument(node.callee, depth) && node.arguments.every(isChildSimple);
+ }
+
+ if (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") {
+ return isSimpleCallArgument(node.object, depth) && isSimpleCallArgument(node.property, depth);
+ }
+
+ if (node.type === "UnaryExpression" && (node.operator === "!" || node.operator === "-")) {
+ return isSimpleCallArgument(node.argument, depth);
+ }
+
+ if (node.type === "TSNonNullExpression") {
+ return isSimpleCallArgument(node.expression, depth);
+ }
+
+ return false;
+}
+
+function rawText(node) {
+ return node.extra ? node.extra.raw : node.raw;
+}
+
+function identity$1(x) {
+ return x;
+}
+
+function isTSXFile(options) {
+ return options.filepath && /\.tsx$/i.test(options.filepath);
+}
+
+var utils$6 = {
+ classChildNeedsASIProtection,
+ classPropMayCauseASIProblems,
+ conditionalExpressionChainContainsJSX,
+ getFlowVariance,
+ getLeftSidePathName,
+ getParentExportDeclaration,
+ getTypeScriptMappedTypeModifier,
+ hasDanglingComments,
+ hasFlowAnnotationComment,
+ hasFlowShorthandAnnotationComment,
+ hasLeadingComment: hasLeadingComment$2,
+ hasLeadingOwnLineComment,
+ hasNakedLeftSide,
+ hasNewlineBetweenOrAfterDecorators,
+ hasNgSideEffect,
+ hasNode,
+ hasPrettierIgnore,
+ hasTrailingComment,
+ identity: identity$1,
+ isBinaryish,
+ isCallOrOptionalCallExpression,
+ isEmptyJSXElement,
+ isExportDeclaration,
+ isFlowAnnotationComment,
+ isFunctionCompositionArgs,
+ isFunctionNotation,
+ isFunctionOrArrowExpression,
+ isGetterOrSetter,
+ isJestEachTemplateLiteral,
+ isJSXNode,
+ isJSXWhitespaceExpression,
+ isLastStatement,
+ isLiteral,
+ isLongCurriedCallExpression,
+ isSimpleCallArgument,
+ isMeaningfulJSXText,
+ isMemberExpressionChain,
+ isMemberish,
+ isNgForOf,
+ isNumericLiteral,
+ isObjectType,
+ isObjectTypePropertyAFunction,
+ isSimpleFlowType,
+ isSimpleTemplateLiteral,
+ isStringLiteral,
+ isStringPropSafeToCoerceToIdentifier,
+ isTemplateOnItsOwnLine,
+ isTestCall,
+ isTheOnlyJSXElementInMarkdown,
+ isTSXFile,
+ isTypeAnnotationAFunction,
+ matchJsxWhitespaceRegex,
+ needsHardlineAfterDanglingComment,
+ rawText,
+ returnArgumentHasLeadingComment
+};
+
+const {
+ getLeftSidePathName: getLeftSidePathName$1,
+ hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$1,
+ hasNakedLeftSide: hasNakedLeftSide$1,
+ hasNode: hasNode$1
+} = utils$6;
+
+function needsParens(path, options) {
+ const parent = path.getParentNode();
+
+ if (!parent) {
+ return false;
+ }
+
+ const name = path.getName();
+ const node = path.getNode(); // If the value of this path is some child of a Node and not a Node
+ // itself, then it doesn't need parentheses. Only Node objects (in
+ // fact, only Expression nodes) need parentheses.
+
+ if (path.getValue() !== node) {
+ return false;
+ } // to avoid unexpected `}}` in HTML interpolations
+
+
+ if (options.__isInHtmlInterpolation && !options.bracketSpacing && endsWithRightBracket(node) && isFollowedByRightBracket(path)) {
+ return true;
+ } // Only statements don't need parentheses.
+
+
+ if (isStatement(node)) {
+ return false;
+ }
+
+ if ( // Preserve parens if we have a Flow annotation comment, unless we're using the Flow
+ // parser. The Flow parser turns Flow comments into type annotation nodes in its
+ // AST, which we handle separately.
+ options.parser !== "flow" && hasFlowShorthandAnnotationComment$1(path.getValue())) {
+ return true;
+ } // Identifiers never need parentheses.
+
+
+ if (node.type === "Identifier") {
+ // ...unless those identifiers are embed placeholders. They might be substituted by complex
+ // expressions, so the parens around them should not be dropped. Example (JS-in-HTML-in-JS):
+ // let tpl = html``;
+ // If the inner JS formatter removes the parens, the expression might change its meaning:
+ // f((a + b) / 2) vs f(a + b / 2)
+ if (node.extra && node.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(node.name)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ if (parent.type === "ParenthesizedExpression") {
+ return false;
+ } // Add parens around the extends clause of a class. It is needed for almost
+ // all expressions.
+
+
+ if ((parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node && (node.type === "ArrowFunctionExpression" || node.type === "AssignmentExpression" || node.type === "AwaitExpression" || node.type === "BinaryExpression" || node.type === "ConditionalExpression" || node.type === "LogicalExpression" || node.type === "NewExpression" || node.type === "ObjectExpression" || node.type === "ParenthesizedExpression" || node.type === "SequenceExpression" || node.type === "TaggedTemplateExpression" || node.type === "UnaryExpression" || node.type === "UpdateExpression" || node.type === "YieldExpression")) {
+ return true;
+ }
+
+ if (parent.type === "ExportDefaultDeclaration") {
+ return (// `export default function` or `export default class` can't be followed by
+ // anything after. So an expression like `export default (function(){}).toString()`
+ // needs to be followed by a parentheses
+ shouldWrapFunctionForExportDefault(path, options) || // `export default (foo, bar)` also needs parentheses
+ node.type === "SequenceExpression"
+ );
+ }
+
+ if (parent.type === "Decorator" && parent.expression === node) {
+ let hasCallExpression = false;
+ let hasMemberExpression = false;
+ let current = node;
+
+ while (current) {
+ switch (current.type) {
+ case "MemberExpression":
+ hasMemberExpression = true;
+ current = current.object;
+ break;
+
+ case "CallExpression":
+ if (
+ /** @(x().y) */
+ hasMemberExpression ||
+ /** @(x().y()) */
+ hasCallExpression) {
+ return true;
+ }
+
+ hasCallExpression = true;
+ current = current.callee;
+ break;
+
+ case "Identifier":
+ return false;
+
+ default:
+ return true;
+ }
+ }
+
+ return true;
+ }
+
+ if (parent.type === "ArrowFunctionExpression" && parent.body === node && node.type !== "SequenceExpression" && // these have parens added anyway
+ util$1.startsWithNoLookaheadToken(node,
+ /* forbidFunctionClassAndDoExpr */
+ false) || parent.type === "ExpressionStatement" && util$1.startsWithNoLookaheadToken(node,
+ /* forbidFunctionClassAndDoExpr */
+ true)) {
+ return true;
+ }
+
+ switch (node.type) {
+ case "SpreadElement":
+ case "SpreadProperty":
+ return parent.type === "MemberExpression" && name === "object" && parent.object === node;
+
+ case "UpdateExpression":
+ if (parent.type === "UnaryExpression") {
+ return node.prefix && (node.operator === "++" && parent.operator === "+" || node.operator === "--" && parent.operator === "-");
+ }
+
+ // else fallthrough
+
+ case "UnaryExpression":
+ switch (parent.type) {
+ case "UnaryExpression":
+ return node.operator === parent.operator && (node.operator === "+" || node.operator === "-");
+
+ case "BindExpression":
+ return true;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ case "TaggedTemplateExpression":
+ return true;
+
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "BinaryExpression":
+ return parent.operator === "**" && name === "left";
+
+ case "TSNonNullExpression":
+ return true;
+
+ default:
+ return false;
+ }
+
+ case "BinaryExpression":
+ {
+ if (parent.type === "UpdateExpression") {
+ return true;
+ }
+
+ const isLeftOfAForStatement = node => {
+ let i = 0;
+
+ while (node) {
+ const parent = path.getParentNode(i++);
+
+ if (!parent) {
+ return false;
+ }
+
+ if (parent.type === "ForStatement" && parent.init === node) {
+ return true;
+ }
+
+ node = parent;
+ }
+
+ return false;
+ };
+
+ if (node.operator === "in" && isLeftOfAForStatement(node)) {
+ return true;
+ }
+ }
+ // fallthrough
+
+ case "TSTypeAssertion":
+ case "TSAsExpression":
+ case "LogicalExpression":
+ switch (parent.type) {
+ case "ConditionalExpression":
+ return node.type === "TSAsExpression";
+
+ case "CallExpression":
+ case "NewExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "ClassExpression":
+ case "ClassDeclaration":
+ return name === "superClass" && parent.superClass === node;
+
+ case "TSTypeAssertion":
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "JSXSpreadAttribute":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "BindExpression":
+ case "AwaitExpression":
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "UpdateExpression":
+ return true;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ case "AssignmentExpression":
+ return parent.left === node && (node.type === "TSTypeAssertion" || node.type === "TSAsExpression");
+
+ case "LogicalExpression":
+ if (node.type === "LogicalExpression") {
+ return parent.operator !== node.operator;
+ }
+
+ // else fallthrough
+
+ case "BinaryExpression":
+ {
+ if (!node.operator && node.type !== "TSTypeAssertion") {
+ return true;
+ }
+
+ const po = parent.operator;
+ const pp = util$1.getPrecedence(po);
+ const no = node.operator;
+ const np = util$1.getPrecedence(no);
+
+ if (pp > np) {
+ return true;
+ }
+
+ if (pp === np && name === "right") {
+ assert$1.strictEqual(parent.right, node);
+ return true;
+ }
+
+ if (pp === np && !util$1.shouldFlatten(po, no)) {
+ return true;
+ }
+
+ if (pp < np && no === "%") {
+ return po === "+" || po === "-";
+ } // Add parenthesis when working with bitwise operators
+ // It's not strictly needed but helps with code understanding
+
+
+ if (util$1.isBitwiseOperator(po)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ default:
+ return false;
+ }
+
+ case "SequenceExpression":
+ switch (parent.type) {
+ case "ReturnStatement":
+ return false;
+
+ case "ForStatement":
+ // Although parentheses wouldn't hurt around sequence
+ // expressions in the head of for loops, traditional style
+ // dictates that e.g. i++, j++ should not be wrapped with
+ // parentheses.
+ return false;
+
+ case "ExpressionStatement":
+ return name !== "expression";
+
+ case "ArrowFunctionExpression":
+ // We do need parentheses, but SequenceExpressions are handled
+ // specially when printing bodies of arrow functions.
+ return name !== "body";
+
+ default:
+ // Otherwise err on the side of overparenthesization, adding
+ // explicit exceptions above if this proves overzealous.
+ return true;
+ }
+
+ case "YieldExpression":
+ if (parent.type === "UnaryExpression" || parent.type === "AwaitExpression" || parent.type === "TSAsExpression" || parent.type === "TSNonNullExpression") {
+ return true;
+ }
+
+ // else fallthrough
+
+ case "AwaitExpression":
+ switch (parent.type) {
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "BindExpression":
+ return true;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "ConditionalExpression":
+ return parent.test === node;
+
+ default:
+ return false;
+ }
+
+ case "TSJSDocFunctionType":
+ case "TSConditionalType":
+ if (parent.type === "TSConditionalType" && node === parent.extendsType) {
+ return true;
+ }
+
+ // fallthrough
+
+ case "TSFunctionType":
+ case "TSConstructorType":
+ if (parent.type === "TSConditionalType" && node === parent.checkType) {
+ return true;
+ }
+
+ // fallthrough
+
+ case "TSUnionType":
+ case "TSIntersectionType":
+ if (parent.type === "TSUnionType" || parent.type === "TSIntersectionType") {
+ return true;
+ }
+
+ // fallthrough
+
+ case "TSTypeOperator":
+ case "TSInferType":
+ return parent.type === "TSArrayType" || parent.type === "TSOptionalType" || parent.type === "TSRestType" || parent.type === "TSIndexedAccessType" && node === parent.objectType || parent.type === "TSTypeOperator" || parent.type === "TSTypeAnnotation" && /^TSJSDoc/.test(path.getParentNode(1).type);
+
+ case "ArrayTypeAnnotation":
+ return parent.type === "NullableTypeAnnotation";
+
+ case "IntersectionTypeAnnotation":
+ case "UnionTypeAnnotation":
+ return parent.type === "ArrayTypeAnnotation" || parent.type === "NullableTypeAnnotation" || parent.type === "IntersectionTypeAnnotation" || parent.type === "UnionTypeAnnotation";
+
+ case "NullableTypeAnnotation":
+ return parent.type === "ArrayTypeAnnotation";
+
+ case "FunctionTypeAnnotation":
+ {
+ const ancestor = parent.type === "NullableTypeAnnotation" ? path.getParentNode(1) : parent;
+ return ancestor.type === "UnionTypeAnnotation" || ancestor.type === "IntersectionTypeAnnotation" || ancestor.type === "ArrayTypeAnnotation" || // We should check ancestor's parent to know whether the parentheses
+ // are really needed, but since ??T doesn't make sense this check
+ // will almost never be true.
+ ancestor.type === "NullableTypeAnnotation";
+ }
+
+ case "StringLiteral":
+ case "NumericLiteral":
+ case "Literal":
+ if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
+ // See corresponding workaround in printer.js case: "Literal"
+ options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.charAt(options.locStart(node) - 1) === "(")) {
+ // To avoid becoming a directive
+ const grandParent = path.getParentNode(1);
+ return grandParent.type === "Program" || grandParent.type === "BlockStatement";
+ }
+
+ return parent.type === "MemberExpression" && typeof node.value === "number" && name === "object" && parent.object === node;
+
+ case "AssignmentExpression":
+ {
+ const grandParent = path.getParentNode(1);
+
+ if (parent.type === "ArrowFunctionExpression" && parent.body === node) {
+ return true;
+ } else if (parent.type === "ClassProperty" && parent.key === node && parent.computed) {
+ return false;
+ } else if (parent.type === "TSPropertySignature" && parent.name === node) {
+ return false;
+ } else if (parent.type === "ForStatement" && (parent.init === node || parent.update === node)) {
+ return false;
+ } else if (parent.type === "ExpressionStatement") {
+ return node.left.type === "ObjectPattern";
+ } else if (parent.type === "TSPropertySignature" && parent.key === node) {
+ return false;
+ } else if (parent.type === "AssignmentExpression") {
+ return false;
+ } else if (parent.type === "SequenceExpression" && grandParent && grandParent.type === "ForStatement" && (grandParent.init === parent || grandParent.update === parent)) {
+ return false;
+ } else if (parent.type === "Property" && parent.value === node) {
+ return false;
+ } else if (parent.type === "NGChainedExpression") {
+ return false;
+ }
+
+ return true;
+ }
+
+ case "ConditionalExpression":
+ switch (parent.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 "TSNonNullExpression":
+ return true;
+
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "ConditionalExpression":
+ return name === "test" && parent.test === node;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ default:
+ return false;
+ }
+
+ case "FunctionExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ // Not always necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses.
+ // Is necessary if it is `expression` of `ExpressionStatement`.
+ return name === "callee";
+
+ case "TaggedTemplateExpression":
+ return true;
+ // This is basically a kind of IIFE.
+
+ default:
+ return false;
+ }
+
+ case "ArrowFunctionExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return name === "callee";
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return name === "object";
+
+ case "TSAsExpression":
+ case "BindExpression":
+ case "TaggedTemplateExpression":
+ case "UnaryExpression":
+ case "LogicalExpression":
+ case "BinaryExpression":
+ case "AwaitExpression":
+ case "TSTypeAssertion":
+ return true;
+
+ case "ConditionalExpression":
+ return name === "test";
+
+ default:
+ return false;
+ }
+
+ case "ClassExpression":
+ switch (parent.type) {
+ case "NewExpression":
+ return name === "callee" && parent.callee === node;
+
+ default:
+ return false;
+ }
+
+ case "OptionalMemberExpression":
+ case "OptionalCallExpression":
+ if (parent.type === "MemberExpression" && name === "object" || (parent.type === "CallExpression" || parent.type === "NewExpression") && name === "callee") {
+ return true;
+ }
+
+ // fallthrough
+
+ case "CallExpression":
+ case "MemberExpression":
+ case "TaggedTemplateExpression":
+ case "TSNonNullExpression":
+ if ((parent.type === "BindExpression" || parent.type === "NewExpression") && name === "callee") {
+ let object = node;
+
+ while (object) {
+ switch (object.type) {
+ case "CallExpression":
+ case "OptionalCallExpression":
+ return true;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ case "BindExpression":
+ object = object.object;
+ break;
+ // tagged templates are basically member expressions from a grammar perspective
+ // see https://tc39.github.io/ecma262/#prod-MemberExpression
+
+ case "TaggedTemplateExpression":
+ object = object.tag;
+ break;
+
+ case "TSNonNullExpression":
+ object = object.expression;
+ break;
+
+ default:
+ return false;
+ }
+ }
+ }
+
+ return false;
+
+ case "BindExpression":
+ return (parent.type === "BindExpression" || parent.type === "NewExpression") && name === "callee" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && name === "object";
+
+ case "NGPipeExpression":
+ if (parent.type === "NGRoot" || parent.type === "NGMicrosyntaxExpression" || parent.type === "ObjectProperty" || parent.type === "ArrayExpression" || (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.arguments[name] === node || parent.type === "NGPipeExpression" && name === "right" || parent.type === "MemberExpression" && name === "property" || parent.type === "AssignmentExpression") {
+ return false;
+ }
+
+ return true;
+
+ case "JSXFragment":
+ case "JSXElement":
+ return name === "callee" || parent.type !== "ArrayExpression" && parent.type !== "ArrowFunctionExpression" && parent.type !== "AssignmentExpression" && parent.type !== "AssignmentPattern" && parent.type !== "BinaryExpression" && parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "ConditionalExpression" && parent.type !== "ExpressionStatement" && parent.type !== "JsExpressionRoot" && parent.type !== "JSXAttribute" && parent.type !== "JSXElement" && parent.type !== "JSXExpressionContainer" && parent.type !== "JSXFragment" && parent.type !== "LogicalExpression" && parent.type !== "ObjectProperty" && parent.type !== "OptionalCallExpression" && parent.type !== "Property" && parent.type !== "ReturnStatement" && parent.type !== "ThrowStatement" && parent.type !== "TypeCastExpression" && parent.type !== "VariableDeclarator" && parent.type !== "YieldExpression";
+
+ case "TypeAnnotation":
+ return name === "returnType" && parent.type === "ArrowFunctionExpression" && includesFunctionTypeInObjectType(node);
+ }
+
+ return false;
+}
+
+function isStatement(node) {
+ return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSDeclareFunction" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement";
+}
+
+function includesFunctionTypeInObjectType(node) {
+ return hasNode$1(node, n1 => n1.type === "ObjectTypeAnnotation" && hasNode$1(n1, n2 => n2.type === "FunctionTypeAnnotation" || undefined) || undefined);
+}
+
+function endsWithRightBracket(node) {
+ switch (node.type) {
+ case "ObjectExpression":
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+function isFollowedByRightBracket(path) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ const name = path.getName();
+
+ switch (parent.type) {
+ case "NGPipeExpression":
+ if (typeof name === "number" && parent.arguments[name] === node && parent.arguments.length - 1 === name) {
+ return path.callParent(isFollowedByRightBracket);
+ }
+
+ break;
+
+ case "ObjectProperty":
+ if (name === "value") {
+ const parentParent = path.getParentNode(1);
+ return parentParent.properties[parentParent.properties.length - 1] === parent;
+ }
+
+ break;
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ if (name === "right") {
+ return path.callParent(isFollowedByRightBracket);
+ }
+
+ break;
+
+ case "ConditionalExpression":
+ if (name === "alternate") {
+ return path.callParent(isFollowedByRightBracket);
+ }
+
+ break;
+
+ case "UnaryExpression":
+ if (parent.prefix) {
+ return path.callParent(isFollowedByRightBracket);
+ }
+
+ break;
+ }
+
+ return false;
+}
+
+function shouldWrapFunctionForExportDefault(path, options) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+
+ if (node.type === "FunctionExpression" || node.type === "ClassExpression") {
+ return parent.type === "ExportDefaultDeclaration" || // in some cases the function is already wrapped
+ // (e.g. `export default (function() {})();`)
+ // in this case we don't need to add extra parens
+ !needsParens(path, options);
+ }
+
+ if (!hasNakedLeftSide$1(node) || parent.type !== "ExportDefaultDeclaration" && needsParens(path, options)) {
+ return false;
+ }
+
+ return path.call(childPath => shouldWrapFunctionForExportDefault(childPath, options), ...getLeftSidePathName$1(path, node));
+}
+
+var needsParens_1 = needsParens;
+
+const {
+ builders: {
+ concat: concat$5,
+ join: join$3,
+ line: line$3
+ }
+} = document;
+
+function printHtmlBinding(path, options, print) {
+ const node = path.getValue();
+
+ if (options.__onHtmlBindingRoot && path.getName() === null) {
+ options.__onHtmlBindingRoot(node, options);
+ }
+
+ if (node.type !== "File") {
+ return;
+ }
+
+ if (options.__isVueForBindingLeft) {
+ return path.call(functionDeclarationPath => {
+ const {
+ params
+ } = functionDeclarationPath.getValue();
+ return concat$5([params.length > 1 ? "(" : "", join$3(concat$5([",", line$3]), functionDeclarationPath.map(print, "params")), params.length > 1 ? ")" : ""]);
+ }, "program", "body", 0);
+ }
+
+ if (options.__isVueSlotScope) {
+ return path.call(functionDeclarationPath => join$3(concat$5([",", line$3]), functionDeclarationPath.map(print, "params")), "program", "body", 0);
+ }
+} // based on https://github.com/prettier/prettier/blob/master/src/language-html/syntax-vue.js isVueEventBindingExpression()
+
+
+function isVueEventBindingExpression(node) {
+ switch (node.type) {
+ case "MemberExpression":
+ switch (node.property.type) {
+ case "Identifier":
+ case "NumericLiteral":
+ case "StringLiteral":
+ return isVueEventBindingExpression(node.object);
+ }
+
+ return false;
+
+ case "Identifier":
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+var htmlBinding = {
+ isVueEventBindingExpression,
+ printHtmlBinding
+};
+
+function preprocess(ast, options) {
+ switch (options.parser) {
+ case "json":
+ case "json5":
+ case "json-stringify":
+ case "__js_expression":
+ case "__vue_expression":
+ return Object.assign({}, ast, {
+ type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot",
+ node: ast,
+ comments: [],
+ rootMarker: options.rootMarker
+ });
+
+ default:
+ return ast;
+ }
+}
+
+var preprocess_1 = preprocess;
+
+const {
+ shouldFlatten: shouldFlatten$1,
+ getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter$1,
+ hasNewline: hasNewline$4,
+ hasNewlineInRange: hasNewlineInRange$3,
+ getLast: getLast$2,
+ getStringWidth: getStringWidth$3,
+ printString: printString$1,
+ printNumber: printNumber$1,
+ hasIgnoreComment: hasIgnoreComment$2,
+ hasNodeIgnoreComment: hasNodeIgnoreComment$2,
+ getPenultimate: getPenultimate$1,
+ startsWithNoLookaheadToken: startsWithNoLookaheadToken$1,
+ getIndentSize: getIndentSize$2,
+ getPreferredQuote: getPreferredQuote$1
+} = util$1;
+const {
+ isNextLineEmpty: isNextLineEmpty$2,
+ isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex$2,
+ getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$3
+} = utilShared;
+const {
+ insertPragma: insertPragma$1
+} = pragma;
+const {
+ printHtmlBinding: printHtmlBinding$1,
+ isVueEventBindingExpression: isVueEventBindingExpression$1
+} = htmlBinding;
+const {
+ classChildNeedsASIProtection: classChildNeedsASIProtection$1,
+ classPropMayCauseASIProblems: classPropMayCauseASIProblems$1,
+ conditionalExpressionChainContainsJSX: conditionalExpressionChainContainsJSX$1,
+ getFlowVariance: getFlowVariance$1,
+ getLeftSidePathName: getLeftSidePathName$2,
+ getParentExportDeclaration: getParentExportDeclaration$1,
+ getTypeScriptMappedTypeModifier: getTypeScriptMappedTypeModifier$1,
+ hasDanglingComments: hasDanglingComments$1,
+ hasFlowAnnotationComment: hasFlowAnnotationComment$1,
+ hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2,
+ hasLeadingComment: hasLeadingComment$3,
+ hasLeadingOwnLineComment: hasLeadingOwnLineComment$1,
+ hasNakedLeftSide: hasNakedLeftSide$2,
+ hasNewlineBetweenOrAfterDecorators: hasNewlineBetweenOrAfterDecorators$1,
+ hasNgSideEffect: hasNgSideEffect$1,
+ hasPrettierIgnore: hasPrettierIgnore$1,
+ hasTrailingComment: hasTrailingComment$1,
+ identity: identity$2,
+ isBinaryish: isBinaryish$1,
+ isCallOrOptionalCallExpression: isCallOrOptionalCallExpression$1,
+ isEmptyJSXElement: isEmptyJSXElement$1,
+ isExportDeclaration: isExportDeclaration$1,
+ isFlowAnnotationComment: isFlowAnnotationComment$1,
+ isFunctionCompositionArgs: isFunctionCompositionArgs$1,
+ isFunctionNotation: isFunctionNotation$1,
+ isFunctionOrArrowExpression: isFunctionOrArrowExpression$1,
+ isGetterOrSetter: isGetterOrSetter$1,
+ isJestEachTemplateLiteral: isJestEachTemplateLiteral$1,
+ isJSXNode: isJSXNode$1,
+ isJSXWhitespaceExpression: isJSXWhitespaceExpression$1,
+ isLastStatement: isLastStatement$1,
+ isLiteral: isLiteral$1,
+ isLongCurriedCallExpression: isLongCurriedCallExpression$1,
+ isMeaningfulJSXText: isMeaningfulJSXText$1,
+ isMemberExpressionChain: isMemberExpressionChain$1,
+ isMemberish: isMemberish$1,
+ isNgForOf: isNgForOf$1,
+ isNumericLiteral: isNumericLiteral$1,
+ isObjectType: isObjectType$1,
+ isObjectTypePropertyAFunction: isObjectTypePropertyAFunction$1,
+ isSimpleCallArgument: isSimpleCallArgument$1,
+ isSimpleFlowType: isSimpleFlowType$1,
+ isSimpleTemplateLiteral: isSimpleTemplateLiteral$1,
+ isStringLiteral: isStringLiteral$1,
+ isStringPropSafeToCoerceToIdentifier: isStringPropSafeToCoerceToIdentifier$1,
+ isTemplateOnItsOwnLine: isTemplateOnItsOwnLine$1,
+ isTestCall: isTestCall$1,
+ isTheOnlyJSXElementInMarkdown: isTheOnlyJSXElementInMarkdown$1,
+ isTSXFile: isTSXFile$1,
+ isTypeAnnotationAFunction: isTypeAnnotationAFunction$1,
+ matchJsxWhitespaceRegex: matchJsxWhitespaceRegex$1,
+ needsHardlineAfterDanglingComment: needsHardlineAfterDanglingComment$1,
+ rawText: rawText$1,
+ returnArgumentHasLeadingComment: returnArgumentHasLeadingComment$1
+} = utils$6;
+const needsQuoteProps = new WeakMap();
+const {
+ builders: {
+ concat: concat$6,
+ join: join$4,
+ line: line$4,
+ hardline: hardline$4,
+ softline: softline$2,
+ literalline: literalline$2,
+ group: group$2,
+ indent: indent$3,
+ align: align$1,
+ conditionalGroup: conditionalGroup$1,
+ fill: fill$3,
+ ifBreak: ifBreak$1,
+ breakParent: breakParent$2,
+ lineSuffixBoundary: lineSuffixBoundary$1,
+ addAlignmentToDoc: addAlignmentToDoc$2,
+ dedent: dedent$1
+ },
+ utils: {
+ willBreak: willBreak$1,
+ isLineNext: isLineNext$1,
+ isEmpty: isEmpty$1,
+ removeLines: removeLines$1
+ },
+ printer: {
+ printDocToString: printDocToString$2
+ }
+} = document;
+let uid = 0;
+
+function shouldPrintComma(options, level) {
+ level = level || "es5";
+
+ switch (options.trailingComma) {
+ case "all":
+ if (level === "all") {
+ return true;
+ }
+
+ // fallthrough
+
+ case "es5":
+ if (level === "es5") {
+ return true;
+ }
+
+ // fallthrough
+
+ case "none":
+ default:
+ return false;
+ }
+}
+
+function genericPrint(path, options, printPath, args) {
+ const node = path.getValue();
+ let needsParens = false;
+ const linesWithoutParens = printPathNoParens(path, options, printPath, args);
+
+ if (!node || isEmpty$1(linesWithoutParens)) {
+ return linesWithoutParens;
+ }
+
+ const parentExportDecl = getParentExportDeclaration$1(path);
+ const decorators = [];
+
+ if (node.type === "ClassMethod" || node.type === "ClassPrivateMethod" || node.type === "ClassProperty" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty" || node.type === "MethodDefinition" || node.type === "TSAbstractMethodDefinition" || node.type === "TSDeclareMethod") ; else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator
+ // was written before the export, the export will be responsible
+ // for printing the decorators.
+ !(parentExportDecl && options.locStart(parentExportDecl, {
+ ignoreDecorators: true
+ }) > options.locStart(node.decorators[0]))) {
+ const shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators$1(node, options);
+ const separator = shouldBreak ? hardline$4 : line$4;
+ path.each(decoratorPath => {
+ let decorator = decoratorPath.getValue();
+
+ if (decorator.expression) {
+ decorator = decorator.expression;
+ } else {
+ decorator = decorator.callee;
+ }
+
+ decorators.push(printPath(decoratorPath), separator);
+ }, "decorators");
+
+ if (parentExportDecl) {
+ decorators.unshift(hardline$4);
+ }
+ } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export,
+ // otherwise they are printed by the node.declaration
+ options.locStart(node, {
+ ignoreDecorators: true
+ }) > options.locStart(node.declaration.decorators[0])) {
+ // Export declarations are responsible for printing any decorators
+ // that logically apply to node.declaration.
+ path.each(decoratorPath => {
+ const decorator = decoratorPath.getValue();
+ const prefix = decorator.type === "Decorator" ? "" : "@";
+ decorators.push(prefix, printPath(decoratorPath), hardline$4);
+ }, "declaration", "decorators");
+ } else {
+ // Nodes with decorators can't have parentheses, so we can avoid
+ // computing pathNeedsParens() except in this case.
+ needsParens = needsParens_1(path, options);
+ }
+
+ const parts = [];
+
+ if (needsParens) {
+ parts.unshift("(");
+ }
+
+ parts.push(linesWithoutParens);
+
+ if (needsParens) {
+ const node = path.getValue();
+
+ if (hasFlowShorthandAnnotationComment$2(node)) {
+ parts.push(" /*");
+ parts.push(node.trailingComments[0].value.trimStart());
+ parts.push("*/");
+ node.trailingComments[0].printed = true;
+ }
+
+ parts.push(")");
+ }
+
+ if (decorators.length > 0) {
+ return group$2(concat$6(decorators.concat(parts)));
+ }
+
+ return concat$6(parts);
+}
+
+function printDecorators(path, options, print) {
+ const node = path.getValue();
+ return group$2(concat$6([join$4(line$4, path.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators$1(node, options) ? hardline$4 : line$4]));
+}
+/**
+ * The following is the shared logic for
+ * ternary operators, namely ConditionalExpression
+ * and TSConditionalType
+ * @typedef {Object} OperatorOptions
+ * @property {() => Array} beforeParts - Parts to print before the `?`.
+ * @property {(breakClosingParen: boolean) => Array} afterParts - Parts to print after the conditional expression.
+ * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.
+ * @property {string} conditionalNodeType - The type of the conditional expression node, ie "ConditionalExpression" or "TSConditionalType".
+ * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg "consequent".
+ * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg "alternate".
+ * @property {string[]} testNodePropertyNames - The properties at which the test nodes can be found on the main node, eg "test".
+ * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node.
+ * @param {Options} options - Prettier options
+ * @param {Function} print - Print function to call recursively
+ * @param {OperatorOptions} operatorOptions
+ * @returns Doc
+ */
+
+
+function printTernaryOperator(path, options, print, operatorOptions) {
+ const node = path.getValue();
+ const consequentNode = node[operatorOptions.consequentNodePropertyName];
+ const alternateNode = node[operatorOptions.alternateNodePropertyName];
+ const parts = []; // We print a ConditionalExpression in either "JSX mode" or "normal mode".
+ // See tests/jsx/conditional-expression.js for more info.
+
+ let jsxMode = false;
+ const parent = path.getParentNode();
+ const isParentTest = parent.type === operatorOptions.conditionalNodeType && operatorOptions.testNodePropertyNames.some(prop => parent[prop] === node);
+ let forceNoIndent = parent.type === operatorOptions.conditionalNodeType && !isParentTest; // Find the outermost non-ConditionalExpression parent, and the outermost
+ // ConditionalExpression parent. We'll use these to determine if we should
+ // print in JSX mode.
+
+ let currentParent;
+ let previousParent;
+ let i = 0;
+
+ do {
+ previousParent = currentParent || node;
+ currentParent = path.getParentNode(i);
+ i++;
+ } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType && operatorOptions.testNodePropertyNames.every(prop => currentParent[prop] !== previousParent));
+
+ const firstNonConditionalParent = currentParent || parent;
+ const lastConditionalParent = previousParent;
+
+ if (operatorOptions.shouldCheckJsx && (isJSXNode$1(node[operatorOptions.testNodePropertyNames[0]]) || isJSXNode$1(consequentNode) || isJSXNode$1(alternateNode) || conditionalExpressionChainContainsJSX$1(lastConditionalParent))) {
+ jsxMode = true;
+ forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in
+ // parens when using ?: within JSX, because the parens are analogous to
+ // curly braces in an if statement.
+
+ const wrap = doc => concat$6([ifBreak$1("(", ""), indent$3(concat$6([softline$2, doc])), softline$2, ifBreak$1(")", "")]); // The only things we don't wrap are:
+ // * Nested conditional expressions in alternates
+ // * null
+ // * undefined
+
+
+ const isNil = node => node.type === "NullLiteral" || node.type === "Literal" && node.value === null || node.type === "Identifier" && node.name === "undefined";
+
+ parts.push(" ? ", isNil(consequentNode) ? path.call(print, operatorOptions.consequentNodePropertyName) : wrap(path.call(print, operatorOptions.consequentNodePropertyName)), " : ", alternateNode.type === operatorOptions.conditionalNodeType || isNil(alternateNode) ? path.call(print, operatorOptions.alternateNodePropertyName) : wrap(path.call(print, operatorOptions.alternateNodePropertyName)));
+ } else {
+ // normal mode
+ const part = concat$6([line$4, "? ", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", "(") : "", align$1(2, path.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$1("", ")") : "", line$4, ": ", alternateNode.type === operatorOptions.conditionalNodeType ? path.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path.call(print, operatorOptions.alternateNodePropertyName))]);
+ parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node || isParentTest ? part : options.useTabs ? dedent$1(indent$3(part)) : align$1(Math.max(0, options.tabWidth - 2), part));
+ } // We want a whole chain of ConditionalExpressions to all
+ // break if any of them break. That means we should only group around the
+ // outer-most ConditionalExpression.
+
+
+ const maybeGroup = doc => parent === firstNonConditionalParent ? group$2(doc) : doc; // Break the closing paren to keep the chain right after it:
+ // (a
+ // ? b
+ // : c
+ // ).call()
+
+
+ const breakClosingParen = !jsxMode && (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression" || parent.type === "NGPipeExpression" && parent.left === node) && !parent.computed;
+ const result = maybeGroup(concat$6([].concat((testDoc =>
+ /**
+ * a
+ * ? b
+ * : multiline
+ * test
+ * node
+ * ^^ align(2)
+ * ? d
+ * : e
+ */
+ parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc)(concat$6(operatorOptions.beforeParts())), forceNoIndent ? concat$6(parts) : indent$3(concat$6(parts)), operatorOptions.afterParts(breakClosingParen))));
+ return isParentTest ? group$2(concat$6([indent$3(concat$6([softline$2, result])), softline$2])) : result;
+}
+
+function printPathNoParens(path, options, print, args) {
+ const n = path.getValue();
+ const semi = options.semi ? ";" : "";
+
+ if (!n) {
+ return "";
+ }
+
+ if (typeof n === "string") {
+ return n;
+ }
+
+ const htmlBinding = printHtmlBinding$1(path, options, print);
+
+ if (htmlBinding) {
+ return htmlBinding;
+ }
+
+ let parts = [];
+
+ switch (n.type) {
+ case "JsExpressionRoot":
+ return path.call(print, "node");
+
+ case "JsonRoot":
+ return concat$6([path.call(print, "node"), hardline$4]);
+
+ case "File":
+ // Print @babel/parser's InterpreterDirective here so that
+ // leading comments on the `Program` node get printed after the hashbang.
+ if (n.program && n.program.interpreter) {
+ parts.push(path.call(programPath => programPath.call(print, "interpreter"), "program"));
+ }
+
+ parts.push(path.call(print, "program"));
+ return concat$6(parts);
+
+ case "Program":
+ // Babel 6
+ if (n.directives) {
+ path.each(childPath => {
+ parts.push(print(childPath), semi, hardline$4);
+
+ if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options.locEnd)) {
+ parts.push(hardline$4);
+ }
+ }, "directives");
+ }
+
+ parts.push(path.call(bodyPath => {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body"));
+ parts.push(comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true)); // Only force a trailing newline if there were any contents.
+
+ if (!n.body.every(({
+ type
+ }) => type === "EmptyStatement") || n.comments) {
+ parts.push(hardline$4);
+ }
+
+ return concat$6(parts);
+ // Babel extension.
+
+ case "EmptyStatement":
+ return "";
+
+ case "ExpressionStatement":
+ // Detect Flow-parsed directives
+ if (n.directive) {
+ return concat$6([nodeStr(n.expression, options, true), semi]);
+ }
+
+ if (options.parser === "__vue_event_binding") {
+ const parent = path.getParentNode();
+
+ if (parent.type === "Program" && parent.body.length === 1 && parent.body[0] === n) {
+ return concat$6([path.call(print, "expression"), isVueEventBindingExpression$1(n.expression) ? ";" : ""]);
+ }
+ } // Do not append semicolon after the only JSX element in a program
+
+
+ return concat$6([path.call(print, "expression"), isTheOnlyJSXElementInMarkdown$1(options, path) ? "" : semi]);
+ // Babel non-standard node. Used for Closure-style type casts. See postprocess.js.
+
+ case "ParenthesizedExpression":
+ {
+ const shouldHug = !n.expression.comments;
+
+ if (shouldHug) {
+ return concat$6(["(", path.call(print, "expression"), ")"]);
+ }
+
+ return group$2(concat$6(["(", indent$3(concat$6([softline$2, path.call(print, "expression")])), softline$2, ")"]));
+ }
+
+ case "AssignmentExpression":
+ return printAssignment(n.left, path.call(print, "left"), concat$6([" ", n.operator]), n.right, path.call(print, "right"), options);
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "NGPipeExpression":
+ {
+ const parent = path.getParentNode();
+ const parentParent = path.getParentNode(1);
+ const isInsideParenthesis = n !== parent.body && (parent.type === "IfStatement" || parent.type === "WhileStatement" || parent.type === "SwitchStatement" || parent.type === "DoWhileStatement");
+ const parts = printBinaryishExpressions(path, print, options,
+ /* isNested */
+ false, isInsideParenthesis); // if (
+ // this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft
+ // ) {
+ //
+ // looks super weird, we want to break the children if the parent breaks
+ //
+ // if (
+ // this.hasPlugin("dynamicImports") &&
+ // this.lookahead().type === tt.parenLeft
+ // ) {
+
+ if (isInsideParenthesis) {
+ return concat$6(parts);
+ } // Break between the parens in
+ // unaries or in a member or specific call expression, i.e.
+ //
+ // (
+ // a &&
+ // b &&
+ // c
+ // ).call()
+
+
+ if ((parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.callee === n || parent.type === "UnaryExpression" || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && !parent.computed) {
+ return group$2(concat$6([indent$3(concat$6([softline$2, concat$6(parts)])), softline$2]));
+ } // Avoid indenting sub-expressions in some cases where the first sub-expression is already
+ // indented accordingly. We should indent sub-expressions where the first case isn't indented.
+
+
+ const shouldNotIndent = parent.type === "ReturnStatement" || parent.type === "ThrowStatement" || parent.type === "JSXExpressionContainer" && parentParent.type === "JSXAttribute" || n.operator !== "|" && parent.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (parent.type === "NGRoot" && options.parser === "__ng_binding" || parent.type === "NGMicrosyntaxExpression" && parentParent.type === "NGMicrosyntax" && parentParent.body.length === 1) || n === parent.body && parent.type === "ArrowFunctionExpression" || n !== parent.body && parent.type === "ForStatement" || parent.type === "ConditionalExpression" && parentParent.type !== "ReturnStatement" && parentParent.type !== "ThrowStatement" && parentParent.type !== "CallExpression" && parentParent.type !== "OptionalCallExpression" || parent.type === "TemplateLiteral";
+ const shouldIndentIfInlining = parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ClassProperty" || parent.type === "TSAbstractClassProperty" || parent.type === "ClassPrivateProperty" || parent.type === "ObjectProperty" || parent.type === "Property";
+ const samePrecedenceSubExpression = isBinaryish$1(n.left) && shouldFlatten$1(n.operator, n.left.operator);
+
+ if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) {
+ return group$2(concat$6(parts));
+ }
+
+ if (parts.length === 0) {
+ return "";
+ } // If the right part is a JSX node, we include it in a separate group to
+ // prevent it breaking the whole chain, so we can print the expression like:
+ //
+ // foo && bar && (
+ //
+ //
+ //
+ // )
+
+
+ const hasJSX = isJSXNode$1(n.right);
+ const rest = concat$6(hasJSX ? parts.slice(1, -1) : parts.slice(1));
+ const groupId = Symbol("logicalChain-" + ++uid);
+ const chain = group$2(concat$6([// Don't include the initial expression in the indentation
+ // level. The first item is guaranteed to be the first
+ // left-most expression.
+ parts.length > 0 ? parts[0] : "", indent$3(rest)]), {
+ id: groupId
+ });
+
+ if (!hasJSX) {
+ return chain;
+ }
+
+ const jsxPart = getLast$2(parts);
+ return group$2(concat$6([chain, ifBreak$1(indent$3(jsxPart), jsxPart, {
+ groupId
+ })]));
+ }
+
+ case "AssignmentPattern":
+ return concat$6([path.call(print, "left"), " = ", path.call(print, "right")]);
+
+ case "TSTypeAssertion":
+ {
+ const shouldBreakAfterCast = !(n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression");
+ const castGroup = group$2(concat$6(["<", indent$3(concat$6([softline$2, path.call(print, "typeAnnotation")])), softline$2, ">"]));
+ const exprContents = concat$6([ifBreak$1("("), indent$3(concat$6([softline$2, path.call(print, "expression")])), softline$2, ifBreak$1(")")]);
+
+ if (shouldBreakAfterCast) {
+ return conditionalGroup$1([concat$6([castGroup, path.call(print, "expression")]), concat$6([castGroup, group$2(exprContents, {
+ shouldBreak: true
+ })]), concat$6([castGroup, path.call(print, "expression")])]);
+ }
+
+ return group$2(concat$6([castGroup, path.call(print, "expression")]));
+ }
+
+ case "OptionalMemberExpression":
+ case "MemberExpression":
+ {
+ const parent = path.getParentNode();
+ let firstNonMemberParent;
+ let i = 0;
+
+ do {
+ firstNonMemberParent = path.getParentNode(i);
+ i++;
+ } while (firstNonMemberParent && (firstNonMemberParent.type === "MemberExpression" || firstNonMemberParent.type === "OptionalMemberExpression" || firstNonMemberParent.type === "TSNonNullExpression"));
+
+ const shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "NewExpression" || firstNonMemberParent.type === "BindExpression" || firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && parent.type !== "MemberExpression" && parent.type !== "OptionalMemberExpression";
+ return concat$6([path.call(print, "object"), shouldInline ? printMemberLookup(path, options, print) : group$2(indent$3(concat$6([softline$2, printMemberLookup(path, options, print)])))]);
+ }
+
+ case "MetaProperty":
+ return concat$6([path.call(print, "meta"), ".", path.call(print, "property")]);
+
+ case "BindExpression":
+ if (n.object) {
+ parts.push(path.call(print, "object"));
+ }
+
+ parts.push(group$2(indent$3(concat$6([softline$2, printBindExpressionCallee(path, options, print)]))));
+ return concat$6(parts);
+
+ case "Identifier":
+ {
+ return concat$6([n.name, printOptionalToken(path), printTypeAnnotation(path, options, print)]);
+ }
+
+ case "V8IntrinsicIdentifier":
+ return concat$6(["%", n.name]);
+
+ case "SpreadElement":
+ case "SpreadElementPattern":
+ case "SpreadProperty":
+ case "SpreadPropertyPattern":
+ case "RestElement":
+ case "ObjectTypeSpreadProperty":
+ return concat$6(["...", path.call(print, "argument"), printTypeAnnotation(path, options, print)]);
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ parts.push(printFunctionDeclaration(path, print, options));
+
+ if (!n.body) {
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+
+ case "ArrowFunctionExpression":
+ {
+ if (n.async) {
+ parts.push("async ");
+ }
+
+ if (shouldPrintParamsWithoutParens(path, options)) {
+ parts.push(path.call(print, "params", 0));
+ } else {
+ parts.push(group$2(concat$6([printFunctionParams(path, print, options,
+ /* expandLast */
+ args && (args.expandLastArg || args.expandFirstArg),
+ /* printTypeParams */
+ true), printReturnType(path, print, options)])));
+ }
+
+ const dangling = comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true, comment => {
+ const nextCharacter = getNextNonSpaceNonCommentCharacterIndex$3(options.originalText, comment, options.locEnd);
+ return options.originalText.slice(nextCharacter, nextCharacter + 2) === "=>";
+ });
+
+ if (dangling) {
+ parts.push(" ", dangling);
+ }
+
+ parts.push(" =>");
+ const body = path.call(bodyPath => print(bodyPath, args), "body"); // We want to always keep these types of nodes on the same line
+ // as the arrow.
+
+ if (!hasLeadingOwnLineComment$1(options.originalText, n.body, options) && (n.body.type === "ArrayExpression" || n.body.type === "ObjectExpression" || n.body.type === "BlockStatement" || isJSXNode$1(n.body) || isTemplateOnItsOwnLine$1(n.body, options.originalText, options) || n.body.type === "ArrowFunctionExpression" || n.body.type === "DoExpression")) {
+ return group$2(concat$6([concat$6(parts), " ", body]));
+ } // We handle sequence expressions as the body of arrows specially,
+ // so that the required parentheses end up on their own lines.
+
+
+ if (n.body.type === "SequenceExpression") {
+ return group$2(concat$6([concat$6(parts), group$2(concat$6([" (", indent$3(concat$6([softline$2, body])), softline$2, ")"]))]));
+ } // if the arrow function is expanded as last argument, we are adding a
+ // level of indentation and need to add a softline to align the closing )
+ // with the opening (, or if it's inside a JSXExpression (e.g. an attribute)
+ // we should align the expression's closing } with the line with the opening {.
+
+
+ const shouldAddSoftLine = (args && args.expandLastArg || path.getParentNode().type === "JSXExpressionContainer") && !(n.comments && n.comments.length);
+ const printTrailingComma = args && args.expandLastArg && shouldPrintComma(options, "all"); // In order to avoid confusion between
+ // a => a ? a : a
+ // a <= a ? a : a
+
+ const shouldAddParens = n.body.type === "ConditionalExpression" && !startsWithNoLookaheadToken$1(n.body,
+ /* forbidFunctionAndClass */
+ false);
+ return group$2(concat$6([concat$6(parts), group$2(concat$6([indent$3(concat$6([line$4, shouldAddParens ? ifBreak$1("", "(") : "", body, shouldAddParens ? ifBreak$1("", ")") : ""])), shouldAddSoftLine ? concat$6([ifBreak$1(printTrailingComma ? "," : ""), softline$2]) : ""]))]));
+ }
+
+ case "YieldExpression":
+ parts.push("yield");
+
+ if (n.delegate) {
+ parts.push("*");
+ }
+
+ if (n.argument) {
+ parts.push(" ", path.call(print, "argument"));
+ }
+
+ return concat$6(parts);
+
+ case "AwaitExpression":
+ {
+ parts.push("await ", path.call(print, "argument"));
+ const parent = path.getParentNode();
+
+ if ((parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && parent.callee === n || (parent.type === "MemberExpression" || parent.type === "OptionalMemberExpression") && parent.object === n) {
+ return group$2(concat$6([indent$3(concat$6([softline$2, concat$6(parts)])), softline$2]));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "ImportSpecifier":
+ if (n.importKind) {
+ parts.push(path.call(print, "importKind"), " ");
+ }
+
+ parts.push(path.call(print, "imported"));
+
+ if (n.local && n.local.name !== n.imported.name) {
+ parts.push(" as ", path.call(print, "local"));
+ }
+
+ return concat$6(parts);
+
+ case "ExportSpecifier":
+ parts.push(path.call(print, "local"));
+
+ if (n.exported && n.exported.name !== n.local.name) {
+ parts.push(" as ", path.call(print, "exported"));
+ }
+
+ return concat$6(parts);
+
+ case "ImportNamespaceSpecifier":
+ parts.push("* as ");
+ parts.push(path.call(print, "local"));
+ return concat$6(parts);
+
+ case "ImportDefaultSpecifier":
+ return path.call(print, "local");
+
+ case "TSExportAssignment":
+ return concat$6(["export = ", path.call(print, "expression"), semi]);
+
+ case "ExportDefaultDeclaration":
+ case "ExportNamedDeclaration":
+ return printExportDeclaration(path, options, print);
+
+ case "ExportAllDeclaration":
+ parts.push("export ");
+
+ if (n.exportKind === "type") {
+ parts.push("type ");
+ }
+
+ parts.push("* ");
+
+ if (n.exported) {
+ parts.push("as ", path.call(print, "exported"), " ");
+ }
+
+ parts.push("from ", path.call(print, "source"), semi);
+ return concat$6(parts);
+
+ case "ExportNamespaceSpecifier":
+ case "ExportDefaultSpecifier":
+ return path.call(print, "exported");
+
+ case "ImportDeclaration":
+ {
+ parts.push("import ");
+
+ if (n.importKind && n.importKind !== "value") {
+ parts.push(n.importKind + " ");
+ }
+
+ const standalones = [];
+ const grouped = [];
+
+ if (n.specifiers && n.specifiers.length > 0) {
+ path.each(specifierPath => {
+ const value = specifierPath.getValue();
+
+ if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") {
+ standalones.push(print(specifierPath));
+ } else {
+ grouped.push(print(specifierPath));
+ }
+ }, "specifiers");
+
+ if (standalones.length > 0) {
+ parts.push(join$4(", ", standalones));
+ }
+
+ if (standalones.length > 0 && grouped.length > 0) {
+ parts.push(", ");
+ }
+
+ if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(node => node.comments)) {
+ parts.push(concat$6(["{", options.bracketSpacing ? " " : "", concat$6(grouped), options.bracketSpacing ? " " : "", "}"]));
+ } else if (grouped.length >= 1) {
+ parts.push(group$2(concat$6(["{", indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, join$4(concat$6([",", line$4]), grouped)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$4 : softline$2, "}"])));
+ }
+
+ parts.push(" from ");
+ } else if (n.importKind && n.importKind === "type" || // import {} from 'x'
+ /{\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) {
+ parts.push("{} from ");
+ }
+
+ parts.push(path.call(print, "source"), semi);
+ return concat$6(parts);
+ }
+
+ case "Import":
+ return "import";
+
+ case "TSModuleBlock":
+ case "BlockStatement":
+ {
+ const naked = path.call(bodyPath => {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body");
+ const hasContent = n.body.find(node => node.type !== "EmptyStatement");
+ const hasDirectives = n.directives && n.directives.length > 0;
+ const parent = path.getParentNode();
+ const parentParent = path.getParentNode(1);
+
+ if (!hasContent && !hasDirectives && !hasDanglingComments$1(n) && (parent.type === "ArrowFunctionExpression" || parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration" || parent.type === "ObjectMethod" || parent.type === "ClassMethod" || parent.type === "ClassPrivateMethod" || parent.type === "ForStatement" || parent.type === "WhileStatement" || parent.type === "DoWhileStatement" || parent.type === "DoExpression" || parent.type === "CatchClause" && !parentParent.finalizer || parent.type === "TSModuleDeclaration")) {
+ return "{}";
+ }
+
+ parts.push("{"); // Babel 6
+
+ if (hasDirectives) {
+ path.each(childPath => {
+ parts.push(indent$3(concat$6([hardline$4, print(childPath), semi])));
+
+ if (isNextLineEmpty$2(options.originalText, childPath.getValue(), options.locEnd)) {
+ parts.push(hardline$4);
+ }
+ }, "directives");
+ }
+
+ if (hasContent) {
+ parts.push(indent$3(concat$6([hardline$4, naked])));
+ }
+
+ parts.push(comments.printDanglingComments(path, options));
+ parts.push(hardline$4, "}");
+ return concat$6(parts);
+ }
+
+ case "ReturnStatement":
+ return concat$6(["return", printReturnAndThrowArgument(path, options, print)]);
+
+ case "NewExpression":
+ case "OptionalCallExpression":
+ case "CallExpression":
+ {
+ const isNew = n.type === "NewExpression";
+ const optional = printOptionalToken(path);
+
+ if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style
+ // define calls, as a unit.
+ // e.g. `define(["some/lib", (lib) => {`
+ !isNew && n.callee.type === "Identifier" && (n.callee.name === "require" || n.callee.name === "define") || // Template literals as single arguments
+ n.arguments.length === 1 && isTemplateOnItsOwnLine$1(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line
+ // e.g. `it('long name', () => {`
+ !isNew && isTestCall$1(n, path.getParentNode())) {
+ return concat$6([isNew ? "new " : "", path.call(print, "callee"), optional, printFunctionTypeParameters(path, options, print), concat$6(["(", join$4(", ", path.map(print, "arguments")), ")"])]);
+ } // Inline Flow annotation comments following Identifiers in Call nodes need to
+ // stay with the Identifier. For example:
+ //
+ // foo /*:: */(bar);
+ //
+ // Here, we ensure that such comments stay between the Identifier and the Callee.
+
+
+ const isIdentifierWithFlowAnnotation = n.callee.type === "Identifier" && hasFlowAnnotationComment$1(n.callee.trailingComments);
+
+ if (isIdentifierWithFlowAnnotation) {
+ n.callee.trailingComments[0].printed = true;
+ } // We detect calls on member lookups and possibly print them in a
+ // special chain format. See `printMemberChain` for more info.
+
+
+ if (!isNew && isMemberish$1(n.callee) && !path.call(path => needsParens_1(path, options), "callee")) {
+ return printMemberChain(path, options, print);
+ }
+
+ const contents = concat$6([isNew ? "new " : "", path.call(print, "callee"), optional, isIdentifierWithFlowAnnotation ? `/*:: ${n.callee.trailingComments[0].value.slice(2).trim()} */` : "", printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); // We group here when the callee is itself a call expression.
+ // See `isLongCurriedCallExpression` for more info.
+
+ if (isCallOrOptionalCallExpression$1(n.callee)) {
+ return group$2(contents);
+ }
+
+ return contents;
+ }
+
+ case "TSInterfaceDeclaration":
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path, options, print), "interface ", path.call(print, "id"), n.typeParameters ? path.call(print, "typeParameters") : "", " ");
+
+ if (n.extends && n.extends.length) {
+ parts.push(group$2(indent$3(concat$6([softline$2, "extends ", (n.extends.length === 1 ? identity$2 : indent$3)(join$4(concat$6([",", line$4]), path.map(print, "extends"))), " "]))));
+ }
+
+ parts.push(path.call(print, "body"));
+ return concat$6(parts);
+
+ case "ObjectTypeInternalSlot":
+ return concat$6([n.static ? "static " : "", "[[", path.call(print, "id"), "]]", printOptionalToken(path), n.method ? "" : ": ", path.call(print, "value")]);
+
+ case "ObjectExpression":
+ case "ObjectPattern":
+ case "ObjectTypeAnnotation":
+ case "TSInterfaceBody":
+ case "TSTypeLiteral":
+ {
+ let propertiesField;
+
+ if (n.type === "TSTypeLiteral") {
+ propertiesField = "members";
+ } else if (n.type === "TSInterfaceBody") {
+ propertiesField = "body";
+ } else {
+ propertiesField = "properties";
+ }
+
+ const isTypeAnnotation = n.type === "ObjectTypeAnnotation";
+ const fields = [];
+
+ if (isTypeAnnotation) {
+ fields.push("indexers", "callProperties", "internalSlots");
+ }
+
+ fields.push(propertiesField);
+ const firstProperty = fields.map(field => n[field][0]).sort((a, b) => options.locStart(a) - options.locStart(b))[0];
+ const parent = path.getParentNode(0);
+ const isFlowInterfaceLikeBody = isTypeAnnotation && parent && (parent.type === "InterfaceDeclaration" || parent.type === "DeclareInterface" || parent.type === "DeclareClass") && path.getName() === "body";
+ const shouldBreak = n.type === "TSInterfaceBody" || isFlowInterfaceLikeBody || n.type === "ObjectPattern" && parent.type !== "FunctionDeclaration" && parent.type !== "FunctionExpression" && parent.type !== "ArrowFunctionExpression" && parent.type !== "ObjectMethod" && parent.type !== "ClassMethod" && parent.type !== "ClassPrivateMethod" && parent.type !== "AssignmentPattern" && parent.type !== "CatchClause" && n.properties.some(property => property.value && (property.value.type === "ObjectPattern" || property.value.type === "ArrayPattern")) || n.type !== "ObjectPattern" && firstProperty && hasNewlineInRange$3(options.originalText, options.locStart(n), options.locStart(firstProperty));
+ const separator = isFlowInterfaceLikeBody ? ";" : n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$1(semi, ";") : ",";
+ const leftBrace = n.exact ? "{|" : "{";
+ const rightBrace = n.exact ? "|}" : "}"; // Unfortunately, things are grouped together in the ast can be
+ // interleaved in the source code. So we need to reorder them before
+ // printing them.
+
+ const propsAndLoc = [];
+ fields.forEach(field => {
+ path.each(childPath => {
+ const node = childPath.getValue();
+ propsAndLoc.push({
+ node,
+ printed: print(childPath),
+ loc: options.locStart(node)
+ });
+ }, field);
+ });
+ let separatorParts = [];
+ const props = propsAndLoc.sort((a, b) => a.loc - b.loc).map(prop => {
+ const result = concat$6(separatorParts.concat(group$2(prop.printed)));
+ separatorParts = [separator, line$4];
+
+ if ((prop.node.type === "TSPropertySignature" || prop.node.type === "TSMethodSignature" || prop.node.type === "TSConstructSignatureDeclaration") && hasNodeIgnoreComment$2(prop.node)) {
+ separatorParts.shift();
+ }
+
+ if (isNextLineEmpty$2(options.originalText, prop.node, options.locEnd)) {
+ separatorParts.push(hardline$4);
+ }
+
+ return result;
+ });
+
+ if (n.inexact) {
+ let printed;
+
+ if (hasDanglingComments$1(n)) {
+ const hasLineComments = !n.comments.every(comments$1.isBlockComment);
+ const printedDanglingComments = comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true);
+ printed = concat$6([printedDanglingComments, hasLineComments || hasNewline$4(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$4 : line$4, "..."]);
+ } else {
+ printed = "...";
+ }
+
+ props.push(concat$6(separatorParts.concat(printed)));
+ }
+
+ const lastElem = getLast$2(n[propertiesField]);
+ const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
+ let content;
+
+ if (props.length === 0) {
+ if (!hasDanglingComments$1(n)) {
+ return concat$6([leftBrace, rightBrace, printTypeAnnotation(path, options, print)]);
+ }
+
+ content = group$2(concat$6([leftBrace, comments.printDanglingComments(path, options), softline$2, rightBrace, printOptionalToken(path), printTypeAnnotation(path, options, print)]));
+ } else {
+ content = concat$6([leftBrace, indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, concat$6(props)])), ifBreak$1(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma(options)) ? separator : ""), concat$6([options.bracketSpacing ? line$4 : softline$2, rightBrace]), printOptionalToken(path), printTypeAnnotation(path, options, print)]);
+ } // If we inline the object as first argument of the parent, we don't want
+ // to create another group so that the object breaks before the return
+ // type
+
+
+ if (path.match(node => node.type === "ObjectPattern" && !node.decorators, (node, name, number) => shouldHugArguments(node) && (name === "params" || name === "parameters") && number === 0) || path.match(shouldHugType, (node, name) => name === "typeAnnotation", (node, name) => name === "typeAnnotation", (node, name, number) => shouldHugArguments(node) && (name === "params" || name === "parameters") && number === 0)) {
+ return content;
+ }
+
+ return group$2(content, {
+ shouldBreak
+ });
+ }
+ // Babel 6
+
+ case "ObjectProperty": // Non-standard AST node type.
+
+ case "Property":
+ if (n.method || n.kind === "get" || n.kind === "set") {
+ return printMethod(path, options, print);
+ }
+
+ if (n.shorthand) {
+ parts.push(path.call(print, "value"));
+ } else {
+ parts.push(printAssignment(n.key, printPropertyKey(path, options, print), ":", n.value, path.call(print, "value"), options));
+ }
+
+ return concat$6(parts);
+ // Babel 6
+
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ case "MethodDefinition":
+ case "TSAbstractMethodDefinition":
+ case "TSDeclareMethod":
+ if (n.decorators && n.decorators.length !== 0) {
+ parts.push(printDecorators(path, options, print));
+ }
+
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.type === "TSAbstractMethodDefinition" || n.abstract) {
+ parts.push("abstract ");
+ }
+
+ parts.push(printMethod(path, options, print));
+ return concat$6(parts);
+
+ case "ObjectMethod":
+ return printMethod(path, options, print);
+
+ case "Decorator":
+ return concat$6(["@", path.call(print, "expression"), path.call(print, "callee")]);
+
+ case "ArrayExpression":
+ case "ArrayPattern":
+ if (n.elements.length === 0) {
+ if (!hasDanglingComments$1(n)) {
+ parts.push("[]");
+ } else {
+ parts.push(group$2(concat$6(["[", comments.printDanglingComments(path, options), softline$2, "]"])));
+ }
+ } else {
+ const lastElem = getLast$2(n.elements);
+ const canHaveTrailingComma = !(lastElem && lastElem.type === "RestElement"); // JavaScript allows you to have empty elements in an array which
+ // changes its length based on the number of commas. The algorithm
+ // is that if the last argument is null, we need to force insert
+ // a comma to ensure JavaScript recognizes it.
+ // [,].length === 1
+ // [1,].length === 1
+ // [1,,].length === 2
+ //
+ // Note that getLast returns null if the array is empty, but
+ // we already check for an empty array just above so we are safe
+
+ const needsForcedTrailingComma = canHaveTrailingComma && lastElem === null;
+ const shouldBreak = n.elements.length > 1 && n.elements.every((element, i, elements) => {
+ const elementType = element && element.type;
+
+ if (elementType !== "ArrayExpression" && elementType !== "ObjectExpression") {
+ return false;
+ }
+
+ const nextElement = elements[i + 1];
+
+ if (nextElement && elementType !== nextElement.type) {
+ return false;
+ }
+
+ const itemsKey = elementType === "ArrayExpression" ? "elements" : "properties";
+ return element[itemsKey] && element[itemsKey].length > 1;
+ });
+ parts.push(group$2(concat$6(["[", indent$3(concat$6([softline$2, printArrayItems(path, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$1(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma(options) ? "," : ""), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), softline$2, "]"]), {
+ shouldBreak
+ }));
+ }
+
+ parts.push(printOptionalToken(path), printTypeAnnotation(path, options, print));
+ return concat$6(parts);
+
+ case "SequenceExpression":
+ {
+ const parent = path.getParentNode(0);
+
+ if (parent.type === "ExpressionStatement" || parent.type === "ForStatement") {
+ // For ExpressionStatements and for-loop heads, which are among
+ // the few places a SequenceExpression appears unparenthesized, we want
+ // to indent expressions after the first.
+ const parts = [];
+ path.each(p => {
+ if (p.getName() === 0) {
+ parts.push(print(p));
+ } else {
+ parts.push(",", indent$3(concat$6([line$4, print(p)])));
+ }
+ }, "expressions");
+ return group$2(concat$6(parts));
+ }
+
+ return group$2(concat$6([join$4(concat$6([",", line$4]), path.map(print, "expressions"))]));
+ }
+
+ case "ThisExpression":
+ return "this";
+
+ case "Super":
+ return "super";
+
+ case "NullLiteral":
+ // Babel 6 Literal split
+ return "null";
+
+ case "RegExpLiteral":
+ // Babel 6 Literal split
+ return printRegex(n);
+
+ case "NumericLiteral":
+ // Babel 6 Literal split
+ return printNumber$1(n.extra.raw);
+
+ case "BigIntLiteral":
+ // babel: n.extra.raw, typescript: n.raw, flow: n.bigint
+ return (n.bigint || (n.extra ? n.extra.raw : n.raw)).toLowerCase();
+
+ case "BooleanLiteral": // Babel 6 Literal split
+
+ case "StringLiteral": // Babel 6 Literal split
+
+ case "Literal":
+ {
+ if (n.regex) {
+ return printRegex(n.regex);
+ }
+
+ if (typeof n.value === "number") {
+ return printNumber$1(n.raw);
+ }
+
+ if (typeof n.value !== "string") {
+ return "" + n.value;
+ } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2
+ // See corresponding workaround in needs-parens.js
+
+
+ const grandParent = path.getParentNode(1);
+ const isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement");
+ return nodeStr(n, options, isTypeScriptDirective);
+ }
+
+ case "Directive":
+ return path.call(print, "value");
+ // Babel 6
+
+ case "DirectiveLiteral":
+ return nodeStr(n, options);
+
+ case "UnaryExpression":
+ parts.push(n.operator);
+
+ if (/[a-z]$/.test(n.operator)) {
+ parts.push(" ");
+ }
+
+ if (n.argument.comments && n.argument.comments.length > 0) {
+ parts.push(group$2(concat$6(["(", indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ")"])));
+ } else {
+ parts.push(path.call(print, "argument"));
+ }
+
+ return concat$6(parts);
+
+ case "UpdateExpression":
+ parts.push(path.call(print, "argument"), n.operator);
+
+ if (n.prefix) {
+ parts.reverse();
+ }
+
+ return concat$6(parts);
+
+ case "ConditionalExpression":
+ return printTernaryOperator(path, options, print, {
+ beforeParts: () => [path.call(print, "test")],
+ afterParts: breakClosingParen => [breakClosingParen ? softline$2 : ""],
+ shouldCheckJsx: true,
+ conditionalNodeType: "ConditionalExpression",
+ consequentNodePropertyName: "consequent",
+ alternateNodePropertyName: "alternate",
+ testNodePropertyNames: ["test"]
+ });
+
+ case "VariableDeclaration":
+ {
+ const printed = path.map(childPath => {
+ return print(childPath);
+ }, "declarations"); // We generally want to terminate all variable declarations with a
+ // semicolon, except when they in the () part of for loops.
+
+ const parentNode = path.getParentNode();
+ const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
+ const hasValue = n.declarations.some(decl => decl.init);
+ let firstVariable;
+
+ if (printed.length === 1 && !n.declarations[0].comments) {
+ firstVariable = printed[0];
+ } else if (printed.length > 0) {
+ // Indent first var to comply with eslint one-var rule
+ firstVariable = indent$3(printed[0]);
+ }
+
+ parts = [n.declare ? "declare " : "", n.kind, firstVariable ? concat$6([" ", firstVariable]) : "", indent$3(concat$6(printed.slice(1).map(p => concat$6([",", hasValue && !isParentForLoop ? hardline$4 : line$4, p]))))];
+
+ if (!(isParentForLoop && parentNode.body !== n)) {
+ parts.push(semi);
+ }
+
+ return group$2(concat$6(parts));
+ }
+
+ case "TSTypeAliasDeclaration":
+ {
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ const printed = printAssignmentRight(n.id, n.typeAnnotation, n.typeAnnotation && path.call(print, "typeAnnotation"), options);
+ parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", printed, semi);
+ return group$2(concat$6(parts));
+ }
+
+ case "VariableDeclarator":
+ return printAssignment(n.id, path.call(print, "id"), " =", n.init, n.init && path.call(print, "init"), options);
+
+ case "WithStatement":
+ return group$2(concat$6(["with (", path.call(print, "object"), ")", adjustClause(n.body, path.call(print, "body"))]));
+
+ case "IfStatement":
+ {
+ const con = adjustClause(n.consequent, path.call(print, "consequent"));
+ const opening = group$2(concat$6(["if (", group$2(concat$6([indent$3(concat$6([softline$2, path.call(print, "test")])), softline$2])), ")", con]));
+ parts.push(opening);
+
+ if (n.alternate) {
+ const commentOnOwnLine = hasTrailingComment$1(n.consequent) && n.consequent.comments.some(comment => comment.trailing && !comments$1.isBlockComment(comment)) || needsHardlineAfterDanglingComment$1(n);
+ const elseOnSameLine = n.consequent.type === "BlockStatement" && !commentOnOwnLine;
+ parts.push(elseOnSameLine ? " " : hardline$4);
+
+ if (hasDanglingComments$1(n)) {
+ parts.push(comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$4 : " ");
+ }
+
+ parts.push("else", group$2(adjustClause(n.alternate, path.call(print, "alternate"), n.alternate.type === "IfStatement")));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "ForStatement":
+ {
+ const body = adjustClause(n.body, path.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent.
+ // Any comment positioned between the for statement and the parentheses
+ // is going to be printed before the statement.
+
+ const dangling = comments.printDanglingComments(path, options,
+ /* sameLine */
+ true);
+ const printedComments = dangling ? concat$6([dangling, softline$2]) : "";
+
+ if (!n.init && !n.test && !n.update) {
+ return concat$6([printedComments, group$2(concat$6(["for (;;)", body]))]);
+ }
+
+ return concat$6([printedComments, group$2(concat$6(["for (", group$2(concat$6([indent$3(concat$6([softline$2, path.call(print, "init"), ";", line$4, path.call(print, "test"), ";", line$4, path.call(print, "update")])), softline$2])), ")", body]))]);
+ }
+
+ case "WhileStatement":
+ return group$2(concat$6(["while (", group$2(concat$6([indent$3(concat$6([softline$2, path.call(print, "test")])), softline$2])), ")", adjustClause(n.body, path.call(print, "body"))]));
+
+ case "ForInStatement":
+ // Note: esprima can't actually parse "for each (".
+ return group$2(concat$6([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
+
+ case "ForOfStatement":
+ return group$2(concat$6(["for", n.await ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
+
+ case "DoWhileStatement":
+ {
+ const clause = adjustClause(n.body, path.call(print, "body"));
+ const doBody = group$2(concat$6(["do", clause]));
+ parts = [doBody];
+
+ if (n.body.type === "BlockStatement") {
+ parts.push(" ");
+ } else {
+ parts.push(hardline$4);
+ }
+
+ parts.push("while (");
+ parts.push(group$2(concat$6([indent$3(concat$6([softline$2, path.call(print, "test")])), softline$2])), ")", semi);
+ return concat$6(parts);
+ }
+
+ case "DoExpression":
+ return concat$6(["do ", path.call(print, "body")]);
+
+ case "BreakStatement":
+ parts.push("break");
+
+ if (n.label) {
+ parts.push(" ", path.call(print, "label"));
+ }
+
+ parts.push(semi);
+ return concat$6(parts);
+
+ case "ContinueStatement":
+ parts.push("continue");
+
+ if (n.label) {
+ parts.push(" ", path.call(print, "label"));
+ }
+
+ parts.push(semi);
+ return concat$6(parts);
+
+ case "LabeledStatement":
+ if (n.body.type === "EmptyStatement") {
+ return concat$6([path.call(print, "label"), ":;"]);
+ }
+
+ return concat$6([path.call(print, "label"), ": ", path.call(print, "body")]);
+
+ case "TryStatement":
+ return concat$6(["try ", path.call(print, "block"), n.handler ? concat$6([" ", path.call(print, "handler")]) : "", n.finalizer ? concat$6([" finally ", path.call(print, "finalizer")]) : ""]);
+
+ case "CatchClause":
+ if (n.param) {
+ const hasComments = n.param.comments && n.param.comments.some(comment => !comments$1.isBlockComment(comment) || comment.leading && hasNewline$4(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$4(options.originalText, options.locStart(comment), {
+ backwards: true
+ }));
+ const param = path.call(print, "param");
+ return concat$6(["catch ", hasComments ? concat$6(["(", indent$3(concat$6([softline$2, param])), softline$2, ") "]) : concat$6(["(", param, ") "]), path.call(print, "body")]);
+ }
+
+ return concat$6(["catch ", path.call(print, "body")]);
+
+ case "ThrowStatement":
+ return concat$6(["throw", printReturnAndThrowArgument(path, options, print)]);
+ // Note: ignoring n.lexical because it has no printing consequences.
+
+ case "SwitchStatement":
+ return concat$6([group$2(concat$6(["switch (", indent$3(concat$6([softline$2, path.call(print, "discriminant")])), softline$2, ")"])), " {", n.cases.length > 0 ? indent$3(concat$6([hardline$4, join$4(hardline$4, path.map(casePath => {
+ const caseNode = casePath.getValue();
+ return concat$6([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$2(options.originalText, caseNode, options.locEnd) ? hardline$4 : ""]);
+ }, "cases"))])) : "", hardline$4, "}"]);
+
+ case "SwitchCase":
+ {
+ if (n.test) {
+ parts.push("case ", path.call(print, "test"), ":");
+ } else {
+ parts.push("default:");
+ }
+
+ const consequent = n.consequent.filter(node => node.type !== "EmptyStatement");
+
+ if (consequent.length > 0) {
+ const cons = path.call(consequentPath => {
+ return printStatementSequence(consequentPath, options, print);
+ }, "consequent");
+ parts.push(consequent.length === 1 && consequent[0].type === "BlockStatement" ? concat$6([" ", cons]) : indent$3(concat$6([hardline$4, cons])));
+ }
+
+ return concat$6(parts);
+ }
+ // JSX extensions below.
+
+ case "DebuggerStatement":
+ return concat$6(["debugger", semi]);
+
+ case "JSXAttribute":
+ parts.push(path.call(print, "name"));
+
+ if (n.value) {
+ let res;
+
+ if (isStringLiteral$1(n.value)) {
+ const raw = rawText$1(n.value); // Unescape all quotes so we get an accurate preferred quote
+
+ let final = raw.replace(/'/g, "'").replace(/"/g, '"');
+ const quote = getPreferredQuote$1(final, options.jsxSingleQuote ? "'" : '"');
+ const escape = quote === "'" ? "'" : """;
+ final = final.slice(1, -1).replace(new RegExp(quote, "g"), escape);
+ res = concat$6([quote, final, quote]);
+ } else {
+ res = path.call(print, "value");
+ }
+
+ parts.push("=", res);
+ }
+
+ return concat$6(parts);
+
+ case "JSXIdentifier":
+ return "" + n.name;
+
+ case "JSXNamespacedName":
+ return join$4(":", [path.call(print, "namespace"), path.call(print, "name")]);
+
+ case "JSXMemberExpression":
+ return join$4(".", [path.call(print, "object"), path.call(print, "property")]);
+
+ case "TSQualifiedName":
+ return join$4(".", [path.call(print, "left"), path.call(print, "right")]);
+
+ case "JSXSpreadAttribute":
+ case "JSXSpreadChild":
+ {
+ return concat$6(["{", path.call(p => {
+ const printed = concat$6(["...", print(p)]);
+ const n = p.getValue();
+
+ if (!n.comments || !n.comments.length) {
+ return printed;
+ }
+
+ return concat$6([indent$3(concat$6([softline$2, comments.printComments(p, () => printed, options)])), softline$2]);
+ }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), "}"]);
+ }
+
+ case "JSXExpressionContainer":
+ {
+ const parent = path.getParentNode(0);
+ const hasComments = n.expression.comments && n.expression.comments.length > 0;
+ const shouldInline = n.expression.type === "JSXEmptyExpression" || !hasComments && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode$1(parent) && (n.expression.type === "ConditionalExpression" || isBinaryish$1(n.expression)));
+
+ if (shouldInline) {
+ return group$2(concat$6(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
+ }
+
+ return group$2(concat$6(["{", indent$3(concat$6([softline$2, path.call(print, "expression")])), softline$2, lineSuffixBoundary$1, "}"]));
+ }
+
+ case "JSXFragment":
+ case "JSXElement":
+ {
+ const elem = comments.printComments(path, () => printJSXElement(path, options, print), options);
+ return maybeWrapJSXElementInParens(path, elem, options);
+ }
+
+ case "JSXOpeningElement":
+ {
+ const n = path.getValue();
+ const nameHasComments = n.name && n.name.comments && n.name.comments.length > 0 || n.typeParameters && n.typeParameters.comments && n.typeParameters.comments.length > 0; // Don't break self-closing elements with no attributes and no comments
+
+ if (n.selfClosing && !n.attributes.length && !nameHasComments) {
+ return concat$6(["<", path.call(print, "name"), path.call(print, "typeParameters"), " />"]);
+ } // don't break up opening elements with a single long text attribute
+
+
+ if (n.attributes && n.attributes.length === 1 && n.attributes[0].value && isStringLiteral$1(n.attributes[0].value) && !n.attributes[0].value.value.includes("\n") && // We should break for the following cases:
+ //
+ //
+ !nameHasComments && (!n.attributes[0].comments || !n.attributes[0].comments.length)) {
+ return group$2(concat$6(["<", path.call(print, "name"), path.call(print, "typeParameters"), " ", concat$6(path.map(print, "attributes")), n.selfClosing ? " />" : ">"]));
+ }
+
+ const lastAttrHasTrailingComments = n.attributes.length && hasTrailingComment$1(getLast$2(n.attributes));
+ const bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be
+ // kept unbroken regardless of `jsxBracketSameLine`
+ !n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases:
+ //
+ //
+ !nameHasComments || n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a
+ // string literal with newlines
+
+ const shouldBreak = n.attributes && n.attributes.some(attr => attr.value && isStringLiteral$1(attr.value) && attr.value.value.includes("\n"));
+ return group$2(concat$6(["<", path.call(print, "name"), path.call(print, "typeParameters"), concat$6([indent$3(concat$6(path.map(attr => concat$6([line$4, print(attr)]), "attributes"))), n.selfClosing ? line$4 : bracketSameLine ? ">" : softline$2]), n.selfClosing ? "/>" : bracketSameLine ? "" : ">"]), {
+ shouldBreak
+ });
+ }
+
+ case "JSXClosingElement":
+ return concat$6(["", path.call(print, "name"), ">"]);
+
+ case "JSXOpeningFragment":
+ case "JSXClosingFragment":
+ {
+ const hasComment = n.comments && n.comments.length;
+ const hasOwnLineComment = hasComment && !n.comments.every(comments$1.isBlockComment);
+ const isOpeningFragment = n.type === "JSXOpeningFragment";
+ return concat$6([isOpeningFragment ? "<" : "", indent$3(concat$6([hasOwnLineComment ? hardline$4 : hasComment && !isOpeningFragment ? " " : "", comments.printDanglingComments(path, options, true)])), hasOwnLineComment ? hardline$4 : "", ">"]);
+ }
+
+ case "JSXText":
+ /* istanbul ignore next */
+ throw new Error("JSXTest should be handled by JSXElement");
+
+ case "JSXEmptyExpression":
+ {
+ const requiresHardline = n.comments && !n.comments.every(comments$1.isBlockComment);
+ return concat$6([comments.printDanglingComments(path, options,
+ /* sameIndent */
+ !requiresHardline), requiresHardline ? hardline$4 : ""]);
+ }
+
+ case "ClassBody":
+ if (!n.comments && n.body.length === 0) {
+ return "{}";
+ }
+
+ return concat$6(["{", n.body.length > 0 ? indent$3(concat$6([hardline$4, path.call(bodyPath => {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body")])) : comments.printDanglingComments(path, options), hardline$4, "}"]);
+
+ case "ClassProperty":
+ case "TSAbstractClassProperty":
+ case "ClassPrivateProperty":
+ {
+ if (n.decorators && n.decorators.length !== 0) {
+ parts.push(printDecorators(path, options, print));
+ }
+
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.type === "TSAbstractClassProperty" || n.abstract) {
+ parts.push("abstract ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ const variance = getFlowVariance$1(n);
+
+ if (variance) {
+ parts.push(variance);
+ }
+
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path), printTypeAnnotation(path, options, print));
+
+ if (n.value) {
+ parts.push(" =", printAssignmentRight(n.key, n.value, path.call(print, "value"), options));
+ }
+
+ parts.push(semi);
+ return group$2(concat$6(parts));
+ }
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push(concat$6(printClass(path, options, print)));
+ return concat$6(parts);
+
+ case "TSInterfaceHeritage":
+ case "TSExpressionWithTypeArguments":
+ // Babel AST
+ parts.push(path.call(print, "expression"));
+
+ if (n.typeParameters) {
+ parts.push(path.call(print, "typeParameters"));
+ }
+
+ return concat$6(parts);
+
+ case "TemplateElement":
+ return join$4(literalline$2, n.value.raw.split(/\r?\n/g));
+
+ case "TemplateLiteral":
+ {
+ let expressions = path.map(print, "expressions");
+ const parentNode = path.getParentNode();
+
+ if (isJestEachTemplateLiteral$1(n, parentNode)) {
+ const printed = printJestEachTemplateLiteral(n, expressions, options);
+
+ if (printed) {
+ return printed;
+ }
+ }
+
+ const isSimple = isSimpleTemplateLiteral$1(n);
+
+ if (isSimple) {
+ expressions = expressions.map(doc => printDocToString$2(doc, Object.assign({}, options, {
+ printWidth: Infinity
+ })).formatted);
+ }
+
+ parts.push(lineSuffixBoundary$1, "`");
+ path.each(childPath => {
+ const i = childPath.getName();
+ parts.push(print(childPath));
+
+ if (i < expressions.length) {
+ // For a template literal of the following form:
+ // `someQuery {
+ // ${call({
+ // a,
+ // b,
+ // })}
+ // }`
+ // the expression is on its own line (there is a \n in the previous
+ // quasi literal), therefore we want to indent the JavaScript
+ // expression inside at the beginning of ${ instead of the beginning
+ // of the `.
+ const {
+ tabWidth
+ } = options;
+ const quasi = childPath.getValue();
+ const indentSize = getIndentSize$2(quasi.value.raw, tabWidth);
+ let printed = expressions[i];
+
+ if (!isSimple) {
+ // Breaks at the template element boundaries (${ and }) are preferred to breaking
+ // in the middle of a MemberExpression
+ if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "SequenceExpression" || n.expressions[i].type === "TSAsExpression" || isBinaryish$1(n.expressions[i])) {
+ printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
+ }
+ }
+
+ const aligned = indentSize === 0 && quasi.value.raw.endsWith("\n") ? align$1(-Infinity, printed) : addAlignmentToDoc$2(printed, indentSize, tabWidth);
+ parts.push(group$2(concat$6(["${", aligned, lineSuffixBoundary$1, "}"])));
+ }
+ }, "quasis");
+ parts.push("`");
+ return concat$6(parts);
+ }
+ // These types are unprintable because they serve as abstract
+ // supertypes for other (printable) types.
+
+ case "TaggedTemplateExpression":
+ return concat$6([path.call(print, "tag"), path.call(print, "typeParameters"), path.call(print, "quasi")]);
+
+ 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": // Flow
+
+ case "Type":
+ /* istanbul ignore next */
+ throw new Error("unprintable type: " + JSON.stringify(n.type));
+ // Type Annotations for Facebook Flow, typically stripped out or
+ // transformed away before printing.
+
+ case "TypeAnnotation":
+ case "TSTypeAnnotation":
+ if (n.typeAnnotation) {
+ return path.call(print, "typeAnnotation");
+ }
+ /* istanbul ignore next */
+
+
+ return "";
+
+ case "TSTupleType":
+ case "TupleTypeAnnotation":
+ {
+ const typesField = n.type === "TSTupleType" ? "elementTypes" : "types";
+ const hasRest = n[typesField].length > 0 && getLast$2(n[typesField]).type === "TSRestType";
+ return group$2(concat$6(["[", indent$3(concat$6([softline$2, printArrayItems(path, options, typesField, print)])), ifBreak$1(shouldPrintComma(options, "all") && !hasRest ? "," : ""), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), softline$2, "]"]));
+ }
+
+ case "ExistsTypeAnnotation":
+ return "*";
+
+ case "EmptyTypeAnnotation":
+ return "empty";
+
+ case "AnyTypeAnnotation":
+ return "any";
+
+ case "MixedTypeAnnotation":
+ return "mixed";
+
+ case "ArrayTypeAnnotation":
+ return concat$6([path.call(print, "elementType"), "[]"]);
+
+ case "BooleanTypeAnnotation":
+ return "boolean";
+
+ case "BooleanLiteralTypeAnnotation":
+ return "" + n.value;
+
+ case "DeclareClass":
+ return printFlowDeclaration(path, printClass(path, options, print));
+
+ case "TSDeclareFunction":
+ // For TypeScript the TSDeclareFunction node shares the AST
+ // structure with FunctionDeclaration
+ return concat$6([n.declare ? "declare " : "", printFunctionDeclaration(path, print, options), semi]);
+
+ case "DeclareFunction":
+ return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]);
+
+ case "DeclareModule":
+ return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]);
+
+ case "DeclareModuleExports":
+ return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]);
+
+ case "DeclareVariable":
+ return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]);
+
+ case "DeclareExportAllDeclaration":
+ return concat$6(["declare export * from ", path.call(print, "source")]);
+
+ case "DeclareExportDeclaration":
+ return concat$6(["declare ", printExportDeclaration(path, options, print)]);
+
+ case "DeclareOpaqueType":
+ case "OpaqueType":
+ {
+ parts.push("opaque type ", path.call(print, "id"), path.call(print, "typeParameters"));
+
+ if (n.supertype) {
+ parts.push(": ", path.call(print, "supertype"));
+ }
+
+ if (n.impltype) {
+ parts.push(" = ", path.call(print, "impltype"));
+ }
+
+ parts.push(semi);
+
+ if (n.type === "DeclareOpaqueType") {
+ return printFlowDeclaration(path, parts);
+ }
+
+ return concat$6(parts);
+ }
+
+ case "EnumDeclaration":
+ return concat$6(["enum ", path.call(print, "id"), " ", path.call(print, "body")]);
+
+ case "EnumBooleanBody":
+ case "EnumNumberBody":
+ case "EnumStringBody":
+ case "EnumSymbolBody":
+ {
+ if (n.type === "EnumSymbolBody" || n.explicitType) {
+ let type = null;
+
+ switch (n.type) {
+ case "EnumBooleanBody":
+ type = "boolean";
+ break;
+
+ case "EnumNumberBody":
+ type = "number";
+ break;
+
+ case "EnumStringBody":
+ type = "string";
+ break;
+
+ case "EnumSymbolBody":
+ type = "symbol";
+ break;
+ }
+
+ parts.push("of ", type, " ");
+ }
+
+ if (n.members.length === 0) {
+ parts.push(group$2(concat$6(["{", comments.printDanglingComments(path, options), softline$2, "}"])));
+ } else {
+ parts.push(group$2(concat$6(["{", indent$3(concat$6([hardline$4, printArrayItems(path, options, "members", print), shouldPrintComma(options) ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$4, "}"])));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "EnumBooleanMember":
+ case "EnumNumberMember":
+ case "EnumStringMember":
+ return concat$6([path.call(print, "id"), " = ", typeof n.init === "object" ? path.call(print, "init") : String(n.init)]);
+
+ case "EnumDefaultedMember":
+ return path.call(print, "id");
+
+ case "FunctionTypeAnnotation":
+ case "TSFunctionType":
+ {
+ // FunctionTypeAnnotation is ambiguous:
+ // declare function foo(a: B): void; OR
+ // var A: (a: B) => void;
+ const parent = path.getParentNode(0);
+ const parentParent = path.getParentNode(1);
+ const parentParentParent = path.getParentNode(2);
+ let isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !((parent.type === "ObjectTypeProperty" || parent.type === "ObjectTypeInternalSlot") && !getFlowVariance$1(parent) && !parent.optional && options.locStart(parent) === options.locStart(n) || parent.type === "ObjectTypeCallProperty" || parentParentParent && parentParentParent.type === "DeclareFunction");
+ let needsColon = isArrowFunctionTypeAnnotation && (parent.type === "TypeAnnotation" || parent.type === "TSTypeAnnotation"); // Sadly we can't put it inside of FastPath::needsColon because we are
+ // printing ":" as part of the expression and it would put parenthesis
+ // around :(
+
+ const needsParens = needsColon && isArrowFunctionTypeAnnotation && (parent.type === "TypeAnnotation" || parent.type === "TSTypeAnnotation") && parentParent.type === "ArrowFunctionExpression";
+
+ if (isObjectTypePropertyAFunction$1(parent, options)) {
+ isArrowFunctionTypeAnnotation = true;
+ needsColon = true;
+ }
+
+ if (needsParens) {
+ parts.push("(");
+ }
+
+ parts.push(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)); // The returnType is not wrapped in a TypeAnnotation, so the colon
+ // needs to be added separately.
+
+ if (n.returnType || n.predicate || n.typeAnnotation) {
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation"));
+ }
+
+ if (needsParens) {
+ parts.push(")");
+ }
+
+ return group$2(concat$6(parts));
+ }
+
+ case "TSRestType":
+ return concat$6(["...", path.call(print, "typeAnnotation")]);
+
+ case "TSOptionalType":
+ return concat$6([path.call(print, "typeAnnotation"), "?"]);
+
+ case "FunctionTypeParam":
+ return concat$6([path.call(print, "name"), printOptionalToken(path), n.name ? ": " : "", path.call(print, "typeAnnotation")]);
+
+ case "GenericTypeAnnotation":
+ return concat$6([path.call(print, "id"), path.call(print, "typeParameters")]);
+
+ case "DeclareInterface":
+ case "InterfaceDeclaration":
+ case "InterfaceTypeAnnotation":
+ {
+ if (n.type === "DeclareInterface" || n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push("interface");
+
+ if (n.type === "DeclareInterface" || n.type === "InterfaceDeclaration") {
+ parts.push(" ", path.call(print, "id"), path.call(print, "typeParameters"));
+ }
+
+ if (n.extends.length > 0) {
+ parts.push(group$2(indent$3(concat$6([line$4, "extends ", (n.extends.length === 1 ? identity$2 : indent$3)(join$4(concat$6([",", line$4]), path.map(print, "extends")))]))));
+ }
+
+ parts.push(" ", path.call(print, "body"));
+ return group$2(concat$6(parts));
+ }
+
+ case "ClassImplements":
+ case "InterfaceExtends":
+ return concat$6([path.call(print, "id"), path.call(print, "typeParameters")]);
+
+ case "TSClassImplements":
+ return concat$6([path.call(print, "expression"), path.call(print, "typeParameters")]);
+
+ case "TSIntersectionType":
+ case "IntersectionTypeAnnotation":
+ {
+ const types = path.map(print, "types");
+ const result = [];
+ let wasIndented = false;
+
+ for (let i = 0; i < types.length; ++i) {
+ if (i === 0) {
+ result.push(types[i]);
+ } else if (isObjectType$1(n.types[i - 1]) && isObjectType$1(n.types[i])) {
+ // If both are objects, don't indent
+ result.push(concat$6([" & ", wasIndented ? indent$3(types[i]) : types[i]]));
+ } else if (!isObjectType$1(n.types[i - 1]) && !isObjectType$1(n.types[i])) {
+ // If no object is involved, go to the next line if it breaks
+ result.push(indent$3(concat$6([" &", line$4, types[i]])));
+ } else {
+ // If you go from object to non-object or vis-versa, then inline it
+ if (i > 1) {
+ wasIndented = true;
+ }
+
+ result.push(" & ", i > 1 ? indent$3(types[i]) : types[i]);
+ }
+ }
+
+ return group$2(concat$6(result));
+ }
+
+ case "TSUnionType":
+ case "UnionTypeAnnotation":
+ {
+ // single-line variation
+ // A | B | C
+ // multi-line variation
+ // | A
+ // | B
+ // | C
+ const parent = path.getParentNode(); // If there's a leading comment, the parent is doing the indentation
+
+ const shouldIndent = parent.type !== "TypeParameterInstantiation" && parent.type !== "TSTypeParameterInstantiation" && parent.type !== "GenericTypeAnnotation" && parent.type !== "TSTypeReference" && parent.type !== "TSTypeAssertion" && parent.type !== "TupleTypeAnnotation" && parent.type !== "TSTupleType" && !(parent.type === "FunctionTypeParam" && !parent.name) && !((parent.type === "TypeAlias" || parent.type === "VariableDeclarator" || parent.type === "TSTypeAliasDeclaration") && hasLeadingOwnLineComment$1(options.originalText, n, options)); // {
+ // a: string
+ // } | null | void
+ // should be inlined and not be printed in the multi-line variant
+
+ const shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like
+ // | child1
+ // // comment
+ // | child2
+
+ const printed = path.map(typePath => {
+ let printedType = typePath.call(print);
+
+ if (!shouldHug) {
+ printedType = align$1(2, printedType);
+ }
+
+ return comments.printComments(typePath, () => printedType, options);
+ }, "types");
+
+ if (shouldHug) {
+ return join$4(" | ", printed);
+ }
+
+ const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment$1(options.originalText, n, options);
+ const code = concat$6([ifBreak$1(concat$6([shouldAddStartLine ? line$4 : "", "| "])), join$4(concat$6([line$4, "| "]), printed)]);
+
+ if (needsParens_1(path, options)) {
+ return group$2(concat$6([indent$3(code), softline$2]));
+ }
+
+ if (parent.type === "TupleTypeAnnotation" && parent.types.length > 1 || parent.type === "TSTupleType" && parent.elementTypes.length > 1) {
+ return group$2(concat$6([indent$3(concat$6([ifBreak$1(concat$6(["(", softline$2])), code])), softline$2, ifBreak$1(")")]));
+ }
+
+ return group$2(shouldIndent ? indent$3(code) : code);
+ }
+
+ case "NullableTypeAnnotation":
+ return concat$6(["?", path.call(print, "typeAnnotation")]);
+
+ case "TSNullKeyword":
+ case "NullLiteralTypeAnnotation":
+ return "null";
+
+ case "ThisTypeAnnotation":
+ return "this";
+
+ case "NumberTypeAnnotation":
+ return "number";
+
+ case "SymbolTypeAnnotation":
+ return "symbol";
+
+ case "ObjectTypeCallProperty":
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ parts.push(path.call(print, "value"));
+ return concat$6(parts);
+
+ case "ObjectTypeIndexer":
+ {
+ const variance = getFlowVariance$1(n);
+ return concat$6([variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]);
+ }
+
+ case "ObjectTypeProperty":
+ {
+ const variance = getFlowVariance$1(n);
+ let modifier = "";
+
+ if (n.proto) {
+ modifier = "proto ";
+ } else if (n.static) {
+ modifier = "static ";
+ }
+
+ return concat$6([modifier, isGetterOrSetter$1(n) ? n.kind + " " : "", variance || "", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation$1(n, options) ? "" : ": ", path.call(print, "value")]);
+ }
+
+ case "QualifiedTypeIdentifier":
+ return concat$6([path.call(print, "qualification"), ".", path.call(print, "id")]);
+
+ case "StringLiteralTypeAnnotation":
+ return nodeStr(n, options);
+
+ case "NumberLiteralTypeAnnotation":
+ assert$1.strictEqual(typeof n.value, "number");
+
+ if (n.extra != null) {
+ return printNumber$1(n.extra.raw);
+ }
+
+ return printNumber$1(n.raw);
+
+ case "StringTypeAnnotation":
+ return "string";
+
+ case "DeclareTypeAlias":
+ case "TypeAlias":
+ {
+ if (n.type === "DeclareTypeAlias" || n.declare) {
+ parts.push("declare ");
+ }
+
+ const printed = printAssignmentRight(n.id, n.right, path.call(print, "right"), options);
+ parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", printed, semi);
+ return group$2(concat$6(parts));
+ }
+
+ case "TypeCastExpression":
+ {
+ return concat$6(["(", path.call(print, "expression"), printTypeAnnotation(path, options, print), ")"]);
+ }
+
+ case "TypeParameterDeclaration":
+ case "TypeParameterInstantiation":
+ {
+ const value = path.getValue();
+ const commentStart = value.range ? options.originalText.slice(0, value.range[0]).lastIndexOf("/*") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here
+ // because we know for sure that this is a type definition.
+
+ const commentSyntax = commentStart >= 0 && options.originalText.slice(commentStart).match(/^\/\*\s*::/);
+
+ if (commentSyntax) {
+ return concat$6(["/*:: ", printTypeParameters(path, options, print, "params"), " */"]);
+ }
+
+ return printTypeParameters(path, options, print, "params");
+ }
+
+ case "TSTypeParameterDeclaration":
+ case "TSTypeParameterInstantiation":
+ return printTypeParameters(path, options, print, "params");
+
+ case "TSTypeParameter":
+ case "TypeParameter":
+ {
+ const parent = path.getParentNode();
+
+ if (parent.type === "TSMappedType") {
+ parts.push("[", path.call(print, "name"));
+
+ if (n.constraint) {
+ parts.push(" in ", path.call(print, "constraint"));
+ }
+
+ parts.push("]");
+ return concat$6(parts);
+ }
+
+ const variance = getFlowVariance$1(n);
+
+ if (variance) {
+ parts.push(variance);
+ }
+
+ parts.push(path.call(print, "name"));
+
+ if (n.bound) {
+ parts.push(": ");
+ parts.push(path.call(print, "bound"));
+ }
+
+ if (n.constraint) {
+ parts.push(" extends ", path.call(print, "constraint"));
+ }
+
+ if (n.default) {
+ parts.push(" = ", path.call(print, "default"));
+ } // Keep comma if the file extension is .tsx and
+ // has one type parameter that isn't extend with any types.
+ // Because, otherwise formatted result will be invalid as tsx.
+
+
+ const grandParent = path.getNode(2);
+
+ if (parent.params && parent.params.length === 1 && isTSXFile$1(options) && !n.constraint && grandParent.type === "ArrowFunctionExpression") {
+ parts.push(",");
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TypeofTypeAnnotation":
+ return concat$6(["typeof ", path.call(print, "argument")]);
+
+ case "VoidTypeAnnotation":
+ return "void";
+
+ case "InferredPredicate":
+ return "%checks";
+ // Unhandled types below. If encountered, nodes of these types should
+ // be either left alone or desugared into AST types that are fully
+ // supported by the pretty-printer.
+
+ case "DeclaredPredicate":
+ return concat$6(["%checks(", path.call(print, "value"), ")"]);
+
+ case "TSAbstractKeyword":
+ return "abstract";
+
+ case "TSAnyKeyword":
+ return "any";
+
+ case "TSAsyncKeyword":
+ return "async";
+
+ case "TSBooleanKeyword":
+ return "boolean";
+
+ case "TSBigIntKeyword":
+ return "bigint";
+
+ case "TSConstKeyword":
+ return "const";
+
+ case "TSDeclareKeyword":
+ return "declare";
+
+ case "TSExportKeyword":
+ return "export";
+
+ case "TSNeverKeyword":
+ return "never";
+
+ case "TSNumberKeyword":
+ return "number";
+
+ case "TSObjectKeyword":
+ return "object";
+
+ case "TSProtectedKeyword":
+ return "protected";
+
+ case "TSPrivateKeyword":
+ return "private";
+
+ case "TSPublicKeyword":
+ return "public";
+
+ case "TSReadonlyKeyword":
+ return "readonly";
+
+ case "TSSymbolKeyword":
+ return "symbol";
+
+ case "TSStaticKeyword":
+ return "static";
+
+ case "TSStringKeyword":
+ return "string";
+
+ case "TSUndefinedKeyword":
+ return "undefined";
+
+ case "TSUnknownKeyword":
+ return "unknown";
+
+ case "TSVoidKeyword":
+ return "void";
+
+ case "TSAsExpression":
+ return concat$6([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]);
+
+ case "TSArrayType":
+ return concat$6([path.call(print, "elementType"), "[]"]);
+
+ case "TSPropertySignature":
+ {
+ if (n.export) {
+ parts.push("export ");
+ }
+
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ parts.push(printPropertyKey(path, options, print), printOptionalToken(path));
+
+ if (n.typeAnnotation) {
+ parts.push(": ");
+ parts.push(path.call(print, "typeAnnotation"));
+ } // This isn't valid semantically, but it's in the AST so we can print it.
+
+
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TSParameterProperty":
+ if (n.accessibility) {
+ parts.push(n.accessibility + " ");
+ }
+
+ if (n.export) {
+ parts.push("export ");
+ }
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ if (n.readonly) {
+ parts.push("readonly ");
+ }
+
+ parts.push(path.call(print, "parameter"));
+ return concat$6(parts);
+
+ case "TSTypeReference":
+ return concat$6([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]);
+
+ case "TSTypeQuery":
+ return concat$6(["typeof ", path.call(print, "exprName")]);
+
+ case "TSIndexSignature":
+ {
+ const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
+ // using them, it makes sense to have a trailing comma. But if you
+ // aren't, this is more like a computed property name than an array.
+ // So we leave off the trailing comma when there's just one parameter.
+
+ const trailingComma = n.parameters.length > 1 ? ifBreak$1(shouldPrintComma(options) ? "," : "") : "";
+ const parametersGroup = group$2(concat$6([indent$3(concat$6([softline$2, join$4(concat$6([", ", softline$2]), path.map(print, "parameters"))])), trailingComma, softline$2]));
+ return concat$6([n.export ? "export " : "", n.accessibility ? concat$6([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? parametersGroup : "", n.typeAnnotation ? "]: " : "]", n.typeAnnotation ? path.call(print, "typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""]);
+ }
+
+ case "TSTypePredicate":
+ return concat$6([n.asserts ? "asserts " : "", path.call(print, "parameterName"), n.typeAnnotation ? concat$6([" is ", path.call(print, "typeAnnotation")]) : ""]);
+
+ case "TSNonNullExpression":
+ return concat$6([path.call(print, "expression"), "!"]);
+
+ case "TSThisType":
+ return "this";
+
+ case "TSImportType":
+ return concat$6([!n.isTypeOf ? "" : "typeof ", "import(", path.call(print, n.parameter ? "parameter" : "argument"), ")", !n.qualifier ? "" : concat$6([".", path.call(print, "qualifier")]), printTypeParameters(path, options, print, "typeParameters")]);
+
+ case "TSLiteralType":
+ return path.call(print, "literal");
+
+ case "TSIndexedAccessType":
+ return concat$6([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]);
+
+ case "TSConstructSignatureDeclaration":
+ case "TSCallSignatureDeclaration":
+ case "TSConstructorType":
+ {
+ if (n.type !== "TSCallSignatureDeclaration") {
+ parts.push("new ");
+ }
+
+ parts.push(group$2(printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true)));
+
+ if (n.returnType || n.typeAnnotation) {
+ const isType = n.type === "TSConstructorType";
+ parts.push(isType ? " => " : ": ", path.call(print, "returnType"), path.call(print, "typeAnnotation"));
+ }
+
+ return concat$6(parts);
+ }
+
+ case "TSTypeOperator":
+ return concat$6([n.operator, " ", path.call(print, "typeAnnotation")]);
+
+ case "TSMappedType":
+ {
+ const shouldBreak = hasNewlineInRange$3(options.originalText, options.locStart(n), options.locEnd(n));
+ return group$2(concat$6(["{", indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, n.readonly ? concat$6([getTypeScriptMappedTypeModifier$1(n.readonly, "readonly"), " "]) : "", printTypeScriptModifiers(path, options, print), path.call(print, "typeParameter"), n.optional ? getTypeScriptMappedTypeModifier$1(n.optional, "?") : "", n.typeAnnotation ? ": " : "", path.call(print, "typeAnnotation"), ifBreak$1(semi, "")])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), options.bracketSpacing ? line$4 : softline$2, "}"]), {
+ shouldBreak
+ });
+ }
+
+ case "TSMethodSignature":
+ parts.push(n.accessibility ? concat$6([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", printOptionalToken(path), printFunctionParams(path, print, options,
+ /* expandArg */
+ false,
+ /* printTypeParams */
+ true));
+
+ if (n.returnType || n.typeAnnotation) {
+ parts.push(": ", path.call(print, "returnType"), path.call(print, "typeAnnotation"));
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSNamespaceExportDeclaration":
+ parts.push("export as namespace ", path.call(print, "id"));
+
+ if (options.semi) {
+ parts.push(";");
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSEnumDeclaration":
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ if (n.modifiers) {
+ parts.push(printTypeScriptModifiers(path, options, print));
+ }
+
+ if (n.const) {
+ parts.push("const ");
+ }
+
+ parts.push("enum ", path.call(print, "id"), " ");
+
+ if (n.members.length === 0) {
+ parts.push(group$2(concat$6(["{", comments.printDanglingComments(path, options), softline$2, "}"])));
+ } else {
+ parts.push(group$2(concat$6(["{", indent$3(concat$6([hardline$4, printArrayItems(path, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), hardline$4, "}"])));
+ }
+
+ return concat$6(parts);
+
+ case "TSEnumMember":
+ parts.push(path.call(print, "id"));
+
+ if (n.initializer) {
+ parts.push(" = ", path.call(print, "initializer"));
+ }
+
+ return concat$6(parts);
+
+ case "TSImportEqualsDeclaration":
+ if (n.isExport) {
+ parts.push("export ");
+ }
+
+ parts.push("import ", path.call(print, "id"), " = ", path.call(print, "moduleReference"));
+
+ if (options.semi) {
+ parts.push(";");
+ }
+
+ return group$2(concat$6(parts));
+
+ case "TSExternalModuleReference":
+ return concat$6(["require(", path.call(print, "expression"), ")"]);
+
+ case "TSModuleDeclaration":
+ {
+ const parent = path.getParentNode();
+ const isExternalModule = isLiteral$1(n.id);
+ const parentIsDeclaration = parent.type === "TSModuleDeclaration";
+ const bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration";
+
+ if (parentIsDeclaration) {
+ parts.push(".");
+ } else {
+ if (n.declare) {
+ parts.push("declare ");
+ }
+
+ parts.push(printTypeScriptModifiers(path, options, print));
+ const textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this:
+ // (declare)? global { ... }
+
+ const isGlobalDeclaration = n.id.type === "Identifier" && n.id.name === "global" && !/namespace|module/.test(textBetweenNodeAndItsId);
+
+ if (!isGlobalDeclaration) {
+ parts.push(isExternalModule || /(^|\s)module(\s|$)/.test(textBetweenNodeAndItsId) ? "module " : "namespace ");
+ }
+ }
+
+ parts.push(path.call(print, "id"));
+
+ if (bodyIsDeclaration) {
+ parts.push(path.call(print, "body"));
+ } else if (n.body) {
+ parts.push(" ", group$2(path.call(print, "body")));
+ } else {
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+ }
+
+ case "PrivateName":
+ return concat$6(["#", path.call(print, "id")]);
+ // TODO: Temporary auto-generated node type. To remove when typescript-estree has proper support for private fields.
+
+ case "TSPrivateIdentifier":
+ return n.escapedText;
+
+ case "TSConditionalType":
+ return printTernaryOperator(path, options, print, {
+ beforeParts: () => [path.call(print, "checkType"), " ", "extends", " ", path.call(print, "extendsType")],
+ afterParts: () => [],
+ shouldCheckJsx: false,
+ conditionalNodeType: "TSConditionalType",
+ consequentNodePropertyName: "trueType",
+ alternateNodePropertyName: "falseType",
+ testNodePropertyNames: ["checkType", "extendsType"]
+ });
+
+ case "TSInferType":
+ return concat$6(["infer", " ", path.call(print, "typeParameter")]);
+
+ case "InterpreterDirective":
+ parts.push("#!", n.value, hardline$4);
+
+ if (isNextLineEmpty$2(options.originalText, n, options.locEnd)) {
+ parts.push(hardline$4);
+ }
+
+ return concat$6(parts);
+
+ case "NGRoot":
+ return concat$6([].concat(path.call(print, "node"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$6([" //", n.node.comments[0].value.trimEnd()])));
+
+ case "NGChainedExpression":
+ return group$2(join$4(concat$6([";", line$4]), path.map(childPath => hasNgSideEffect$1(childPath) ? print(childPath) : concat$6(["(", print(childPath), ")"]), "expressions")));
+
+ case "NGEmptyExpression":
+ return "";
+
+ case "NGQuotedExpression":
+ return concat$6([n.prefix, ": ", n.value.trim()]);
+
+ case "NGMicrosyntax":
+ return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
+
+ case "NGMicrosyntaxKey":
+ return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name);
+
+ case "NGMicrosyntaxExpression":
+ return concat$6([path.call(print, "expression"), n.alias === null ? "" : concat$6([" as ", path.call(print, "alias")])]);
+
+ case "NGMicrosyntaxKeyedExpression":
+ {
+ const index = path.getName();
+ const parentNode = path.getParentNode();
+ const shouldNotPrintColon = isNgForOf$1(n, index, parentNode) || (index === 1 && (n.key.name === "then" || n.key.name === "else") || index === 2 && n.key.name === "else" && parentNode.body[index - 1].type === "NGMicrosyntaxKeyedExpression" && parentNode.body[index - 1].key.name === "then") && parentNode.body[0].type === "NGMicrosyntaxExpression";
+ return concat$6([path.call(print, "key"), shouldNotPrintColon ? " " : ": ", path.call(print, "expression")]);
+ }
+
+ case "NGMicrosyntaxLet":
+ return concat$6(["let ", path.call(print, "key"), n.value === null ? "" : concat$6([" = ", path.call(print, "value")])]);
+
+ case "NGMicrosyntaxAs":
+ return concat$6([path.call(print, "key"), " as ", path.call(print, "alias")]);
+
+ case "ArgumentPlaceholder":
+ return "?";
+ // These are not valid TypeScript. Printing them just for the sake of error recovery.
+
+ case "TSJSDocAllType":
+ return "*";
+
+ case "TSJSDocUnknownType":
+ return "?";
+
+ case "TSJSDocNullableType":
+ return concat$6(["?", path.call(print, "typeAnnotation")]);
+
+ case "TSJSDocNonNullableType":
+ return concat$6(["!", path.call(print, "typeAnnotation")]);
+
+ case "TSJSDocFunctionType":
+ return concat$6(["function(", // The parameters could be here, but typescript-estree doesn't convert them anyway (throws an error).
+ "): ", path.call(print, "typeAnnotation")]);
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(n.type));
+ }
+}
+
+function printStatementSequence(path, options, print) {
+ const printed = [];
+ const bodyNode = path.getNode();
+ const isClass = bodyNode.type === "ClassBody";
+ path.map((stmtPath, i) => {
+ const stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy
+ // "statements," it's safer simply to skip them.
+
+ /* istanbul ignore if */
+
+ if (!stmt) {
+ return;
+ } // Skip printing EmptyStatement nodes to avoid leaving stray
+ // semicolons lying around.
+
+
+ if (stmt.type === "EmptyStatement") {
+ return;
+ }
+
+ const stmtPrinted = print(stmtPath);
+ const text = options.originalText;
+ const parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI
+ // don't prepend the only JSX element in a program with semicolon
+
+ if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown$1(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) {
+ if (stmt.comments && stmt.comments.some(comment => comment.leading)) {
+ parts.push(print(stmtPath, {
+ needsSemi: true
+ }));
+ } else {
+ parts.push(";", stmtPrinted);
+ }
+ } else {
+ parts.push(stmtPrinted);
+ }
+
+ if (!options.semi && isClass) {
+ if (classPropMayCauseASIProblems$1(stmtPath)) {
+ parts.push(";");
+ } else if (stmt.type === "ClassProperty") {
+ const nextChild = bodyNode.body[i + 1];
+
+ if (classChildNeedsASIProtection$1(nextChild)) {
+ parts.push(";");
+ }
+ }
+ }
+
+ if (isNextLineEmpty$2(text, stmt, options.locEnd) && !isLastStatement$1(stmtPath)) {
+ parts.push(hardline$4);
+ }
+
+ printed.push(concat$6(parts));
+ });
+ return join$4(hardline$4, printed);
+}
+
+function printPropertyKey(path, options, print) {
+ const node = path.getNode();
+
+ if (node.computed) {
+ return concat$6(["[", path.call(print, "key"), "]"]);
+ }
+
+ const parent = path.getParentNode();
+ const {
+ key
+ } = node;
+
+ if (node.type === "ClassPrivateProperty" && // flow has `Identifier` key, and babel has `PrivateName` key
+ key.type === "Identifier") {
+ return concat$6(["#", path.call(print, "key")]);
+ }
+
+ if (options.quoteProps === "consistent" && !needsQuoteProps.has(parent)) {
+ const objectHasStringProp = (parent.properties || parent.body || parent.members).some(prop => !prop.computed && prop.key && isStringLiteral$1(prop.key) && !isStringPropSafeToCoerceToIdentifier$1(prop, options));
+ needsQuoteProps.set(parent, objectHasStringProp);
+ }
+
+ if (key.type === "Identifier" && (options.parser === "json" || options.quoteProps === "consistent" && needsQuoteProps.get(parent))) {
+ // a -> "a"
+ const prop = printString$1(JSON.stringify(key.name), options);
+ return path.call(keyPath => comments.printComments(keyPath, () => prop, options), "key");
+ }
+
+ if (isStringPropSafeToCoerceToIdentifier$1(node, options) && (options.quoteProps === "as-needed" || options.quoteProps === "consistent" && !needsQuoteProps.get(parent))) {
+ // 'a' -> a
+ return path.call(keyPath => comments.printComments(keyPath, () => key.value, options), "key");
+ }
+
+ return path.call(print, "key");
+}
+
+function printMethod(path, options, print) {
+ const node = path.getNode();
+ const {
+ kind
+ } = node;
+ const value = node.value || node;
+ const parts = [];
+
+ if (!kind || kind === "init" || kind === "method" || kind === "constructor") {
+ if (value.async) {
+ parts.push("async ");
+ }
+
+ if (value.generator) {
+ parts.push("*");
+ }
+ } else {
+ assert$1.ok(kind === "get" || kind === "set");
+ parts.push(kind, " ");
+ }
+
+ parts.push(printPropertyKey(path, options, print), node.optional || node.key.optional ? "?" : "", node === value ? printMethodInternal(path, options, print) : path.call(path => printMethodInternal(path, options, print), "value"));
+ return concat$6(parts);
+}
+
+function printMethodInternal(path, options, print) {
+ const parts = [printFunctionTypeParameters(path, options, print), group$2(concat$6([printFunctionParams(path, print, options), printReturnType(path, print, options)]))];
+
+ if (path.getNode().body) {
+ parts.push(" ", path.call(print, "body"));
+ } else {
+ parts.push(options.semi ? ";" : "");
+ }
+
+ return concat$6(parts);
+}
+
+function couldGroupArg(arg) {
+ return arg.type === "ObjectExpression" && (arg.properties.length > 0 || arg.comments) || arg.type === "ArrayExpression" && (arg.elements.length > 0 || arg.comments) || arg.type === "TSTypeAssertion" && couldGroupArg(arg.expression) || arg.type === "TSAsExpression" && couldGroupArg(arg.expression) || arg.type === "FunctionExpression" || arg.type === "ArrowFunctionExpression" && ( // we want to avoid breaking inside composite return types but not simple keywords
+ // https://github.com/prettier/prettier/issues/4070
+ // export class Thing implements OtherThing {
+ // do: (type: Type) => Provider
= memoize(
+ // (type: ObjectType): Provider => {}
+ // );
+ // }
+ // https://github.com/prettier/prettier/issues/6099
+ // app.get("/", (req, res): void => {
+ // res.send("Hello World!");
+ // });
+ !arg.returnType || !arg.returnType.typeAnnotation || arg.returnType.typeAnnotation.type !== "TSTypeReference") && (arg.body.type === "BlockStatement" || arg.body.type === "ArrowFunctionExpression" || arg.body.type === "ObjectExpression" || arg.body.type === "ArrayExpression" || arg.body.type === "CallExpression" || arg.body.type === "OptionalCallExpression" || arg.body.type === "ConditionalExpression" || isJSXNode$1(arg.body));
+}
+
+function shouldGroupLastArg(args) {
+ const lastArg = getLast$2(args);
+ const penultimateArg = getPenultimate$1(args);
+ return !hasLeadingComment$3(lastArg) && !hasTrailingComment$1(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type,
+ // disable last element expansion.
+ !penultimateArg || penultimateArg.type !== lastArg.type);
+}
+
+function shouldGroupFirstArg(args) {
+ if (args.length !== 2) {
+ return false;
+ }
+
+ const [firstArg, secondArg] = args;
+ return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && secondArg.type !== "FunctionExpression" && secondArg.type !== "ArrowFunctionExpression" && secondArg.type !== "ConditionalExpression" && !couldGroupArg(secondArg);
+}
+
+function printJestEachTemplateLiteral(node, expressions, options) {
+ /**
+ * a | b | expected
+ * ${1} | ${1} | ${2}
+ * ${1} | ${2} | ${3}
+ * ${2} | ${1} | ${3}
+ */
+ const headerNames = node.quasis[0].value.raw.trim().split(/\s*\|\s*/);
+
+ if (headerNames.length > 1 || headerNames.some(headerName => headerName.length !== 0)) {
+ const parts = [];
+ const stringifiedExpressions = expressions.map(doc => "${" + printDocToString$2(doc, Object.assign({}, options, {
+ printWidth: Infinity,
+ endOfLine: "lf"
+ })).formatted + "}");
+ const tableBody = [{
+ hasLineBreak: false,
+ cells: []
+ }];
+
+ for (let i = 1; i < node.quasis.length; i++) {
+ const row = tableBody[tableBody.length - 1];
+ const correspondingExpression = stringifiedExpressions[i - 1];
+ row.cells.push(correspondingExpression);
+
+ if (correspondingExpression.includes("\n")) {
+ row.hasLineBreak = true;
+ }
+
+ if (node.quasis[i].value.raw.includes("\n")) {
+ tableBody.push({
+ hasLineBreak: false,
+ cells: []
+ });
+ }
+ }
+
+ const maxColumnCount = Math.max(headerNames.length, ...tableBody.map(row => row.cells.length));
+ const maxColumnWidths = Array.from({
+ length: maxColumnCount
+ }).fill(0);
+ const table = [{
+ cells: headerNames
+ }, ...tableBody.filter(row => row.cells.length !== 0)];
+
+ for (const {
+ cells
+ } of table.filter(row => !row.hasLineBreak)) {
+ cells.forEach((cell, index) => {
+ maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$3(cell));
+ });
+ }
+
+ parts.push(lineSuffixBoundary$1, "`", indent$3(concat$6([hardline$4, join$4(hardline$4, table.map(row => join$4(" | ", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth$3(cell))))))])), hardline$4, "`");
+ return concat$6(parts);
+ }
+}
+
+function printArgumentsList(path, options, print) {
+ const node = path.getValue();
+ const args = node.arguments;
+
+ if (args.length === 0) {
+ return concat$6(["(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true), ")"]);
+ } // useEffect(() => { ... }, [foo, bar, baz])
+
+
+ if (args.length === 2 && args[0].type === "ArrowFunctionExpression" && args[0].params.length === 0 && args[0].body.type === "BlockStatement" && args[1].type === "ArrayExpression" && !args.find(arg => arg.comments)) {
+ return concat$6(["(", path.call(print, "arguments", 0), ", ", path.call(print, "arguments", 1), ")"]);
+ } // func(
+ // ({
+ // a,
+ // b
+ // }) => {}
+ // );
+
+
+ function shouldBreakForArrowFunctionInArguments(arg, argPath) {
+ if (!arg || arg.type !== "ArrowFunctionExpression" || !arg.body || arg.body.type !== "BlockStatement" || !arg.params || arg.params.length < 1) {
+ return false;
+ }
+
+ let shouldBreak = false;
+ argPath.each(paramPath => {
+ const printed = concat$6([print(paramPath)]);
+ shouldBreak = shouldBreak || willBreak$1(printed);
+ }, "params");
+ return shouldBreak;
+ }
+
+ let anyArgEmptyLine = false;
+ let shouldBreakForArrowFunction = false;
+ let hasEmptyLineFollowingFirstArg = false;
+ const lastArgIndex = args.length - 1;
+ const printedArguments = path.map((argPath, index) => {
+ const arg = argPath.getNode();
+ const parts = [print(argPath)];
+
+ if (index === lastArgIndex) ; else if (isNextLineEmpty$2(options.originalText, arg, options.locEnd)) {
+ if (index === 0) {
+ hasEmptyLineFollowingFirstArg = true;
+ }
+
+ anyArgEmptyLine = true;
+ parts.push(",", hardline$4, hardline$4);
+ } else {
+ parts.push(",", line$4);
+ }
+
+ shouldBreakForArrowFunction = shouldBreakForArrowFunctionInArguments(arg, argPath);
+ return concat$6(parts);
+ }, "arguments");
+ const maybeTrailingComma = // Dynamic imports cannot have trailing commas
+ !(node.callee && node.callee.type === "Import") && shouldPrintComma(options, "all") ? "," : "";
+
+ function allArgsBrokenOut() {
+ return group$2(concat$6(["(", indent$3(concat$6([line$4, concat$6(printedArguments)])), maybeTrailingComma, line$4, ")"]), {
+ shouldBreak: true
+ });
+ }
+
+ if (path.getParentNode().type !== "Decorator" && isFunctionCompositionArgs$1(args)) {
+ return allArgsBrokenOut();
+ }
+
+ const shouldGroupFirst = shouldGroupFirstArg(args);
+ const shouldGroupLast = shouldGroupLastArg(args);
+
+ if (shouldGroupFirst || shouldGroupLast) {
+ const shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine || shouldBreakForArrowFunction; // We want to print the last argument with a special flag
+
+ let printedExpanded;
+ let i = 0;
+ path.each(argPath => {
+ if (shouldGroupFirst && i === 0) {
+ printedExpanded = [concat$6([argPath.call(p => print(p, {
+ expandFirstArg: true
+ })), printedArguments.length > 1 ? "," : "", hasEmptyLineFollowingFirstArg ? hardline$4 : line$4, hasEmptyLineFollowingFirstArg ? hardline$4 : ""])].concat(printedArguments.slice(1));
+ }
+
+ if (shouldGroupLast && i === args.length - 1) {
+ printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(p => print(p, {
+ expandLastArg: true
+ })));
+ }
+
+ i++;
+ }, "arguments");
+ const somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1);
+ const simpleConcat = concat$6(["(", concat$6(printedExpanded), ")"]);
+ return concat$6([somePrintedArgumentsWillBreak ? breakParent$2 : "", conditionalGroup$1([!somePrintedArgumentsWillBreak && !node.typeArguments && !node.typeParameters ? simpleConcat : ifBreak$1(allArgsBrokenOut(), simpleConcat), shouldGroupFirst ? concat$6(["(", group$2(printedExpanded[0], {
+ shouldBreak: true
+ }), concat$6(printedExpanded.slice(1)), ")"]) : concat$6(["(", concat$6(printedArguments.slice(0, -1)), group$2(getLast$2(printedExpanded), {
+ shouldBreak: true
+ }), ")"]), allArgsBrokenOut()], {
+ shouldBreak
+ })]);
+ }
+
+ const contents = concat$6(["(", indent$3(concat$6([softline$2, concat$6(printedArguments)])), ifBreak$1(maybeTrailingComma), softline$2, ")"]);
+
+ if (isLongCurriedCallExpression$1(path)) {
+ // By not wrapping the arguments in a group, the printer prioritizes
+ // breaking up these arguments rather than the args of the parent call.
+ return contents;
+ }
+
+ return group$2(contents, {
+ shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine
+ });
+}
+
+function printTypeAnnotation(path, options, print) {
+ const node = path.getValue();
+
+ if (!node.typeAnnotation) {
+ return "";
+ }
+
+ const parentNode = path.getParentNode();
+ const isDefinite = node.definite || parentNode && parentNode.type === "VariableDeclarator" && parentNode.definite;
+ const isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === node;
+
+ if (isFlowAnnotationComment$1(options.originalText, node.typeAnnotation, options)) {
+ return concat$6([" /*: ", path.call(print, "typeAnnotation"), " */"]);
+ }
+
+ return concat$6([isFunctionDeclarationIdentifier ? "" : isDefinite ? "!: " : ": ", path.call(print, "typeAnnotation")]);
+}
+
+function printFunctionTypeParameters(path, options, print) {
+ const fun = path.getValue();
+
+ if (fun.typeArguments) {
+ return path.call(print, "typeArguments");
+ }
+
+ if (fun.typeParameters) {
+ return path.call(print, "typeParameters");
+ }
+
+ return "";
+}
+
+function printFunctionParams(path, print, options, expandArg, printTypeParams) {
+ const fun = path.getValue();
+ const parent = path.getParentNode();
+ const paramsField = fun.parameters ? "parameters" : "params";
+ const isParametersInTestCall = isTestCall$1(parent);
+ const shouldHugParameters = shouldHugArguments(fun);
+ const shouldExpandParameters = expandArg && !(fun[paramsField] && fun[paramsField].some(n => n.comments));
+ const typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : "";
+ let printed = [];
+
+ if (fun[paramsField]) {
+ const lastArgIndex = fun[paramsField].length - 1;
+ printed = path.map((childPath, index) => {
+ const parts = [];
+ const param = childPath.getValue();
+ parts.push(print(childPath));
+
+ if (index === lastArgIndex) {
+ if (fun.rest) {
+ parts.push(",", line$4);
+ }
+ } else if (isParametersInTestCall || shouldHugParameters || shouldExpandParameters) {
+ parts.push(", ");
+ } else if (isNextLineEmpty$2(options.originalText, param, options.locEnd)) {
+ parts.push(",", hardline$4, hardline$4);
+ } else {
+ parts.push(",", line$4);
+ }
+
+ return concat$6(parts);
+ }, paramsField);
+ }
+
+ if (fun.rest) {
+ printed.push(concat$6(["...", path.call(print, "rest")]));
+ }
+
+ if (printed.length === 0) {
+ return concat$6([typeParams, "(", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true, comment => getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === ")"), ")"]);
+ }
+
+ const lastParam = getLast$2(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the
+ // params of the first/last argument, we don't want the arguments to break and instead
+ // want the whole expression to be on a new line.
+ //
+ // Good: Bad:
+ // verylongcall( verylongcall((
+ // (a, b) => { a,
+ // } b,
+ // }) ) => {
+ // })
+
+ if (shouldExpandParameters) {
+ return group$2(concat$6([removeLines$1(typeParams), "(", concat$6(printed.map(removeLines$1)), ")"]));
+ } // Single object destructuring should hug
+ //
+ // function({
+ // a,
+ // b,
+ // c
+ // }) {}
+
+
+ const hasNotParameterDecorator = fun[paramsField].every(param => !param.decorators);
+
+ if (shouldHugParameters && hasNotParameterDecorator) {
+ return concat$6([typeParams, "(", concat$6(printed), ")"]);
+ } // don't break in specs, eg; `it("should maintain parens around done even when long", (done) => {})`
+
+
+ if (isParametersInTestCall) {
+ return concat$6([typeParams, "(", concat$6(printed), ")"]);
+ }
+
+ const isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction$1(parent, options) || isTypeAnnotationAFunction$1(parent, options) || parent.type === "TypeAlias" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || parent.type === "IntersectionTypeAnnotation" || parent.type === "FunctionTypeAnnotation" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType$1(fun[paramsField][0].typeAnnotation) && !fun.rest;
+
+ if (isFlowShorthandWithOneArg) {
+ if (options.arrowParens === "always") {
+ return concat$6(["(", concat$6(printed), ")"]);
+ }
+
+ return concat$6(printed);
+ }
+
+ const canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest;
+ return concat$6([typeParams, "(", indent$3(concat$6([softline$2, concat$6(printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$2, ")"]);
+}
+
+function shouldPrintParamsWithoutParens(path, options) {
+ if (options.arrowParens === "always") {
+ return false;
+ }
+
+ if (options.arrowParens === "avoid") {
+ const node = path.getValue();
+ return canPrintParamsWithoutParens(node);
+ } // Fallback default; should be unreachable
+
+
+ return false;
+}
+
+function canPrintParamsWithoutParens(node) {
+ return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments$1(node) && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType;
+}
+
+function printFunctionDeclaration(path, print, options) {
+ const n = path.getValue();
+ const parts = [];
+
+ if (n.async) {
+ parts.push("async ");
+ }
+
+ if (n.generator) {
+ parts.push("function* ");
+ } else {
+ parts.push("function ");
+ }
+
+ if (n.id) {
+ parts.push(path.call(print, "id"));
+ }
+
+ parts.push(printFunctionTypeParameters(path, options, print), group$2(concat$6([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? " " : "", path.call(print, "body"));
+ return concat$6(parts);
+}
+
+function printReturnType(path, print, options) {
+ const n = path.getValue();
+ const returnType = path.call(print, "returnType");
+
+ if (n.returnType && isFlowAnnotationComment$1(options.originalText, n.returnType, options)) {
+ return concat$6([" /*: ", returnType, " */"]);
+ }
+
+ const parts = [returnType]; // prepend colon to TypeScript type annotation
+
+ if (n.returnType && n.returnType.typeAnnotation) {
+ parts.unshift(": ");
+ }
+
+ if (n.predicate) {
+ // The return type will already add the colon, but otherwise we
+ // need to do it ourselves
+ parts.push(n.returnType ? " " : ": ", path.call(print, "predicate"));
+ }
+
+ return concat$6(parts);
+}
+
+function printExportDeclaration(path, options, print) {
+ const decl = path.getValue();
+ const semi = options.semi ? ";" : "";
+ const parts = ["export "];
+ const isDefault = decl.default || decl.type === "ExportDefaultDeclaration";
+
+ if (isDefault) {
+ parts.push("default ");
+ }
+
+ parts.push(comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
+
+ if (needsHardlineAfterDanglingComment$1(decl)) {
+ parts.push(hardline$4);
+ }
+
+ if (decl.declaration) {
+ parts.push(path.call(print, "declaration"));
+
+ if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
+ parts.push(semi);
+ }
+ } else {
+ if (decl.specifiers && decl.specifiers.length > 0) {
+ const specifiers = [];
+ const defaultSpecifiers = [];
+ const namespaceSpecifiers = [];
+ path.each(specifierPath => {
+ const specifierType = path.getValue().type;
+
+ if (specifierType === "ExportSpecifier") {
+ specifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportDefaultSpecifier") {
+ defaultSpecifiers.push(print(specifierPath));
+ } else if (specifierType === "ExportNamespaceSpecifier") {
+ namespaceSpecifiers.push(concat$6(["* as ", print(specifierPath)]));
+ }
+ }, "specifiers");
+ const isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0;
+ const isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0);
+ const canBreak = specifiers.length > 1 || defaultSpecifiers.length > 0 || decl.specifiers && decl.specifiers.some(node => node.comments);
+ let printed = "";
+
+ if (specifiers.length !== 0) {
+ if (canBreak) {
+ printed = group$2(concat$6(["{", indent$3(concat$6([options.bracketSpacing ? line$4 : softline$2, join$4(concat$6([",", line$4]), specifiers)])), ifBreak$1(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line$4 : softline$2, "}"]));
+ } else {
+ printed = concat$6(["{", options.bracketSpacing ? " " : "", concat$6(specifiers), options.bracketSpacing ? " " : "", "}"]);
+ }
+ }
+
+ parts.push(decl.exportKind === "type" ? "type " : "", concat$6(defaultSpecifiers), concat$6([isDefaultFollowed ? ", " : ""]), concat$6(namespaceSpecifiers), concat$6([isNamespaceFollowed ? ", " : ""]), printed);
+ } else {
+ parts.push("{}");
+ }
+
+ if (decl.source) {
+ parts.push(" from ", path.call(print, "source"));
+ }
+
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+}
+
+function printFlowDeclaration(path, parts) {
+ const parentExportDecl = getParentExportDeclaration$1(path);
+
+ if (parentExportDecl) {
+ assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
+ } else {
+ // If the parent node has type DeclareExportDeclaration, then it
+ // will be responsible for printing the "declare" token. Otherwise
+ // it needs to be printed with this non-exported declaration node.
+ parts.unshift("declare ");
+ }
+
+ return concat$6(parts);
+}
+
+function printTypeScriptModifiers(path, options, print) {
+ const n = path.getValue();
+
+ if (!n.modifiers || !n.modifiers.length) {
+ return "";
+ }
+
+ return concat$6([join$4(" ", path.map(print, "modifiers")), " "]);
+}
+
+function printTypeParameters(path, options, print, paramsKey) {
+ const n = path.getValue();
+
+ if (!n[paramsKey]) {
+ return "";
+ } // for TypeParameterDeclaration typeParameters is a single node
+
+
+ if (!Array.isArray(n[paramsKey])) {
+ return path.call(print, paramsKey);
+ }
+
+ const grandparent = path.getNode(2);
+ const greatGrandParent = path.getNode(3);
+ const greatGreatGrandParent = path.getNode(4);
+ const isParameterInTestCall = grandparent != null && isTestCall$1(grandparent);
+ const shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "TSTypeReference" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === "NullableTypeAnnotation" || // See https://github.com/prettier/prettier/pull/6467 for the context.
+ greatGreatGrandParent && greatGreatGrandParent.type === "VariableDeclarator" && grandparent.type === "TSTypeAnnotation" && greatGrandParent.type !== "ArrowFunctionExpression" && n[paramsKey][0].type !== "TSUnionType" && n[paramsKey][0].type !== "UnionTypeAnnotation" && n[paramsKey][0].type !== "TSIntersectionType" && n[paramsKey][0].type !== "IntersectionTypeAnnotation" && n[paramsKey][0].type !== "TSConditionalType" && n[paramsKey][0].type !== "TSMappedType" && n[paramsKey][0].type !== "TSTypeOperator" && n[paramsKey][0].type !== "TSIndexedAccessType" && n[paramsKey][0].type !== "TSArrayType");
+
+ function printDanglingCommentsForInline(n) {
+ if (!hasDanglingComments$1(n)) {
+ return "";
+ }
+
+ const hasOnlyBlockComments = n.comments.every(comments$1.isBlockComment);
+ const printed = comments.printDanglingComments(path, options,
+ /* sameIndent */
+ hasOnlyBlockComments);
+
+ if (hasOnlyBlockComments) {
+ return printed;
+ }
+
+ return concat$6([printed, hardline$4]);
+ }
+
+ if (shouldInline) {
+ return concat$6(["<", join$4(", ", path.map(print, paramsKey)), printDanglingCommentsForInline(n), ">"]);
+ }
+
+ return group$2(concat$6(["<", indent$3(concat$6([softline$2, join$4(concat$6([",", line$4]), path.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && options.parser !== "babel-ts" && shouldPrintComma(options, "all") ? "," : ""), softline$2, ">"]));
+}
+
+function printClass(path, options, print) {
+ const n = path.getValue();
+ const parts = [];
+
+ if (n.abstract) {
+ parts.push("abstract ");
+ }
+
+ parts.push("class");
+
+ if (n.id) {
+ parts.push(" ", path.call(print, "id"));
+ }
+
+ parts.push(path.call(print, "typeParameters"));
+ const partsGroup = [];
+
+ if (n.superClass) {
+ const printed = concat$6(["extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")]); // Keep old behaviour of extends in same line
+ // If there is only on extends and there are not comments
+
+ if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) {
+ parts.push(concat$6([" ", path.call(superClass => comments.printComments(superClass, () => printed, options), "superClass")]));
+ } else {
+ partsGroup.push(group$2(concat$6([line$4, path.call(superClass => comments.printComments(superClass, () => printed, options), "superClass")])));
+ }
+ } else if (n.extends && n.extends.length > 0) {
+ parts.push(" extends ", join$4(", ", path.map(print, "extends")));
+ }
+
+ if (n.mixins && n.mixins.length > 0) {
+ partsGroup.push(line$4, "mixins ", group$2(indent$3(join$4(concat$6([",", line$4]), path.map(print, "mixins")))));
+ }
+
+ if (n.implements && n.implements.length > 0) {
+ partsGroup.push(line$4, "implements", group$2(indent$3(concat$6([line$4, join$4(concat$6([",", line$4]), path.map(print, "implements"))]))));
+ }
+
+ if (partsGroup.length > 0) {
+ parts.push(group$2(indent$3(concat$6(partsGroup))));
+ }
+
+ if (n.body && n.body.comments && hasLeadingOwnLineComment$1(options.originalText, n.body, options)) {
+ parts.push(hardline$4);
+ } else {
+ parts.push(" ");
+ }
+
+ parts.push(path.call(print, "body"));
+ return parts;
+}
+
+function printOptionalToken(path) {
+ const node = path.getValue();
+
+ if (!node.optional || // It's an optional computed method parsed by typescript-estree.
+ // "?" is printed in `printMethod`.
+ node.type === "Identifier" && node === path.getParentNode().key) {
+ return "";
+ }
+
+ if (node.type === "OptionalCallExpression" || node.type === "OptionalMemberExpression" && node.computed) {
+ return "?.";
+ }
+
+ return "?";
+}
+
+function printMemberLookup(path, options, print) {
+ const property = path.call(print, "property");
+ const n = path.getValue();
+ const optional = printOptionalToken(path);
+
+ if (!n.computed) {
+ return concat$6([optional, ".", property]);
+ }
+
+ if (!n.property || isNumericLiteral$1(n.property)) {
+ return concat$6([optional, "[", property, "]"]);
+ }
+
+ return group$2(concat$6([optional, "[", indent$3(concat$6([softline$2, property])), softline$2, "]"]));
+}
+
+function printBindExpressionCallee(path, options, print) {
+ return concat$6(["::", path.call(print, "callee")]);
+} // We detect calls on member expressions specially to format a
+// common pattern better. The pattern we are looking for is this:
+//
+// arr
+// .map(x => x + 1)
+// .filter(x => x > 10)
+// .some(x => x % 2)
+//
+// The way it is structured in the AST is via a nested sequence of
+// MemberExpression and CallExpression. We need to traverse the AST
+// and make groups out of it to print it in the desired way.
+
+
+function printMemberChain(path, options, print) {
+ // The first phase is to linearize the AST by traversing it down.
+ //
+ // a().b()
+ // has the following AST structure:
+ // CallExpression(MemberExpression(CallExpression(Identifier)))
+ // and we transform it into
+ // [Identifier, CallExpression, MemberExpression, CallExpression]
+ const printedNodes = []; // Here we try to retain one typed empty line after each call expression or
+ // the first group whether it is in parentheses or not
+
+ function shouldInsertEmptyLineAfter(node) {
+ const {
+ originalText
+ } = options;
+ const nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$3(originalText, node, options.locEnd);
+ const nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty
+ // line after that parenthesis
+
+ if (nextChar === ")") {
+ return isNextLineEmptyAfterIndex$2(originalText, nextCharIndex + 1, options.locEnd);
+ }
+
+ return isNextLineEmpty$2(originalText, node, options.locEnd);
+ }
+
+ function rec(path) {
+ const node = path.getValue();
+
+ if ((node.type === "CallExpression" || node.type === "OptionalCallExpression") && (isMemberish$1(node.callee) || node.callee.type === "CallExpression" || node.callee.type === "OptionalCallExpression")) {
+ printedNodes.unshift({
+ node,
+ printed: concat$6([comments.printComments(path, () => concat$6([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]), options), shouldInsertEmptyLineAfter(node) ? hardline$4 : ""])
+ });
+ path.call(callee => rec(callee), "callee");
+ } else if (isMemberish$1(node)) {
+ printedNodes.unshift({
+ node,
+ needsParens: needsParens_1(path, options),
+ printed: comments.printComments(path, () => node.type === "OptionalMemberExpression" || node.type === "MemberExpression" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print), options)
+ });
+ path.call(object => rec(object), "object");
+ } else if (node.type === "TSNonNullExpression") {
+ printedNodes.unshift({
+ node,
+ printed: comments.printComments(path, () => "!", options)
+ });
+ path.call(expression => rec(expression), "expression");
+ } else {
+ printedNodes.unshift({
+ node,
+ printed: path.call(print)
+ });
+ }
+ } // Note: the comments of the root node have already been printed, so we
+ // need to extract this first call without printing them as they would
+ // if handled inside of the recursive call.
+
+
+ const node = path.getValue();
+ printedNodes.unshift({
+ node,
+ printed: concat$6([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)])
+ });
+ path.call(callee => rec(callee), "callee"); // Once we have a linear list of printed nodes, we want to create groups out
+ // of it.
+ //
+ // a().b.c().d().e
+ // will be grouped as
+ // [
+ // [Identifier, CallExpression],
+ // [MemberExpression, MemberExpression, CallExpression],
+ // [MemberExpression, CallExpression],
+ // [MemberExpression],
+ // ]
+ // so that we can print it as
+ // a()
+ // .b.c()
+ // .d()
+ // .e
+ // The first group is the first node followed by
+ // - as many CallExpression as possible
+ // < fn()()() >.something()
+ // - as many array accessors as possible
+ // < fn()[0][1][2] >.something()
+ // - then, as many MemberExpression as possible but the last one
+ // < this.items >.something()
+
+ const groups = [];
+ let currentGroup = [printedNodes[0]];
+ let i = 1;
+
+ for (; i < printedNodes.length; ++i) {
+ if (printedNodes[i].node.type === "TSNonNullExpression" || printedNodes[i].node.type === "OptionalCallExpression" || printedNodes[i].node.type === "CallExpression" || (printedNodes[i].node.type === "MemberExpression" || printedNodes[i].node.type === "OptionalMemberExpression") && printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
+ currentGroup.push(printedNodes[i]);
+ } else {
+ break;
+ }
+ }
+
+ if (printedNodes[0].node.type !== "CallExpression" && printedNodes[0].node.type !== "OptionalCallExpression") {
+ for (; i + 1 < printedNodes.length; ++i) {
+ if (isMemberish$1(printedNodes[i].node) && isMemberish$1(printedNodes[i + 1].node)) {
+ currentGroup.push(printedNodes[i]);
+ } else {
+ break;
+ }
+ }
+ }
+
+ groups.push(currentGroup);
+ currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by
+ // a sequence of CallExpression. To compute it, we keep adding things to the
+ // group until we has seen a CallExpression in the past and reach a
+ // MemberExpression
+
+ let hasSeenCallExpression = false;
+
+ for (; i < printedNodes.length; ++i) {
+ if (hasSeenCallExpression && isMemberish$1(printedNodes[i].node)) {
+ // [0] should be appended at the end of the group instead of the
+ // beginning of the next one
+ if (printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {
+ currentGroup.push(printedNodes[i]);
+ continue;
+ }
+
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
+ }
+
+ if (printedNodes[i].node.type === "CallExpression" || printedNodes[i].node.type === "OptionalCallExpression") {
+ hasSeenCallExpression = true;
+ }
+
+ currentGroup.push(printedNodes[i]);
+
+ if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(comment => comment.trailing)) {
+ groups.push(currentGroup);
+ currentGroup = [];
+ hasSeenCallExpression = false;
+ }
+ }
+
+ if (currentGroup.length > 0) {
+ groups.push(currentGroup);
+ } // There are cases like Object.keys(), Observable.of(), _.values() where
+ // they are the subject of all the chained calls and therefore should
+ // be kept on the same line:
+ //
+ // Object.keys(items)
+ // .filter(x => x)
+ // .map(x => x)
+ //
+ // In order to detect those cases, we use an heuristic: if the first
+ // node is an identifier with the name starting with a capital
+ // letter or just a sequence of _$. The rationale is that they are
+ // likely to be factories.
+
+
+ function isFactory(name) {
+ return /^[A-Z]|^[_$]+$/.test(name);
+ } // In case the Identifier is shorter than tab width, we can keep the
+ // first call in a single line, if it's an ExpressionStatement.
+ //
+ // d3.scaleLinear()
+ // .domain([0, 100])
+ // .range([0, width]);
+ //
+
+
+ function isShort(name) {
+ return name.length <= options.tabWidth;
+ }
+
+ function shouldNotWrap(groups) {
+ const parent = path.getParentNode();
+ const isExpression = parent && parent.type === "ExpressionStatement";
+ const hasComputed = groups[1].length && groups[1][0].node.computed;
+
+ if (groups[0].length === 1) {
+ const firstNode = groups[0][0].node;
+ return firstNode.type === "ThisExpression" || firstNode.type === "Identifier" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed);
+ }
+
+ const lastNode = getLast$2(groups[0]).node;
+ return (lastNode.type === "MemberExpression" || lastNode.type === "OptionalMemberExpression") && lastNode.property.type === "Identifier" && (isFactory(lastNode.property.name) || hasComputed);
+ }
+
+ const shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups);
+
+ function printGroup(printedGroup) {
+ const printed = printedGroup.map(tuple => tuple.printed); // Checks if the last node (i.e. the parent node) needs parens and print
+ // accordingly
+
+ if (printedGroup.length > 0 && printedGroup[printedGroup.length - 1].needsParens) {
+ return concat$6(["(", ...printed, ")"]);
+ }
+
+ return concat$6(printed);
+ }
+
+ function printIndentedGroup(groups) {
+ if (groups.length === 0) {
+ return "";
+ }
+
+ return indent$3(group$2(concat$6([hardline$4, join$4(hardline$4, groups.map(printGroup))])));
+ }
+
+ const printedGroups = groups.map(printGroup);
+ const oneLine = concat$6(printedGroups);
+ const cutoff = shouldMerge ? 3 : 2;
+ const flatGroups = groups.reduce((res, group) => res.concat(group), []);
+ const hasComment = flatGroups.slice(1, -1).some(node => hasLeadingComment$3(node.node)) || flatGroups.slice(0, -1).some(node => hasTrailingComment$1(node.node)) || groups[cutoff] && hasLeadingComment$3(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just
+ // render everything concatenated together.
+
+ if (groups.length <= cutoff && !hasComment) {
+ if (isLongCurriedCallExpression$1(path)) {
+ return oneLine;
+ }
+
+ return group$2(oneLine);
+ } // Find out the last node in the first group and check if it has an
+ // empty line after
+
+
+ const lastNodeBeforeIndent = getLast$2(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node;
+ const shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== "CallExpression" && lastNodeBeforeIndent.type !== "OptionalCallExpression" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent);
+ const expanded = concat$6([printGroup(groups[0]), shouldMerge ? concat$6(groups.slice(1, 2).map(printGroup)) : "", shouldHaveEmptyLineBeforeIndent ? hardline$4 : "", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]);
+ const callExpressions = printedNodes.map(({
+ node
+ }) => node).filter(isCallOrOptionalCallExpression$1); // We don't want to print in one line if the chain has:
+ // * A comment.
+ // * Non-trivial arguments.
+ // * Any group but the last one has a hard line.
+ // If the last group is a function it's okay to inline if it fits.
+
+ if (hasComment || callExpressions.length > 2 && callExpressions.some(expr => !expr.arguments.every(arg => isSimpleCallArgument$1(arg, 0))) || printedGroups.slice(0, -1).some(willBreak$1) ||
+ /**
+ * scopes.filter(scope => scope.value !== '').map((scope, i) => {
+ * // multi line content
+ * })
+ */
+ ((lastGroupDoc, lastGroupNode) => isCallOrOptionalCallExpression$1(lastGroupNode) && willBreak$1(lastGroupDoc))(getLast$2(printedGroups), getLast$2(getLast$2(groups)).node) && callExpressions.slice(0, -1).some(n => n.arguments.some(isFunctionOrArrowExpression$1))) {
+ return group$2(expanded);
+ }
+
+ return concat$6([// We only need to check `oneLine` because if `expanded` is chosen
+ // that means that the parent group has already been broken
+ // naturally
+ willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$2 : "", conditionalGroup$1([oneLine, expanded])]);
+}
+
+function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return "";
+ }
+
+ if (childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement) {
+ return child.length === 1 ? softline$2 : hardline$4;
+ }
+
+ return softline$2;
+}
+
+function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {
+ if (isFacebookTranslationTag) {
+ return hardline$4;
+ }
+
+ if (child.length === 1) {
+ return childNode.type === "JSXElement" && !childNode.closingElement || nextNode && nextNode.type === "JSXElement" && !nextNode.closingElement ? hardline$4 : softline$2;
+ }
+
+ return hardline$4;
+} // JSX Children are strange, mostly for two reasons:
+// 1. JSX reads newlines into string values, instead of skipping them like JS
+// 2. up to one whitespace between elements within a line is significant,
+// but not between lines.
+//
+// Leading, trailing, and lone whitespace all need to
+// turn themselves into the rather ugly `{' '}` when breaking.
+//
+// We print JSX using the `fill` doc primitive.
+// This requires that we give it an array of alternating
+// content and whitespace elements.
+// To ensure this we add dummy `""` content elements as needed.
+
+
+function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) {
+ const n = path.getValue();
+ const children = []; // using `map` instead of `each` because it provides `i`
+
+ path.map((childPath, i) => {
+ const child = childPath.getValue();
+
+ if (isLiteral$1(child)) {
+ const text = rawText$1(child); // Contains a non-whitespace character
+
+ if (isMeaningfulJSXText$1(child)) {
+ const words = text.split(matchJsxWhitespaceRegex$1); // Starts with whitespace
+
+ if (words[0] === "") {
+ children.push("");
+ words.shift();
+
+ if (/\n/.test(words[0])) {
+ const next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next));
+ } else {
+ children.push(jsxWhitespace);
+ }
+
+ words.shift();
+ }
+
+ let endWhitespace; // Ends with whitespace
+
+ if (getLast$2(words) === "") {
+ words.pop();
+ endWhitespace = words.pop();
+ } // This was whitespace only without a new line.
+
+
+ if (words.length === 0) {
+ return;
+ }
+
+ words.forEach((word, i) => {
+ if (i % 2 === 1) {
+ children.push(line$4);
+ } else {
+ children.push(word);
+ }
+ });
+
+ if (endWhitespace !== undefined) {
+ if (/\n/.test(endWhitespace)) {
+ const next = n.children[i + 1];
+ children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$2(children), child, next));
+ } else {
+ children.push(jsxWhitespace);
+ }
+ } else {
+ const next = n.children[i + 1];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$2(children), child, next));
+ }
+ } else if (/\n/.test(text)) {
+ // Keep (up to one) blank line between tags/expressions/text.
+ // Note: We don't keep blank lines between text elements.
+ if (text.match(/\n/g).length > 1) {
+ children.push("");
+ children.push(hardline$4);
+ }
+ } else {
+ children.push("");
+ children.push(jsxWhitespace);
+ }
+ } else {
+ const printedChild = print(childPath);
+ children.push(printedChild);
+ const next = n.children[i + 1];
+ const directlyFollowedByMeaningfulText = next && isMeaningfulJSXText$1(next);
+
+ if (directlyFollowedByMeaningfulText) {
+ const firstWord = rawText$1(next).trim().split(matchJsxWhitespaceRegex$1)[0];
+ children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, next));
+ } else {
+ children.push(hardline$4);
+ }
+ }
+ }, "children");
+ return children;
+} // JSX expands children from the inside-out, instead of the outside-in.
+// This is both to break children before attributes,
+// and to ensure that when children break, their parents do as well.
+//
+// Any element that is written without any newlines and fits on a single line
+// is left that way.
+// Not only that, any user-written-line containing multiple JSX siblings
+// should also be kept on one line if possible,
+// so each user-written-line is wrapped in its own group.
+//
+// Elements that contain newlines or don't fit on a single line (recursively)
+// are fully-split, using hardline and shouldBreak: true.
+//
+// To support that case properly, all leading and trailing spaces
+// are stripped from the list of children, and replaced with a single hardline.
+
+
+function printJSXElement(path, options, print) {
+ const n = path.getValue();
+
+ if (n.type === "JSXElement" && isEmptyJSXElement$1(n)) {
+ return concat$6([path.call(print, "openingElement"), path.call(print, "closingElement")]);
+ }
+
+ const openingLines = n.type === "JSXElement" ? path.call(print, "openingElement") : path.call(print, "openingFragment");
+ const closingLines = n.type === "JSXElement" ? path.call(print, "closingElement") : path.call(print, "closingFragment");
+
+ if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) {
+ return concat$6([openingLines, concat$6(path.map(print, "children")), closingLines]);
+ } // Convert `{" "}` to text nodes containing a space.
+ // This makes it easy to turn them into `jsxWhitespace` which
+ // can then print as either a space or `{" "}` when breaking.
+
+
+ n.children = n.children.map(child => {
+ if (isJSXWhitespaceExpression$1(child)) {
+ return {
+ type: "JSXText",
+ value: " ",
+ raw: " "
+ };
+ }
+
+ return child;
+ });
+ const containsTag = n.children.filter(isJSXNode$1).length > 0;
+ const containsMultipleExpressions = n.children.filter(child => child.type === "JSXExpressionContainer").length > 1;
+ const containsMultipleAttributes = n.type === "JSXElement" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true.
+
+ let forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions;
+ const isMdxBlock = path.getParentNode().rootMarker === "mdx";
+ const rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}';
+ const jsxWhitespace = isMdxBlock ? concat$6([" "]) : ifBreak$1(concat$6([rawJsxWhitespace, softline$2]), " ");
+ const isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === "fbt";
+ const children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag);
+ const containsText = n.children.some(child => isMeaningfulJSXText$1(child)); // We can end up we multiple whitespace elements with empty string
+ // content between them.
+ // We need to remove empty whitespace and softlines before JSX whitespace
+ // to get the correct output.
+
+ for (let i = children.length - 2; i >= 0; i--) {
+ const isPairOfEmptyStrings = children[i] === "" && children[i + 1] === "";
+ const isPairOfHardlines = children[i] === hardline$4 && children[i + 1] === "" && children[i + 2] === hardline$4;
+ const isLineFollowedByJSXWhitespace = (children[i] === softline$2 || children[i] === hardline$4) && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ const isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === "" && (children[i + 2] === softline$2 || children[i + 2] === hardline$4);
+ const isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === "" && children[i + 2] === jsxWhitespace;
+ const isPairOfHardOrSoftLines = children[i] === softline$2 && children[i + 1] === "" && children[i + 2] === hardline$4 || children[i] === hardline$4 && children[i + 1] === "" && children[i + 2] === softline$2;
+
+ if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) {
+ children.splice(i, 2);
+ } else if (isJSXWhitespaceFollowedByLine) {
+ children.splice(i + 1, 2);
+ }
+ } // Trim trailing lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(getLast$2(children)) || isEmpty$1(getLast$2(children)))) {
+ children.pop();
+ } // Trim leading lines (or empty strings)
+
+
+ while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) {
+ children.shift();
+ children.shift();
+ } // Tweak how we format children if outputting this element over multiple lines.
+ // Also detect whether we will force this element to output over multiple lines.
+
+
+ const multilineChildren = [];
+ children.forEach((child, i) => {
+ // There are a number of situations where we need to ensure we display
+ // whitespace as `{" "}` when outputting this element over multiple lines.
+ if (child === jsxWhitespace) {
+ if (i === 1 && children[i - 1] === "") {
+ if (children.length === 2) {
+ // Solitary whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } // Leading whitespace
+
+
+ multilineChildren.push(concat$6([rawJsxWhitespace, hardline$4]));
+ return;
+ } else if (i === children.length - 1) {
+ // Trailing whitespace
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ } else if (children[i - 1] === "" && children[i - 2] === hardline$4) {
+ // Whitespace after line break
+ multilineChildren.push(rawJsxWhitespace);
+ return;
+ }
+ }
+
+ multilineChildren.push(child);
+
+ if (willBreak$1(child)) {
+ forcedBreak = true;
+ }
+ }); // If there is text we use `fill` to fit as much onto each line as possible.
+ // When there is no text (just tags and expressions) we use `group`
+ // to output each on a separate line.
+
+ const content = containsText ? fill$3(multilineChildren) : group$2(concat$6(multilineChildren), {
+ shouldBreak: true
+ });
+
+ if (isMdxBlock) {
+ return content;
+ }
+
+ const multiLineElem = group$2(concat$6([openingLines, indent$3(concat$6([hardline$4, content])), hardline$4, closingLines]));
+
+ if (forcedBreak) {
+ return multiLineElem;
+ }
+
+ return conditionalGroup$1([group$2(concat$6([openingLines, concat$6(children), closingLines])), multiLineElem]);
+}
+
+function maybeWrapJSXElementInParens(path, elem, options) {
+ const parent = path.getParentNode();
+
+ if (!parent) {
+ return elem;
+ }
+
+ const NO_WRAP_PARENTS = {
+ ArrayExpression: true,
+ JSXAttribute: true,
+ JSXElement: true,
+ JSXExpressionContainer: true,
+ JSXFragment: true,
+ ExpressionStatement: true,
+ CallExpression: true,
+ OptionalCallExpression: true,
+ ConditionalExpression: true,
+ JsExpressionRoot: true
+ };
+
+ if (NO_WRAP_PARENTS[parent.type]) {
+ return elem;
+ }
+
+ const shouldBreak = path.match(undefined, node => node.type === "ArrowFunctionExpression", isCallOrOptionalCallExpression$1, node => node.type === "JSXExpressionContainer");
+ const needsParens = needsParens_1(path, options);
+ return group$2(concat$6([needsParens ? "" : ifBreak$1("("), indent$3(concat$6([softline$2, elem])), softline$2, needsParens ? "" : ifBreak$1(")")]), {
+ shouldBreak
+ });
+}
+
+function shouldInlineLogicalExpression(node) {
+ if (node.type !== "LogicalExpression") {
+ return false;
+ }
+
+ if (node.right.type === "ObjectExpression" && node.right.properties.length !== 0) {
+ return true;
+ }
+
+ if (node.right.type === "ArrayExpression" && node.right.elements.length !== 0) {
+ return true;
+ }
+
+ if (isJSXNode$1(node.right)) {
+ return true;
+ }
+
+ return false;
+} // For binary expressions to be consistent, we need to group
+// subsequent operators with the same precedence level under a single
+// group. Otherwise they will be nested such that some of them break
+// onto new lines but not all. Operators with the same precedence
+// level should either all break or not. Because we group them by
+// precedence level and the AST is structured based on precedence
+// level, things are naturally broken up correctly, i.e. `&&` is
+// broken before `+`.
+
+
+function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {
+ let parts = [];
+ const node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.
+
+ if (isBinaryish$1(node)) {
+ // Put all operators with the same precedence level in the same
+ // group. The reason we only need to do this with the `left`
+ // expression is because given an expression like `1 + 2 - 3`, it
+ // is always parsed like `((1 + 2) - 3)`, meaning the `left` side
+ // is where the rest of the expression will exist. Binary
+ // expressions on the right side mean they have a difference
+ // precedence level and should be treated as a separate group, so
+ // print them normally. (This doesn't hold for the `**` operator,
+ // which is unique in that it is right-associative.)
+ if (shouldFlatten$1(node.operator, node.left.operator)) {
+ // Flatten them out by recursively calling this function.
+ parts = parts.concat(path.call(left => printBinaryishExpressions(left, print, options,
+ /* isNested */
+ true, isInsideParenthesis), "left"));
+ } else {
+ parts.push(path.call(print, "left"));
+ }
+
+ const shouldInline = shouldInlineLogicalExpression(node);
+ const lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment$1(options.originalText, node.right, options);
+ const operator = node.type === "NGPipeExpression" ? "|" : node.operator;
+ const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length !== 0 ? group$2(indent$3(concat$6([softline$2, ": ", join$4(concat$6([softline$2, ":", ifBreak$1(" ")]), path.map(print, "arguments").map(arg => align$1(2, group$2(arg))))]))) : "";
+ const right = shouldInline ? concat$6([operator, " ", path.call(print, "right"), rightSuffix]) : concat$6([lineBeforeOperator ? softline$2 : "", operator, lineBeforeOperator ? " " : line$4, path.call(print, "right"), rightSuffix]); // If there's only a single binary expression, we want to create a group
+ // in order to avoid having a small right part like -1 be on its own line.
+
+ const parent = path.getParentNode();
+ const shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;
+ parts.push(" ", shouldGroup ? group$2(right) : right); // The root comments are already printed, but we need to manually print
+ // the other ones since we don't call the normal print on BinaryExpression,
+ // only for the left and right parts
+
+ if (isNested && node.comments) {
+ parts = comments.printComments(path, () => concat$6(parts), options);
+ }
+ } else {
+ // Our stopping case. Simply print the node normally.
+ parts.push(path.call(print));
+ }
+
+ return parts;
+}
+
+function printAssignmentRight(leftNode, rightNode, printedRight, options) {
+ if (hasLeadingOwnLineComment$1(options.originalText, rightNode, options)) {
+ return indent$3(concat$6([line$4, printedRight]));
+ }
+
+ const canBreak = isBinaryish$1(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === "ConditionalExpression" && isBinaryish$1(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === "StringLiteralTypeAnnotation" || rightNode.type === "ClassExpression" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === "Identifier" || isStringLiteral$1(leftNode) || leftNode.type === "MemberExpression") && (isStringLiteral$1(rightNode) || isMemberExpressionChain$1(rightNode)) && // do not put values on a separate line from the key in json
+ options.parser !== "json" && options.parser !== "json5" || rightNode.type === "SequenceExpression";
+
+ if (canBreak) {
+ return group$2(indent$3(concat$6([line$4, printedRight])));
+ }
+
+ return concat$6([" ", printedRight]);
+}
+
+function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) {
+ if (!rightNode) {
+ return printedLeft;
+ }
+
+ const printed = printAssignmentRight(leftNode, rightNode, printedRight, options);
+ return group$2(concat$6([printedLeft, operator, printed]));
+}
+
+function adjustClause(node, clause, forceSpace) {
+ if (node.type === "EmptyStatement") {
+ return ";";
+ }
+
+ if (node.type === "BlockStatement" || forceSpace) {
+ return concat$6([" ", clause]);
+ }
+
+ return indent$3(concat$6([line$4, clause]));
+}
+
+function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) {
+ const raw = rawText$1(node);
+ const isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral";
+ return printString$1(raw, options, isDirectiveLiteral);
+}
+
+function printRegex(node) {
+ const flags = node.flags.split("").sort().join("");
+ return `/${node.pattern}/${flags}`;
+}
+
+function exprNeedsASIProtection(path, options) {
+ const node = path.getValue();
+ const maybeASIProblem = needsParens_1(path, options) || node.type === "ParenthesizedExpression" || node.type === "TypeCastExpression" || node.type === "ArrowFunctionExpression" && !shouldPrintParamsWithoutParens(path, options) || node.type === "ArrayExpression" || node.type === "ArrayPattern" || node.type === "UnaryExpression" && node.prefix && (node.operator === "+" || node.operator === "-") || node.type === "TemplateLiteral" || node.type === "TemplateElement" || isJSXNode$1(node) || node.type === "BindExpression" && !node.object || node.type === "RegExpLiteral" || node.type === "Literal" && node.pattern || node.type === "Literal" && node.regex;
+
+ if (maybeASIProblem) {
+ return true;
+ }
+
+ if (!hasNakedLeftSide$2(node)) {
+ return false;
+ }
+
+ return path.call(childPath => exprNeedsASIProtection(childPath, options), ...getLeftSidePathName$2(path, node));
+}
+
+function stmtNeedsASIProtection(path, options) {
+ const node = path.getNode();
+
+ if (node.type !== "ExpressionStatement") {
+ return false;
+ }
+
+ return path.call(childPath => exprNeedsASIProtection(childPath, options), "expression");
+}
+
+function shouldHugType(node) {
+ if (isSimpleFlowType$1(node) || isObjectType$1(node)) {
+ return true;
+ }
+
+ if (node.type === "UnionTypeAnnotation" || node.type === "TSUnionType") {
+ const voidCount = node.types.filter(n => n.type === "VoidTypeAnnotation" || n.type === "TSVoidKeyword" || n.type === "NullLiteralTypeAnnotation" || n.type === "TSNullKeyword").length;
+ const hasObject = node.types.some(n => n.type === "ObjectTypeAnnotation" || n.type === "TSTypeLiteral" || // This is a bit aggressive but captures Array<{x}>
+ n.type === "GenericTypeAnnotation" || n.type === "TSTypeReference");
+
+ if (node.types.length - 1 === voidCount && hasObject) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function shouldHugArguments(fun) {
+ if (!fun || fun.rest) {
+ return false;
+ }
+
+ const params = fun.params || fun.parameters;
+
+ if (!params || params.length !== 1) {
+ return false;
+ }
+
+ const param = params[0];
+ return !param.comments && (param.type === "ObjectPattern" || param.type === "ArrayPattern" || param.type === "Identifier" && param.typeAnnotation && (param.typeAnnotation.type === "TypeAnnotation" || param.typeAnnotation.type === "TSTypeAnnotation") && isObjectType$1(param.typeAnnotation.typeAnnotation) || param.type === "FunctionTypeParam" && isObjectType$1(param.typeAnnotation) || param.type === "AssignmentPattern" && (param.left.type === "ObjectPattern" || param.left.type === "ArrayPattern") && (param.right.type === "Identifier" || param.right.type === "ObjectExpression" && param.right.properties.length === 0 || param.right.type === "ArrayExpression" && param.right.elements.length === 0));
+}
+
+function printArrayItems(path, options, printPath, print) {
+ const printedElements = [];
+ let separatorParts = [];
+ path.each(childPath => {
+ printedElements.push(concat$6(separatorParts));
+ printedElements.push(group$2(print(childPath)));
+ separatorParts = [",", line$4];
+
+ if (childPath.getValue() && isNextLineEmpty$2(options.originalText, childPath.getValue(), options.locEnd)) {
+ separatorParts.push(softline$2);
+ }
+ }, printPath);
+ return concat$6(printedElements);
+}
+
+function printReturnAndThrowArgument(path, options, print) {
+ const node = path.getValue();
+ const semi = options.semi ? ";" : "";
+ const parts = [];
+
+ if (node.argument) {
+ if (returnArgumentHasLeadingComment$1(options, node.argument)) {
+ parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
+ } else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
+ parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
+ } else {
+ parts.push(" ", path.call(print, "argument"));
+ }
+ }
+
+ const lastComment = Array.isArray(node.comments) && node.comments[node.comments.length - 1];
+ const isLastCommentLine = lastComment && (lastComment.type === "CommentLine" || lastComment.type === "Line");
+
+ if (isLastCommentLine) {
+ parts.push(semi);
+ }
+
+ if (hasDanglingComments$1(node)) {
+ parts.push(" ", comments.printDanglingComments(path, options,
+ /* sameIndent */
+ true));
+ }
+
+ if (!isLastCommentLine) {
+ parts.push(semi);
+ }
+
+ return concat$6(parts);
+}
+
+function willPrintOwnComments(path
+/*, options */
+) {
+ const node = path.getValue();
+ const parent = path.getParentNode();
+ return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && (!hasIgnoreComment$2(path) || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType");
+}
+
+function canAttachComment(node) {
+ return node.type && node.type !== "CommentBlock" && node.type !== "CommentLine" && node.type !== "Line" && node.type !== "Block" && node.type !== "EmptyStatement" && node.type !== "TemplateElement" && node.type !== "Import";
+}
+
+function printComment$1(commentPath, options) {
+ const comment = commentPath.getValue();
+
+ switch (comment.type) {
+ case "CommentBlock":
+ case "Block":
+ {
+ if (isIndentableBlockComment(comment)) {
+ const printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment
+ // printed as a `lineSuffix` which causes the comments to be
+ // interleaved. See https://github.com/prettier/prettier/issues/4412
+
+ if (comment.trailing && !hasNewline$4(options.originalText, options.locStart(comment), {
+ backwards: true
+ })) {
+ return concat$6([hardline$4, printed]);
+ }
+
+ return printed;
+ }
+
+ const commentEnd = options.locEnd(comment);
+ const isInsideFlowComment = options.originalText.slice(commentEnd - 3, commentEnd) === "*-/";
+ return "/*" + comment.value + (isInsideFlowComment ? "*-/" : "*/");
+ }
+
+ case "CommentLine":
+ case "Line":
+ // Print shebangs with the proper comment characters
+ if (options.originalText.slice(options.locStart(comment)).startsWith("#!")) {
+ return "#!" + comment.value.trimEnd();
+ }
+
+ return "//" + comment.value.trimEnd();
+
+ default:
+ throw new Error("Not a comment: " + JSON.stringify(comment));
+ }
+}
+
+function isIndentableBlockComment(comment) {
+ // If the comment has multiple lines and every line starts with a star
+ // we can fix the indentation of each line. The stars in the `/*` and
+ // `*/` delimiters are not included in the comment value, so add them
+ // back first.
+ const lines = `*${comment.value}*`.split("\n");
+ return lines.length > 1 && lines.every(line => line.trim()[0] === "*");
+}
+
+function printIndentableBlockComment(comment) {
+ const lines = comment.value.split("\n");
+ return concat$6(["/*", join$4(hardline$4, lines.map((line, index) => index === 0 ? line.trimEnd() : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()))), "*/"]);
+}
+
+var printerEstree = {
+ preprocess: preprocess_1,
+ print: genericPrint,
+ embed: embed_1,
+ insertPragma: insertPragma$1,
+ massageAstNode: clean_1,
+ hasPrettierIgnore: hasPrettierIgnore$1,
+ willPrintOwnComments,
+ canAttachComment,
+ printComment: printComment$1,
+ isBlockComment: comments$1.isBlockComment,
+ handleComments: {
+ ownLine: comments$1.handleOwnLineComment,
+ endOfLine: comments$1.handleEndOfLineComment,
+ remaining: comments$1.handleRemainingComment
+ },
+ getGapRegex: comments$1.getGapRegex,
+ getCommentChildNodes: comments$1.getCommentChildNodes
+};
+
+const {
+ concat: concat$7,
+ hardline: hardline$5,
+ indent: indent$4,
+ join: join$5
+} = document.builders;
+
+function genericPrint$1(path, options, print) {
+ const node = path.getValue();
+
+ switch (node.type) {
+ case "JsonRoot":
+ return concat$7([path.call(print, "node"), hardline$5]);
+
+ case "ArrayExpression":
+ return node.elements.length === 0 ? "[]" : concat$7(["[", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path.map(print, "elements"))])), hardline$5, "]"]);
+
+ case "ObjectExpression":
+ return node.properties.length === 0 ? "{}" : concat$7(["{", indent$4(concat$7([hardline$5, join$5(concat$7([",", hardline$5]), path.map(print, "properties"))])), hardline$5, "}"]);
+
+ case "ObjectProperty":
+ return concat$7([path.call(print, "key"), ": ", path.call(print, "value")]);
+
+ case "UnaryExpression":
+ return concat$7([node.operator === "+" ? "" : node.operator, path.call(print, "argument")]);
+
+ case "NullLiteral":
+ return "null";
+
+ case "BooleanLiteral":
+ return node.value ? "true" : "false";
+
+ case "StringLiteral":
+ case "NumericLiteral":
+ return JSON.stringify(node.value);
+
+ case "Identifier":
+ return JSON.stringify(node.name);
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown type: " + JSON.stringify(node.type));
+ }
+}
+
+function clean$1(node, newNode
+/*, parent*/
+) {
+ delete newNode.start;
+ delete newNode.end;
+ delete newNode.extra;
+ delete newNode.loc;
+ delete newNode.comments;
+ delete newNode.errors;
+
+ if (node.type === "Identifier") {
+ return {
+ type: "StringLiteral",
+ value: node.name
+ };
+ }
+
+ if (node.type === "UnaryExpression" && node.operator === "+") {
+ return newNode.argument;
+ }
+}
+
+var printerEstreeJson = {
+ preprocess: preprocess_1,
+ print: genericPrint$1,
+ massageAstNode: clean$1
+};
+
+const CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+
+var commonOptions = {
+ bracketSpacing: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: true,
+ description: "Print spaces between brackets.",
+ oppositeDescription: "Do not print spaces between brackets."
+ },
+ singleQuote: {
+ since: "0.0.0",
+ category: CATEGORY_COMMON,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes instead of double quotes."
+ },
+ proseWrap: {
+ since: "1.8.2",
+ category: CATEGORY_COMMON,
+ 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."
+ }]
+ }
+};
+
+const CATEGORY_JAVASCRIPT = "JavaScript"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js
+
+var options$2 = {
+ arrowParens: {
+ since: "1.9.0",
+ category: CATEGORY_JAVASCRIPT,
+ 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`"
+ }]
+ },
+ bracketSpacing: commonOptions.bracketSpacing,
+ jsxBracketSameLine: {
+ since: "0.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Put > on the last line instead of at a new line."
+ },
+ semi: {
+ since: "1.0.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: true,
+ description: "Print semicolons.",
+ oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them."
+ },
+ singleQuote: commonOptions.singleQuote,
+ jsxSingleQuote: {
+ since: "1.15.0",
+ category: CATEGORY_JAVASCRIPT,
+ type: "boolean",
+ default: false,
+ description: "Use single quotes in JSX."
+ },
+ quoteProps: {
+ since: "1.17.0",
+ category: CATEGORY_JAVASCRIPT,
+ 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: CATEGORY_JAVASCRIPT,
+ 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)."
+ }]
+ }
+};
+
+var createLanguage = function (linguistData, override) {
+ const {
+ languageId
+ } = linguistData,
+ rest = _objectWithoutPropertiesLoose(linguistData, ["languageId"]);
+
+ return Object.assign({
+ linguistLanguageId: languageId
+ }, rest, {}, override(linguistData));
+};
+
+var name$2 = "JavaScript";
+var type = "programming";
+var tmScope = "source.js";
+var aceMode = "javascript";
+var codemirrorMode = "javascript";
+var codemirrorMimeType = "text/javascript";
+var color = "#f1e05a";
+var aliases = [
+ "js",
+ "node"
+];
+var extensions = [
+ ".js",
+ "._js",
+ ".bones",
+ ".cjs",
+ ".es",
+ ".es6",
+ ".frag",
+ ".gs",
+ ".jake",
+ ".jsb",
+ ".jscad",
+ ".jsfl",
+ ".jsm",
+ ".jss",
+ ".mjs",
+ ".njs",
+ ".pac",
+ ".sjs",
+ ".ssjs",
+ ".xsjs",
+ ".xsjslib"
+];
+var filenames = [
+ "Jakefile"
+];
+var interpreters = [
+ "chakra",
+ "d8",
+ "gjs",
+ "js",
+ "node",
+ "qjs",
+ "rhino",
+ "v8",
+ "v8-shell"
+];
+var languageId = 183;
+var JavaScript = {
+ name: name$2,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ aliases: aliases,
+ extensions: extensions,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId
+};
+
+var JavaScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$2,
+ type: type,
+ tmScope: tmScope,
+ aceMode: aceMode,
+ codemirrorMode: codemirrorMode,
+ codemirrorMimeType: codemirrorMimeType,
+ color: color,
+ aliases: aliases,
+ extensions: extensions,
+ filenames: filenames,
+ interpreters: interpreters,
+ languageId: languageId,
+ 'default': JavaScript
+});
+
+var name$3 = "JSX";
+var type$1 = "programming";
+var group$3 = "JavaScript";
+var extensions$1 = [
+ ".jsx"
+];
+var tmScope$1 = "source.js.jsx";
+var aceMode$1 = "javascript";
+var codemirrorMode$1 = "jsx";
+var codemirrorMimeType$1 = "text/jsx";
+var languageId$1 = 178;
+var JSX = {
+ name: name$3,
+ type: type$1,
+ group: group$3,
+ extensions: extensions$1,
+ tmScope: tmScope$1,
+ aceMode: aceMode$1,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$1
+};
+
+var JSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$3,
+ type: type$1,
+ group: group$3,
+ extensions: extensions$1,
+ tmScope: tmScope$1,
+ aceMode: aceMode$1,
+ codemirrorMode: codemirrorMode$1,
+ codemirrorMimeType: codemirrorMimeType$1,
+ languageId: languageId$1,
+ 'default': JSX
+});
+
+var name$4 = "TypeScript";
+var type$2 = "programming";
+var color$1 = "#2b7489";
+var aliases$1 = [
+ "ts"
+];
+var interpreters$1 = [
+ "deno",
+ "ts-node"
+];
+var extensions$2 = [
+ ".ts"
+];
+var tmScope$2 = "source.ts";
+var aceMode$2 = "typescript";
+var codemirrorMode$2 = "javascript";
+var codemirrorMimeType$2 = "application/typescript";
+var languageId$2 = 378;
+var TypeScript = {
+ name: name$4,
+ type: type$2,
+ color: color$1,
+ aliases: aliases$1,
+ interpreters: interpreters$1,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ languageId: languageId$2
+};
+
+var TypeScript$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$4,
+ type: type$2,
+ color: color$1,
+ aliases: aliases$1,
+ interpreters: interpreters$1,
+ extensions: extensions$2,
+ tmScope: tmScope$2,
+ aceMode: aceMode$2,
+ codemirrorMode: codemirrorMode$2,
+ codemirrorMimeType: codemirrorMimeType$2,
+ languageId: languageId$2,
+ 'default': TypeScript
+});
+
+var name$5 = "TSX";
+var type$3 = "programming";
+var group$4 = "TypeScript";
+var extensions$3 = [
+ ".tsx"
+];
+var tmScope$3 = "source.tsx";
+var aceMode$3 = "javascript";
+var codemirrorMode$3 = "jsx";
+var codemirrorMimeType$3 = "text/jsx";
+var languageId$3 = 94901924;
+var TSX = {
+ name: name$5,
+ type: type$3,
+ group: group$4,
+ extensions: extensions$3,
+ tmScope: tmScope$3,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ languageId: languageId$3
+};
+
+var TSX$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$5,
+ type: type$3,
+ group: group$4,
+ extensions: extensions$3,
+ tmScope: tmScope$3,
+ aceMode: aceMode$3,
+ codemirrorMode: codemirrorMode$3,
+ codemirrorMimeType: codemirrorMimeType$3,
+ languageId: languageId$3,
+ 'default': TSX
+});
+
+var name$6 = "JSON";
+var type$4 = "data";
+var tmScope$4 = "source.json";
+var aceMode$4 = "json";
+var codemirrorMode$4 = "javascript";
+var codemirrorMimeType$4 = "application/json";
+var searchable = false;
+var extensions$4 = [
+ ".json",
+ ".avsc",
+ ".geojson",
+ ".gltf",
+ ".har",
+ ".ice",
+ ".JSON-tmLanguage",
+ ".jsonl",
+ ".mcmeta",
+ ".tfstate",
+ ".tfstate.backup",
+ ".topojson",
+ ".webapp",
+ ".webmanifest",
+ ".yy",
+ ".yyp"
+];
+var filenames$1 = [
+ ".arcconfig",
+ ".htmlhintrc",
+ ".tern-config",
+ ".tern-project",
+ ".watchmanconfig",
+ "composer.lock",
+ "mcmod.info"
+];
+var languageId$4 = 174;
+var _JSON = {
+ name: name$6,
+ type: type$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ searchable: searchable,
+ extensions: extensions$4,
+ filenames: filenames$1,
+ languageId: languageId$4
+};
+
+var _JSON$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$6,
+ type: type$4,
+ tmScope: tmScope$4,
+ aceMode: aceMode$4,
+ codemirrorMode: codemirrorMode$4,
+ codemirrorMimeType: codemirrorMimeType$4,
+ searchable: searchable,
+ extensions: extensions$4,
+ filenames: filenames$1,
+ languageId: languageId$4,
+ 'default': _JSON
+});
+
+var name$7 = "JSON with Comments";
+var type$5 = "data";
+var group$5 = "JSON";
+var tmScope$5 = "source.js";
+var aceMode$5 = "javascript";
+var codemirrorMode$5 = "javascript";
+var codemirrorMimeType$5 = "text/javascript";
+var aliases$2 = [
+ "jsonc"
+];
+var extensions$5 = [
+ ".jsonc",
+ ".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"
+];
+var filenames$2 = [
+ ".babelrc",
+ ".eslintrc.json",
+ ".jscsrc",
+ ".jshintrc",
+ ".jslintrc",
+ "jsconfig.json",
+ "language-configuration.json",
+ "tsconfig.json"
+];
+var languageId$5 = 423;
+var JSON_with_Comments = {
+ name: name$7,
+ type: type$5,
+ group: group$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ aliases: aliases$2,
+ extensions: extensions$5,
+ filenames: filenames$2,
+ languageId: languageId$5
+};
+
+var JSON_with_Comments$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$7,
+ type: type$5,
+ group: group$5,
+ tmScope: tmScope$5,
+ aceMode: aceMode$5,
+ codemirrorMode: codemirrorMode$5,
+ codemirrorMimeType: codemirrorMimeType$5,
+ aliases: aliases$2,
+ extensions: extensions$5,
+ filenames: filenames$2,
+ languageId: languageId$5,
+ 'default': JSON_with_Comments
+});
+
+var name$8 = "JSON5";
+var type$6 = "data";
+var extensions$6 = [
+ ".json5"
+];
+var tmScope$6 = "source.js";
+var aceMode$6 = "javascript";
+var codemirrorMode$6 = "javascript";
+var codemirrorMimeType$6 = "application/json";
+var languageId$6 = 175;
+var JSON5 = {
+ name: name$8,
+ type: type$6,
+ extensions: extensions$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$6
+};
+
+var JSON5$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$8,
+ type: type$6,
+ extensions: extensions$6,
+ tmScope: tmScope$6,
+ aceMode: aceMode$6,
+ codemirrorMode: codemirrorMode$6,
+ codemirrorMimeType: codemirrorMimeType$6,
+ languageId: languageId$6,
+ 'default': JSON5
+});
+
+var require$$0$1 = getCjsExportFromNamespace(JavaScript$1);
+
+var require$$1 = getCjsExportFromNamespace(JSX$1);
+
+var require$$2 = getCjsExportFromNamespace(TypeScript$1);
+
+var require$$3 = getCjsExportFromNamespace(TSX$1);
+
+var require$$4$1 = getCjsExportFromNamespace(_JSON$1);
+
+var require$$5 = getCjsExportFromNamespace(JSON_with_Comments$1);
+
+var require$$6 = getCjsExportFromNamespace(JSON5$1);
+
+const languages = [createLanguage(require$$0$1, data => ({
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript", "mongo"],
+ interpreters: data.interpreters.concat(["nodejs"])
+})), createLanguage(require$$0$1, () => ({
+ name: "Flow",
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascript"],
+ aliases: [],
+ filenames: [],
+ extensions: [".js.flow"]
+})), createLanguage(require$$1, () => ({
+ since: "0.0.0",
+ parsers: ["babel", "flow"],
+ vscodeLanguageIds: ["javascriptreact"]
+})), createLanguage(require$$2, () => ({
+ since: "1.4.0",
+ parsers: ["typescript", "babel-ts"],
+ vscodeLanguageIds: ["typescript"]
+})), createLanguage(require$$3, () => ({
+ since: "1.4.0",
+ parsers: ["typescript", "babel-ts"],
+ vscodeLanguageIds: ["typescriptreact"]
+})), createLanguage(require$$4$1, () => ({
+ name: "JSON.stringify",
+ since: "1.13.0",
+ parsers: ["json-stringify"],
+ vscodeLanguageIds: ["json"],
+ extensions: [],
+ // .json file defaults to json instead of json-stringify
+ filenames: ["package.json", "package-lock.json", "composer.json"]
+})), createLanguage(require$$4$1, data => ({
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["json"],
+ filenames: data.filenames.concat([".prettierrc"])
+})), createLanguage(require$$5, data => ({
+ since: "1.5.0",
+ parsers: ["json"],
+ vscodeLanguageIds: ["jsonc"],
+ filenames: data.filenames.concat([".eslintrc"])
+})), createLanguage(require$$6, () => ({
+ since: "1.13.0",
+ parsers: ["json5"],
+ vscodeLanguageIds: ["json5"]
+}))];
+const printers = {
+ estree: printerEstree,
+ "estree-json": printerEstreeJson
+};
+var languageJs = {
+ languages,
+ options: options$2,
+ printers
+};
+
+function clean$2(ast, newObj, parent) {
+ ["raw", // front-matter
+ "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(name => {
+ delete newObj[name];
+ });
+
+ if (ast.type === "yaml") {
+ delete newObj.value;
+ } // --insert-pragma
+
+
+ if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment
+ parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) {
+ /**
+ * something
+ *
+ * @format
+ */
+ delete newObj.text; // standalone pragma
+
+ if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) {
+ return null;
+ }
+ }
+
+ if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") {
+ delete newObj.value;
+ }
+
+ if (ast.type === "css-rule") {
+ delete newObj.params;
+ }
+
+ if (ast.type === "selector-combinator") {
+ newObj.value = newObj.value.replace(/\s+/g, " ");
+ }
+
+ if (ast.type === "media-feature") {
+ newObj.value = newObj.value.replace(/ /g, "");
+ }
+
+ if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].includes(newObj.value.replace().toLowerCase())) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") {
+ newObj.value = newObj.value.toLowerCase();
+ }
+
+ if (ast.type === "css-decl") {
+ newObj.prop = newObj.prop.toLowerCase();
+ }
+
+ if (ast.type === "css-atrule" || ast.type === "css-import") {
+ newObj.name = newObj.name.toLowerCase();
+ }
+
+ if (ast.type === "value-number") {
+ newObj.unit = newObj.unit.toLowerCase();
+ }
+
+ if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) {
+ newObj.value = cleanCSSStrings(newObj.value);
+ }
+
+ if (ast.type === "selector-attribute") {
+ newObj.attribute = newObj.attribute.trim();
+
+ if (newObj.namespace) {
+ if (typeof newObj.namespace === "string") {
+ newObj.namespace = newObj.namespace.trim();
+
+ if (newObj.namespace.length === 0) {
+ newObj.namespace = true;
+ }
+ }
+ }
+
+ if (newObj.value) {
+ newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, "");
+ delete newObj.quoted;
+ }
+ }
+
+ if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) {
+ newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, (match, numStr, unit) => {
+ const num = Number(numStr);
+ return isNaN(num) ? match : num + unit.toLowerCase();
+ });
+ }
+
+ if (ast.type === "selector-tag") {
+ const lowercasedValue = ast.value.toLowerCase();
+
+ if (["from", "to"].includes(lowercasedValue)) {
+ newObj.value = lowercasedValue;
+ }
+ } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func`
+
+
+ if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") {
+ delete newObj.value;
+ } // Workaround for SCSS nested properties
+
+
+ if (ast.type === "selector-unknown") {
+ delete newObj.value;
+ }
+}
+
+function cleanCSSStrings(value) {
+ return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1");
+}
+
+var clean_1$1 = clean$2;
+
+const {
+ builders: {
+ hardline: hardline$6,
+ literalline: literalline$3,
+ concat: concat$8,
+ markAsRoot: markAsRoot$1
+ },
+ utils: {
+ mapDoc: mapDoc$2
+ }
+} = document;
+
+function embed$1(path, print, textToDoc
+/*, options */
+) {
+ const node = path.getValue();
+
+ if (node.type === "yaml") {
+ return markAsRoot$1(concat$8(["---", hardline$6, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---", hardline$6]));
+ }
+
+ return null;
+
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$2(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$8(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$3)) : currentDoc);
+ }
+}
+
+var embed_1$1 = embed$1;
+
+const DELIMITER_MAP = {
+ "---": "yaml",
+ "+++": "toml"
+};
+
+function parse$5(text) {
+ const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
+ const match = text.match( // trailing spaces after delimiters are allowed
+ new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
+
+ if (match === null) {
+ return {
+ frontMatter: null,
+ content: text
+ };
+ }
+
+ const [raw, delimiter, value] = match;
+ return {
+ frontMatter: {
+ type: DELIMITER_MAP[delimiter],
+ value,
+ raw: raw.replace(/\n$/, "")
+ },
+ content: raw.replace(/[^\n]/g, " ") + text.slice(raw.length)
+ };
+}
+
+var frontMatter = parse$5;
+
+function hasPragma$1(text) {
+ return pragma.hasPragma(frontMatter(text).content);
+}
+
+function insertPragma$2(text) {
+ const {
+ frontMatter: frontMatter$1,
+ content
+ } = frontMatter(text);
+ return (frontMatter$1 ? frontMatter$1.raw + "\n\n" : "") + pragma.insertPragma(content);
+}
+
+var pragma$1 = {
+ hasPragma: hasPragma$1,
+ insertPragma: insertPragma$2
+};
+
+var lineColumnToIndex = function (lineColumn, text) {
+ let index = 0;
+
+ for (let i = 0; i < lineColumn.line - 1; ++i) {
+ index = text.indexOf("\n", index) + 1;
+
+ if (index === -1) {
+ return -1;
+ }
+ }
+
+ return index + lineColumn.column;
+};
+
+const {
+ getLast: getLast$3,
+ skipEverythingButNewLine: skipEverythingButNewLine$2
+} = util$1;
+
+function calculateLocStart(node, text) {
+ if (node.source) {
+ return lineColumnToIndex(node.source.start, text) - 1;
+ }
+
+ return null;
+}
+
+function calculateLocEnd(node, text) {
+ if (node.type === "css-comment" && node.inline) {
+ return skipEverythingButNewLine$2(text, node.source.startOffset);
+ }
+
+ const endNode = node.nodes && getLast$3(node.nodes);
+
+ if (endNode && node.source && !node.source.end) {
+ node = endNode;
+ }
+
+ if (node.source && node.source.end) {
+ return lineColumnToIndex(node.source.end, text);
+ }
+
+ return null;
+}
+
+function calculateLoc(node, text) {
+ if (node && typeof node === "object") {
+ if (node.source) {
+ node.source.startOffset = calculateLocStart(node, text);
+ node.source.endOffset = calculateLocEnd(node, text);
+ }
+
+ for (const key in node) {
+ calculateLoc(node[key], text);
+ }
+ }
+}
+/**
+ * Workaround for a bug: quotes in inline comments corrupt loc data of subsequent nodes.
+ * This function replaces the quotes with U+FFFE and U+FFFF. Later, when the comments are printed,
+ * their content is extracted from the original text or restored by replacing the placeholder
+ * characters back with quotes.
+ * - https://github.com/prettier/prettier/issues/7780
+ * - https://github.com/shellscape/postcss-less/issues/145
+ * - About noncharacters (U+FFFE and U+FFFF): http://www.unicode.org/faq/private_use.html#nonchar1
+ * @param text {string}
+ */
+
+
+function replaceQuotesInInlineComments(text) {
+ /** @typedef { 'initial' | 'single-quotes' | 'double-quotes' | 'url' | 'comment-block' | 'comment-inline' } State */
+
+ /** @type {State} */
+ let state = "initial";
+ /** @type {State} */
+
+ let stateToReturnFromQuotes = "initial";
+ let inlineCommentStartIndex;
+ let inlineCommentContainsQuotes = false;
+ const inlineCommentsToReplace = [];
+
+ for (let i = 0; i < text.length; i++) {
+ const c = text[i];
+
+ switch (state) {
+ case "initial":
+ if (c === "'") {
+ state = "single-quotes";
+ continue;
+ }
+
+ if (c === '"') {
+ state = "double-quotes";
+ continue;
+ }
+
+ if ((c === "u" || c === "U") && text.slice(i, i + 4).toLowerCase() === "url(") {
+ state = "url";
+ i += 3;
+ continue;
+ }
+
+ if (c === "*" && text[i - 1] === "/") {
+ state = "comment-block";
+ continue;
+ }
+
+ if (c === "/" && text[i - 1] === "/") {
+ state = "comment-inline";
+ inlineCommentStartIndex = i - 1;
+ continue;
+ }
+
+ continue;
+
+ case "single-quotes":
+ if (c === "'" && text[i - 1] !== "\\") {
+ state = stateToReturnFromQuotes;
+ stateToReturnFromQuotes = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ continue;
+
+ case "double-quotes":
+ if (c === '"' && text[i - 1] !== "\\") {
+ state = stateToReturnFromQuotes;
+ stateToReturnFromQuotes = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ continue;
+
+ case "url":
+ if (c === ")") {
+ state = "initial";
+ }
+
+ if (c === "\n" || c === "\r") {
+ return text; // invalid input
+ }
+
+ if (c === "'") {
+ state = "single-quotes";
+ stateToReturnFromQuotes = "url";
+ continue;
+ }
+
+ if (c === '"') {
+ state = "double-quotes";
+ stateToReturnFromQuotes = "url";
+ continue;
+ }
+
+ continue;
+
+ case "comment-block":
+ if (c === "/" && text[i - 1] === "*") {
+ state = "initial";
+ }
+
+ continue;
+
+ case "comment-inline":
+ if (c === '"' || c === "'") {
+ inlineCommentContainsQuotes = true;
+ }
+
+ if (c === "\n" || c === "\r") {
+ if (inlineCommentContainsQuotes) {
+ inlineCommentsToReplace.push([inlineCommentStartIndex, i]);
+ }
+
+ state = "initial";
+ inlineCommentContainsQuotes = false;
+ }
+
+ continue;
+ }
+ }
+
+ for (const [start, end] of inlineCommentsToReplace) {
+ text = text.slice(0, start) + text.slice(start, end).replace(/'/g, "\ufffe").replace(/"/g, "\uffff") + text.slice(end);
+ }
+
+ return text;
+}
+
+function restoreQuotesInInlineComments(text) {
+ return text.replace(/\ufffe/g, "'").replace(/\uffff/g, '"');
+}
+
+var loc$1 = {
+ calculateLoc,
+ replaceQuotesInInlineComments,
+ restoreQuotesInInlineComments
+};
+
+const colorAdjusterFunctions = ["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 getAncestorCounter(path, typeOrTypes) {
+ const types = [].concat(typeOrTypes);
+ let counter = -1;
+ let ancestorNode;
+
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.includes(ancestorNode.type)) {
+ return counter;
+ }
+ }
+
+ return -1;
+}
+
+function getAncestorNode(path, typeOrTypes) {
+ const counter = getAncestorCounter(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+}
+
+function getPropOfDeclNode(path) {
+ const declAncestorNode = getAncestorNode(path, "css-decl");
+ return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase();
+}
+
+function isSCSS(parser, text) {
+ const hasExplicitParserChoice = parser === "less" || parser === "scss";
+ const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
+ return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
+}
+
+function isWideKeywords(value) {
+ return ["initial", "inherit", "unset", "revert"].includes(value.toLowerCase());
+}
+
+function isKeyframeAtRuleKeywords(path, value) {
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(value.toLowerCase());
+}
+
+function maybeToLowerCase(value) {
+ return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase();
+}
+
+function insideValueFunctionNode(path, functionName) {
+ const funcAncestorNode = getAncestorNode(path, "value-func");
+ return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName;
+}
+
+function insideICSSRuleNode(path) {
+ const ruleAncestorNode = getAncestorNode(path, "css-rule");
+ return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export"));
+}
+
+function insideAtRuleNode(path, atRuleNameOrAtRuleNames) {
+ const atRuleNames = [].concat(atRuleNameOrAtRuleNames);
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleNames.includes(atRuleAncestorNode.name.toLowerCase());
+}
+
+function insideURLFunctionInImportAtRuleNode(path) {
+ const node = path.getValue();
+ const atRuleAncestorNode = getAncestorNode(path, "css-atrule");
+ return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2;
+}
+
+function isURLFunctionNode(node) {
+ return node.type === "value-func" && node.value.toLowerCase() === "url";
+}
+
+function isLastNode(path, node) {
+ const parentNode = path.getParentNode();
+
+ if (!parentNode) {
+ return false;
+ }
+
+ const {
+ nodes
+ } = parentNode;
+ return nodes && nodes.indexOf(node) === nodes.length - 1;
+}
+
+function isDetachedRulesetDeclarationNode(node) {
+ // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as atrules with names ending
+ // with a colon, so keep the original case then.
+ if (!node.selector) {
+ return false;
+ }
+
+ return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value);
+}
+
+function isForKeywordNode(node) {
+ return node.type === "value-word" && ["from", "through", "end"].includes(node.value);
+}
+
+function isIfElseKeywordNode(node) {
+ return node.type === "value-word" && ["and", "or", "not"].includes(node.value);
+}
+
+function isEachKeywordNode(node) {
+ return node.type === "value-word" && node.value === "in";
+}
+
+function isMultiplicationNode(node) {
+ return node.type === "value-operator" && node.value === "*";
+}
+
+function isDivisionNode(node) {
+ return node.type === "value-operator" && node.value === "/";
+}
+
+function isAdditionNode(node) {
+ return node.type === "value-operator" && node.value === "+";
+}
+
+function isSubtractionNode(node) {
+ return node.type === "value-operator" && node.value === "-";
+}
+
+function isModuloNode(node) {
+ return node.type === "value-operator" && node.value === "%";
+}
+
+function isMathOperatorNode(node) {
+ return isMultiplicationNode(node) || isDivisionNode(node) || isAdditionNode(node) || isSubtractionNode(node) || isModuloNode(node);
+}
+
+function isEqualityOperatorNode(node) {
+ return node.type === "value-word" && ["==", "!="].includes(node.value);
+}
+
+function isRelationalOperatorNode(node) {
+ return node.type === "value-word" && ["<", ">", "<=", ">="].includes(node.value);
+}
+
+function isSCSSControlDirectiveNode(node) {
+ return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].includes(node.name);
+}
+
+function isSCSSNestedPropertyNode(node) {
+ if (!node.selector) {
+ return false;
+ }
+
+ return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":");
+}
+
+function isDetachedRulesetCallNode(node) {
+ return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params);
+}
+
+function isTemplatePlaceholderNode(node) {
+ return node.name.startsWith("prettier-placeholder");
+}
+
+function isTemplatePropNode(node) {
+ return node.prop.startsWith("@prettier-placeholder");
+}
+
+function isPostcssSimpleVarNode(currentNode, nextNode) {
+ return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before;
+}
+
+function hasComposesNode(node) {
+ return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes";
+}
+
+function hasParensAroundNode(node) {
+ return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null;
+}
+
+function hasEmptyRawBefore(node) {
+ return node.raws && node.raws.before === "";
+}
+
+function isKeyValuePairNode(node) {
+ return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon";
+}
+
+function isKeyValuePairInParenGroupNode(node) {
+ return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode(node.groups[0]);
+}
+
+function isSCSSMapItemNode(path) {
+ const node = path.getValue(); // Ignore empty item (i.e. `$key: ()`)
+
+ if (node.groups.length === 0) {
+ return false;
+ }
+
+ const parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`)
+
+ if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) {
+ return false;
+ }
+
+ const declNode = getAncestorNode(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`)
+
+ if (declNode && declNode.prop && declNode.prop.startsWith("$")) {
+ return true;
+ } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`)
+
+
+ if (isKeyValuePairInParenGroupNode(parentParentNode)) {
+ return true;
+ } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`)
+
+
+ if (parentParentNode.type === "value-func") {
+ return true;
+ }
+
+ return false;
+}
+
+function isInlineValueCommentNode(node) {
+ return node.type === "value-comment" && node.inline;
+}
+
+function isHashNode(node) {
+ return node.type === "value-word" && node.value === "#";
+}
+
+function isLeftCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "{";
+}
+
+function isRightCurlyBraceNode(node) {
+ return node.type === "value-word" && node.value === "}";
+}
+
+function isWordNode(node) {
+ return ["value-word", "value-atword"].includes(node.type);
+}
+
+function isColonNode(node) {
+ return node.type === "value-colon";
+}
+
+function isMediaAndSupportsKeywords(node) {
+ return node.value && ["not", "and", "or"].includes(node.value.toLowerCase());
+}
+
+function isColorAdjusterFuncNode(node) {
+ if (node.type !== "value-func") {
+ return false;
+ }
+
+ return colorAdjusterFunctions.includes(node.value.toLowerCase());
+} // TODO: only check `less` when we don't use `less` to parse `css`
+
+
+function isLessParser(options) {
+ return options.parser === "css" || options.parser === "less";
+}
+
+function lastLineHasInlineComment(text) {
+ return /\/\//.test(text.split(/[\r\n]/).pop());
+}
+
+var utils$7 = {
+ getAncestorCounter,
+ getAncestorNode,
+ getPropOfDeclNode,
+ maybeToLowerCase,
+ insideValueFunctionNode,
+ insideICSSRuleNode,
+ insideAtRuleNode,
+ insideURLFunctionInImportAtRuleNode,
+ isKeyframeAtRuleKeywords,
+ isWideKeywords,
+ isSCSS,
+ isLastNode,
+ isLessParser,
+ isSCSSControlDirectiveNode,
+ isDetachedRulesetDeclarationNode,
+ isRelationalOperatorNode,
+ isEqualityOperatorNode,
+ isMultiplicationNode,
+ isDivisionNode,
+ isAdditionNode,
+ isSubtractionNode,
+ isModuloNode,
+ isMathOperatorNode,
+ isEachKeywordNode,
+ isForKeywordNode,
+ isURLFunctionNode,
+ isIfElseKeywordNode,
+ hasComposesNode,
+ hasParensAroundNode,
+ hasEmptyRawBefore,
+ isSCSSNestedPropertyNode,
+ isDetachedRulesetCallNode,
+ isTemplatePlaceholderNode,
+ isTemplatePropNode,
+ isPostcssSimpleVarNode,
+ isKeyValuePairNode,
+ isKeyValuePairInParenGroupNode,
+ isSCSSMapItemNode,
+ isInlineValueCommentNode,
+ isHashNode,
+ isLeftCurlyBraceNode,
+ isRightCurlyBraceNode,
+ isWordNode,
+ isColonNode,
+ isMediaAndSupportsKeywords,
+ isColorAdjusterFuncNode,
+ lastLineHasInlineComment
+};
+
+const {
+ insertPragma: insertPragma$3
+} = pragma$1;
+const {
+ printNumber: printNumber$2,
+ printString: printString$2,
+ hasIgnoreComment: hasIgnoreComment$3,
+ hasNewline: hasNewline$5
+} = util$1;
+const {
+ isNextLineEmpty: isNextLineEmpty$3
+} = utilShared;
+const {
+ restoreQuotesInInlineComments: restoreQuotesInInlineComments$1
+} = loc$1;
+const {
+ builders: {
+ concat: concat$9,
+ join: join$6,
+ line: line$5,
+ hardline: hardline$7,
+ softline: softline$3,
+ group: group$6,
+ fill: fill$4,
+ indent: indent$5,
+ dedent: dedent$2,
+ ifBreak: ifBreak$2
+ },
+ utils: {
+ removeLines: removeLines$2
+ }
+} = document;
+const {
+ getAncestorNode: getAncestorNode$1,
+ getPropOfDeclNode: getPropOfDeclNode$1,
+ maybeToLowerCase: maybeToLowerCase$1,
+ insideValueFunctionNode: insideValueFunctionNode$1,
+ insideICSSRuleNode: insideICSSRuleNode$1,
+ insideAtRuleNode: insideAtRuleNode$1,
+ insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode$1,
+ isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords$1,
+ isWideKeywords: isWideKeywords$1,
+ isSCSS: isSCSS$1,
+ isLastNode: isLastNode$1,
+ isLessParser: isLessParser$1,
+ isSCSSControlDirectiveNode: isSCSSControlDirectiveNode$1,
+ isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode$1,
+ isRelationalOperatorNode: isRelationalOperatorNode$1,
+ isEqualityOperatorNode: isEqualityOperatorNode$1,
+ isMultiplicationNode: isMultiplicationNode$1,
+ isDivisionNode: isDivisionNode$1,
+ isAdditionNode: isAdditionNode$1,
+ isSubtractionNode: isSubtractionNode$1,
+ isMathOperatorNode: isMathOperatorNode$1,
+ isEachKeywordNode: isEachKeywordNode$1,
+ isForKeywordNode: isForKeywordNode$1,
+ isURLFunctionNode: isURLFunctionNode$1,
+ isIfElseKeywordNode: isIfElseKeywordNode$1,
+ hasComposesNode: hasComposesNode$1,
+ hasParensAroundNode: hasParensAroundNode$1,
+ hasEmptyRawBefore: hasEmptyRawBefore$1,
+ isKeyValuePairNode: isKeyValuePairNode$1,
+ isDetachedRulesetCallNode: isDetachedRulesetCallNode$1,
+ isTemplatePlaceholderNode: isTemplatePlaceholderNode$1,
+ isTemplatePropNode: isTemplatePropNode$1,
+ isPostcssSimpleVarNode: isPostcssSimpleVarNode$1,
+ isSCSSMapItemNode: isSCSSMapItemNode$1,
+ isInlineValueCommentNode: isInlineValueCommentNode$1,
+ isHashNode: isHashNode$1,
+ isLeftCurlyBraceNode: isLeftCurlyBraceNode$1,
+ isRightCurlyBraceNode: isRightCurlyBraceNode$1,
+ isWordNode: isWordNode$1,
+ isColonNode: isColonNode$1,
+ isMediaAndSupportsKeywords: isMediaAndSupportsKeywords$1,
+ isColorAdjusterFuncNode: isColorAdjusterFuncNode$1,
+ lastLineHasInlineComment: lastLineHasInlineComment$1
+} = utils$7;
+
+function shouldPrintComma$1(options) {
+ switch (options.trailingComma) {
+ case "all":
+ case "es5":
+ return true;
+
+ case "none":
+ default:
+ return false;
+ }
+}
+
+function genericPrint$2(path, options, print) {
+ const node = path.getValue();
+ /* istanbul ignore if */
+
+ if (!node) {
+ return "";
+ }
+
+ if (typeof node === "string") {
+ return node;
+ }
+
+ switch (node.type) {
+ case "yaml":
+ case "toml":
+ return concat$9([node.raw, hardline$7]);
+
+ case "css-root":
+ {
+ const nodes = printNodeSequence(path, options, print);
+
+ if (nodes.parts.length) {
+ return concat$9([nodes, options.__isHTMLStyleAttribute ? "" : hardline$7]);
+ }
+
+ return nodes;
+ }
+
+ case "css-comment":
+ {
+ const isInlineComment = node.inline || node.raws.inline;
+ const text = options.originalText.slice(options.locStart(node), options.locEnd(node));
+ return isInlineComment ? text.trimEnd() : text;
+ }
+
+ case "css-rule":
+ {
+ return concat$9([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$9([node.selector && node.selector.type === "selector-unknown" && lastLineHasInlineComment$1(node.selector.value) ? line$5 : " ", "{", node.nodes.length > 0 ? indent$5(concat$9([hardline$7, printNodeSequence(path, options, print)])) : "", hardline$7, "}", isDetachedRulesetDeclarationNode$1(node) ? ";" : ""]) : ";"]);
+ }
+
+ case "css-decl":
+ {
+ const parentNode = path.getParentNode();
+ return concat$9([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode$1(path) ? node.prop : maybeToLowerCase$1(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode$1(node) ? removeLines$2(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$9([" {", indent$5(concat$9([softline$3, printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePropNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]);
+ }
+
+ case "css-atrule":
+ {
+ const parentNode = path.getParentNode();
+ const isTemplatePlaceholderNodeWithoutSemiColon = isTemplatePlaceholderNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";";
+
+ if (isLessParser$1(options)) {
+ if (node.mixin) {
+ return concat$9([path.call(print, "selector"), node.important ? " !important" : "", isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+
+ if (node.function) {
+ return concat$9([node.name, concat$9([path.call(print, "params")]), isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+
+ if (node.variable) {
+ return concat$9(["@", node.name, ": ", node.value ? concat$9([path.call(print, "value")]) : "", node.raws.between.trim() ? node.raws.between.trim() + " " : "", node.nodes ? concat$9(["{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : "", isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+ }
+
+ return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
+ // variable declarations will be parsed as at-rules with names ending
+ // with a colon, so keep the original case then.
+ isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) ? node.raws.afterName === "" ? "" : node.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$9([hardline$7, hardline$7]) : /^\s*\n/.test(node.raws.afterName) ? hardline$7 : " " : " ", path.call(print, "params")]) : "", node.selector ? indent$5(concat$9([" ", path.call(print, "selector")])) : "", node.value ? group$6(concat$9([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$9([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
+ }
+ // postcss-media-query-parser
+
+ case "media-query-list":
+ {
+ const parts = [];
+ path.each(childPath => {
+ const node = childPath.getValue();
+
+ if (node.type === "media-query" && node.value === "") {
+ return;
+ }
+
+ parts.push(childPath.call(print));
+ }, "nodes");
+ return group$6(indent$5(join$6(line$5, parts)));
+ }
+
+ case "media-query":
+ {
+ return concat$9([join$6(" ", path.map(print, "nodes")), isLastNode$1(path, node) ? "" : ","]);
+ }
+
+ case "media-type":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
+
+ case "media-feature-expression":
+ {
+ if (!node.nodes) {
+ return node.value;
+ }
+
+ return concat$9(["(", concat$9(path.map(print, "nodes")), ")"]);
+ }
+
+ case "media-feature":
+ {
+ return maybeToLowerCase$1(adjustStrings(node.value.replace(/ +/g, " "), options));
+ }
+
+ case "media-colon":
+ {
+ return concat$9([node.value, " "]);
+ }
+
+ case "media-value":
+ {
+ return adjustNumbers(adjustStrings(node.value, options));
+ }
+
+ case "media-keyword":
+ {
+ return adjustStrings(node.value, options);
+ }
+
+ case "media-url":
+ {
+ return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options);
+ }
+
+ case "media-unknown":
+ {
+ return node.value;
+ }
+ // postcss-selector-parser
+
+ case "selector-root":
+ {
+ return group$6(concat$9([insideAtRuleNode$1(path, "custom-selector") ? concat$9([getAncestorNode$1(path, "css-atrule").customSelector, line$5]) : "", join$6(concat$9([",", insideAtRuleNode$1(path, ["extend", "custom-selector", "nest"]) ? line$5 : hardline$7]), path.map(print, "nodes"))]));
+ }
+
+ case "selector-selector":
+ {
+ return group$6(indent$5(concat$9(path.map(print, "nodes"))));
+ }
+
+ case "selector-comment":
+ {
+ return node.value;
+ }
+
+ case "selector-string":
+ {
+ return adjustStrings(node.value, options);
+ }
+
+ case "selector-tag":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode && parentNode.nodes.indexOf(node);
+ const prevNode = index && parentNode.nodes[index - 1];
+ return concat$9([node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isKeyframeAtRuleKeywords$1(path, node.value) ? node.value.toLowerCase() : node.value)]);
+ }
+
+ case "selector-id":
+ {
+ return concat$9(["#", node.value]);
+ }
+
+ case "selector-class":
+ {
+ return concat$9([".", adjustNumbers(adjustStrings(node.value, options))]);
+ }
+
+ case "selector-attribute":
+ {
+ return concat$9(["[", node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]);
+ }
+
+ case "selector-combinator":
+ {
+ if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") {
+ const parentNode = path.getParentNode();
+ const leading = parentNode.type === "selector-selector" && parentNode.nodes[0] === node ? "" : line$5;
+ return concat$9([leading, node.value, isLastNode$1(path, node) ? "" : " "]);
+ }
+
+ const leading = node.value.trim().startsWith("(") ? line$5 : "";
+ const value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$5;
+ return concat$9([leading, value]);
+ }
+
+ case "selector-universal":
+ {
+ return concat$9([node.namespace ? concat$9([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]);
+ }
+
+ case "selector-pseudo":
+ {
+ return concat$9([maybeToLowerCase$1(node.value), node.nodes && node.nodes.length > 0 ? concat$9(["(", join$6(", ", path.map(print, "nodes")), ")"]) : ""]);
+ }
+
+ case "selector-nesting":
+ {
+ return node.value;
+ }
+
+ case "selector-unknown":
+ {
+ const ruleAncestorNode = getAncestorNode$1(path, "css-rule"); // Nested SCSS property
+
+ if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) {
+ return adjustNumbers(adjustStrings(maybeToLowerCase$1(node.value), options));
+ } // originalText has to be used for Less, see replaceQuotesInInlineComments in loc.js
+
+
+ const parentNode = path.getParentNode();
+
+ if (parentNode.raws && parentNode.raws.selector) {
+ const start = options.locStart(parentNode);
+ const end = start + parentNode.raws.selector.length;
+ return options.originalText.slice(start, end).trim();
+ }
+
+ return node.value;
+ }
+ // postcss-values-parser
+
+ case "value-value":
+ case "value-root":
+ {
+ return path.call(print, "group");
+ }
+
+ case "value-comment":
+ {
+ return concat$9([node.inline ? "//" : "/*", // see replaceQuotesInInlineComments in loc.js
+ // value-* nodes don't have correct location data, so we have to rely on placeholder characters.
+ restoreQuotesInInlineComments$1(node.value), node.inline ? "" : "*/"]);
+ }
+
+ case "value-comma_group":
+ {
+ const parentNode = path.getParentNode();
+ const parentParentNode = path.getParentNode(1);
+ const declAncestorProp = getPropOfDeclNode$1(path);
+ const isGridValue = declAncestorProp && parentNode.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template"));
+ const atRuleAncestorNode = getAncestorNode$1(path, "css-atrule");
+ const isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode$1(atRuleAncestorNode);
+ const printed = path.map(print, "groups");
+ const parts = [];
+ const insideURLFunction = insideValueFunctionNode$1(path, "url");
+ let insideSCSSInterpolationInString = false;
+ let didBreak = false;
+
+ for (let i = 0; i < node.groups.length; ++i) {
+ parts.push(printed[i]);
+ const iPrevNode = node.groups[i - 1];
+ const iNode = node.groups[i];
+ const iNextNode = node.groups[i + 1];
+ const iNextNextNode = node.groups[i + 2];
+
+ if (insideURLFunction) {
+ if (iNextNode && isAdditionNode$1(iNextNode) || isAdditionNode$1(iNode)) {
+ parts.push(" ");
+ }
+
+ continue;
+ } // Ignore after latest node (i.e. before semicolon)
+
+
+ if (!iNextNode) {
+ continue;
+ } // styled.div` background: var(--${one}); `
+
+
+ if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
+ continue;
+ } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
+
+
+ const isStartSCSSInterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{");
+ const isEndingSCSSInterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}");
+
+ if (isStartSCSSInterpolationInString || isEndingSCSSInterpolationInString) {
+ insideSCSSInterpolationInString = !insideSCSSInterpolationInString;
+ continue;
+ }
+
+ if (insideSCSSInterpolationInString) {
+ continue;
+ } // Ignore colon (i.e. `:`)
+
+
+ if (isColonNode$1(iNode) || isColonNode$1(iNextNode)) {
+ continue;
+ } // Ignore `@` in Less (i.e. `@@var;`)
+
+
+ if (iNode.type === "value-atword" && iNode.value === "") {
+ continue;
+ } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`)
+
+
+ if (iNode.value === "~") {
+ continue;
+ } // Ignore escape `\`
+
+
+ if (iNode.value && iNode.value.includes("\\") && iNextNode && iNextNode.type !== "value-comment") {
+ continue;
+ } // Ignore escaped `/`
+
+
+ if (iPrevNode && iPrevNode.value && iPrevNode.value.indexOf("\\") === iPrevNode.value.length - 1 && iNode.type === "value-operator" && iNode.value === "/") {
+ continue;
+ } // Ignore `\` (i.e. `$variable: \@small;`)
+
+
+ if (iNode.value === "\\") {
+ continue;
+ } // Ignore `$$` (i.e. `background-color: $$(style)Color;`)
+
+
+ if (isPostcssSimpleVarNode$1(iNode, iNextNode)) {
+ continue;
+ } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`)
+
+
+ if (isHashNode$1(iNode) || isLeftCurlyBraceNode$1(iNode) || isRightCurlyBraceNode$1(iNextNode) || isLeftCurlyBraceNode$1(iNextNode) && hasEmptyRawBefore$1(iNextNode) || isRightCurlyBraceNode$1(iNode) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`)
+
+
+ if (iNode.value === "--" && isHashNode$1(iNextNode)) {
+ continue;
+ } // Formatting math operations
+
+
+ const isMathOperator = isMathOperatorNode$1(iNode);
+ const isNextMathOperator = isMathOperatorNode$1(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is
+ // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`)
+ // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`)
+
+ if ((isMathOperator && isHashNode$1(iNextNode) || isNextMathOperator && isRightCurlyBraceNode$1(iNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces before and after addition and subtraction math operators as is in `calc` function
+ // due to the fact that it is not valid syntax
+ // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`)
+
+
+ if (insideValueFunctionNode$1(path, "calc") && (isAdditionNode$1(iNode) || isAdditionNode$1(iNextNode) || isSubtractionNode$1(iNode) || isSubtractionNode$1(iNextNode)) && hasEmptyRawBefore$1(iNextNode)) {
+ continue;
+ } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`)
+ // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is.
+
+
+ const isColorAdjusterNode = (isAdditionNode$1(iNode) || isSubtractionNode$1(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode$1(parentParentNode) && !hasEmptyRawBefore$1(iNextNode);
+ const requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode$1(iNextNextNode) || iNode.type === "value-func" || isWordNode$1(iNode);
+ const requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode$1(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode$1(iPrevNode); // Formatting `/`, `+`, `-` sign
+
+ if (!(isMultiplicationNode$1(iNextNode) || isMultiplicationNode$1(iNode)) && !insideValueFunctionNode$1(path, "calc") && !isColorAdjusterNode && (isDivisionNode$1(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode$1(iNode) && !requireSpaceAfterOperator || isAdditionNode$1(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode$1(iNode) && !requireSpaceAfterOperator || isSubtractionNode$1(iNextNode) || isSubtractionNode$1(iNode)) && (hasEmptyRawBefore$1(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode$1(iPrevNode)))) {
+ continue;
+ } // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`)
+
+
+ if (isInlineValueCommentNode$1(iNode)) {
+ parts.push(hardline$7);
+ continue;
+ } // Handle keywords in SCSS control directive
+
+
+ if (isControlDirective && (isEqualityOperatorNode$1(iNextNode) || isRelationalOperatorNode$1(iNextNode) || isIfElseKeywordNode$1(iNextNode) || isEachKeywordNode$1(iNode) || isForKeywordNode$1(iNode))) {
+ parts.push(" ");
+ continue;
+ } // At-rule `namespace` should be in one line
+
+
+ if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") {
+ parts.push(" ");
+ continue;
+ } // Formatting `grid` property
+
+
+ if (isGridValue) {
+ if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) {
+ parts.push(hardline$7);
+ didBreak = true;
+ } else {
+ parts.push(" ");
+ }
+
+ continue;
+ } // Add `space` before next math operation
+ // Note: `grip` property have `/` delimiter and it is not math operation, so
+ // `grid` property handles above
+
+
+ if (isNextMathOperator) {
+ parts.push(" ");
+ continue;
+ } // Be default all values go through `line`
+
+
+ parts.push(line$5);
+ }
+
+ if (didBreak) {
+ parts.unshift(hardline$7);
+ }
+
+ if (isControlDirective) {
+ return group$6(indent$5(concat$9(parts)));
+ } // Indent is not needed for import url when url is very long
+ // and node has two groups
+ // when type is value-comma_group
+ // example @import url("verylongurl") projection,tv
+
+
+ if (insideURLFunctionInImportAtRuleNode$1(path)) {
+ return group$6(fill$4(parts));
+ }
+
+ return group$6(indent$5(fill$4(parts)));
+ }
+
+ case "value-paren_group":
+ {
+ const parentNode = path.getParentNode();
+
+ if (parentNode && isURLFunctionNode$1(parentNode) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
+ return concat$9([node.open ? path.call(print, "open") : "", join$6(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]);
+ }
+
+ if (!node.open) {
+ const printed = path.map(print, "groups");
+ const res = [];
+
+ for (let i = 0; i < printed.length; i++) {
+ if (i !== 0) {
+ res.push(concat$9([",", line$5]));
+ }
+
+ res.push(printed[i]);
+ }
+
+ return group$6(indent$5(fill$4(res)));
+ }
+
+ const isSCSSMapItem = isSCSSMapItemNode$1(path);
+ const lastItem = node.groups[node.groups.length - 1];
+ const isLastItemComment = lastItem && lastItem.type === "value-comment";
+ return group$6(concat$9([node.open ? path.call(print, "open") : "", indent$5(concat$9([softline$3, join$6(concat$9([",", line$5]), path.map(childPath => {
+ const node = childPath.getValue();
+ const printed = print(childPath); // Key/Value pair in open paren already indented
+
+ if (isKeyValuePairNode$1(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") {
+ printed.contents.contents.parts[1] = group$6(printed.contents.contents.parts[1]);
+ return group$6(dedent$2(printed));
+ }
+
+ return printed;
+ }, "groups"))])), ifBreak$2(!isLastItemComment && isSCSS$1(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma$1(options) ? "," : ""), softline$3, node.close ? path.call(print, "close") : ""]), {
+ shouldBreak: isSCSSMapItem
+ });
+ }
+
+ case "value-func":
+ {
+ return concat$9([node.value, insideAtRuleNode$1(path, "supports") && isMediaAndSupportsKeywords$1(node) ? " " : "", path.call(print, "group")]);
+ }
+
+ case "value-paren":
+ {
+ return node.value;
+ }
+
+ case "value-number":
+ {
+ return concat$9([printCssNumber(node.value), maybeToLowerCase$1(node.unit)]);
+ }
+
+ case "value-operator":
+ {
+ return node.value;
+ }
+
+ case "value-word":
+ {
+ if (node.isColor && node.isHex || isWideKeywords$1(node.value)) {
+ return node.value.toLowerCase();
+ }
+
+ return node.value;
+ }
+
+ case "value-colon":
+ {
+ return concat$9([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`)
+ insideValueFunctionNode$1(path, "url") ? "" : line$5]);
+ }
+
+ case "value-comma":
+ {
+ return concat$9([node.value, " "]);
+ }
+
+ case "value-string":
+ {
+ return printString$2(node.raws.quote + node.value + node.raws.quote, options);
+ }
+
+ case "value-atword":
+ {
+ return concat$9(["@", node.value]);
+ }
+
+ case "value-unicode-range":
+ {
+ return node.value;
+ }
+
+ case "value-unknown":
+ {
+ return node.value;
+ }
+
+ default:
+ /* istanbul ignore next */
+ throw new Error(`Unknown postcss type ${JSON.stringify(node.type)}`);
+ }
+}
+
+function printNodeSequence(path, options, print) {
+ const node = path.getValue();
+ const parts = [];
+ let i = 0;
+ path.map(pathChild => {
+ const prevNode = node.nodes[i - 1];
+
+ if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") {
+ const childNode = pathChild.getValue();
+ parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode)));
+ } else {
+ parts.push(pathChild.call(print));
+ }
+
+ if (i !== node.nodes.length - 1) {
+ if (node.nodes[i + 1].type === "css-comment" && !hasNewline$5(options.originalText, options.locStart(node.nodes[i + 1]), {
+ backwards: true
+ }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") {
+ parts.push(" ");
+ } else {
+ parts.push(options.__isHTMLStyleAttribute ? line$5 : hardline$7);
+
+ if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options.locEnd) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") {
+ parts.push(hardline$7);
+ }
+ }
+ }
+
+ i++;
+ }, "nodes");
+ return concat$9(parts);
+}
+
+const STRING_REGEX$3 = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g;
+const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g;
+const STANDARD_UNIT_REGEX = /[a-zA-Z]+/g;
+const WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g;
+const ADJUST_NUMBERS_REGEX = new RegExp(STRING_REGEX$3.source + "|" + `(${WORD_PART_REGEX.source})?` + `(${NUMBER_REGEX.source})` + `(${STANDARD_UNIT_REGEX.source})?`, "g");
+
+function adjustStrings(value, options) {
+ return value.replace(STRING_REGEX$3, match => printString$2(match, options));
+}
+
+function quoteAttributeValue(value, options) {
+ const quote = options.singleQuote ? "'" : '"';
+ return value.includes('"') || value.includes("'") ? value : quote + value + quote;
+}
+
+function adjustNumbers(value) {
+ return value.replace(ADJUST_NUMBERS_REGEX, (match, quote, wordPart, number, unit) => !wordPart && number ? printCssNumber(number) + maybeToLowerCase$1(unit || "") : match);
+}
+
+function printCssNumber(rawNumber) {
+ return printNumber$2(rawNumber) // Remove trailing `.0`.
+ .replace(/\.0(?=$|e)/, "");
+}
+
+var printerPostcss = {
+ print: genericPrint$2,
+ embed: embed_1$1,
+ insertPragma: insertPragma$3,
+ hasPrettierIgnore: hasIgnoreComment$3,
+ massageAstNode: clean_1$1
+};
+
+var options$3 = {
+ singleQuote: commonOptions.singleQuote
+};
+
+var name$9 = "CSS";
+var type$7 = "markup";
+var tmScope$7 = "source.css";
+var aceMode$7 = "css";
+var codemirrorMode$7 = "css";
+var codemirrorMimeType$7 = "text/css";
+var color$2 = "#563d7c";
+var extensions$7 = [
+ ".css"
+];
+var languageId$7 = 50;
+var CSS = {
+ name: name$9,
+ type: type$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ color: color$2,
+ extensions: extensions$7,
+ languageId: languageId$7
+};
+
+var CSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$9,
+ type: type$7,
+ tmScope: tmScope$7,
+ aceMode: aceMode$7,
+ codemirrorMode: codemirrorMode$7,
+ codemirrorMimeType: codemirrorMimeType$7,
+ color: color$2,
+ extensions: extensions$7,
+ languageId: languageId$7,
+ 'default': CSS
+});
+
+var name$a = "PostCSS";
+var type$8 = "markup";
+var tmScope$8 = "source.postcss";
+var group$7 = "CSS";
+var extensions$8 = [
+ ".pcss",
+ ".postcss"
+];
+var aceMode$8 = "text";
+var languageId$8 = 262764437;
+var PostCSS = {
+ name: name$a,
+ type: type$8,
+ tmScope: tmScope$8,
+ group: group$7,
+ extensions: extensions$8,
+ aceMode: aceMode$8,
+ languageId: languageId$8
+};
+
+var PostCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$a,
+ type: type$8,
+ tmScope: tmScope$8,
+ group: group$7,
+ extensions: extensions$8,
+ aceMode: aceMode$8,
+ languageId: languageId$8,
+ 'default': PostCSS
+});
+
+var name$b = "Less";
+var type$9 = "markup";
+var group$8 = "CSS";
+var extensions$9 = [
+ ".less"
+];
+var tmScope$9 = "source.css.less";
+var aceMode$9 = "less";
+var codemirrorMode$8 = "css";
+var codemirrorMimeType$8 = "text/css";
+var languageId$9 = 198;
+var Less = {
+ name: name$b,
+ type: type$9,
+ group: group$8,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ languageId: languageId$9
+};
+
+var Less$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$b,
+ type: type$9,
+ group: group$8,
+ extensions: extensions$9,
+ tmScope: tmScope$9,
+ aceMode: aceMode$9,
+ codemirrorMode: codemirrorMode$8,
+ codemirrorMimeType: codemirrorMimeType$8,
+ languageId: languageId$9,
+ 'default': Less
+});
+
+var name$c = "SCSS";
+var type$a = "markup";
+var tmScope$a = "source.css.scss";
+var group$9 = "CSS";
+var aceMode$a = "scss";
+var codemirrorMode$9 = "css";
+var codemirrorMimeType$9 = "text/x-scss";
+var extensions$a = [
+ ".scss"
+];
+var languageId$a = 329;
+var SCSS = {
+ name: name$c,
+ type: type$a,
+ tmScope: tmScope$a,
+ group: group$9,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ extensions: extensions$a,
+ languageId: languageId$a
+};
+
+var SCSS$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$c,
+ type: type$a,
+ tmScope: tmScope$a,
+ group: group$9,
+ aceMode: aceMode$a,
+ codemirrorMode: codemirrorMode$9,
+ codemirrorMimeType: codemirrorMimeType$9,
+ extensions: extensions$a,
+ languageId: languageId$a,
+ 'default': SCSS
+});
+
+var require$$0$2 = getCjsExportFromNamespace(CSS$1);
+
+var require$$1$1 = getCjsExportFromNamespace(PostCSS$1);
+
+var require$$2$1 = getCjsExportFromNamespace(Less$1);
+
+var require$$3$1 = getCjsExportFromNamespace(SCSS$1);
+
+const languages$1 = [createLanguage(require$$0$2, () => ({
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["css"]
+})), createLanguage(require$$1$1, () => ({
+ since: "1.4.0",
+ parsers: ["css"],
+ vscodeLanguageIds: ["postcss"]
+})), createLanguage(require$$2$1, () => ({
+ since: "1.4.0",
+ parsers: ["less"],
+ vscodeLanguageIds: ["less"]
+})), createLanguage(require$$3$1, () => ({
+ since: "1.4.0",
+ parsers: ["scss"],
+ vscodeLanguageIds: ["scss"]
+}))];
+const printers$1 = {
+ postcss: printerPostcss
+};
+var languageCss = {
+ languages: languages$1,
+ options: options$3,
+ printers: printers$1
+};
+
+var clean$3 = function (ast, newNode) {
+ delete newNode.loc;
+ delete newNode.selfClosing; // (Glimmer/HTML) ignore TextNode whitespace
+
+ if (ast.type === "TextNode") {
+ const trimmed = ast.chars.trim();
+
+ if (!trimmed) {
+ return null;
+ }
+
+ newNode.chars = trimmed;
+ }
+};
+
+function isUppercase(string) {
+ return string.toUpperCase() === string;
+}
+
+function isGlimmerComponent(node) {
+ return isNodeOfSomeType(node, ["ElementNode"]) && typeof node.tag === "string" && (isUppercase(node.tag[0]) || node.tag.includes("."));
+}
+
+function isWhitespaceNode(node) {
+ return isNodeOfSomeType(node, ["TextNode"]) && !/\S/.test(node.chars);
+}
+
+function isNodeOfSomeType(node, types) {
+ return node && types.some(type => node.type === type);
+}
+
+function isParentOfSomeType(path, types) {
+ const parentNode = path.getParentNode(0);
+ return isNodeOfSomeType(parentNode, types);
+}
+
+function isPreviousNodeOfSomeType(path, types) {
+ const previousNode = getPreviousNode(path);
+ return isNodeOfSomeType(previousNode, types);
+}
+
+function isNextNodeOfSomeType(path, types) {
+ const nextNode = getNextNode(path);
+ return isNodeOfSomeType(nextNode, types);
+}
+
+function getSiblingNode(path, offset) {
+ const node = path.getValue();
+ const parentNode = path.getParentNode(0) || {};
+ const children = parentNode.children || parentNode.body || [];
+ const index = children.indexOf(node);
+ return index !== -1 && children[index + offset];
+}
+
+function getPreviousNode(path, lookBack = 1) {
+ return getSiblingNode(path, -lookBack);
+}
+
+function getNextNode(path) {
+ return getSiblingNode(path, 1);
+}
+
+function isPrettierIgnoreNode(node) {
+ return isNodeOfSomeType(node, ["MustacheCommentStatement"]) && typeof node.value === "string" && node.value.trim() === "prettier-ignore";
+}
+
+function hasPrettierIgnore$2(path) {
+ const node = path.getValue();
+ const previousPreviousNode = getPreviousNode(path, 2);
+ return isPrettierIgnoreNode(node) || isPrettierIgnoreNode(previousPreviousNode);
+}
+
+var utils$8 = {
+ getNextNode,
+ getPreviousNode,
+ hasPrettierIgnore: hasPrettierIgnore$2,
+ isGlimmerComponent,
+ isNextNodeOfSomeType,
+ isNodeOfSomeType,
+ isParentOfSomeType,
+ isPreviousNodeOfSomeType,
+ isWhitespaceNode
+};
+
+const {
+ concat: concat$a,
+ join: join$7,
+ softline: softline$4,
+ hardline: hardline$8,
+ line: line$6,
+ group: group$a,
+ indent: indent$6,
+ ifBreak: ifBreak$3
+} = document.builders;
+const {
+ getNextNode: getNextNode$1,
+ getPreviousNode: getPreviousNode$1,
+ hasPrettierIgnore: hasPrettierIgnore$3,
+ isGlimmerComponent: isGlimmerComponent$1,
+ isNextNodeOfSomeType: isNextNodeOfSomeType$1,
+ isParentOfSomeType: isParentOfSomeType$1,
+ isPreviousNodeOfSomeType: isPreviousNodeOfSomeType$1,
+ isWhitespaceNode: isWhitespaceNode$1
+} = utils$8; // http://w3c.github.io/html/single-page.html#void-elements
+
+const voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter:
+// https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts
+
+function print(path, options, print) {
+ const n = path.getValue();
+ /* istanbul ignore if*/
+
+ if (!n) {
+ return "";
+ }
+
+ if (hasPrettierIgnore$3(path)) {
+ const startOffset = locationToOffset(options.originalText, n.loc.start.line - 1, n.loc.start.column);
+ const endOffset = locationToOffset(options.originalText, n.loc.end.line - 1, n.loc.end.column);
+ const ignoredText = options.originalText.slice(startOffset, endOffset);
+ return ignoredText;
+ }
+
+ switch (n.type) {
+ case "Block":
+ case "Program":
+ case "Template":
+ {
+ return group$a(concat$a(path.map(print, "body")));
+ }
+
+ case "ElementNode":
+ {
+ const hasChildren = n.children.length > 0;
+ const hasNonWhitespaceChildren = n.children.some(n => !isWhitespaceNode$1(n));
+ const isVoid = isGlimmerComponent$1(n) && (!hasChildren || !hasNonWhitespaceChildren) || voidTags.includes(n.tag);
+ const closeTagForNoBreak = isVoid ? concat$a([" />", softline$4]) : ">";
+ const closeTagForBreak = isVoid ? "/>" : ">";
+
+ const printParams = (path, print) => indent$6(concat$a([n.attributes.length ? line$6 : "", join$7(line$6, path.map(print, "attributes")), n.modifiers.length ? line$6 : "", join$7(line$6, path.map(print, "modifiers")), n.comments.length ? line$6 : "", join$7(line$6, path.map(print, "comments"))]));
+
+ const nextNode = getNextNode$1(path);
+ return concat$a([group$a(concat$a(["<", n.tag, printParams(path, print), n.blockParams.length ? ` as |${n.blockParams.join(" ")}|` : "", ifBreak$3(softline$4, ""), ifBreak$3(closeTagForBreak, closeTagForNoBreak)])), !isVoid ? group$a(concat$a([hasNonWhitespaceChildren ? indent$6(printChildren(path, options, print)) : "", ifBreak$3(hasChildren ? hardline$8 : "", ""), concat$a(["", n.tag, ">"])])) : "", nextNode && nextNode.type === "ElementNode" ? hardline$8 : ""]);
+ }
+
+ case "BlockStatement":
+ {
+ const pp = path.getParentNode(1);
+ const isElseIf = pp && pp.inverse && pp.inverse.body.length === 1 && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if";
+ const hasElseIf = n.inverse && n.inverse.body.length === 1 && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if";
+ const indentElse = hasElseIf ? a => a : indent$6;
+ const inverseElseStatement = (n.inverseStrip.open ? "{{~" : "{{") + "else" + (n.inverseStrip.close ? "~}}" : "}}");
+
+ if (n.inverse) {
+ return concat$a([isElseIf ? concat$a([n.openStrip.open ? "{{~else " : "{{else ", printPathParams(path, print), n.openStrip.close ? "~}}" : "}}"]) : printOpenBlock(path, print, n.openStrip), indent$6(concat$a([hardline$8, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$a([hardline$8, inverseElseStatement]) : "", n.inverse ? indentElse(concat$a([hardline$8, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$a([hardline$8, printCloseBlock(path, print, n.closeStrip)])]);
+ } else if (isElseIf) {
+ return concat$a([concat$a([n.openStrip.open ? "{{~else" : "{{else ", printPathParams(path, print), n.openStrip.close ? "~}}" : "}}"]), indent$6(concat$a([hardline$8, path.call(print, "program")]))]);
+ }
+
+ const hasNonWhitespaceChildren = n.program.body.some(n => !isWhitespaceNode$1(n));
+ return concat$a([printOpenBlock(path, print, n.openStrip), group$a(concat$a([indent$6(concat$a([softline$4, path.call(print, "program")])), hasNonWhitespaceChildren ? hardline$8 : softline$4, printCloseBlock(path, print, n.closeStrip)]))]);
+ }
+
+ case "ElementModifierStatement":
+ {
+ return group$a(concat$a(["{{", printPathParams(path, print), softline$4, "}}"]));
+ }
+
+ case "MustacheStatement":
+ {
+ const isEscaped = n.escaped === false;
+ const {
+ open: openStrip,
+ close: closeStrip
+ } = n.strip;
+ const opening = (isEscaped ? "{{{" : "{{") + (openStrip ? "~" : "");
+ const closing = (closeStrip ? "~" : "") + (isEscaped ? "}}}" : "}}");
+ const leading = isParentOfSomeType$1(path, ["AttrNode", "ConcatStatement", "ElementNode"]) ? [opening, indent$6(softline$4)] : [opening];
+ return group$a(concat$a([...leading, printPathParams(path, print), softline$4, closing]));
+ }
+
+ case "SubExpression":
+ {
+ const params = printParams(path, print);
+ const printedParams = params.length > 0 ? indent$6(concat$a([line$6, group$a(join$7(line$6, params))])) : "";
+ return group$a(concat$a(["(", printPath(path, print), printedParams, softline$4, ")"]));
+ }
+
+ case "AttrNode":
+ {
+ const isText = n.value.type === "TextNode";
+ const isEmptyText = isText && n.value.chars === ""; // If the text is empty and the value's loc start and end columns are the
+ // same, there is no value for this AttrNode and it should be printed
+ // without the `=""`. Example: `
` -> `
`
+
+ const isEmptyValue = isEmptyText && n.value.loc.start.column === n.value.loc.end.column;
+
+ if (isEmptyValue) {
+ return concat$a([n.name]);
+ }
+
+ const value = path.call(print, "value");
+ const quotedValue = isText ? printStringLiteral(value.parts.join(), options) : value;
+ return concat$a([n.name, "=", quotedValue]);
+ }
+
+ case "ConcatStatement":
+ {
+ return concat$a(['"', concat$a(path.map(partPath => print(partPath), "parts").filter(a => a !== "")), '"']);
+ }
+
+ case "Hash":
+ {
+ return concat$a([join$7(line$6, path.map(print, "pairs"))]);
+ }
+
+ case "HashPair":
+ {
+ return concat$a([n.key, "=", path.call(print, "value")]);
+ }
+
+ case "TextNode":
+ {
+ const maxLineBreaksToPreserve = 2;
+ const isFirstElement = !getPreviousNode$1(path);
+ const isLastElement = !getNextNode$1(path);
+ const isWhitespaceOnly = !/\S/.test(n.chars);
+ const lineBreaksCount = countNewLines(n.chars);
+ const hasBlockParent = path.getParentNode(0).type === "Block";
+ const hasElementParent = path.getParentNode(0).type === "ElementNode";
+ const hasTemplateParent = path.getParentNode(0).type === "Template";
+ let leadingLineBreaksCount = countLeadingNewLines(n.chars);
+ let trailingLineBreaksCount = countTrailingNewLines(n.chars);
+
+ if ((isFirstElement || isLastElement) && isWhitespaceOnly && (hasBlockParent || hasElementParent || hasTemplateParent)) {
+ return "";
+ }
+
+ if (isWhitespaceOnly && lineBreaksCount) {
+ leadingLineBreaksCount = Math.min(lineBreaksCount, maxLineBreaksToPreserve);
+ trailingLineBreaksCount = 0;
+ } else {
+ if (isNextNodeOfSomeType$1(path, ["BlockStatement", "ElementNode"])) {
+ trailingLineBreaksCount = Math.max(trailingLineBreaksCount, 1);
+ }
+
+ if (isPreviousNodeOfSomeType$1(path, ["ElementNode"]) || isPreviousNodeOfSomeType$1(path, ["BlockStatement"])) {
+ leadingLineBreaksCount = Math.max(leadingLineBreaksCount, 1);
+ }
+ }
+
+ let leadingSpace = "";
+ let trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present,
+ // when next to mustache statement.
+
+ const inAttrNode = path.stack.includes("attributes");
+
+ if (inAttrNode) {
+ const parentNode = path.getParentNode(0);
+ const isConcat = parentNode.type === "ConcatStatement";
+
+ if (isConcat) {
+ const {
+ parts
+ } = parentNode;
+ const partIndex = parts.indexOf(n);
+
+ if (partIndex > 0) {
+ const partType = parts[partIndex - 1].type;
+ const isMustache = partType === "MustacheStatement";
+
+ if (isMustache) {
+ leadingSpace = " ";
+ }
+ }
+
+ if (partIndex < parts.length - 1) {
+ const partType = parts[partIndex + 1].type;
+ const isMustache = partType === "MustacheStatement";
+
+ if (isMustache) {
+ trailingSpace = " ";
+ }
+ }
+ }
+ } else {
+ if (trailingLineBreaksCount === 0 && isNextNodeOfSomeType$1(path, ["MustacheStatement"])) {
+ trailingSpace = " ";
+ }
+
+ if (leadingLineBreaksCount === 0 && isPreviousNodeOfSomeType$1(path, ["MustacheStatement"])) {
+ leadingSpace = " ";
+ }
+
+ if (isFirstElement) {
+ leadingLineBreaksCount = 0;
+ leadingSpace = "";
+ }
+
+ if (isLastElement) {
+ trailingLineBreaksCount = 0;
+ trailingSpace = "";
+ }
+ }
+
+ return concat$a([...generateHardlines(leadingLineBreaksCount, maxLineBreaksToPreserve), n.chars.replace(/^[\s ]+/g, leadingSpace).replace(/[\s ]+$/, trailingSpace), ...generateHardlines(trailingLineBreaksCount, maxLineBreaksToPreserve)].filter(Boolean));
+ }
+
+ case "MustacheCommentStatement":
+ {
+ const dashes = n.value.includes("}}") ? "--" : "";
+ return concat$a(["{{!", dashes, n.value, dashes, "}}"]);
+ }
+
+ case "PathExpression":
+ {
+ return n.original;
+ }
+
+ case "BooleanLiteral":
+ {
+ return String(n.value);
+ }
+
+ case "CommentStatement":
+ {
+ return concat$a([""]);
+ }
+
+ case "StringLiteral":
+ {
+ return printStringLiteral(n.value, options);
+ }
+
+ case "NumberLiteral":
+ {
+ return String(n.value);
+ }
+
+ case "UndefinedLiteral":
+ {
+ return "undefined";
+ }
+
+ case "NullLiteral":
+ {
+ return "null";
+ }
+
+ /* istanbul ignore next */
+
+ default:
+ throw new Error("unknown glimmer type: " + JSON.stringify(n.type));
+ }
+}
+
+function printChildren(path, options, print) {
+ return concat$a(path.map((childPath, childIndex) => {
+ const childNode = path.getValue();
+ const isFirstNode = childIndex === 0;
+ const isLastNode = childIndex === path.getParentNode(0).children.length - 1;
+ const isLastNodeInMultiNodeList = isLastNode && !isFirstNode;
+ const isWhitespace = isWhitespaceNode$1(childNode);
+
+ if (isWhitespace && isLastNodeInMultiNodeList) {
+ return print(childPath, options, print);
+ } else if (isFirstNode) {
+ return concat$a([softline$4, print(childPath, options, print)]);
+ }
+
+ return print(childPath, options, print);
+ }, "children"));
+}
+/**
+ * Prints a string literal with the correct surrounding quotes based on
+ * `options.singleQuote` and the number of escaped quotes contained in
+ * the string literal. This function is the glimmer equivalent of `printString`
+ * in `common/util`, but has differences because of the way escaped characters
+ * are treated in hbs string literals.
+ * @param {string} stringLiteral - the string literal value
+ * @param {object} options - the prettier options object
+ */
+
+
+function printStringLiteral(stringLiteral, options) {
+ const double = {
+ quote: '"',
+ regex: /"/g
+ };
+ const single = {
+ quote: "'",
+ regex: /'/g
+ };
+ const preferred = options.singleQuote ? single : double;
+ const alternate = preferred === single ? double : single;
+ let shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for
+ // enclosing the string, we might want to enclose with the alternate quote
+ // instead, to minimize the number of escaped quotes.
+
+ if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) {
+ const numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length;
+ const numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length;
+ shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes;
+ }
+
+ const enclosingQuote = shouldUseAlternateQuote ? alternate : preferred;
+ const escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, `\\${enclosingQuote.quote}`);
+ return concat$a([enclosingQuote.quote, escapedStringLiteral, enclosingQuote.quote]);
+}
+
+function printPath(path, print) {
+ return path.call(print, "path");
+}
+
+function printParams(path, print) {
+ const node = path.getValue();
+ let parts = [];
+
+ if (node.params.length > 0) {
+ parts = parts.concat(path.map(print, "params"));
+ }
+
+ if (node.hash && node.hash.pairs.length > 0) {
+ parts.push(path.call(print, "hash"));
+ }
+
+ return parts;
+}
+
+function printPathParams(path, print) {
+ const printedPath = printPath(path, print);
+ const printedParams = printParams(path, print);
+ const parts = [printedPath, ...printedParams];
+ return indent$6(group$a(join$7(line$6, parts)));
+}
+
+function printBlockParams(path) {
+ const block = path.getValue();
+
+ if (!block.program || !block.program.blockParams.length) {
+ return "";
+ }
+
+ return concat$a([" as |", block.program.blockParams.join(" "), "|"]);
+}
+
+function printOpenBlock(path, print, {
+ open: isOpenStrip = false,
+ close: isCloseStrip = false
+} = {}) {
+ return group$a(concat$a([isOpenStrip ? "{{~#" : "{{#", printPathParams(path, print), printBlockParams(path), softline$4, isCloseStrip ? "~}}" : "}}"]));
+}
+
+function printCloseBlock(path, print, {
+ open: isOpenStrip = false,
+ close: isCloseStrip = false
+} = {}) {
+ return concat$a([isOpenStrip ? "{{~/" : "{{/", path.call(print, "path"), isCloseStrip ? "~}}" : "}}"]);
+}
+
+function countNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ return string.split("\n").length - 1;
+}
+
+function countLeadingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ const newLines = (string.match(/^([^\S\r\n]*[\r\n])+/g) || [])[0] || "";
+ return countNewLines(newLines);
+}
+
+function countTrailingNewLines(string) {
+ /* istanbul ignore next */
+ string = typeof string === "string" ? string : "";
+ const newLines = (string.match(/([\r\n][^\S\r\n]*)+$/g) || [])[0] || "";
+ return countNewLines(newLines);
+}
+
+function generateHardlines(number = 0, max = 0) {
+ return new Array(Math.min(number, max)).fill(hardline$8);
+}
+/* istanbul ignore next
+ https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/compiler/lib/location.ts#L5-L29
+*/
+
+
+function locationToOffset(source, line, column) {
+ let seenLines = 0;
+ let seenChars = 0; // eslint-disable-next-line no-constant-condition
+
+ while (true) {
+ if (seenChars === source.length) {
+ return null;
+ }
+
+ let nextLine = source.indexOf("\n", seenChars);
+
+ if (nextLine === -1) {
+ nextLine = source.length;
+ }
+
+ if (seenLines === line) {
+ if (seenChars + column > nextLine) {
+ return null;
+ }
+
+ return seenChars + column;
+ } else if (nextLine === -1) {
+ return null;
+ }
+
+ seenLines += 1;
+ seenChars = nextLine + 1;
+ }
+}
+
+var printerGlimmer = {
+ print,
+ massageAstNode: clean$3
+};
+
+var name$d = "Handlebars";
+var type$b = "markup";
+var group$b = "HTML";
+var aliases$3 = [
+ "hbs",
+ "htmlbars"
+];
+var extensions$b = [
+ ".handlebars",
+ ".hbs"
+];
+var tmScope$b = "text.html.handlebars";
+var aceMode$b = "handlebars";
+var languageId$b = 155;
+var Handlebars = {
+ name: name$d,
+ type: type$b,
+ group: group$b,
+ aliases: aliases$3,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ languageId: languageId$b
+};
+
+var Handlebars$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$d,
+ type: type$b,
+ group: group$b,
+ aliases: aliases$3,
+ extensions: extensions$b,
+ tmScope: tmScope$b,
+ aceMode: aceMode$b,
+ languageId: languageId$b,
+ 'default': Handlebars
+});
+
+var require$$0$3 = getCjsExportFromNamespace(Handlebars$1);
+
+const languages$2 = [createLanguage(require$$0$3, () => ({
+ since: null,
+ // unreleased
+ parsers: ["glimmer"],
+ vscodeLanguageIds: ["handlebars"]
+}))];
+const printers$2 = {
+ glimmer: printerGlimmer
+};
+var languageHandlebars = {
+ languages: languages$2,
+ printers: printers$2
+};
+
+function hasPragma$2(text) {
+ return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text);
+}
+
+function insertPragma$4(text) {
+ return "# @format\n\n" + text;
+}
+
+var pragma$2 = {
+ hasPragma: hasPragma$2,
+ insertPragma: insertPragma$4
+};
+
+const {
+ concat: concat$b,
+ join: join$8,
+ hardline: hardline$9,
+ line: line$7,
+ softline: softline$5,
+ group: group$c,
+ indent: indent$7,
+ ifBreak: ifBreak$4
+} = document.builders;
+const {
+ hasIgnoreComment: hasIgnoreComment$4
+} = util$1;
+const {
+ isNextLineEmpty: isNextLineEmpty$4
+} = utilShared;
+const {
+ insertPragma: insertPragma$5
+} = pragma$2;
+
+function genericPrint$3(path, options, print) {
+ const n = path.getValue();
+
+ if (!n) {
+ return "";
+ }
+
+ if (typeof n === "string") {
+ return n;
+ }
+
+ switch (n.kind) {
+ case "Document":
+ {
+ const parts = [];
+ path.map((pathChild, index) => {
+ parts.push(concat$b([pathChild.call(print)]));
+
+ if (index !== n.definitions.length - 1) {
+ parts.push(hardline$9);
+
+ if (isNextLineEmpty$4(options.originalText, pathChild.getValue(), options.locEnd)) {
+ parts.push(hardline$9);
+ }
+ }
+ }, "definitions");
+ return concat$b([concat$b(parts), hardline$9]);
+ }
+
+ case "OperationDefinition":
+ {
+ const hasOperation = options.originalText[options.locStart(n)] !== "{";
+ const hasName = !!n.name;
+ return concat$b([hasOperation ? n.operation : "", hasOperation && hasName ? concat$b([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]);
+ }
+
+ case "FragmentDefinition":
+ {
+ return concat$b(["fragment ", path.call(print, "name"), n.variableDefinitions && n.variableDefinitions.length ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "variableDefinitions"))])), softline$5, ")"])) : "", " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
+
+ case "SelectionSet":
+ {
+ return concat$b(["{", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(selectionsPath => printSequence(selectionsPath, options, print), "selections"))])), hardline$9, "}"]);
+ }
+
+ case "Field":
+ {
+ return group$c(concat$b([n.alias ? concat$b([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")]));
+ }
+
+ case "Name":
+ {
+ return n.value;
+ }
+
+ case "StringValue":
+ {
+ if (n.block) {
+ return concat$b(['"""', hardline$9, join$8(hardline$9, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$9, '"""']);
+ }
+
+ return concat$b(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']);
+ }
+
+ case "IntValue":
+ case "FloatValue":
+ case "EnumValue":
+ {
+ return n.value;
+ }
+
+ case "BooleanValue":
+ {
+ return n.value ? "true" : "false";
+ }
+
+ case "NullValue":
+ {
+ return "null";
+ }
+
+ case "Variable":
+ {
+ return concat$b(["$", path.call(print, "name")]);
+ }
+
+ case "ListValue":
+ {
+ return group$c(concat$b(["[", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "values"))])), softline$5, "]"]));
+ }
+
+ case "ObjectValue":
+ {
+ return group$c(concat$b(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.map(print, "fields"))])), softline$5, ifBreak$4("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"]));
+ }
+
+ case "ObjectField":
+ case "Argument":
+ {
+ return concat$b([path.call(print, "name"), ": ", path.call(print, "value")]);
+ }
+
+ case "Directive":
+ {
+ return concat$b(["@", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : ""]);
+ }
+
+ case "NamedType":
+ {
+ return path.call(print, "name");
+ }
+
+ case "VariableDefinition":
+ {
+ return concat$b([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$b([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
+
+ case "TypeExtensionDefinition":
+ {
+ return concat$b(["extend ", path.call(print, "definition")]);
+ }
+
+ case "ObjectTypeExtension":
+ case "ObjectTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$b([" implements ", concat$b(printInterfaces(path, options, print))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "FieldDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]);
+ }
+
+ case "DirectiveDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$c(concat$b(["(", indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", ", "), softline$5]), path.call(argsPath => printSequence(argsPath, options, print), "arguments"))])), softline$5, ")"])) : "", n.repeatable ? " repeatable" : "", concat$b([" on ", join$8(" | ", path.map(print, "locations"))])]);
+ }
+
+ case "EnumTypeExtension":
+ case "EnumTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(valuesPath => printSequence(valuesPath, options, print), "values"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "EnumValueDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "InputValueDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? n.description.block ? hardline$9 : line$7 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$b([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]);
+ }
+
+ case "InputObjectTypeExtension":
+ case "InputObjectTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "SchemaDefinition":
+ {
+ return concat$b(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(opsPath => printSequence(opsPath, options, print), "operationTypes"))])) : "", hardline$9, "}"]);
+ }
+
+ case "OperationTypeDefinition":
+ {
+ return concat$b([path.call(print, "operation"), ": ", path.call(print, "type")]);
+ }
+
+ case "InterfaceTypeExtension":
+ case "InterfaceTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$b([" {", indent$7(concat$b([hardline$9, join$8(hardline$9, path.call(fieldsPath => printSequence(fieldsPath, options, print), "fields"))])), hardline$9, "}"]) : ""]);
+ }
+
+ case "FragmentSpread":
+ {
+ return concat$b(["...", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "InlineFragment":
+ {
+ return concat$b(["...", n.typeCondition ? concat$b([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]);
+ }
+
+ case "UnionTypeExtension":
+ case "UnionTypeDefinition":
+ {
+ return group$c(concat$b([path.call(print, "description"), n.description ? hardline$9 : "", group$c(concat$b([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$b([" =", ifBreak$4("", " "), indent$7(concat$b([ifBreak$4(concat$b([line$7, " "])), join$8(concat$b([line$7, "| "]), path.map(print, "types"))]))]) : ""]))]));
+ }
+
+ case "ScalarTypeExtension":
+ case "ScalarTypeDefinition":
+ {
+ return concat$b([path.call(print, "description"), n.description ? hardline$9 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]);
+ }
+
+ case "NonNullType":
+ {
+ return concat$b([path.call(print, "type"), "!"]);
+ }
+
+ case "ListType":
+ {
+ return concat$b(["[", path.call(print, "type"), "]"]);
+ }
+
+ default:
+ /* istanbul ignore next */
+ throw new Error("unknown graphql type: " + JSON.stringify(n.kind));
+ }
+}
+
+function printDirectives(path, print, n) {
+ if (n.directives.length === 0) {
+ return "";
+ }
+
+ return concat$b([" ", group$c(indent$7(concat$b([softline$5, join$8(concat$b([ifBreak$4("", " "), softline$5]), path.map(print, "directives"))])))]);
+}
+
+function printSequence(sequencePath, options, print) {
+ const count = sequencePath.getValue().length;
+ return sequencePath.map((path, i) => {
+ const printed = print(path);
+
+ if (isNextLineEmpty$4(options.originalText, path.getValue(), options.locEnd) && i < count - 1) {
+ return concat$b([printed, hardline$9]);
+ }
+
+ return printed;
+ });
+}
+
+function canAttachComment$1(node) {
+ return node.kind && node.kind !== "Comment";
+}
+
+function printComment$2(commentPath) {
+ const comment = commentPath.getValue();
+
+ if (comment.kind === "Comment") {
+ return "#" + comment.value.trimEnd();
+ }
+
+ throw new Error("Not a comment: " + JSON.stringify(comment));
+}
+
+function determineInterfaceSeparatorBetween(first, second, options) {
+ const textBetween = options.originalText.slice(first.loc.end, second.loc.start).replace(/#.*/g, "").trim();
+ return textBetween === "," ? ", " : " & ";
+}
+
+function printInterfaces(path, options, print) {
+ const node = path.getNode();
+ const parts = [];
+ const {
+ interfaces
+ } = node;
+ const printed = path.map(node => print(node), "interfaces");
+
+ for (let index = 0; index < interfaces.length; index++) {
+ const interfaceNode = interfaces[index];
+
+ if (index > 0) {
+ parts.push(determineInterfaceSeparatorBetween(interfaces[index - 1], interfaceNode, options));
+ }
+
+ parts.push(printed[index]);
+ }
+
+ return parts;
+}
+
+function clean$4(node, newNode
+/*, parent*/
+) {
+ delete newNode.loc;
+ delete newNode.comments;
+}
+
+var printerGraphql = {
+ print: genericPrint$3,
+ massageAstNode: clean$4,
+ hasPrettierIgnore: hasIgnoreComment$4,
+ insertPragma: insertPragma$5,
+ printComment: printComment$2,
+ canAttachComment: canAttachComment$1
+};
+
+var options$4 = {
+ bracketSpacing: commonOptions.bracketSpacing
+};
+
+var name$e = "GraphQL";
+var type$c = "data";
+var extensions$c = [
+ ".graphql",
+ ".gql",
+ ".graphqls"
+];
+var tmScope$c = "source.graphql";
+var aceMode$c = "text";
+var languageId$c = 139;
+var GraphQL = {
+ name: name$e,
+ type: type$c,
+ extensions: extensions$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ languageId: languageId$c
+};
+
+var GraphQL$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$e,
+ type: type$c,
+ extensions: extensions$c,
+ tmScope: tmScope$c,
+ aceMode: aceMode$c,
+ languageId: languageId$c,
+ 'default': GraphQL
+});
+
+var require$$0$4 = getCjsExportFromNamespace(GraphQL$1);
+
+const languages$3 = [createLanguage(require$$0$4, () => ({
+ since: "1.5.0",
+ parsers: ["graphql"],
+ vscodeLanguageIds: ["graphql"]
+}))];
+const printers$3 = {
+ graphql: printerGraphql
+};
+var languageGraphql = {
+ languages: languages$3,
+ options: options$4,
+ printers: printers$3
+};
+
+var json = {
+ "cjkPattern": "[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\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]",
+ "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]"
+};
+
+const {
+ cjkPattern,
+ kPattern,
+ punctuationPattern
+} = json;
+const {
+ getLast: getLast$4
+} = util$1;
+const INLINE_NODE_TYPES = ["liquidNode", "inlineCode", "emphasis", "strong", "delete", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"];
+const INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat(["tableCell", "paragraph", "heading"]);
+const kRegex = new RegExp(kPattern);
+const punctuationRegex = new RegExp(punctuationPattern);
+/**
+ * split text into whitespaces and words
+ * @param {string} text
+ * @return {Array<{ type: "whitespace", value: " " | "\n" | "" } | { type: "word", value: string }>}
+ */
+
+function splitText(text, options) {
+ const KIND_NON_CJK = "non-cjk";
+ const KIND_CJ_LETTER = "cj-letter";
+ const KIND_K_LETTER = "k-letter";
+ const KIND_CJK_PUNCTUATION = "cjk-punctuation";
+ const nodes = [];
+ (options.proseWrap === "preserve" ? text : text.replace(new RegExp(`(${cjkPattern})\n(${cjkPattern})`, "g"), "$1$2")).split(/([ \t\n]+)/).forEach((token, index, tokens) => {
+ // whitespace
+ if (index % 2 === 1) {
+ nodes.push({
+ type: "whitespace",
+ value: /\n/.test(token) ? "\n" : " "
+ });
+ return;
+ } // word separated by whitespace
+
+
+ if ((index === 0 || index === tokens.length - 1) && token === "") {
+ return;
+ }
+
+ token.split(new RegExp(`(${cjkPattern})`)).forEach((innerToken, innerIndex, innerTokens) => {
+ if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === "") {
+ return;
+ } // non-CJK word
+
+
+ if (innerIndex % 2 === 0) {
+ if (innerToken !== "") {
+ appendNode({
+ type: "word",
+ value: innerToken,
+ kind: KIND_NON_CJK,
+ hasLeadingPunctuation: punctuationRegex.test(innerToken[0]),
+ hasTrailingPunctuation: punctuationRegex.test(getLast$4(innerToken))
+ });
+ }
+
+ return;
+ } // CJK character
+
+
+ appendNode(punctuationRegex.test(innerToken) ? {
+ type: "word",
+ value: innerToken,
+ kind: KIND_CJK_PUNCTUATION,
+ hasLeadingPunctuation: true,
+ hasTrailingPunctuation: true
+ } : {
+ type: "word",
+ value: innerToken,
+ kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER,
+ hasLeadingPunctuation: false,
+ hasTrailingPunctuation: false
+ });
+ });
+ });
+ return nodes;
+
+ function appendNode(node) {
+ const lastNode = getLast$4(nodes);
+
+ if (lastNode && lastNode.type === "word") {
+ if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) {
+ nodes.push({
+ type: "whitespace",
+ value: " "
+ });
+ } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace
+ ![lastNode.value, node.value].some(value => /\u3000/.test(value))) {
+ nodes.push({
+ type: "whitespace",
+ value: ""
+ });
+ }
+ }
+
+ nodes.push(node);
+
+ function isBetween(kind1, kind2) {
+ return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1;
+ }
+ }
+}
+
+function getOrderedListItemInfo(orderListItem, originalText) {
+ const [, numberText, marker, leadingSpaces] = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);
+ return {
+ numberText,
+ marker,
+ leadingSpaces
+ };
+}
+
+function hasGitDiffFriendlyOrderedList(node, options) {
+ if (!node.ordered) {
+ return false;
+ }
+
+ if (node.children.length < 2) {
+ return false;
+ }
+
+ const firstNumber = Number(getOrderedListItemInfo(node.children[0], options.originalText).numberText);
+ const secondNumber = Number(getOrderedListItemInfo(node.children[1], options.originalText).numberText);
+
+ if (firstNumber === 0 && node.children.length > 2) {
+ const thirdNumber = Number(getOrderedListItemInfo(node.children[2], options.originalText).numberText);
+ return secondNumber === 1 && thirdNumber === 1;
+ }
+
+ return secondNumber === 1;
+} // workaround for https://github.com/remarkjs/remark/issues/351
+// leading and trailing newlines are stripped by remark
+
+
+function getFencedCodeBlockValue(node, originalText) {
+ const text = originalText.slice(node.position.start.offset, node.position.end.offset);
+ const leadingSpaceCount = text.match(/^\s*/)[0].length;
+ const replaceRegex = new RegExp(`^\\s{0,${leadingSpaceCount}}`);
+ const lineContents = text.split("\n");
+ const markerStyle = text[leadingSpaceCount]; // ` or ~
+
+ const marker = text.slice(leadingSpaceCount).match(new RegExp(`^[${markerStyle}]+`))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces
+ // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence
+
+ const hasEndMarker = new RegExp(`^\\s{0,3}${marker}`).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1)));
+ return lineContents.slice(1, hasEndMarker ? -1 : undefined).map((x, i) => x.slice(getIndent(i + 1)).replace(replaceRegex, "")).join("\n");
+
+ function getIndent(lineIndex) {
+ return node.position.indent[lineIndex - 1] - 1;
+ }
+}
+
+function mapAst(ast, handler) {
+ return function preorder(node, index, parentStack) {
+ parentStack = parentStack || [];
+ const newNode = Object.assign({}, handler(node, index, parentStack));
+
+ if (newNode.children) {
+ newNode.children = newNode.children.map((child, index) => {
+ return preorder(child, index, [newNode].concat(parentStack));
+ });
+ }
+
+ return newNode;
+ }(ast, null, null);
+}
+
+var utils$9 = {
+ mapAst,
+ splitText,
+ punctuationPattern,
+ getFencedCodeBlockValue,
+ getOrderedListItemInfo,
+ hasGitDiffFriendlyOrderedList,
+ INLINE_NODE_TYPES,
+ INLINE_NODE_WRAPPER_TYPES
+};
+
+const {
+ builders: {
+ hardline: hardline$a,
+ literalline: literalline$4,
+ concat: concat$c,
+ markAsRoot: markAsRoot$2
+ },
+ utils: {
+ mapDoc: mapDoc$3
+ }
+} = document;
+const {
+ getFencedCodeBlockValue: getFencedCodeBlockValue$1
+} = utils$9;
+
+function embed$2(path, print, textToDoc, options) {
+ const node = path.getValue();
+
+ if (node.type === "code" && node.lang !== null) {
+ // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk)
+ const langMatch = node.lang.match(/^[A-Za-z0-9_-]+/);
+ const lang = langMatch ? langMatch[0] : "";
+ const parser = getParserName(lang);
+
+ if (parser) {
+ const styleUnit = options.__inJsTemplate ? "~" : "`";
+ const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));
+ const doc = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), {
+ parser
+ });
+ return markAsRoot$2(concat$c([style, node.lang, hardline$a, replaceNewlinesWithLiterallines(doc), style]));
+ }
+ }
+
+ if (node.type === "yaml") {
+ return markAsRoot$2(concat$c(["---", hardline$a, node.value && node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {
+ parser: "yaml"
+ })) : "", "---"]));
+ } // MDX
+
+
+ switch (node.type) {
+ case "importExport":
+ return textToDoc(node.value, {
+ parser: "babel"
+ });
+
+ case "jsx":
+ return textToDoc(`<$>${node.value}$>`, {
+ parser: "__js_expression",
+ rootMarker: "mdx"
+ });
+ }
+
+ return null;
+
+ function getParserName(lang) {
+ const supportInfo = support.getSupportInfo({
+ plugins: options.plugins
+ });
+ const language = supportInfo.languages.find(language => language.name.toLowerCase() === lang || language.aliases && language.aliases.includes(lang) || language.extensions && language.extensions.find(ext => ext === `.${lang}`));
+
+ if (language) {
+ return language.parsers[0];
+ }
+
+ return null;
+ }
+
+ function replaceNewlinesWithLiterallines(doc) {
+ return mapDoc$3(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$c(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$4)) : currentDoc);
+ }
+}
+
+var embed_1$2 = embed$2;
+
+const pragmas = ["format", "prettier"];
+
+function startWithPragma(text) {
+ const pragma = `@(${pragmas.join("|")})`;
+ const regex = new RegExp([``, ``].join("|"), "m");
+ const matched = text.match(regex);
+ return matched && matched.index === 0;
+}
+
+var pragma$3 = {
+ startWithPragma,
+ hasPragma: text => startWithPragma(frontMatter(text).content.trimStart()),
+ insertPragma: text => {
+ const extracted = frontMatter(text);
+ const pragma = ``;
+ return extracted.frontMatter ? `${extracted.frontMatter.raw}\n\n${pragma}\n\n${extracted.content}` : `${pragma}\n\n${extracted.content}`;
+ }
+};
+
+const {
+ getOrderedListItemInfo: getOrderedListItemInfo$1,
+ mapAst: mapAst$1,
+ splitText: splitText$1
+} = utils$9; // 0x0 ~ 0x10ffff
+// eslint-disable-next-line no-control-regex
+
+const isSingleCharRegex = /^([\u0000-\uffff]|[\ud800-\udbff][\udc00-\udfff])$/;
+
+function preprocess$1(ast, options) {
+ ast = restoreUnescapedCharacter(ast, options);
+ ast = mergeContinuousTexts(ast);
+ ast = transformInlineCode(ast);
+ ast = transformIndentedCodeblockAndMarkItsParentList(ast, options);
+ ast = markAlignedList(ast, options);
+ ast = splitTextIntoSentences(ast, options);
+ ast = transformImportExport(ast);
+ ast = mergeContinuousImportExport(ast);
+ return ast;
+}
+
+function transformImportExport(ast) {
+ return mapAst$1(ast, node => {
+ if (node.type !== "import" && node.type !== "export") {
+ return node;
+ }
+
+ return Object.assign({}, node, {
+ type: "importExport"
+ });
+ });
+}
+
+function transformInlineCode(ast) {
+ return mapAst$1(ast, node => {
+ if (node.type !== "inlineCode") {
+ return node;
+ }
+
+ return Object.assign({}, node, {
+ value: node.value.replace(/\s+/g, " ")
+ });
+ });
+}
+
+function restoreUnescapedCharacter(ast, options) {
+ return mapAst$1(ast, node => {
+ return node.type !== "text" ? node : Object.assign({}, node, {
+ value: node.value !== "*" && node.value !== "_" && node.value !== "$" && // handle these cases in printer
+ isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value
+ });
+ });
+}
+
+function mergeContinuousImportExport(ast) {
+ return mergeChildren(ast, (prevNode, node) => prevNode.type === "importExport" && node.type === "importExport", (prevNode, node) => ({
+ type: "importExport",
+ value: prevNode.value + "\n\n" + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ }));
+}
+
+function mergeChildren(ast, shouldMerge, mergeNode) {
+ return mapAst$1(ast, node => {
+ if (!node.children) {
+ return node;
+ }
+
+ const children = node.children.reduce((current, child) => {
+ const lastChild = current[current.length - 1];
+
+ if (lastChild && shouldMerge(lastChild, child)) {
+ current.splice(-1, 1, mergeNode(lastChild, child));
+ } else {
+ current.push(child);
+ }
+
+ return current;
+ }, []);
+ return Object.assign({}, node, {
+ children
+ });
+ });
+}
+
+function mergeContinuousTexts(ast) {
+ return mergeChildren(ast, (prevNode, node) => prevNode.type === "text" && node.type === "text", (prevNode, node) => ({
+ type: "text",
+ value: prevNode.value + node.value,
+ position: {
+ start: prevNode.position.start,
+ end: node.position.end
+ }
+ }));
+}
+
+function splitTextIntoSentences(ast, options) {
+ return mapAst$1(ast, (node, index, [parentNode]) => {
+ if (node.type !== "text") {
+ return node;
+ }
+
+ let {
+ value
+ } = node;
+
+ if (parentNode.type === "paragraph") {
+ if (index === 0) {
+ value = value.trimStart();
+ }
+
+ if (index === parentNode.children.length - 1) {
+ value = value.trimEnd();
+ }
+ }
+
+ return {
+ type: "sentence",
+ position: node.position,
+ children: splitText$1(value, options)
+ };
+ });
+}
+
+function transformIndentedCodeblockAndMarkItsParentList(ast, options) {
+ return mapAst$1(ast, (node, index, parentStack) => {
+ if (node.type === "code") {
+ // the first char may point to `\n`, e.g. `\n\t\tbar`, just ignore it
+ const isIndented = /^\n?( {4,}|\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));
+ node.isIndented = isIndented;
+
+ if (isIndented) {
+ for (let i = 0; i < parentStack.length; i++) {
+ const parent = parentStack[i]; // no need to check checked items
+
+ if (parent.hasIndentedCodeblock) {
+ break;
+ }
+
+ if (parent.type === "list") {
+ parent.hasIndentedCodeblock = true;
+ }
+ }
+ }
+ }
+
+ return node;
+ });
+}
+
+function markAlignedList(ast, options) {
+ return mapAst$1(ast, (node, index, parentStack) => {
+ if (node.type === "list" && node.children.length !== 0) {
+ // if one of its parents is not aligned, it's not possible to be aligned in sub-lists
+ for (let i = 0; i < parentStack.length; i++) {
+ const parent = parentStack[i];
+
+ if (parent.type === "list" && !parent.isAligned) {
+ node.isAligned = false;
+ return node;
+ }
+ }
+
+ node.isAligned = isAligned(node);
+ }
+
+ return node;
+ });
+
+ function getListItemStart(listItem) {
+ return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1;
+ }
+
+ function isAligned(list) {
+ if (!list.ordered) {
+ /**
+ * - 123
+ * - 123
+ */
+ return true;
+ }
+
+ const [firstItem, secondItem] = list.children;
+ const firstInfo = getOrderedListItemInfo$1(firstItem, options.originalText);
+
+ if (firstInfo.leadingSpaces.length > 1) {
+ /**
+ * 1. 123
+ *
+ * 1. 123
+ * 1. 123
+ */
+ return true;
+ }
+
+ const firstStart = getListItemStart(firstItem);
+
+ if (firstStart === -1) {
+ /**
+ * 1.
+ *
+ * 1.
+ * 1.
+ */
+ return false;
+ }
+
+ if (list.children.length === 1) {
+ /**
+ * aligned:
+ *
+ * 11. 123
+ *
+ * not aligned:
+ *
+ * 1. 123
+ */
+ return firstStart % options.tabWidth === 0;
+ }
+
+ const secondStart = getListItemStart(secondItem);
+
+ if (firstStart !== secondStart) {
+ /**
+ * 11. 123
+ * 1. 123
+ *
+ * 1. 123
+ * 11. 123
+ */
+ return false;
+ }
+
+ if (firstStart % options.tabWidth === 0) {
+ /**
+ * 11. 123
+ * 12. 123
+ */
+ return true;
+ }
+ /**
+ * aligned:
+ *
+ * 11. 123
+ * 1. 123
+ *
+ * not aligned:
+ *
+ * 1. 123
+ * 2. 123
+ */
+
+
+ const secondInfo = getOrderedListItemInfo$1(secondItem, options.originalText);
+ return secondInfo.leadingSpaces.length > 1;
+ }
+}
+
+var preprocess_1$1 = preprocess$1;
+
+const {
+ builders: {
+ breakParent: breakParent$3,
+ concat: concat$d,
+ join: join$9,
+ line: line$8,
+ literalline: literalline$5,
+ markAsRoot: markAsRoot$3,
+ hardline: hardline$b,
+ softline: softline$6,
+ ifBreak: ifBreak$5,
+ fill: fill$5,
+ align: align$2,
+ indent: indent$8,
+ group: group$d
+ },
+ utils: {
+ mapDoc: mapDoc$4
+ },
+ printer: {
+ printDocToString: printDocToString$3
+ }
+} = document;
+const {
+ getFencedCodeBlockValue: getFencedCodeBlockValue$2,
+ hasGitDiffFriendlyOrderedList: hasGitDiffFriendlyOrderedList$1,
+ splitText: splitText$2,
+ punctuationPattern: punctuationPattern$1,
+ INLINE_NODE_TYPES: INLINE_NODE_TYPES$1,
+ INLINE_NODE_WRAPPER_TYPES: INLINE_NODE_WRAPPER_TYPES$1
+} = utils$9;
+const {
+ replaceEndOfLineWith: replaceEndOfLineWith$1
+} = util$1;
+const TRAILING_HARDLINE_NODES = ["importExport"];
+const SINGLE_LINE_NODE_TYPES = ["heading", "tableCell", "link"];
+const SIBLING_NODE_TYPES = ["listItem", "definition", "footnoteDefinition"];
+
+function genericPrint$4(path, options, print) {
+ const node = path.getValue();
+
+ if (shouldRemainTheSameContent(path)) {
+ return concat$d(splitText$2(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(node => node.type === "word" ? node.value : node.value === "" ? "" : printLine(path, node.value, options)));
+ }
+
+ switch (node.type) {
+ case "root":
+ if (node.children.length === 0) {
+ return "";
+ }
+
+ return concat$d([normalizeDoc(printRoot(path, options, print)), !TRAILING_HARDLINE_NODES.includes(getLastDescendantNode(node).type) ? hardline$b : ""]);
+
+ case "paragraph":
+ return printChildren$1(path, options, print, {
+ postprocessor: fill$5
+ });
+
+ case "sentence":
+ return printChildren$1(path, options, print);
+
+ case "word":
+ return node.value.replace(/[*$]/g, "\\$&") // escape all `*` and `$` (math)
+ .replace(new RegExp([`(^|${punctuationPattern$1})(_+)`, `(_+)(${punctuationPattern$1}|$)`].join("|"), "g"), (_, text1, underscore1, underscore2, text2) => (underscore1 ? `${text1}${underscore1}` : `${underscore2}${text2}`).replace(/_/g, "\\_"));
+ // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis
+
+ case "whitespace":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode.children.indexOf(node);
+ const nextNode = parentNode.children[index + 1];
+ const proseWrap = // leading char that may cause different syntax
+ nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? "never" : options.proseWrap;
+ return printLine(path, node.value, {
+ proseWrap
+ });
+ }
+
+ case "emphasis":
+ {
+ const parentNode = path.getParentNode();
+ const index = parentNode.children.indexOf(node);
+ const prevNode = parentNode.children[index - 1];
+ const nextNode = parentNode.children[index + 1];
+ const hasPrevOrNextWord = // `1*2*3` is considered emphasis but `1_2_3` is not
+ prevNode && prevNode.type === "sentence" && prevNode.children.length > 0 && util$1.getLast(prevNode.children).type === "word" && !util$1.getLast(prevNode.children).hasTrailingPunctuation || nextNode && nextNode.type === "sentence" && nextNode.children.length > 0 && nextNode.children[0].type === "word" && !nextNode.children[0].hasLeadingPunctuation;
+ const style = hasPrevOrNextWord || getAncestorNode$2(path, "emphasis") ? "*" : "_";
+ return concat$d([style, printChildren$1(path, options, print), style]);
+ }
+
+ case "strong":
+ return concat$d(["**", printChildren$1(path, options, print), "**"]);
+
+ case "delete":
+ return concat$d(["~~", printChildren$1(path, options, print), "~~"]);
+
+ case "inlineCode":
+ {
+ const backtickCount = util$1.getMinNotPresentContinuousCount(node.value, "`");
+ const style = "`".repeat(backtickCount || 1);
+ const gap = backtickCount ? " " : "";
+ return concat$d([style, gap, node.value, gap, style]);
+ }
+
+ case "link":
+ switch (options.originalText[node.position.start.offset]) {
+ case "<":
+ {
+ const mailto = "mailto:";
+ const url = // is parsed as { url: "mailto:hello@example.com" }
+ node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url;
+ return concat$d(["<", url, ">"]);
+ }
+
+ case "[":
+ return concat$d(["[", printChildren$1(path, options, print), "](", printUrl(node.url, ")"), printTitle(node.title, options), ")"]);
+
+ default:
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+ }
+
+ case "image":
+ return concat$d([""), printTitle(node.title, options), ")"]);
+
+ case "blockquote":
+ return concat$d(["> ", align$2("> ", printChildren$1(path, options, print))]);
+
+ case "heading":
+ return concat$d(["#".repeat(node.depth) + " ", printChildren$1(path, options, print)]);
+
+ case "code":
+ {
+ if (node.isIndented) {
+ // indented code block
+ const alignment = " ".repeat(4);
+ return align$2(alignment, concat$d([alignment, concat$d(replaceEndOfLineWith$1(node.value, hardline$b))]));
+ } // fenced code block
+
+
+ const styleUnit = options.__inJsTemplate ? "~" : "`";
+ const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));
+ return concat$d([style, node.lang || "", hardline$b, concat$d(replaceEndOfLineWith$1(getFencedCodeBlockValue$2(node, options.originalText), hardline$b)), hardline$b, style]);
+ }
+
+ case "yaml":
+ case "toml":
+ return options.originalText.slice(node.position.start.offset, node.position.end.offset);
+
+ case "html":
+ {
+ const parentNode = path.getParentNode();
+ const value = parentNode.type === "root" && util$1.getLast(parentNode.children) === node ? node.value.trimEnd() : node.value;
+ const isHtmlComment = /^$/.test(value);
+ return concat$d(replaceEndOfLineWith$1(value, isHtmlComment ? hardline$b : markAsRoot$3(literalline$5)));
+ }
+
+ case "list":
+ {
+ const nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());
+ const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList$1(node, options);
+ return printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ const prefix = getPrefix();
+ const childNode = childPath.getValue();
+
+ if (childNode.children.length === 2 && childNode.children[1].type === "html" && childNode.children[0].position.start.column !== childNode.children[1].position.start.column) {
+ return concat$d([prefix, printListItem(childPath, options, print, prefix)]);
+ }
+
+ return concat$d([prefix, align$2(" ".repeat(prefix.length), printListItem(childPath, options, print, prefix))]);
+
+ function getPrefix() {
+ const rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? ". " : ") ") : nthSiblingIndex % 2 === 0 ? "- " : "* ";
+ return node.isAligned ||
+ /* workaround for https://github.com/remarkjs/remark/issues/315 */
+ node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;
+ }
+ }
+ });
+ }
+
+ case "thematicBreak":
+ {
+ const counter = getAncestorCounter$1(path, "list");
+
+ if (counter === -1) {
+ return "---";
+ }
+
+ const nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1));
+ return nthSiblingIndex % 2 === 0 ? "***" : "---";
+ }
+
+ case "linkReference":
+ return concat$d(["[", printChildren$1(path, options, print), "]", node.referenceType === "full" ? concat$d(["[", node.identifier, "]"]) : node.referenceType === "collapsed" ? "[]" : ""]);
+
+ case "imageReference":
+ switch (node.referenceType) {
+ case "full":
+ return concat$d(["![", node.alt || "", "][", node.identifier, "]"]);
+
+ default:
+ return concat$d(["![", node.alt, "]", node.referenceType === "collapsed" ? "[]" : ""]);
+ }
+
+ case "definition":
+ {
+ const lineOrSpace = options.proseWrap === "always" ? line$8 : " ";
+ return group$d(concat$d([concat$d(["[", node.identifier, "]:"]), indent$8(concat$d([lineOrSpace, printUrl(node.url), node.title === null ? "" : concat$d([lineOrSpace, printTitle(node.title, options, false)])]))]));
+ }
+
+ case "footnote":
+ return concat$d(["[^", printChildren$1(path, options, print), "]"]);
+
+ case "footnoteReference":
+ return concat$d(["[^", node.identifier, "]"]);
+
+ case "footnoteDefinition":
+ {
+ const nextNode = path.getParentNode().children[path.getName() + 1];
+ const shouldInlineFootnote = node.children.length === 1 && node.children[0].type === "paragraph" && (options.proseWrap === "never" || options.proseWrap === "preserve" && node.children[0].position.start.line === node.children[0].position.end.line);
+ return concat$d(["[^", node.identifier, "]: ", shouldInlineFootnote ? printChildren$1(path, options, print) : group$d(concat$d([align$2(" ".repeat(options.tabWidth), printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ return index === 0 ? group$d(concat$d([softline$6, childPath.call(print)])) : childPath.call(print);
+ }
+ })), nextNode && nextNode.type === "footnoteDefinition" ? softline$6 : ""]))]);
+ }
+
+ case "table":
+ return printTable(path, options, print);
+
+ case "tableCell":
+ return printChildren$1(path, options, print);
+
+ case "break":
+ return /\s/.test(options.originalText[node.position.start.offset]) ? concat$d([" ", markAsRoot$3(literalline$5)]) : concat$d(["\\", hardline$b]);
+
+ case "liquidNode":
+ return concat$d(replaceEndOfLineWith$1(node.value, hardline$b));
+ // MDX
+
+ case "importExport":
+ case "jsx":
+ return node.value;
+ // fallback to the original text if multiparser failed
+
+ case "math":
+ return concat$d(["$$", hardline$b, node.value ? concat$d([concat$d(replaceEndOfLineWith$1(node.value, hardline$b)), hardline$b]) : "", "$$"]);
+
+ case "inlineMath":
+ {
+ // remark-math trims content but we don't want to remove whitespaces
+ // since it's very possible that it's recognized as math accidentally
+ return options.originalText.slice(options.locStart(node), options.locEnd(node));
+ }
+
+ case "tableRow": // handled in "table"
+
+ case "listItem": // handled in "list"
+
+ default:
+ throw new Error(`Unknown markdown type ${JSON.stringify(node.type)}`);
+ }
+}
+
+function printListItem(path, options, print, listPrefix) {
+ const node = path.getValue();
+ const prefix = node.checked === null ? "" : node.checked ? "[x] " : "[ ] ";
+ return concat$d([prefix, printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ if (index === 0 && childPath.getValue().type !== "list") {
+ return align$2(" ".repeat(prefix.length), childPath.call(print));
+ }
+
+ const alignment = " ".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block
+ );
+ return concat$d([alignment, align$2(alignment, childPath.call(print))]);
+ }
+ })]);
+}
+
+function alignListPrefix(prefix, options) {
+ const additionalSpaces = getAdditionalSpaces();
+ return prefix + " ".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block
+ );
+
+ function getAdditionalSpaces() {
+ const restSpaces = prefix.length % options.tabWidth;
+ return restSpaces === 0 ? 0 : options.tabWidth - restSpaces;
+ }
+}
+
+function getNthListSiblingIndex(node, parentNode) {
+ return getNthSiblingIndex(node, parentNode, siblingNode => siblingNode.ordered === node.ordered);
+}
+
+function getNthSiblingIndex(node, parentNode, condition) {
+ condition = condition || (() => true);
+
+ let index = -1;
+
+ for (const childNode of parentNode.children) {
+ if (childNode.type === node.type && condition(childNode)) {
+ index++;
+ } else {
+ index = -1;
+ }
+
+ if (childNode === node) {
+ return index;
+ }
+ }
+}
+
+function getAncestorCounter$1(path, typeOrTypes) {
+ const types = [].concat(typeOrTypes);
+ let counter = -1;
+ let ancestorNode;
+
+ while (ancestorNode = path.getParentNode(++counter)) {
+ if (types.includes(ancestorNode.type)) {
+ return counter;
+ }
+ }
+
+ return -1;
+}
+
+function getAncestorNode$2(path, typeOrTypes) {
+ const counter = getAncestorCounter$1(path, typeOrTypes);
+ return counter === -1 ? null : path.getParentNode(counter);
+}
+
+function printLine(path, value, options) {
+ if (options.proseWrap === "preserve" && value === "\n") {
+ return hardline$b;
+ }
+
+ const isBreakable = options.proseWrap === "always" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES);
+ return value !== "" ? isBreakable ? line$8 : " " : isBreakable ? softline$6 : "";
+}
+
+function printTable(path, options, print) {
+ const hardlineWithoutBreakParent = hardline$b.parts[0];
+ const node = path.getValue();
+ const contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } }
+
+ path.map(rowPath => {
+ const rowContents = [];
+ rowPath.map(cellPath => {
+ rowContents.push(printDocToString$3(cellPath.call(print), options).formatted);
+ }, "children");
+ contents.push(rowContents);
+ }, "children"); // Get the width of each column
+
+ const columnMaxWidths = contents.reduce((currentWidths, rowContents) => currentWidths.map((width, columnIndex) => Math.max(width, util$1.getStringWidth(rowContents[columnIndex]))), contents[0].map(() => 3) // minimum width = 3 (---, :--, :-:, --:)
+ );
+ const alignedTable = join$9(hardlineWithoutBreakParent, [printRow(contents[0]), printSeparator(), join$9(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents)))]);
+
+ if (options.proseWrap !== "never") {
+ return concat$d([breakParent$3, alignedTable]);
+ } // Only if the --prose-wrap never is set and it exceeds the print width.
+
+
+ const compactTable = join$9(hardlineWithoutBreakParent, [printRow(contents[0],
+ /* isCompact */
+ true), printSeparator(
+ /* isCompact */
+ true), join$9(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents,
+ /* isCompact */
+ true)))]);
+ return concat$d([breakParent$3, group$d(ifBreak$5(compactTable, alignedTable))]);
+
+ function printSeparator(isCompact) {
+ return concat$d(["| ", join$9(" | ", columnMaxWidths.map((width, index) => {
+ const spaces = isCompact ? 3 : width;
+
+ switch (node.align[index]) {
+ case "left":
+ return ":" + "-".repeat(spaces - 1);
+
+ case "right":
+ return "-".repeat(spaces - 1) + ":";
+
+ case "center":
+ return ":" + "-".repeat(spaces - 2) + ":";
+
+ default:
+ return "-".repeat(spaces);
+ }
+ })), " |"]);
+ }
+
+ function printRow(rowContents, isCompact) {
+ return concat$d(["| ", join$9(" | ", isCompact ? rowContents : rowContents.map((rowContent, columnIndex) => {
+ switch (node.align[columnIndex]) {
+ case "right":
+ return alignRight(rowContent, columnMaxWidths[columnIndex]);
+
+ case "center":
+ return alignCenter(rowContent, columnMaxWidths[columnIndex]);
+
+ default:
+ return alignLeft(rowContent, columnMaxWidths[columnIndex]);
+ }
+ })), " |"]);
+ }
+
+ function alignLeft(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ return concat$d([text, " ".repeat(spaces)]);
+ }
+
+ function alignRight(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ return concat$d([" ".repeat(spaces), text]);
+ }
+
+ function alignCenter(text, width) {
+ const spaces = width - util$1.getStringWidth(text);
+ const left = Math.floor(spaces / 2);
+ const right = spaces - left;
+ return concat$d([" ".repeat(left), text, " ".repeat(right)]);
+ }
+}
+
+function printRoot(path, options, print) {
+ /** @typedef {{ index: number, offset: number }} IgnorePosition */
+
+ /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */
+ const ignoreRanges = [];
+ /** @type {IgnorePosition | null} */
+
+ let ignoreStart = null;
+ const {
+ children
+ } = path.getValue();
+ children.forEach((childNode, index) => {
+ switch (isPrettierIgnore(childNode)) {
+ case "start":
+ if (ignoreStart === null) {
+ ignoreStart = {
+ index,
+ offset: childNode.position.end.offset
+ };
+ }
+
+ break;
+
+ case "end":
+ if (ignoreStart !== null) {
+ ignoreRanges.push({
+ start: ignoreStart,
+ end: {
+ index,
+ offset: childNode.position.start.offset
+ }
+ });
+ ignoreStart = null;
+ }
+
+ break;
+ }
+ });
+ return printChildren$1(path, options, print, {
+ processor: (childPath, index) => {
+ if (ignoreRanges.length !== 0) {
+ const ignoreRange = ignoreRanges[0];
+
+ if (index === ignoreRange.start.index) {
+ return concat$d([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]);
+ }
+
+ if (ignoreRange.start.index < index && index < ignoreRange.end.index) {
+ return false;
+ }
+
+ if (index === ignoreRange.end.index) {
+ ignoreRanges.shift();
+ return false;
+ }
+ }
+
+ return childPath.call(print);
+ }
+ });
+}
+
+function printChildren$1(path, options, print, events) {
+ events = events || {};
+ const postprocessor = events.postprocessor || concat$d;
+
+ const processor = events.processor || (childPath => childPath.call(print));
+
+ const node = path.getValue();
+ const parts = [];
+ let lastChildNode;
+ path.map((childPath, index) => {
+ const childNode = childPath.getValue();
+ const result = processor(childPath, index);
+
+ if (result !== false) {
+ const data = {
+ parts,
+ prevNode: lastChildNode,
+ parentNode: node,
+ options
+ };
+
+ if (!shouldNotPrePrintHardline(childNode, data)) {
+ parts.push(hardline$b);
+
+ if (lastChildNode && TRAILING_HARDLINE_NODES.includes(lastChildNode.type)) {
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+ } else {
+ if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+
+ if (shouldPrePrintTripleHardline(childNode, data)) {
+ parts.push(hardline$b);
+ }
+ }
+ }
+
+ parts.push(result);
+ lastChildNode = childNode;
+ }
+ }, "children");
+ return postprocessor(parts);
+}
+
+function getLastDescendantNode(node) {
+ let current = node;
+
+ while (current.children && current.children.length !== 0) {
+ current = current.children[current.children.length - 1];
+ }
+
+ return current;
+}
+/** @return {false | 'next' | 'start' | 'end'} */
+
+
+function isPrettierIgnore(node) {
+ if (node.type !== "html") {
+ return false;
+ }
+
+ const match = node.value.match(/^$/);
+ return match === null ? false : match[1] ? match[1] : "next";
+}
+
+function shouldNotPrePrintHardline(node, data) {
+ const isFirstNode = data.parts.length === 0;
+ const isInlineNode = INLINE_NODE_TYPES$1.includes(node.type);
+ const isInlineHTML = node.type === "html" && INLINE_NODE_WRAPPER_TYPES$1.includes(data.parentNode.type);
+ return isFirstNode || isInlineNode || isInlineHTML;
+}
+
+function shouldPrePrintDoubleHardline(node, data) {
+ const isSequence = (data.prevNode && data.prevNode.type) === node.type;
+ const isSiblingNode = isSequence && SIBLING_NODE_TYPES.includes(node.type);
+ const isInTightListItem = data.parentNode.type === "listItem" && !data.parentNode.loose;
+ const isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose;
+ const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next";
+ const isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && data.prevNode && data.prevNode.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line;
+ const isHtmlDirectAfterListItem = node.type === "html" && data.parentNode.type === "listItem" && data.prevNode && data.prevNode.type === "paragraph" && data.prevNode.position.end.line + 1 === node.position.start.line;
+ return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml || isHtmlDirectAfterListItem);
+}
+
+function shouldPrePrintTripleHardline(node, data) {
+ const isPrevNodeList = data.prevNode && data.prevNode.type === "list";
+ const isIndentedCode = node.type === "code" && node.isIndented;
+ return isPrevNodeList && isIndentedCode;
+}
+
+function shouldRemainTheSameContent(path) {
+ const ancestorNode = getAncestorNode$2(path, ["linkReference", "imageReference"]);
+ return ancestorNode && (ancestorNode.type !== "linkReference" || ancestorNode.referenceType !== "full");
+}
+
+function normalizeDoc(doc) {
+ return mapDoc$4(doc, currentDoc => {
+ if (!currentDoc.parts) {
+ return currentDoc;
+ }
+
+ if (currentDoc.type === "concat" && currentDoc.parts.length === 1) {
+ return currentDoc.parts[0];
+ }
+
+ const parts = currentDoc.parts.reduce((parts, part) => {
+ if (part.type === "concat") {
+ parts.push(...part.parts);
+ } else if (part !== "") {
+ parts.push(part);
+ }
+
+ return parts;
+ }, []);
+ return Object.assign({}, currentDoc, {
+ parts: normalizeParts(parts)
+ });
+ });
+}
+
+function printUrl(url, dangerousCharOrChars) {
+ const dangerousChars = [" "].concat(dangerousCharOrChars || []);
+ return new RegExp(dangerousChars.map(x => `\\${x}`).join("|")).test(url) ? `<${url}>` : url;
+}
+
+function printTitle(title, options, printSpace) {
+ if (printSpace == null) {
+ printSpace = true;
+ }
+
+ if (!title) {
+ return "";
+ }
+
+ if (printSpace) {
+ return " " + printTitle(title, options, false);
+ }
+
+ if (title.includes('"') && title.includes("'") && !title.includes(")")) {
+ return `(${title})`; // avoid escaped quotes
+ } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split
+
+
+ const singleCount = title.split("'").length - 1;
+ const doubleCount = title.split('"').length - 1;
+ const quote = singleCount > doubleCount ? '"' : doubleCount > singleCount ? "'" : options.singleQuote ? "'" : '"';
+ title = title.replace(new RegExp(`(${quote})`, "g"), "\\$1");
+ return `${quote}${title}${quote}`;
+}
+
+function normalizeParts(parts) {
+ return parts.reduce((current, part) => {
+ const lastPart = util$1.getLast(current);
+
+ if (typeof lastPart === "string" && typeof part === "string") {
+ current.splice(-1, 1, lastPart + part);
+ } else {
+ current.push(part);
+ }
+
+ return current;
+ }, []);
+}
+
+function clamp(value, min, max) {
+ return value < min ? min : value > max ? max : value;
+}
+
+function clean$5(ast, newObj, parent) {
+ delete newObj.position;
+ delete newObj.raw; // front-matter
+ // for codeblock
+
+ if (ast.type === "code" || ast.type === "yaml" || ast.type === "import" || ast.type === "export" || ast.type === "jsx") {
+ delete newObj.value;
+ }
+
+ if (ast.type === "list") {
+ delete newObj.isAligned;
+ } // texts can be splitted or merged
+
+
+ if (ast.type === "text") {
+ return null;
+ }
+
+ if (ast.type === "inlineCode") {
+ newObj.value = ast.value.replace(/[ \t\n]+/g, " ");
+ } // for insert pragma
+
+
+ if (parent && parent.type === "root" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === "yaml" || parent.children[0].type === "toml") && parent.children[1] === ast) && ast.type === "html" && pragma$3.startWithPragma(ast.value)) {
+ return null;
+ }
+}
+
+function hasPrettierIgnore$4(path) {
+ const index = +path.getName();
+
+ if (index === 0) {
+ return false;
+ }
+
+ const prevNode = path.getParentNode().children[index - 1];
+ return isPrettierIgnore(prevNode) === "next";
+}
+
+var printerMarkdown = {
+ preprocess: preprocess_1$1,
+ print: genericPrint$4,
+ embed: embed_1$2,
+ massageAstNode: clean$5,
+ hasPrettierIgnore: hasPrettierIgnore$4,
+ insertPragma: pragma$3.insertPragma
+};
+
+var options$5 = {
+ proseWrap: commonOptions.proseWrap,
+ singleQuote: commonOptions.singleQuote
+};
+
+var name$f = "Markdown";
+var type$d = "prose";
+var aliases$4 = [
+ "pandoc"
+];
+var aceMode$d = "markdown";
+var codemirrorMode$a = "gfm";
+var codemirrorMimeType$a = "text/x-gfm";
+var wrap = true;
+var extensions$d = [
+ ".md",
+ ".markdown",
+ ".mdown",
+ ".mdwn",
+ ".mdx",
+ ".mkd",
+ ".mkdn",
+ ".mkdown",
+ ".ronn",
+ ".workbook"
+];
+var filenames$3 = [
+ "contents.lr"
+];
+var tmScope$d = "source.gfm";
+var languageId$d = 222;
+var Markdown = {
+ name: name$f,
+ type: type$d,
+ aliases: aliases$4,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ wrap: wrap,
+ extensions: extensions$d,
+ filenames: filenames$3,
+ tmScope: tmScope$d,
+ languageId: languageId$d
+};
+
+var Markdown$1 = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ name: name$f,
+ type: type$d,
+ aliases: aliases$4,
+ aceMode: aceMode$d,
+ codemirrorMode: codemirrorMode$a,
+ codemirrorMimeType: codemirrorMimeType$a,
+ wrap: wrap,
+ extensions: extensions$d,
+ filenames: filenames$3,
+ tmScope: tmScope$d,
+ languageId: languageId$d,
+ 'default': Markdown
+});
+
+var require$$0$5 = getCjsExportFromNamespace(Markdown$1);
+
+const languages$4 = [createLanguage(require$$0$5, data => ({
+ since: "1.8.0",
+ parsers: ["markdown"],
+ vscodeLanguageIds: ["markdown"],
+ filenames: data.filenames.concat(["README"]),
+ extensions: data.extensions.filter(extension => extension !== ".mdx")
+})), createLanguage(require$$0$5, () => ({
+ name: "MDX",
+ since: "1.15.0",
+ parsers: ["mdx"],
+ vscodeLanguageIds: ["mdx"],
+ filenames: [],
+ extensions: [".mdx"]
+}))];
+const printers$4 = {
+ mdast: printerMarkdown
+};
+var languageMarkdown = {
+ languages: languages$4,
+ options: options$5,
+ printers: printers$4
+};
+
+var clean$6 = function (ast, newNode) {
+ delete newNode.sourceSpan;
+ delete newNode.startSourceSpan;
+ delete newNode.endSourceSpan;
+ delete newNode.nameSpan;
+ delete newNode.valueSpan;
+
+ if (ast.type === "text" || ast.type === "comment") {
+ return null;
+ } // may be formatted by multiparser
+
+
+ if (ast.type === "yaml" || ast.type === "toml") {
+ return null;
+ }
+
+ if (ast.type === "attribute") {
+ delete newNode.value;
+ }
+
+ if (ast.type === "docType") {
+ delete newNode.value;
+ }
+};
+
+var json$1 = {
+ "CSS_DISPLAY_TAGS": {
+ "area": "none",
+ "base": "none",
+ "basefont": "none",
+ "datalist": "none",
+ "head": "none",
+ "link": "none",
+ "meta": "none",
+ "noembed": "none",
+ "noframes": "none",
+ "param": "none",
+ "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",
+ "video": "inline-block",
+ "audio": "inline-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"
+};
+
+var index = [
+ "a",
+ "abbr",
+ "acronym",
+ "address",
+ "applet",
+ "area",
+ "article",
+ "aside",
+ "audio",
+ "b",
+ "base",
+ "basefont",
+ "bdi",
+ "bdo",
+ "bgsound",
+ "big",
+ "blink",
+ "blockquote",
+ "body",
+ "br",
+ "button",
+ "canvas",
+ "caption",
+ "center",
+ "cite",
+ "code",
+ "col",
+ "colgroup",
+ "command",
+ "content",
+ "data",
+ "datalist",
+ "dd",
+ "del",
+ "details",
+ "dfn",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "element",
+ "em",
+ "embed",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "font",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hgroup",
+ "hr",
+ "html",
+ "i",
+ "iframe",
+ "image",
+ "img",
+ "input",
+ "ins",
+ "isindex",
+ "kbd",
+ "keygen",
+ "label",
+ "legend",
+ "li",
+ "link",
+ "listing",
+ "main",
+ "map",
+ "mark",
+ "marquee",
+ "math",
+ "menu",
+ "menuitem",
+ "meta",
+ "meter",
+ "multicol",
+ "nav",
+ "nextid",
+ "nobr",
+ "noembed",
+ "noframes",
+ "noscript",
+ "object",
+ "ol",
+ "optgroup",
+ "option",
+ "output",
+ "p",
+ "param",
+ "picture",
+ "plaintext",
+ "pre",
+ "progress",
+ "q",
+ "rb",
+ "rbc",
+ "rp",
+ "rt",
+ "rtc",
+ "ruby",
+ "s",
+ "samp",
+ "script",
+ "section",
+ "select",
+ "shadow",
+ "slot",
+ "small",
+ "source",
+ "spacer",
+ "span",
+ "strike",
+ "strong",
+ "style",
+ "sub",
+ "summary",
+ "sup",
+ "svg",
+ "table",
+ "tbody",
+ "td",
+ "template",
+ "textarea",
+ "tfoot",
+ "th",
+ "thead",
+ "time",
+ "title",
+ "tr",
+ "track",
+ "tt",
+ "u",
+ "ul",
+ "var",
+ "video",
+ "wbr",
+ "xmp"
+];
+
+var htmlTagNames = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ 'default': index
+});
+
+var a = [
+ "accesskey",
+ "charset",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "name",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+];
+var abbr = [
+ "title"
+];
+var applet = [
+ "align",
+ "alt",
+ "archive",
+ "code",
+ "codebase",
+ "height",
+ "hspace",
+ "name",
+ "object",
+ "vspace",
+ "width"
+];
+var area = [
+ "accesskey",
+ "alt",
+ "coords",
+ "download",
+ "href",
+ "hreflang",
+ "nohref",
+ "ping",
+ "referrerpolicy",
+ "rel",
+ "shape",
+ "tabindex",
+ "target",
+ "type"
+];
+var audio = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "loop",
+ "muted",
+ "preload",
+ "src"
+];
+var base = [
+ "href",
+ "target"
+];
+var basefont = [
+ "color",
+ "face",
+ "size"
+];
+var bdo = [
+ "dir"
+];
+var blockquote = [
+ "cite"
+];
+var body = [
+ "alink",
+ "background",
+ "bgcolor",
+ "link",
+ "text",
+ "vlink"
+];
+var br = [
+ "clear"
+];
+var button = [
+ "accesskey",
+ "autofocus",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "name",
+ "tabindex",
+ "type",
+ "value"
+];
+var canvas = [
+ "height",
+ "width"
+];
+var caption = [
+ "align"
+];
+var col = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+];
+var colgroup = [
+ "align",
+ "char",
+ "charoff",
+ "span",
+ "valign",
+ "width"
+];
+var data$1 = [
+ "value"
+];
+var del$1 = [
+ "cite",
+ "datetime"
+];
+var details = [
+ "open"
+];
+var dfn = [
+ "title"
+];
+var dialog = [
+ "open"
+];
+var dir = [
+ "compact"
+];
+var div = [
+ "align"
+];
+var dl = [
+ "compact"
+];
+var embed$3 = [
+ "height",
+ "src",
+ "type",
+ "width"
+];
+var fieldset = [
+ "disabled",
+ "form",
+ "name"
+];
+var font = [
+ "color",
+ "face",
+ "size"
+];
+var form = [
+ "accept",
+ "accept-charset",
+ "action",
+ "autocomplete",
+ "enctype",
+ "method",
+ "name",
+ "novalidate",
+ "target"
+];
+var frame = [
+ "frameborder",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "noresize",
+ "scrolling",
+ "src"
+];
+var frameset = [
+ "cols",
+ "rows"
+];
+var h1 = [
+ "align"
+];
+var h2 = [
+ "align"
+];
+var h3 = [
+ "align"
+];
+var h4 = [
+ "align"
+];
+var h5 = [
+ "align"
+];
+var h6 = [
+ "align"
+];
+var head = [
+ "profile"
+];
+var hr = [
+ "align",
+ "noshade",
+ "size",
+ "width"
+];
+var html = [
+ "manifest",
+ "version"
+];
+var iframe = [
+ "align",
+ "allow",
+ "allowfullscreen",
+ "allowpaymentrequest",
+ "allowusermedia",
+ "frameborder",
+ "height",
+ "longdesc",
+ "marginheight",
+ "marginwidth",
+ "name",
+ "referrerpolicy",
+ "sandbox",
+ "scrolling",
+ "src",
+ "srcdoc",
+ "width"
+];
+var img = [
+ "align",
+ "alt",
+ "border",
+ "crossorigin",
+ "decoding",
+ "height",
+ "hspace",
+ "ismap",
+ "longdesc",
+ "name",
+ "referrerpolicy",
+ "sizes",
+ "src",
+ "srcset",
+ "usemap",
+ "vspace",
+ "width"
+];
+var input = [
+ "accept",
+ "accesskey",
+ "align",
+ "alt",
+ "autocomplete",
+ "autofocus",
+ "checked",
+ "dirname",
+ "disabled",
+ "form",
+ "formaction",
+ "formenctype",
+ "formmethod",
+ "formnovalidate",
+ "formtarget",
+ "height",
+ "ismap",
+ "list",
+ "max",
+ "maxlength",
+ "min",
+ "minlength",
+ "multiple",
+ "name",
+ "pattern",
+ "placeholder",
+ "readonly",
+ "required",
+ "size",
+ "src",
+ "step",
+ "tabindex",
+ "title",
+ "type",
+ "usemap",
+ "value",
+ "width"
+];
+var ins = [
+ "cite",
+ "datetime"
+];
+var isindex = [
+ "prompt"
+];
+var label = [
+ "accesskey",
+ "for",
+ "form"
+];
+var legend = [
+ "accesskey",
+ "align"
+];
+var li = [
+ "type",
+ "value"
+];
+var link$3 = [
+ "as",
+ "charset",
+ "color",
+ "crossorigin",
+ "href",
+ "hreflang",
+ "imagesizes",
+ "imagesrcset",
+ "integrity",
+ "media",
+ "nonce",
+ "referrerpolicy",
+ "rel",
+ "rev",
+ "sizes",
+ "target",
+ "title",
+ "type"
+];
+var map$1 = [
+ "name"
+];
+var menu = [
+ "compact"
+];
+var meta = [
+ "charset",
+ "content",
+ "http-equiv",
+ "name",
+ "scheme"
+];
+var meter = [
+ "high",
+ "low",
+ "max",
+ "min",
+ "optimum",
+ "value"
+];
+var object = [
+ "align",
+ "archive",
+ "border",
+ "classid",
+ "codebase",
+ "codetype",
+ "data",
+ "declare",
+ "form",
+ "height",
+ "hspace",
+ "name",
+ "standby",
+ "tabindex",
+ "type",
+ "typemustmatch",
+ "usemap",
+ "vspace",
+ "width"
+];
+var ol = [
+ "compact",
+ "reversed",
+ "start",
+ "type"
+];
+var optgroup = [
+ "disabled",
+ "label"
+];
+var option = [
+ "disabled",
+ "label",
+ "selected",
+ "value"
+];
+var output = [
+ "for",
+ "form",
+ "name"
+];
+var p = [
+ "align"
+];
+var param = [
+ "name",
+ "type",
+ "value",
+ "valuetype"
+];
+var pre = [
+ "width"
+];
+var progress = [
+ "max",
+ "value"
+];
+var q = [
+ "cite"
+];
+var script = [
+ "async",
+ "charset",
+ "crossorigin",
+ "defer",
+ "integrity",
+ "language",
+ "nomodule",
+ "nonce",
+ "referrerpolicy",
+ "src",
+ "type"
+];
+var select = [
+ "autocomplete",
+ "autofocus",
+ "disabled",
+ "form",
+ "multiple",
+ "name",
+ "required",
+ "size",
+ "tabindex"
+];
+var slot = [
+ "name"
+];
+var source$1 = [
+ "media",
+ "sizes",
+ "src",
+ "srcset",
+ "type"
+];
+var style = [
+ "media",
+ "nonce",
+ "title",
+ "type"
+];
+var table = [
+ "align",
+ "bgcolor",
+ "border",
+ "cellpadding",
+ "cellspacing",
+ "frame",
+ "rules",
+ "summary",
+ "width"
+];
+var tbody = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var td = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+];
+var textarea = [
+ "accesskey",
+ "autocomplete",
+ "autofocus",
+ "cols",
+ "dirname",
+ "disabled",
+ "form",
+ "maxlength",
+ "minlength",
+ "name",
+ "placeholder",
+ "readonly",
+ "required",
+ "rows",
+ "tabindex",
+ "wrap"
+];
+var tfoot = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var th = [
+ "abbr",
+ "align",
+ "axis",
+ "bgcolor",
+ "char",
+ "charoff",
+ "colspan",
+ "headers",
+ "height",
+ "nowrap",
+ "rowspan",
+ "scope",
+ "valign",
+ "width"
+];
+var thead = [
+ "align",
+ "char",
+ "charoff",
+ "valign"
+];
+var time = [
+ "datetime"
+];
+var tr = [
+ "align",
+ "bgcolor",
+ "char",
+ "charoff",
+ "valign"
+];
+var track = [
+ "default",
+ "kind",
+ "label",
+ "src",
+ "srclang"
+];
+var ul = [
+ "compact",
+ "type"
+];
+var video = [
+ "autoplay",
+ "controls",
+ "crossorigin",
+ "height",
+ "loop",
+ "muted",
+ "playsinline",
+ "poster",
+ "preload",
+ "src",
+ "width"
+];
+var index$1 = {
+ "*": [
+ "accesskey",
+ "autocapitalize",
+ "autofocus",
+ "class",
+ "contenteditable",
+ "dir",
+ "draggable",
+ "enterkeyhint",
+ "hidden",
+ "id",
+ "inputmode",
+ "is",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "nonce",
+ "slot",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+],
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data$1,
+ del: del$1,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$3,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$3,
+ map: map$1,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source$1,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video
+};
+
+var htmlElementAttributes = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ a: a,
+ abbr: abbr,
+ applet: applet,
+ area: area,
+ audio: audio,
+ base: base,
+ basefont: basefont,
+ bdo: bdo,
+ blockquote: blockquote,
+ body: body,
+ br: br,
+ button: button,
+ canvas: canvas,
+ caption: caption,
+ col: col,
+ colgroup: colgroup,
+ data: data$1,
+ del: del$1,
+ details: details,
+ dfn: dfn,
+ dialog: dialog,
+ dir: dir,
+ div: div,
+ dl: dl,
+ embed: embed$3,
+ fieldset: fieldset,
+ font: font,
+ form: form,
+ frame: frame,
+ frameset: frameset,
+ h1: h1,
+ h2: h2,
+ h3: h3,
+ h4: h4,
+ h5: h5,
+ h6: h6,
+ head: head,
+ hr: hr,
+ html: html,
+ iframe: iframe,
+ img: img,
+ input: input,
+ ins: ins,
+ isindex: isindex,
+ label: label,
+ legend: legend,
+ li: li,
+ link: link$3,
+ map: map$1,
+ menu: menu,
+ meta: meta,
+ meter: meter,
+ object: object,
+ ol: ol,
+ optgroup: optgroup,
+ option: option,
+ output: output,
+ p: p,
+ param: param,
+ pre: pre,
+ progress: progress,
+ q: q,
+ script: script,
+ select: select,
+ slot: slot,
+ source: source$1,
+ style: style,
+ table: table,
+ tbody: tbody,
+ td: td,
+ textarea: textarea,
+ tfoot: tfoot,
+ th: th,
+ thead: thead,
+ time: time,
+ tr: tr,
+ track: track,
+ ul: ul,
+ video: video,
+ 'default': index$1
+});
+
+var htmlTagNames$1 = getCjsExportFromNamespace(htmlTagNames);
+
+var htmlElementAttributes$1 = getCjsExportFromNamespace(htmlElementAttributes);
+
+const {
+ CSS_DISPLAY_TAGS,
+ CSS_DISPLAY_DEFAULT,
+ CSS_WHITE_SPACE_TAGS,
+ CSS_WHITE_SPACE_DEFAULT
+} = json$1;
+const HTML_TAGS = arrayToMap(htmlTagNames$1);
+const HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap);
+
+function arrayToMap(array) {
+ const map = Object.create(null);
+
+ for (const value of array) {
+ map[value] = true;
+ }
+
+ return map;
+}
+
+function mapObject(object, fn) {
+ const newObject = Object.create(null);
+
+ for (const key of Object.keys(object)) {
+ newObject[key] = fn(object[key], key);
+ }
+
+ return newObject;
+}
+
+function shouldPreserveContent(node, options) {
+ if (!node.endSourceSpan) {
+ return false;
+ }
+
+ if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") {
+ return true;
+ } // unterminated node in ie conditional comment
+ // e.g.
+
+
+ if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) {
+ return true;
+ } // incomplete html in ie conditional comment
+ // e.g.
+
+
+ if (node.type === "ieConditionalComment" && !node.complete) {
+ return true;
+ } // top-level elements (excluding , "!==this.input.substring(this.index,this.index+8)||"script"===t&&"<\/script>"!==this.input.substring(this.index,this.index+9)},t}();function V(t,e){return{path:t.PathExpression(e.path),params:e.params?e.params.map(e=>t.acceptNode(e)):[],hash:e.hash?t.Hash(e.hash):y.hash()}}function M(t,e){let{path:r,params:i,hash:a,loc:n}=e;if(P(r)){let i="{{".concat(N(r),"}}"),a="<".concat(t.name," ... ").concat(i," ...");throw new S("In ".concat(a,", ").concat(i,' is not a valid modifier: "').concat(r.original,'" on line ').concat(n&&n.start.line,"."),e.loc)}let s=y.elementModifier(r,i,a,n);t.modifiers.push(s)}function H(t,e){t.isDynamic=!0,t.parts.push(e)}const U={Program:r("body"),Template:r("body"),Block:r("body"),MustacheStatement:r("path","params","hash"),BlockStatement:r("path","params","hash","program","inverse"),ElementModifierStatement:r("path","params","hash"),PartialStatement:r("name","params","hash"),CommentStatement:r(),MustacheCommentStatement:r(),ElementNode:r("attributes","modifiers","children","comments"),AttrNode:r("value"),TextNode:r(),ConcatStatement:r("parts"),SubExpression:r("path","params","hash"),PathExpression:r(),StringLiteral:r(),BooleanLiteral:r(),NumberLiteral:r(),NullLiteral:r(),UndefinedLiteral:r(),Hash:r("pairs"),HashPair:r("value")},j=function(){function t(t,e,r,i){let a=Error.call(this,t);this.key=i,this.message=t,this.node=e,this.parent=r,this.stack=a.stack}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}();function $(t,e,r){return new j("Cannot remove a node unless it is part of an array",t,e,r)}function z(t,e,r){return new j("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function F(t,e){return new j("Replacing and removing in key handlers is not yet supported.",t,null,e)}class G{constructor(t,e=null,r=null){this.node=t,this.parent=e,this.parentKey=r}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new K(this)}}}class K{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}}function J(t){return"function"==typeof t?t:t.enter}function W(t){return"function"==typeof t?void 0:t.exit}function Q(t,e){let r,i,a,{node:n,parent:s,parentKey:o}=e,l=function(t,e){if(("Template"===e||"Block"===e)&&t.Program)return t.Program;let r=t[e];return void 0!==r?r:t.All}(t,n.type);if(void 0!==l&&(r=J(l),i=W(l)),void 0!==r&&(a=r(n,e)),null!=a){if(JSON.stringify(n)!==JSON.stringify(a)){if(Array.isArray(a))return X(t,a,s,o),a;return Q(t,new G(a,s,o))||a}a=void 0}if(void 0===a){let r=U[n.type];for(let i=0;i]/,nt=new RegExp(at.source,"g");function st(t){switch(t.charCodeAt(0)){case 160:return" ";case 34:return""";case 38:return"&";default:return t}}function ot(t){switch(t.charCodeAt(0)){case 160:return" ";case 38:return"&";case 60:return"<";case 62:return">";default:return t}}const lt=/\S/;class ct{constructor(t){this.buffer="",this.options=t}handledByOverride(t,e=!1){if(void 0!==this.options.override){let r=this.options.override(t,this.options);if("string"==typeof r)return e&<.test(r[0])&&(r=" ".concat(r)),this.buffer+=r,!0}return!1}Node(t){switch(t.type){case"MustacheStatement":case"BlockStatement":case"PartialStatement":case"MustacheCommentStatement":case"CommentStatement":case"TextNode":case"ElementNode":case"AttrNode":case"Block":case"Template":return this.TopLevelStatement(t);case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":case"PathExpression":case"SubExpression":return this.Expression(t);case"Program":return this.Block(t);case"ConcatStatement":return this.ConcatStatement(t);case"Hash":return this.Hash(t);case"HashPair":return this.HashPair(t);case"ElementModifierStatement":return this.ElementModifierStatement(t)}return ut(t,"Node")}Expression(t){switch(t.type){case"StringLiteral":case"BooleanLiteral":case"NumberLiteral":case"UndefinedLiteral":case"NullLiteral":return this.Literal(t);case"PathExpression":return this.PathExpression(t);case"SubExpression":return this.SubExpression(t)}return ut(t,"Expression")}Literal(t){switch(t.type){case"StringLiteral":return this.StringLiteral(t);case"BooleanLiteral":return this.BooleanLiteral(t);case"NumberLiteral":return this.NumberLiteral(t);case"UndefinedLiteral":return this.UndefinedLiteral(t);case"NullLiteral":return this.NullLiteral(t)}return ut(t,"Literal")}TopLevelStatement(t){switch(t.type){case"MustacheStatement":return this.MustacheStatement(t);case"BlockStatement":return this.BlockStatement(t);case"PartialStatement":return this.PartialStatement(t);case"MustacheCommentStatement":return this.MustacheCommentStatement(t);case"CommentStatement":return this.CommentStatement(t);case"TextNode":return this.TextNode(t);case"ElementNode":return this.ElementNode(t);case"Block":case"Template":return this.Block(t);case"AttrNode":return this.AttrNode(t)}ut(t,"TopLevelStatement")}Block(t){if(t.chained){t.body[0].chained=!0}this.handledByOverride(t)||this.TopLevelStatements(t.body)}TopLevelStatements(t){t.forEach(t=>this.TopLevelStatement(t))}ElementNode(t){this.handledByOverride(t)||(this.OpenElementNode(t),this.TopLevelStatements(t.children),this.CloseElementNode(t))}OpenElementNode(t){this.buffer+="<".concat(t.tag),t.attributes.length&&t.attributes.forEach(t=>{this.buffer+=" ",this.AttrNode(t)}),t.modifiers.length&&t.modifiers.forEach(t=>{this.buffer+=" ",this.ElementModifierStatement(t)}),t.comments.length&&t.comments.forEach(t=>{this.buffer+=" ",this.MustacheCommentStatement(t)}),t.blockParams.length&&this.BlockParams(t.blockParams),t.selfClosing&&(this.buffer+=" /"),this.buffer+=">"}CloseElementNode(t){t.selfClosing||Qt[t.tag.toLowerCase()]||(this.buffer+="".concat(t.tag,">"))}AttrNode(t){if(this.handledByOverride(t))return;let{name:e,value:r}=t;this.buffer+=e,("TextNode"!==r.type||r.chars.length>0)&&(this.buffer+="=",this.AttrNodeValue(r))}AttrNodeValue(t){"TextNode"===t.type?(this.buffer+='"',this.TextNode(t,!0),this.buffer+='"'):this.Node(t)}TextNode(t,e){var r;this.handledByOverride(t)||("raw"===this.options.entityEncoding?this.buffer+=t.chars:this.buffer+=e?(r=t.chars,rt.test(r)?r.replace(it,st):r):function(t){return at.test(t)?t.replace(nt,ot):t}(t.chars))}MustacheStatement(t){this.handledByOverride(t)||(this.buffer+=t.escaped?"{{":"{{{",t.strip.open&&(this.buffer+="~"),this.Expression(t.path),this.Params(t.params),this.Hash(t.hash),t.strip.close&&(this.buffer+="~"),this.buffer+=t.escaped?"}}":"}}}")}BlockStatement(t){this.handledByOverride(t)||(t.chained?(this.buffer+=t.inverseStrip.open?"{{~":"{{",this.buffer+="else "):this.buffer+=t.openStrip.open?"{{~#":"{{#",this.Expression(t.path),this.Params(t.params),this.Hash(t.hash),t.program.blockParams.length&&this.BlockParams(t.program.blockParams),t.chained?this.buffer+=t.inverseStrip.close?"~}}":"}}":this.buffer+=t.openStrip.close?"~}}":"}}",this.Block(t.program),t.inverse&&(t.inverse.chained||(this.buffer+=t.inverseStrip.open?"{{~":"{{",this.buffer+="else",this.buffer+=t.inverseStrip.close?"~}}":"}}"),this.Block(t.inverse)),t.chained||(this.buffer+=t.closeStrip.open?"{{~/":"{{/",this.Expression(t.path),this.buffer+=t.closeStrip.close?"~}}":"}}"))}BlockParams(t){this.buffer+=" as |".concat(t.join(" "),"|")}PartialStatement(t){this.handledByOverride(t)||(this.buffer+="{{>",this.Expression(t.name),this.Params(t.params),this.Hash(t.hash),this.buffer+="}}")}ConcatStatement(t){this.handledByOverride(t)||(this.buffer+='"',t.parts.forEach(t=>{"TextNode"===t.type?this.TextNode(t,!0):this.Node(t)}),this.buffer+='"')}MustacheCommentStatement(t){this.handledByOverride(t)||(this.buffer+="{{!--".concat(t.value,"--}}"))}ElementModifierStatement(t){this.handledByOverride(t)||(this.buffer+="{{",this.Expression(t.path),this.Params(t.params),this.Hash(t.hash),this.buffer+="}}")}CommentStatement(t){this.handledByOverride(t)||(this.buffer+="\x3c!--".concat(t.value,"--\x3e"))}PathExpression(t){this.handledByOverride(t)||(this.buffer+=t.original)}SubExpression(t){this.handledByOverride(t)||(this.buffer+="(",this.Expression(t.path),this.Params(t.params),this.Hash(t.hash),this.buffer+=")")}Params(t){t.length&&t.forEach(t=>{this.buffer+=" ",this.Expression(t)})}Hash(t){this.handledByOverride(t,!0)||t.pairs.forEach(t=>{this.buffer+=" ",this.HashPair(t)})}HashPair(t){this.handledByOverride(t)||(this.buffer+=t.key,this.buffer+="=",this.Node(t.value))}StringLiteral(t){this.handledByOverride(t)||(this.buffer+=JSON.stringify(t.value))}BooleanLiteral(t){this.handledByOverride(t)||(this.buffer+=t.value)}NumberLiteral(t){this.handledByOverride(t)||(this.buffer+=t.value)}UndefinedLiteral(t){this.handledByOverride(t)||(this.buffer+="undefined")}NullLiteral(t){this.handledByOverride(t)||(this.buffer+="null")}print(t){let{options:e}=this;if(e.override){let r=e.override(t,e);if(void 0!==r)return r}return this.buffer="",this.Node(t),this.buffer}}function ut(t,e){let{loc:r,type:i}=t;throw new Error("Non-exhaustive node narrowing ".concat(i," @ location: ").concat(JSON.stringify(r)," for parent ").concat(e))}function ht(t,e={entityEncoding:"transformed"}){if(!t)return"";return new ct(e).print(t)}class pt{constructor(t){this.order=t,this.stack=[]}visit(t,e){t&&(this.stack.push(t),"post"===this.order?(this.children(t,e),e(t,this)):(e(t,this),this.children(t,e)),this.stack.pop())}children(t,e){let r;r="Block"===t.type||"Template"===t.type&&dt.Program?"Program":t.type;let i=dt[r];i&&i(this,t,e)}}let dt={Program(t,e,r){for(let i=0;i":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,a=/[&<>"'`=]/;function n(t){return r[t]}function s(t){for(var e=1;e0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):i(this);if(r.data&&r.ids){var n=bt.createFrame(r.data);n.contextPath=bt.appendContextPath(r.data.contextPath,r.name),r={data:n}}return a(e,r)}))},t.exports=e.default}));mt(yt);var kt=gt((function(t,e){e.__esModule=!0;var r,i=(r=vt)&&r.__esModule?r:{default:r};e.default=function(t){t.registerHelper("each",(function(t,e){if(!e)throw new i.default("Must pass iterator to #each");var r,a=e.fn,n=e.inverse,s=0,o="",l=void 0,c=void 0;function u(e,r,i){l&&(l.key=e,l.index=r,l.first=0===r,l.last=!!i,c&&(l.contextPath=c+e)),o+=a(t[e],{data:l,blockParams:bt.blockParams([t[e],e],[c+e,null])})}if(e.data&&e.ids&&(c=bt.appendContextPath(e.data.contextPath,e.ids[0])+"."),bt.isFunction(t)&&(t=t.call(this)),e.data&&(l=bt.createFrame(e.data)),t&&"object"==typeof t)if(bt.isArray(t))for(var h=t.length;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var i=arguments.length,a=Array(i>1?i-1:0),n=1;n= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function n(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Nt.registerDefaultHelpers(this),At.registerDefaultDecorators(this)}n.prototype={constructor:n,logger:a.default,log:a.default.log,registerHelper:function(t,e){if("[object Object]"===bt.toString.call(t)){if(e)throw new i.default("Arg not supported with multiple helpers");bt.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===bt.toString.call(t))bt.extend(this.partials,t);else{if(void 0===e)throw new i.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===bt.toString.call(t)){if(e)throw new i.default("Arg not supported with multiple decorators");bt.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){Ct.resetLoggedProperties()}};var s=a.default.log;e.log=s,e.createFrame=bt.createFrame,e.logger=a.default}));mt(Dt);Dt.HandlebarsEnvironment,Dt.VERSION,Dt.COMPILER_REVISION,Dt.LAST_COMPATIBLE_COMPILER_REVISION,Dt.REVISION_CHANGES,Dt.log,Dt.createFrame,Dt.logger;var qt=gt((function(t,e){function r(t){this.string=t}e.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,t.exports=e.default}));mt(qt);var Ot=gt((function(t,e){e.__esModule=!0,e.wrapHelper=function(t,e){if("function"!=typeof t)return t;return function(){var r=arguments[arguments.length-1];return arguments[arguments.length-1]=e(r),t.apply(this,arguments)}}}));mt(Ot);Ot.wrapHelper;var Bt=gt((function(t,e){e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,r=Dt.COMPILER_REVISION;if(e>=Dt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Dt.COMPILER_REVISION)return;if(e2&&y.push("'"+this.terminals_[g]+"'");w=this.lexer.showPosition?"Parse error on line "+(o+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(w,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:y})}}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+p);switch(f[0]){case 1:r.push(p),i.push(this.lexer.yytext),a.push(this.lexer.yylloc),r.push(f[1]),p=null,l=this.lexer.yyleng,s=this.lexer.yytext,o=this.lexer.yylineno,u=this.lexer.yylloc,c>0&&c--;break;case 2:if(b=this.productions_[f[1]][1],S.$=i[i.length-b],S._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},h&&(S._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(m=this.performAction.call(S,s,l,o,this.yy,f[1],i,a)))return m;b&&(r=r.slice(0,-1*b*2),i=i.slice(0,-1*b),a=a.slice(0,-1*b)),r.push(this.productions_[f[1]][0]),i.push(S.$),a.push(S._$),v=n[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,r,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)||(e=r,i=s,this.options.flex));s++);return e?((a=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,n[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,r,i){function a(t,r){return e.yytext=e.yytext.substring(t,e.yyleng-r+t)}switch(r){case 0:if("\\\\"===e.yytext.slice(-2)?(a(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(a(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(a(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=a(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=a(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return t}();function r(){this.yy={}}return t.lexer=e,r.prototype=t,t.Parser=r,new r}();e.default=r,t.exports=e.default}));mt(Mt);var Ht=gt((function(t,e){e.__esModule=!0;var r,i=(r=vt)&&r.__esModule?r:{default:r};function a(){this.parents=[]}function n(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function s(t){n.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function o(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}a.prototype={constructor:a,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!a.prototype[r.type])throw new i.default('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new i.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e0)throw new i.default("Invalid path: "+a,{loc:r});".."===c&&s++}}return{type:"PathExpression",data:t,depth:s,parts:n,original:a,loc:r}},e.prepareMustache=function(t,e,r,i,a,n){var s=i.charAt(3)||i.charAt(2),o="{"!==s&&"&"!==s;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:a,loc:this.locInfo(n)}},e.prepareRawBlock=function(t,e,r,i){a(t,r),i=this.locInfo(i);var n={type:"Program",body:e,strip:{},loc:i};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:n,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}},e.prepareBlock=function(t,e,r,n,s,o){n&&n.path&&a(t,n);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,u=void 0;if(r){if(l)throw new i.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),u=r.strip,c=r.program}s&&(s=c,c=e,e=s);return{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:u,closeStrip:n&&n.strip,loc:this.locInfo(o)}},e.prepareProgram=function(t,e){if(!e&&t.length){var r=t[0].loc,i=t[t.length-1].loc;r&&i&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,r,i){return a(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(i)}};var r,i=(r=vt)&&r.__esModule?r:{default:r};function a(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new i.default(t.path.original+" doesn't match "+e,r)}}}));mt(jt);jt.SourceLocation,jt.id,jt.stripFlags,jt.stripComment,jt.preparePath,jt.prepareMustache,jt.prepareRawBlock,jt.prepareBlock,jt.prepareProgram,jt.preparePartialBlock;var $t=gt((function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.parseWithoutProcessing=o,e.parse=function(t,e){var r=o(t,e);return new a.default(e).accept(r)};var i=r(Mt),a=r(Ut),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(jt);e.parser=i.default;var s={};function o(t,e){return"Program"===t.type?t:(i.default.yy=s,s.locInfo=function(t){return new s.SourceLocation(e&&e.srcName,t)},i.default.parse(t))}bt.extend(s,n)}));mt($t);$t.parseWithoutProcessing,$t.parse,$t.parser;var zt=gt((function(t,e){function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.Compiler=s,e.precompile=function(t,e,r){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var a=r.parse(t,e),n=(new r.Compiler).compile(a,e);return(new r.JavaScriptCompiler).compile(n,e)},e.compile=function(t,e,r){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new i.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=bt.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var a=void 0;function n(){var i=r.parse(t,e),a=(new r.Compiler).compile(i,e),n=(new r.JavaScriptCompiler).compile(a,e,void 0,!0);return r.template(n)}function s(t,e){return a||(a=n()),a.call(this,t,e)}return s._setup=function(t){return a||(a=n()),a._setup(t)},s._child=function(t,e,r,i){return a||(a=n()),a._child(t,e,r,i)},s};var i=r(vt),a=r(Vt),n=[].slice;function s(){}function o(t,e){if(t===e)return!0;if(bt.isArray(t)&&bt.isArray(e)&&t.length===e.length){for(var r=0;r1)throw new i.default("Unsupported number of partial arguments: "+r.length,t);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var a=t.name.original,n="SubExpression"===t.name.type;n&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",n,a,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){l(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,r){var i=t.path,a=i.parts[0],n=null!=e||null!=r;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",a,n)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,r){var n=this.setupFullMustacheParams(t,e,r),s=t.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",n.length,o);else{if(this.options.knownHelpersOnly)throw new i.default("You specified knownHelpersOnly, but used the unknown helper "+o,t);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",n.length,s.original,a.default.helpers.simpleId(s))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],r=a.default.helpers.scopedId(t),i=!t.depth&&!r&&this.blockParamIndex(e);i?this.opcode("lookupBlockParam",i,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,r):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,r=0,i=e.length;for(this.opcode("pushHash");r=0)return[e,a]}}}}));mt(zt);zt.Compiler,zt.precompile,zt.compile;var Ft=gt((function(t,e){e.__esModule=!0;var r=void 0;try{var i=require("source-map");r=i.SourceNode}catch(t){}function a(t,e,r){if(bt.isArray(t)){for(var i=[],a=0,n=t.length;a0&&(r+=", "+i.join(", "));var a=0;Object.keys(this.aliases).forEach((function(t){var i=e.aliases[t];i.children&&i.referenceCount>1&&(r+=", alias"+ ++a+"="+t,i.children[0]="alias"+a)})),this.lookupPropertyFunctionIsUsed&&(r+=", "+this.lookupPropertyFunctionVarDeclaration());var n=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths");var s=this.mergeSource(r);return t?(n.push(s),Function.apply(this,n)):this.source.wrap(["function(",n.join(","),") {\n ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,r=!this.forceBuffer,i=void 0,a=void 0,n=void 0,s=void 0;return this.source.each((function(t){t.appendToBuffer?(n?t.prepend(" + "):n=t,s=t):(n&&(a?n.prepend("buffer += "):i=!0,s.add(";"),n=s=void 0),a=!0,e||(r=!1))})),r?n?(n.prepend("return "),s.add(";")):a||this.source.push('return "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),n?(n.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(t){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(t,0,r);var i=this.popStack();r.splice(1,0,i),this.push(this.source.functionCall(e,"call",r))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var r=this.topStack();e.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack((function(t){return[" != null ? ",t,' : ""']})),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,r,i){var a=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[a++])),this.resolvePath("context",t,a,e,r)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,r){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,r)},resolvePath:function(t,e,r,i,a){var n=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,r,i){var a=e.popStack(),n=0,s=r.length;t&&s--;for(;nthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,r=t.length;e{Qt[t]=!0});class Yt extends class extends class{constructor(t,e=new C(L)){this.elementStack=[],this.currentAttribute=null,this.currentNode=null,this.source=t.split(/(?:\r\n?|\n)/g),this.tokenizer=new R(this,e)}get currentAttr(){return this.currentAttribute}get currentTag(){return this.currentNode}get currentStartTag(){return this.currentNode}get currentEndTag(){return this.currentNode}get currentComment(){return this.currentNode}get currentData(){return this.currentNode}acceptTemplate(t){return this[t.type](t)}acceptNode(t){return this[t.type](t)}currentElement(){return this.elementStack[this.elementStack.length-1]}sourceForNode(t,e){let r,i,a,n=t.loc.start.line-1,s=n-1,o=t.loc.start.column,l=[];for(e?(i=e.loc.end.line-1,a=e.loc.end.column):(i=t.loc.end.line-1,a=t.loc.end.column);s{if("guid"===t.key)throw new S("Cannot pass `guid` from user space",r);"insertBefore"===t.key&&(i=!0)});let a=y.literal("StringLiteral",t),n=y.pair("guid",a);if(e.pairs.unshift(n),!i){let t=y.literal("UndefinedLiteral",void 0),r=y.pair("insertBefore",t);e.pairs.push(r)}return e}(this.cursor(),i,t.loc));let s=y.block(e,r,i,a,n,t.loc,t.openStrip,t.inverseStrip,t.closeStrip);E(this.currentElement(),s)}MustacheStatement(t){let e,{tokenizer:r}=this;if("comment"===r.state)return void this.appendToCommentData(this.sourceForNode(t));let{escaped:i,loc:a,strip:n}=t;if(P(t.path))e={type:"MustacheStatement",path:this.acceptNode(t.path),params:[],hash:y.hash(),escaped:i,loc:a,strip:n};else{let{path:r,params:s,hash:o}=V(this,t);e=y.mustache(r,s,o,!i,a,n)}switch(r.state){case"tagOpen":case"tagName":throw new S("Cannot use mustaches in an elements tagname: `".concat(this.sourceForNode(t,t.path),"` at L").concat(a.start.line,":C").concat(a.start.column),e.loc);case"beforeAttributeName":M(this.currentStartTag,e);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),M(this.currentStartTag,e),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":M(this.currentStartTag,e),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),H(this.currentAttribute,e),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":H(this.currentAttribute,e);break;default:E(this.currentElement(),e)}return e}ContentStatement(t){!function(t,e){let r=e.loc.start.line,i=e.loc.start.column,a=function(t,e){if(""===e)return{lines:t.split("\n").length-1,columns:0};let r=t.split(e)[0].split(/\n/),i=r.length-1;return{lines:i,columns:r[i].length}}(e.original,e.value);r+=a.lines,a.lines?i=a.columns:i+=a.columns;t.line=r,t.column=i}(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:e}=this;if("comment"===e.state)return this.appendToCommentData(this.sourceForNode(t)),null;let{value:r,loc:i}=t,a=y.mustacheComment(r,i);switch(e.state){case"beforeAttributeName":this.currentStartTag.comments.push(a);break;case"beforeData":case"data":E(this.currentElement(),a);break;default:throw new S("Using a Handlebars comment when in the `".concat(e.state,'` state is not supported: "').concat(a.value,'" on line ').concat(i.start.line,":").concat(i.start.column),t.loc)}return a}PartialStatement(t){let{loc:e}=t;throw new S('Handlebars partials are not supported: "'.concat(this.sourceForNode(t,t.name),'" at L').concat(e.start.line,":C").concat(e.start.column),t.loc)}PartialBlockStatement(t){let{loc:e}=t;throw new S('Handlebars partial blocks are not supported: "'.concat(this.sourceForNode(t,t.name),'" at L').concat(e.start.line,":C").concat(e.start.column),t.loc)}Decorator(t){let{loc:e}=t;throw new S('Handlebars decorators are not supported: "'.concat(this.sourceForNode(t,t.path),'" at L').concat(e.start.line,":C").concat(e.start.column),t.loc)}DecoratorBlock(t){let{loc:e}=t;throw new S('Handlebars decorator blocks are not supported: "'.concat(this.sourceForNode(t,t.path),'" at L').concat(e.start.line,":C").concat(e.start.column),t.loc)}SubExpression(t){let{path:e,params:r,hash:i}=V(this,t);return y.sexpr(e,r,i,t.loc)}PathExpression(t){let e,{original:r,loc:i}=t;if(-1!==r.indexOf("/")){if("./"===r.slice(0,2))throw new S('Using "./" is not supported in Glimmer and unnecessary: "'.concat(t.original,'" on line ').concat(i.start.line,"."),t.loc);if("../"===r.slice(0,3))throw new S('Changing context using "../" is not supported in Glimmer: "'.concat(t.original,'" on line ').concat(i.start.line,"."),t.loc);if(-1!==r.indexOf("."))throw new S("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths: \"".concat(t.original,'" on line ').concat(i.start.line,"."),t.loc);e=[t.parts.join("/")]}else{if("."===r){let e="L".concat(i.start.line,":C").concat(i.start.column);throw new S("'.' is not a supported path in Glimmer; check for a path with a trailing '.' at ".concat(e,"."),t.loc)}e=t.parts}let a=!1;return r.match(/^this(\..+)?$/)&&(a=!0),{type:"PathExpression",original:t.original,this:a,parts:e,data:t.data,loc:t.loc}}Hash(t){let e=[];for(let r=0;r' character, or '/>' (on line ".concat(i,")"),y.loc(i,0))}return t.length>0?t[0]:y.text("")}(e,r,i,this.tokenizer.line);s.loc=y.loc(a,n,this.tokenizer.line,this.tokenizer.column);let o=y.loc(this.currentAttr.start.line,this.currentAttr.start.column,this.tokenizer.line,this.tokenizer.column),l=y.attr(t,s,o);this.currentStartTag.attributes.push(l)}reportSyntaxError(t){throw new S("Syntax error at line ".concat(this.tokenizer.line," col ").concat(this.tokenizer.column,": ").concat(t),y.loc(this.tokenizer.line,this.tokenizer.column))}}function Zt(t){return"`"+t.name+"` (on line "+t.loc.end.line+")"}const Xt={parse:te,builders:y,print:ht,traverse:et,Walker:pt};function te(t,e={}){let r,i=e.mode||"precompile";r="object"==typeof t?t:"codemod"===i?Wt(t,e.parseOptions):Jt(t,e.parseOptions);let n=void 0;"codemod"===i&&(n=new C({}));let s=new Yt(t,n).acceptTemplate(r);if(e&&e.plugins&&e.plugins.ast)for(let t=0,r=e.plugins.ast.length;tt.loc&&t.loc.start,locEnd:t=>t.loc&&t.loc.end}}},ae=ie.parsers;t.default=ie,t.parsers=ae,Object.defineProperty(t,"__esModule",{value:!0})}));
diff --git a/node_modules/prettier/parser-graphql.js b/node_modules/prettier/parser-graphql.js
new file mode 100644
index 0000000..78e834b
--- /dev/null
+++ b/node_modules/prettier/parser-graphql.js
@@ -0,0 +1 @@
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql={}))}(this,(function(e){"use strict";var n=function(e,n){const t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};var t={hasPragma:function(e){return/^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,n){return e(n={exports:{}},n.exports),n.exports}var o=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SYMBOL_TO_STRING_TAG=n.SYMBOL_ASYNC_ITERATOR=n.SYMBOL_ITERATOR=void 0;var t="function"==typeof Symbol?Symbol.iterator:"@@iterator";n.SYMBOL_ITERATOR=t;var i="function"==typeof Symbol?Symbol.asyncIterator:"@@asyncIterator";n.SYMBOL_ASYNC_ITERATOR=i;var r="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";n.SYMBOL_TO_STRING_TAG=r}));i(o);o.SYMBOL_TO_STRING_TAG,o.SYMBOL_ASYNC_ITERATOR,o.SYMBOL_ITERATOR;var a=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){if(!Boolean(e))throw new Error(n)}}));i(a);var s=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t,i=(t=a)&&t.__esModule?t:{default:t};function r(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=n,this.locationOffset=t,this.locationOffset.line>0||(0,i.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,i.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var n,t,a;return n=e,(t=[{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&r(n.prototype,t),a&&r(n,a),e}();n.Source=s}));i(s);s.Source;var c=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t,i=/\r\n|[\n\r]/g,r=1,o=n+1;for(;(t=i.exec(e.body))&&t.index120){for(var h=Math.floor(l/80),T=l%80,v=[],E=0;E",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"});n.TokenKind=t}));i(d);d.TokenKind;var p=r((function(e,n){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return"object"==t(e)&&null!==e}}));i(p);var f=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.printError=y,n.GraphQLError=void 0;var t,i=(t=p)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=n,e.prototype.inspect=n,i.default&&(e.prototype[i.default]=n)};var t,i=(t=T)&&t.__esModule?t:{default:t}}));i(v);var E=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isNode=function(e){return null!=e&&"string"==typeof e.kind},n.Token=n.Location=void 0;var t,i=(t=v)&&t.__esModule?t:{default:t};var r=function(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t};n.Location=r,(0,i.default)(r,(function(){return{start:this.start,end:this.end}}));var o=function(e,n,t,i,r,o,a){this.kind=e,this.start=n,this.end=t,this.line=i,this.column=r,this.value=a,this.prev=o,this.next=null};n.Token=o,(0,i.default)(o,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))}));i(E);E.isNode,E.Token,E.Location;var y=r((function(e,n){function t(e){for(var n=null,t=1;t0&&r(n[0]);)n.shift();for(;n.length>0&&r(n[n.length-1]);)n.pop();return n.join("\n")},n.getBlockStringIndentation=t,n.printBlockString=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===e.indexOf("\n"),r=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!i||o||t,s="";!a||i&&r||(s+="\n"+n);s+=n?e.replace(/\n/g,"\n"+n):e,a&&(s+="\n");return'"""'+s.replace(/"""/g,'\\"""')+'"""'}}));i(y);y.dedentBlockStringValue,y.getBlockStringIndentation,y.printBlockString;var N=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isPunctuatorTokenKind=function(e){return e===d.TokenKind.BANG||e===d.TokenKind.DOLLAR||e===d.TokenKind.AMP||e===d.TokenKind.PAREN_L||e===d.TokenKind.PAREN_R||e===d.TokenKind.SPREAD||e===d.TokenKind.COLON||e===d.TokenKind.EQUALS||e===d.TokenKind.AT||e===d.TokenKind.BRACKET_L||e===d.TokenKind.BRACKET_R||e===d.TokenKind.BRACE_L||e===d.TokenKind.PIPE||e===d.TokenKind.BRACE_R},n.Lexer=void 0;var t=function(){function e(e){var n=new E.Token(d.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var n=e.prototype;return n.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},n.lookahead=function(){var e=this.token;if(e.kind!==d.TokenKind.EOF)do{var n;e=null!==(n=e.next)&&void 0!==n?n:e.next=r(this,e)}while(e.kind===d.TokenKind.COMMENT);return e},e}();function i(e){return isNaN(e)?d.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function r(e,n){var t=e.source,r=t.body,s=r.length,c=function(e,n,t){var i=e.length,r=n;for(;r=s)return new E.Token(d.TokenKind.EOF,s,s,u,l,n);var p=r.charCodeAt(c);switch(p){case 33:return new E.Token(d.TokenKind.BANG,c,c+1,u,l,n);case 35:return function(e,n,t,i,r){var o,a=e.body,s=n;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new E.Token(d.TokenKind.COMMENT,n,s,t,i,r,a.slice(n+1,s))}(t,c,u,l,n);case 36:return new E.Token(d.TokenKind.DOLLAR,c,c+1,u,l,n);case 38:return new E.Token(d.TokenKind.AMP,c,c+1,u,l,n);case 40:return new E.Token(d.TokenKind.PAREN_L,c,c+1,u,l,n);case 41:return new E.Token(d.TokenKind.PAREN_R,c,c+1,u,l,n);case 46:if(46===r.charCodeAt(c+1)&&46===r.charCodeAt(c+2))return new E.Token(d.TokenKind.SPREAD,c,c+3,u,l,n);break;case 58:return new E.Token(d.TokenKind.COLON,c,c+1,u,l,n);case 61:return new E.Token(d.TokenKind.EQUALS,c,c+1,u,l,n);case 64:return new E.Token(d.TokenKind.AT,c,c+1,u,l,n);case 91:return new E.Token(d.TokenKind.BRACKET_L,c,c+1,u,l,n);case 93:return new E.Token(d.TokenKind.BRACKET_R,c,c+1,u,l,n);case 123:return new E.Token(d.TokenKind.BRACE_L,c,c+1,u,l,n);case 124:return new E.Token(d.TokenKind.PIPE,c,c+1,u,l,n);case 125:return new E.Token(d.TokenKind.BRACE_R,c,c+1,u,l,n);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 function(e,n,t,i,r){var o=e.body,a=o.length,s=n+1,c=0;for(;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new E.Token(d.TokenKind.NAME,n,s,t,i,r,o.slice(n,s))}(t,c,u,l,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,r,a,s){var c=e.body,u=t,l=n,p=!1;45===u&&(u=c.charCodeAt(++l));if(48===u){if((u=c.charCodeAt(++l))>=48&&u<=57)throw(0,h.syntaxError)(e,l,"Invalid number, unexpected digit after 0: ".concat(i(u),"."))}else l=o(e,l,u),u=c.charCodeAt(l);46===u&&(p=!0,u=c.charCodeAt(++l),l=o(e,l,u),u=c.charCodeAt(l));69!==u&&101!==u||(p=!0,43!==(u=c.charCodeAt(++l))&&45!==u||(u=c.charCodeAt(++l)),l=o(e,l,u),u=c.charCodeAt(l));if(46===u||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(u))throw(0,h.syntaxError)(e,l,"Invalid number, expected digit but got: ".concat(i(u),"."));return new E.Token(p?d.TokenKind.FLOAT:d.TokenKind.INT,n,l,r,a,s,c.slice(n,l))}(t,c,p,u,l,n);case 34:return 34===r.charCodeAt(c+1)&&34===r.charCodeAt(c+2)?function(e,n,t,r,o,a){var s=e.body,c=n+3,u=c,l=0,p="";for(;c=48&&a<=57){do{a=r.charCodeAt(++o)}while(a>=48&&a<=57);return o}throw(0,h.syntaxError)(e,o,"Invalid number, expected digit but got: ".concat(i(a),"."))}function a(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}n.Lexer=t}));i(N);N.isPunctuatorTokenKind,N.Lexer;var m=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return o(e,[])};var t,i=(t=T)&&t.__esModule?t:{default:t};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,n){switch(r(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,n){if(-1!==n.indexOf(e))return"[Circular]";var t=[].concat(n,[e]),r=function(e){var n=e[String(i.default)];if("function"==typeof n)return n;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var a=r.call(e);if(a!==e)return"string"==typeof a?a:o(a,t)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>2)return"[Array]";for(var t=Math.min(10,e.length),i=e.length-t,r=[],a=0;a1&&r.push("... ".concat(i," more items"));return"["+r.join(", ")+"]"}(e,t);return function(e,n){var t=Object.keys(e);if(0===t.length)return"{}";if(n.length>2)return"["+function(e){var n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){var t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return n}(e)+"]";return"{ "+t.map((function(t){return t+": "+o(e[t],n)})).join(", ")+" }"}(e,t)}(e,n);default:return String(e)}}}));i(m);var k=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectiveLocation=void 0;var t=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"});n.DirectiveLocation=t}));i(k);k.DirectiveLocation;var _=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){return new o(e,n).parseDocument()},n.parseValue=function(e,n){var t=new o(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseValueLiteral(!1);return t.expectToken(d.TokenKind.EOF),i},n.parseType=function(e,n){var t=new o(e,n);t.expectToken(d.TokenKind.SOF);var i=t.parseTypeReference();return t.expectToken(d.TokenKind.EOF),i};var t=r(m),i=r(a);function r(e){return e&&e.__esModule?e:{default:e}}var o=function(){function e(e,n){var r="string"==typeof e?new s.Source(e):e;r instanceof s.Source||(0,i.default)(0,"Must provide Source. Received: ".concat((0,t.default)(r),".")),this._lexer=new N.Lexer(r),this._options=n}var n=e.prototype;return n.parseName=function(){var e=this.expectToken(d.TokenKind.NAME);return{kind:l.Kind.NAME,value:e.value,loc:this.loc(e)}},n.parseDocument=function(){var e=this._lexer.token;return{kind:l.Kind.DOCUMENT,definitions:this.many(d.TokenKind.SOF,this.parseDefinition,d.TokenKind.EOF),loc:this.loc(e)}},n.parseDefinition=function(){if(this.peek(d.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(d.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},n.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(d.TokenKind.BRACE_L))return{kind:l.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var n,t=this.parseOperationType();return this.peek(d.TokenKind.NAME)&&(n=this.parseName()),{kind:l.Kind.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseOperationType=function(){var e=this.expectToken(d.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},n.parseVariableDefinitions=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseVariableDefinition,d.TokenKind.PAREN_R)},n.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},n.parseVariable=function(){var e=this._lexer.token;return this.expectToken(d.TokenKind.DOLLAR),{kind:l.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},n.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.Kind.SELECTION_SET,selections:this.many(d.TokenKind.BRACE_L,this.parseSelection,d.TokenKind.BRACE_R),loc:this.loc(e)}},n.parseSelection=function(){return this.peek(d.TokenKind.SPREAD)?this.parseFragment():this.parseField()},n.parseField=function(){var e,n,t=this._lexer.token,i=this.parseName();return this.expectOptionalToken(d.TokenKind.COLON)?(e=i,n=this.parseName()):n=i,{kind:l.Kind.FIELD,alias:e,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(t)}},n.parseArguments=function(e){var n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.TokenKind.PAREN_L,n,d.TokenKind.PAREN_R)},n.parseArgument=function(){var e=this._lexer.token,n=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(!1),loc:this.loc(e)}},n.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(d.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},n.parseFragment=function(){var e=this._lexer.token;this.expectToken(d.TokenKind.SPREAD);var n=this.expectOptionalKeyword("on");return!n&&this.peek(d.TokenKind.NAME)?{kind:l.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},n.parseFragmentDefinition=function(){var e,n=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}:{kind:l.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},n.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},n.parseValueLiteral=function(e){var n=this._lexer.token;switch(n.kind){case d.TokenKind.BRACKET_L:return this.parseList(e);case d.TokenKind.BRACE_L:return this.parseObject(e);case d.TokenKind.INT:return this._lexer.advance(),{kind:l.Kind.INT,value:n.value,loc:this.loc(n)};case d.TokenKind.FLOAT:return this._lexer.advance(),{kind:l.Kind.FLOAT,value:n.value,loc:this.loc(n)};case d.TokenKind.STRING:case d.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case d.TokenKind.NAME:switch(this._lexer.advance(),n.value){case"true":return{kind:l.Kind.BOOLEAN,value:!0,loc:this.loc(n)};case"false":return{kind:l.Kind.BOOLEAN,value:!1,loc:this.loc(n)};case"null":return{kind:l.Kind.NULL,loc:this.loc(n)};default:return{kind:l.Kind.ENUM,value:n.value,loc:this.loc(n)}}case d.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},n.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.Kind.STRING,value:e.value,block:e.kind===d.TokenKind.BLOCK_STRING,loc:this.loc(e)}},n.parseList=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.LIST,values:this.any(d.TokenKind.BRACKET_L,(function(){return n.parseValueLiteral(e)}),d.TokenKind.BRACKET_R),loc:this.loc(t)}},n.parseObject=function(e){var n=this,t=this._lexer.token;return{kind:l.Kind.OBJECT,fields:this.any(d.TokenKind.BRACE_L,(function(){return n.parseObjectField(e)}),d.TokenKind.BRACE_R),loc:this.loc(t)}},n.parseObjectField=function(e){var n=this._lexer.token,t=this.parseName();return this.expectToken(d.TokenKind.COLON),{kind:l.Kind.OBJECT_FIELD,name:t,value:this.parseValueLiteral(e),loc:this.loc(n)}},n.parseDirectives=function(e){for(var n=[];this.peek(d.TokenKind.AT);)n.push(this.parseDirective(e));return n},n.parseDirective=function(e){var n=this._lexer.token;return this.expectToken(d.TokenKind.AT),{kind:l.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(n)}},n.parseTypeReference=function(){var e,n=this._lexer.token;return this.expectOptionalToken(d.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(d.TokenKind.BRACKET_R),e={kind:l.Kind.LIST_TYPE,type:e,loc:this.loc(n)}):e=this.parseNamedType(),this.expectOptionalToken(d.TokenKind.BANG)?{kind:l.Kind.NON_NULL_TYPE,type:e,loc:this.loc(n)}:e},n.parseNamedType=function(){var e=this._lexer.token;return{kind:l.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},n.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===d.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)},n.peekDescription=function(){return this.peek(d.TokenKind.STRING)||this.peek(d.TokenKind.BLOCK_STRING)},n.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},n.parseSchemaDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");var t=this.parseDirectives(!0),i=this.many(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);return{kind:l.Kind.SCHEMA_DEFINITION,description:n,directives:t,operationTypes:i,loc:this.loc(e)}},n.parseOperationTypeDefinition=function(){var e=this._lexer.token,n=this.parseOperationType();this.expectToken(d.TokenKind.COLON);var t=this.parseNamedType();return{kind:l.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:t,loc:this.loc(e)}},n.parseScalarTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");var t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.SCALAR_TYPE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");var t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:l.Kind.OBJECT_TYPE_DEFINITION,description:n,name:t,interfaces:i,directives:r,fields:o,loc:this.loc(e)}},n.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(d.TokenKind.AMP);do{var n;e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.AMP)||!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLImplementsInterfaces)&&this.peek(d.TokenKind.NAME))}return e},n.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(d.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===d.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(d.TokenKind.BRACE_L,this.parseFieldDefinition,d.TokenKind.BRACE_R)},n.parseFieldDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.TokenKind.COLON);var r=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:l.Kind.FIELD_DEFINITION,description:n,name:t,arguments:i,type:r,directives:o,loc:this.loc(e)}},n.parseArgumentDefs=function(){return this.optionalMany(d.TokenKind.PAREN_L,this.parseInputValueDef,d.TokenKind.PAREN_R)},n.parseInputValueDef=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName();this.expectToken(d.TokenKind.COLON);var i,r=this.parseTypeReference();this.expectOptionalToken(d.TokenKind.EQUALS)&&(i=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:l.Kind.INPUT_VALUE_DEFINITION,description:n,name:t,type:r,defaultValue:i,directives:o,loc:this.loc(e)}},n.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");var t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:l.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:t,interfaces:i,directives:r,fields:o,loc:this.loc(e)}},n.parseUnionTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:l.Kind.UNION_TYPE_DEFINITION,description:n,name:t,directives:i,types:r,loc:this.loc(e)}},n.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(d.TokenKind.EQUALS)){this.expectOptionalToken(d.TokenKind.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(d.TokenKind.PIPE))}return e},n.parseEnumTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:l.Kind.ENUM_TYPE_DEFINITION,description:n,name:t,directives:i,values:r,loc:this.loc(e)}},n.parseEnumValuesDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseEnumValueDefinition,d.TokenKind.BRACE_R)},n.parseEnumValueDefinition=function(){var e=this._lexer.token,n=this.parseDescription(),t=this.parseName(),i=this.parseDirectives(!0);return{kind:l.Kind.ENUM_VALUE_DEFINITION,description:n,name:t,directives:i,loc:this.loc(e)}},n.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");var t=this.parseName(),i=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:l.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInputFieldsDefinition=function(){return this.optionalMany(d.TokenKind.BRACE_L,this.parseInputValueDef,d.TokenKind.BRACE_R)},n.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===d.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)},n.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var n=this.parseDirectives(!0),t=this.optionalMany(d.TokenKind.BRACE_L,this.parseOperationTypeDefinition,d.TokenKind.BRACE_R);if(0===n.length&&0===t.length)throw this.unexpected();return{kind:l.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:t,loc:this.loc(e)}},n.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var n=this.parseName(),t=this.parseDirectives(!0);if(0===t.length)throw this.unexpected();return{kind:l.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:t,loc:this.loc(e)}},n.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var n=this.parseName(),t=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===t.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:l.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:t,directives:i,fields:r,loc:this.loc(e)}},n.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var n=this.parseName(),t=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===t.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:l.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:t,directives:i,fields:r,loc:this.loc(e)}},n.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseUnionMemberTypes();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.UNION_TYPE_EXTENSION,name:n,directives:t,types:i,loc:this.loc(e)}},n.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.ENUM_TYPE_EXTENSION,name:n,directives:t,values:i,loc:this.loc(e)}},n.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var n=this.parseName(),t=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();if(0===t.length&&0===i.length)throw this.unexpected();return{kind:l.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:t,fields:i,loc:this.loc(e)}},n.parseDirectiveDefinition=function(){var e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.TokenKind.AT);var t=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:l.Kind.DIRECTIVE_DEFINITION,description:n,name:t,arguments:i,repeatable:r,locations:o,loc:this.loc(e)}},n.parseDirectiveLocations=function(){this.expectOptionalToken(d.TokenKind.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(d.TokenKind.PIPE));return e},n.parseDirectiveLocation=function(){var e=this._lexer.token,n=this.parseName();if(void 0!==k.DirectiveLocation[n.value])return n;throw this.unexpected(e)},n.loc=function(e){var n;if(!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation))return new E.Location(e,this._lexer.lastToken,this._lexer.source)},n.peek=function(e){return this._lexer.token.kind===e},n.expectToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n;throw(0,h.syntaxError)(this._lexer.source,n.start,"Expected ".concat(u(e),", found ").concat(c(n),"."))},n.expectOptionalToken=function(e){var n=this._lexer.token;if(n.kind===e)return this._lexer.advance(),n},n.expectKeyword=function(e){var n=this._lexer.token;if(n.kind!==d.TokenKind.NAME||n.value!==e)throw(0,h.syntaxError)(this._lexer.source,n.start,'Expected "'.concat(e,'", found ').concat(c(n),"."));this._lexer.advance()},n.expectOptionalKeyword=function(e){var n=this._lexer.token;return n.kind===d.TokenKind.NAME&&n.value===e&&(this._lexer.advance(),!0)},n.unexpected=function(e){var n=null!=e?e:this._lexer.token;return(0,h.syntaxError)(this._lexer.source,n.start,"Unexpected ".concat(c(n),"."))},n.any=function(e,n,t){this.expectToken(e);for(var i=[];!this.expectOptionalToken(t);)i.push(n.call(this));return i},n.optionalMany=function(e,n,t){if(this.expectOptionalToken(e)){var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i}return[]},n.many=function(e,n,t){this.expectToken(e);var i=[];do{i.push(n.call(this))}while(!this.expectOptionalToken(t));return i},e}();function c(e){var n=e.value;return u(e.kind)+(null!=n?' "'.concat(n,'"'):"")}function u(e){return(0,N.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}}));i(_);_.parse,_.parseValue,_.parseType;var O=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,s=void 0,c=Array.isArray(e),u=[e],l=-1,d=[],p=void 0,f=void 0,h=void 0,T=[],v=[],y=e;do{var N=++l===u.length,m=N&&0!==d.length;if(N){if(f=0===v.length?void 0:T[T.length-1],p=h,h=v.pop(),m){if(c)p=p.slice();else{for(var k={},_=0,O=Object.keys(p);_1&&void 0!==arguments[1]?arguments[1]:"";return null!==(n=null==e?void 0:e.filter((function(e){return e})).join(t))&&void 0!==n?n:""}function o(e){return e&&0!==e.length?"{\n"+s(r(e,"\n"))+"\n}":""}function a(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n?e+n+t:""}function s(e){return e&&" "+e.replace(/\n/g,"\n ")}function c(e){return-1!==e.indexOf("\n")}function u(e){return e&&e.some(c)}}));i(I);I.print;var D=r((function(e,n){function t(e){return e.kind===l.Kind.OPERATION_DEFINITION||e.kind===l.Kind.FRAGMENT_DEFINITION}function i(e){return e.kind===l.Kind.SCHEMA_DEFINITION||r(e)||e.kind===l.Kind.DIRECTIVE_DEFINITION}function r(e){return e.kind===l.Kind.SCALAR_TYPE_DEFINITION||e.kind===l.Kind.OBJECT_TYPE_DEFINITION||e.kind===l.Kind.INTERFACE_TYPE_DEFINITION||e.kind===l.Kind.UNION_TYPE_DEFINITION||e.kind===l.Kind.ENUM_TYPE_DEFINITION||e.kind===l.Kind.INPUT_OBJECT_TYPE_DEFINITION}function o(e){return e.kind===l.Kind.SCHEMA_EXTENSION||a(e)}function a(e){return e.kind===l.Kind.SCALAR_TYPE_EXTENSION||e.kind===l.Kind.OBJECT_TYPE_EXTENSION||e.kind===l.Kind.INTERFACE_TYPE_EXTENSION||e.kind===l.Kind.UNION_TYPE_EXTENSION||e.kind===l.Kind.ENUM_TYPE_EXTENSION||e.kind===l.Kind.INPUT_OBJECT_TYPE_EXTENSION}Object.defineProperty(n,"__esModule",{value:!0}),n.isDefinitionNode=function(e){return t(e)||i(e)||o(e)},n.isExecutableDefinitionNode=t,n.isSelectionNode=function(e){return e.kind===l.Kind.FIELD||e.kind===l.Kind.FRAGMENT_SPREAD||e.kind===l.Kind.INLINE_FRAGMENT},n.isValueNode=function(e){return e.kind===l.Kind.VARIABLE||e.kind===l.Kind.INT||e.kind===l.Kind.FLOAT||e.kind===l.Kind.STRING||e.kind===l.Kind.BOOLEAN||e.kind===l.Kind.NULL||e.kind===l.Kind.ENUM||e.kind===l.Kind.LIST||e.kind===l.Kind.OBJECT},n.isTypeNode=function(e){return e.kind===l.Kind.NAMED_TYPE||e.kind===l.Kind.LIST_TYPE||e.kind===l.Kind.NON_NULL_TYPE},n.isTypeSystemDefinitionNode=i,n.isTypeDefinitionNode=r,n.isTypeSystemExtensionNode=o,n.isTypeExtensionNode=a}));i(D);D.isDefinitionNode,D.isExecutableDefinitionNode,D.isSelectionNode,D.isValueNode,D.isTypeNode,D.isTypeSystemDefinitionNode,D.isTypeDefinitionNode,D.isTypeSystemExtensionNode,D.isTypeExtensionNode;var x=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Source",{enumerable:!0,get:function(){return s.Source}}),Object.defineProperty(n,"getLocation",{enumerable:!0,get:function(){return c.getLocation}}),Object.defineProperty(n,"printLocation",{enumerable:!0,get:function(){return u.printLocation}}),Object.defineProperty(n,"printSourceLocation",{enumerable:!0,get:function(){return u.printSourceLocation}}),Object.defineProperty(n,"Kind",{enumerable:!0,get:function(){return l.Kind}}),Object.defineProperty(n,"TokenKind",{enumerable:!0,get:function(){return d.TokenKind}}),Object.defineProperty(n,"Lexer",{enumerable:!0,get:function(){return N.Lexer}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(n,"parseValue",{enumerable:!0,get:function(){return _.parseValue}}),Object.defineProperty(n,"parseType",{enumerable:!0,get:function(){return _.parseType}}),Object.defineProperty(n,"print",{enumerable:!0,get:function(){return I.print}}),Object.defineProperty(n,"visit",{enumerable:!0,get:function(){return O.visit}}),Object.defineProperty(n,"visitInParallel",{enumerable:!0,get:function(){return O.visitInParallel}}),Object.defineProperty(n,"getVisitFn",{enumerable:!0,get:function(){return O.getVisitFn}}),Object.defineProperty(n,"BREAK",{enumerable:!0,get:function(){return O.BREAK}}),Object.defineProperty(n,"isDefinitionNode",{enumerable:!0,get:function(){return D.isDefinitionNode}}),Object.defineProperty(n,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return D.isExecutableDefinitionNode}}),Object.defineProperty(n,"isSelectionNode",{enumerable:!0,get:function(){return D.isSelectionNode}}),Object.defineProperty(n,"isValueNode",{enumerable:!0,get:function(){return D.isValueNode}}),Object.defineProperty(n,"isTypeNode",{enumerable:!0,get:function(){return D.isTypeNode}}),Object.defineProperty(n,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return D.isTypeSystemDefinitionNode}}),Object.defineProperty(n,"isTypeDefinitionNode",{enumerable:!0,get:function(){return D.isTypeDefinitionNode}}),Object.defineProperty(n,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return D.isTypeSystemExtensionNode}}),Object.defineProperty(n,"isTypeExtensionNode",{enumerable:!0,get:function(){return D.isTypeExtensionNode}}),Object.defineProperty(n,"DirectiveLocation",{enumerable:!0,get:function(){return k.DirectiveLocation}})}));i(x);var b=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.locatedError=function(e,n,t){var i;if(Array.isArray(e.path))return e;return new f.GraphQLError(e.message,null!==(i=e.nodes)&&void 0!==i?i:n,e.source,e.positions,t,e)}}));i(b);b.locatedError;var A=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.formatError=function(e){var n;e||(0,i.default)(0,"Received null or undefined error.");var t=null!==(n=e.message)&&void 0!==n?n:"An unknown error occurred.",r=e.locations,o=e.path,a=e.extensions;return a?{message:t,locations:r,path:o,extensions:a}:{message:t,locations:r,path:o}};var t,i=(t=a)&&t.__esModule?t:{default:t}}));i(A);A.formatError;var S=r((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"GraphQLError",{enumerable:!0,get:function(){return f.GraphQLError}}),Object.defineProperty(n,"printError",{enumerable:!0,get:function(){return f.printError}}),Object.defineProperty(n,"syntaxError",{enumerable:!0,get:function(){return h.syntaxError}}),Object.defineProperty(n,"locatedError",{enumerable:!0,get:function(){return b.locatedError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return A.formatError}})}));i(S);const{hasPragma:K}=t;var g={parsers:{graphql:{parse:function(e){const t=x;try{const n=function(e,n){const t={allowLegacySDLImplementsInterfaces:!1,experimentalFragmentVariables:!0};try{return e(n,t)}catch(i){return t.allowLegacySDLImplementsInterfaces=!0,e(n,t)}}(t.parse,e);return n.comments=function(e){const n=[],{startToken:t}=e.loc;let{next:i}=t;for(;""!==i.kind;)"Comment"===i.kind&&(Object.assign(i,{column:i.column-1}),n.push(i)),i=i.next;return n}(n),function e(n){if(n&&"object"==typeof n){delete n.startToken,delete n.endToken,delete n.prev,delete n.next;for(const t in n)e(n[t])}return n}(n),n}catch(e){const{GraphQLError:t}=S;throw e instanceof t?n(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}},astFormat:"graphql",hasPragma:K,locStart:e=>"number"==typeof e.start?e.start:e.loc&&e.loc.start,locEnd:e=>"number"==typeof e.end?e.end:e.loc&&e.loc.end}}},L=g.parsers;e.default=g,e.parsers=L,Object.defineProperty(e,"__esModule",{value:!0})}));
diff --git a/node_modules/prettier/parser-html.js b/node_modules/prettier/parser-html.js
new file mode 100644
index 0000000..d3a99be
--- /dev/null
+++ b/node_modules/prettier/parser-html.js
@@ -0,0 +1,113 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html={}))}(this,(function(e){"use strict";const t=/[|\\{}()[\]^$+*?.-]/g;var r=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(t,"\\$&")};const n={"---":"yaml","+++":"toml"};var s=function(e){const t=Object.keys(n).map(r).join("|"),s=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===s)return{frontMatter:null,content:e};const[i,o,a]=s;return{frontMatter:{type:n[o],value:a,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},i=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]}),o=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],a=["title"],c=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],l=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],p=["autoplay","controls","crossorigin","loop","muted","preload","src"],u=["href","target"],h=["color","face","size"],d=["dir"],m=["cite"],f=["alink","background","bgcolor","link","text","vlink"],g=["clear"],_=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],T=["height","width"],S=["align"],y=["align","char","charoff","span","valign","width"],b=["align","char","charoff","span","valign","width"],C=["value"],E=["cite","datetime"],v=["open"],A=["title"],w=["open"],k=["compact"],N=["align"],x=["compact"],P=["height","src","type","width"],D=["disabled","form","name"],R=["color","face","size"],O=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],q=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],L=["cols","rows"],$=["align"],I=["align"],M=["align"],U=["align"],B=["align"],F=["align"],V=["profile"],H=["align","noshade","size","width"],G=["manifest","version"],j=["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],X=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],z=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],W=["cite","datetime"],Q=["prompt"],Y=["accesskey","for","form"],J=["accesskey","align"],K=["type","value"],Z=["as","charset","color","crossorigin","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],ee=["name"],te=["compact"],re=["charset","content","http-equiv","name","scheme"],ne=["high","low","max","min","optimum","value"],se=["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ie=["compact","reversed","start","type"],oe=["disabled","label"],ae=["disabled","label","selected","value"],ce=["for","form","name"],le=["align"],pe=["name","type","value","valuetype"],ue=["width"],he=["max","value"],de=["cite"],me=["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],fe=["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],ge=["name"],_e=["media","sizes","src","srcset","type"],Te=["media","nonce","title","type"],Se=["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],ye=["align","char","charoff","valign"],be=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ce=["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],Ee=["align","char","charoff","valign"],ve=["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],Ae=["align","char","charoff","valign"],we=["datetime"],ke=["align","bgcolor","char","charoff","valign"],Ne=["default","kind","label","src","srclang"],xe=["compact","type"],Pe=["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"],De={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe},Re=Object.freeze({__proto__:null,a:o,abbr:a,applet:c,area:l,audio:p,base:u,basefont:h,bdo:d,blockquote:m,body:f,br:g,button:_,canvas:T,caption:S,col:y,colgroup:b,data:C,del:E,details:v,dfn:A,dialog:w,dir:k,div:N,dl:x,embed:P,fieldset:D,font:R,form:O,frame:q,frameset:L,h1:$,h2:I,h3:M,h4:U,h5:B,h6:F,head:V,hr:H,html:G,iframe:j,img:X,input:z,ins:W,isindex:Q,label:Y,legend:J,li:K,link:Z,map:ee,menu:te,meta:re,meter:ne,object:se,ol:ie,optgroup:oe,option:ae,output:ce,p:le,param:pe,pre:ue,progress:he,q:de,script:me,select:fe,slot:ge,source:_e,style:Te,table:Se,tbody:ye,td:be,textarea:Ce,tfoot:Ee,th:ve,thead:Ae,time:we,tr:ke,track:Ne,ul:xe,video:Pe,default:De}),Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Le(e,t){return e(t={exports:{}},t.exports),t.exports}function $e(e){return e&&e.default||e}var Ie=$e(i),Me=$e(Re);const{CSS_DISPLAY_TAGS:Ue,CSS_DISPLAY_DEFAULT:Be,CSS_WHITE_SPACE_TAGS:Fe,CSS_WHITE_SPACE_DEFAULT:Ve}={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"none",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",video:"inline-block",audio:"inline-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"},He=Ge(Ie);function Ge(e){const t=Object.create(null);for(const r of e)t[r]=!0;return t}function je(e,t){return!!e.endSourceSpan&&(!("element"!==e.type||"template"!==e.fullName||!e.attrMap.lang||"html"===e.attrMap.lang)||(!("ieConditionalComment"!==e.type||!e.lastChild||e.lastChild.isSelfClosing||e.lastChild.endSourceSpan)||("ieConditionalComment"===e.type&&!e.complete||("vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&!["template","style","script","html"].includes(e.fullName)||!(!nt(e)||!e.children.some(e=>"text"!==e.type&&"interpolation"!==e.type))))))}function Xe(e){if("attribute"===e.type)return!1;if(!e.parent)return!1;if("number"!=typeof e.index||0===e.index)return!1;return function(e){return"comment"===e.type&&"prettier-ignore"===e.value.trim()}(e.parent.children[e.index-1])}function ze(e){return"element"===e.type&&("script"===e.fullName||"style"===e.fullName||"svg:style"===e.fullName||st(e)&&("script"===e.name||"style"===e.name))}function We(e){return"yaml"===e.type||"toml"===e.type}function Qe(e){return it(e).startsWith("pre")}function Ye(e){return"element"===e.type&&0!==e.children.length&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&"table-cell"!==e.cssDisplay)}function Je(e){return tt(e)||"element"===e.type&&"br"===e.fullName||Ke(e)}function Ke(e){return Ze(e)&&et(e)}function Ze(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function tt(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function rt(e){return"block"===e||"list-item"===e||e.startsWith("table")}function nt(e){return it(e).startsWith("pre")}function st(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function it(e){return"element"===e.type&&(!e.namespace||st(e))&&Fe[e.name]||Ve}var ot={HTML_ELEMENT_ATTRIBUTES:function(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}(Me,Ge),HTML_TAGS:He,canHaveInterpolation:function(e){return e.children&&!ze(e)},countChars:function(e,t){let r=0;for(let n=0;n!0)){let r=0;for(let n=e.stack.length-1;n>=0;n--){const s=e.stack[n];s&&"object"==typeof s&&!Array.isArray(s)&&t(s)&&r++}return r},dedentString:function(e,t=function(e){let t=1/0;for(const r of e.split("\n")){if(0===r.length)continue;if(/\S/.test(r[0]))return 0;const e=r.match(/^\s*/)[0].length;r.length!==e&&(ee.slice(t)).join("\n")},forceBreakChildren:Ye,forceBreakContent:function(e){return Ye(e)||"element"===e.type&&0!==e.children.length&&(["body","script","style"].includes(e.name)||e.children.some(e=>function(e){return e.children&&e.children.some(e=>"text"!==e.type)}(e)))||e.firstChild&&e.firstChild===e.lastChild&&Ze(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||et(e.lastChild))},forceNextEmptyLine:function(e){return We(e)||e.next&&e.sourceSpan.end.line+1"svg:foreignObject"===e.fullName))return"svg"===e.name?"inline-block":"block";r=!0}switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return"element"===e.type&&(!e.namespace||r||st(e))&&Ue[e.name]||Be}},getNodeCssStyleWhiteSpace:it,getPrettierIgnoreAttributeCommentData:function(e){const t=e.trim().match(/^prettier-ignore-attribute(?:\s+([^]+))?$/);return!!t&&(!t[1]||t[1].split(/\s+/))},hasPrettierIgnore:Xe,identity:function(e){return e},inferScriptParser:function(e){if("script"===e.name&&!e.attrMap.src){if(!e.attrMap.lang&&!e.attrMap.type||"module"===e.attrMap.type||"text/javascript"===e.attrMap.type||"text/babel"===e.attrMap.type||"application/javascript"===e.attrMap.type||"jsx"===e.attrMap.lang)return"babel";if("application/x-typescript"===e.attrMap.type||"ts"===e.attrMap.lang||"tsx"===e.attrMap.lang)return"typescript";if("text/markdown"===e.attrMap.type)return"markdown";if(e.attrMap.type.endsWith("json")||e.attrMap.type.endsWith("importmap"))return"json";if("text/x-handlebars-template"===e.attrMap.type)return"glimmer"}if("style"===e.name){if(!e.attrMap.lang||"postcss"===e.attrMap.lang||"css"===e.attrMap.lang)return"css";if("scss"===e.attrMap.lang)return"scss";if("less"===e.attrMap.lang)return"less"}return null},isDanglingSpaceSensitiveNode:function(e){return!rt(t=e.cssDisplay)&&"inline-block"!==t&&!ze(e);var t},isFrontMatterNode:We,isIndentationSensitiveNode:Qe,isLeadingSpaceSensitiveNode:function(e){const t=function(){if(We(e))return!1;if(("text"===e.type||"interpolation"===e.type)&&e.prev&&("text"===e.prev.type||"interpolation"===e.prev.type))return!0;if(!e.parent||"none"===e.parent.cssDisplay)return!1;if(nt(e.parent))return!0;if(!e.prev&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))return!1;var t;if(e.prev&&!function(e){return!rt(e)}(e.prev.cssDisplay))return!1;return!0}();return t&&!e.prev&&e.parent&&e.parent.tagDefinition&&e.parent.tagDefinition.ignoreFirstLf?"interpolation"===e.type:t},isPreLikeNode:nt,isScriptLikeTag:ze,isTextLikeNode:function(e){return"text"===e.type||"comment"===e.type},isTrailingSpaceSensitiveNode:function(e){return!We(e)&&(!("text"!==e.type&&"interpolation"!==e.type||!e.next||"text"!==e.next.type&&"interpolation"!==e.next.type)||!(!e.parent||"none"===e.parent.cssDisplay)&&(!!nt(e.parent)||!(!e.next&&("root"===e.parent.type||nt(e)&&e.parent||ze(e.parent)||(t=e.parent.cssDisplay,rt(t)||"inline-block"===t)))&&!(e.next&&!function(e){return!rt(e)}(e.next.cssDisplay))));var t},isWhitespaceSensitiveNode:function(e){return ze(e)||"interpolation"===e.type||Qe(e)},isUnknownNamespace:st,normalizeParts:function(e){const t=[],r=e.slice();for(;0!==r.length;){const e=r.shift();e&&("concat"!==e.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof e?t.push(e):t.push(t.pop()+e):r.unshift(...e.parts))}return t},preferHardlineAsLeadingSpaces:function(e){return tt(e)||e.prev&&Je(e.prev)||Ke(e)},preferHardlineAsTrailingSpaces:Je,shouldNotPrintClosingTag:function(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(Xe(e)||je(e.parent,t))},shouldPreserveContent:je,unescapeQuoteEntities:function(e){return e.replace(/'/g,"'").replace(/"/g,'"')}};var at={hasPragma:function(e){return/^\s*/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}};var ct=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};const lt={attrs:!0,children:!0};class pt{constructor(e={}){for(const t of Object.keys(e)){const r=e[t];t in lt?this._setNodes(t,r):this[t]=r}}_setNodes(e,t){t!==this[e]&&(this[e]=function(e,t){const r=e.map(e=>e instanceof pt?e.clone():new pt(e));let n=null,s=r[0],i=r[1]||null;for(let e=0;e(e[t.fullName]=t.value,e),Object.create(null))}))}map(e){let t=null;for(const r in lt){const n=this[r];if(n){const s=ut(n,t=>t.map(e));t!==n&&(t||(t=new pt),t._setNodes(r,s))}}if(t){for(const e in this)e in lt||(t[e]=this[e]);const{index:e,siblings:r,prev:n,next:s,parent:i}=this;ht(t,{index:e,siblings:r,prev:n,next:s,parent:i})}return e(t||this)}clone(e){return new pt(e?Object.assign({},this,{},e):this)}get firstChild(){return this.children&&0!==this.children.length?this.children[0]:null}get lastChild(){return this.children&&0!==this.children.length?this.children[this.children.length-1]:null}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}}function ut(e,t){const r=e.map(t);return r.some((t,r)=>t!==e[r])?r:e}function ht(e,t){const r=Object.keys(t).reduce((e,r)=>(e[r]={value:t[r],enumerable:!1},e),{});Object.defineProperties(e,r)}var dt={Node:pt};const mt=[[/^(\[if([^\]]*?)\]>)([\s\S]*?){try{return[!0,t(i,a).children]}catch(e){return[!1,[{type:"text",value:i,sourceSpan:new l(a,c)}]]}})();return{type:"ieConditionalComment",complete:p,children:u,condition:s.trim().replace(/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new l(e.sourceSpan.start,a),endSourceSpan:new l(c,e.sourceSpan.end)}}],[/^\[if([^\]]*?)\]>",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},t.NGSP_UNICODE="",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE}));qe(gt);gt.TagContentType,gt.splitNsName,gt.isNgContainer,gt.isNgContent,gt.isNgTemplate,gt.getNsPrefix,gt.mergeNsAndName,gt.NAMED_ENTITIES,gt.NGSP_UNICODE;var _t=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});class r{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=gt.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:s=!1,ignoreFirstLf:i=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=s,this.closedByParent=n||s,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let n,s;t.HtmlTagDefinition=r,t.getHtmlTagDefinition=function(e){return s||(n=new r,s={base:new r({isVoid:!0}),meta:new r({isVoid:!0}),area:new r({isVoid:!0}),embed:new r({isVoid:!0}),link:new r({isVoid:!0}),img:new r({isVoid:!0}),input:new r({isVoid:!0}),param:new r({isVoid:!0}),hr:new r({isVoid:!0}),br:new r({isVoid:!0}),source:new r({isVoid:!0}),track:new r({isVoid:!0}),wbr:new r({isVoid:!0}),p:new r({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new r({closedByChildren:["tbody","tfoot"]}),tbody:new r({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new r({closedByChildren:["tbody"],closedByParent:!0}),tr:new r({closedByChildren:["tr"],closedByParent:!0}),td:new r({closedByChildren:["td","th"],closedByParent:!0}),th:new r({closedByChildren:["td","th"],closedByParent:!0}),col:new r({isVoid:!0}),svg:new r({implicitNamespacePrefix:"svg"}),math:new r({implicitNamespacePrefix:"math"}),li:new r({closedByChildren:["li"],closedByParent:!0}),dt:new r({closedByChildren:["dt","dd"]}),dd:new r({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new r({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new r({closedByChildren:["optgroup"],closedByParent:!0}),option:new r({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new r({ignoreFirstLf:!0}),listing:new r({ignoreFirstLf:!0}),style:new r({contentType:gt.TagContentType.RAW_TEXT}),script:new r({contentType:gt.TagContentType.RAW_TEXT}),title:new r({contentType:gt.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new r({contentType:gt.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),s[e]||n}}));qe(_t);_t.HtmlTagDefinition,_t.getHtmlTagDefinition;var Tt=Le((function(e,t){function r(e){return t.$0<=e&&e<=t.$9}
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=r,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||r(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}}));qe(Tt);Tt.$EOF,Tt.$BSPACE,Tt.$TAB,Tt.$LF,Tt.$VTAB,Tt.$FF,Tt.$CR,Tt.$SPACE,Tt.$BANG,Tt.$DQ,Tt.$HASH,Tt.$$,Tt.$PERCENT,Tt.$AMPERSAND,Tt.$SQ,Tt.$LPAREN,Tt.$RPAREN,Tt.$STAR,Tt.$PLUS,Tt.$COMMA,Tt.$MINUS,Tt.$PERIOD,Tt.$SLASH,Tt.$COLON,Tt.$SEMICOLON,Tt.$LT,Tt.$EQ,Tt.$GT,Tt.$QUESTION,Tt.$0,Tt.$7,Tt.$9,Tt.$A,Tt.$E,Tt.$F,Tt.$X,Tt.$Z,Tt.$LBRACKET,Tt.$BACKSLASH,Tt.$RBRACKET,Tt.$CARET,Tt.$_,Tt.$a,Tt.$b,Tt.$e,Tt.$f,Tt.$n,Tt.$r,Tt.$t,Tt.$u,Tt.$v,Tt.$x,Tt.$z,Tt.$LBRACE,Tt.$BAR,Tt.$RBRACE,Tt.$NBSP,Tt.$PIPE,Tt.$TILDA,Tt.$AT,Tt.$BT,Tt.isWhitespace,Tt.isDigit,Tt.isAsciiLetter,Tt.isAsciiHexDigit,Tt.isNewLine,Tt.isOctalDigit;var St=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t,r){this.filePath=e,this.name=t,this.members=r}assertNoMembers(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}t.StaticSymbol=r;t.StaticSymbolCache=class{constructor(){this.cache=new Map}get(e,t,n){const s=(n=n||[]).length?".".concat(n.join(".")):"",i='"'.concat(e,'".').concat(t).concat(s);let o=this.cache.get(i);return o||(o=new r(e,t,n),this.cache.set(i,o)),o}}}));qe(St);St.StaticSymbol,St.StaticSymbolCache;var yt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});const r=/-+([a-z0-9])/g;function n(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function s(e,t,r){return Array.isArray(e)?t.visitArray(e,r):"object"==typeof(n=e)&&null!==n&&Object.getPrototypeOf(n)===a?t.visitStringMap(e,r):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,r):t.visitOther(e,r);var n}t.dashCaseToCamelCase=function(e){return e.replace(r,(...e)=>e[1].toUpperCase())},t.splitAtColon=function(e,t){return n(e,":",t)},t.splitAtPeriod=function(e,t){return n(e,".",t)},t.visitValue=s,t.isDefined=function(e){return null!=e},t.noUndefined=function(e){return void 0===e?null:e};t.ValueTransformer=class{visitArray(e,t){return e.map(e=>s(e,this,t))}visitStringMap(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=s(e[n],this,t)}),r}visitPrimitive(e,t){return e}visitOther(e,t){return e}},t.SyncAsync={assertSync:e=>{if(c(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>c(e)?e.then(t):t(e),all:e=>e.some(c)?Promise.all(e):e},t.error=function(e){throw new Error("Internal Error: ".concat(e))},t.syntaxError=function(e,t){const r=Error(e);return r[i]=!0,t&&(r[o]=t),r};const i="ngSyntaxError",o="ngParseErrors";t.isSyntaxError=function(e){return e[i]},t.getParseErrors=function(e){return e[o]||[]},t.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const a=Object.getPrototypeOf({});function c(e){return!!e&&"function"==typeof e.then}t.utf8Encode=function(e){let t="";for(let r=0;r=55296&&n<=56319&&e.length>r+1){const t=e.charCodeAt(r+1);t>=56320&&t<=57343&&(r++,n=(n-55296<<10)+t-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t},t.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);if(!t.toString)return"object";const r=t.toString();if(null==r)return""+r;const n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},t.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},t.isPromise=c;t.Version=class{constructor(e){this.full=e;const t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}};const l="undefined"!=typeof window&&window,p="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,u=void 0!==Oe&&Oe||l||p;t.global=u}));qe(yt);yt.dashCaseToCamelCase,yt.splitAtColon,yt.splitAtPeriod,yt.visitValue,yt.isDefined,yt.noUndefined,yt.ValueTransformer,yt.SyncAsync,yt.error,yt.syntaxError,yt.isSyntaxError,yt.getParseErrors,yt.escapeRegExp,yt.utf8Encode,yt.stringify,yt.resolveForwardRef,yt.isPromise,yt.Version,yt.global;var bt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let s=0;function i(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof St.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=yt.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(s++),t.__anonymousType=r):r=n(r),r}var o;t.identifierName=i,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof St.StaticSymbol?t.filePath:"./".concat(yt.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(i({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(i({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(i({reference:e}))},t.componentFactoryName=function(e){return"".concat(i({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):i(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=class{constructor({moduleUrl:e,styles:t,styleUrls:r}={}){this.moduleUrl=e||null,this.styles=c(t),this.styleUrls=c(r)}};t.CompileTemplateMetadata=class{constructor({encapsulation:e,template:t,templateUrl:r,htmlAst:n,styles:s,styleUrls:i,externalStylesheets:o,animations:a,ngContentSelectors:p,interpolation:u,isInline:h,preserveWhitespaces:d}){if(this.encapsulation=e,this.template=t,this.templateUrl=r,this.htmlAst=n,this.styles=c(s),this.styleUrls=c(i),this.externalStylesheets=c(o),this.animations=a?l(a):[],this.ngContentSelectors=p||[],u&&2!=u.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=u,this.isInline=h,this.preserveWhitespaces=d}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class a{static create({isHost:e,type:t,isComponent:n,selector:s,exportAs:i,changeDetection:o,inputs:c,outputs:l,host:p,providers:u,viewProviders:h,queries:d,guards:m,viewQueries:f,entryComponents:g,template:_,componentViewType:T,rendererType:S,componentFactory:y}){const b={},C={},E={};null!=p&&Object.keys(p).forEach(e=>{const t=p[e],n=e.match(r);null===n?E[e]=t:null!=n[1]?C[n[1]]=t:null!=n[2]&&(b[n[2]]=t)});const v={};null!=c&&c.forEach(e=>{const t=yt.splitAtColon(e,[e,e]);v[t[0]]=t[1]});const A={};return null!=l&&l.forEach(e=>{const t=yt.splitAtColon(e,[e,e]);A[t[0]]=t[1]}),new a({isHost:e,type:t,isComponent:!!n,selector:s,exportAs:i,changeDetection:o,inputs:v,outputs:A,hostListeners:b,hostProperties:C,hostAttributes:E,providers:u,viewProviders:h,queries:d,guards:m,viewQueries:f,entryComponents:g,template:_,componentViewType:T,rendererType:S,componentFactory:y})}constructor({isHost:e,type:t,isComponent:r,selector:n,exportAs:s,changeDetection:i,inputs:o,outputs:a,hostListeners:l,hostProperties:p,hostAttributes:u,providers:h,viewProviders:d,queries:m,guards:f,viewQueries:g,entryComponents:_,template:T,componentViewType:S,rendererType:y,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=r,this.selector=n,this.exportAs=s,this.changeDetection=i,this.inputs=o,this.outputs=a,this.hostListeners=l,this.hostProperties=p,this.hostAttributes=u,this.providers=c(h),this.viewProviders=c(d),this.queries=c(m),this.guards=f,this.viewQueries=c(g),this.entryComponents=c(_),this.template=T,this.componentViewType=S,this.rendererType=y,this.componentFactory=b}toSummary(){return{summaryKind:o.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}}}t.CompileDirectiveMetadata=a;t.CompilePipeMetadata=class{constructor({type:e,name:t,pure:r}){this.type=e,this.name=t,this.pure=!!r}toSummary(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}};t.CompileShallowModuleMetadata=class{};t.CompileNgModuleMetadata=class{constructor({type:e,providers:t,declaredDirectives:r,exportedDirectives:n,declaredPipes:s,exportedPipes:i,entryComponents:o,bootstrapComponents:a,importedModules:l,exportedModules:p,schemas:u,transitiveModule:h,id:d}){this.type=e||null,this.declaredDirectives=c(r),this.exportedDirectives=c(n),this.declaredPipes=c(s),this.exportedPipes=c(i),this.providers=c(t),this.entryComponents=c(o),this.bootstrapComponents=c(a),this.importedModules=c(l),this.exportedModules=c(p),this.schemas=c(u),this.id=d||null,this.transitiveModule=h||null}toSummary(){const e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}};function c(e){return e||[]}t.TransitiveCompileNgModuleMetadata=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(e,t){this.providers.push({provider:e,module:t})}addDirective(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}addExportedDirective(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}addPipe(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}addExportedPipe(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}addModule(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}addEntryComponent(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}};function l(e){return e.reduce((e,t)=>{const r=Array.isArray(t)?l(t):t;return e.concat(r)},[])}function p(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=class{constructor(e,{useClass:t,useValue:r,useExisting:n,useFactory:s,deps:i,multi:o}){this.token=e,this.useClass=t||null,this.useValue=r,this.useExisting=n,this.useFactory=s||null,this.dependencies=i||null,this.multi=!!o}},t.flatten=l,t.templateSourceUrl=function(e,t,r){let n;return n=r.isInline?t.type.reference instanceof St.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(i(e),"/").concat(i(t.type),".html"):r.templateUrl,t.type.reference instanceof St.StaticSymbol?n:p(n)},t.sharedStylesheetJitUrl=function(e,t){const r=e.moduleUrl.split(/\/\\/g),n=r[r.length-1];return p("css/".concat(t).concat(n,".ngstyle.js"))},t.ngModuleJitUrl=function(e){return p("".concat(i(e.type),"/module.ngfactory.js"))},t.templateJitUrl=function(e,t){return p("".concat(i(e),"/").concat(i(t.type),".ngfactory.js"))}}));qe(bt);bt.sanitizeIdentifier,bt.identifierName,bt.identifierModuleUrl,bt.viewClassName,bt.rendererTypeName,bt.hostViewClassName,bt.componentFactoryName,bt.CompileSummaryKind,bt.tokenName,bt.tokenReference,bt.CompileStylesheetMetadata,bt.CompileTemplateMetadata,bt.CompileDirectiveMetadata,bt.CompilePipeMetadata,bt.CompileShallowModuleMetadata,bt.CompileNgModuleMetadata,bt.TransitiveCompileNgModuleMetadata,bt.ProviderMeta,bt.flatten,bt.templateSourceUrl,bt.sharedStylesheetJitUrl,bt.ngModuleJitUrl,bt.templateJitUrl;var Ct=Le((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+class r{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,i=this.line,o=this.col;for(;s>0&&e<0;){if(s--,e++,t.charCodeAt(s)==Tt.$LF){i--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(Tt.$LF));o=e>0?s-e:s}else o--}for(;s0;){const r=t.charCodeAt(s);s++,e--,r==Tt.$LF?(i++,o=0):o++}return new r(this.file,s,i,o)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let s=n,i=0,o=0;for(;i0&&(n--,i++,"\n"!=r[n]||++o!=t););for(i=0,o=0;i]").concat(e.after,'")'):this.msg}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}},t.typeSourceSpan=function(e,t){const i=bt.identifierModuleUrl(t),o=null!=i?"in ".concat(e," ").concat(bt.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(bt.identifierName(t)),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,i){const o="in ".concat(e," ").concat(t," in ").concat(i),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))}}));qe(Ct);Ct.ParseLocation,Ct.ParseSourceFile,Ct.ParseSourceSpan,Ct.EMPTY_PARSE_LOCATION,Ct.EMPTY_SOURCE_SPAN,Ct.ParseErrorLevel,Ct.ParseError,Ct.typeSourceSpan,Ct.r3JitTypeSourceSpan;var Et=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});t.AstPath=class{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}}}));qe(Et);Et.AstPath;var vt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});t.Text=class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r}visit(e,t){return e.visitText(this,t)}};t.CDATA=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitCdata(this,t)}};t.Expansion=class{constructor(e,t,r,n,s,i){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=s,this.i18n=i}visit(e,t){return e.visitExpansion(this,t)}};t.ExpansionCase=class{constructor(e,t,r,n,s){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=s}visit(e,t){return e.visitExpansionCase(this,t)}};t.Attribute=class{constructor(e,t,r,n=null,s=null,i=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=s,this.i18n=i}visit(e,t){return e.visitAttribute(this,t)}};class r{constructor(e,t,r,n,s=null,i=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=s,this.endSourceSpan=i,this.nameSpan=o,this.i18n=a}visit(e,t){return e.visitElement(this,t)}}t.Element=r;t.Comment=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}};function n(e,t,r=null){const n=[],s=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach(e=>{const t=s(e);t&&n.push(t)}),n}t.DocType=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}},t.visitAll=n;class s{constructor(){}visitElement(e,t){this.visitChildren(t,t=>{t(e.attrs),t(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,t=>{t(e.cases)})}visitExpansionCase(e,t){}visitChildren(e,t){let r=[],s=this;return t((function(t){t&&r.push(n(s,t,e))})),Array.prototype.concat.apply([],r)}}t.RecursiveVisitor=s,t.findNode=function(e,t){const i=[];return n(new class extends s{visit(e,n){const s=function e(t){const n=t.sourceSpan.start.offset;let s=t.sourceSpan.end.offset;return t instanceof r&&(t.endSourceSpan?s=t.endSourceSpan.end.offset:t.children&&t.children.length&&(s=e(t.children[t.children.length-1]).end)),{start:n,end:s}}(e);if(!(s.start<=t&&t]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){const e=t[0],n=t[1];r.forEach(t=>{if(t.test(e)||t.test(n))throw new Error("['".concat(e,"', '").concat(n,"'] contains unusable interpolation symbol."))})}}}));qe(At);At.assertArrayOfStrings,At.assertInterpolationSymbols;var wt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(At.assertInterpolationSymbols("interpolation",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")}));qe(wt);wt.InterpolationConfig,wt.DEFAULT_INTERPOLATION_CONFIG;var kt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});const r=Tt;var n;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(n=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class i extends Ct.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=i;class o{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=o,t.tokenize=function(e,t,r,n={}){return new u(new Ct.ParseSourceFile(e,t),r,n).tokenize()};const a=/\r\n?/g;function c(e){const t=e===r.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function l(e){return'Unknown entity "'.concat(e,'" - use the ";" or ";" syntax')}class p{constructor(e){this.error=e}}class u{constructor(e,t,r){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||wt.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(e=>e.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new T(e,n):new _(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(a,"\n")}tokenize(){for(;this._cursor.peek()!==r.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(r.$LT))if(this._attemptCharCode(r.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(r.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(r.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(n.EOF),this._endToken([]),new o(function(e){const t=[];let r=void 0;for(let s=0;sthis._attemptStr("--\x3e")),this._beginToken(n.COMMENT_END),this._requireStr("--\x3e"),this._endToken([])}_consumeBogusComment(e){this._beginToken(n.COMMENT_START,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===r.$GT),this._beginToken(n.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(n.CDATA_START,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(n.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(n.DOC_TYPE_START,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===r.$GT),this._beginToken(n.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){const e=this._cursor.clone();let t="";for(;this._cursor.peek()!==r.$COLON&&!(((n=this._cursor.peek())r.$9));)this._cursor.advance();var n;let s;return this._cursor.peek()===r.$COLON?(t=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(d,""===t?0:1),[t,this._cursor.getChars(s)]}_consumeTagOpen(e){let t,s,i,o=this.tokens.length;const a=this._cursor.clone();try{if(!r.isAsciiLetter(this._cursor.peek()))throw this._createError(c(this._cursor.peek()),this._cursor.getSpan(e));for(i=this._consumeTagOpenStart(e),s=i.parts[0],t=i.parts[1],this._attemptCharCodeUntilFn(h);this._cursor.peek()!==r.$SLASH&&this._cursor.peek()!==r.$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(h),this._attemptCharCode(r.$EQ)&&(this._attemptCharCodeUntilFn(h),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(h);this._consumeTagOpenEnd()}catch(t){if(t instanceof p)return this._cursor=a,i&&(this.tokens.length=o),this._beginToken(n.TEXT,e),void this._endToken(["<"]);throw t}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===n.TAG_OPEN_END_VOID)return;const l=this._getTagDefinition(t).contentType;l===gt.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(s,t,!1):l===gt.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(s,t,!0)}_consumeRawTextWithTagClose(e,t,s){this._consumeRawText(s,()=>!!this._attemptCharCode(r.$LT)&&(!!this._attemptCharCode(r.$SLASH)&&(this._attemptCharCodeUntilFn(h),!!this._attemptStrCaseInsensitive(e?"".concat(e,":").concat(t):t)&&(this._attemptCharCodeUntilFn(h),this._attemptCharCode(r.$GT)))));this._beginToken(n.TAG_CLOSE),this._requireCharCodeUntilFn(e=>e===r.$GT,3),this._cursor.advance(),this._endToken([e,t])}_consumeTagOpenStart(e){this._beginToken(n.TAG_OPEN_START,e);const t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){const e=this._cursor.peek();if(e===r.$SQ||e===r.$DQ)throw this._createError(c(e),this._cursor.getSpan());this._beginToken(n.ATTR_NAME);const t=this._consumePrefixAndName();this._endToken(t)}_consumeAttributeValue(){let e;if(this._cursor.peek()===r.$SQ||this._cursor.peek()===r.$DQ){this._beginToken(n.ATTR_QUOTE);const t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(n.ATTR_VALUE);const r=[];for(;this._cursor.peek()!==t;)r.push(this._readChar(!0));e=r.join(""),this._endToken([this._processCarriageReturns(e)]),this._beginToken(n.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(n.ATTR_VALUE);const t=this._cursor.clone();this._requireCharCodeUntilFn(d,1),e=this._cursor.getChars(t),this._endToken([this._processCarriageReturns(e)])}}_consumeTagOpenEnd(){const e=this._attemptCharCode(r.$SLASH)?n.TAG_OPEN_END_VOID:n.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(r.$GT),this._endToken([])}_consumeTagClose(e){if(this._beginToken(n.TAG_CLOSE,e),this._attemptCharCodeUntilFn(h),this._allowHtmComponentClosingTags&&this._attemptCharCode(r.$SLASH))this._attemptCharCodeUntilFn(h),this._requireCharCode(r.$GT),this._endToken([]);else{const e=this._consumePrefixAndName();this._attemptCharCodeUntilFn(h),this._requireCharCode(r.$GT),this._endToken(e)}}_consumeExpansionFormStart(){this._beginToken(n.EXPANSION_FORM_START),this._requireCharCode(r.$LBRACE),this._endToken([]),this._expansionCaseStack.push(n.EXPANSION_FORM_START),this._beginToken(n.RAW_TEXT);const e=this._readUntil(r.$COMMA);this._endToken([e]),this._requireCharCode(r.$COMMA),this._attemptCharCodeUntilFn(h),this._beginToken(n.RAW_TEXT);const t=this._readUntil(r.$COMMA);this._endToken([t]),this._requireCharCode(r.$COMMA),this._attemptCharCodeUntilFn(h)}_consumeExpansionCaseStart(){this._beginToken(n.EXPANSION_CASE_VALUE);const e=this._readUntil(r.$LBRACE).trim();this._endToken([e]),this._attemptCharCodeUntilFn(h),this._beginToken(n.EXPANSION_CASE_EXP_START),this._requireCharCode(r.$LBRACE),this._endToken([]),this._attemptCharCodeUntilFn(h),this._expansionCaseStack.push(n.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(n.EXPANSION_CASE_EXP_END),this._requireCharCode(r.$RBRACE),this._endToken([]),this._attemptCharCodeUntilFn(h),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(n.EXPANSION_FORM_END),this._requireCharCode(r.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}_consumeText(){const e=this._cursor.clone();this._beginToken(n.TEXT,e);const t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}_isTextEnd(){if(this._cursor.peek()===r.$LT||this._cursor.peek()===r.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(this._cursor.peek()===r.$RBRACE&&this._isInExpansionCase())return!0}return!1}_readUntil(e){const t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==r.$LBRACE)return!1;if(this._interpolationConfig){const e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}}function h(e){return!r.isWhitespace(e)||e===r.$EOF}function d(e){return r.isWhitespace(e)||e===r.$GT||e===r.$SLASH||e===r.$SQ||e===r.$DQ||e===r.$EQ}function m(e){return e==r.$SEMICOLON||e==r.$EOF||!r.isAsciiHexDigit(e)}function f(e){return e==r.$SEMICOLON||e==r.$EOF||!r.isAsciiLetter(e)}function g(e){return e>=r.$a&&e<=r.$z?e-r.$a+r.$A:e}class _{constructor(e,t){if(e instanceof _)this.file=e.file,this.input=e.input,this.end=e.end,this.state=Object.assign({},e.state);else{if(!t)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=t.endPos,this.state={peek:-1,offset:t.startPos,line:t.startLine,column:t.startCol}}}clone(){return new _(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new Ct.ParseSourceSpan(new Ct.ParseLocation(e.file,e.state.offset,e.state.line,e.state.column),new Ct.ParseLocation(this.file,this.state.offset,this.state.line,this.state.column))}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new S('Unexpected character "EOF"',this);const t=this.charAt(e.offset);t===r.$LF?(e.line++,e.column=0):r.isNewLine(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?r.$EOF:this.charAt(e.offset)}}class T extends _{constructor(e,t){e instanceof T?(super(e),this.internalState=Object.assign({},e.internalState)):(super(e,t),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new T(this)}getChars(e){const t=e.clone();let r="";for(;t.internalState.offsetthis.internalState.peek;if(e()===r.$BACKSLASH)if(this.internalState=Object.assign({},this.state),this.advanceState(this.internalState),e()===r.$n)this.state.peek=r.$LF;else if(e()===r.$r)this.state.peek=r.$CR;else if(e()===r.$v)this.state.peek=r.$VTAB;else if(e()===r.$t)this.state.peek=r.$TAB;else if(e()===r.$b)this.state.peek=r.$BSPACE;else if(e()===r.$f)this.state.peek=r.$FF;else if(e()===r.$u)if(this.advanceState(this.internalState),e()===r.$LBRACE){this.advanceState(this.internalState);const t=this.clone();let n=0;for(;e()!==r.$RBRACE;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{const e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(e()===r.$x){this.advanceState(this.internalState);const e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(r.isOctalDigit(e())){let t="",n=0,s=this.clone();for(;r.isOctalDigit(e())&&n<3;)s=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=s.internalState}else r.isNewLine(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){const r=this.input.substr(e.internalState.offset,t),n=parseInt(r,16);if(isNaN(n))throw e.state=e.internalState,new S("Invalid hexadecimal escape sequence",e);return n}}class S{constructor(e,t){this.msg=e,this.cursor=t}}t.CursorError=S}));qe(kt);kt.TokenType,kt.Token,kt.TokenError,kt.TokenizeResult,kt.tokenize,kt.CursorError;var Nt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});class r extends Ct.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,n){return new r(e,t,n)}}t.TreeError=r;class n{constructor(e,t){this.rootNodes=e,this.errors=t}}t.ParseTreeResult=n;t.Parser=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,i=!1){const o=i?this.getTagDefinition:e=>this.getTagDefinition(e.toLowerCase()),a=kt.tokenize(e,t,o,r),c=r&&r.canSelfClose||!1,l=r&&r.allowHtmComponentClosingTags||!1,p=new s(a.tokens,o,c,l,i).build();return new n(p.rootNodes,a.errors.concat(p.errors))}};class s{constructor(e,t,r,n,s){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=s,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==kt.TokenType.EOF;)this._peek.type===kt.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===kt.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===kt.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===kt.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===kt.TokenType.TEXT||this._peek.type===kt.TokenType.RAW_TEXT||this._peek.type===kt.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===kt.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===kt.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new n(this._rootNodes,this._errors)}_advance(){const e=this._peek;return this._index0)return this._errors=this._errors.concat(o.errors),null;const a=new Ct.ParseSourceSpan(e.sourceSpan.start,i.sourceSpan.end),c=new Ct.ParseSourceSpan(t.sourceSpan.start,i.sourceSpan.end);return new vt.ExpansionCase(e.parts[0],o.rootNodes,a,e.sourceSpan,c)}_collectExpansionExpTokens(e){const t=[],n=[kt.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==kt.TokenType.EXPANSION_FORM_START&&this._peek.type!==kt.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type===kt.TokenType.EXPANSION_CASE_EXP_END){if(!i(n,kt.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(r.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(n.pop(),0==n.length)return t}if(this._peek.type===kt.TokenType.EXPANSION_FORM_END){if(!i(n,kt.TokenType.EXPANSION_FORM_START))return this._errors.push(r.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;n.pop()}if(this._peek.type===kt.TokenType.EOF)return this._errors.push(r.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}_getText(e){let t=e.parts[0];if(t.length>0&&"\n"==t[0]){const e=this._getParentElement();null!=e&&0==e.children.length&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}return t}_consumeText(e){const t=this._getText(e);t.length>0&&this._addToParent(new vt.Text(t,e.sourceSpan))}_closeVoidElement(){const e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){const t=e.parts[0],n=e.parts[1],s=[];for(;this._peek.type===kt.TokenType.ATTR_NAME;)s.push(this._consumeAttr(this._advance()));const i=this._getElementFullName(t,n,this._getParentElement());let o=!1;if(this._peek.type===kt.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;const t=this.getTagDefinition(i);this.canSelfClose||t.canSelfClose||null!==gt.getNsPrefix(i)||t.isVoid||this._errors.push(r.create(i,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===kt.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);const a=this._peek.sourceSpan.start,c=new Ct.ParseSourceSpan(e.sourceSpan.start,a),l=new Ct.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),p=new vt.Element(i,s,[],c,c,void 0,l);this._pushElement(p),o&&(this._popElement(i),p.endSourceSpan=c)}_pushElement(e){const t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){const t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(r.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){const n='Unexpected closing tag "'.concat(t,'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags');this._errors.push(r.create(t,e.sourceSpan,n))}}_popElement(e){for(let t=this._elementStack.length-1;t>=0;t--){const r=this._elementStack[t];if(!e||(gt.getNsPrefix(r.name)?r.name==e:r.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1}_consumeAttr(e){const t=gt.mergeNsAndName(e.parts[0],e.parts[1]);let r=e.sourceSpan.end,n="",s=void 0,i=void 0;if(this._peek.type===kt.TokenType.ATTR_QUOTE){i=this._advance().sourceSpan.start}if(this._peek.type===kt.TokenType.ATTR_VALUE){const e=this._advance();n=e.parts[0],r=e.sourceSpan.end,s=e.sourceSpan}if(this._peek.type===kt.TokenType.ATTR_QUOTE){r=this._advance().sourceSpan.end,s=new Ct.ParseSourceSpan(i,r)}return new vt.Attribute(t,n,new Ct.ParseSourceSpan(e.sourceSpan.start,r),s,e.sourceSpan)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_getParentElementSkippingContainers(){let e=null;for(let t=this._elementStack.length-1;t>=0;t--){if(!gt.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}_addToParent(e){const t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}_insertBeforeContainer(e,t,r){if(t){if(e){const n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)}_getElementFullName(e,t,r){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=r&&(e=gt.getNsPrefix(r.name)),gt.mergeNsAndName(e,t)}}function i(e,t){return e.length>0&&e[e.length-1]===t}}));qe(Nt);Nt.TreeError,Nt.ParseTreeResult,Nt.Parser;var xt=Le((function(e,t){
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(t,"__esModule",{value:!0});var r=Nt;t.ParseTreeResult=r.ParseTreeResult,t.TreeError=r.TreeError;class n extends Nt.Parser{constructor(){super(_t.getHtmlTagDefinition)}parse(e,t,r,n=!1){return super.parse(e,t,r,n)}}t.HtmlParser=n}));qe(xt);xt.ParseTreeResult,xt.TreeError,xt.HtmlParser;var Pt=Le((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=null;t.parse=function(e,{canSelfClose:t=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1}={}){return(r||(r=new xt.HtmlParser),r).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:t,allowHtmComponentClosingTags:n},s)}}));qe(Pt);Pt.parse;const{HTML_ELEMENT_ATTRIBUTES:Dt,HTML_TAGS:Rt,isUnknownNamespace:Ot}=ot,{hasPragma:qt}=at,{Node:Lt}=dt,{parseIeConditionalComment:$t}=ft;function It(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i}){const o=Pt,{RecursiveVisitor:a,visitAll:c,Attribute:l,CDATA:p,Comment:u,DocType:h,Element:d,Text:m}=vt,{ParseSourceSpan:f}=Ct,{getHtmlTagDefinition:g}=_t,{rootNodes:_,errors:T}=o.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i});if(0!==T.length){const{msg:e,span:t}=T[0],{line:r,col:n}=t.start;throw ct(e,{start:{line:r+1,column:n+1}})}const S=e=>{const t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=r.startsWith("".concat(t,":")),s=n?r.slice(t.length+1):r;e.name=s,e.namespace=t,e.hasExplicitNamespace=n},y=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return c(new class extends a{visit(e){(e=>{if(e instanceof l)e.type="attribute";else if(e instanceof p)e.type="cdata";else if(e instanceof u)e.type="comment";else if(e instanceof h)e.type="docType";else if(e instanceof d)e.type="element";else{if(!(e instanceof m))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}})(e),(e=>{e instanceof d?(S(e),e.attrs.forEach(e=>{S(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null})):e instanceof u?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof m&&(e.value=e.sourceSpan.toString())})(e),(e=>{if(e instanceof d){const t=g(i?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||Ot(e)?e.tagDefinition=t:e.tagDefinition=g("")}})(e),(e=>{if(e instanceof d&&(!r||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix&&!Ot(e)||(e.name=y(e.name,e=>e in Rt)),n)){const t=Dt[e.name]||Object.create(null);e.attrs.forEach(r=>{r.namespace||(r.name=y(r.name,r=>e.name in Dt&&(r in Dt["*"]||r in t)))})}})(e),(e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new f(e.sourceSpan.start,e.endSourceSpan.end))})(e)}},_),_}function Mt(e){return e.sourceSpan.start.offset}function Ut(e){return e.sourceSpan.end.offset}function Bt({recognizeSelfClosing:e=!1,normalizeTagName:t=!1,normalizeAttributeName:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1}={}){return{parse:(o,a,c)=>function e(t,r,n,i=!0){const{frontMatter:o,content:a}=i?s(t):{frontMatter:null,content:t},c={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},children:It(a,n)};o&&c.children.unshift(o);const l=new Lt(c),p=(s,i)=>{const{offset:o}=i,a=e(t.slice(0,o).replace(/[^\r\n]/g," ")+s,r,n,!1),c=a.children[0].sourceSpan.constructor;a.sourceSpan=new c(i,a.children[a.children.length-1].sourceSpan.end);const l=a.children[0];return l.length===o?a.children.shift():(l.sourceSpan=new c(l.sourceSpan.start.moveBy(o),l.sourceSpan.end),l.value=l.value.slice(o)),a};return l.map(e=>{if("comment"===e.type){const t=$t(e,p);if(t)return t}return e})}(o,c,{recognizeSelfClosing:e,normalizeTagName:t,normalizeAttributeName:r,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:i}),hasPragma:qt,astFormat:"html",locStart:Mt,locEnd:Ut}}var Ft={parsers:{html:Bt({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Bt(),vue:Bt({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0}),lwc:Bt()}},Vt=Ft.parsers;e.default=Ft,e.parsers=Vt,Object.defineProperty(e,"__esModule",{value:!0})}));
diff --git a/node_modules/prettier/parser-markdown.js b/node_modules/prettier/parser-markdown.js
new file mode 100644
index 0000000..2efdc3c
--- /dev/null
+++ b/node_modules/prettier/parser-markdown.js
@@ -0,0 +1,19 @@
+!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((r=r||self).prettierPlugins=r.prettierPlugins||{},r.prettierPlugins.markdown={}))}(this,(function(r){"use strict";var e=function(){for(var r={},e=0;ee)return{line:t+1,column:e-(r[t-1]||0)+1,offset:e};return{}}}function p(r){return function(e){var t=e&&e.line,u=e&&e.column;if(!isNaN(t)&&!isNaN(u)&&t-1 in r)return(r[t-2]||0)+u-1||0;return-1}}var d=function(r,e){return function(t){var u,n=0,o=t.indexOf("\\"),a=r[e],i=[];for(;-1!==o;)i.push(t.slice(n,o)),n=o+1,(u=t.charAt(n))&&-1!==a.indexOf(u)||i.push("\\"),o=t.indexOf("\\",n);return i.push(t.slice(n)),i.join("")}};var h={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},g=Object.freeze({__proto__:null,AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ",default:h}),m=Object.freeze({__proto__:null,default:{0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"}}),b=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=48&&e<=57};var E=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57};var v=function(r){var e="string"==typeof r?r.charCodeAt(0):r;return e>=97&&e<=122||e>=65&&e<=90};var C=function(r){return v(r)||b(r)};var F={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},w=n(Object.freeze({__proto__:null,AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:"",default:F})),A=function(r){return!!y.call(w,r)&&w[r]},y={}.hasOwnProperty;var q=n(g),k=n(m),x=function(r,e){var t,u,n={};e||(e={});for(u in T)t=e[u],n[u]=null==t?T[u]:t;(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start);return function(r,e){var t,u,n,o,a,i,c,s,l,D,f,p,d,h,g,m,b,E,v,F=e.additional,w=e.nonTerminated,y=e.text,x=e.reference,T=e.warning,V=e.textContext,j=e.referenceContext,z=e.warningContext,G=e.position,H=e.indent||[],M=r.length,_=0,$=-1,Z=G.column||1,Y=G.line||1,J="",Q=[];"string"==typeof F&&(F=F.charCodeAt(0));m=K(),s=T?function(r,e){var t=K();t.column+=e,t.offset+=e,T.call(z,I[r],t,r)}:S,_--,M++;for(;++_=55296&&W<=57343||W>1114111?(s(7,E),i=L(65533)):i in k?(s(6,E),i=k[i]):(D="",U(i)&&s(6,E),i>65535&&(D+=L((i-=65536)>>>10|55296),i=56320|1023&i),i=D+L(i))):h!==N&&s(4,E)),i?(X(),m=K(),_=v-1,Z+=v-d+1,Q.push(i),(b=K()).offset++,x&&x.call(j,i,{start:m,end:b},r.slice(d-1,v)),m=b):(o=r.slice(d-1,v),J+=o,Z+=o.length,_=v-1)}else 10===a&&(Y++,$++,Z=0),a==a?(J+=L(a),Z++):X();var W;return Q.join("");function K(){return{line:Y,column:Z,offset:_+(G.offset||0)}}function X(){J&&(Q.push(J),y&&y.call(V,J,{start:m,end:K()}),J="")}}(r,n)},B={}.hasOwnProperty,L=String.fromCharCode,S=Function.prototype,T={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},N="named",O="hexadecimal",R={hexadecimal:16,decimal:10},P={};P.named=C,P.decimal=b,P[O]=E;var I={};function U(r){return r>=1&&r<=8||11===r||r>=13&&r<=31||r>=127&&r<=159||r>=64976&&r<=65007||65535==(65535&r)||65534==(65535&r)}I[1]="Named character references must be terminated by a semicolon",I[2]="Numeric character references must be terminated by a semicolon",I[3]="Named character references cannot be empty",I[4]="Numeric character references cannot be empty",I[5]="Named character references must be known",I[6]="Numeric character references cannot be disallowed",I[7]="Numeric character references cannot be outside the permissible Unicode range";var V=function(r){return n.raw=o,n;function t(e){for(var t=r.offset,u=e.line,n=[];++u&&u in t;)n.push((t[u]||0)+1);return{start:e,indent:n}}function u(e,t,u){3!==u&&r.file.message(e,t)}function n(e,n,o){x(e,{position:t(n),warning:u,text:o,reference:o,textContext:r,referenceContext:r})}function o(r,n,o){return x(r,e(o,{position:t(n),warning:u}))}};var j=function(r){return function(e,t){var u,n,o,a,i,c,s=this,l=s.offset,D=[],f=s[r+"Methods"],p=s[r+"Tokenizers"],d=t.line,h=t.column;if(!e)return D;E.now=m,E.file=s.file,g("");for(;e;){for(u=-1,n=f.length,i=!1;++u"],_=M.concat(["~","|"]),$=_.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function Z(r){var e=r||{};return e.commonmark?$:e.gfm?_:M}Z.default=M,Z.gfm=_,Z.commonmark=$;var Y={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:n(Object.freeze({__proto__:null,default:["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}))},J=function(r){var t,u,n=this.options;if(null==r)r={};else{if("object"!=typeof r)throw new Error("Invalid value `"+r+"` for setting `options`");r=e(r)}for(t in Y){if(null==(u=r[t])&&(u=n[t]),"blocks"!==t&&"boolean"!=typeof u||"blocks"===t&&"object"!=typeof u)throw new Error("Invalid value `"+u+"` for setting `options."+t+"`");r[t]=u}return this.options=r,this.escape=H(r),this};var Q=W;function W(r){if("string"==typeof r)return function(r){return function(e){return Boolean(e&&e.type===r)}}(r);if(null==r)return rr;if("object"==typeof r)return("length"in r?X:K)(r);if("function"==typeof r)return r;throw new Error("Expected function, string, or object as test")}function K(r){return function(e){var t;for(t in r)if(e[t]!==r[t])return!1;return!0}}function X(r){var e=function(r){for(var e=[],t=r.length,u=-1;++u-1&&a
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */;var br,Er="",vr=function(r,e){if("string"!=typeof r)throw new TypeError("expected a string");if(1===e)return r;if(2===e)return r+r;var t=r.length*e;if(br!==r||void 0===br)br=r,Er="";else if(Er.length>=t)return Er.substr(0,t);for(;t>Er.length&&e>1;)1&e&&(Er+=r),e>>=1,r+=r;return Er=(Er+=r).substr(0,t)};var Cr=function(r){var e=String(r),t=e.length;for(;"\n"===e.charAt(--t););return e.slice(0,t+1)};var Fr=function(r,e,t){var u,n,o,a=-1,i=e.length,c="",s="",l="",D="";for(;++a=4)){for(i="";g"!==e.charAt(C))return;if(t)return!0;C=0;for(;C"===e.charAt(C)?(C++,l=!0," "===e.charAt(C)&&C++):C=s,i=e.slice(C,a),!l&&!yr(i)){C=s;break}if(!l&&(o=e.slice(C),qr(d,p,this,[r,o,!0])))break;c=s===C?i:e.slice(s,a),v.push(C-s),b.push(c),E.push(i),C=a+1}C=-1,m=v.length,u=r(b.join("\n"));for(;++C6)return;if(!o||!a.pedantic&&"#"===e.charAt(c+1))return;i=e.length+1,n="";for(;++c=3&&(!u||"\n"===u)?(s+=a,!!t||r(s)({type:"thematicBreak"})):void 0;a+=u}};var Lr=function(r){var e,t=0,u=0,n=r.charAt(t),o={};for(;n in Sr;)u+=e=Sr[n],e>1&&(u=Math.floor(u/e)*e),o[u]=t,n=r.charAt(++t);return{indent:u,stops:o}},Sr={" ":1,"\t":4};var Tr=function(r,e){var t,u,n,o,a=r.split("\n"),i=a.length+1,c=1/0,s=[];a.unshift(vr(" ",e)+"!");for(;i--;)if(u=Lr(a[i]),s[i]=u.stops,0!==yr(a[i]).length){if(!u.indent){c=1/0;break}u.indent>0&&u.indent=4)return;if(a=e.charAt(T),u=x?zr:jr,!0===Vr[a])i=a,o=!1;else{for(o=!0,n="";T=4&&(k=!0),v&&R>=v.indent&&(k=!0),a=e.charAt(T),D=null,!k){if(!0===Vr[a])D=a,T++,R++;else{for(n="";T=v.indent||R>4):k=!0,l=!1,T=s;if(p=e.slice(s,c),f=s===T?p:e.slice(T,c),("*"===D||"_"===D||"-"===D)&&L.thematicBreak.call(this,r,p,!0))break;if(d=h,h=!yr(f).length,k&&v)v.value=v.value.concat(E,p),m=m.concat(E,p),E=[];else if(l)0!==E.length&&(v.value.push(""),v.trail=E.concat()),v={value:[p],indent:R,trail:[]},g.push(v),m=m.concat(E,p),E=[];else if(h){if(d)break;E.push(p)}else{if(d)break;if(qr(S,L,this,[r,p,!0]))break;v.value=v.value.concat(E,p),m=m.concat(E,p),E=[]}T=c+1}A=r(m.join("\n")).reset({type:"list",ordered:o,start:O,loose:null,children:[]}),C=this.enterList(),F=this.enterBlock(),w=!1,T=-1,N=g.length;for(;++T=3){l--;break}D+=o}u="",n="";for(;++l`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",Yr="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Jr={openCloseTag:new RegExp("^(?:"+Zr+"|"+Yr+")"),tag:new RegExp("^(?:"+Zr+"|"+Yr+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},Qr=Jr.openCloseTag,Wr=function(r,e,t){var u,n,o,a,i,c,s,l=this.options.blocks,D=e.length,f=0,p=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^?("+l.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Qr.source+"\\s*$"),/^$/,!1]];for(;f"!==r&&"["!==r&&"]"!==r}function ae(r){return"["!==r&&"]"!==r&&!dr(r)}oe.delimiter=">";var ie=function(r,e,t){var u,n,o,a,i,c,s,l,D,f,p,d,h,g,m,b,E,v,C,F,w,A,y,q;if(!this.options.gfm)return;u=0,v=0,c=e.length+1,s=[];for(;uA){if(v<2)return;break}s.push(e.slice(u,A)),v++,u=A+1}a=s.join("\n"),n=s.splice(1,1)[0]||[],u=0,c=n.length,v--,o=!1,p=[];for(;u1&&(D?(a+=l.slice(0,l.length-1),l=l.charAt(l.length-1)):(a+=l,l="")),b=r.now(),r(a)({type:"tableCell",children:this.tokenizeInline(d,b)},i)),r(l+D),l="",d=""}else if(l&&(d+=l,l=""),d+=D,"\\"===D&&u!==c-2&&(d+=C.charAt(u+1),u++),"`"===D){for(g=1;C.charAt(u+1)===D;)d+=D,u++,g++;m?g>=m&&(m=0):m=g}h=!1,u++}else d?l+=D:r(D),u++;E||r("\n"+n)}return w};var ce=function(r,e,t){var u,n,o,a,i,c=this.options,s=c.commonmark,l=c.gfm,D=this.blockTokenizers,f=this.interruptParagraph,p=e.indexOf("\n"),d=e.length;for(;p=4){p=e.indexOf("\n",p+1);continue}}if(n=e.slice(p+1),qr(f,D,this,[r,n,!0]))break;if(D.list.call(this,r,n,!0)&&(this.inList||s||l&&!b(yr.left(n).charAt(0))))break;if(u=p,-1!==(p=e.indexOf("\n",p+1))&&""===yr(e.slice(u,p))){p=u;break}}if(n=e.slice(0,p),""===yr(n))return r(n),null;if(t)return!0;return i=r.now(),n=Cr(n),r(n)({type:"paragraph",children:this.tokenizeInline(n,i)})};var se=function(r,e){return r.indexOf("\\",e)};var le=De;function De(r,e,t){var u,n;if("\\"===e.charAt(0)&&(u=e.charAt(1),-1!==this.escape.indexOf(u)))return!!t||(n="\n"===u?{type:"break"}:{type:"text",value:u},r("\\"+u)(n))}De.locator=se;var fe=function(r,e){return r.indexOf("<",e)};var pe=he;he.locator=fe,he.notInLink=!0;var de="mailto:".length;function he(r,e,t){var u,n,o,a,i,c,s,l,D,f,p;if("<"===e.charAt(0)){for(this,u="",n=e.length,o=0,a="",c=!1,s="",o++,u="<";o"===i||"@"===i||":"===i&&"/"===e.charAt(o+1)));)a+=i,o++;if(a){if(s+=a,a="",s+=i=e.charAt(o),o++,"@"===i)c=!0;else{if(":"!==i||"/"!==e.charAt(o+1))return;s+="/",o++}for(;o"!==i);)a+=i,o++;if(i=e.charAt(o),a&&">"===i)return!!t||(D=s+=a,u+=s+i,(l=r.now()).column++,l.offset++,c&&("mailto:"===s.slice(0,de).toLowerCase()?(D=D.substr(de),l.column+=de,l.offset+=de):s="mailto:"+s),f=this.inlineTokenizers,this.inlineTokenizers={text:f.text},p=this.enterLink(),D=this.tokenizeInline(D,l),this.inlineTokenizers=f,p(),r(u)({type:"link",title:null,url:x(s,{nonTerminated:!1}),children:D}))}}}var ge=function(r,e){var t,u=me.length,n=-1,o=-1;if(!this.options.gfm)return-1;for(;++n/i;function qe(r,e,t){var u,n,o=e.length;if(!("<"!==e.charAt(0)||o<3)&&(u=e.charAt(1),(v(u)||"?"===u||"!"===u||"/"===u)&&(n=e.match(Fe))))return!!t||(n=n[0],!this.inLink&&Ae.test(n)?this.inLink=!0:this.inLink&&ye.test(n)&&(this.inLink=!1),r(n)({type:"html",value:n}))}var ke=function(r,e){var t=r.indexOf("[",e),u=r.indexOf("![",e);if(-1===u)return t;return t=o&&(o=0):o=n}else if("\\"===A)w++,c+=e.charAt(w);else if(o&&!k||"["!==A){if((!o||k)&&"]"===A){if(!g){if(!y)for(;w"!==(A=e.charAt(w));){if(q&&"\n"===A)return;m+=A,w++}if(">"!==e.charAt(w))return;F+="<"+m+">",b=m,w++}else{for(A=null,c="";we&&" "===r.charAt(t-1);)t--;return t};var We=Ke;Ke.locator=Qe;function Ke(r,e,t){for(var u,n=e.length,o=-1,a="";++o
+ * @license MIT
+ */;var it=Object.prototype.hasOwnProperty,ct=Object.prototype.toString,st=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,Dt=function(r){return"function"==typeof Array.isArray?Array.isArray(r):"[object Array]"===ct.call(r)},ft=function(r){if(!r||"[object Object]"!==ct.call(r))return!1;var e,t=it.call(r,"constructor"),u=r.constructor&&r.constructor.prototype&&it.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!u)return!1;for(e in r);return void 0===e||it.call(r,e)},pt=function(r,e){st&&"__proto__"===e.name?st(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},dt=function(r,e){if("__proto__"===e){if(!it.call(r,e))return;if(lt)return lt(r,e).value}return r[e]},ht=function r(){var e,t,u,n,o,a,i=arguments[0],c=1,s=arguments.length,l=!1;for("boolean"==typeof i&&(l=i,i=arguments[1]||{},c=2),(null==i||"object"!=typeof i&&"function"!=typeof i)&&(i={});c{if("[object Object]"!==Object.prototype.toString.call(r))return!1;const e=Object.getPrototypeOf(r);return null===e||e===Object.prototype},mt=[].slice,bt=function(r,e){var t;return function(){var e,o=mt.call(arguments,0),a=r.length>o.length;a&&o.push(u);try{e=r.apply(null,o)}catch(r){if(a&&t)throw r;return u(r)}a||(e&&"function"==typeof e.then?e.then(n,u):e instanceof Error?u(e):n(e))};function u(){t||(t=!0,e.apply(null,arguments))}function n(r){u(null,r)}};var Et=Ct;Ct.wrap=bt;var vt=[].slice;function Ct(){var r=[],e={run:function(){var e=-1,t=vt.call(arguments,0,-1),u=arguments[arguments.length-1];if("function"!=typeof u)throw new Error("Expected function as last argument, not "+u);function n(o){var a=r[++e],i=vt.call(arguments,0),c=i.slice(1),s=t.length,l=-1;if(o)u(o);else{for(;++l1)for(var t=1;t
+ * @license MIT
+ */function Du(r){var e,t,u;if(r){if("string"==typeof r||au(r))r={contents:r};else if("message"in r&&"messages"in r)return r}else r={};if(!(this instanceof Du))return new Du(r);for(this.data={},this.messages=[],this.history=[],this.cwd=eu.cwd(),t=-1,u=lu.length;++t{if("string"!=typeof r)throw new TypeError("Expected a string");return r.replace(ku,"\\$&")};const Bu={"---":"yaml","+++":"toml"};var Lu=function(r){const e=Object.keys(Bu).map(xu).join("|"),t=r.match(new RegExp("^(".concat(e,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===t)return{frontMatter:null,content:r};const[u,n,o]=t;return{frontMatter:{type:Bu[n],value:o,raw:u.replace(/\n$/,"")},content:u.replace(/[^\n]/g," ")+r.slice(u.length)}};const Su=["format","prettier"];function Tu(r){const e="@(".concat(Su.join("|"),")"),t=new RegExp(["\x3c!--\\s*".concat(e,"\\s*--\x3e"),"\x3c!--.*\r?\n[\\s\\S]*(^|\n)[^\\S\n]*".concat(e,"[^\\S\n]*($|\n)[\\s\\S]*\n.*--\x3e")].join("|"),"m"),u=r.match(t);return u&&0===u.index}var Nu={startWithPragma:Tu,hasPragma:r=>Tu(Lu(r).content.trimStart()),insertPragma:r=>{const e=Lu(r),t="\x3c!-- @".concat(Su[0]," --\x3e");return e.frontMatter?"".concat(e.frontMatter.raw,"\n\n").concat(t,"\n\n").concat(e.content):"".concat(t,"\n\n").concat(e.content)}},Ou=r=>"string"==typeof r?r.replace((({onlyFirst:r=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,r?void 0:"g")})(),""):r;const Ru=r=>!Number.isNaN(r)&&(r>=4352&&(r<=4447||9001===r||9002===r||11904<=r&&r<=12871&&12351!==r||12880<=r&&r<=19903||19968<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65131||65281<=r&&r<=65376||65504<=r&&r<=65510||110592<=r&&r<=110593||127488<=r&&r<=127569||131072<=r&&r<=262141));var Pu=Ru,Iu=Ru;Pu.default=Iu;const Uu=r=>{if("string"!=typeof(r=r.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===r.length)return 0;r=Ou(r);let e=0;for(let t=0;t=127&&u<=159||(u>=768&&u<=879||(u>65535&&t++,e+=Pu(u)?2:1))}return e};var Vu=Uu,ju=Uu;Vu.default=ju;const zu=/[^\x20-\x7F]/;function Gu(r){return(e,t,u)=>{const n=u&&u.backwards;if(!1===t)return!1;const{length:o}=e;let a=t;for(;a>=0&&a"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((r,e)=>{r.forEach(r=>{rn[r]=e})});const tn={"==":!0,"!=":!0,"===":!0,"!==":!0},un={"*":!0,"/":!0,"%":!0},nn={">>":!0,">>>":!0,"<<":!0};function on(r,e,t){let u=0;for(let n=t=t||0;n(t.match(a.regex)||[]).length?a.quote:o.quote}return i}function cn(r,e,t){const u='"'===e?"'":'"',n=r.replace(/\\([\s\S])|(['"])/g,(r,n,o)=>n===u?n:o===e?"\\"+o:o||(t&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(n)?n:"\\"+n));return e+n+e}function sn(r){return r&&(r.comments&&r.comments.length>0&&r.comments.some(r=>ln(r)&&!r.unignore)||r.prettierIgnore)}function ln(r){return"prettier-ignore"===r.value.trim()}function Dn(r,e){(r.comments||(r.comments=[])).push(e),e.printed=!1,"JSXText"===r.type&&(e.printed=!0)}var fn={replaceEndOfLineWith:function(r,e){const t=[];for(const u of r.split("\n"))0!==t.length&&t.push(e),t.push(u);return t},getStringWidth:function(r){return r?zu.test(r)?Vu(r):r.length:0},getMaxContinuousCount:function(r,e){const t=r.match(new RegExp("(".concat(xu(e),")+"),"g"));return null===t?0:t.reduce((r,t)=>Math.max(r,t.length/e.length),0)},getMinNotPresentContinuousCount:function(r,e){const t=r.match(new RegExp("(".concat(xu(e),")+"),"g"));if(null===t)return 0;const u=new Map;let n=0;for(const r of t){const t=r.length/e.length;u.set(t,!0),t>n&&(n=t)}for(let r=1;r1?r[r.length-2]:null},getLast:r=>r[r.length-1],getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Ku,getNextNonSpaceNonCommentCharacterIndex:Xu,getNextNonSpaceNonCommentCharacter:function(r,e,t){return r.charAt(Xu(r,e,t))},skip:Gu,skipWhitespace:Hu,skipSpaces:Mu,skipToLineEnd:_u,skipEverythingButNewLine:$u,skipInlineComment:Zu,skipTrailingComment:Yu,skipNewline:Ju,isNextLineEmptyAfterIndex:Wu,isNextLineEmpty:function(r,e,t){return Wu(r,t(e))},isPreviousLineEmpty:function(r,e,t){let u=t(e)-1;return u=Mu(r,u,{backwards:!0}),u=Ju(r,u,{backwards:!0}),u=Mu(r,u,{backwards:!0}),u!==Ju(r,u,{backwards:!0})},hasNewline:Qu,hasNewlineInRange:function(r,e,t){for(let u=e;ur(e,t,[o].concat(n)))),o}(r,null,null)},splitText:function(r,e){const t=[];return("preserve"===e.proseWrap?r:r.replace(new RegExp("(".concat(pn,")\n(").concat(pn,")"),"g"),"$1$2")).split(/([ \t\n]+)/).forEach((r,e,n)=>{e%2!=1?(0!==e&&e!==n.length-1||""!==r)&&r.split(new RegExp("(".concat(pn,")"))).forEach((r,e,t)=>{(0!==e&&e!==t.length-1||""!==r)&&(e%2!=0?u(vn.test(r)?{type:"word",value:r,kind:"cjk-punctuation",hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:r,kind:En.test(r)?"k-letter":"cj-letter",hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==r&&u({type:"word",value:r,kind:"non-cjk",hasLeadingPunctuation:vn.test(r[0]),hasTrailingPunctuation:vn.test(gn(r))}))}):t.push({type:"whitespace",value:/\n/.test(r)?"\n":" "})}),t;function u(r){const e=gn(t);var u,n;e&&"word"===e.type&&("non-cjk"===e.kind&&"cj-letter"===r.kind&&!e.hasTrailingPunctuation||"cj-letter"===e.kind&&"non-cjk"===r.kind&&!r.hasLeadingPunctuation?t.push({type:"whitespace",value:" "}):(u="non-cjk",n="cjk-punctuation",e.kind===u&&r.kind===n||e.kind===n&&r.kind===u||[e.value,r.value].some(r=>/\u3000/.test(r))||t.push({type:"whitespace",value:""}))),t.push(r)}},punctuationPattern:hn,getFencedCodeBlockValue:function(r,e){const t=e.slice(r.position.start.offset,r.position.end.offset),u=t.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,".concat(u,"}")),o=t.split("\n"),a=t[u],i=t.slice(u).match(new RegExp("^[".concat(a,"]+")))[0],c=new RegExp("^\\s{0,3}".concat(i)).test(o[o.length-1].slice(s(o.length-1)));return o.slice(1,c?-1:void 0).map((r,e)=>r.slice(s(e+1)).replace(n,"")).join("\n");function s(e){return r.position.indent[e-1]-1}},getOrderedListItemInfo:Cn,hasGitDiffFriendlyOrderedList:function(r,e){if(!r.ordered)return!1;if(r.children.length<2)return!1;const t=Number(Cn(r.children[0],e.originalText).numberText),u=Number(Cn(r.children[1],e.originalText).numberText);if(0===t&&r.children.length>2){const t=Number(Cn(r.children[2],e.originalText).numberText);return 1===u&&1===t}return 1===u},INLINE_NODE_TYPES:mn,INLINE_NODE_WRAPPER_TYPES:bn};const wn=/^import\s/,An=/^export\s/,yn=r=>wn.test(r),qn=r=>An.test(r),kn=(r,e)=>{const t=e.indexOf("\n\n"),u=e.slice(0,t);if(qn(u)||yn(u))return r(u)({type:qn(u)?"export":"import",value:u})};kn.locator=r=>qn(r)||yn(r)?-1:1;var xn={esSyntax:function(){const{Parser:r}=this,e=r.prototype.blockTokenizers,t=r.prototype.blockMethods;e.esSyntax=kn,t.splice(t.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",COMMENT_REGEX:"\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e"};function Bn(r,e){return r.indexOf("$",e)}const Ln=/^\\\$/,Sn=/^\$((?:\\\$|[^$])+)\$/,Tn=/^\$\$((?:\\\$|[^$])+)\$\$/;var Nn=function(r){function e(e,t,u){let n=!0,o=Tn.exec(t);o||(o=Sn.exec(t),n=!1);const a=Ln.exec(t);if(a)return!!u||e(a[0])({type:"text",value:"$"});if("\\$"===t.slice(-2))return e(t)({type:"text",value:t.slice(0,-2)+"$"});if(o){if(u)return!0;if(o[0].includes("`")&&t.slice(o[0].length).includes("`")){const r=t.slice(0,t.indexOf("`"));return e(r)({type:"text",value:r})}const a=o[1].trim();return e(o[0])({type:"inlineMath",value:a,data:{hName:"span",hProperties:{className:"inlineMath"+(n&&r.inlineMathDouble?" inlineMathDouble":"")},hChildren:[{type:"text",value:a}]}})}}e.locator=Bn;const t=this.Parser,u=t.prototype.inlineTokenizers,n=t.prototype.inlineMethods;u.math=e,n.splice(n.indexOf("text"),0,"math");const o=this.Compiler;if(null!=o){o.prototype.visitors.inlineMath=function(r){return"$"+r.value+"$"}}},On=function(r){const e=this.Parser,t=e.prototype.blockTokenizers,u=e.prototype.blockMethods;t.math=function(r,e,t){for(var u,n,o,a,i,c,s,l,D,f,p=e.length+1,d=0,h="";d=4)){for(a="";d
{const t=mu().use(nt,Object.assign({footnotes:!0,commonmark:!0},r&&{blocks:[xn.BLOCKS_REGEX]})).use(zn).use(Rn).use(r?xn.esSyntax:Vn).use(Gn).use(r?jn:Vn);return t.runSync(t.parse(e))}}function Vn(r){return r}function jn(){return r=>Pn(r,(r,e,[t])=>"html"!==r.type||r.value.match(xn.COMMENT_REGEX)||In.includes(t.type)?r:Object.assign({},r,{type:"jsx"}))}function zn(){const r=this.Parser.prototype;function e(r,e){const t=Lu(e);if(t.frontMatter)return r(t.frontMatter.raw)(t.frontMatter)}r.blockMethods=["frontMatter"].concat(r.blockMethods),r.blockTokenizers.frontMatter=e,e.onlyAtStart=!0}function Gn(){const r=this.Parser.prototype,e=r.inlineMethods;function t(r,e){const t=e.match(/^({%[\s\S]*?%}|{{[\s\S]*?}})/);if(t)return r(t[0])({type:"liquidNode",value:t[0]})}e.splice(e.indexOf("text"),0,"liquid"),r.inlineTokenizers.liquid=t,t.locator=function(r,e){return r.indexOf("{",e)}}const Hn={astFormat:"mdast",hasPragma:Nu.hasPragma,locStart:r=>r.position.start.offset,locEnd:r=>r.position.end.offset,preprocess:r=>r.replace(/\n\s+$/,"\n")},Mn=Object.assign({},Hn,{parse:Un({isMDX:!1})});var _n={parsers:{remark:Mn,markdown:Mn,mdx:Object.assign({},Hn,{parse:Un({isMDX:!0})})}},$n=_n.parsers;r.default=_n,r.parsers=$n,Object.defineProperty(r,"__esModule",{value:!0})}));
diff --git a/node_modules/prettier/parser-postcss.js b/node_modules/prettier/parser-postcss.js
new file mode 100644
index 0000000..839e1f8
--- /dev/null
+++ b/node_modules/prettier/parser-postcss.js
@@ -0,0 +1,8 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.postcss=t():(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.postcss=t())}(new Function("return this")(),(function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=59)}([function(e,t,r){"use strict";t.__esModule=!0;t.TAG="tag",t.STRING="string",t.SELECTOR="selector",t.ROOT="root",t.PSEUDO="pseudo",t.NESTING="nesting",t.ID="id",t.COMMENT="comment",t.COMBINATOR="combinator",t.CLASS="class",t.ATTRIBUTE="attribute",t.UNIVERSAL="universal"},function(e,t,r){"use strict";const n=r(2);class Container extends n{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t,r,n=this.lastEach;if(this.indexes[n]=0,this.nodes){for(;this.indexes[n]{let n=e(t,r);return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkType(e,t){if(!e||!t)throw new Error("Parameters {type} and {callback} are required.");const r="function"==typeof e;return this.walk((n,o)=>{if(r&&n instanceof e||!r&&n.type===e)return t.call(this,n,o)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertAfter(e,t){let r,n=this.index(e);this.nodes.splice(n+1,0,t);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+this.nodes.length);return this}insertBefore(e,t){let r,n=this.index(e);this.nodes.splice(n,0,t);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+this.nodes.length);return this}removeChild(e){let t;e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}}Container.registerWalker=e=>{let t="walk"+e.name;t.lastIndexOf("s")!==t.length-1&&(t+="s"),Container.prototype[t]||(Container.prototype[t]=function(t){return this.walkType(e,t)})},e.exports=Container},function(e,t,r){"use strict";e.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let t in e)this[t]=e[t]}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(e){e=e||{};let t=function cloneNode(e,t){let r=new e.constructor;for(let n in e){if(!e.hasOwnProperty(n))continue;let o=e[n],i=typeof o;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:o instanceof Array?r[n]=o.map(e=>cloneNode(e,r)):"before"!==n&&"after"!==n&&"between"!==n&&"semicolon"!==n&&("object"===i&&null!==o&&(o=cloneNode(o)),r[n]=o)}return r}(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e){e=e||{};let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e){e=e||{};let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let t of e)this.parent.insertBefore(this,t);this.remove()}return this}moveTo(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}moveBefore(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}moveAfter(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}next(){let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){let e=this.parent.index(this);return this.parent.nodes[e-1]}toJSON(){let e={};for(let t in this){if(!this.hasOwnProperty(t))continue;if("parent"===t)continue;let r=this[t];r instanceof Array?e[t]=r.map(e=>"object"==typeof e&&e.toJSON?e.toJSON():e):"object"==typeof r&&r.toJSON?e[t]=r.toJSON():e[t]=r}return e}root(){let e=this;for(;e.parent;)e=e.parent;return e}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}positionInside(e){let t=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:{};for(var t in _classCallCheck(this,_class),e)this[t]=e[t];var r=e.spaces,n=(r=void 0===r?{}:r).before,o=void 0===n?"":n,i=r.after,s=void 0===i?"":i;this.spaces={before:o,after:s}}return _class.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},_class.prototype.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},_class.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},_class.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},_class.prototype.clone=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o(this);for(var r in e)t[r]=e[r];return t},_class.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},_class}();t.default=i,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n,o=function(){function defineProperties(e,t){for(var r=0;r=0;a--)"."===(o=s[a])?s.splice(a,1):".."===o?u++:u>0&&(""===o?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return""===(r=s.join("/"))&&(r=i?"/":"."),n?(n.path=r,urlGenerate(n)):r}function join(e,t){""===e&&(e="."),""===t&&(t=".");var r=urlParse(t),o=urlParse(e);if(o&&(e=o.path||"/"),r&&!r.scheme)return o&&(r.scheme=o.scheme),urlGenerate(r);if(r||t.match(n))return t;if(o&&!o.host&&!o.path)return o.host=t,urlGenerate(o);var i="/"===t.charAt(0)?t:normalize(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=i,urlGenerate(o)):i}t.urlParse=urlParse,t.urlGenerate=urlGenerate,t.normalize=normalize,t.join=join,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var o=!("__proto__"in Object.create(null));function identity(e){return e}function isProtoString(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function strcmp(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=o?identity:function(e){return isProtoString(e)?"$"+e:e},t.fromSetString=o?identity:function(e){return isProtoString(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=strcmp(e.source,t.source);return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=e.generatedLine-t.generatedLine)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=strcmp(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=strcmp(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:strcmp(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=urlParse(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=join(urlGenerate(n),t)}return normalize(t)}},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(11)),o=_interopRequireDefault(r(47)),i=_interopRequireDefault(r(96));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r"),this.map&&(this.map.file=this.from)}var e,t,r,u=Input.prototype;return u.error=function(e,t,r,n){var i;void 0===n&&(n={});var s=this.origin(t,r);return(i=s?new o.default(e,s.line,s.column,s.source,s.file,n.plugin):new o.default(e,t,r,this.css,this.file,n.plugin)).input={line:t,column:r,source:this.css},this.file&&(i.input.file=this.file),i},u.origin=function(e,t){if(!this.map)return!1;var r=this.map.consumer(),n=r.originalPositionFor({line:e,column:t});if(!n.source)return!1;var o={file:this.mapResolve(n.source),line:n.line,column:n.column},i=r.sourceContentFor(n.source);return i&&(o.source=i),o},u.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:n.default.resolve(this.map.consumer().sourceRoot||".",e)},e=Input,(t=[{key:"from",get:function(){return this.file||this.id}}])&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Input}();t.default=u,e.exports=t.default},function(e,t,r){"use strict";var n;t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function Comment(t){var r;return(r=e.call(this,t)||this).type="comment",r}return r=e,(t=Comment).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,Comment}(((n=r(12))&&n.__esModule?n:{default:n}).default);t.default=o,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};var o=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;return e.stringify=function(e,t){this[e.type](e,t)},e.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},e.comment=function(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)},e.decl=function(e,t){var r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)},e.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},e.atrule=function(e,t){var r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{var o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}},e.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),n=0;n0&&void 0!==e.raws.after)return-1!==(t=e.raws.after).indexOf("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/[^\s]/g,"")),t},e.rawBeforeOpen=function(e){var t;return e.walk((function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1})),t},e.rawColon=function(e){var t;return e.walkDecls((function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t},e.beforeAfter=function(e,t){var r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var n=e.parent,o=0;n&&"root"!==n.type;)o+=1,n=n.parent;if(-1!==r.indexOf("\n")){var i=this.raw(e,null,"indent");if(i.length)for(var s=0;s=u.length)break;l=u[c++]}else{if((c=u.next()).done)break;l=c.value}var f=l;this.nodes.push(f)}}return this},c.prepend=function(){for(var e=arguments.length,t=new Array(e),r=0;r=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var u=s,a=this.normalize(u,this.first,"prepend").reverse(),c=a,l=Array.isArray(c),f=0;for(c=l?c:c[Symbol.iterator]();;){var p;if(l){if(f>=c.length)break;p=c[f++]}else{if((f=c.next()).done)break;p=f.value}var h=p;this.nodes.unshift(h)}for(var d in this.indexes)this.indexes[d]=this.indexes[d]+a.length}return this},c.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes){var r=this.nodes,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}i.cleanRaws(t)}}},c.insertBefore=function(e,t){var r,n=0===(e=this.index(e))&&"prepend",o=this.normalize(t,this.nodes[e],n).reverse(),i=o,s=Array.isArray(i),u=0;for(i=s?i:i[Symbol.iterator]();;){var a;if(s){if(u>=i.length)break;a=i[u++]}else{if((u=i.next()).done)break;a=u.value}var c=a;this.nodes.splice(e,0,c)}for(var l in this.indexes)e<=(r=this.indexes[l])&&(this.indexes[l]=r+o.length);return this},c.insertAfter=function(e,t){e=this.index(e);var r,n=this.normalize(t,this.nodes[e]).reverse(),o=n,i=Array.isArray(o),s=0;for(o=i?o:o[Symbol.iterator]();;){var u;if(i){if(s>=o.length)break;u=o[s++]}else{if((s=o.next()).done)break;u=s.value}var a=u;this.nodes.splice(e+1,0,a)}for(var c in this.indexes)e<(r=this.indexes[c])&&(this.indexes[c]=r+n.length);return this},c.removeChild=function(e){var t;for(var r in e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this},c.removeAll=function(){var e=this.nodes,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},c.replaceValues=function(e,t,r){return r||(r=t,t={}),this.walkDecls((function(n){t.props&&-1===t.props.indexOf(n.prop)||t.fast&&-1===n.value.indexOf(t.fast)||(n.value=n.value.replace(e,r))})),this},c.every=function(e){return this.nodes.every(e)},c.some=function(e){return this.nodes.some(e)},c.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},c.normalize=function(e,t){var i=this;if("string"==typeof e)e=function cleanSource(e){return e.map((function(e){return e.nodes&&(e.nodes=cleanSource(e.nodes)),delete e.source,e}))}(r(56)(e).nodes);else if(Array.isArray(e)){var s=e=e.slice(0),u=Array.isArray(s),a=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(a>=s.length)break;c=s[a++]}else{if((a=s.next()).done)break;c=a.value}var l=c;l.parent&&l.parent.removeChild(l,"ignore")}}else if("root"===e.type){var f=e=e.nodes.slice(0),p=Array.isArray(f),h=0;for(f=p?f:f[Symbol.iterator]();;){var d;if(p){if(h>=f.length)break;d=f[h++]}else{if((h=f.next()).done)break;d=h.value}var D=d;D.parent&&D.parent.removeChild(D,"ignore")}}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new n.default(e)]}else if(e.selector){e=[new(r(57))(e)]}else if(e.name){e=[new(r(55))(e)]}else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o.default(e)]}return e.map((function(e){return e.parent&&e.parent.removeChild(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/[^\s]/g,"")),e.parent=i,e}))},s=Container,(u=[{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}])&&_defineProperties(s.prototype,u),a&&_defineProperties(s,a),Container}(_interopRequireDefault(r(12)).default);t.default=i,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n,o=function(){function defineProperties(e,t){for(var r=0;r=e&&(this.indexes[r]=t-1);return this},Container.prototype.removeAll=function(){var e=this.nodes,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},Container.prototype.empty=function(){return this.removeAll()},Container.prototype.insertAfter=function(e,t){var r=this.index(e);this.nodes.splice(r+1,0,t);var n=void 0;for(var o in this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+this.nodes.length);return this},Container.prototype.insertBefore=function(e,t){var r=this.index(e);this.nodes.splice(r,0,t);var n=void 0;for(var o in this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+this.nodes.length);return this},Container.prototype.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var r=void 0,n=void 0;this.indexes[t]=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function filter(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!r;n--){var o=n>=0?arguments[n]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,r="/"===o.charAt(0))}return(r?"/":"")+(t=normalizeArray(filter(t.split("/"),(function(e){return!!e})),!r).join("/"))||"."},t.normalize=function(e){var n=t.isAbsolute(e),o="/"===r(e,-1);return(e=normalizeArray(filter(e.split("/"),(function(e){return!!e})),!n).join("/"))||n||(e="."),e&&o&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(filter(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function trim(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var n=trim(e.split("/")),o=trim(r.split("/")),i=Math.min(n.length,o.length),s=i,u=0;u=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){r=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===n&&(o=!1,n=s+1),46===u?-1===t?t=s:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?"":e.slice(t,n)};var r="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(29))},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(47)),o=_interopRequireDefault(r(8)),i=_interopRequireDefault(r(53));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function Node(e){for(var t in void 0===e&&(e={}),this.raws={},e)this[t]=e[t]}var e=Node.prototype;return e.error=function(e,t){if(void 0===t&&(t={}),this.source){var r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n.default(e)},e.warn=function(e,t,r){var n={node:this};for(var o in r)n[o]=r[o];return e.warn(t,n)},e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.toString=function(e){void 0===e&&(e=i.default),e.stringify&&(e=e.stringify);var t="";return e(this,(function(e){t+=e})),t},e.clone=function(e){void 0===e&&(e={});var t=function cloneNode(e,t){var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n],i=typeof o;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:o instanceof Array?r[n]=o.map((function(e){return cloneNode(e,r)})):("object"===i&&null!==o&&(o=cloneNode(o)),r[n]=o)}return r}(this);for(var r in e)t[r]=e[r];return t},e.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},e.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},e.replaceWith=function(){if(this.parent){for(var e=arguments.length,t=new Array(e),r=0;r0&&this.unclosedBracket(o),t&&n){for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s)}else this.unknownWord(s)},e.rule=function(e){e.pop();var t=new a.default;this.init(t,e[0][2],e[0][3]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},e.decl=function(e){var t=new n.default;this.init(t);var r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),o[4]?t.source.end={line:o[4],column:o[5]}:t.source.end={line:o[2],column:o[3]};"word"!==e[0][0];)1===e.length&&this.unknownWord(e),t.raws.before+=e.shift()[1];for(t.source.start={line:e[0][2],column:e[0][3]},t.prop="";e.length;){var i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;t.prop+=e.shift()[1]}for(t.raws.between="";e.length;){if(":"===(r=e.shift())[0]){t.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),t.raws.between+=r[1]}"_"!==t.prop[0]&&"*"!==t.prop[0]||(t.raws.before+=t.prop[0],t.prop=t.prop.slice(1)),t.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(var s=e.length-1;s>0;s--){if("!important"===(r=e[s])[1].toLowerCase()){t.important=!0;var u=this.stringFrom(e,s);" !important"!==(u=this.spacesFromEnd(e)+u)&&(t.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var a=e.slice(0),c="",l=s;l>0;l--){var f=a[l][0];if(0===c.trim().indexOf("!")&&"space"!==f)break;c=a.pop()[1]+c}0===c.trim().indexOf("!")&&(t.important=!0,t.raws.important=c,e=a)}if("space"!==r[0]&&"comment"!==r[0])break}this.raw(t,"value",e),-1!==t.value.indexOf(":")&&this.checkMissedSemicolon(e)},e.atrule=function(e){var t,r,n=new s.default;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2],e[3]);for(var o=!1,i=!1,u=[];!this.tokenizer.endOfFile();){if(";"===(e=this.tokenizer.nextToken())[0]){n.source.end={line:e[2],column:e[3]},this.semicolon=!0;break}if("{"===e[0]){i=!0;break}if("}"===e[0]){if(u.length>0){for(t=u[r=u.length-1];t&&"space"===t[0];)t=u[--r];t&&(n.source.end={line:t[4],column:t[5]})}this.end(e);break}if(u.push(e),this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),o&&(e=u[u.length-1],n.source.end={line:e[4],column:e[5]},this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),i&&(n.nodes=[],this.current=n)},e.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end={line:e[2],column:e[3]},this.current=this.current.parent):this.unexpectedClose(e)},e.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces},e.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},e.init=function(e,t,r){this.current.push(e),e.source={start:{line:t,column:r},input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},e.raw=function(e,t,r){for(var n,o,i,s,u=r.length,a="",c=!0,l=/^([.|#])?([\w])+/i,f=0;f=0&&("space"===(r=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon",r[2],r[3])}},Parser}();t.default=c,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){void 0===t&&(t={});var r,x,A,F,S,B,O,T,M,P,R,N,I,j,L=e.css.valueOf(),U=t.ignoreErrors,q=L.length,W=-1,z=1,G=0,$=[],V=[];function unclosed(t){throw e.error("Unclosed "+t,z,G-W)}return{back:function(e){V.push(e)},nextToken:function(e){if(V.length)return V.pop();if(!(G>=q)){var t=!!e&&e.ignoreUnclosed;switch(((r=L.charCodeAt(G))===u||r===c||r===f&&L.charCodeAt(G+1)!==u)&&(W=G,z+=1),r){case u:case a:case l:case f:case c:x=G;do{x+=1,(r=L.charCodeAt(x))===u&&(W=x,z+=1)}while(r===a||r===u||r===l||r===f||r===c);j=["space",L.slice(G,x)],G=x-1;break;case p:case h:case g:case m:case w:case y:case D:var Y=String.fromCharCode(r);j=[Y,Y,z,G-W];break;case d:if(N=$.length?$.pop()[1]:"",I=L.charCodeAt(G+1),"url"===N&&I!==n&&I!==o&&I!==a&&I!==u&&I!==l&&I!==c&&I!==f){x=G;do{if(P=!1,-1===(x=L.indexOf(")",x+1))){if(U||t){x=G;break}unclosed("bracket")}for(R=x;L.charCodeAt(R-1)===i;)R-=1,P=!P}while(P);j=["brackets",L.slice(G,x+1),z,G-W,z,x-W],G=x}else x=L.indexOf(")",G+1),B=L.slice(G,x+1),-1===x||E.test(B)?j=["(","(",z,G-W]:(j=["brackets",B,z,G-W,z,x-W],G=x);break;case n:case o:A=r===n?"'":'"',x=G;do{if(P=!1,-1===(x=L.indexOf(A,x+1))){if(U||t){x=G+1;break}unclosed("string")}for(R=x;L.charCodeAt(R-1)===i;)R-=1,P=!P}while(P);B=L.slice(G,x+1),F=B.split("\n"),(S=F.length-1)>0?(T=z+S,M=x-F[S].length):(T=z,M=W),j=["string",L.slice(G,x+1),z,G-W,T,x-M],W=M,z=T,G=x;break;case C:b.lastIndex=G+1,b.test(L),x=0===b.lastIndex?L.length-1:b.lastIndex-2,j=["at-word",L.slice(G,x+1),z,G-W,z,x-W],G=x;break;case i:for(x=G,O=!0;L.charCodeAt(x+1)===i;)x+=1,O=!O;if(r=L.charCodeAt(x+1),O&&r!==s&&r!==a&&r!==u&&r!==l&&r!==f&&r!==c&&(x+=1,k.test(L.charAt(x)))){for(;k.test(L.charAt(x+1));)x+=1;L.charCodeAt(x+1)===a&&(x+=1)}j=["word",L.slice(G,x+1),z,G-W,z,x-W],G=x;break;default:r===s&&L.charCodeAt(G+1)===v?(0===(x=L.indexOf("*/",G+2)+1)&&(U||t?x=L.length:unclosed("comment")),B=L.slice(G,x+1),F=B.split("\n"),(S=F.length-1)>0?(T=z+S,M=x-F[S].length):(T=z,M=W),j=["comment",B,z,G-W,T,x-M],W=M,z=T,G=x):(_.lastIndex=G+1,_.test(L),x=0===_.lastIndex?L.length-1:_.lastIndex-2,j=["word",L.slice(G,x+1),z,G-W,z,x-W],$.push(j),G=x)}return G++,j}},endOfFile:function(){return 0===V.length&&G>=q},position:function(){return G}}};var n="'".charCodeAt(0),o='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),u="\n".charCodeAt(0),a=" ".charCodeAt(0),c="\f".charCodeAt(0),l="\t".charCodeAt(0),f="\r".charCodeAt(0),p="[".charCodeAt(0),h="]".charCodeAt(0),d="(".charCodeAt(0),D=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),v="*".charCodeAt(0),w=":".charCodeAt(0),C="@".charCodeAt(0),b=/[ \n\t\r\f{}()'"\\;/[\]#]/g,_=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,E=/.[\\/("'\n]/,k=/[a-f0-9]/i;e.exports=t.default},function(e,t,r){"use strict";const n=r(16),o={"---":"yaml","+++":"toml"};e.exports=function(e){const t=Object.keys(o).map(n).join("|"),r=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===r)return{frontMatter:null,content:e};const[i,s,u]=r;return{frontMatter:{type:o[s],value:u,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}}},function(e,t,r){"use strict";const n=/[|\\{}()[\]^$+*?.-]/g;e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},function(e,t,r){"use strict";const n=r(1);e.exports=class extends n{constructor(e){super(e),this.type="value",this.unbalanced=0}}},function(e,t,r){"use strict";const n=r(1);class AtWord extends n{constructor(e){super(e),this.type="atword"}toString(){this.quoted&&this.raws.quote;return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}}n.registerWalker(AtWord),e.exports=AtWord},function(e,t,r){"use strict";const n=r(1),o=r(2);class Colon extends o{constructor(e){super(e),this.type="colon"}}n.registerWalker(Colon),e.exports=Colon},function(e,t,r){"use strict";const n=r(1),o=r(2);class Comma extends o{constructor(e){super(e),this.type="comma"}}n.registerWalker(Comma),e.exports=Comma},function(e,t,r){"use strict";const n=r(1),o=r(2);class Comment extends o{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}}n.registerWalker(Comment),e.exports=Comment},function(e,t,r){"use strict";const n=r(1);class FunctionNode extends n{constructor(e){super(e),this.type="func",this.unbalanced=-1}}n.registerWalker(FunctionNode),e.exports=FunctionNode},function(e,t,r){"use strict";const n=r(1),o=r(2);class NumberNode extends o{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}}n.registerWalker(NumberNode),e.exports=NumberNode},function(e,t,r){"use strict";const n=r(1),o=r(2);class Operator extends o{constructor(e){super(e),this.type="operator"}}n.registerWalker(Operator),e.exports=Operator},function(e,t,r){"use strict";const n=r(1),o=r(2);class Parenthesis extends o{constructor(e){super(e),this.type="paren",this.parenType=""}}n.registerWalker(Parenthesis),e.exports=Parenthesis},function(e,t,r){"use strict";const n=r(1),o=r(2);class StringNode extends o{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}}n.registerWalker(StringNode),e.exports=StringNode},function(e,t,r){"use strict";const n=r(1),o=r(2);class Word extends o{constructor(e){super(e),this.type="word"}}n.registerWalker(Word),e.exports=Word},function(e,t,r){"use strict";const n=r(1),o=r(2);class UnicodeRange extends o{constructor(e){super(e),this.type="unicode-range"}}n.registerWalker(UnicodeRange),e.exports=UnicodeRange},function(e,t){var r,n,o=e.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(r===setTimeout)return setTimeout(e,0);if((r===defaultSetTimout||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){r=defaultSetTimout}try{n="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){n=defaultClearTimeout}}();var i,s=[],u=!1,a=-1;function cleanUpNextTick(){u&&i&&(u=!1,i.length?s=i.concat(s):a=-1,s.length&&drainQueue())}function drainQueue(){if(!u){var e=runTimeout(cleanUpNextTick);u=!0;for(var t=s.length;t;){for(i=s,s=[];++a1)for(var r=1;r0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((function(e){e.parent=t}))}Container.prototype=Object.create(i.default.prototype),Container.constructor=i.default,Container.prototype.walk=function(e,t){for(var r="string"==typeof e||e instanceof RegExp,n=r?t:e,o="string"==typeof e?new RegExp(e):e,i=0;i",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},s.showSourceCode=function(e){var t=this;if(!this.source)return"";var r=this.source;i.default&&(void 0===e&&(e=n.default.stdout),e&&(r=(0,i.default)(r)));var s=r.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,s.length),c=String(a).length;function mark(t){return e&&o.default.red?o.default.red.bold(t):t}function aside(t){return e&&o.default.gray?o.default.gray(t):t}return s.slice(u,a).map((function(e,r){var n=u+1+r,o=" "+(" "+n).slice(-c)+" | ";if(n===t.line){var i=aside(o.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return mark(">")+aside(o)+e+"\n "+i+mark("^")}return" "+aside(o)+e})).join("\n")},s.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},CssSyntaxError}(_wrapNativeSuper(Error));t.default=s,e.exports=t.default},function(e,t,r){"use strict";(function(e){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+var n=r(98),o=r(99),i=r(100);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,o);if("number"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,o){var i,s=1,u=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,u/=2,a/=2,r/=2}function read(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var c=-1;for(i=r;iu&&(r=u-a),i=r;i>=0;i--){for(var l=!0,f=0;fo&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(a=(31&c)<<6|63&i)>127&&(l=a);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(a=(15&c)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:i=e[o+1],s=e[o+2],u=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&u)&&(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(l=a)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},Buffer.prototype.compare=function(e,t,r,n,o){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(i,s),a=this.slice(n,o),c=e.slice(t,r),l=0;lo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;on)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,o,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function objectWriteUInt32(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function checkIEEE754(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,i){return i||checkIEEE754(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,i){return i||checkIEEE754(e,0,r,8),o.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},Buffer.prototype.readUInt8=function(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return t||checkOffset(e,4,this.length),o.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return t||checkOffset(e,4,this.length),o.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return t||checkOffset(e,8,this.length),o.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return t||checkOffset(e,8,this.length),o.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);checkInt(this,e,t,r,o-1,-o)}var i=0,s=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);checkInt(this,e,t,r,o-1,-o)}var i=r-1,s=1,u=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/s>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function base64ToBytes(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(s,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(97))},function(e,t,r){t.SourceMapGenerator=r(50).SourceMapGenerator,t.SourceMapConsumer=r(103).SourceMapConsumer,t.SourceNode=r(106).SourceNode},function(e,t,r){var n=r(51),o=r(5),i=r(52).ArraySet,s=r(102).MappingList;function SourceMapGenerator(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}SourceMapGenerator.prototype._version=3,SourceMapGenerator.fromSourceMap=function(e){var t=e.sourceRoot,r=new SourceMapGenerator({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=o.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var i=n;null!==t&&(i=o.relative(t,n)),r._sources.has(i)||r._sources.add(i);var s=e.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)})),r},SourceMapGenerator.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),r=o.getArg(e,"original",null),n=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},SourceMapGenerator.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},SourceMapGenerator.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var s=this._sourceRoot;null!=s&&(n=o.relative(s,n));var u=new i,a=new i;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=r&&(t.source=o.join(r,t.source)),null!=s&&(t.source=o.relative(s,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||u.has(c)||u.add(c);var l=t.name;null==l||a.has(l)||a.add(l)}),this),this._sources=u,this._names=a,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=o.join(r,t)),null!=s&&(t=o.relative(s,t)),this.setSourceContent(t,n))}),this)},SourceMapGenerator.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},SourceMapGenerator.prototype._serializeMappings=function(){for(var e,t,r,i,s=0,u=1,a=0,c=0,l=0,f=0,p="",h=this._mappings.toArray(),d=0,D=h.length;d0){if(!o.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=","}e+=n.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=n.encode(i-f),f=i,e+=n.encode(t.originalLine-1-c),c=t.originalLine-1,e+=n.encode(t.originalColumn-a),a=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=n.encode(r-l),l=r)),p+=e}return p},SourceMapGenerator.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var r=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},SourceMapGenerator.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},SourceMapGenerator.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=SourceMapGenerator},function(e,t,r){var n=r(101);t.encode=function(e){var t,r="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),r+=n.encode(t)}while(o>0);return r},t.decode=function(e,t,r){var o,i,s,u,a=e.length,c=0,l=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<>1,1==(1&s)?-u:u),r.rest=t}},function(e,t,r){var n=r(5),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function ArraySet(){this._array=[],this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function(e,t){for(var r=new ArraySet,n=0,o=e.length;n=0)return t}else{var r=n.toSetString(e);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},ArraySet.prototype.at=function(e){if(e>=0&&e=this.processor.plugins.length)return this.processed=!0,e();try{var n=this.processor.plugins[this.plugin],o=this.run(n);this.plugin+=1,isPromise(o)?o.then((function(){r.asyncTick(e,t)})).catch((function(e){r.handleError(e,n),r.processed=!0,t(e)})):this.asyncTick(e,t)}catch(e){this.processed=!0,t(e)}},u.async=function(){var e=this;return this.processed?new Promise((function(t,r){e.error?r(e.error):t(e.stringify())})):this.processing?this.processing:(this.processing=new Promise((function(t,r){if(e.error)return r(e.error);e.plugin=0,e.asyncTick(t,r)})).then((function(){return e.processed=!0,e.stringify()})),this.processing)},u.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error("Use process(css).then(cb) to work with async plugins");if(this.error)throw this.error;var e=this.result.processor.plugins,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var o=n;if(isPromise(this.run(o)))throw new Error("Use process(css).then(cb) to work with async plugins")}return this.result},u.run=function(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){throw this.handleError(t,e),t}},u.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=o.default;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new n.default(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},e=LazyResult,(t=[{key:"processor",get:function(){return this.result.processor}},{key:"opts",get:function(){return this.result.opts}},{key:"css",get:function(){return this.stringify().css}},{key:"content",get:function(){return this.stringify().content}},{key:"map",get:function(){return this.stringify().map}},{key:"root",get:function(){return this.sync().root}},{key:"messages",get:function(){return this.sync().messages}}])&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),LazyResult}();t.default=u,e.exports=t.default},function(e,t,r){"use strict";const n=r(60),o=r(15),{hasPragma:i}=r(61),{isLessParser:s,isSCSS:u,isSCSSNestedPropertyNode:a}=r(66),{calculateLoc:c,replaceQuotesInInlineComments:l}=r(67);function parseValueNodes(e){let t={open:null,close:null,groups:[],type:"paren_group"};const r=[t],n=t;let o={groups:[],type:"comma_group"};const i=[o];for(let n=0;n2&&"word"===s.group.groups[0].groups[0].type&&"data"===s.group.groups[0].groups[0].value&&"colon"===s.group.groups[0].groups[1].type&&":"===s.group.groups[0].groups[1].value&&(s.group.groups=[stringifyGroup(s)]),"paren"===s.type&&"("===s.value)t={open:s,close:null,groups:[],type:"paren_group"},r.push(t),o={groups:[],type:"comma_group"},i.push(o);else if("paren"===s.type&&")"===s.value){if(o.groups.length&&t.groups.push(o),t.close=s,1===i.length)throw new Error("Unbalanced parenthesis");i.pop(),o=i[i.length-1],o.groups.push(t),r.pop(),t=r[r.length-1]}else"comma"===s.type?(t.groups.push(o),o={groups:[],type:"comma_group"},i[i.length-1]=o):o.groups.push(s)}return o.groups.length>0&&t.groups.push(o),n}function stringifyGroup(e){if(e.group)return stringifyGroup(e.group);if(e.groups)return e.groups.reduce((t,r,n)=>t+stringifyGroup(r)+("comma_group"===r.type&&n!==e.groups.length-1?",":""),"");return(e.raws&&e.raws.before?e.raws.before:"")+(e.value?e.value:"")+(e.unit?e.unit:"")+(e.raws&&e.raws.after?e.raws.after:"")}function flattenGroups(e){return"paren_group"!==e.type||e.open||e.close||1!==e.groups.length?"comma_group"===e.type&&1===e.groups.length?flattenGroups(e.groups[0]):"paren_group"===e.type||"comma_group"===e.type?Object.assign({},e,{groups:e.groups.map(flattenGroups)}):e:flattenGroups(e.groups[0])}function addTypePrefix(e,t){if(e&&"object"==typeof e){delete e.parent;for(const r in e)addTypePrefix(e[r],t),"type"===r&&"string"==typeof e[r]&&(e[r].startsWith(t)||(e[r]=t+e[r]))}return e}function parseValue(e){const t=r(76);let n=null;try{n=t(e,{loose:!0}).parse()}catch(t){return{type:"value-unknown",value:e}}return addTypePrefix(function parseNestedValue(e){if(e&&"object"==typeof e){delete e.parent;for(const t in e)parseNestedValue(e[t]),"nodes"===t&&(e.group=flattenGroups(parseValueNodes(e[t])),delete e[t])}return e}(n),"value-")}function parseSelector(e){if(/\/\/|\/\*/.test(e))return{type:"selector-unknown",value:e.trim()};const t=r(85);let n=null;try{t(e=>{n=e}).process(e)}catch(t){return{type:"selector-unknown",value:e}}return addTypePrefix(n,"selector-")}function parseMediaQuery(e){const t=r(90).default;let n=null;try{n=t(e)}catch(t){return{type:"selector-unknown",value:e}}return addTypePrefix(function addMissingType(e){if(e&&"object"==typeof e){delete e.parent;for(const t in e)addMissingType(e[t]);Array.isArray(e)||!e.value||e.type||(e.type="unknown")}return e}(n),"media-")}const f=/(\s*?)(!default).*$/,p=/(\s*?)(!global).*$/;function parseWithParser(e,t,r){const i=o(t),{frontMatter:u}=i;let l;t=i.content;try{l=e(t)}catch(e){if("number"!=typeof e.line)throw e;throw n("(postcss) "+e.name+" "+e.reason,{start:e})}return l=function parseNestedCSS(e,t){if(e&&"object"==typeof e){delete e.parent;for(const r in e)parseNestedCSS(e[r],t);if(!e.type)return e;e.raws||(e.raws={});let r="";"string"==typeof e.selector&&(r=e.raws.selector?e.raws.selector.scss?e.raws.selector.scss:e.raws.selector.raw:e.selector,e.raws.between&&e.raws.between.trim().length>0&&(r+=e.raws.between),e.raws.selector=r);let n="";"string"==typeof e.value&&(n=e.raws.value?e.raws.value.scss?e.raws.value.scss:e.raws.value.raw:e.value,n=n.trim(),e.raws.value=n);let o="";if("string"==typeof e.params&&(o=e.raws.params?e.raws.params.scss?e.raws.params.scss:e.raws.params.raw:e.params,e.raws.afterName&&e.raws.afterName.trim().length>0&&(o=e.raws.afterName+o),e.raws.between&&e.raws.between.trim().length>0&&(o+=e.raws.between),o=o.trim(),e.raws.params=o),r.trim().length>0)return r.startsWith("@")&&r.endsWith(":")?e:e.mixin?(e.selector=parseValue(r),e):(a(e)&&(e.isSCSSNesterProperty=!0),e.selector=parseSelector(r),e);if(n.length>0){const t=n.match(f);t&&(n=n.slice(0,t.index),e.scssDefault=!0,"!default"!==t[0].trim()&&(e.raws.scssDefault=t[0]));const r=n.match(p);if(r&&(n=n.slice(0,r.index),e.scssGlobal=!0,"!global"!==r[0].trim()&&(e.raws.scssGlobal=r[0])),n.startsWith("progid:"))return{type:"value-unknown",value:n};e.value=parseValue(n)}if(s(t)&&"css-decl"===e.type&&!e.extend&&n.startsWith("extend(")&&(e.extend=":"===e.raws.between),"css-atrule"===e.type){if(s(t)){if(e.mixin){const t=e.raws.identifier+e.name+e.raws.afterName+e.raws.params;return e.selector=parseSelector(t),delete e.params,e}if(e.function)return e}if("css"===t.parser&&"custom-selector"===e.name){const t=e.params.match(/:--\S+?\s+/)[0].trim();return e.customSelector=t,e.selector=parseSelector(e.params.slice(t.length).trim()),delete e.params,e}if(s(t)){if(e.name.includes(":")&&!e.params){e.variable=!0;const t=e.name.split(":");e.name=t[0],e.value=parseValue(t.slice(1).join(":"))}if(!["page","nest"].includes(e.name)&&e.params&&":"===e.params[0]&&(e.variable=!0,e.value=parseValue(e.params.slice(1))),e.variable)return delete e.params,e}}if("css-atrule"===e.type&&o.length>0){const{name:t}=e,r=e.name.toLowerCase();return"warn"===t||"error"===t?(e.params={type:"media-unknown",value:o},e):"extend"===t||"nest"===t?(e.selector=parseSelector(o),delete e.params,e):"at-root"===t?(/^\(\s*(without|with)\s*:[\s\S]+\)$/.test(o)?e.params=parseValue(o):(e.selector=parseSelector(o),delete e.params),e):"import"===r?(e.import=!0,delete e.filename,e.params=parseValue(o),e):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(t)?(o=o.replace(/(\$\S+?)\s+?\.\.\./,"$1..."),o=o.replace(/^(?!if)(\S+)\s+\(/,"$1("),e.value=parseValue(o),delete e.params,e):["media","custom-media"].includes(r)?o.includes("#{")?{type:"media-unknown",value:o}:(e.params=parseMediaQuery(o),e):(e.params=o,e)}}return e}(addTypePrefix(l,"css-"),r),c(l,t),u&&l.nodes.unshift(u),l}function parseLess(e,t,n){const o=r(92);return parseWithParser(e=>o.parse(l(e)),e,n)}function parseScss(e,t,n){const{parse:o}=r(122);return parseWithParser(o,e,n)}const h={astFormat:"postcss",hasPragma:i,locStart:e=>e.source?e.source.startOffset:null,locEnd:e=>e.source?e.source.endOffset:null};e.exports={parsers:{css:Object.assign({},h,{parse:function(e,t,r){const n=u(r.parser,e)?[parseScss,parseLess]:[parseLess,parseScss];let o;for(const i of n)try{return i(e,t,r)}catch(e){o=o||e}if(o)throw o}}),less:Object.assign({},h,{parse:parseLess}),scss:Object.assign({},h,{parse:parseScss})}}},function(e,t,r){"use strict";e.exports=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r}},function(e,t,r){"use strict";const n=r(62),o=r(15);e.exports={hasPragma:function(e){return n.hasPragma(o(e).content)},insertPragma:function(e){const{frontMatter:t,content:r}=o(e);return(t?t.raw+"\n\n":"")+n.insertPragma(r)}}},function(e,t,r){"use strict";const n=r(63);e.exports={hasPragma:function(e){const t=Object.keys(n.parse(n.extract(e)));return t.includes("prettier")||t.includes("format")},insertPragma:function(e){const t=n.parseWithComments(n.extract(e)),r=Object.assign({format:""},t.pragmas),o=n.print({pragmas:r,comments:t.comments.replace(/^(\s+?\r?\n)+/,"")}).replace(/(\r\n|\r)/g,"\n"),i=n.strip(e);return o+(i.startsWith("\n")?"\n":"\n\n")+i}}},function(e,t,r){"use strict";function _os(){const e=r(64);return _os=function(){return e},e}function _detectNewline(){const e=(t=r(65))&&t.__esModule?t:{default:t};var t;return _detectNewline=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){const t=e.match(i);return t?t[0].trimLeft():""},t.strip=function(e){const t=e.match(i);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return parseWithComments(e).pragmas},t.parseWithComments=parseWithComments,t.print=function({comments:e="",pragmas:t={}}){const r=(0,_detectNewline().default)(e)||_os().EOL,n=Object.keys(t),o=n.map(e=>printKeyValues(e,t[e])).reduce((e,t)=>e.concat(t),[]).map(e=>" * "+e+r).join("");if(!e){if(0===n.length)return"";if(1===n.length&&!Array.isArray(t[n[0]])){const e=t[n[0]];return"".concat("/**"," ").concat(printKeyValues(n[0],e)[0]).concat(" */")}}const i=e.split(r).map(e=>"".concat(" *"," ").concat(e)).join(r)+r;return"/**"+r+(e?i:"")+(e&&n.length?" *"+r:"")+o+" */"};const n=/\*\/$/,o=/^\/\*\*/,i=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,u=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,c=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,l=/(\r?\n|^) *\* ?/g;function parseWithComments(e){const t=(0,_detectNewline().default)(e)||_os().EOL;e=e.replace(o,"").replace(n,"").replace(l,"$1");let r="";for(;r!==e;)r=e,e=e.replace(a,"".concat(t,"$1 $2").concat(t));e=e.replace(u,"").trimRight();const i=Object.create(null),f=e.replace(c,"").replace(u,"").trimRight();let p;for(;p=c.exec(e);){const e=p[2].replace(s,"");"string"==typeof i[p[1]]||Array.isArray(i[p[1]])?i[p[1]]=[].concat(i[p[1]],e):i[p[1]]=e}return{comments:f,pragmas:i}}function printKeyValues(e,t){return[].concat(t).map(t=>"@".concat(e," ").concat(t).trim())}},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,r){"use strict";const detectNewline=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");const t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"};e.exports=detectNewline,e.exports.graceful=e=>"string"==typeof e&&detectNewline(e)||"\n"},function(e,t,r){"use strict";const n=["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 getAncestorCounter(e,t){const r=[].concat(t);let n,o=-1;for(;n=e.getParentNode(++o);)if(r.includes(n.type))return o;return-1}function getAncestorNode(e,t){const r=getAncestorCounter(e,t);return-1===r?null:e.getParentNode(r)}function isMultiplicationNode(e){return"value-operator"===e.type&&"*"===e.value}function isDivisionNode(e){return"value-operator"===e.type&&"/"===e.value}function isAdditionNode(e){return"value-operator"===e.type&&"+"===e.value}function isSubtractionNode(e){return"value-operator"===e.type&&"-"===e.value}function isModuloNode(e){return"value-operator"===e.type&&"%"===e.value}function isKeyValuePairNode(e){return"value-comma_group"===e.type&&e.groups&&e.groups[1]&&"value-colon"===e.groups[1].type}function isKeyValuePairInParenGroupNode(e){return"value-paren_group"===e.type&&e.groups&&e.groups[0]&&isKeyValuePairNode(e.groups[0])}e.exports={getAncestorCounter:getAncestorCounter,getAncestorNode:getAncestorNode,getPropOfDeclNode:function(e){const t=getAncestorNode(e,"css-decl");return t&&t.prop&&t.prop.toLowerCase()},maybeToLowerCase:function(e){return e.includes("$")||e.includes("@")||e.includes("#")||e.startsWith("%")||e.startsWith("--")||e.startsWith(":--")||e.includes("(")&&e.includes(")")?e:e.toLowerCase()},insideValueFunctionNode:function(e,t){const r=getAncestorNode(e,"value-func");return r&&r.value&&r.value.toLowerCase()===t},insideICSSRuleNode:function(e){const t=getAncestorNode(e,"css-rule");return t&&t.raws&&t.raws.selector&&(t.raws.selector.startsWith(":import")||t.raws.selector.startsWith(":export"))},insideAtRuleNode:function(e,t){const r=[].concat(t),n=getAncestorNode(e,"css-atrule");return n&&r.includes(n.name.toLowerCase())},insideURLFunctionInImportAtRuleNode:function(e){const t=e.getValue(),r=getAncestorNode(e,"css-atrule");return r&&"import"===r.name&&"url"===t.groups[0].value&&2===t.groups.length},isKeyframeAtRuleKeywords:function(e,t){const r=getAncestorNode(e,"css-atrule");return r&&r.name&&r.name.toLowerCase().endsWith("keyframes")&&["from","to"].includes(t.toLowerCase())},isWideKeywords:function(e){return["initial","inherit","unset","revert"].includes(e.toLowerCase())},isSCSS:function(e,t){return"less"===e||"scss"===e?"scss"===e:/(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/.test(t)},isLastNode:function(e,t){const r=e.getParentNode();if(!r)return!1;const{nodes:n}=r;return n&&n.indexOf(t)===n.length-1},isLessParser:function(e){return"css"===e.parser||"less"===e.parser},isSCSSControlDirectiveNode:function(e){return"css-atrule"===e.type&&["if","else","for","each","while"].includes(e.name)},isDetachedRulesetDeclarationNode:function(e){return!!e.selector&&("string"==typeof e.selector&&/^@.+:.*$/.test(e.selector)||e.selector.value&&/^@.+:.*$/.test(e.selector.value))},isRelationalOperatorNode:function(e){return"value-word"===e.type&&["<",">","<=",">="].includes(e.value)},isEqualityOperatorNode:function(e){return"value-word"===e.type&&["==","!="].includes(e.value)},isMultiplicationNode:isMultiplicationNode,isDivisionNode:isDivisionNode,isAdditionNode:isAdditionNode,isSubtractionNode:isSubtractionNode,isModuloNode:isModuloNode,isMathOperatorNode:function(e){return isMultiplicationNode(e)||isDivisionNode(e)||isAdditionNode(e)||isSubtractionNode(e)||isModuloNode(e)},isEachKeywordNode:function(e){return"value-word"===e.type&&"in"===e.value},isForKeywordNode:function(e){return"value-word"===e.type&&["from","through","end"].includes(e.value)},isURLFunctionNode:function(e){return"value-func"===e.type&&"url"===e.value.toLowerCase()},isIfElseKeywordNode:function(e){return"value-word"===e.type&&["and","or","not"].includes(e.value)},hasComposesNode:function(e){return e.value&&"value-root"===e.value.type&&e.value.group&&"value-value"===e.value.group.type&&"composes"===e.prop.toLowerCase()},hasParensAroundNode:function(e){return e.value&&e.value.group&&e.value.group.group&&"value-paren_group"===e.value.group.group.type&&null!==e.value.group.group.open&&null!==e.value.group.group.close},hasEmptyRawBefore:function(e){return e.raws&&""===e.raws.before},isSCSSNestedPropertyNode:function(e){return!!e.selector&&e.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*?\n/,"").trim().endsWith(":")},isDetachedRulesetCallNode:function(e){return e.raws&&e.raws.params&&/^\(\s*\)$/.test(e.raws.params)},isTemplatePlaceholderNode:function(e){return e.name.startsWith("prettier-placeholder")},isTemplatePropNode:function(e){return e.prop.startsWith("@prettier-placeholder")},isPostcssSimpleVarNode:function(e,t){return"$$"===e.value&&"value-func"===e.type&&t&&"value-word"===t.type&&!t.raws.before},isKeyValuePairNode:isKeyValuePairNode,isKeyValuePairInParenGroupNode:isKeyValuePairInParenGroupNode,isSCSSMapItemNode:function(e){const t=e.getValue();if(0===t.groups.length)return!1;const r=e.getParentNode(1);if(!(isKeyValuePairInParenGroupNode(t)||r&&isKeyValuePairInParenGroupNode(r)))return!1;const n=getAncestorNode(e,"css-decl");return!!(n&&n.prop&&n.prop.startsWith("$"))||(!!isKeyValuePairInParenGroupNode(r)||"value-func"===r.type)},isInlineValueCommentNode:function(e){return"value-comment"===e.type&&e.inline},isHashNode:function(e){return"value-word"===e.type&&"#"===e.value},isLeftCurlyBraceNode:function(e){return"value-word"===e.type&&"{"===e.value},isRightCurlyBraceNode:function(e){return"value-word"===e.type&&"}"===e.value},isWordNode:function(e){return["value-word","value-atword"].includes(e.type)},isColonNode:function(e){return"value-colon"===e.type},isMediaAndSupportsKeywords:function(e){return e.value&&["not","and","or"].includes(e.value.toLowerCase())},isColorAdjusterFuncNode:function(e){return"value-func"===e.type&&n.includes(e.value.toLowerCase())},lastLineHasInlineComment:function(e){return/\/\//.test(e.split(/[\r\n]/).pop())}}},function(e,t,r){"use strict";const n=r(68),{getLast:o,skipEverythingButNewLine:i}=r(69);e.exports={calculateLoc:function calculateLoc(e,t){if(e&&"object"==typeof e){e.source&&(e.source.startOffset=function(e,t){return e.source?n(e.source.start,t)-1:null}(e,t),e.source.endOffset=function(e,t){if("css-comment"===e.type&&e.inline)return i(t,e.source.startOffset);const r=e.nodes&&o(e.nodes);return r&&e.source&&!e.source.end&&(e=r),e.source&&e.source.end?n(e.source.end,t):null}(e,t));for(const r in e)calculateLoc(e[r],t)}},replaceQuotesInInlineComments:function(e){let t,r="initial",n="initial",o=!1;const i=[];for(let s=0;s{const o=n&&n.backwards;if(!1===r)return!1;const{length:i}=t;let s=r;for(;s>=0&&s"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((e,t)=>{e.forEach(e=>{f[e]=t})});const p={"==":!0,"!=":!0,"===":!0,"!==":!0},h={"*":!0,"/":!0,"%":!0},d={">>":!0,">>>":!0,"<<":!0};function getAlignmentSize(e,t,r){let n=0;for(let o=r=r||0;o(r.match(s.regex)||[]).length?s.quote:i.quote}return u}function makeString(e,t,r){const n='"'===t?"'":'"',o=e.replace(/\\([\s\S])|(['"])/g,(e,o,i)=>o===n?o:i===t?"\\"+i:i||(r&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(o)?o:"\\"+o));return t+o+t}function hasNodeIgnoreComment(e){return e&&(e.comments&&e.comments.length>0&&e.comments.some(e=>isNodeIgnoreComment(e)&&!e.unignore)||e.prettierIgnore)}function isNodeIgnoreComment(e){return"prettier-ignore"===e.value.trim()}function addCommentHelper(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}e.exports={replaceEndOfLineWith:function(e,t){const r=[];for(const n of e.split("\n"))0!==r.length&&r.push(t),r.push(n);return r},getStringWidth:function(e){return e?s.test(e)?n(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp("(".concat(o(t),")+"),"g"));return null===r?0:r.reduce((e,r)=>Math.max(e,r.length/t.length),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp("(".concat(o(t),")+"),"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;e1?e[e.length-2]:null},getLast:i,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:getNextNonSpaceNonCommentCharacterIndexWithStartIndex,getNextNonSpaceNonCommentCharacterIndex:getNextNonSpaceNonCommentCharacterIndex,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(getNextNonSpaceNonCommentCharacterIndex(e,t,r))},skip:skip,skipWhitespace:u,skipSpaces:a,skipToLineEnd:c,skipEverythingButNewLine:l,skipInlineComment:skipInlineComment,skipTrailingComment:skipTrailingComment,skipNewline:skipNewline,isNextLineEmptyAfterIndex:isNextLineEmptyAfterIndex,isNextLineEmpty:function(e,t,r){return isNextLineEmptyAfterIndex(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=a(e,n,{backwards:!0}),n=skipNewline(e,n,{backwards:!0}),n=a(e,n,{backwards:!0}),n!==skipNewline(e,n,{backwards:!0})},hasNewline:hasNewline,hasNewlineInRange:function(e,t,r){for(let n=t;n{if("string"!=typeof(e=e.replace(i()," "))||0===e.length)return 0;e=n(e);let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=o(n)?2:1))}return t};e.exports=stringWidth,e.exports.default=stringWidth},function(e,t,r){"use strict";const n=r(72);e.exports=e=>"string"==typeof e?e.replace(n(),""):e},function(e,t,r){"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},function(e,t,r){"use strict";const isFullwidthCodePoint=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||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));e.exports=isFullwidthCodePoint,e.exports.default=isFullwidthCodePoint},function(e,t,r){"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},function(e,t,r){"use strict";e.exports=e=>e[e.length-1]},function(e,t,r){"use strict";const n=r(77),o=r(18),i=r(19),s=r(20),u=r(21),a=r(22),c=r(23),l=r(24),f=r(25),p=r(26),h=r(28),d=r(17),D=r(27);let parser=function(e,t){return new n(e,t)};parser.atword=function(e){return new o(e)},parser.colon=function(e){return new i(Object.assign({value:":"},e))},parser.comma=function(e){return new s(Object.assign({value:","},e))},parser.comment=function(e){return new u(e)},parser.func=function(e){return new a(e)},parser.number=function(e){return new c(e)},parser.operator=function(e){return new l(e)},parser.paren=function(e){return new f(Object.assign({value:"("},e))},parser.string=function(e){return new p(Object.assign({quote:"'"},e))},parser.value=function(e){return new d(e)},parser.word=function(e){return new D(e)},parser.unicodeRange=function(e){return new h(e)},e.exports=parser},function(e,t,r){"use strict";const n=r(78),o=r(17),i=r(18),s=r(19),u=r(20),a=r(21),c=r(22),l=r(23),f=r(24),p=r(25),h=r(26),d=r(27),D=r(28),g=r(79),m=r(30),y=r(31),v=r(32),w=r(84);e.exports=class{constructor(e,t){this.cache=[],this.input=e,this.options=Object.assign({},{loose:!1},t),this.position=0,this.unbalanced=0,this.root=new n;let r=new o;this.root.append(r),this.current=r,this.tokens=g(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new s({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new u({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e,t=!1,r=this.currToken[1].replace(/\/\*|\*\//g,"");this.options.loose&&r.startsWith("//")&&(r=r.substring(2),t=!0),e=new a({value:r,inline:t,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(e),this.position++}error(e,t){throw new w(e+" at line: ".concat(t[2],", column ").concat(t[3]))}loop(){for(;this.position0&&("func"===this.current.type&&"calc"===this.current.value?"space"!==this.prevToken[0]&&"("!==this.prevToken[0]?this.error("Syntax Error",this.currToken):"space"!==this.nextToken[0]&&"word"!==this.nextToken[0]?this.error("Syntax Error",this.currToken):"word"===this.nextToken[0]&&"operator"!==this.current.last.type&&"("!==this.current.last.value&&this.error("Syntax Error",this.currToken):"space"!==this.nextToken[0]&&"operator"!==this.nextToken[0]&&"operator"!==this.prevToken[0]||this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&"operator"===this.current.last.type)&&"word"===this.nextToken[0])return this.word()}else if("word"===this.nextToken[0])return this.word();return e=new f({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(e)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word()}}parenOpen(){let e,t=1,r=this.position+1,n=this.currToken;for(;r=this.tokens.length-1&&!this.current.unbalanced||(this.current.unbalanced--,this.current.unbalanced<0&&this.error("Expected opening parenthesis",e),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}space(){let e=this.currToken;this.position===this.tokens.length-1||","===this.nextToken[0]||")"===this.nextToken[0]?(this.current.last.raws.after+=e[1],this.position++):(this.spaces=e[1],this.position++)}unicodeRange(){let e=this.currToken;this.newNode(new D({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}splitWord(){let e,t,r=this.nextToken,n=this.currToken[1],o=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/;if(!/^(?!\#([a-z0-9]+))[\#\{\}]/gi.test(n))for(;r&&"word"===r[0];){this.position++;let e=this.currToken[1];n+=e,r=this.nextToken}var s;e=y(n,"@"),s=v(m([[0],e])),t=s.sort((e,t)=>e-t),t.forEach((s,u)=>{let a,f=t[u+1]||n.length,p=n.slice(s,f);if(~e.indexOf(s))a=new i({value:p.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(f-1)}},sourceIndex:this.currToken[6]+t[u]});else if(o.test(this.currToken[1])){let e=p.replace(o,"");a=new l({value:p.replace(e,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(f-1)}},sourceIndex:this.currToken[6]+t[u],unit:e})}else a=new(r&&"("===r[0]?c:d)({value:p,source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(f-1)}},sourceIndex:this.currToken[6]+t[u]}),"Word"===a.constructor.name?(a.isHex=/^#(.+)/.test(p),a.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(p)):this.cache.push(this.current);this.newNode(a)}),this.position++}string(){let e,t=this.currToken,r=this.currToken[1],n=/^(\"|\')/,o=n.test(r),i="";o&&(i=r.match(n)[0],r=r.slice(1,r.length-1)),e=new h({value:r,source:{start:{line:t[2],column:t[3]},end:{line:t[4],column:t[5]}},sourceIndex:t[6],quoted:o}),e.raws.quote=i,this.newNode(e),this.position++}word(){return this.splitWord()}newNode(e){return this.spaces&&(e.raws.before+=this.spaces,this.spaces=""),this.current.append(e)}get currToken(){return this.tokens[this.position]}get nextToken(){return this.tokens[this.position+1]}get prevToken(){return this.tokens[this.position-1]}}},function(e,t,r){"use strict";const n=r(1);e.exports=class extends n{constructor(e){super(e),this.type="root"}}},function(e,t,r){"use strict";const n="{".charCodeAt(0),o="}".charCodeAt(0),i="(".charCodeAt(0),s=")".charCodeAt(0),u="'".charCodeAt(0),a='"'.charCodeAt(0),c="\\".charCodeAt(0),l="/".charCodeAt(0),f=".".charCodeAt(0),p=",".charCodeAt(0),h=":".charCodeAt(0),d="*".charCodeAt(0),D="-".charCodeAt(0),g="+".charCodeAt(0),m="#".charCodeAt(0),y="\n".charCodeAt(0),v=" ".charCodeAt(0),w="\f".charCodeAt(0),C="\t".charCodeAt(0),b="\r".charCodeAt(0),_="@".charCodeAt(0),E="e".charCodeAt(0),k="E".charCodeAt(0),x="0".charCodeAt(0),A="9".charCodeAt(0),F="u".charCodeAt(0),S="U".charCodeAt(0),B=/[ \n\t\r\{\(\)'"\\;,/]/g,O=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,T=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,M=/^[a-z0-9]/i,P=/^[a-f0-9?\-]/i,R=r(80),N=r(83);e.exports=function(e,t){t=t||{};let r,I,j,L,U,q,W,z,G,$,V,Y=[],J=e.valueOf(),Q=J.length,K=-1,H=1,Z=0,X=0,ee=null;function unclosed(e){let t=R.format("Unclosed %s at line: %d, column: %d, token: %d",e,H,Z-K,Z);throw new N(t)}for(;Z0&&"word"===Y[Y.length-1][0]&&"url"===Y[Y.length-1][1],Y.push(["(","(",H,Z-K,H,I-K,Z]);break;case s:X--,ee=ee&&X>0,Y.push([")",")",H,Z-K,H,I-K,Z]);break;case u:case a:j=r===u?"'":'"',I=Z;do{for(G=!1,I=J.indexOf(j,I+1),-1===I&&unclosed("quote"),$=I;J.charCodeAt($-1)===c;)$-=1,G=!G}while(G);Y.push(["string",J.slice(Z,I+1),H,Z-K,H,I-K,Z]),Z=I;break;case _:B.lastIndex=Z+1,B.test(J),I=0===B.lastIndex?J.length-1:B.lastIndex-2,Y.push(["atword",J.slice(Z,I+1),H,Z-K,H,I-K,Z]),Z=I;break;case c:I=Z,r=J.charCodeAt(I+1),Y.push(["word",J.slice(Z,I+1),H,Z-K,H,I-K,Z]),Z=I;break;case g:case D:case d:I=Z+1,V=J.slice(Z+1,I+1);J.slice(Z-1,Z);if(r===D&&V.charCodeAt(0)===D){I++,Y.push(["word",J.slice(Z,I),H,Z-K,H,I-K,Z]),Z=I-1;break}Y.push(["operator",J.slice(Z,I),H,Z-K,H,I-K,Z]),Z=I-1;break;default:if(r===l&&(J.charCodeAt(Z+1)===d||t.loose&&!ee&&J.charCodeAt(Z+1)===l)){if(J.charCodeAt(Z+1)===d)I=J.indexOf("*/",Z+2)+1,0===I&&unclosed("comment");else{const e=J.indexOf("\n",Z+2);I=-1!==e?e-1:Q}q=J.slice(Z,I+1),L=q.split("\n"),U=L.length-1,U>0?(W=H+U,z=I-L[U].length):(W=H,z=K),Y.push(["comment",q,H,Z-K,W,I-z,Z]),K=z,H=W,Z=I}else if(r!==m||M.test(J.slice(Z+1,Z+2)))if(r!==F&&r!==S||J.charCodeAt(Z+1)!==g)if(r===l)I=Z+1,Y.push(["operator",J.slice(Z,I),H,Z-K,H,I-K,Z]),Z=I-1;else{let e=O;if(r>=x&&r<=A&&(e=T),e.lastIndex=Z+1,e.test(J),I=0===e.lastIndex?J.length-1:e.lastIndex-2,e===T||r===f){let e=J.charCodeAt(I),t=J.charCodeAt(I+1),r=J.charCodeAt(I+2);(e===E||e===k)&&(t===D||t===g)&&r>=x&&r<=A&&(T.lastIndex=I+2,T.test(J),I=0===T.lastIndex?J.length-1:T.lastIndex-2)}Y.push(["word",J.slice(Z,I+1),H,Z-K,H,I-K,Z]),Z=I}else{I=Z+2;do{I+=1,r=J.charCodeAt(I)}while(I=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),isBoolean(r)?n.showHidden=r:r&&t._extend(n,r),isUndefined(n.showHidden)&&(n.showHidden=!1),isUndefined(n.depth)&&(n.depth=2),isUndefined(n.colors)&&(n.colors=!1),isUndefined(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=stylizeWithColor),formatValue(n,e,n.depth)}function stylizeWithColor(e,t){var r=inspect.styles[t];return r?"["+inspect.colors[r][0]+"m"+e+"["+inspect.colors[r][1]+"m":e}function stylizeNoColor(e,t){return e}function formatValue(e,r,n){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return isString(o)||(o=formatValue(e,o,n)),o}var i=function(e,t){if(isUndefined(t))return e.stylize("undefined","undefined");if(isString(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(isNumber(t))return e.stylize(""+t,"number");if(isBoolean(t))return e.stylize(""+t,"boolean");if(isNull(t))return e.stylize("null","null")}(e,r);if(i)return i;var s=Object.keys(r),u=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),isError(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return formatError(r);if(0===s.length){if(isFunction(r)){var a=r.name?": "+r.name:"";return e.stylize("[Function"+a+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c,l="",f=!1,p=["{","}"];(isArray(r)&&(f=!0,p=["[","]"]),isFunction(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return isRegExp(r)&&(l=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(l=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(l=" "+formatError(r)),0!==s.length||f&&0!=r.length?n<0?isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],s=0,u=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatProperty(e,t,r,n,o,i){var s,u,a;if((a=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=a.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):a.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,o)||(s="["+o+"]"),u||(e.seen.indexOf(a.value)<0?(u=isNull(r)?formatValue(e,a.value,null):formatValue(e,a.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),isUndefined(s)){if(i&&o.match(/^\d+$/))return u;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(isUndefined(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=isArray,t.isBoolean=isBoolean,t.isNull=isNull,t.isNullOrUndefined=function(e){return null==e},t.isNumber=isNumber,t.isString=isString,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=isUndefined,t.isRegExp=isRegExp,t.isObject=isObject,t.isDate=isDate,t.isError=isError,t.isFunction=isFunction,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(81);var u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date,t=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),u[e.getMonth()],t].join(" ")}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",timestamp(),t.format.apply(t,arguments))},t.inherits=r(82),t._extend=function(e,t){if(!t||!isObject(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var a="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function callbackifyOnRejected(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(a&&e[a]){var t;if("function"!=typeof(t=e[a]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,a,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:{},r=new s.default({css:e,error:function(e){throw new Error(e)},options:t});return this.res=r,this.func(r),this},o(Processor,[{key:"result",get:function(){return String(this.res)}}]),Processor}();t.default=u,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=function(){function defineProperties(e,t){for(var r=0;r1?(""===o[0]&&(o[0]=!0),i.attribute=this.parseValue(o[2]),i.namespace=this.parseNamespace(o[0])):i.attribute=this.parseValue(n[0]),t=new D.default(i),n[2]){var s=n[2].split(/(\s+i\s*?)$/),u=s[0].trim();t.value=this.lossy?u:s[0],s[1]&&(t.insensitive=!0,this.lossy||(t.raws.insensitive=s[1])),t.quoted="'"===u[0]||'"'===u[0],t.raws.unquoted=t.quoted?u.slice(1,-1):u}this.newNode(t),this.position++},Parser.prototype.combinator=function(){if("|"===this.currToken[1])return this.namespace();for(var e=new m.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position1&&e.nextToken&&"("===e.nextToken[0]&&e.error("Misplaced parenthesis.")}))}else this.error('Unexpected "'+this.currToken[0]+'" found.')},Parser.prototype.space=function(){var e=this.currToken;0===this.position||","===this.prevToken[0]||"("===this.prevToken[0]?(this.spaces=this.parseSpace(e[1]),this.position++):this.position===this.tokens.length-1||","===this.nextToken[0]||")"===this.nextToken[0]?(this.current.last.spaces.after=this.parseSpace(e[1]),this.position++):this.combinator()},Parser.prototype.string=function(){var e=this.currToken;this.newNode(new h.default({value:this.currToken[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++},Parser.prototype.universal=function(e){var t=this.nextToken;if(t&&"|"===t[1])return this.position++,this.namespace();this.newNode(new g.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),e),this.position++},Parser.prototype.splitWord=function(e,t){for(var r=this,n=this.nextToken,u=this.currToken[1];n&&"word"===n[0];){this.position++;var a=this.currToken[1];if(u+=a,a.lastIndexOf("\\")===a.length-1){var l=this.nextToken;l&&"space"===l[0]&&(u+=this.parseSpace(l[1]," "),this.position++)}n=this.nextToken}var h=(0,i.default)(u,"."),d=(0,i.default)(u,"#"),D=(0,i.default)(u,"#{");D.length&&(d=d.filter((function(e){return!~D.indexOf(e)})));var g=(0,v.default)((0,s.default)((0,o.default)([[0],h,d])));g.forEach((function(n,o){var i=g[o+1]||u.length,s=u.slice(n,i);if(0===o&&t)return t.call(r,s,g.length);var a=void 0;a=~h.indexOf(n)?new c.default({value:s.slice(1),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}):~d.indexOf(n)?new f.default({value:s.slice(1),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}):new p.default({value:s,source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}),r.newNode(a,e)})),this.position++},Parser.prototype.word=function(e){var t=this.nextToken;return t&&"|"===t[1]?(this.position++,this.namespace()):this.splitWord(e)},Parser.prototype.loop=function(){for(;this.position0?(p=y+c,h=s-a[c].length):(p=y,h=m),t.push(["comment",l,y,v-m,p,s-h,v]),m=h,y=p,v=s):(o.lastIndex=v+1,o.test(r),s=0===o.lastIndex?r.length-1:o.lastIndex-2,t.push(["word",r.slice(v,s+1),y,v-m,y,s-m,v]),v=s)}v++}return t};var n=/[ \n\t\r\{\(\)'"\\;/]/g,o=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new i.default({nodes:(0,s.parseMediaList)(e),type:"media-query-list",value:e.trim()})};var n,o=r(45),i=(n=o)&&n.__esModule?n:{default:n},s=r(91)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseMediaFeature=parseMediaFeature,t.parseMediaQuery=parseMediaQuery,t.parseMediaList=function(e){var t=[],r=0,i=0,s=/^(\s*)url\s*\(/.exec(e);if(null!==s){for(var u=s[0].length,a=1;a>0;){var c=e[u];"("===c&&a++,")"===c&&a--,u++}t.unshift(new n.default({type:"url",value:e.substring(0,u).trim(),sourceIndex:s[1].length,before:s[1],after:/^(\s*)/.exec(e.substring(u))[1]})),r=u}for(var l=r;l0&&(r[l-1].after=u.before),void 0===u.type){if(l>0){if("media-feature-expression"===r[l-1].type){u.type="keyword";continue}if("not"===r[l-1].value||"only"===r[l-1].value){u.type="media-type";continue}if("and"===r[l-1].value){u.type="media-feature-expression";continue}"media-type"===r[l-1].type&&(r[l+1]?u.type="media-feature-expression"===r[l+1].type?"keyword":"media-feature-expression":u.type="media-feature-expression")}if(0===l){if(!r[l+1]){u.type="media-type";continue}if(r[l+1]&&("media-feature-expression"===r[l+1].type||"keyword"===r[l+1].type)){u.type="media-type";continue}if(r[l+2]){if("media-feature-expression"===r[l+2].type){u.type="media-type",r[l+1].type="keyword";continue}if("keyword"===r[l+2].type){u.type="keyword",r[l+1].type="media-type";continue}}if(r[l+3]&&"media-feature-expression"===r[l+3].type){u.type="keyword",r[l+1].type="media-type",r[l+2].type="keyword";continue}}}return r}},function(e,t,r){const n=r(6),o=r(108),i=r(121);e.exports={parse(e,t){const r=new n(e,t),i=new o(r);return i.parse(),i.root},stringify(e,t){new i(t).stringify(e)},nodeToString(t){let r="";return e.exports.stringify(t,e=>{r+=e}),r}}},function(e,t){},function(e,t){},function(e,t){},function(e,t,r){"use strict";(function(n){t.__esModule=!0,t.default=void 0;var o=_interopRequireDefault(r(49)),i=_interopRequireDefault(r(11)),s=_interopRequireDefault(r(107));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var u=function(){function PreviousMap(e,t){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);n&&(this.text=n)}var e=PreviousMap.prototype;return e.consumer=function(){return this.consumerCache||(this.consumerCache=new o.default.SourceMapConsumer(this.text)),this.consumerCache},e.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},e.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//);t&&(this.annotation=t[1].trim())},e.decodeInline=function(e){var t,r="data:application/json,";if(this.startWith(e,r))return decodeURIComponent(e.substr(r.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),n?n.from(t,"base64").toString():window.atob(t);var o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)},e.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){var r=t(e);if(r&&s.default.existsSync&&s.default.existsSync(r))return s.default.readFileSync(r,"utf-8").toString().trim();throw new Error("Unable to load previous source map: "+r.toString())}if(t instanceof o.default.SourceMapConsumer)return o.default.SourceMapGenerator.fromSourceMap(t).toString();if(t instanceof o.default.SourceMapGenerator)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return e&&(n=i.default.join(i.default.dirname(e),n)),this.root=i.default.dirname(n),!(!s.default.existsSync||!s.default.existsSync(n))&&s.default.readFileSync(n,"utf-8").toString().trim()}},e.isMap=function(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings)},PreviousMap}();t.default=u,e.exports=t.default}).call(this,r(48).Buffer)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=getLens(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=getLens(e),s=n[0],u=n[1],a=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),c=0,l=u>0?s-4:s;for(r=0;r>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,a[c++]=255&t);1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=0,u=r-o;su?u:s+16383));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function encodeChunk(e,t,r){for(var o,i,s=[],u=t;u>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,o){var i,s,u=8*o-n-1,a=(1<>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=u;l>0;i=256*i+e[t+f],f+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,u,a,c=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,D=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),(t+=s+f>=1?p/a:p*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=l?(u=0,s=l):s+f>=1?(u=(t*a-1)*Math.pow(2,o),s+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&u,h+=d,u/=256,o-=8);for(s=s<0;e[r+h]=255&s,h+=d,s/=256,c-=8);e[r+h-d]|=128*D}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&eo||i==o&&u>=s||n.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},MappingList.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=MappingList},function(e,t,r){var n=r(5),o=r(104),i=r(52).ArraySet,s=r(51),u=r(105).quickSort;function SourceMapConsumer(e,t){var r=e;return"string"==typeof e&&(r=n.parseSourceMapInput(e)),null!=r.sections?new IndexedSourceMapConsumer(r,t):new BasicSourceMapConsumer(r,t)}function BasicSourceMapConsumer(e,t){var r=e;"string"==typeof e&&(r=n.parseSourceMapInput(e));var o=n.getArg(r,"version"),s=n.getArg(r,"sources"),u=n.getArg(r,"names",[]),a=n.getArg(r,"sourceRoot",null),c=n.getArg(r,"sourcesContent",null),l=n.getArg(r,"mappings"),f=n.getArg(r,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);a&&(a=n.normalize(a)),s=s.map(String).map(n.normalize).map((function(e){return a&&n.isAbsolute(a)&&n.isAbsolute(e)?n.relative(a,e):e})),this._names=i.fromArray(u.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map((function(e){return n.computeSourceURL(a,e,t)})),this.sourceRoot=a,this.sourcesContent=c,this._mappings=l,this._sourceMapURL=t,this.file=f}function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function IndexedSourceMapConsumer(e,t){var r=e;"string"==typeof e&&(r=n.parseSourceMapInput(e));var o=n.getArg(r,"version"),s=n.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var u={line:-1,column:0};this._sections=s.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=n.getArg(e,"offset"),o=n.getArg(r,"line"),i=n.getArg(r,"column");if(o=0){var u=this._originalMappings[s];if(void 0===e.column)for(var a=u.originalLine;u&&u.originalLine===a;)i.push({line:n.getArg(u,"generatedLine",null),column:n.getArg(u,"generatedColumn",null),lastColumn:n.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++s];else for(var c=u.originalColumn;u&&u.originalLine===t&&u.originalColumn==c;)i.push({line:n.getArg(u,"generatedLine",null),column:n.getArg(u,"generatedColumn",null),lastColumn:n.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++s]}return i},t.SourceMapConsumer=SourceMapConsumer,BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer,BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t1&&(r.source=d+i[1],d+=i[1],r.originalLine=p+i[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=D+i[4],D+=i[4])),C.push(r),"number"==typeof r.originalLine&&w.push(r)}u(C,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,u(w,n.compareByOriginalPositions),this.__originalMappings=w},BasicSourceMapConsumer.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return o.search(e,t,i,s)},BasicSourceMapConsumer.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===t.generatedLine){var i=n.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,"originalLine",null),column:n.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},BasicSourceMapConsumer.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var o,i=e;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},BasicSourceMapConsumer.prototype.generatedPositionFor=function(e){var t=n.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,"generatedLine",null),column:n.getArg(i,"generatedColumn",null),lastColumn:n.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=BasicSourceMapConsumer,IndexedSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),IndexedSourceMapConsumer.prototype.constructor=SourceMapConsumer,IndexedSourceMapConsumer.prototype._version=3,Object.defineProperty(IndexedSourceMapConsumer.prototype,"sources",{get:function(){for(var e=[],t=0;t0?r-u>1?recursiveSearch(u,r,n,o,i,s):s==t.LEAST_UPPER_BOUND?r1?recursiveSearch(e,u,n,o,i,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}(-1,r.length,e,r,n,o||t.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(r[i],r[i-1],!0);)--i;return i}},function(e,t){function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function doQuickSort(e,t,r,n){if(r=0;t--)this.prepend(e[t]);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},SourceNode.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r"("===e[0]),r=e.reverse().find(e=>")"===e[0]),n=e.reverse().indexOf(r),o=e.splice(t,n).map(e=>e[1]).join("");for(const t of e.reverse())this.tokenizer.back(t);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,t,r){super.init(e,t,r),this.lastNode=e}inlineComment(e){const t=new n,r=e[1].slice(2);if(this.init(t,e[2],e[3]),t.source.end={line:e[4],column:e[5]},t.inline=!0,t.raws.begin="//",/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{const e=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,t.raws.left,t.text,t.raws.right]=e}}mixin(e){const[t]=e,r=t[1].slice(0,1),n=e.findIndex(e=>"brackets"===e[0]),o=e.findIndex(e=>"("===e[0]);let i="";if((n<0||n>3)&&o>0){const t=e.reduce((e,t,r)=>")"===t[0]?r:e),r=e.slice(o,t+o).map(e=>e[1]).join(""),[n]=e.slice(o),i=[n[2],n[3]],[s]=e.slice(t,t+1),u=[s[2],s[3]],a=["brackets",r].concat(i,u),c=e.slice(0,o),l=e.slice(t+1);(e=c).push(a),e=e.concat(l)}const s=[];for(const t of e)if(("!"===t[1]||s.length)&&s.push(t),"important"===t[1])break;if(s.length){const[t]=s,r=e.indexOf(t),n=s[s.length-1],o=[t[2],t[3]],i=[n[4],n[5]],u=["word",s.map(e=>e[1]).join("")].concat(o,i);e.splice(r,s.length,u)}const u=e.findIndex(e=>l.test(e[1]));u>0&&([,i]=e[u],e.splice(u,1));for(const t of e.reverse())this.tokenizer.back(t);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,i&&(this.lastNode.important=!0,this.lastNode.raws.important=i)}other(e){i.bind(this)(e)||super.other(e)}rule(e){const t=e[e.length-1],r=e[e.length-2];if("at-word"===r[0]&&"{"===t[0]&&(this.tokenizer.back(t),s.bind(this)(r))){const t=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([t]);for(const t of e.reverse())this.tokenizer.back(t);return}super.rule(e);/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){const[t]=e;"each"!==e[0][1]||"("!==e[1][0]?u(t)?this.mixin(e):super.unknownWord(e):this.each(e)}}},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n={split:function(e,t,r){for(var n=[],o="",i=!1,s=0,u=!1,a=!1,c=0;c0&&(s-=1):0===s&&-1!==t.indexOf(l)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=l}return(r||""!==o)&&n.push(o.trim()),n},space:function(e){return n.split(e,[" ","\n","\t"])},comma:function(e){return n.split(e,[","],!0)}},o=n;t.default=o,e.exports=t.default},function(e,t,r){"use strict";var n;t.__esModule=!0,t.default=void 0;var o=function(e){var t,n;function Root(t){var r;return(r=e.call(this,t)||this).type="root",r.nodes||(r.nodes=[]),r}n=e,(t=Root).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=Root.prototype;return o.removeChild=function(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},o.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r){var i=o,s=Array.isArray(i),u=0;for(i=s?i:i[Symbol.iterator]();;){var a;if(s){if(u>=i.length)break;a=i[u++]}else{if((u=i.next()).done)break;a=u.value}a.raws.before=r.raws.before}}return o},o.toResult=function(e){return void 0===e&&(e={}),new(r(58))(new(r(115)),this,e).stringify()},Root}(((n=r(9))&&n.__esModule?n:{default:n}).default);t.default=o,e.exports=t.default},function(e,t,r){"use strict";(function(n){t.__esModule=!0,t.default=void 0;var o=_interopRequireDefault(r(49)),i=_interopRequireDefault(r(11));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function MapGenerator(e,t,r){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r}var e=MapGenerator.prototype;return e.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},e.previous=function(){var e=this;return this.previousMaps||(this.previousMaps=[],this.root.walk((function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;-1===e.previousMaps.indexOf(r)&&e.previousMaps.push(r)}}))),this.previousMaps},e.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((function(e){return e.inline})))},e.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((function(e){return e.withContent()}))},e.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)},e.setSourcesContent=function(){var e=this,t={};this.root.walk((function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var o=e.relative(n);e.map.setSourceContent(o,r.source.input.css)}}}))},e.applyPrevMaps=function(){var e=this.previous(),t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var s=n,u=this.relative(s.file),a=s.root||i.default.dirname(s.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new o.default.SourceMapConsumer(s.text)).sourcesContent&&(c.sourcesContent=c.sourcesContent.map((function(){return null}))):c=s.consumer(),this.map.applySourceMap(c,u,this.relative(a))}},e.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((function(e){return e.annotation})))},e.toBase64=function(e){return n?n.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},e.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+".map";var t="\n";-1!==this.css.indexOf("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},e.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):"to.css"},e.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},e.relative=function(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;var t=this.opts.to?i.default.dirname(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=i.default.dirname(i.default.resolve(t,this.mapOpts.annotation))),e=i.default.relative(t,e),"\\"===i.default.sep?e.replace(/\\/g,"/"):e},e.sourcePath=function(e){return this.mapOpts.from?this.mapOpts.from:this.relative(e.source.input.from)},e.generateString=function(){var e=this;this.css="",this.map=new o.default.SourceMapGenerator({file:this.outputFile()});var t,r,n=1,i=1;this.stringify(this.root,(function(o,s,u){if(e.css+=o,s&&"end"!==u&&(s.source&&s.source.start?e.map.addMapping({source:e.sourcePath(s),generated:{line:n,column:i-1},original:{line:s.source.start.line,column:s.source.start.column-1}}):e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:n,column:i-1}})),(t=o.match(/\n/g))?(n+=t.length,r=o.lastIndexOf("\n"),i=o.length-r):i+=o.length,s&&"start"!==u){var a=s.parent||{raws:{}};("decl"!==s.type||s!==a.last||a.raws.semicolon)&&(s.source&&s.source.end?e.map.addMapping({source:e.sourcePath(s),generated:{line:n,column:i-2},original:{line:s.source.end.line,column:s.source.end.column-1}}):e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:n,column:i-1}}))}}))},e.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var e="";return this.stringify(this.root,(function(t){e+=t})),[e]},MapGenerator}();t.default=s,e.exports=t.default}).call(this,r(48).Buffer)},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){if(n[e])return;n[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e)};var n={};e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(114))&&n.__esModule?n:{default:n};function _defineProperties(e,t){for(var r=0;r=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}var s=i;if(s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin")}}return t},Processor}();t.default=i,e.exports=t.default},function(e,t,r){const n=r(14),o=r(6);e.exports={isInlineComment(t){if("word"===t[0]&&"//"===t[1].slice(0,2)){const e=t,r=[];let i;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){r.push(t[1].substring(0,t[1].indexOf("\n")));let e=t[1].substring(t[1].indexOf("\n"));e+=this.input.css.valueOf().substring(this.tokenizer.position()),this.input=new o(e),this.tokenizer=n(this.input)}else this.tokenizer.back(t);break}r.push(t[1]),i=t,t=this.tokenizer.nextToken({ignoreUnclosed:!0})}const s=["comment",r.join(""),e[2],e[3],i[2],i[3]];return this.inlineComment(s),!0}if("/"===t[1]){const r=this.tokenizer.nextToken({ignoreUnclosed:!0});if("comment"===r[0]&&/^\/\*/.test(r[1]))return r[0]="word",r[1]=r[1].slice(1),t[1]="//",this.tokenizer.back(r),e.exports.isInlineComment.bind(this)(t)}return!1}}},function(e,t){e.exports={interpolation(e){let t=e;const r=[e],n=["word","{","}"];if(e=this.tokenizer.nextToken(),t[1].length>1||"{"!==e[0])return this.tokenizer.back(e),!1;for(;e&&n.includes(e[0]);)r.push(e),e=this.tokenizer.nextToken();const o=r.map(e=>e[1]);[t]=r;const i=r.pop(),s=[t[2],t[3]],u=[i[4]||i[2],i[5]||i[3]],a=["word",o.join("")].concat(s,u);return this.tokenizer.back(e),this.tokenizer.back(a),!0}}},function(e,t){const r=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,n=/\.[0-9]/;e.exports={isMixinToken:e=>{const[,t]=e,[o]=t;return("."===o||"#"===o)&&!1===r.test(t)&&!1===n.test(t)}}},function(e,t,r){const n=r(14),o=/^url\((.+)\)/;e.exports=e=>{const{name:t,params:r=""}=e;if("import"===t&&r.length){e.import=!0;const t=n({css:r});for(e.filename=r.replace(o,"$1");!t.endOfFile();){const[n,o]=t.nextToken();if("word"===n&&"url"===o)return;if("brackets"===n){e.options=o,e.filename=r.replace(o,"").trim();break}}}}},function(e,t){const r=/:$/,n=/^:(\s+)?/;e.exports=e=>{const{name:t,params:o=""}=e;if(":"===e.name.slice(-1)){if(r.test(t)){const[n]=t.match(r);e.name=t.replace(n,""),e.raws.afterName=n+(e.raws.afterName||""),e.variable=!0,e.value=e.params}if(n.test(o)){const[t]=o.match(n);e.value=o.replace(t,""),e.raws.afterName=(e.raws.afterName||"")+t,e.variable=!0}}}},function(e,t,r){const n=r(8);e.exports=class extends n{atrule(e,t){if(!e.mixin&&!e.variable&&!e.function)return void super.atrule(e,t);const r=e.function?"":e.raws.identifier||"@";let n="".concat(r).concat(e.name),o=e.params?this.rawValue(e,"params"):"";const i=e.raws.important||"";if(e.variable&&(o=e.value),void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=" "),e.nodes)this.block(e,n+o+i);else{const r=(e.raws.between||"")+i+(t?";":"");this.builder(n+o+r,e)}}comment(e){if(e.inline){const t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("//".concat(t).concat(e.text).concat(r),e)}else super.comment(e)}}},function(e,t,r){"use strict";var n=r(123),o=r(125);e.exports={parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(124);e.exports=function(e,t){new n(t).stringify(e)}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var n=function(e){function ScssStringifier(){return _classCallCheck(this,ScssStringifier),_possibleConstructorReturn(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ScssStringifier,e),ScssStringifier.prototype.comment=function(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");if(e.raws.inline){var n=e.raws.text||e.text;this.builder("//"+t+n+r,e)}else this.builder("/*"+t+e.text+r+"*/",e)},ScssStringifier.prototype.decl=function(t,r){if(t.isNested){var n=this.raw(t,"between","colon"),o=t.prop+n+this.rawValue(t,"value");t.important&&(o+=t.raws.important||" !important"),this.builder(o+"{",t,"start");var i=void 0;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),this.builder("}",t,"end")}else e.prototype.decl.call(this,t,r)},ScssStringifier.prototype.rawValue=function(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.scss?n.scss:n.raw:r},ScssStringifier}(r(8));e.exports=n},function(e,t,r){"use strict";var n=r(6),o=r(126);e.exports=function(e,t){var r=new n(e,t),i=new o(r);return i.parse(),i.root}},function(e,t,r){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var n=r(7),o=r(13),i=r(127),s=r(128),u=function(e){function ScssParser(){return _classCallCheck(this,ScssParser),_possibleConstructorReturn(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ScssParser,e),ScssParser.prototype.createTokenizer=function(){this.tokenizer=s(this.input)},ScssParser.prototype.rule=function(t){var r=!1,n=0,o="",s=t,u=Array.isArray(s),a=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(a>=s.length)break;c=s[a++]}else{if((a=s.next()).done)break;c=a.value}var l=c;if(r)"comment"!==l[0]&&"{"!==l[0]&&(o+=l[1]);else{if("space"===l[0]&&-1!==l[1].indexOf("\n"))break;"("===l[0]?n+=1:")"===l[0]?n-=1:0===n&&":"===l[0]&&(r=!0)}}if(!r||""===o.trim()||/^[a-zA-Z-:#]/.test(o))e.prototype.rule.call(this,t);else{t.pop();var f=new i;this.init(f);var p=t[t.length-1];for(p[4]?f.source.end={line:p[4],column:p[5]}:f.source.end={line:p[2],column:p[3]};"word"!==t[0][0];)f.raws.before+=t.shift()[1];for(f.source.start={line:t[0][2],column:t[0][3]},f.prop="";t.length;){var h=t[0][0];if(":"===h||"space"===h||"comment"===h)break;f.prop+=t.shift()[1]}f.raws.between="";for(var d=void 0;t.length;){if(":"===(d=t.shift())[0]){f.raws.between+=d[1];break}f.raws.between+=d[1]}"_"!==f.prop[0]&&"*"!==f.prop[0]||(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1)),f.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var D=t.length-1;D>0;D--){if("!important"===(d=t[D])[1]){f.important=!0;var g=this.stringFrom(t,D);" !important"!==(g=this.spacesFromEnd(t)+g)&&(f.raws.important=g);break}if("important"===d[1]){for(var m=t.slice(0),y="",v=D;v>0;v--){var w=m[v][0];if(0===y.trim().indexOf("!")&&"space"!==w)break;y=m.pop()[1]+y}0===y.trim().indexOf("!")&&(f.important=!0,f.raws.important=y,t=m)}if("space"!==d[0]&&"comment"!==d[0])break}this.raw(f,"value",t),-1!==f.value.indexOf(":")&&this.checkMissedSemicolon(t),this.current=f}},ScssParser.prototype.comment=function(t){if("inline"===t[6]){var r=new n;this.init(r,t[2],t[3]),r.raws.inline=!0,r.source.end={line:t[4],column:t[5]};var o=t[1].slice(2);if(/^\s*$/.test(o))r.text="",r.raws.left=o,r.raws.right="";else{var i=o.match(/^(\s*)([^]*[^\s])(\s*)$/),s=i[2].replace(/(\*\/|\/\*)/g,"*//*");r.text=s,r.raws.left=i[1],r.raws.right=i[3],r.raws.text=i[2]}}else e.prototype.comment.call(this,t)},ScssParser.prototype.raw=function(t,r,n){if(e.prototype.raw.call(this,t,r,n),t.raws[r]){var o=t.raws[r].raw;t.raws[r].raw=n.reduce((function(e,t){return"comment"===t[0]&&"inline"===t[6]?e+"/*"+t[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*")+"*/":e+t[1]}),""),o!==t.raws[r].raw&&(t.raws[r].scss=o)}},ScssParser}(o);e.exports=u},function(e,t,r){"use strict";var n=function(e){function NestedDeclaration(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,NestedDeclaration);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,t));return r.type="decl",r.isNested=!0,r.nodes||(r.nodes=[]),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(NestedDeclaration,e),NestedDeclaration}(r(9));e.exports=n},function(e,t,r){"use strict";var n=/[ \n\t\r\f{}()'"\\;/[\]#]/g,o=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,i=/.[\\/("'\n]/,s=/[a-f0-9]/i,u=/[\r\f\n]/g;e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.css.valueOf(),a=t.ignoreErrors,c=void 0,l=void 0,f=void 0,p=void 0,h=void 0,d=void 0,D=void 0,g=void 0,m=void 0,y=void 0,v=void 0,w=void 0,C=void 0,b=void 0,_=r.length,E=-1,k=1,x=0,A=[],F=[];function unclosed(t){throw e.error("Unclosed "+t,k,x-E)}function endOfFile(){return 0===F.length&&x>=_}function interpolation(){for(var e=1,t=!1,n=!1;e>0;)l+=1,r.length<=l&&unclosed("interpolation"),c=r.charCodeAt(l),w=r.charCodeAt(l+1),t?n||c!==t?92===c?n=!y:n&&(n=!1):(t=!1,n=!1):39===c||34===c?t=c:125===c?e-=1:35===c&&123===w&&(e+=1)}function nextToken(){if(F.length)return F.pop();if(!(x>=_)){switch((10===(c=r.charCodeAt(x))||12===c||13===c&&10!==r.charCodeAt(x+1))&&(E=x,k+=1),c){case 10:case 32:case 9:case 13:case 12:l=x;do{l+=1,10===(c=r.charCodeAt(l))&&(E=l,k+=1)}while(32===c||10===c||9===c||13===c||12===c);C=["space",r.slice(x,l)],x=l-1;break;case 91:C=["[","[",k,x-E];break;case 93:C=["]","]",k,x-E];break;case 123:C=["{","{",k,x-E];break;case 125:C=["}","}",k,x-E];break;case 44:C=["word",",",k,x-E,k,x-E+1];break;case 58:C=[":",":",k,x-E];break;case 59:C=[";",";",k,x-E];break;case 40:if(v=A.length?A.pop()[1]:"",w=r.charCodeAt(x+1),"url"===v&&39!==w&&34!==w){for(b=1,y=!1,l=x+1;l<=r.length-1;){if(92===(w=r.charCodeAt(l)))y=!y;else if(40===w)b+=1;else if(41===w&&0===(b-=1))break;l+=1}d=r.slice(x,l+1),p=d.split("\n"),(h=p.length-1)>0?(g=k+h,m=l-p[h].length):(g=k,m=E),C=["brackets",d,k,x-E,g,l-m],E=m,k=g,x=l}else l=r.indexOf(")",x+1),d=r.slice(x,l+1),-1===l||i.test(d)?C=["(","(",k,x-E]:(C=["brackets",d,k,x-E,k,l-E],x=l);break;case 41:C=[")",")",k,x-E];break;case 39:case 34:for(f=c,l=x,y=!1;l<_&&(++l===_&&unclosed("string"),c=r.charCodeAt(l),w=r.charCodeAt(l+1),y||c!==f);)92===c?y=!y:y?y=!1:35===c&&123===w&&interpolation();d=r.slice(x,l+1),p=d.split("\n"),(h=p.length-1)>0?(g=k+h,m=l-p[h].length):(g=k,m=E),C=["string",r.slice(x,l+1),k,x-E,g,l-m],E=m,k=g,x=l;break;case 64:n.lastIndex=x+1,n.test(r),l=0===n.lastIndex?r.length-1:n.lastIndex-2,C=["at-word",r.slice(x,l+1),k,x-E,k,l-E],x=l;break;case 92:for(l=x,D=!0;92===r.charCodeAt(l+1);)l+=1,D=!D;if(c=r.charCodeAt(l+1),D&&47!==c&&32!==c&&10!==c&&9!==c&&13!==c&&12!==c&&(l+=1,s.test(r.charAt(l)))){for(;s.test(r.charAt(l+1));)l+=1;32===r.charCodeAt(l+1)&&(l+=1)}C=["word",r.slice(x,l+1),k,x-E,k,l-E],x=l;break;default:w=r.charCodeAt(x+1),35===c&&123===w?(l=x,interpolation(),d=r.slice(x,l+1),p=d.split("\n"),(h=p.length-1)>0?(g=k+h,m=l-p[h].length):(g=k,m=E),C=["word",d,k,x-E,g,l-m],E=m,k=g,x=l):47===c&&42===w?(0===(l=r.indexOf("*/",x+2)+1)&&(a?l=r.length:unclosed("comment")),d=r.slice(x,l+1),p=d.split("\n"),(h=p.length-1)>0?(g=k+h,m=l-p[h].length):(g=k,m=E),C=["comment",d,k,x-E,g,l-m],E=m,k=g,x=l):47===c&&47===w?(u.lastIndex=x+1,u.test(r),l=0===u.lastIndex?r.length-1:u.lastIndex-2,d=r.slice(x,l+1),C=["comment",d,k,x-E,k,l-E,"inline"],x=l):(o.lastIndex=x+1,o.test(r),l=0===o.lastIndex?r.length-1:o.lastIndex-2,C=["word",r.slice(x,l+1),k,x-E,k,l-E],A.push(C),x=l)}return x++,C}}function back(e){F.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile}}}])}));
\ No newline at end of file
diff --git a/node_modules/prettier/parser-typescript.js b/node_modules/prettier/parser-typescript.js
new file mode 100644
index 0000000..ddcbd10
--- /dev/null
+++ b/node_modules/prettier/parser-typescript.js
@@ -0,0 +1,14 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.typescript={}))}(this,(function(e){"use strict";var t=function(e,t){const r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var r=function(e,t){if(!e.startsWith("#!"))return;const r=e.indexOf("\n"),n={type:"Line",value:e.slice(2,r),range:[0,r],loc:{start:{line:1,column:0},end:{line:1,column:r}}};t.comments=[n].concat(t.comments)},n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}function o(e){return e&&e.default||e}var s=Object.freeze({__proto__:null,default:{EOL:"\n"}});const c=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");const t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"};var u=c;u.graceful=e=>"string"==typeof e&&c(e)||"\n";var l=o(s),_=a((function(e,t){function r(){const e=l;return r=function(){return e},e}function n(){const e=(t=u)&&t.__esModule?t:{default:t};var t;return n=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){const t=e.match(o);return t?t[0].trimLeft():""},t.strip=function(e){const t=e.match(o);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return f(e).pragmas},t.parseWithComments=f,t.print=function({comments:e="",pragmas:t={}}){const i=(0,n().default)(e)||r().EOL,a=Object.keys(t),o=a.map(e=>m(e,t[e])).reduce((e,t)=>e.concat(t),[]).map(e=>" * "+e+i).join("");if(!e){if(0===a.length)return"";if(1===a.length&&!Array.isArray(t[a[0]])){const e=t[a[0]];return"".concat("/**"," ").concat(m(a[0],e)[0]).concat(" */")}}const s=e.split(i).map(e=>"".concat(" *"," ").concat(e)).join(i)+i;return"/**"+i+(e?s:"")+(e&&a.length?" *"+i:"")+o+" */"};const i=/\*\/$/,a=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,c=/^(\r?\n)+/,_=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,d=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,p=/(\r?\n|^) *\* ?/g;function f(e){const t=(0,n().default)(e)||r().EOL;e=e.replace(a,"").replace(i,"").replace(p,"$1");let o="";for(;o!==e;)o=e,e=e.replace(_,"".concat(t,"$1 $2").concat(t));e=e.replace(c,"").trimRight();const u=Object.create(null),l=e.replace(d,"").replace(c,"").trimRight();let f;for(;f=d.exec(e);){const e=f[2].replace(s,"");"string"==typeof u[f[1]]||Array.isArray(u[f[1]])?u[f[1]]=[].concat(u[f[1]],e):u[f[1]]=e}return{comments:l,pragmas:u}}function m(e,t){return[].concat(t).map(t=>"@".concat(e," ").concat(t).trim())}}));i(_);_.extract,_.strip,_.parse,_.parseWithComments,_.print;var d={hasPragma:function(e){const t=Object.keys(_.parse(_.extract(e)));return t.includes("prettier")||t.includes("format")},insertPragma:function(e){const t=_.parseWithComments(_.extract(e)),r=Object.assign({format:""},t.pragmas),n=_.print({pragmas:r,comments:t.comments.replace(/^(\s+?\r?\n)+/,"")}).replace(/(\r\n|\r)/g,"\n"),i=_.strip(e);return n+(i.startsWith("\n")?"\n":"\n\n")+i}},p=e=>e[e.length-1];function f(e,t){return!(t=t||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?f(e.declaration.decorators[0]):!t.ignoreDecorators&&e.decorators&&e.decorators.length>0?f(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null}function m(e){const t=e.nodes&&p(e.nodes);if(t&&e.source&&!e.source.end&&(e=t),e.__location)return e.__location.endOffset;const r=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(r,m(e.typeAnnotation)):e.loc&&!r?e.loc.end:r}var g={locStart:f,locEnd:m,composeLoc:function(e,t=e){const r="number"==typeof t?t:-1,n=f(e),i=-1!==r?n+r:m(t),a=e.loc.start;return{start:n,end:i,range:[n,i],loc:{start:a,end:-1!==r?{line:a.line,column:a.column+r}:t.loc.end}}}},y=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const h=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||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));var v=h,b=h;v.default=b;const x=e=>{if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=y(e);let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=v(n)?2:1))}return t};var D=x,S=x;D.default=S;const T=/[|\\{}()[\]^$+*?.-]/g;var E=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(T,"\\$&")};const C=/[^\x20-\x7F]/;function k(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:a}=t;let o=r;for(;o>=0&&o"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((e,t)=>{e.forEach(e=>{j[e]=t})});const J={"==":!0,"!=":!0,"===":!0,"!==":!0},z={"*":!0,"/":!0,"%":!0},U={">>":!0,">>>":!0,"<<":!0};function V(e,t,r){let n=0;for(let i=r=r||0;i(r.match(o.regex)||[]).length?o.quote:a.quote}return s}function W(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\([\s\S])|(['"])/g,(e,i,a)=>i===n?i:a===t?"\\"+a:a||(r&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(i)?i:"\\"+i));return t+i+t}function H(e){return e&&(e.comments&&e.comments.length>0&&e.comments.some(e=>G(e)&&!e.unignore)||e.prettierIgnore)}function G(e){return"prettier-ignore"===e.value.trim()}function Y(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var X={replaceEndOfLineWith:function(e,t){const r=[];for(const n of e.split("\n"))0!==r.length&&r.push(t),r.push(n);return r},getStringWidth:function(e){return e?C.test(e)?D(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp("(".concat(E(t),")+"),"g"));return null===r?0:r.reduce((e,r)=>Math.max(e,r.length/t.length),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp("(".concat(E(t),")+"),"g"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;e1?e[e.length-2]:null},getLast:p,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:R,getNextNonSpaceNonCommentCharacterIndex:B,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(B(e,t,r))},skip:k,skipWhitespace:N,skipSpaces:A,skipToLineEnd:F,skipEverythingButNewLine:P,skipInlineComment:w,skipTrailingComment:I,skipNewline:O,isNextLineEmptyAfterIndex:L,isNextLineEmpty:function(e,t,r){return L(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=A(e,n,{backwards:!0}),n=O(e,n,{backwards:!0}),n=A(e,n,{backwards:!0}),n!==O(e,n,{backwards:!0})},hasNewline:M,hasNewlineInRange:function(e,t,r){for(let n=t;n"EmptyStatement"!==e.type);0===r.length?Se(e,t):xe(r[0],t)}function Ce(e,t){"BlockStatement"===e.type?Ee(e,t):xe(e,t)}function ke(e,t,r,n,i,a){if(!r||"IfStatement"!==r.type||!n)return!1;return")"===X.getNextNonSpaceNonCommentCharacter(e,i,a.locEnd)?(De(t,i),!0):t===r.consequent&&n===r.alternate?("BlockStatement"===t.type?De(t,i):Se(r,i),!0):"BlockStatement"===n.type?(Ee(n,i),!0):"IfStatement"===n.type?(Ce(n.consequent,i),!0):r.consequent===n&&(xe(n,i),!0)}function Ne(e,t,r,n,i,a){if(!r||"WhileStatement"!==r.type||!n)return!1;return")"===X.getNextNonSpaceNonCommentCharacter(e,i,a.locEnd)?(De(t,i),!0):"BlockStatement"===n.type&&(Ee(n,i),!0)}function Ae(e,t,r,n){return!(!e||"TryStatement"!==e.type&&"CatchClause"!==e.type||!r)&&("CatchClause"===e.type&&t?(De(t,n),!0):"BlockStatement"===r.type?(Ee(r,n),!0):"TryStatement"===r.type?(Ce(r.finalizer,n),!0):"CatchClause"===r.type&&(Ce(r.body,n),!0))}function Fe(e,t,r,n){return!(!(e&&("ClassDeclaration"===e.type||"ClassExpression"===e.type)&&e.decorators&&e.decorators.length>0)||r&&"Decorator"===r.type)&&(e.decorators&&0!==e.decorators.length?De(e.decorators[e.decorators.length-1],n):xe(e,n),!0)}function Pe(e,t,r,n,i){return t&&r&&("Property"===t.type||"TSDeclareMethod"===t.type||"TSAbstractMethodDefinition"===t.type)&&"Identifier"===r.type&&t.key===r&&":"!==X.getNextNonSpaceNonCommentCharacter(e,r,i.locEnd)?(De(r,n),!0):!(!r||!t||"Decorator"!==r.type||"ClassMethod"!==t.type&&"ClassProperty"!==t.type&&"TSAbstractClassProperty"!==t.type&&"TSAbstractMethodDefinition"!==t.type&&"TSDeclareMethod"!==t.type&&"MethodDefinition"!==t.type)&&(De(r,n),!0)}function we(e,t,r,n,i,a){if(t&&"FunctionTypeParam"===t.type&&r&&"FunctionTypeAnnotation"===r.type&&n&&"FunctionTypeParam"!==n.type)return De(t,i),!0;if(t&&("Identifier"===t.type||"AssignmentPattern"===t.type)&&r&&Re(r)&&")"===X.getNextNonSpaceNonCommentCharacter(e,i,a.locEnd))return De(t,i),!0;if(r&&"FunctionDeclaration"===r.type&&n&&"BlockStatement"===n.type){const t=(()=>{if(0!==(r.params||r.parameters).length)return X.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(e,a.locEnd(X.getLast(r.params||r.parameters)));const t=X.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(e,a.locEnd(r.id));return X.getNextNonSpaceNonCommentCharacterIndexWithStartIndex(e,t+1)})();if(a.locStart(i)>t)return Ee(n,i),!0}return!1}function Ie(e,t){return!(!e||"ImportSpecifier"!==e.type)&&(xe(e,t),!0)}function Oe(e,t){return!(!e||"LabeledStatement"!==e.type)&&(xe(e,t),!0)}function Me(e,t,r,n){return t&&t.body&&0===t.body.length?(n?Se(t,r):xe(t,r),!0):!(!e||"Program"!==e.type||0!==e.body.length||!e.directives||0!==e.directives.length)&&(n?Se(e,r):xe(e,r),!0)}function Le(e){return"Block"===e.type||"CommentBlock"===e.type}function Re(e){return"ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type||"ObjectMethod"===e.type||"ClassMethod"===e.type||"TSDeclareFunction"===e.type||"TSCallSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSMethodSignature"===e.type||"TSConstructorType"===e.type||"TSFunctionType"===e.type||"TSDeclareMethod"===e.type}function Be(e){return Le(e)&&"*"===e.value[0]&&/@type\b/.test(e.value)}var je={handleOwnLineComment:function(e,t,r,n,i){const{precedingNode:a,enclosingNode:o,followingNode:s}=e;return we(t,a,o,s,e,r)||function(e,t,r){if(e&&("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&t&&"Identifier"===t.type)return xe(e,r),!0;return!1}(o,s,e)||ke(t,a,o,s,e,r)||Ne(t,a,o,s,e,r)||Ae(o,a,s,e)||Fe(o,a,s,e)||Ie(o,e)||function(e,t,r){if(e&&("ForInStatement"===e.type||"ForOfStatement"===e.type))return xe(e,r),!0;return!1}(o,0,e)||function(e,t,r,n){if(t&&("UnionTypeAnnotation"===t.type||"TSUnionType"===t.type))return X.isNodeIgnoreComment(n)&&(r.prettierIgnore=!0,n.unignore=!0),!!e&&(De(e,n),!0);r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&X.isNodeIgnoreComment(n)&&(r.types[0].prettierIgnore=!0,n.unignore=!0);return!1}(a,o,s,e)||Me(o,n,e,i)||function(e,t,r,n,i){if(r&&"ImportSpecifier"===r.type&&t&&"ImportDeclaration"===t.type&&X.hasNewline(e,i.locEnd(n)))return De(r,n),!0;return!1}(t,o,a,e,r)||function(e,t){if(e&&"AssignmentPattern"===e.type)return xe(e,t),!0;return!1}(o,e)||Pe(t,o,a,e,r)||Oe(o,e)},handleEndOfLineComment:function(e,t,r,n,i){const{precedingNode:a,enclosingNode:o,followingNode:s}=e;return function(e,t){if(e&&Be(t))return xe(e,t),!0;return!1}(s,e)||we(t,a,o,s,e,r)||function(e,t,r,n,i,a){const o=t&&!X.hasNewlineInRange(i,a.locEnd(t),a.locStart(n));if((!t||!o)&&e&&"ConditionalExpression"===e.type&&r)return xe(r,n),!0;return!1}(o,a,s,e,t,r)||Ie(o,e)||ke(t,a,o,s,e,r)||Ne(t,a,o,s,e,r)||Ae(o,a,s,e)||Fe(o,a,s,e)||Oe(o,e)||function(e,t,r){if(t&&("CallExpression"===t.type||"OptionalCallExpression"===t.type)&&e&&t.callee===e&&t.arguments.length>0)return xe(t.arguments[0],r),!0;return!1}(a,o,e)||function(e,t){if(e&&("Property"===e.type||"ObjectProperty"===e.type))return xe(e,t),!0;return!1}(o,e)||Me(o,n,e,i)||function(e,t,r){if(e&&"TypeAlias"===e.type)return xe(e,r),!0;return!1}(o,0,e)||function(e,t,r){if(e&&("VariableDeclarator"===e.type||"AssignmentExpression"===e.type)&&t&&("ObjectExpression"===t.type||"ArrayExpression"===t.type||"TemplateLiteral"===t.type||"TaggedTemplateExpression"===t.type||Le(r)))return xe(t,r),!0;return!1}(o,s,e)},handleRemainingComment:function(e,t,r,n,i){const{precedingNode:a,enclosingNode:o,followingNode:s}=e;return!!(ke(t,a,o,s,e,r)||Ne(t,a,o,s,e,r)||function(e,t,r){if(e&&("ObjectProperty"===e.type||"Property"===e.type)&&e.shorthand&&e.key===t&&"AssignmentPattern"===e.value.type)return De(e.value.left,r),!0;return!1}(o,a,e)||function(e,t,r,n){if(")"!==X.getNextNonSpaceNonCommentCharacter(e,r,n.locEnd))return!1;if(t&&(Re(t)&&0===(t.params||t.parameters).length||("CallExpression"===t.type||"OptionalCallExpression"===t.type||"NewExpression"===t.type)&&0===t.arguments.length))return Se(t,r),!0;if(t&&"MethodDefinition"===t.type&&0===t.value.params.length)return Se(t.value,r),!0;return!1}(t,o,e,r)||Pe(t,o,a,e,r)||Me(o,n,e,i)||function(e,t,r,n){if(!t||"ArrowFunctionExpression"!==t.type)return!1;const i=Te(e,r,n.locEnd);if("=>"===e.slice(i,i+2))return Se(t,r),!0;return!1}(t,o,e,r)||function(e,t,r,n,i){if("("!==X.getNextNonSpaceNonCommentCharacter(e,n,i.locEnd))return!1;if(r&&t&&("FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ClassMethod"===t.type||"MethodDefinition"===t.type||"ObjectMethod"===t.type))return De(r,n),!0;return!1}(t,o,a,e,r)||function(e,t,r,n,i){if(!t||"TSMappedType"!==t.type)return!1;if(n&&"TSTypeParameter"===n.type&&n.name)return xe(n.name,i),!0;if(r&&"TSTypeParameter"===r.type&&r.constraint)return De(r.constraint,i),!0;return!1}(0,o,a,s,e)||function(e,t){if(e&&("ContinueStatement"===e.type||"BreakStatement"===e.type)&&!e.label)return De(e,t),!0;return!1}(o,e)||function(e,t,r,n,i){if(!r&&t&&("TSMethodSignature"===t.type||"TSDeclareFunction"===t.type||"TSAbstractMethodDefinition"===t.type)&&";"===X.getNextNonSpaceNonCommentCharacter(e,n,i.locEnd))return De(t,n),!0;return!1}(t,o,s,e,r))},hasLeadingComment:function(e,t=(()=>!0)){return e.leadingComments?e.leadingComments.some(t):!!e.comments&&e.comments.some(e=>e.leading&&t(e))},isBlockComment:Le,isTypeCastComment:Be,getGapRegex:function(e){if(e&&"BinaryExpression"!==e.type&&"LogicalExpression"!==e.type)return/^[\s(&|]*$/},getCommentChildNodes:function(e,t){if(("typescript"===t.parser||"flow"===t.parser)&&"MethodDefinition"===e.type&&e.value&&"FunctionExpression"===e.value.type&&0===e.value.params.length&&!e.value.returnType&&(!e.value.typeParameters||0===e.value.typeParameters.length)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}};const{getLast:Ke,getNextNonSpaceNonCommentCharacter:Je}=X,{composeLoc:ze,locEnd:Ue}=g,{isTypeCastComment:Ve}=je;function qe(e,t,r,n){if(!e||"object"!=typeof e)return;if(Array.isArray(e)){for(let r=0;r{e.leadingComments&&e.leadingComments.some(Ve)&&t.add(e.start)}),qe(e,e=>{if("ParenthesizedExpression"===e.type&&!t.has(e.start)){const{expression:t}=e;return t.extra||(t.extra={}),t.extra.parenthesized=!0,t.extra.parenStart=e.start,t}})}return qe(e,e=>{switch(e.type){case"LogicalExpression":if(We(e))return function e(t){if(!We(t))return t;return e(Object.assign({type:"LogicalExpression",operator:t.operator,left:e(Object.assign({type:"LogicalExpression",operator:t.operator,left:t.left,right:t.right.left},ze(t.left,t.right.left))),right:t.right.right},ze(t)))}(e);break;case"VariableDeclaration":{const r=Ke(e.declarations);r&&r.init&&function(e,r){if(";"===t.originalText[Ue(r)])return;Array.isArray(e.range)?e.range=[e.range[0],r.range[1]]:e.end=r.end;e.loc=Object.assign({},e.loc,{end:e.loc.end})}(e,r);break}case"TSParenthesizedType":return Object.assign({},e.typeAnnotation,{},ze(e));case"TSUnionType":case"TSIntersectionType":if(1===e.types.length)return Object.assign({},e.types[0],{},ze(e));break;case"TSTypeParameter":"string"==typeof e.name&&(e.name=Object.assign({type:"Identifier",name:e.name},ze(e,e.name.length)));break;case"SequenceExpression":e.end&&e.end>Ke(e.expressions).end&&(e.end=Ke(e.expressions).end);break;case"ClassProperty":e.key&&"TSPrivateIdentifier"===e.key.type&&"?"===Je(t.originalText,e.key,Ue)&&(e.optional=!0)}}),e},Ge="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Ye(){throw new Error("setTimeout has not been defined")}function Xe(){throw new Error("clearTimeout has not been defined")}var Qe=Ye,$e=Xe;function Ze(e){if(Qe===setTimeout)return setTimeout(e,0);if((Qe===Ye||!Qe)&&setTimeout)return Qe=setTimeout,setTimeout(e,0);try{return Qe(e,0)}catch(t){try{return Qe.call(null,e,0)}catch(t){return Qe.call(this,e,0)}}}"function"==typeof Ge.setTimeout&&(Qe=setTimeout),"function"==typeof Ge.clearTimeout&&($e=clearTimeout);var et,tt=[],rt=!1,nt=-1;function it(){rt&&et&&(rt=!1,et.length?tt=et.concat(tt):nt=-1,tt.length&&at())}function at(){if(!rt){var e=Ze(it);rt=!0;for(var t=tt.length;t;){for(et=tt,tt=[];++nt1)for(var r=1;r0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*St;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*xt;case"seconds":case"second":case"secs":case"sec":case"s":return r*bt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=St)return Et(e,t,St,"day");if(t>=Dt)return Et(e,t,Dt,"hour");if(t>=xt)return Et(e,t,xt,"minute");if(t>=bt)return Et(e,t,bt,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=St)return Math.round(e/St)+"d";if(t>=Dt)return Math.round(e/Dt)+"h";if(t>=xt)return Math.round(e/xt)+"m";if(t>=bt)return Math.round(e/bt)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Et(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var Ct=function(e){function t(e){let t=0;for(let r=0;r{if("%%"===n)return n;s++;const a=r.formatters[i];if("function"==typeof a){const r=e[s];n=a.call(t,r),e.splice(s,1),s--}return n}),r.formatArgs.call(t,e),(t.log||r.log).apply(t,e)}return o.namespace=e,o.enabled=r.enabled(e),o.useColors=r.useColors(),o.color=t(e),o.destroy=n,o.extend=i,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function n(){const e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function i(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(a),...r.skips.map(a).map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t{r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r},kt=a((function(e,t){t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==vt&&"env"in vt&&(e=vt.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=Ct(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),Nt=(kt.log,kt.formatArgs,kt.save,kt.load,kt.useColors,kt.storage,kt.colors,{isatty:()=>!1}),At=Object.freeze({__proto__:null,default:Nt}),Ft=Object.freeze({__proto__:null,default:{}}),Pt=(e,t=vt.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n=2,has16m:e>=3}}function Lt(e,t){if(0===Ot)return 0;if(Pt("color=16m")||Pt("color=full")||Pt("color=truecolor"))return 3;if(Pt("color=256"))return 2;if(e&&!t&&void 0===Ot)return 0;const r=Ot||0;if("dumb"===It.TERM)return r;if("win32"===vt.platform){const e=l.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in It)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in It)||"codeship"===It.CI_NAME?1:r;if("TEAMCITY_VERSION"in It)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(It.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in It)return 1;if("truecolor"===It.COLORTERM)return 3;if("TERM_PROGRAM"in It){const e=parseInt((It.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(It.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(It.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(It.TERM)?1:"COLORTERM"in It?1:r}Pt("no-color")||Pt("no-colors")||Pt("color=false")||Pt("color=never")?Ot=0:(Pt("color")||Pt("colors")||Pt("color=true")||Pt("color=always"))&&(Ot=1),"FORCE_COLOR"in It&&(Ot="true"===It.FORCE_COLOR?1:"false"===It.FORCE_COLOR?0:0===It.FORCE_COLOR.length?1:Math.min(parseInt(It.FORCE_COLOR,10),3));var Rt={supportsColor:function(e){return Mt(Lt(e,e&&e.isTTY))},stdout:Mt(Lt(!0,wt.isatty(1))),stderr:Mt(Lt(!0,wt.isatty(2)))},Bt=o(Ft),jt=a((function(e,t){t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(vt.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let n=vt.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),e.exports=Ct(t);const{formatters:r}=e.exports;r.o=function(e){return this.inspectOpts.colors=this.useColors,Bt.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,Bt.inspect(e,this.inspectOpts)}})),Kt=(jt.init,jt.log,jt.formatArgs,jt.save,jt.load,jt.useColors,jt.colors,jt.inspectOpts,a((function(e){void 0===vt||vt.type,e.exports=kt}))),Jt=Object.freeze({__proto__:null,default:{}});const zt=/[\\/]/;function Ut(e){return e.split(zt).pop()}var Vt=o(Object.freeze({__proto__:null,extname:function(e){const t=Ut(e),r=t.lastIndexOf(".");return-1===r?"":t.slice(r)},basename:Ut,isAbsolute:function(){return!0}})),qt=o(Jt),Wt="win32"===vt.platform,Ht=vt.env.NODE_DEBUG&&/fs/.test(vt.env.NODE_DEBUG);function Gt(e){return"function"==typeof e?e:function(){var e;if(Ht){var t=new Error;e=function(e){e&&(t.message=e.message,r(e=t))}}else e=r;return e;function r(e){if(e){if(vt.throwDeprecation)throw e;if(!vt.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);vt.traceDeprecation?console.trace(t):console.error(t)}}}}()}Vt.normalize;if(Wt)var Yt=/(.*?)(?:[\/\\]+|$)/g;else Yt=/(.*?)(?:[\/]+|$)/g;if(Wt)var Xt=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else Xt=/^[\/]*/;var Qt=function(e,t){if(e=Vt.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var r,n,i,a,o=e,s={},c={};function u(){var t=Xt.exec(e);r=t[0].length,n=t[0],i=t[0],a="",Wt&&!c[i]&&(qt.lstatSync(i),c[i]=!0)}for(u();r=e.length)return t&&(t[s]=e),r(null,e);Yt.lastIndex=n;var c=Yt.exec(e);return o=i,i+=c[0],a=o+c[1],n=Yt.lastIndex,u[a]||t&&t[a]===a?ot(_):t&&Object.prototype.hasOwnProperty.call(t,a)?f(t[a]):qt.lstat(a,d)}function d(e,n){if(e)return r(e);if(!n.isSymbolicLink())return u[a]=!0,t&&(t[a]=a),ot(_);if(!Wt){var i=n.dev.toString(32)+":"+n.ino.toString(32);if(c.hasOwnProperty(i))return p(null,c[i],a)}qt.stat(a,(function(e){if(e)return r(e);qt.readlink(a,(function(e,t){Wt||(c[i]=t),p(e,t)}))}))}function p(e,n,i){if(e)return r(e);var a=Vt.resolve(o,n);t&&(t[i]=a),f(a)}function f(t){e=Vt.resolve(t,e.slice(n)),l()}l()},Zt=ar;ar.realpath=ar,ar.sync=or,ar.realpathSync=or,ar.monkeypatch=function(){qt.realpath=ar,qt.realpathSync=or},ar.unmonkeypatch=function(){qt.realpath=er,qt.realpathSync=tr};var er=qt.realpath,tr=qt.realpathSync,rr=vt.version,nr=/^v[0-5]\./.test(rr);function ir(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function ar(e,t,r){if(nr)return er(e,t,r);"function"==typeof t&&(r=t,t=null),er(e,t,(function(n,i){ir(n)?$t(e,t,r):r(n,i)}))}function or(e,t){if(nr)return tr(e,t);try{return tr(e,t)}catch(r){if(ir(r))return Qt(e,t);throw r}}var sr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},cr=ur;function ur(e,t,r){e instanceof RegExp&&(e=lr(e,r)),t instanceof RegExp&&(t=lr(t,r));var n=_r(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function lr(e,t){var r=t.match(e);return r?r[0]:null}function _r(e,t,r){var n,i,a,o,s,c=r.indexOf(e),u=r.indexOf(t,c+1),l=c;if(c>=0&&u>0){for(n=[],a=r.length;l>=0&&!s;)l==c?(n.push(l),c=r.indexOf(e,l+1)):1==n.length?s=[n.pop(),u]:((i=n.pop())=0?c:u;n.length&&(s=[a,o])}return s}ur.range=_r;var dr=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var n=[],i=cr("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var a,o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=o||s,u=i.body.indexOf(",")>=0;if(!c&&!u)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+mr+i.post,e(t)):[t];if(c)a=i.body.split(/\.\./);else{if(1===(a=function e(t){if(!t)return[""];var r=[],n=cr("{","}",t);if(!n)return t.split(",");var i=n.pre,a=n.body,o=n.post,s=i.split(",");s[s.length-1]+="{"+a+"}";var c=e(o);o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c));return r.push.apply(r,s),r}(i.body)).length)if(1===(a=e(a[0],!1).map(br)).length)return(d=i.post.length?e(i.post,!1):[""]).map((function(e){return i.pre+a[0]+e}))}var l,_=i.pre,d=i.post.length?e(i.post,!1):[""];if(c){var p=hr(a[0]),f=hr(a[1]),m=Math.max(a[0].length,a[1].length),g=3==a.length?Math.abs(hr(a[2])):1,y=Dr;f0){var D=new Array(x+1).join("0");b=v<0?"-"+D+b.slice(1):D+b}}l.push(b)}}else l=function(e,t){for(var r=[],n=0;n=t}var Tr=Pr;Pr.Minimatch=wr;var Er={sep:"/"};try{Er=Vt}catch(e){}var Cr=Pr.GLOBSTAR=wr.GLOBSTAR={},kr={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Nr=function(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}("().*{}+?[]^$\\!");var Ar=/\/+/;function Fr(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function Pr(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new wr(t,r).match(e))}function wr(e,t){if(!(this instanceof wr))return new wr(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==Er.sep&&(e=e.split(Er.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function Ir(e,t){if(t||(t=this instanceof wr?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:dr(e)}Pr.filter=function(e,t){return t=t||{},function(r,n,i){return Pr(r,e,t)}},Pr.defaults=function(e){if(!e||!Object.keys(e).length)return Pr;var t=Pr,r=function(r,n,i){return t.minimatch(r,n,Fr(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,Fr(e,n))},r},wr.defaults=function(e){return e&&Object.keys(e).length?Pr.defaults(e).Minimatch:wr},wr.prototype.debug=function(){},wr.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(Ar)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},wr.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,a=e.length;i65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return Cr;if(""===e)return"";var n,i="",a=!!r.nocase,o=!1,s=[],c=[],u=!1,l=-1,_=-1,d="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function f(){if(n){switch(n){case"*":i+="[^/]*?",a=!0;break;case"?":i+="[^/]",a=!0;break;default:i+="\\"+n}p.debug("clearStateChar %j %j",n,i),n=!1}}for(var m,g=0,y=e.length;g-1;T--){var E=c[T],C=i.slice(0,E.reStart),k=i.slice(E.reStart,E.reEnd-8),N=i.slice(E.reEnd-8,E.reEnd),A=i.slice(E.reEnd);N+=A;var F=C.split("(").length-1,P=A;for(g=0;g=0&&!(n=e[i]);i--);for(i=0;i>> no match, partial?",e,_,t,d),_!==o))}if("string"==typeof u?(c=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,c)):(c=l.match(u),this.debug("pattern match",u,l,c)),!c)return!1}if(i===o&&a===s)return!0;if(i===o)return r;if(a===s)return i===o-1&&""===e[i];throw new Error("wtf?")};var Mr=a((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),Lr=a((function(e){try{var t=Bt;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=Mr}}));var Rr=Object.freeze({__proto__:null,EventEmitter:class{}});function Br(){}Br.ok=function(){},Br.strictEqual=function(){};var jr=Object.freeze({__proto__:null,default:Br});function Kr(e){return"/"===e.charAt(0)}function Jr(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}var zr="win32"===vt.platform?Jr:Kr,Ur=Kr,Vr=Jr;zr.posix=Ur,zr.win32=Vr;var qr=nn,Wr=rn,Hr=function(e,t,r){r||(r={});if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0);e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(an))}(e,r),e.changedCwd=!1;var n=vt.cwd();en(r,"cwd")?(e.cwd=Vt.resolve(r.cwd),e.changedCwd=e.cwd!==n):e.cwd=n;e.root=r.root||Vt.resolve(e.cwd,"/"),e.root=Vt.resolve(e.root),"win32"===vt.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=zr(e.cwd)?e.cwd:on(e,e.cwd),"win32"===vt.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new tn(t,r),e.options=e.minimatch.options},Gr=en,Yr=on,Xr=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;nthis.maxLength)return!1;if(!this.stat&&dn(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[t];if(!i){var a;try{a=qt.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(a&&a.isSymbolicLink())try{i=qt.statSync(t)}catch(e){i=a}else i=a}this.statCache[t]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},gn.prototype._mark=function(e){return cn.mark(this,e)},gn.prototype._makeAbs=function(e){return cn.makeAbs(this,e)};var yn=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;rn?(r.splice(0,n),ot((function(){t.apply(null,i)}))):delete Dn[e]}}))}(e))}));function Tn(e){for(var t=e.length,r=[],n=0;n1)return!0;for(var i=0;ithis.maxLength)return t();if(!this.stat&&Nn(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return t(null,i);if(n&&"FILE"===i)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?t():t(null,o,a)}var s=this,c=Sn("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return qt.stat(r,(function(n,a){n?s._stat2(e,r,null,i,t):s._stat2(e,r,n,a,t)}));s._stat2(e,r,n,i,t)}));c&&qt.lstat(r,c)},In.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var a="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,a&&"FILE"===o?i():i(null,o,n)};
+/*!
+ * is-extglob
+ *
+ * Copyright (c) 2014-2016, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+var On={"{":"}","(":")","[":"]"},Mn=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,Ln=/\\(.)|(^!|[*?{}()[\]]|\(\?)/,Rn=function(e,t){if("string"!=typeof e||""===e)return!1;if(function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}(e))return!0;var r,n=Mn;for(t&&!1===t.strict&&(n=Ln);r=n.exec(e);){if(r[2])return!0;var i=r.index+r[0].length,a=r[1],o=a?On[a]:null;if(a&&o){var s=e.indexOf(o,i);-1!==s&&(i=s+1)}e=e.slice(i)}return!1},Bn=a((function(e,t){var r;t=e.exports=_,r="object"==typeof vt&&vt.env&&vt.env.NODE_DEBUG&&/\bsemver\b/i.test(vt.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],a=t.src=[],o=t.tokens={},s=0;function c(e){o[e]=s++}c("NUMERICIDENTIFIER"),a[o.NUMERICIDENTIFIER]="0|[1-9]\\d*",c("NUMERICIDENTIFIERLOOSE"),a[o.NUMERICIDENTIFIERLOOSE]="[0-9]+",c("NONNUMERICIDENTIFIER"),a[o.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",c("MAINVERSION"),a[o.MAINVERSION]="("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")",c("MAINVERSIONLOOSE"),a[o.MAINVERSIONLOOSE]="("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")",c("PRERELEASEIDENTIFIER"),a[o.PRERELEASEIDENTIFIER]="(?:"+a[o.NUMERICIDENTIFIER]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASEIDENTIFIERLOOSE"),a[o.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[o.NUMERICIDENTIFIERLOOSE]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASE"),a[o.PRERELEASE]="(?:-("+a[o.PRERELEASEIDENTIFIER]+"(?:\\."+a[o.PRERELEASEIDENTIFIER]+")*))",c("PRERELEASELOOSE"),a[o.PRERELEASELOOSE]="(?:-?("+a[o.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[o.PRERELEASEIDENTIFIERLOOSE]+")*))",c("BUILDIDENTIFIER"),a[o.BUILDIDENTIFIER]="[0-9A-Za-z-]+",c("BUILD"),a[o.BUILD]="(?:\\+("+a[o.BUILDIDENTIFIER]+"(?:\\."+a[o.BUILDIDENTIFIER]+")*))",c("FULL"),c("FULLPLAIN"),a[o.FULLPLAIN]="v?"+a[o.MAINVERSION]+a[o.PRERELEASE]+"?"+a[o.BUILD]+"?",a[o.FULL]="^"+a[o.FULLPLAIN]+"$",c("LOOSEPLAIN"),a[o.LOOSEPLAIN]="[v=\\s]*"+a[o.MAINVERSIONLOOSE]+a[o.PRERELEASELOOSE]+"?"+a[o.BUILD]+"?",c("LOOSE"),a[o.LOOSE]="^"+a[o.LOOSEPLAIN]+"$",c("GTLT"),a[o.GTLT]="((?:<|>)?=?)",c("XRANGEIDENTIFIERLOOSE"),a[o.XRANGEIDENTIFIERLOOSE]=a[o.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",c("XRANGEIDENTIFIER"),a[o.XRANGEIDENTIFIER]=a[o.NUMERICIDENTIFIER]+"|x|X|\\*",c("XRANGEPLAIN"),a[o.XRANGEPLAIN]="[v=\\s]*("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:"+a[o.PRERELEASE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGEPLAINLOOSE"),a[o.XRANGEPLAINLOOSE]="[v=\\s]*("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:"+a[o.PRERELEASELOOSE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGE"),a[o.XRANGE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAIN]+"$",c("XRANGELOOSE"),a[o.XRANGELOOSE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAINLOOSE]+"$",c("COERCE"),a[o.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",c("COERCERTL"),i[o.COERCERTL]=new RegExp(a[o.COERCE],"g"),c("LONETILDE"),a[o.LONETILDE]="(?:~>?)",c("TILDETRIM"),a[o.TILDETRIM]="(\\s*)"+a[o.LONETILDE]+"\\s+",i[o.TILDETRIM]=new RegExp(a[o.TILDETRIM],"g");c("TILDE"),a[o.TILDE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAIN]+"$",c("TILDELOOSE"),a[o.TILDELOOSE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAINLOOSE]+"$",c("LONECARET"),a[o.LONECARET]="(?:\\^)",c("CARETTRIM"),a[o.CARETTRIM]="(\\s*)"+a[o.LONECARET]+"\\s+",i[o.CARETTRIM]=new RegExp(a[o.CARETTRIM],"g");c("CARET"),a[o.CARET]="^"+a[o.LONECARET]+a[o.XRANGEPLAIN]+"$",c("CARETLOOSE"),a[o.CARETLOOSE]="^"+a[o.LONECARET]+a[o.XRANGEPLAINLOOSE]+"$",c("COMPARATORLOOSE"),a[o.COMPARATORLOOSE]="^"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+")$|^$",c("COMPARATOR"),a[o.COMPARATOR]="^"+a[o.GTLT]+"\\s*("+a[o.FULLPLAIN]+")$|^$",c("COMPARATORTRIM"),a[o.COMPARATORTRIM]="(\\s*)"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+"|"+a[o.XRANGEPLAIN]+")",i[o.COMPARATORTRIM]=new RegExp(a[o.COMPARATORTRIM],"g");c("HYPHENRANGE"),a[o.HYPHENRANGE]="^\\s*("+a[o.XRANGEPLAIN]+")\\s+-\\s+("+a[o.XRANGEPLAIN]+")\\s*$",c("HYPHENRANGELOOSE"),a[o.HYPHENRANGELOOSE]="^\\s*("+a[o.XRANGEPLAINLOOSE]+")\\s+-\\s+("+a[o.XRANGEPLAINLOOSE]+")\\s*$",c("STAR"),a[o.STAR]="(<|>)?=?\\s*\\*";for(var u=0;u256)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new _(e,t)}catch(e){return null}}function _(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof _))return new _(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new _(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(y(e,t))return null;var r=l(e),n=l(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==n[o])return i+o;return a},t.compareIdentifiers=p;var d=/^[0-9]+$/;function p(e,t){var r=d.test(e),n=d.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function g(e,t,r){return f(e,t,r)<0}function y(e,t,r){return 0===f(e,t,r)}function h(e,t,r){return 0!==f(e,t,r)}function v(e,t,r){return f(e,t,r)>=0}function b(e,t,r){return f(e,t,r)<=0}function x(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return y(e,r,n);case"!=":return h(e,r,n);case">":return m(e,r,n);case">=":return v(e,r,n);case"<":return g(e,r,n);case"<=":return b(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function D(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof D){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof D))return new D(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===S?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return p(t,e)},t.major=function(e,t){return new _(e,t).major},t.minor=function(e,t){return new _(e,t).minor},t.patch=function(e,t){return new _(e,t).patch},t.compare=f,t.compareLoose=function(e,t){return f(e,t,!0)},t.compareBuild=function(e,t,r){var n=new _(e,r),i=new _(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return f(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=m,t.lt=g,t.eq=y,t.neq=h,t.gte=v,t.lte=b,t.cmp=x,t.Comparator=D;var S={};function T(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof T)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new T(e.raw,t);if(e instanceof D)return new T(e.value,t);if(!(this instanceof T))return new T(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function E(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function C(e){return!e||"x"===e.toLowerCase()||"*"===e}function k(e,t,r,n,i,a,o,s,c,u,l,_,d){return((t=C(r)?"":C(n)?">="+r+".0.0":C(i)?">="+r+"."+n+".0":">="+t)+" "+(s=C(c)?"":C(u)?"<"+(+c+1)+".0.0":C(l)?"<"+c+"."+(+u+1)+".0":_?"<="+c+"."+u+"."+l+"-"+_:"<="+s)).trim()}function N(e,t,n){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function A(e,t,r){try{t=new T(t,r)}catch(e){return!1}return t.test(e)}function F(e,t,r,n){var i,a,o,s,c;switch(e=new _(e,n),t=new T(t,n),r){case">":i=m,a=b,o=g,s=">",c=">=";break;case"<":i=g,a=v,o=m,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(A(e,t,n))return!1;for(var u=0;u=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:o(e.semver,p.semver,n)&&(p=e)})),d.operator===s||d.operator===c)return!1;if((!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===c&&o(e,p.semver))return!1}return!0}D.prototype.parse=function(e){var t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new _(r[2],this.options.loose):this.semver=S},D.prototype.toString=function(){return this.value},D.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===S||e===S)return!0;if("string"==typeof e)try{e=new _(e,this.options)}catch(e){return!1}return x(e,this.operator,this.semver,this.options)},D.prototype.intersects=function(e,t){if(!(e instanceof D))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new T(e.value,t),A(this.value,r,t));if(""===e.operator)return""===e.value||(r=new T(this.value,t),A(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=x(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=x(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=T,T.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},T.prototype.toString=function(){return this.range},T.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[o.HYPHENRANGELOOSE]:i[o.HYPHENRANGE];e=e.replace(n,k),r("hyphen replace",e),e=e.replace(i[o.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,i[o.COMPARATORTRIM]),e=(e=(e=e.replace(i[o.TILDETRIM],"$1~")).replace(i[o.CARETTRIM],"$1^")).split(/\s+/).join(" ");var a=t?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[o.CARETLOOSE]:i[o.CARET];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),C(n)?s="":C(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":C(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[o.TILDELOOSE]:i[o.TILDE];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),C(n)?s="":C(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":C(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[o.XRANGELOOSE]:i[o.XRANGE];return e.replace(n,(function(n,i,a,o,s,c){r("xRange",e,n,i,a,o,s,c);var u=C(a),l=u||C(o),_=l||C(s),d=_;return"="===i&&d&&(i=""),c=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(l&&(o=0),s=0,">"===i?(i=">=",l?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",l?a=+a+1:o=+o+1),n=i+a+"."+o+"."+s+c):l?n=">="+a+".0.0"+c+" <"+(+a+1)+".0.0"+c:_&&(n=">="+a+"."+o+".0"+c+" <"+a+"."+(+o+1)+".0"+c),r("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[o.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(a)}))),s=s.map((function(e){return new D(e,this.options)}),this)},T.prototype.intersects=function(e,t){if(!(e instanceof T))throw new TypeError("a Range is required");return this.set.some((function(r){return E(r,t)&&e.set.some((function(e){return E(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new T(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},T.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new _(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!m(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new T(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return F(e,t,"<",r)},t.gtr=function(e,t,r){return F(e,t,">",r)},t.outside=F,t.prerelease=function(e,t){var r=l(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new T(e,r),t=new T(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof _)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i[o.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);if(null===r)return null;return l(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}})),jn=(Bn.SEMVER_SPEC_VERSION,Bn.re,Bn.src,Bn.tokens,Bn.parse,Bn.valid,Bn.clean,Bn.SemVer,Bn.inc,Bn.diff,Bn.compareIdentifiers,Bn.rcompareIdentifiers,Bn.major,Bn.minor,Bn.patch,Bn.compare,Bn.compareLoose,Bn.compareBuild,Bn.rcompare,Bn.sort,Bn.rsort,Bn.gt,Bn.lt,Bn.eq,Bn.neq,Bn.gte,Bn.lte,Bn.cmp,Bn.Comparator,Bn.Range,Bn.toComparators,Bn.satisfies,Bn.maxSatisfying,Bn.minSatisfying,Bn.minVersion,Bn.validRange,Bn.ltr,Bn.gtr,Bn.outside,Bn.prerelease,Bn.intersects,Bn.coerce,"/mnt/d/dev/prettier/node_modules/typescript/lib"),Kn=Object.freeze({__proto__:null,default:{}}),Jn=Object.freeze({__proto__:null,default:{}}),zn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Un=function(e){if(0<=e&&e
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */var qn=function(e){var t,r="",n=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&n,(n>>>=5)>0&&(t|=32),r+=Un(t)}while(n>0);return r},Wn=function(e,t,r){var n,i,a,o,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=Vn(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&i),c+=(i&=31)<>1,1==(1&a)?-o:o),r.rest=t},Hn=a((function(e,t){t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?u:function(e){return l(e)?"$"+e:e},t.fromSetString=c?u:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=_(e.source,t.source);return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=e.generatedLine-t.generatedLine)?n:_(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=_(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)?n:_(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=_(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)?r:_(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}})),Gn=(Hn.getArg,Hn.urlParse,Hn.urlGenerate,Hn.normalize,Hn.join,Hn.isAbsolute,Hn.relative,Hn.toSetString,Hn.fromSetString,Hn.compareByOriginalPositions,Hn.compareByGeneratedPositionsDeflated,Hn.compareByGeneratedPositionsInflated,Hn.parseSourceMapInput,Hn.computeSourceURL,Object.prototype.hasOwnProperty),Yn="undefined"!=typeof Map;function Xn(){this._array=[],this._set=Yn?new Map:Object.create(null)}Xn.fromArray=function(e,t){for(var r=new Xn,n=0,i=e.length;n=0)return t}else{var r=Hn.toSetString(e);if(Gn.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},Xn.prototype.at=function(e){if(e>=0&&en||i==n&&o>=a||Hn.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},$n.prototype.toArray=function(){return this._sorted||(this._array.sort(Hn.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var Zn=Qn.ArraySet,ei={MappingList:$n}.MappingList;function ti(e){e||(e={}),this._file=Hn.getArg(e,"file",null),this._sourceRoot=Hn.getArg(e,"sourceRoot",null),this._skipValidation=Hn.getArg(e,"skipValidation",!1),this._sources=new Zn,this._names=new Zn,this._mappings=new ei,this._sourcesContents=null}ti.prototype._version=3,ti.fromSourceMap=function(e){var t=e.sourceRoot,r=new ti({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=Hn.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var i=n;null!==t&&(i=Hn.relative(t,n)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)})),r},ti.prototype.addMapping=function(e){var t=Hn.getArg(e,"generated"),r=Hn.getArg(e,"original",null),n=Hn.getArg(e,"source",null),i=Hn.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},ti.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=Hn.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Hn.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[Hn.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},ti.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=Hn.relative(i,n));var a=new Zn,o=new Zn;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=Hn.join(r,t.source)),null!=i&&(t.source=Hn.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||o.has(u)||o.add(u)}),this),this._sources=a,this._names=o,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=Hn.join(r,t)),null!=i&&(t=Hn.relative(i,t)),this.setSourceContent(t,n))}),this)},ti.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},ti.prototype._serializeMappings=function(){for(var e,t,r,n,i=0,a=1,o=0,s=0,c=0,u=0,l="",_=this._mappings.toArray(),d=0,p=_.length;d0){if(!Hn.compareByGeneratedPositionsInflated(t,_[d-1]))continue;e+=","}e+=qn(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=qn(n-u),u=n,e+=qn(t.originalLine-1-s),s=t.originalLine-1,e+=qn(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=qn(r-c),c=r)),l+=e}return l},ti.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=Hn.relative(t,e));var r=Hn.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},ti.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},ti.prototype.toString=function(){return JSON.stringify(this.toJSON())};var ri={SourceMapGenerator:ti},ni=a((function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,i){if(0===r.length)return-1;var a=function e(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?e(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n1?e(r,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===n(r[a],r[a-1],!0);)--a;return a}}));ni.GREATEST_LOWER_BOUND,ni.LEAST_UPPER_BOUND,ni.search;function ii(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function ai(e,t,r,n){if(r=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:Hn.getArg(a,"generatedLine",null),column:Hn.getArg(a,"generatedColumn",null),lastColumn:Hn.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)n.push({line:Hn.getArg(a,"generatedLine",null),column:Hn.getArg(a,"generatedColumn",null),lastColumn:Hn.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};function ui(e,t){var r=e;"string"==typeof e&&(r=Hn.parseSourceMapInput(e));var n=Hn.getArg(r,"version"),i=Hn.getArg(r,"sources"),a=Hn.getArg(r,"names",[]),o=Hn.getArg(r,"sourceRoot",null),s=Hn.getArg(r,"sourcesContent",null),c=Hn.getArg(r,"mappings"),u=Hn.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=Hn.normalize(o)),i=i.map(String).map(Hn.normalize).map((function(e){return o&&Hn.isAbsolute(o)&&Hn.isAbsolute(e)?Hn.relative(o,e):e})),this._names=oi.fromArray(a.map(String),!0),this._sources=oi.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map((function(e){return Hn.computeSourceURL(o,e,t)})),this.sourceRoot=o,this.sourcesContent=s,this._mappings=c,this._sourceMapURL=t,this.file=u}function li(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ui.prototype=Object.create(ci.prototype),ui.prototype.consumer=ci,ui.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=Hn.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t1&&(r.source=_+i[1],_+=i[1],r.originalLine=u+i[2],u=r.originalLine,r.originalLine+=1,r.originalColumn=l+i[3],l=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),h.push(r),"number"==typeof r.originalLine&&y.push(r)}si(h,Hn.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,si(y,Hn.compareByOriginalPositions),this.__originalMappings=y},ui.prototype._findMapping=function(e,t,r,n,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return ni.search(e,t,i,a)},ui.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var i=Hn.getArg(n,"source",null);null!==i&&(i=this._sources.at(i),i=Hn.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=Hn.getArg(n,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:Hn.getArg(n,"originalLine",null),column:Hn.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},ui.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},ui.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,i=e;if(null!=this.sourceRoot&&(i=Hn.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=Hn.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},ui.prototype.generatedPositionFor=function(e){var t=Hn.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:Hn.getArg(e,"line"),originalColumn:Hn.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",Hn.compareByOriginalPositions,Hn.getArg(e,"bias",ci.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===r.source)return{line:Hn.getArg(i,"generatedLine",null),column:Hn.getArg(i,"generatedColumn",null),lastColumn:Hn.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};function _i(e,t){var r=e;"string"==typeof e&&(r=Hn.parseSourceMapInput(e));var n=Hn.getArg(r,"version"),i=Hn.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new oi,this._names=new oi;var a={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=Hn.getArg(e,"offset"),n=Hn.getArg(r,"line"),i=Hn.getArg(r,"column");if(n=0;t--)this.prepend(e[t]);else{if(!e[fi]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},mi.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r>18&63]+gi[i>>12&63]+gi[i>>6&63]+gi[63&i]);return a.join("")}function Di(e){var t;vi||bi();for(var r=e.length,n=r%3,i="",a=[],o=0,s=r-n;o