🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

prettier

Package Overview
Dependencies
Maintainers
11
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier - npm Package Compare versions

Comparing version
3.8.5
to
3.9.0
+5
-1
bin/prettier.cjs

@@ -6,3 +6,7 @@ #!/usr/bin/env node

return function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
try {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
} catch (e) {
throw mod = 0, e;
}
};

@@ -9,0 +13,0 @@ };

+206
-142

@@ -64,3 +64,3 @@ (function (factory) {

}
var at = createMethodShim("at", function() {
var at = /* @__PURE__ */ createMethodShim("at", function() {
if (Array.isArray(this) || typeof this === "string") {

@@ -163,2 +163,11 @@ return stringOrArrayAt;

// src/utilities/get-or-insert.js
function getOrInsertComputed(map, key, callback) {
if (!map.has(key)) {
const value = callback(key);
map.set(key, value);
}
return map.get(key);
}
// src/document/utilities/get-doc-type.js

@@ -282,8 +291,3 @@ function getDocType(doc) {

function rec(doc2) {
if (mapped.has(doc2)) {
return mapped.get(doc2);
}
const result = process2(doc2);
mapped.set(doc2, result);
return result;
return getOrInsertComputed(mapped, doc2, process2);
}

@@ -501,7 +505,14 @@ function process2(doc2) {

switch (get_doc_type_default(doc)) {
case DOC_TYPE_FILL:
if (doc.parts.every((part) => part === "")) {
case DOC_TYPE_FILL: {
const {
parts
} = doc;
if (parts.every((part) => part === "")) {
return "";
}
if (parts.length === 1) {
return parts[0];
}
break;
}
case DOC_TYPE_GROUP:

@@ -784,3 +795,3 @@ if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) {

};
var replaceAll = createMethodShim("replaceAll", function() {
var replaceAll = /* @__PURE__ */ createMethodShim("replaceAll", function() {
if (typeof this === "string") {

@@ -808,16 +819,69 @@ return stringReplaceAll;

// node_modules/get-east-asian-width/lookup-data.js
var fullwidthMinimalCodePoint = 12288;
var fullwidthMaximumCodePoint = 65510;
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
var wideMinimalCodePoint = 4352;
var wideMaximumCodePoint = 262141;
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
// node_modules/get-east-asian-width/utilities.js
var isInRange = (ranges, codePoint) => {
let low = 0;
let high = Math.floor(ranges.length / 2) - 1;
while (low <= high) {
const mid = Math.floor((low + high) / 2);
const i = mid * 2;
if (codePoint < ranges[i]) {
high = mid - 1;
} else if (codePoint > ranges[i + 1]) {
low = mid + 1;
} else {
return true;
}
}
return false;
};
// node_modules/get-east-asian-width/lookup.js
function isFullWidth(x) {
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
var commonCjkCodePoint = 19968;
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
function findWideFastPathRange(ranges) {
let fastPathStart = ranges[0];
let fastPathEnd = ranges[1];
for (let index = 0; index < ranges.length; index += 2) {
const start = ranges[index];
const end = ranges[index + 1];
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
return [start, end];
}
if (end - start > fastPathEnd - fastPathStart) {
fastPathStart = start;
fastPathEnd = end;
}
}
return [fastPathStart, fastPathEnd];
}
function isWide(x) {
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
var isFullWidth = (codePoint) => {
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
return false;
}
return isInRange(fullwidthRanges, codePoint);
};
var isWide = (codePoint) => {
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
return true;
}
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
return false;
}
return isInRange(wideRanges, codePoint);
};
// src/utilities/narrow-emojis.evaluate.js
var narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07";
// node_modules/narrow-emojis/index.js
var narrowEmojiRegexp = /^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/;
var isNarrowEmojiCharacter = (character) => narrowEmojiRegexp.test(character);
// src/utilities/get-string-width.js
var notAsciiRegex = /[^\x20-\x7F]/u;
var narrowEmojisSet = new Set(narrow_emojis_evaluate_default);
var notAsciiRegex = /[^\x20-\x7F]/;
function getStringWidth(text) {

@@ -830,7 +894,7 @@ if (!text) {

}
text = text.replace(
emoji_regex_default(),
(match) => narrowEmojisSet.has(match) ? " " : " "
);
let width = 0;
text = text.replace(emoji_regex_default(), (character) => {
width += isNarrowEmojiCharacter(character) ? 1 : 2;
return "";
});
for (const character of text) {

@@ -980,6 +1044,58 @@ const codePoint = character.codePointAt(0);

// src/document/printer/print-result.js
var printResult = class {
/** @type {string[]} */
#settledTexts = [];
#unsettledText = "";
#settledTextLength = 0;
/** @type {number[]} */
#settledPositions = [];
/** @type {number[]} */
#unsettledPositions = [];
#settle() {
const text = this.#unsettledText;
if (text !== "") {
this.#settledTexts.push(text);
this.#settledTextLength += text.length;
this.#unsettledText = "";
}
for (const position of this.#unsettledPositions) {
this.#settledPositions.push(Math.min(position, this.#settledTextLength));
}
this.#unsettledPositions.length = 0;
}
markPosition() {
if (this.#settledPositions.length + this.#unsettledPositions.length >= 2) {
throw new Error("There are too many 'cursor' in doc.");
}
this.#unsettledPositions.push(
this.#settledTextLength + this.#unsettledText.length
);
}
/**
@param {string} text
*/
write(text) {
this.#unsettledText += text;
}
trim() {
const { text: trimmed, count } = trimIndentation(this.#unsettledText);
this.#unsettledText = trimmed;
this.#settle();
return count;
}
finish() {
this.#settle();
return {
text: this.#settledTexts.join(""),
positions: this.#settledPositions
};
}
};
var print_result_default = printResult;
// src/document/printer/printer.js
var MODE_BREAK = Symbol("MODE_BREAK");
var MODE_FLAT = Symbol("MODE_FLAT");
var DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
var MODE_BREAK = /* @__PURE__ */ Symbol("MODE_BREAK");
var MODE_FLAT = /* @__PURE__ */ Symbol("MODE_FLAT");
var DOC_FILL_PRINTED_LENGTH = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
function fits(next, restCommands, remainingWidth, hasLineSuffix, groupModeMap, mustBeFlat) {

@@ -1106,9 +1222,5 @@ if (remainingWidth === Number.POSITIVE_INFINITY) {

}];
let output = "";
let shouldRemeasure = false;
const lineSuffix2 = [];
const cursorPositions = [];
const settledOutput = [];
const settledCursorPositions = [];
let settledTextLength = 0;
const result = new print_result_default();
propagateBreaks(doc);

@@ -1131,3 +1243,3 @@ while (commands.length > 0) {

if (formatted2) {
output += formatted2;
result.write(formatted2);
if (commands.length > 0) {

@@ -1149,6 +1261,3 @@ position += get_string_width_default(formatted2);

case DOC_TYPE_CURSOR:
if (cursorPositions.length >= 2) {
throw new Error("There are too many 'cursor' in doc.");
}
cursorPositions.push(settledTextLength + output.length);
result.markPosition();
break;

@@ -1170,85 +1279,60 @@ case DOC_TYPE_INDENT:

case DOC_TYPE_TRIM:
trim2();
position -= result.trim();
break;
case DOC_TYPE_GROUP:
switch (mode) {
case MODE_FLAT:
if (!shouldRemeasure) {
commands.push({
indent: indent2,
mode: doc2.break ? MODE_BREAK : MODE_FLAT,
doc: doc2.contents
});
break;
}
// fallthrough
case MODE_BREAK: {
shouldRemeasure = false;
const next = {
case DOC_TYPE_GROUP: {
const command = (function printGroup() {
if (mode === MODE_FLAT && !shouldRemeasure) {
return {
indent: indent2,
mode: MODE_FLAT,
mode: doc2.break ? MODE_BREAK : MODE_FLAT,
doc: doc2.contents
};
const remainingWidth = width - position;
const hasLineSuffix = lineSuffix2.length > 0;
if (!doc2.break && fits(next, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
commands.push(next);
} else {
if (doc2.expandedStates) {
const mostExpanded = method_at_default(
/* OPTIONAL_OBJECT: false */
0,
doc2.expandedStates,
-1
);
if (doc2.break) {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: mostExpanded
});
break;
} else {
for (let index = 1; index < doc2.expandedStates.length + 1; index++) {
if (index >= doc2.expandedStates.length) {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: mostExpanded
});
break;
} else {
const state = doc2.expandedStates[index];
const cmd = {
indent: indent2,
mode: MODE_FLAT,
doc: state
};
if (fits(cmd, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
commands.push(cmd);
break;
}
}
}
}
} else {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: doc2.contents
});
}
shouldRemeasure = false;
const remainingWidth = width - position;
const hasLineSuffix = lineSuffix2.length > 0;
const flatCommand = {
indent: indent2,
mode: MODE_FLAT,
doc: doc2.contents
};
if (!doc2.break && fits(flatCommand, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
return flatCommand;
}
if (!doc2.expandedStates) {
return {
indent: indent2,
mode: MODE_BREAK,
doc: doc2.contents
};
}
if (!doc2.break) {
for (let index = 1; index < doc2.expandedStates.length - 1; index++) {
const flatCommand2 = {
indent: indent2,
mode: MODE_FLAT,
doc: doc2.expandedStates[index]
};
if (fits(flatCommand2, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
return flatCommand2;
}
}
break;
}
}
return {
indent: indent2,
mode: MODE_BREAK,
doc: method_at_default(
/* OPTIONAL_OBJECT: false */
0,
doc2.expandedStates,
-1
)
};
})();
commands.push(command);
if (doc2.id) {
groupModeMap[doc2.id] = method_at_default(
/* OPTIONAL_OBJECT: false */
0,
commands,
-1
).mode;
groupModeMap[doc2.id] = command.mode;
}
break;
}
// Fills each line with as much code as possible before moving to a new

@@ -1394,9 +1478,8 @@ // line with the same indentation.

if (!doc2.soft) {
output += " ";
result.write(" ");
position += 1;
}
break;
} else {
shouldRemeasure = true;
}
shouldRemeasure = true;
// fallthrough

@@ -1414,7 +1497,7 @@ case MODE_BREAK:

if (doc2.literal) {
output += newLine;
result.write(newLine);
position = 0;
if (indent2.root) {
if (indent2.root.value) {
output += indent2.root.value;
result.write(indent2.root.value);
}

@@ -1424,4 +1507,4 @@ position = indent2.root.length;

} else {
trim2();
output += newLine + indent2.value;
result.trim();
result.write(newLine + indent2.value);
position = indent2.length;

@@ -1449,5 +1532,7 @@ }

}
const formatted = settledOutput.join("") + output;
const finalCursorPositions = [...settledCursorPositions, ...cursorPositions];
if (finalCursorPositions.length !== 2) {
const {
text: formatted,
positions: cursorPositions
} = result.finish();
if (cursorPositions.length !== 2) {
return {

@@ -1457,29 +1542,8 @@ formatted

}
const cursorNodeStart = finalCursorPositions[0];
const [cursorNodeStart, cursorNodeEnd] = cursorPositions;
return {
formatted,
cursorNodeStart,
cursorNodeText: formatted.slice(cursorNodeStart, method_at_default(
/* OPTIONAL_OBJECT: false */
0,
finalCursorPositions,
-1
))
cursorNodeText: formatted.slice(cursorNodeStart, cursorNodeEnd)
};
function trim2() {
const {
text: trimmed,
count
} = trimIndentation(output);
if (trimmed) {
settledOutput.push(trimmed);
settledTextLength += trimmed.length;
}
output = "";
position -= count;
if (cursorPositions.length > 0) {
settledCursorPositions.push(...cursorPositions.map((position2) => Math.min(position2, settledTextLength)));
cursorPositions.length = 0;
}
}
}

@@ -1486,0 +1550,0 @@

+206
-142

@@ -29,3 +29,3 @@ var __defProp = Object.defineProperty;

}
var at = createMethodShim("at", function() {
var at = /* @__PURE__ */ createMethodShim("at", function() {
if (Array.isArray(this) || typeof this === "string") {

@@ -128,2 +128,11 @@ return stringOrArrayAt;

// src/utilities/get-or-insert.js
function getOrInsertComputed(map, key, callback) {
if (!map.has(key)) {
const value = callback(key);
map.set(key, value);
}
return map.get(key);
}
// src/document/utilities/get-doc-type.js

@@ -247,8 +256,3 @@ function getDocType(doc) {

function rec(doc2) {
if (mapped.has(doc2)) {
return mapped.get(doc2);
}
const result = process2(doc2);
mapped.set(doc2, result);
return result;
return getOrInsertComputed(mapped, doc2, process2);
}

@@ -466,7 +470,14 @@ function process2(doc2) {

switch (get_doc_type_default(doc)) {
case DOC_TYPE_FILL:
if (doc.parts.every((part) => part === "")) {
case DOC_TYPE_FILL: {
const {
parts
} = doc;
if (parts.every((part) => part === "")) {
return "";
}
if (parts.length === 1) {
return parts[0];
}
break;
}
case DOC_TYPE_GROUP:

@@ -749,3 +760,3 @@ if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) {

};
var replaceAll = createMethodShim("replaceAll", function() {
var replaceAll = /* @__PURE__ */ createMethodShim("replaceAll", function() {
if (typeof this === "string") {

@@ -773,16 +784,69 @@ return stringReplaceAll;

// node_modules/get-east-asian-width/lookup-data.js
var fullwidthMinimalCodePoint = 12288;
var fullwidthMaximumCodePoint = 65510;
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
var wideMinimalCodePoint = 4352;
var wideMaximumCodePoint = 262141;
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
// node_modules/get-east-asian-width/utilities.js
var isInRange = (ranges, codePoint) => {
let low = 0;
let high = Math.floor(ranges.length / 2) - 1;
while (low <= high) {
const mid = Math.floor((low + high) / 2);
const i = mid * 2;
if (codePoint < ranges[i]) {
high = mid - 1;
} else if (codePoint > ranges[i + 1]) {
low = mid + 1;
} else {
return true;
}
}
return false;
};
// node_modules/get-east-asian-width/lookup.js
function isFullWidth(x) {
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
var commonCjkCodePoint = 19968;
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
function findWideFastPathRange(ranges) {
let fastPathStart = ranges[0];
let fastPathEnd = ranges[1];
for (let index = 0; index < ranges.length; index += 2) {
const start = ranges[index];
const end = ranges[index + 1];
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
return [start, end];
}
if (end - start > fastPathEnd - fastPathStart) {
fastPathStart = start;
fastPathEnd = end;
}
}
return [fastPathStart, fastPathEnd];
}
function isWide(x) {
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
var isFullWidth = (codePoint) => {
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
return false;
}
return isInRange(fullwidthRanges, codePoint);
};
var isWide = (codePoint) => {
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
return true;
}
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
return false;
}
return isInRange(wideRanges, codePoint);
};
// src/utilities/narrow-emojis.evaluate.js
var narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07";
// node_modules/narrow-emojis/index.js
var narrowEmojiRegexp = /^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/;
var isNarrowEmojiCharacter = (character) => narrowEmojiRegexp.test(character);
// src/utilities/get-string-width.js
var notAsciiRegex = /[^\x20-\x7F]/u;
var narrowEmojisSet = new Set(narrow_emojis_evaluate_default);
var notAsciiRegex = /[^\x20-\x7F]/;
function getStringWidth(text) {

@@ -795,7 +859,7 @@ if (!text) {

}
text = text.replace(
emoji_regex_default(),
(match) => narrowEmojisSet.has(match) ? " " : " "
);
let width = 0;
text = text.replace(emoji_regex_default(), (character) => {
width += isNarrowEmojiCharacter(character) ? 1 : 2;
return "";
});
for (const character of text) {

@@ -945,6 +1009,58 @@ const codePoint = character.codePointAt(0);

// src/document/printer/print-result.js
var printResult = class {
/** @type {string[]} */
#settledTexts = [];
#unsettledText = "";
#settledTextLength = 0;
/** @type {number[]} */
#settledPositions = [];
/** @type {number[]} */
#unsettledPositions = [];
#settle() {
const text = this.#unsettledText;
if (text !== "") {
this.#settledTexts.push(text);
this.#settledTextLength += text.length;
this.#unsettledText = "";
}
for (const position of this.#unsettledPositions) {
this.#settledPositions.push(Math.min(position, this.#settledTextLength));
}
this.#unsettledPositions.length = 0;
}
markPosition() {
if (this.#settledPositions.length + this.#unsettledPositions.length >= 2) {
throw new Error("There are too many 'cursor' in doc.");
}
this.#unsettledPositions.push(
this.#settledTextLength + this.#unsettledText.length
);
}
/**
@param {string} text
*/
write(text) {
this.#unsettledText += text;
}
trim() {
const { text: trimmed, count } = trimIndentation(this.#unsettledText);
this.#unsettledText = trimmed;
this.#settle();
return count;
}
finish() {
this.#settle();
return {
text: this.#settledTexts.join(""),
positions: this.#settledPositions
};
}
};
var print_result_default = printResult;
// src/document/printer/printer.js
var MODE_BREAK = Symbol("MODE_BREAK");
var MODE_FLAT = Symbol("MODE_FLAT");
var DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH");
var MODE_BREAK = /* @__PURE__ */ Symbol("MODE_BREAK");
var MODE_FLAT = /* @__PURE__ */ Symbol("MODE_FLAT");
var DOC_FILL_PRINTED_LENGTH = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
function fits(next, restCommands, remainingWidth, hasLineSuffix, groupModeMap, mustBeFlat) {

@@ -1071,9 +1187,5 @@ if (remainingWidth === Number.POSITIVE_INFINITY) {

}];
let output = "";
let shouldRemeasure = false;
const lineSuffix2 = [];
const cursorPositions = [];
const settledOutput = [];
const settledCursorPositions = [];
let settledTextLength = 0;
const result = new print_result_default();
propagateBreaks(doc);

@@ -1096,3 +1208,3 @@ while (commands.length > 0) {

if (formatted2) {
output += formatted2;
result.write(formatted2);
if (commands.length > 0) {

@@ -1114,6 +1226,3 @@ position += get_string_width_default(formatted2);

case DOC_TYPE_CURSOR:
if (cursorPositions.length >= 2) {
throw new Error("There are too many 'cursor' in doc.");
}
cursorPositions.push(settledTextLength + output.length);
result.markPosition();
break;

@@ -1135,85 +1244,60 @@ case DOC_TYPE_INDENT:

case DOC_TYPE_TRIM:
trim2();
position -= result.trim();
break;
case DOC_TYPE_GROUP:
switch (mode) {
case MODE_FLAT:
if (!shouldRemeasure) {
commands.push({
indent: indent2,
mode: doc2.break ? MODE_BREAK : MODE_FLAT,
doc: doc2.contents
});
break;
}
// fallthrough
case MODE_BREAK: {
shouldRemeasure = false;
const next = {
case DOC_TYPE_GROUP: {
const command = (function printGroup() {
if (mode === MODE_FLAT && !shouldRemeasure) {
return {
indent: indent2,
mode: MODE_FLAT,
mode: doc2.break ? MODE_BREAK : MODE_FLAT,
doc: doc2.contents
};
const remainingWidth = width - position;
const hasLineSuffix = lineSuffix2.length > 0;
if (!doc2.break && fits(next, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
commands.push(next);
} else {
if (doc2.expandedStates) {
const mostExpanded = method_at_default(
/* OPTIONAL_OBJECT: false */
0,
doc2.expandedStates,
-1
);
if (doc2.break) {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: mostExpanded
});
break;
} else {
for (let index = 1; index < doc2.expandedStates.length + 1; index++) {
if (index >= doc2.expandedStates.length) {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: mostExpanded
});
break;
} else {
const state = doc2.expandedStates[index];
const cmd = {
indent: indent2,
mode: MODE_FLAT,
doc: state
};
if (fits(cmd, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
commands.push(cmd);
break;
}
}
}
}
} else {
commands.push({
indent: indent2,
mode: MODE_BREAK,
doc: doc2.contents
});
}
shouldRemeasure = false;
const remainingWidth = width - position;
const hasLineSuffix = lineSuffix2.length > 0;
const flatCommand = {
indent: indent2,
mode: MODE_FLAT,
doc: doc2.contents
};
if (!doc2.break && fits(flatCommand, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
return flatCommand;
}
if (!doc2.expandedStates) {
return {
indent: indent2,
mode: MODE_BREAK,
doc: doc2.contents
};
}
if (!doc2.break) {
for (let index = 1; index < doc2.expandedStates.length - 1; index++) {
const flatCommand2 = {
indent: indent2,
mode: MODE_FLAT,
doc: doc2.expandedStates[index]
};
if (fits(flatCommand2, commands, remainingWidth, hasLineSuffix, groupModeMap)) {
return flatCommand2;
}
}
break;
}
}
return {
indent: indent2,
mode: MODE_BREAK,
doc: method_at_default(
/* OPTIONAL_OBJECT: false */
0,
doc2.expandedStates,
-1
)
};
})();
commands.push(command);
if (doc2.id) {
groupModeMap[doc2.id] = method_at_default(
/* OPTIONAL_OBJECT: false */
0,
commands,
-1
).mode;
groupModeMap[doc2.id] = command.mode;
}
break;
}
// Fills each line with as much code as possible before moving to a new

@@ -1359,9 +1443,8 @@ // line with the same indentation.

if (!doc2.soft) {
output += " ";
result.write(" ");
position += 1;
}
break;
} else {
shouldRemeasure = true;
}
shouldRemeasure = true;
// fallthrough

@@ -1379,7 +1462,7 @@ case MODE_BREAK:

if (doc2.literal) {
output += newLine;
result.write(newLine);
position = 0;
if (indent2.root) {
if (indent2.root.value) {
output += indent2.root.value;
result.write(indent2.root.value);
}

@@ -1389,4 +1472,4 @@ position = indent2.root.length;

} else {
trim2();
output += newLine + indent2.value;
result.trim();
result.write(newLine + indent2.value);
position = indent2.length;

@@ -1414,5 +1497,7 @@ }

}
const formatted = settledOutput.join("") + output;
const finalCursorPositions = [...settledCursorPositions, ...cursorPositions];
if (finalCursorPositions.length !== 2) {
const {
text: formatted,
positions: cursorPositions
} = result.finish();
if (cursorPositions.length !== 2) {
return {

@@ -1422,29 +1507,8 @@ formatted

}
const cursorNodeStart = finalCursorPositions[0];
const [cursorNodeStart, cursorNodeEnd] = cursorPositions;
return {
formatted,
cursorNodeStart,
cursorNodeText: formatted.slice(cursorNodeStart, method_at_default(
/* OPTIONAL_OBJECT: false */
0,
finalCursorPositions,
-1
))
cursorNodeText: formatted.slice(cursorNodeStart, cursorNodeEnd)
};
function trim2() {
const {
text: trimmed,
count
} = trimIndentation(output);
if (trimmed) {
settledOutput.push(trimmed);
settledTextLength += trimmed.length;
}
output = "";
position -= count;
if (cursorPositions.length > 0) {
settledCursorPositions.push(...cursorPositions.map((position2) => Math.min(position2, settledTextLength)));
cursorPositions.length = 0;
}
}
}

@@ -1451,0 +1515,0 @@

+103
-33

@@ -8,4 +8,9 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
var __esm = (fn, res, err) => function __init() {
if (err) throw err[0];
try {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
} catch (e) {
throw err = [e], e;
}
};

@@ -60,3 +65,3 @@ var __export = (target, all) => {

};
replaceAll = createMethodShim("replaceAll", function() {
replaceAll = /* @__PURE__ */ createMethodShim("replaceAll", function() {
if (typeof this === "string") {

@@ -73,6 +78,6 @@ return stringReplaceAll;

return (text, startIndex, options) => {
const backwards = Boolean(options?.backwards);
if (startIndex === false) {
return false;
}
const backwards = Boolean(options?.backwards);
const { length } = text;

@@ -100,6 +105,6 @@ let cursor = startIndex;

"src/utilities/skip.js"() {
skipWhitespace = skip(/\s/u);
skipWhitespace = skip(/\s/);
skipSpaces = skip(" ");
skipToLineEnd = skip(",; ");
skipEverythingButNewLine = skip(/[^\n\r]/u);
skipEverythingButNewLine = skip(/[^\n\r]/);
}

@@ -131,6 +136,6 @@ });

function skipNewline(text, startIndex, options) {
const backwards = Boolean(options?.backwards);
if (startIndex === false) {
return false;
}
const backwards = Boolean(options?.backwards);
const character = text.charAt(startIndex);

@@ -334,3 +339,3 @@ if (backwards) {

// All the leading whitespaces
value.slice(lastNewlineIndex + 1).match(/^[\t ]*/u)[0],
value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0],
tabWidth

@@ -362,3 +367,3 @@ );

let results = text.matchAll(
new RegExp(`(?:${escapeStringRegexp(searchString)})+`, "gu")
new RegExp(`(?:${escapeStringRegexp(searchString)})+`, "g")
);

@@ -410,3 +415,3 @@ if (!results.reduce) {

}
var SINGLE_QUOTE, DOUBLE_QUOTE, SINGLE_QUOTE_DATA, DOUBLE_QUOTE_DATA, SINGLE_QUOTE_SETTINGS, DOUBLE_QUOTE_SETTINGS, get_preferred_quote_default;
var SINGLE_QUOTE, DOUBLE_QUOTE, SINGLE_QUOTE_DATA, DOUBLE_QUOTE_DATA, SINGLE_QUOTE_SETTINGS, DOUBLE_QUOTE_SETTINGS;
var init_get_preferred_quote = __esm({

@@ -432,3 +437,2 @@ "src/utilities/get-preferred-quote.js"() {

});
get_preferred_quote_default = getPreferredQuote;
}

@@ -447,11 +451,77 @@ });

// node_modules/get-east-asian-width/lookup-data.js
var fullwidthMinimalCodePoint, fullwidthMaximumCodePoint, fullwidthRanges, wideMinimalCodePoint, wideMaximumCodePoint, wideRanges;
var init_lookup_data = __esm({
"node_modules/get-east-asian-width/lookup-data.js"() {
fullwidthMinimalCodePoint = 12288;
fullwidthMaximumCodePoint = 65510;
fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
wideMinimalCodePoint = 4352;
wideMaximumCodePoint = 262141;
wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
}
});
// node_modules/get-east-asian-width/utilities.js
var isInRange;
var init_utilities2 = __esm({
"node_modules/get-east-asian-width/utilities.js"() {
isInRange = (ranges, codePoint) => {
let low = 0;
let high = Math.floor(ranges.length / 2) - 1;
while (low <= high) {
const mid = Math.floor((low + high) / 2);
const i = mid * 2;
if (codePoint < ranges[i]) {
high = mid - 1;
} else if (codePoint > ranges[i + 1]) {
low = mid + 1;
} else {
return true;
}
}
return false;
};
}
});
// node_modules/get-east-asian-width/lookup.js
function isFullWidth(x) {
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
function findWideFastPathRange(ranges) {
let fastPathStart = ranges[0];
let fastPathEnd = ranges[1];
for (let index = 0; index < ranges.length; index += 2) {
const start = ranges[index];
const end = ranges[index + 1];
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
return [start, end];
}
if (end - start > fastPathEnd - fastPathStart) {
fastPathStart = start;
fastPathEnd = end;
}
}
return [fastPathStart, fastPathEnd];
}
function isWide(x) {
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
var commonCjkCodePoint, wideFastPathStart, wideFastPathEnd, isFullWidth, isWide;
var init_lookup = __esm({
"node_modules/get-east-asian-width/lookup.js"() {
init_lookup_data();
init_utilities2();
commonCjkCodePoint = 19968;
[wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
isFullWidth = (codePoint) => {
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
return false;
}
return isInRange(fullwidthRanges, codePoint);
};
isWide = (codePoint) => {
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
return true;
}
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
return false;
}
return isInRange(wideRanges, codePoint);
};
}

@@ -467,7 +537,8 @@ });

// src/utilities/narrow-emojis.evaluate.js
var narrow_emojis_evaluate_default;
var init_narrow_emojis_evaluate = __esm({
"src/utilities/narrow-emojis.evaluate.js"() {
narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07";
// node_modules/narrow-emojis/index.js
var narrowEmojiRegexp, isNarrowEmojiCharacter;
var init_narrow_emojis = __esm({
"node_modules/narrow-emojis/index.js"() {
narrowEmojiRegexp = /^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/;
isNarrowEmojiCharacter = (character) => narrowEmojiRegexp.test(character);
}

@@ -484,7 +555,7 @@ });

}
text = text.replace(
emoji_regex_default(),
(match) => narrowEmojisSet.has(match) ? " " : " "
);
let width = 0;
text = text.replace(emoji_regex_default(), (character) => {
width += isNarrowEmojiCharacter(character) ? 1 : 2;
return "";
});
for (const character of text) {

@@ -505,3 +576,3 @@ const codePoint = character.codePointAt(0);

}
var notAsciiRegex, narrowEmojisSet, get_string_width_default;
var notAsciiRegex, get_string_width_default;
var init_get_string_width = __esm({

@@ -511,5 +582,4 @@ "src/utilities/get-string-width.js"() {

init_get_east_asian_width();
init_narrow_emojis_evaluate();
notAsciiRegex = /[^\x20-\x7F]/u;
narrowEmojisSet = new Set(narrow_emojis_evaluate_default);
init_narrow_emojis();
notAsciiRegex = /[^\x20-\x7F]/;
get_string_width_default = getStringWidth;

@@ -563,3 +633,3 @@ }

getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2,
getPreferredQuote: () => get_preferred_quote_default,
getPreferredQuote: () => getPreferredQuote,
getStringWidth: () => get_string_width_default,

@@ -607,3 +677,3 @@ hasNewline: () => has_newline_default,

const otherQuote = enclosingQuote === '"' ? "'" : '"';
const regex = /\\(.)|(["'])/gsu;
const regex = /\\(.)|(["'])/gs;
const raw = method_replace_all_default(

@@ -624,3 +694,3 @@ /* OPTIONAL_OBJECT: false */

}
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped;
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(escaped) ? escaped : "\\" + escaped;
}

@@ -668,3 +738,3 @@ );

"src/main/version.evaluate.js"() {
version_evaluate_default = "3.8.5";
version_evaluate_default = "3.9.0";
}

@@ -671,0 +741,0 @@ });

@@ -491,3 +491,6 @@ // Copied from `@types/prettier`

options: ParserOptions<T>,
print: (path: AstPath<T>) => Doc,
print: (
selector?: string | number | Array<string | number> | AstPath<T>,
args?: unknown,
) => Doc,
args?: unknown,

@@ -498,3 +501,6 @@ ): Doc;

options: ParserOptions<T>,
print: (path: AstPath<T>) => Doc,
print: (
selector?: string | number | Array<string | number> | AstPath<T>,
args?: unknown,
) => Doc,
args?: unknown,

@@ -511,2 +517,3 @@ ): Doc;

selector?: string | number | Array<string | number> | AstPath,
args?: unknown,
) => Doc,

@@ -513,0 +520,0 @@ path: AstPath,

{
"name": "prettier",
"version": "3.8.5",
"version": "3.9.0",
"description": "Prettier is an opinionated code formatter",

@@ -25,2 +25,7 @@ "bin": "./bin/prettier.cjs",

"./*": "./*",
"./standalone": {
"types": "./standalone.d.ts",
"require": "./standalone.js",
"default": "./standalone.mjs"
},
"./doc": {

@@ -31,7 +36,2 @@ "types": "./doc.d.ts",

},
"./standalone": {
"types": "./standalone.d.ts",
"require": "./standalone.js",
"default": "./standalone.mjs"
},
"./plugins/estree": {

@@ -204,3 +204,7 @@ "types": "./plugins/estree.d.ts",

"sideEffects": false,
"type": "commonjs"
"type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}

@@ -1,28 +0,17 @@

(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ie=Object.defineProperty;var pt=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var ft=Object.prototype.hasOwnProperty;var me=(e,t)=>{for(var n in t)ie(e,n,{get:t[n],enumerable:!0})},ht=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of lt(t))!ft.call(e,r)&&r!==n&&ie(e,r,{get:()=>t[r],enumerable:!(i=pt(t,r))||i.enumerable});return e};var dt=e=>ht(ie({},"__esModule",{value:!0}),e);var cn={};me(cn,{languages:()=>je,options:()=>Xe,parsers:()=>de,printers:()=>an});var Ee=(e,t)=>(n,i,...r)=>n|1&&i==null?void 0:(t.call(i)??i[e]).apply(i,r);var mt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Et=Ee("replaceAll",function(){if(typeof this=="string")return mt}),U=Et;var Tt=()=>{},se=Tt;var Te="indent";var Ne="group";var xe="if-break";var G="line";var _e="break-parent";var S=se,Y=se;function x(e){return S(e),{type:Te,contents:e}}var ye={type:_e};function y(e,t={}){return S(e),Y(t.expandedStates,!0),{type:Ne,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return S(e),t!==""&&S(t),{type:xe,breakContents:e,flatContents:t,groupId:n.groupId}}function E(e,t){S(e),Y(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}var k={type:G},l={type:G,soft:!0},Nt={type:G,hard:!0},f=[Nt,ye];function j(e){return(t,n,i)=>{let r=!!i?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var Ln=j(/\s/u),$=j(" "),Ae=j(",; "),Oe=j(/[^\n\r]/u);var Ie=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function xt(e,t,n){let i=!!n?.backwards;if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
`)return t-2;if(Ie(r))return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
`)return t+2;if(Ie(r))return t+1}return t}var X=xt;function _t(e,t,n={}){let i=$(e,n.backwards?t-1:t,n),r=X(e,i,n);return i!==r}var De=_t;function yt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var ge=yt;function At(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Oe(e,t):t}var Se=At;function Ot(e,t){let n=null,i=t;for(;i!==n;)n=i,i=Ae(e,i),i=ge(e,i),i=$(e,i);return i=Se(e,i),i=X(e,i),i!==!1&&De(e,i)}var ke=Ot;function It(e){return Array.isArray(e)&&e.length>0}var oe=It;var ae=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},Ce=ae;var P=null;function w(e){if(P!==null&&typeof P.property){let t=P;return P=w.prototype=null,t}return P=w.prototype=e??Object.create(null),new w}var Dt=10;for(let e=0;e<=Dt;e++)w();function ce(e){return w(e)}function gt(e,t="type"){ce(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Re=gt;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},F=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ue={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Zn=new Set(Object.keys(ue));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var ve={...ue};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete ve[e];var be=ve;var St=Re(be,"kind"),Le=St;var J=e=>e.loc.start,q=e=>e.loc.end;var Pe="format",we=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,Fe=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;var Me=e=>Fe.test(e),Ve=e=>we.test(e),Be=e=>`# @${Pe}
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ae=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var xt=Object.prototype.hasOwnProperty;var ce=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},yt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Tt(t))!xt.call(e,i)&&i!==n&&ae(e,i,{get:()=>t[i],enumerable:!(r=Et(t,i))||r.enumerable});return e};var Nt=e=>yt(ae({},"__esModule",{value:!0}),e);var li={};ce(li,{languages:()=>$e,options:()=>He,parsers:()=>Ae,printers:()=>ui});var Ie=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);var Dt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},_t=Ie("replaceAll",function(){if(typeof this=="string")return Dt}),X=_t;var At=()=>{},pe=At;var ge="indent";var Se="group";var Oe="if-break";var H="line";var ve="break-parent";var O=pe,J=pe;function m(e){return O(e),{type:ge,contents:e}}var ue={type:ve};function N(e,t={}){return O(e),J(t.expandedStates,!0),{type:Se,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _(e,t="",n={}){return O(e),t!==""&&O(t),{type:Oe,breakContents:e,flatContents:t,groupId:n.groupId}}function d(e,t){O(e),J(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var S={type:H},u={type:H,soft:!0},It={type:H,hard:!0},l=[It,ue];function W(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,a=n;for(;a>=0&&a<s;){let p=t.charAt(a);if(e instanceof RegExp){if(!e.test(p))return a}else if(!e.includes(p))return a;i?a--:a++}return a===-1||a===s?a:!1}}var wi=W(/\s/),z=W(" "),ke=W(",; "),Ce=W(/[^\n\r]/);var Re=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function gt(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
`)return t-2;if(Re(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
`)return t+2;if(Re(i))return t+1}return t}var Z=gt;function St(e,t,n={}){let r=z(e,n.backwards?t-1:t,n),i=Z(e,r,n);return r!==i}var Le=St;var Ot=()=>!0;function vt(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function le(e,t,n={}){let{indent:r=!1,marker:i,filter:s=Ot}=n,a=new Set(e.node?.comments?.filter(x=>!(x.leading||x.trailing||x.marker!==i||!s(x))));if(a.size===0)return"";let p=e.map(({node:x})=>a.has(x)?vt(e,t):"","comments").filter(Boolean),E=d(l,p);return r?m([l,E]):E}function kt(e){return Array.isArray(e)&&e.length>0}var T=kt;var de=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},be=de;var K=null;function j(e){if(K!==null&&typeof K.property){let t=K;return K=j.prototype=null,t}return K=j.prototype=e??Object.create(null),new j}var Ct=10;for(let e=0;e<=Ct;e++)j();function fe(e){return j(e)}function Rt(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var Fe=Rt;var D=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],Pe={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:D[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:D[1],FragmentArgument:D[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:D[1],Directive:["name","arguments"],NamedType:D[0],ListType:D[2],NonNullType:D[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:D[2],ScalarTypeDefinition:D[3],ObjectTypeDefinition:D[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:D[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:D[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:D[5],ScalarTypeExtension:D[5],ObjectTypeExtension:D[6],InterfaceTypeExtension:D[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};var Lt=Fe(Pe,"kind"),we=Lt;var ee=e=>e.loc.start,te=e=>e.loc.end;function me(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}me.ignoredProperties=new Set(["loc","comments"]);var Ve="format",Me=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Ue=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;var Be=e=>Ue.test(e),Ge=e=>Me.test(e),Ke=e=>`# @${Ve}
${e}`;function kt(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var A=kt;function Ct(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[J(i)]!=="{",s=!!i.name;return[A(e,t,n),r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&oe(i.variableDefinitions)?" ":"",Ue(e,n),_(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Ue(e,n)," on ",n("typeCondition"),_(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",_(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=U(0,i.value,'"""','\\"""').split(`
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',U(0,U(0,i.value,/["\\]/gu,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([l,E([I("",", "),l],e.map(n,"values"))]),l,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,x([l,E([I("",", "),l],e.map(n,"fields"))]),l,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...bt(e,t,n)),s.push(_(e,n,i)),i.fields.length>0&&s.push([" {",x([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",": ",n("type"),_(e,n,i)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,i),i.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,i)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"SchemaExtension":return["extend schema",_(e,n,i),...i.operationTypes.length>0?[" {",x([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,i)," {",i.operationTypes.length>0?x([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,i),i.types.length>0?[" =",I(""," "),x([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ce(i,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(x([l,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&ke(t.originalText,q(s))?[a,f]:a},i)}function Rt(e){return e.kind!=="Comment"}function vt({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function bt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let p=s[u];r.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(p.loc.end,T.loc.start).includes("#");r.push(" &",D?k:" ")}}return r}function Ue(e,t){let{node:n}=e;return oe(n.variableDefinitions)?y(["(",x([l,E([I("",", "),l],e.map(t,"variableDefinitions"))]),l,")"]):""}function Ge(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}Ge.ignoredProperties=new Set(["loc","comments"]);function Lt(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Pt={print:Ct,massageAstNode:Ge,hasPrettierIgnore:Lt,insertPragma:Be,printComment:vt,canAttachComment:Rt,getVisitorKeys:Le},Ye=Pt;var je=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var $e={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var wt={bracketSpacing:$e.bracketSpacing},Xe=wt;var de={};me(de,{graphql:()=>on});function He(e){return typeof e=="object"&&e!==null}function Je(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Ft=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(Ft)){if(typeof r.index=="number"||Je(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Qe(e){return pe(e.source,M(e.source,e.start))}function pe(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,p=t.column+u,T=`${e.name}:${a}:${p}
`,d=i.split(/\r\n|[\n\r]/g),D=d[r];if(D.length>120){let O=Math.floor(p/80),re=p%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+qe([[`${a} |`,N[0]],...N.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(re)],["|",N[O+1]]])}return T+qe([[`${a-1} |`,d[r-1]],[`${a} |`,D],["|","^".padStart(p)],[`${a+1} |`,d[r+1]]])}function qe(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
`)}function Mt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Q=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:p,path:T,originalError:d,extensions:D}=Mt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=d??void 0,this.nodes=We(Array.isArray(a)?a:a?[a]:void 0);let O=We((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=p??O?.map(N=>N.start),this.locations=p&&u?p.map(N=>M(u,N)):O?.map(N=>M(N.source,N.start));let re=He(d?.extensions)?d?.extensions:void 0;this.extensions=(s=D??re)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
${e}`;function bt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var je=bt;function Ft(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Ce(e,t):t}var Ye=Ft;function Pt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=ke(e,r),r=je(e,r),r=z(e,r);return r=Ye(e,r),r=Z(e,r),r!==!1&&Le(e,r)}var qe=Pt;function I(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&qe(t.originalText,te(s))?[a,l]:a},r)}function he(e,t,n){let{node:r}=e;return T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):""}function A(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(S):i.push(l),i}function y(e,t){let{node:n}=e;if(!T(n.directives))return"";let r=d(S,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?N([S,r]):[" ",N(m([u,r]))]}function Ee(e,t){let{node:n}=e;return T(n.variableDefinitions)?N(["(",m([u,d([_("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function wt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...d(l,I(e,t,n,"definitions")),l];case"OperationDefinition":{let i=t.originalText[ee(r)]!=="{",s=!!r.name;return[A(e,t,n),i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&T(r.variableDefinitions)?" ":"",Ee(e,n),y(e,n),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Ee(e,n)," on ",n("typeCondition"),y(e,n)," ",n("selectionSet")];case"SelectionSet":return["{",m([l,d(l,I(e,t,n,"selections"))]),l,"}"];case"Field":return N([r.alias?[n("alias"),": "]:"",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=X(0,r.value,'"""','\\"""').split(`
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),d(l,['"""',...i,'"""'])}return['"',X(0,X(0,r.value,/["\\]/g,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":{let i=!T(r.values);return N(["[",le(e,t,{indent:!0}),i?"":m([u,d([_("",", "),u],e.map(n,"values"))]),u,"]"])}case"ObjectValue":{let i=!T(r.fields),s=t.bracketSpacing&&!i?" ":"";return N(["{",s,le(e,t,{indent:!0}),i?"":[m([u,d([_("",", "),u],e.map(n,"fields"))])],u,_("",s),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),he(e,t,n)];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&T(r.interfaces)&&s.push(" implements ",m([N([d([" &",S],e.map(n,"interfaces"))])])),s.push(y(e,n)),T(r.fields)&&s.push([" {",m([l,d(l,I(e,t,n,"fields"))]),l,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",": ",n("type"),y(e,n)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.repeatable?" repeatable":""," on ",...d(" | ",e.map(n,"locations"))];case"DirectiveExtension":return["extend directive @",n("name"),y(e,n)];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n),T(r.values)?[" {",m([l,d(l,I(e,t,n,"values"))]),l,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),y(e,n)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"SchemaExtension":return["extend schema",y(e,n),...T(r.operationTypes)?[" {",m([l,d(l,I(e,t,n,"operationTypes"))]),l,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",y(e,n)," {",T(r.operationTypes)?m([l,d(l,I(e,t,n,"operationTypes"))]):"",l,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),he(e,t,n),y(e,n)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",y(e,n)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return N([A(e,t,n),N([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n),T(r.types)?[" =",_(""," "),m([_([S,"| "]),d([S,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new be(r,"Graphql","kind")}}function Vt(e){return e.kind!=="Comment"}function Mt({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function Ut(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Bt={print:wt,massageAstNode:me,hasPrettierIgnore:Ut,insertPragma:Ke,printComment:Mt,canAttachComment:Vt,getVisitorKeys:we},Qe=Bt;var $e=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var Xe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Gt={bracketSpacing:Xe.bracketSpacing},He=Gt;var Ae={};ce(Ae,{graphql:()=>pi});function Kt(e,t){return e?.__kind===t}var Je=Kt;function We(e){return typeof e=="object"&&e!==null}function ze(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var jt=/\r\n|[\n\r]/g;function w(e,t){let n=0,r=1;for(let i of e.body.matchAll(jt)){if(typeof i.index!="number"&&ze(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Te(e){return ne(e.source,w(e.source,e.start))}function ne(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,p=t.line===1?n:0,E=t.column+p,x=`${e.name}:${a}:${E}
`,v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){let $=Math.floor(E/80),G=E%80,k=[];for(let C=0;C<P.length;C+=80)k.push(P.slice(C,C+80));return x+Ze([[`${a} |`,k[0]],...k.slice(1,$+1).map(C=>["|",C]),["|","^".padStart(G)],["|",k[$+1]]])}return x+Ze([[`${a-1} |`,v[i-1]],[`${a} |`,P],["|","^".padStart(E)],[`${a+1} |`,v[i+1]]])}function Ze(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
`)}var R=class e extends Error{constructor(t,n={}){let{nodes:r,source:i,positions:s,path:a,originalError:p,cause:E,extensions:x}=n,v="cause"in n,P=v?E:p,$=v||p!=null?{cause:P}:void 0;super(t,$),this.name="GraphQLError",this.path=a??void 0;let G=p??(E instanceof Error?E:void 0);this.originalError=G,this.nodes=et(Array.isArray(r)?r:r?[r]:void 0);let k=et(this.nodes?.map(g=>g.loc).filter(g=>g!=null));this.source=i??k?.[0]?.source,this.positions=s??k?.map(g=>g.start),this.locations=s&&i?s.map(g=>w(i,g)):k?.map(g=>w(g.source,g.start));let C=We(G?.extensions)?G.extensions:void 0;this.extensions=x??C??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p?.stack!=null?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
`+Qe(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
`+Te(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
`+pe(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function We(e){return e===void 0||e.length===0?void 0:e}function h(e,t,n){return new Q(`Syntax Error: ${n}`,{source:e,positions:[t]})}var W;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(W||(W={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(c||(c={}));function ze(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function Ke(e){return e>=97&&e<=122||e>=65&&e<=90}function le(e){return Ke(e)||e===95}function Ze(e){return Ke(e)||b(e)||e===95}function et(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],p=Vt(u);p!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Vt(e){let t=0;for(;t<e.length&&ze(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new F(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Bt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function nt(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function L(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return rt(e.charCodeAt(t))&&it(e.charCodeAt(t+1))}function rt(e){return e>=55296&&e<=56319}function it(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new F(t,n,i,s,a,r)}function Bt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return Ut(e,r);case 33:return m(e,o.BANG,r,r+1);case 36:return m(e,o.DOLLAR,r,r+1);case 38:return m(e,o.AMP,r,r+1);case 40:return m(e,o.PAREN_L,r,r+1);case 41:return m(e,o.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return m(e,o.SPREAD,r,r+3);break;case 58:return m(e,o.COLON,r,r+1);case 61:return m(e,o.EQUALS,r,r+1);case 64:return m(e,o.AT,r,r+1);case 91:return m(e,o.BRACKET_L,r,r+1);case 93:return m(e,o.BRACKET_R,r,r+1);case 123:return m(e,o.BRACE_L,r,r+1);case 124:return m(e,o.PIPE,r,r+1);case 125:return m(e,o.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?Ht(e,r):Yt(e,r)}if(b(s)||s===45)return Gt(e,r,s);if(le(s))return Jt(e,r);throw h(e.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:L(s)||K(n,r)?`Unexpected character: ${R(e,r)}.`:`Invalid character: ${R(e,r)}.`)}return m(e,o.EOF,i,i)}function Ut(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(s===10||s===13)break;if(L(s))++r;else if(K(n,r))r+=2;else break}return m(e,o.COMMENT,t,r,n.slice(t+1,r))}function Gt(e,t,n){let i=e.source.body,r=t,s=n,a=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),b(s))throw h(e.source,r,`Invalid number, unexpected digit after 0: ${R(e,r)}.`)}else r=fe(e,r,s),s=i.charCodeAt(r);if(s===46&&(a=!0,s=i.charCodeAt(++r),r=fe(e,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(a=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=fe(e,r,s),s=i.charCodeAt(r)),s===46||le(s))throw h(e.source,r,`Invalid number, expected digit but got: ${R(e,r)}.`);return m(e,a?o.FLOAT:o.INT,t,r,i.slice(t,r))}function fe(e,t,n){if(!b(n))throw h(e.source,t,`Invalid number, expected digit but got: ${R(e,t)}.`);let i=e.source.body,r=t+1;for(;b(i.charCodeAt(r));)++r;return r}function Yt(e,t){let n=e.source.body,i=n.length,r=t+1,s=r,a="";for(;r<i;){let u=n.charCodeAt(r);if(u===34)return a+=n.slice(s,r),m(e,o.STRING,t,r+1,a);if(u===92){a+=n.slice(s,r);let p=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?jt(e,r):$t(e,r):Xt(e,r);a+=p.value,r+=p.size,s=r;continue}if(u===10||u===13)break;if(L(u))++r;else if(K(n,r))r+=2;else throw h(e.source,r,`Invalid character within String: ${R(e,r)}.`)}throw h(e.source,r,"Unterminated string.")}function jt(e,t){let n=e.source.body,i=0,r=3;for(;r<12;){let s=n.charCodeAt(t+r++);if(s===125){if(r<5||!L(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|V(s),i<0)break}throw h(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+r)}".`)}function $t(e,t){let n=e.source.body,i=tt(n,t+2);if(L(i))return{value:String.fromCodePoint(i),size:6};if(rt(i)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let r=tt(n,t+8);if(it(r))return{value:String.fromCodePoint(i,r),size:12}}throw h(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function tt(e,t){return V(e.charCodeAt(t))<<12|V(e.charCodeAt(t+1))<<8|V(e.charCodeAt(t+2))<<4|V(e.charCodeAt(t+3))}function V(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Xt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw h(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ht(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",p=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),p.push(u);let d=m(e,o.BLOCK_STRING,t,s+3,et(p).join(`
`));return e.line+=p.length-1,e.lineStart=r,d}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),p.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(L(T))++s;else if(K(n,s))s+=2;else throw h(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw h(e.source,s,"Unterminated string.")}function Jt(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(Ze(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return qt(e,t);default:return String(e)}}function qt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Qt(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:te(i,n)}else if(Array.isArray(e))return zt(e,n);return Wt(e,n)}function Qt(e){return typeof e.toJSON=="function"}function Wt(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+Kt(e)+"]":"{ "+n.map(([r,s])=>r+": "+te(s,t)).join(", ")+" }"}function zt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(te(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function Kt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Zt=globalThis.process&&!0,st=Zt?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ee(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};var B=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ot(e){return st(e,B)}function at(e,t){let n=new he(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var he=class{constructor(t,n={}){let{lexer:i,...r}=n;if(i)this._lexer=i;else{let s=ot(t)?t:new B(t);this._lexer=new z(s)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.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()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:i,description:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let i=this._lexer.token.value;throw h(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(o.COLON);let r=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw h(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(W,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(o.AT),i=this.parseName(),r;!n&&this.expectOptionalToken(o.DOT)&&(r=this.parseName());let s;return(n||r)&&this.expectOptionalToken(o.PAREN_L)&&(s=this.parseName(),this.expectToken(o.COLON),this.expectToken(o.PAREN_R)),n?s?this.node(t,{kind:c.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:s}):this.node(t,{kind:c.DIRECTIVE_COORDINATE,name:i}):r?s?this.node(t,{kind:c.ARGUMENT_COORDINATE,name:i,fieldName:r,argumentName:s}):this.node(t,{kind:c.MEMBER_COORDINATE,name:i,memberName:r}):this.node(t,{kind:c.TYPE_COORDINATE,name:i})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new H(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw h(this._lexer.source,n.start,`Expected ${ct(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw h(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return h(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,i){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(t,n,i){if(this.expectOptionalToken(t)){let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(t,n,i){this.expectToken(t);let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(t,n){this.expectOptionalToken(t);let i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw h(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return ct(e.kind)+(t!=null?` "${t}"`:"")}function ct(e){return nt(e)?`"${e}"`:e}function en(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var ut=en;function tn(e){let t=[],{startToken:n,endToken:i}=e.loc;for(let r=n;r!==i;r=r.next)r.kind==="Comment"&&t.push({...r,loc:{start:r.start,end:r.end}});return t}var nn={allowLegacyFragmentVariables:!0};function rn(e){if(e?.name==="GraphQLError"){let{message:t,locations:[n]}=e;return ut(t,{loc:{start:n},cause:e})}return e}function sn(e){let t;try{t=at(e,nn)}catch(n){throw rn(n)}return t.comments=tn(t),t}var on={parse:sn,astFormat:"graphql",hasPragma:Me,hasIgnorePragma:Ve,locStart:J,locEnd:q};var an={graphql:Ye};return dt(cn);});
`+ne(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function et(e){return e===void 0||e.length===0?void 0:e}var Yt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),tt=Yt;var Y=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};var M={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"};var c={};ce(c,{ARGUMENT:()=>Wt,ARGUMENT_COORDINATE:()=>Un,BOOLEAN:()=>an,DIRECTIVE:()=>fn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Gn,DIRECTIVE_COORDINATE:()=>Bn,DIRECTIVE_DEFINITION:()=>vn,DIRECTIVE_EXTENSION:()=>Cn,DOCUMENT:()=>Qt,ENUM:()=>pn,ENUM_TYPE_DEFINITION:()=>gn,ENUM_TYPE_EXTENSION:()=>Pn,ENUM_VALUE_DEFINITION:()=>Sn,FIELD:()=>Jt,FIELD_DEFINITION:()=>Dn,FLOAT:()=>sn,FRAGMENT_ARGUMENT:()=>zt,FRAGMENT_DEFINITION:()=>tn,FRAGMENT_SPREAD:()=>Zt,INLINE_FRAGMENT:()=>en,INPUT_OBJECT_TYPE_DEFINITION:()=>On,INPUT_OBJECT_TYPE_EXTENSION:()=>wn,INPUT_VALUE_DEFINITION:()=>_n,INT:()=>rn,INTERFACE_TYPE_DEFINITION:()=>An,INTERFACE_TYPE_EXTENSION:()=>bn,LIST:()=>un,LIST_TYPE:()=>hn,MEMBER_COORDINATE:()=>Mn,NAME:()=>qt,NAMED_TYPE:()=>mn,NON_NULL_TYPE:()=>En,NULL:()=>cn,OBJECT:()=>ln,OBJECT_FIELD:()=>dn,OBJECT_TYPE_DEFINITION:()=>Nn,OBJECT_TYPE_EXTENSION:()=>Ln,OPERATION_DEFINITION:()=>$t,OPERATION_TYPE_DEFINITION:()=>xn,SCALAR_TYPE_DEFINITION:()=>yn,SCALAR_TYPE_EXTENSION:()=>Rn,SCHEMA_DEFINITION:()=>Tn,SCHEMA_EXTENSION:()=>kn,SELECTION_SET:()=>Ht,STRING:()=>on,TYPE_COORDINATE:()=>Vn,UNION_TYPE_DEFINITION:()=>In,UNION_TYPE_EXTENSION:()=>Fn,VARIABLE:()=>nn,VARIABLE_DEFINITION:()=>Xt});var qt="Name",Qt="Document",$t="OperationDefinition",Xt="VariableDefinition",Ht="SelectionSet",Jt="Field",Wt="Argument",zt="FragmentArgument",Zt="FragmentSpread",en="InlineFragment",tn="FragmentDefinition",nn="Variable",rn="IntValue",sn="FloatValue",on="StringValue",an="BooleanValue",cn="NullValue",pn="EnumValue",un="ListValue",ln="ObjectValue",dn="ObjectField",fn="Directive",mn="NamedType",hn="ListType",En="NonNullType",Tn="SchemaDefinition",xn="OperationTypeDefinition",yn="ScalarTypeDefinition",Nn="ObjectTypeDefinition",Dn="FieldDefinition",_n="InputValueDefinition",An="InterfaceTypeDefinition",In="UnionTypeDefinition",gn="EnumTypeDefinition",Sn="EnumValueDefinition",On="InputObjectTypeDefinition",vn="DirectiveDefinition",kn="SchemaExtension",Cn="DirectiveExtension",Rn="ScalarTypeExtension",Ln="ObjectTypeExtension",bn="InterfaceTypeExtension",Fn="UnionTypeExtension",Pn="EnumTypeExtension",wn="InputObjectTypeExtension",Vn="TypeCoordinate",Mn="MemberCoordinate",Un="ArgumentCoordinate",Bn="DirectiveCoordinate",Gn="DirectiveArgumentCoordinate";function xe(e,t){if(!e)throw new Error(t)}function nt(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function it(e){return e>=97&&e<=122||e>=65&&e<=90}function ye(e){return it(e)||e===95}function rt(e){return it(e)||L(e)||e===95}function st(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){let s=e[i],a=Kn(s);a!==s.length&&(n??(n=i),r=i,i!==0&&a<t&&(t=a))}return e.map((i,s)=>s===0?i:i.slice(t)).slice(n??0,r+1)}function Kn(e){let t=0;for(;t<e.length&&nt(e.charCodeAt(t));)++t;return t}var Ne={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_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",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function f(e,t,n){return new R(`Syntax Error: ${n}`,{source:e,positions:[t]})}function jn(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var b=jn(),De=b?.tracingChannel("graphql:parse"),Ts=b?.tracingChannel("graphql:validate"),xs=b?.tracingChannel("graphql:execute"),ys=b?.tracingChannel("graphql:execute:variableCoercion"),Ns=b?.tracingChannel("graphql:execute:rootSelectionSet"),Ds=b?.tracingChannel("graphql:subscribe"),_s=b?.tracingChannel("graphql:resolve"),Yn=["start","end","asyncStart","asyncEnd","error"];function ot(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==void 0)return t;for(let n of Yn)if(e[n].hasSubscribers)return!0;return!1}var o={SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",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"};var Q=class{constructor(t){let n=new V(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=qn(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function ct(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function U(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function re(e,t){return pt(e.charCodeAt(t))&&ut(e.charCodeAt(t+1))}function pt(e){return e>=55296&&e<=56319}function ut(e){return e>=56320&&e<=57343}function F(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function h(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function qn(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Qn(e,i);case 33:return h(e,o.BANG,i,i+1);case 36:return h(e,o.DOLLAR,i,i+1);case 38:return h(e,o.AMP,i,i+1);case 40:return h(e,o.PAREN_L,i,i+1);case 41:return h(e,o.PAREN_R,i,i+1);case 46:{let a=n.charCodeAt(i+1);if(a===46&&n.charCodeAt(i+2)===46)return h(e,o.SPREAD,i,i+3);if(a===46)throw f(e.source,i,'Unexpected "..", did you mean "..."?');if(L(a)){let p=e.source.body.slice(i+1,ie(e,i+1,a));throw f(e.source,i,`Invalid number, expected digit before ".", did you mean "0.${p}"?`)}break}case 58:return h(e,o.COLON,i,i+1);case 61:return h(e,o.EQUALS,i,i+1);case 64:return h(e,o.AT,i,i+1);case 91:return h(e,o.BRACKET_L,i,i+1);case 93:return h(e,o.BRACKET_R,i,i+1);case 123:return h(e,o.BRACE_L,i,i+1);case 124:return h(e,o.PIPE,i,i+1);case 125:return h(e,o.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?zn(e,i):Xn(e,i)}if(L(s)||s===45)return $n(e,i,s);if(ye(s))return Zn(e,i);throw f(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:U(s)||re(n,i)?`Unexpected character: ${F(e,i)}.`:`Invalid character: ${F(e,i)}.`)}return h(e,o.EOF,r,r)}function Qn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(U(s))++i;else if(re(n,i))i+=2;else break}return h(e,o.COMMENT,t,i,n.slice(t+1,i))}function $n(e,t,n){let r=e.source.body,i=t,s=n,a=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),L(s))throw f(e.source,i,`Invalid number, unexpected digit after 0: ${F(e,i)}.`)}else i=ie(e,i,s),s=r.charCodeAt(i);if(s===46&&(a=!0,s=r.charCodeAt(++i),i=ie(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=ie(e,i,s),s=r.charCodeAt(i)),s===46||ye(s))throw f(e.source,i,`Invalid number, expected digit but got: ${F(e,i)}.`);return h(e,a?o.FLOAT:o.INT,t,i,r.slice(t,i))}function ie(e,t,n){if(!L(n))throw f(e.source,t,`Invalid number, expected digit but got: ${F(e,t)}.`);let r=e.source.body,i=t+1;for(;L(r.charCodeAt(i));)++i;return i}function Xn(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,a="";for(;i<r;){let p=n.charCodeAt(i);if(p===34)return a+=n.slice(s,i),h(e,o.STRING,t,i+1,a);if(p===92){a+=n.slice(s,i);let E=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Hn(e,i):Jn(e,i):Wn(e,i);a+=E.value,i+=E.size,s=i;continue}if(p===10||p===13)break;if(U(p))++i;else if(re(n,i))i+=2;else throw f(e.source,i,`Invalid character within String: ${F(e,i)}.`)}throw f(e.source,i,"Unterminated string.")}function Hn(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!U(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|q(s),r<0)break}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Jn(e,t){let n=e.source.body,r=at(n,t+2);if(U(r))return{value:String.fromCodePoint(r),size:6};if(pt(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=at(n,t+8);if(ut(i))return{value:String.fromCodePoint(r,i),size:12}}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function at(e,t){return q(e.charCodeAt(t))<<12|q(e.charCodeAt(t+1))<<8|q(e.charCodeAt(t+2))<<4|q(e.charCodeAt(t+3))}function q(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Wn(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function zn(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,p="",E=[];for(;s<r;){let x=n.charCodeAt(s);if(x===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){p+=n.slice(a,s),E.push(p);let v=h(e,o.BLOCK_STRING,t,s+3,st(E).join(`
`));return e.line+=E.length-1,e.lineStart=i,v}if(x===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){p+=n.slice(a,s),a=s+1,s+=4;continue}if(x===10||x===13){p+=n.slice(a,s),E.push(p),x===13&&n.charCodeAt(s+1)===10?s+=2:++s,p="",a=s,i=s;continue}if(U(x))++s;else if(re(n,s))s+=2;else throw f(e.source,s,`Invalid character within String: ${F(e,s)}.`)}throw f(e.source,s,"Unterminated string.")}function Zn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(rt(s))++i;else break}return h(e,o.NAME,t,i,n.slice(t,i))}var lt=Symbol("Source"),B=class{constructor(t,n="GraphQL request",r={line:1,column:1}){this.__kind=lt,this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||xe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||xe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function dt(e){return Je(e,lt,B)}function oe(e,t){return ot(De)?De.traceSync(()=>ft(e,t),{source:e}):ft(e,t)}function ft(e,t){let n=new _e(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var _e=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else{let s=dt(t)?t:new B(t);this._lexer=new Q(s)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.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()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:M.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return M.QUERY;case"mutation":return M.MUTATION;case"subscription":return M.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseFragmentArguments(){let t=this.parseFragmentArgument;return this.optionalMany(o.PAREN_L,t,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let t=this._lexer.token,n=this.parseName();return this.expectToken(o.COLON),this.node(t,{kind:c.FRAGMENT_ARGUMENT,name:n,value:this.parseValueLiteral(!1)})}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");if(!n&&this.peek(o.NAME)){let r=this.parseFragmentName();return this.peek(o.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(t,{kind:c.FRAGMENT_SPREAD,name:r,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.FRAGMENT_SPREAD,name:r,directives:this.parseDirectives(!1)})}return this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw f(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));if(n.length)return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw f(this._lexer.source,this._lexer.token.start,`${se(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n===void 0&&r===void 0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(o.AT);let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:c.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.parseConstDirectives(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let p=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:s,repeatable:a,locations:p})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(tt(Ne,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(o.AT),r=this.parseName(),i;!n&&this.expectOptionalToken(o.DOT)&&(i=this.parseName());let s;return(n||i)&&this.expectOptionalToken(o.PAREN_L)&&(s=this.parseName(),this.expectToken(o.COLON),this.expectToken(o.PAREN_R)),n?s?this.node(t,{kind:c.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:s}):this.node(t,{kind:c.DIRECTIVE_COORDINATE,name:r}):i?s?this.node(t,{kind:c.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:s}):this.node(t,{kind:c.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:c.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Y(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw f(this._lexer.source,n.start,`Expected ${mt(t)}, found ${se(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw f(this._lexer.source,n.start,`Expected "${t}", found ${se(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return f(this._lexer.source,n.start,`Unexpected ${se(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw f(this._lexer.source,n.start,`Document contains more than ${t} tokens. Parsing aborted.`)}};function se(e){let t=e.value;return mt(e.kind)+(t!=null?` "${t}"`:"")}function mt(e){return ct(e)?`"${e}"`:e}function ri(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var ht=ri;function si(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var oi={experimentalFragmentArguments:!0};function ai(e){if(!(e instanceof R))return e;let{message:t,locations:[n]}=e;return ht(t,{loc:{start:n},cause:e})}function ci(e){let t;try{t=oe(e,oi)}catch(n){throw ai(n)}return t.comments=si(t),t}var pi={parse:ci,astFormat:"graphql",hasPragma:Be,hasIgnorePragma:Ge,locStart:ee,locEnd:te};var ui={graphql:Qe};return Nt(li);});

@@ -1,28 +0,17 @@

var pt=Object.defineProperty;var de=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})};var ut={};de(ut,{languages:()=>Ye,options:()=>$e,parsers:()=>he,printers:()=>nn});var me=(e,t)=>(n,i,...r)=>n|1&&i==null?void 0:(t.call(i)??i[e]).apply(i,r);var lt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ft=me("replaceAll",function(){if(typeof this=="string")return lt}),U=ft;var ht=()=>{},ie=ht;var Ee="indent";var Te="group";var Ne="if-break";var G="line";var xe="break-parent";var S=ie,Y=ie;function x(e){return S(e),{type:Ee,contents:e}}var _e={type:xe};function y(e,t={}){return S(e),Y(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function I(e,t="",n={}){return S(e),t!==""&&S(t),{type:Ne,breakContents:e,flatContents:t,groupId:n.groupId}}function E(e,t){S(e),Y(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}var k={type:G},l={type:G,soft:!0},dt={type:G,hard:!0},f=[dt,_e];function j(e){return(t,n,i)=>{let r=!!i?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var kn=j(/\s/u),$=j(" "),ye=j(",; "),Ae=j(/[^\n\r]/u);var Oe=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function mt(e,t,n){let i=!!n?.backwards;if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===`
`)return t-2;if(Oe(r))return t-1}else{if(r==="\r"&&e.charAt(t+1)===`
`)return t+2;if(Oe(r))return t+1}return t}var X=mt;function Et(e,t,n={}){let i=$(e,n.backwards?t-1:t,n),r=X(e,i,n);return i!==r}var Ie=Et;function Tt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var De=Tt;function Nt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Ae(e,t):t}var ge=Nt;function xt(e,t){let n=null,i=t;for(;i!==n;)n=i,i=ye(e,i),i=De(e,i),i=$(e,i);return i=ge(e,i),i=X(e,i),i!==!1&&Ie(e,i)}var Se=xt;function _t(e){return Array.isArray(e)&&e.length>0}var se=_t;var oe=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},ke=oe;var P=null;function w(e){if(P!==null&&typeof P.property){let t=P;return P=w.prototype=null,t}return P=w.prototype=e??Object.create(null),new w}var yt=10;for(let e=0;e<=yt;e++)w();function ae(e){return w(e)}function At(e,t="type"){ae(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ce=At;var H=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},F=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ce={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},qn=new Set(Object.keys(ce));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var Re={...ce};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete Re[e];var ve=Re;var Ot=Ce(ve,"kind"),be=Ot;var J=e=>e.loc.start,q=e=>e.loc.end;var Le="format",Pe=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,we=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;var Fe=e=>we.test(e),Me=e=>Pe.test(e),Ve=e=>`# @${Le}
var Et=Object.defineProperty;var ae=(e,t)=>{for(var n in t)Et(e,n,{get:t[n],enumerable:!0})};var ht={};ae(ht,{languages:()=>Qe,options:()=>Xe,parsers:()=>_e,printers:()=>oi});var Ae=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);var Tt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},xt=Ae("replaceAll",function(){if(typeof this=="string")return Tt}),X=xt;var yt=()=>{},ce=yt;var Ie="indent";var ge="group";var Se="if-break";var H="line";var Oe="break-parent";var O=ce,J=ce;function m(e){return O(e),{type:Ie,contents:e}}var pe={type:Oe};function N(e,t={}){return O(e),J(t.expandedStates,!0),{type:ge,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _(e,t="",n={}){return O(e),t!==""&&O(t),{type:Se,breakContents:e,flatContents:t,groupId:n.groupId}}function d(e,t){O(e),J(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var S={type:H},u={type:H,soft:!0},Nt={type:H,hard:!0},l=[Nt,pe];function W(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,a=n;for(;a>=0&&a<s;){let p=t.charAt(a);if(e instanceof RegExp){if(!e.test(p))return a}else if(!e.includes(p))return a;i?a--:a++}return a===-1||a===s?a:!1}}var Ri=W(/\s/),z=W(" "),ve=W(",; "),ke=W(/[^\n\r]/);var Ce=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function Dt(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
`)return t-2;if(Ce(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
`)return t+2;if(Ce(i))return t+1}return t}var Z=Dt;function _t(e,t,n={}){let r=z(e,n.backwards?t-1:t,n),i=Z(e,r,n);return r!==i}var Re=_t;var At=()=>!0;function It(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function ue(e,t,n={}){let{indent:r=!1,marker:i,filter:s=At}=n,a=new Set(e.node?.comments?.filter(x=>!(x.leading||x.trailing||x.marker!==i||!s(x))));if(a.size===0)return"";let p=e.map(({node:x})=>a.has(x)?It(e,t):"","comments").filter(Boolean),E=d(l,p);return r?m([l,E]):E}function gt(e){return Array.isArray(e)&&e.length>0}var T=gt;var le=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Le=le;var K=null;function j(e){if(K!==null&&typeof K.property){let t=K;return K=j.prototype=null,t}return K=j.prototype=e??Object.create(null),new j}var St=10;for(let e=0;e<=St;e++)j();function de(e){return j(e)}function Ot(e,t="type"){de(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var be=Ot;var D=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],Fe={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:D[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:D[1],FragmentArgument:D[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:D[1],Directive:["name","arguments"],NamedType:D[0],ListType:D[2],NonNullType:D[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:D[2],ScalarTypeDefinition:D[3],ObjectTypeDefinition:D[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:D[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:D[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:D[5],ScalarTypeExtension:D[5],ObjectTypeExtension:D[6],InterfaceTypeExtension:D[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};var vt=be(Fe,"kind"),Pe=vt;var ee=e=>e.loc.start,te=e=>e.loc.end;function fe(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}fe.ignoredProperties=new Set(["loc","comments"]);var we="format",Ve=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Me=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;var Ue=e=>Me.test(e),Be=e=>Ve.test(e),Ge=e=>`# @${we}
${e}`;function It(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(k):r.push(f),r}var A=It;function Dt(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let r=t.originalText[J(i)]!=="{",s=!!i.name;return[A(e,t,n),r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&se(i.variableDefinitions)?" ":"",Be(e,n),_(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Be(e,n)," on ",n("typeCondition"),_(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",_(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=U(0,i.value,'"""','\\"""').split(`
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),E(f,['"""',...r,'"""'])}return['"',U(0,U(0,i.value,/["\\]/gu,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([l,E([I("",", "),l],e.map(n,"values"))]),l,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return y(["{",r,x([l,E([I("",", "),l],e.map(n,"fields"))]),l,I("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...kt(e,t,n)),s.push(_(e,n,i)),i.fields.length>0&&s.push([" {",x([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",": ",n("type"),_(e,n,i)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),i.arguments.length>0?y(["(",x([l,E([I("",", "),l],g(e,t,n,"arguments"))]),l,")"]):"",i.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,i),i.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,i)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,i)];case"SchemaExtension":return["extend schema",_(e,n,i),...i.operationTypes.length>0?[" {",x([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,i)," {",i.operationTypes.length>0?x([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,t,n),y([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,i),i.types.length>0?[" =",I(""," "),x([I([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new ke(i,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let i=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,i]):[" ",y(x([l,i]))]}function g(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&Se(t.originalText,q(s))?[a,f]:a},i)}function gt(e){return e.kind!=="Comment"}function St({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function kt(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let p=s[u];r.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(p.loc.end,T.loc.start).includes("#");r.push(" &",D?k:" ")}}return r}function Be(e,t){let{node:n}=e;return se(n.variableDefinitions)?y(["(",x([l,E([I("",", "),l],e.map(t,"variableDefinitions"))]),l,")"]):""}function Ue(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}Ue.ignoredProperties=new Set(["loc","comments"]);function Ct(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Rt={print:Dt,massageAstNode:Ue,hasPrettierIgnore:Ct,insertPragma:Ve,printComment:St,canAttachComment:gt,getVisitorKeys:be},Ge=Rt;var Ye=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var je={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var vt={bracketSpacing:je.bracketSpacing},$e=vt;var he={};de(he,{graphql:()=>tn});function Xe(e){return typeof e=="object"&&e!==null}function He(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var bt=/\r\n|[\n\r]/g;function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(bt)){if(typeof r.index=="number"||He(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function qe(e){return ue(e.source,M(e.source,e.start))}function ue(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,p=t.column+u,T=`${e.name}:${a}:${p}
`,d=i.split(/\r\n|[\n\r]/g),D=d[r];if(D.length>120){let O=Math.floor(p/80),re=p%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+Je([[`${a} |`,N[0]],...N.slice(1,O+1).map(v=>["|",v]),["|","^".padStart(re)],["|",N[O+1]]])}return T+Je([[`${a-1} |`,d[r-1]],[`${a} |`,D],["|","^".padStart(p)],[`${a+1} |`,d[r+1]]])}function Je(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
`)}function Lt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var Q=class e extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:p,path:T,originalError:d,extensions:D}=Lt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=d??void 0,this.nodes=Qe(Array.isArray(a)?a:a?[a]:void 0);let O=Qe((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=p??O?.map(N=>N.start),this.locations=p&&u?p.map(N=>M(u,N)):O?.map(N=>M(N.source,N.start));let re=Xe(d?.extensions)?d?.extensions:void 0;this.extensions=(s=D??re)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
${e}`;function kt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Ke=kt;function Ct(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ke(e,t):t}var je=Ct;function Rt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=ve(e,r),r=Ke(e,r),r=z(e,r);return r=je(e,r),r=Z(e,r),r!==!1&&Re(e,r)}var Ye=Rt;function I(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&Ye(t.originalText,te(s))?[a,l]:a},r)}function me(e,t,n){let{node:r}=e;return T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):""}function A(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(S):i.push(l),i}function y(e,t){let{node:n}=e;if(!T(n.directives))return"";let r=d(S,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?N([S,r]):[" ",N(m([u,r]))]}function he(e,t){let{node:n}=e;return T(n.variableDefinitions)?N(["(",m([u,d([_("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function Lt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...d(l,I(e,t,n,"definitions")),l];case"OperationDefinition":{let i=t.originalText[ee(r)]!=="{",s=!!r.name;return[A(e,t,n),i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&T(r.variableDefinitions)?" ":"",he(e,n),y(e,n),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),he(e,n)," on ",n("typeCondition"),y(e,n)," ",n("selectionSet")];case"SelectionSet":return["{",m([l,d(l,I(e,t,n,"selections"))]),l,"}"];case"Field":return N([r.alias?[n("alias"),": "]:"",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=X(0,r.value,'"""','\\"""').split(`
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),d(l,['"""',...i,'"""'])}return['"',X(0,X(0,r.value,/["\\]/g,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":{let i=!T(r.values);return N(["[",ue(e,t,{indent:!0}),i?"":m([u,d([_("",", "),u],e.map(n,"values"))]),u,"]"])}case"ObjectValue":{let i=!T(r.fields),s=t.bracketSpacing&&!i?" ":"";return N(["{",s,ue(e,t,{indent:!0}),i?"":[m([u,d([_("",", "),u],e.map(n,"fields"))])],u,_("",s),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),me(e,t,n)];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&T(r.interfaces)&&s.push(" implements ",m([N([d([" &",S],e.map(n,"interfaces"))])])),s.push(y(e,n)),T(r.fields)&&s.push([" {",m([l,d(l,I(e,t,n,"fields"))]),l,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",": ",n("type"),y(e,n)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.repeatable?" repeatable":""," on ",...d(" | ",e.map(n,"locations"))];case"DirectiveExtension":return["extend directive @",n("name"),y(e,n)];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n),T(r.values)?[" {",m([l,d(l,I(e,t,n,"values"))]),l,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),y(e,n)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"SchemaExtension":return["extend schema",y(e,n),...T(r.operationTypes)?[" {",m([l,d(l,I(e,t,n,"operationTypes"))]),l,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",y(e,n)," {",T(r.operationTypes)?m([l,d(l,I(e,t,n,"operationTypes"))]):"",l,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),me(e,t,n),y(e,n)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",y(e,n)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return N([A(e,t,n),N([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n),T(r.types)?[" =",_(""," "),m([_([S,"| "]),d([S,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Le(r,"Graphql","kind")}}function bt(e){return e.kind!=="Comment"}function Ft({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function Pt(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var wt={print:Lt,massageAstNode:fe,hasPrettierIgnore:Pt,insertPragma:Ge,printComment:Ft,canAttachComment:bt,getVisitorKeys:Pe},qe=wt;var Qe=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var $e={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:$e.bracketSpacing},Xe=Vt;var _e={};ae(_e,{graphql:()=>si});function Mt(e,t){return e?.__kind===t}var He=Mt;function Je(e){return typeof e=="object"&&e!==null}function We(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}var Ut=/\r\n|[\n\r]/g;function w(e,t){let n=0,r=1;for(let i of e.body.matchAll(Ut)){if(typeof i.index!="number"&&We(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ee(e){return ne(e.source,w(e.source,e.start))}function ne(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,p=t.line===1?n:0,E=t.column+p,x=`${e.name}:${a}:${E}
`,v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){let $=Math.floor(E/80),G=E%80,k=[];for(let C=0;C<P.length;C+=80)k.push(P.slice(C,C+80));return x+ze([[`${a} |`,k[0]],...k.slice(1,$+1).map(C=>["|",C]),["|","^".padStart(G)],["|",k[$+1]]])}return x+ze([[`${a-1} |`,v[i-1]],[`${a} |`,P],["|","^".padStart(E)],[`${a+1} |`,v[i+1]]])}function ze(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
`)}var R=class e extends Error{constructor(t,n={}){let{nodes:r,source:i,positions:s,path:a,originalError:p,cause:E,extensions:x}=n,v="cause"in n,P=v?E:p,$=v||p!=null?{cause:P}:void 0;super(t,$),this.name="GraphQLError",this.path=a??void 0;let G=p??(E instanceof Error?E:void 0);this.originalError=G,this.nodes=Ze(Array.isArray(r)?r:r?[r]:void 0);let k=Ze(this.nodes?.map(g=>g.loc).filter(g=>g!=null));this.source=i??k?.[0]?.source,this.positions=s??k?.map(g=>g.start),this.locations=s&&i?s.map(g=>w(i,g)):k?.map(g=>w(g.source,g.start));let C=Je(G?.extensions)?G.extensions:void 0;this.extensions=x??C??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p?.stack!=null?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
`+qe(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
`+Ee(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
`+ue(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Qe(e){return e===void 0||e.length===0?void 0:e}function h(e,t,n){return new Q(`Syntax Error: ${n}`,{source:e,positions:[t]})}var W;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(W||(W={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(c||(c={}));function We(e){return e===9||e===32}function b(e){return e>=48&&e<=57}function ze(e){return e>=97&&e<=122||e>=65&&e<=90}function pe(e){return ze(e)||e===95}function Ke(e){return ze(e)||b(e)||e===95}function Ze(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],p=Pt(u);p!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function Pt(e){let t=0;for(;t<e.length&&We(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var z=class{constructor(t){let n=new F(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=wt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function tt(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function L(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return nt(e.charCodeAt(t))&&rt(e.charCodeAt(t+1))}function nt(e){return e>=55296&&e<=56319}function rt(e){return e>=56320&&e<=57343}function R(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new F(t,n,i,s,a,r)}function wt(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return Ft(e,r);case 33:return m(e,o.BANG,r,r+1);case 36:return m(e,o.DOLLAR,r,r+1);case 38:return m(e,o.AMP,r,r+1);case 40:return m(e,o.PAREN_L,r,r+1);case 41:return m(e,o.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return m(e,o.SPREAD,r,r+3);break;case 58:return m(e,o.COLON,r,r+1);case 61:return m(e,o.EQUALS,r,r+1);case 64:return m(e,o.AT,r,r+1);case 91:return m(e,o.BRACKET_L,r,r+1);case 93:return m(e,o.BRACKET_R,r,r+1);case 123:return m(e,o.BRACE_L,r,r+1);case 124:return m(e,o.PIPE,r,r+1);case 125:return m(e,o.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?Yt(e,r):Vt(e,r)}if(b(s)||s===45)return Mt(e,r,s);if(pe(s))return jt(e,r);throw h(e.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:L(s)||K(n,r)?`Unexpected character: ${R(e,r)}.`:`Invalid character: ${R(e,r)}.`)}return m(e,o.EOF,i,i)}function Ft(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(s===10||s===13)break;if(L(s))++r;else if(K(n,r))r+=2;else break}return m(e,o.COMMENT,t,r,n.slice(t+1,r))}function Mt(e,t,n){let i=e.source.body,r=t,s=n,a=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),b(s))throw h(e.source,r,`Invalid number, unexpected digit after 0: ${R(e,r)}.`)}else r=le(e,r,s),s=i.charCodeAt(r);if(s===46&&(a=!0,s=i.charCodeAt(++r),r=le(e,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(a=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=le(e,r,s),s=i.charCodeAt(r)),s===46||pe(s))throw h(e.source,r,`Invalid number, expected digit but got: ${R(e,r)}.`);return m(e,a?o.FLOAT:o.INT,t,r,i.slice(t,r))}function le(e,t,n){if(!b(n))throw h(e.source,t,`Invalid number, expected digit but got: ${R(e,t)}.`);let i=e.source.body,r=t+1;for(;b(i.charCodeAt(r));)++r;return r}function Vt(e,t){let n=e.source.body,i=n.length,r=t+1,s=r,a="";for(;r<i;){let u=n.charCodeAt(r);if(u===34)return a+=n.slice(s,r),m(e,o.STRING,t,r+1,a);if(u===92){a+=n.slice(s,r);let p=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?Bt(e,r):Ut(e,r):Gt(e,r);a+=p.value,r+=p.size,s=r;continue}if(u===10||u===13)break;if(L(u))++r;else if(K(n,r))r+=2;else throw h(e.source,r,`Invalid character within String: ${R(e,r)}.`)}throw h(e.source,r,"Unterminated string.")}function Bt(e,t){let n=e.source.body,i=0,r=3;for(;r<12;){let s=n.charCodeAt(t+r++);if(s===125){if(r<5||!L(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|V(s),i<0)break}throw h(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+r)}".`)}function Ut(e,t){let n=e.source.body,i=et(n,t+2);if(L(i))return{value:String.fromCodePoint(i),size:6};if(nt(i)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let r=et(n,t+8);if(rt(r))return{value:String.fromCodePoint(i,r),size:12}}throw h(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function et(e,t){return V(e.charCodeAt(t))<<12|V(e.charCodeAt(t+1))<<8|V(e.charCodeAt(t+2))<<4|V(e.charCodeAt(t+3))}function V(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Gt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw h(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Yt(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",p=[];for(;s<i;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),p.push(u);let d=m(e,o.BLOCK_STRING,t,s+3,Ze(p).join(`
`));return e.line+=p.length-1,e.lineStart=r,d}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),p.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(L(T))++s;else if(K(n,s))s+=2;else throw h(e.source,s,`Invalid character within String: ${R(e,s)}.`)}throw h(e.source,s,"Unterminated string.")}function jt(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(Ke(s))++r;else break}return m(e,o.NAME,t,r,n.slice(t,r))}function Z(e,t){if(!!!e)throw new Error(t)}function ee(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return $t(e,t);default:return String(e)}}function $t(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Xt(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:te(i,n)}else if(Array.isArray(e))return Jt(e,n);return Ht(e,n)}function Xt(e){return typeof e.toJSON=="function"}function Ht(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+qt(e)+"]":"{ "+n.map(([r,s])=>r+": "+te(s,t)).join(", ")+" }"}function Jt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(te(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function qt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Qt=globalThis.process&&!0,it=Qt?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;let r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(r===s){let a=ee(t);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};var B=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function st(e){return it(e,B)}function ot(e,t){let n=new fe(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}var fe=class{constructor(t,n={}){let{lexer:i,...r}=n;if(i)this._lexer=i;else{let s=st(t)?t:new B(t);this._lexer=new z(s)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.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()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw h(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:i,description:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let i=this._lexer.token.value;throw h(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(o.COLON);let r=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw h(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(W,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(o.AT),i=this.parseName(),r;!n&&this.expectOptionalToken(o.DOT)&&(r=this.parseName());let s;return(n||r)&&this.expectOptionalToken(o.PAREN_L)&&(s=this.parseName(),this.expectToken(o.COLON),this.expectToken(o.PAREN_R)),n?s?this.node(t,{kind:c.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:s}):this.node(t,{kind:c.DIRECTIVE_COORDINATE,name:i}):r?s?this.node(t,{kind:c.ARGUMENT_COORDINATE,name:i,fieldName:r,argumentName:s}):this.node(t,{kind:c.MEMBER_COORDINATE,name:i,memberName:r}):this.node(t,{kind:c.TYPE_COORDINATE,name:i})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new H(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw h(this._lexer.source,n.start,`Expected ${at(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw h(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return h(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,i){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(t,n,i){if(this.expectOptionalToken(t)){let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(t,n,i){this.expectToken(t);let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(t,n){this.expectOptionalToken(t);let i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw h(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return at(e.kind)+(t!=null?` "${t}"`:"")}function at(e){return tt(e)?`"${e}"`:e}function Wt(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var ct=Wt;function zt(e){let t=[],{startToken:n,endToken:i}=e.loc;for(let r=n;r!==i;r=r.next)r.kind==="Comment"&&t.push({...r,loc:{start:r.start,end:r.end}});return t}var Kt={allowLegacyFragmentVariables:!0};function Zt(e){if(e?.name==="GraphQLError"){let{message:t,locations:[n]}=e;return ct(t,{loc:{start:n},cause:e})}return e}function en(e){let t;try{t=ot(e,Kt)}catch(n){throw Zt(n)}return t.comments=zt(t),t}var tn={parse:en,astFormat:"graphql",hasPragma:Fe,hasIgnorePragma:Me,locStart:J,locEnd:q};var nn={graphql:Ge};export{ut as default,Ye as languages,$e as options,he as parsers,nn as printers};
`+ne(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ze(e){return e===void 0||e.length===0?void 0:e}var Bt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),et=Bt;var Y=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};var M={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"};var c={};ae(c,{ARGUMENT:()=>$t,ARGUMENT_COORDINATE:()=>Pn,BOOLEAN:()=>nn,DIRECTIVE:()=>pn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Vn,DIRECTIVE_COORDINATE:()=>wn,DIRECTIVE_DEFINITION:()=>In,DIRECTIVE_EXTENSION:()=>Sn,DOCUMENT:()=>Kt,ENUM:()=>sn,ENUM_TYPE_DEFINITION:()=>Dn,ENUM_TYPE_EXTENSION:()=>Rn,ENUM_VALUE_DEFINITION:()=>_n,FIELD:()=>Qt,FIELD_DEFINITION:()=>Tn,FLOAT:()=>en,FRAGMENT_ARGUMENT:()=>Xt,FRAGMENT_DEFINITION:()=>Wt,FRAGMENT_SPREAD:()=>Ht,INLINE_FRAGMENT:()=>Jt,INPUT_OBJECT_TYPE_DEFINITION:()=>An,INPUT_OBJECT_TYPE_EXTENSION:()=>Ln,INPUT_VALUE_DEFINITION:()=>xn,INT:()=>Zt,INTERFACE_TYPE_DEFINITION:()=>yn,INTERFACE_TYPE_EXTENSION:()=>kn,LIST:()=>on,LIST_TYPE:()=>ln,MEMBER_COORDINATE:()=>Fn,NAME:()=>Gt,NAMED_TYPE:()=>un,NON_NULL_TYPE:()=>dn,NULL:()=>rn,OBJECT:()=>an,OBJECT_FIELD:()=>cn,OBJECT_TYPE_DEFINITION:()=>En,OBJECT_TYPE_EXTENSION:()=>vn,OPERATION_DEFINITION:()=>jt,OPERATION_TYPE_DEFINITION:()=>mn,SCALAR_TYPE_DEFINITION:()=>hn,SCALAR_TYPE_EXTENSION:()=>On,SCHEMA_DEFINITION:()=>fn,SCHEMA_EXTENSION:()=>gn,SELECTION_SET:()=>qt,STRING:()=>tn,TYPE_COORDINATE:()=>bn,UNION_TYPE_DEFINITION:()=>Nn,UNION_TYPE_EXTENSION:()=>Cn,VARIABLE:()=>zt,VARIABLE_DEFINITION:()=>Yt});var Gt="Name",Kt="Document",jt="OperationDefinition",Yt="VariableDefinition",qt="SelectionSet",Qt="Field",$t="Argument",Xt="FragmentArgument",Ht="FragmentSpread",Jt="InlineFragment",Wt="FragmentDefinition",zt="Variable",Zt="IntValue",en="FloatValue",tn="StringValue",nn="BooleanValue",rn="NullValue",sn="EnumValue",on="ListValue",an="ObjectValue",cn="ObjectField",pn="Directive",un="NamedType",ln="ListType",dn="NonNullType",fn="SchemaDefinition",mn="OperationTypeDefinition",hn="ScalarTypeDefinition",En="ObjectTypeDefinition",Tn="FieldDefinition",xn="InputValueDefinition",yn="InterfaceTypeDefinition",Nn="UnionTypeDefinition",Dn="EnumTypeDefinition",_n="EnumValueDefinition",An="InputObjectTypeDefinition",In="DirectiveDefinition",gn="SchemaExtension",Sn="DirectiveExtension",On="ScalarTypeExtension",vn="ObjectTypeExtension",kn="InterfaceTypeExtension",Cn="UnionTypeExtension",Rn="EnumTypeExtension",Ln="InputObjectTypeExtension",bn="TypeCoordinate",Fn="MemberCoordinate",Pn="ArgumentCoordinate",wn="DirectiveCoordinate",Vn="DirectiveArgumentCoordinate";function Te(e,t){if(!e)throw new Error(t)}function tt(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function nt(e){return e>=97&&e<=122||e>=65&&e<=90}function xe(e){return nt(e)||e===95}function it(e){return nt(e)||L(e)||e===95}function rt(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){let s=e[i],a=Mn(s);a!==s.length&&(n??(n=i),r=i,i!==0&&a<t&&(t=a))}return e.map((i,s)=>s===0?i:i.slice(t)).slice(n??0,r+1)}function Mn(e){let t=0;for(;t<e.length&&tt(e.charCodeAt(t));)++t;return t}var ye={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_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",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function f(e,t,n){return new R(`Syntax Error: ${n}`,{source:e,positions:[t]})}function Un(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var b=Un(),Ne=b?.tracingChannel("graphql:parse"),ds=b?.tracingChannel("graphql:validate"),fs=b?.tracingChannel("graphql:execute"),ms=b?.tracingChannel("graphql:execute:variableCoercion"),hs=b?.tracingChannel("graphql:execute:rootSelectionSet"),Es=b?.tracingChannel("graphql:subscribe"),Ts=b?.tracingChannel("graphql:resolve"),Bn=["start","end","asyncStart","asyncEnd","error"];function st(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==void 0)return t;for(let n of Bn)if(e[n].hasSubscribers)return!0;return!1}var o={SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",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"};var Q=class{constructor(t){let n=new V(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=Gn(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function at(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.DOT||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function U(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function re(e,t){return ct(e.charCodeAt(t))&&pt(e.charCodeAt(t+1))}function ct(e){return e>=55296&&e<=56319}function pt(e){return e>=56320&&e<=57343}function F(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function h(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Gn(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Kn(e,i);case 33:return h(e,o.BANG,i,i+1);case 36:return h(e,o.DOLLAR,i,i+1);case 38:return h(e,o.AMP,i,i+1);case 40:return h(e,o.PAREN_L,i,i+1);case 41:return h(e,o.PAREN_R,i,i+1);case 46:{let a=n.charCodeAt(i+1);if(a===46&&n.charCodeAt(i+2)===46)return h(e,o.SPREAD,i,i+3);if(a===46)throw f(e.source,i,'Unexpected "..", did you mean "..."?');if(L(a)){let p=e.source.body.slice(i+1,ie(e,i+1,a));throw f(e.source,i,`Invalid number, expected digit before ".", did you mean "0.${p}"?`)}break}case 58:return h(e,o.COLON,i,i+1);case 61:return h(e,o.EQUALS,i,i+1);case 64:return h(e,o.AT,i,i+1);case 91:return h(e,o.BRACKET_L,i,i+1);case 93:return h(e,o.BRACKET_R,i,i+1);case 123:return h(e,o.BRACE_L,i,i+1);case 124:return h(e,o.PIPE,i,i+1);case 125:return h(e,o.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Xn(e,i):Yn(e,i)}if(L(s)||s===45)return jn(e,i,s);if(xe(s))return Hn(e,i);throw f(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:U(s)||re(n,i)?`Unexpected character: ${F(e,i)}.`:`Invalid character: ${F(e,i)}.`)}return h(e,o.EOF,r,r)}function Kn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(U(s))++i;else if(re(n,i))i+=2;else break}return h(e,o.COMMENT,t,i,n.slice(t+1,i))}function jn(e,t,n){let r=e.source.body,i=t,s=n,a=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),L(s))throw f(e.source,i,`Invalid number, unexpected digit after 0: ${F(e,i)}.`)}else i=ie(e,i,s),s=r.charCodeAt(i);if(s===46&&(a=!0,s=r.charCodeAt(++i),i=ie(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=ie(e,i,s),s=r.charCodeAt(i)),s===46||xe(s))throw f(e.source,i,`Invalid number, expected digit but got: ${F(e,i)}.`);return h(e,a?o.FLOAT:o.INT,t,i,r.slice(t,i))}function ie(e,t,n){if(!L(n))throw f(e.source,t,`Invalid number, expected digit but got: ${F(e,t)}.`);let r=e.source.body,i=t+1;for(;L(r.charCodeAt(i));)++i;return i}function Yn(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,a="";for(;i<r;){let p=n.charCodeAt(i);if(p===34)return a+=n.slice(s,i),h(e,o.STRING,t,i+1,a);if(p===92){a+=n.slice(s,i);let E=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?qn(e,i):Qn(e,i):$n(e,i);a+=E.value,i+=E.size,s=i;continue}if(p===10||p===13)break;if(U(p))++i;else if(re(n,i))i+=2;else throw f(e.source,i,`Invalid character within String: ${F(e,i)}.`)}throw f(e.source,i,"Unterminated string.")}function qn(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!U(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|q(s),r<0)break}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Qn(e,t){let n=e.source.body,r=ot(n,t+2);if(U(r))return{value:String.fromCodePoint(r),size:6};if(ct(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=ot(n,t+8);if(pt(i))return{value:String.fromCodePoint(r,i),size:12}}throw f(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ot(e,t){return q(e.charCodeAt(t))<<12|q(e.charCodeAt(t+1))<<8|q(e.charCodeAt(t+2))<<4|q(e.charCodeAt(t+3))}function q(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function $n(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Xn(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,p="",E=[];for(;s<r;){let x=n.charCodeAt(s);if(x===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){p+=n.slice(a,s),E.push(p);let v=h(e,o.BLOCK_STRING,t,s+3,rt(E).join(`
`));return e.line+=E.length-1,e.lineStart=i,v}if(x===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){p+=n.slice(a,s),a=s+1,s+=4;continue}if(x===10||x===13){p+=n.slice(a,s),E.push(p),x===13&&n.charCodeAt(s+1)===10?s+=2:++s,p="",a=s,i=s;continue}if(U(x))++s;else if(re(n,s))s+=2;else throw f(e.source,s,`Invalid character within String: ${F(e,s)}.`)}throw f(e.source,s,"Unterminated string.")}function Hn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(it(s))++i;else break}return h(e,o.NAME,t,i,n.slice(t,i))}var ut=Symbol("Source"),B=class{constructor(t,n="GraphQL request",r={line:1,column:1}){this.__kind=ut,this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Te(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Te(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function lt(e){return He(e,ut,B)}function oe(e,t){return st(Ne)?Ne.traceSync(()=>dt(e,t),{source:e}):dt(e,t)}function dt(e,t){let n=new De(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var De=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else{let s=lt(t)?t:new B(t);this._lexer=new Q(s)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.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()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:M.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return M.QUERY;case"mutation":return M.MUTATION;case"subscription":return M.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseFragmentArguments(){let t=this.parseFragmentArgument;return this.optionalMany(o.PAREN_L,t,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){let t=this._lexer.token,n=this.parseName();return this.expectToken(o.COLON),this.node(t,{kind:c.FRAGMENT_ARGUMENT,name:n,value:this.parseValueLiteral(!1)})}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");if(!n&&this.peek(o.NAME)){let r=this.parseFragmentName();return this.peek(o.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(t,{kind:c.FRAGMENT_SPREAD,name:r,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.FRAGMENT_SPREAD,name:r,directives:this.parseDirectives(!1)})}return this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw f(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));if(n.length)return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw f(this._lexer.source,this._lexer.token.start,`${se(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n===void 0&&r===void 0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r===void 0&&i===void 0&&s===void 0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r===void 0&&i===void 0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(o.AT);let n=this.parseName(),r=this.parseConstDirectives();if(r===void 0)throw this.unexpected();return this.node(t,{kind:c.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.parseConstDirectives(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let p=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:s,repeatable:a,locations:p})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(et(ye,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(o.AT),r=this.parseName(),i;!n&&this.expectOptionalToken(o.DOT)&&(i=this.parseName());let s;return(n||i)&&this.expectOptionalToken(o.PAREN_L)&&(s=this.parseName(),this.expectToken(o.COLON),this.expectToken(o.PAREN_R)),n?s?this.node(t,{kind:c.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:s}):this.node(t,{kind:c.DIRECTIVE_COORDINATE,name:r}):i?s?this.node(t,{kind:c.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:s}):this.node(t,{kind:c.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:c.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Y(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw f(this._lexer.source,n.start,`Expected ${ft(t)}, found ${se(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw f(this._lexer.source,n.start,`Expected "${t}", found ${se(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return f(this._lexer.source,n.start,`Unexpected ${se(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==o.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw f(this._lexer.source,n.start,`Document contains more than ${t} tokens. Parsing aborted.`)}};function se(e){let t=e.value;return ft(e.kind)+(t!=null?` "${t}"`:"")}function ft(e){return at(e)?`"${e}"`:e}function ei(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var mt=ei;function ti(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var ni={experimentalFragmentArguments:!0};function ii(e){if(!(e instanceof R))return e;let{message:t,locations:[n]}=e;return mt(t,{loc:{start:n},cause:e})}function ri(e){let t;try{t=oe(e,ni)}catch(n){throw ii(n)}return t.comments=ti(t),t}var si={parse:ri,astFormat:"graphql",hasPragma:Ue,hasIgnorePragma:Be,locStart:ee,locEnd:te};var oi={graphql:qe};export{ht as default,Qe as languages,Xe as options,_e as parsers,oi as printers};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display