oxfmt 0.56.0 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{acorn-LGWopQvF.js → acorn-CZllRq2x.js} +1893 -1803
  2. package/dist/{angular-BbAuvH72.js → angular-CsoDKqo4.js} +1587 -995
  3. package/dist/{apis-C2fbFQF2.js → apis-DLO0lBDu.js} +4 -4
  4. package/dist/babel-DZD6u90w.js +9896 -0
  5. package/dist/{bindings-Ab6hoO7p.js → bindings-DTiEua0g.js} +26 -26
  6. package/dist/{chunk-DSjvVL_1-DaTvESxp.js → chunk-DSjvVL_1-DX2STy_I.js} +1 -1
  7. package/dist/cli-worker.d.ts +5 -5
  8. package/dist/cli-worker.js +1 -1
  9. package/dist/cli.js +3 -2
  10. package/dist/{dist-BMp5jzRv.js → dist-YOS4M6hk.js} +17 -17
  11. package/dist/estree-ChnhgzGg.js +7885 -0
  12. package/dist/flow-C6LkWPPl.js +9149 -0
  13. package/dist/{glimmer-Ba_8Z2bG.js → glimmer-YnkKK2a7.js} +204 -187
  14. package/dist/{graphql-CZ7EPWgo.js → graphql-BNiwkZTo.js} +905 -820
  15. package/dist/{html-DblM11Xw.js → html-DMHXIbrM.js} +1416 -1305
  16. package/dist/index.js +3 -3
  17. package/dist/{jiti-Bb1dT6Cw-DWQc1k7j.js → jiti-Bb1dT6Cw-B61jQmj-.js} +2 -2
  18. package/dist/markdown-BjyDFyaO.js +14010 -0
  19. package/dist/{meriyah-DafjRZfO.js → meriyah-zDNCk2o1.js} +1501 -1429
  20. package/dist/{migrate-prettier-DrYAkU3F.js → migrate-prettier-BmSsy164.js} +49 -42
  21. package/dist/{plugin-CYEM2898.js → plugin-B4cguZ1l.js} +16 -12
  22. package/dist/{postcss-CkhtwsAS.js → postcss-CwPwODg8.js} +2153 -2002
  23. package/dist/{prettier-DKAx5A83.js → prettier-BByt4AhK.js} +5674 -5038
  24. package/dist/{sorter-BZkvDMjt-c-GMCzH3.js → sorter-BZkvDMjt-B8ihSEiX.js} +7 -7
  25. package/dist/{sorter-DK1aMCjs.js → sorter-BcGkkjyR.js} +1 -1
  26. package/dist/{typescript-DaxiA0nr.js → typescript-Bq_S3kyC.js} +10499 -10252
  27. package/dist/{v3-D-mr2VVh-7G9Y2N0Q.js → v3-D-mr2VVh-p01OHBjH.js} +4 -4
  28. package/dist/{v4-C-HWEQJm-DKnDZXAs.js → v4-C-HWEQJm-BbuYNtSW.js} +4 -4
  29. package/dist/yaml-DlyuuZmC.js +6121 -0
  30. package/package.json +20 -20
  31. package/dist/babel-DLjwvkt5.js +0 -9884
  32. package/dist/estree-DbmUPhmV.js +0 -7269
  33. package/dist/flow-CJbpv7JL.js +0 -52916
  34. package/dist/markdown-B5hFVJKQ.js +0 -6880
  35. package/dist/yaml-BC7gw7un.js +0 -5280
@@ -1,125 +1,167 @@
1
1
  import { n as __esmMin } from "./rolldown-runtime-CE-6LUnI.js";
2
- //#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/graphql.mjs
3
- function x(e) {
4
- return S(e), {
5
- type: Ee,
2
+ //#region ../../node_modules/.pnpm/prettier@3.9.4/node_modules/prettier/plugins/graphql.mjs
3
+ function m(e) {
4
+ return O(e), {
5
+ type: Ie,
6
6
  contents: e
7
7
  };
8
8
  }
9
- function y(e, t = {}) {
10
- return S(e), Y(t.expandedStates, !0), {
11
- type: Te,
9
+ function N(e, t = {}) {
10
+ return O(e), J(t.expandedStates, !0), {
11
+ type: ge,
12
12
  id: t.id,
13
13
  contents: e,
14
14
  break: !!t.shouldBreak,
15
15
  expandedStates: t.expandedStates
16
16
  };
17
17
  }
18
- function I(e, t = "", n = {}) {
19
- return S(e), t !== "" && S(t), {
20
- type: Ne,
18
+ function _(e, t = "", n = {}) {
19
+ return O(e), t !== "" && O(t), {
20
+ type: Se,
21
21
  breakContents: e,
22
22
  flatContents: t,
23
23
  groupId: n.groupId
24
24
  };
25
25
  }
26
- function E(e, t) {
27
- S(e), Y(t);
26
+ function d(e, t) {
27
+ O(e), J(t);
28
28
  let n = [];
29
- for (let i = 0; i < t.length; i++) i !== 0 && n.push(e), n.push(t[i]);
29
+ for (let r = 0; r < t.length; r++) r !== 0 && n.push(e), n.push(t[r]);
30
30
  return n;
31
31
  }
32
- function j(e) {
33
- return (t, n, i) => {
34
- let r = !!i?.backwards;
32
+ function W(e) {
33
+ return (t, n, r) => {
35
34
  if (n === !1) return !1;
36
- let { length: s } = t, a = n;
35
+ let i = !!r?.backwards, { length: s } = t, a = n;
37
36
  for (; a >= 0 && a < s;) {
38
- let u = t.charAt(a);
37
+ let p = t.charAt(a);
39
38
  if (e instanceof RegExp) {
40
- if (!e.test(u)) return a;
41
- } else if (!e.includes(u)) return a;
42
- r ? a-- : a++;
39
+ if (!e.test(p)) return a;
40
+ } else if (!e.includes(p)) return a;
41
+ i ? a-- : a++;
43
42
  }
44
43
  return a === -1 || a === s ? a : !1;
45
44
  };
46
45
  }
47
- function mt(e, t, n) {
48
- let i = !!n?.backwards;
46
+ function Dt(e, t, n) {
49
47
  if (t === !1) return !1;
50
- let r = e.charAt(t);
51
- if (i) {
52
- if (e.charAt(t - 1) === "\r" && r === `
48
+ let r = !!n?.backwards, i = e.charAt(t);
49
+ if (r) {
50
+ if (e.charAt(t - 1) === "\r" && i === `
53
51
  `) return t - 2;
54
- if (Oe(r)) return t - 1;
52
+ if (Ce(i)) return t - 1;
55
53
  } else {
56
- if (r === "\r" && e.charAt(t + 1) === `
54
+ if (i === "\r" && e.charAt(t + 1) === `
57
55
  `) return t + 2;
58
- if (Oe(r)) return t + 1;
56
+ if (Ce(i)) return t + 1;
59
57
  }
60
58
  return t;
61
59
  }
62
- function Et(e, t, n = {}) {
63
- let i = $(e, n.backwards ? t - 1 : t, n);
64
- return i !== X(e, i, n);
60
+ function _t(e, t, n = {}) {
61
+ let r = z(e, n.backwards ? t - 1 : t, n);
62
+ return r !== Z(e, r, n);
63
+ }
64
+ function It(e, t) {
65
+ let n = e.node;
66
+ return n.printed = !0, t.printer.printComment(e, t);
67
+ }
68
+ function ue(e, t, n = {}) {
69
+ 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))));
70
+ if (a.size === 0) return "";
71
+ let E = d(l, e.map(({ node: x }) => a.has(x) ? It(e, t) : "", "comments").filter(Boolean));
72
+ return r ? m([l, E]) : E;
73
+ }
74
+ function gt(e) {
75
+ return Array.isArray(e) && e.length > 0;
76
+ }
77
+ function j(e) {
78
+ if (K !== null && typeof K.property) {
79
+ let t = K;
80
+ return K = j.prototype = null, t;
81
+ }
82
+ return K = j.prototype = e ?? Object.create(null), new j();
83
+ }
84
+ function de(e) {
85
+ return j(e);
65
86
  }
66
- function Tt(e, t) {
87
+ function Ot(e, t = "type") {
88
+ de(e);
89
+ function n(r) {
90
+ let i = r[t], s = e[i];
91
+ if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: r });
92
+ return s;
93
+ }
94
+ return n;
95
+ }
96
+ function fe(e, t) {
97
+ e.kind === "StringValue" && e.block && !e.value.includes(`
98
+ `) && (t.value = e.value.trim());
99
+ }
100
+ function kt(e, t) {
67
101
  if (t === !1) return !1;
68
102
  if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
69
103
  for (let n = t + 2; n < e.length; ++n) if (e.charAt(n) === "*" && e.charAt(n + 1) === "/") return n + 2;
70
104
  }
71
105
  return t;
72
106
  }
73
- function Nt(e, t) {
74
- return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Ae(e, t) : t;
107
+ function Ct(e, t) {
108
+ return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ke(e, t) : t;
75
109
  }
76
- function xt(e, t) {
77
- let n = null, i = t;
78
- for (; i !== n;) n = i, i = ye(e, i), i = De(e, i), i = $(e, i);
79
- return i = ge(e, i), i = X(e, i), i !== !1 && Ie(e, i);
110
+ function Rt(e, t) {
111
+ let n = null, r = t;
112
+ for (; r !== n;) n = r, r = ve(e, r), r = Ke(e, r), r = z(e, r);
113
+ return r = je(e, r), r = Z(e, r), r !== !1 && Re(e, r);
80
114
  }
81
- function _t(e) {
82
- return Array.isArray(e) && e.length > 0;
115
+ function I(e, t, n, r) {
116
+ return e.map(({ isLast: i, node: s }) => {
117
+ let a = n();
118
+ return !i && Ye(t.originalText, te(s)) ? [a, l] : a;
119
+ }, r);
83
120
  }
84
- function w(e) {
85
- if (P !== null && typeof P.property) {
86
- let t = P;
87
- return P = w.prototype = null, t;
88
- }
89
- return P = w.prototype = e ?? Object.create(null), new w();
121
+ function me(e, t, n) {
122
+ let { node: r } = e;
123
+ return T(r.arguments) ? N([
124
+ "(",
125
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
126
+ u,
127
+ ")"
128
+ ]) : "";
90
129
  }
91
- function ae(e) {
92
- return w(e);
130
+ function A(e, t, n) {
131
+ let { node: r } = e;
132
+ if (!r.description) return "";
133
+ let i = [n("description")];
134
+ return r.kind === "InputValueDefinition" && !r.description.block ? i.push(S) : i.push(l), i;
93
135
  }
94
- function At(e, t = "type") {
95
- ae(e);
96
- function n(i) {
97
- let r = i[t], s = e[r];
98
- if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${r}'.`), { node: i });
99
- return s;
100
- }
101
- return n;
136
+ function y(e, t) {
137
+ let { node: n } = e;
138
+ if (!T(n.directives)) return "";
139
+ let r = d(S, e.map(t, "directives"));
140
+ return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? N([S, r]) : [" ", N(m([u, r]))];
102
141
  }
103
- function It(e, t, n) {
104
- let { node: i } = e;
105
- if (!i.description) return "";
106
- let r = [n("description")];
107
- return i.kind === "InputValueDefinition" && !i.description.block ? r.push(k) : r.push(f), r;
142
+ function he(e, t) {
143
+ let { node: n } = e;
144
+ return T(n.variableDefinitions) ? N([
145
+ "(",
146
+ m([u, d([_("", ", "), u], e.map(t, "variableDefinitions"))]),
147
+ u,
148
+ ")"
149
+ ]) : "";
108
150
  }
109
- function Dt(e, t, n) {
110
- let { node: i } = e;
111
- switch (i.kind) {
112
- case "Document": return [...E(f, g(e, t, n, "definitions")), f];
151
+ function Lt(e, t, n) {
152
+ let { node: r } = e;
153
+ switch (r.kind) {
154
+ case "Document": return [...d(l, I(e, t, n, "definitions")), l];
113
155
  case "OperationDefinition": {
114
- let r = t.originalText[J(i)] !== "{", s = !!i.name;
156
+ let i = t.originalText[ee(r)] !== "{", s = !!r.name;
115
157
  return [
116
158
  A(e, t, n),
117
- r ? i.operation : "",
118
- r && s ? [" ", n("name")] : "",
119
- r && !s && se(i.variableDefinitions) ? " " : "",
120
- Be(e, n),
121
- _(e, n, i),
122
- !r && !s ? "" : " ",
159
+ i ? r.operation : "",
160
+ i && s ? [" ", n("name")] : "",
161
+ i && !s && T(r.variableDefinitions) ? " " : "",
162
+ he(e, n),
163
+ y(e, n),
164
+ !i && !s ? "" : " ",
123
165
  n("selectionSet")
124
166
  ];
125
167
  }
@@ -127,74 +169,80 @@ function Dt(e, t, n) {
127
169
  A(e, t, n),
128
170
  "fragment ",
129
171
  n("name"),
130
- Be(e, n),
172
+ he(e, n),
131
173
  " on ",
132
174
  n("typeCondition"),
133
- _(e, n, i),
175
+ y(e, n),
134
176
  " ",
135
177
  n("selectionSet")
136
178
  ];
137
179
  case "SelectionSet": return [
138
180
  "{",
139
- x([f, E(f, g(e, t, n, "selections"))]),
140
- f,
181
+ m([l, d(l, I(e, t, n, "selections"))]),
182
+ l,
141
183
  "}"
142
184
  ];
143
- case "Field": return y([
144
- i.alias ? [n("alias"), ": "] : "",
185
+ case "Field": return N([
186
+ r.alias ? [n("alias"), ": "] : "",
145
187
  n("name"),
146
- i.arguments.length > 0 ? y([
188
+ T(r.arguments) ? N([
147
189
  "(",
148
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
149
- l,
190
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
191
+ u,
150
192
  ")"
151
193
  ]) : "",
152
- _(e, n, i),
153
- i.selectionSet ? " " : "",
194
+ y(e, n),
195
+ r.selectionSet ? " " : "",
154
196
  n("selectionSet")
155
197
  ]);
156
- case "Name": return i.value;
198
+ case "Name": return r.value;
157
199
  case "StringValue":
158
- if (i.block) {
159
- let r = U(0, i.value, "\"\"\"", "\\\"\"\"").split(`
200
+ if (r.block) {
201
+ let i = X(0, r.value, "\"\"\"", "\\\"\"\"").split(`
160
202
  `);
161
- return r.length === 1 && (r[0] = r[0].trim()), r.every((s) => s === "") && (r.length = 0), E(f, [
203
+ return i.length === 1 && (i[0] = i[0].trim()), i.every((s) => s === "") && (i.length = 0), d(l, [
162
204
  "\"\"\"",
163
- ...r,
205
+ ...i,
164
206
  "\"\"\""
165
207
  ]);
166
208
  }
167
209
  return [
168
210
  "\"",
169
- U(0, U(0, i.value, /["\\]/gu, "\\$&"), `
211
+ X(0, X(0, r.value, /["\\]/g, "\\$&"), `
170
212
  `, "\\n"),
171
213
  "\""
172
214
  ];
173
215
  case "IntValue":
174
216
  case "FloatValue":
175
- case "EnumValue": return i.value;
176
- case "BooleanValue": return i.value ? "true" : "false";
217
+ case "EnumValue": return r.value;
218
+ case "BooleanValue": return r.value ? "true" : "false";
177
219
  case "NullValue": return "null";
178
220
  case "Variable": return ["$", n("name")];
179
- case "ListValue": return y([
180
- "[",
181
- x([l, E([I("", ", "), l], e.map(n, "values"))]),
182
- l,
183
- "]"
184
- ]);
221
+ case "ListValue": {
222
+ let i = !T(r.values);
223
+ return N([
224
+ "[",
225
+ ue(e, t, { indent: !0 }),
226
+ i ? "" : m([u, d([_("", ", "), u], e.map(n, "values"))]),
227
+ u,
228
+ "]"
229
+ ]);
230
+ }
185
231
  case "ObjectValue": {
186
- let r = t.bracketSpacing && i.fields.length > 0 ? " " : "";
187
- return y([
232
+ let i = !T(r.fields), s = t.bracketSpacing && !i ? " " : "";
233
+ return N([
188
234
  "{",
189
- r,
190
- x([l, E([I("", ", "), l], e.map(n, "fields"))]),
191
- l,
192
- I("", r),
235
+ s,
236
+ ue(e, t, { indent: !0 }),
237
+ i ? "" : [m([u, d([_("", ", "), u], e.map(n, "fields"))])],
238
+ u,
239
+ _("", s),
193
240
  "}"
194
241
  ]);
195
242
  }
196
243
  case "ObjectField":
197
- case "Argument": return [
244
+ case "Argument":
245
+ case "FragmentArgument": return [
198
246
  n("name"),
199
247
  ": ",
200
248
  n("value")
@@ -202,12 +250,7 @@ function Dt(e, t, n) {
202
250
  case "Directive": return [
203
251
  "@",
204
252
  n("name"),
205
- i.arguments.length > 0 ? y([
206
- "(",
207
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
208
- l,
209
- ")"
210
- ]) : ""
253
+ me(e, t, n)
211
254
  ];
212
255
  case "NamedType": return n("name");
213
256
  case "VariableDefinition": return [
@@ -215,8 +258,8 @@ function Dt(e, t, n) {
215
258
  n("variable"),
216
259
  ": ",
217
260
  n("type"),
218
- i.defaultValue ? [" = ", n("defaultValue")] : "",
219
- _(e, n, i)
261
+ r.defaultValue ? [" = ", n("defaultValue")] : "",
262
+ y(e, n)
220
263
  ];
221
264
  case "ObjectTypeExtension":
222
265
  case "ObjectTypeDefinition":
@@ -224,124 +267,131 @@ function Dt(e, t, n) {
224
267
  case "InputObjectTypeDefinition":
225
268
  case "InterfaceTypeExtension":
226
269
  case "InterfaceTypeDefinition": {
227
- let { kind: r } = i, s = [];
228
- 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([
270
+ let { kind: i } = r, s = [];
271
+ 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([
229
272
  " {",
230
- x([f, E(f, g(e, t, n, "fields"))]),
231
- f,
273
+ m([l, d(l, I(e, t, n, "fields"))]),
274
+ l,
232
275
  "}"
233
276
  ]), s;
234
277
  }
235
278
  case "FieldDefinition": return [
236
279
  A(e, t, n),
237
280
  n("name"),
238
- i.arguments.length > 0 ? y([
281
+ T(r.arguments) ? N([
239
282
  "(",
240
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
241
- l,
283
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
284
+ u,
242
285
  ")"
243
286
  ]) : "",
244
287
  ": ",
245
288
  n("type"),
246
- _(e, n, i)
289
+ y(e, n)
247
290
  ];
248
291
  case "DirectiveDefinition": return [
249
292
  A(e, t, n),
250
293
  "directive ",
251
294
  "@",
252
295
  n("name"),
253
- i.arguments.length > 0 ? y([
296
+ T(r.arguments) ? N([
254
297
  "(",
255
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
256
- l,
298
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
299
+ u,
257
300
  ")"
258
301
  ]) : "",
259
- i.repeatable ? " repeatable" : "",
302
+ y(e, n),
303
+ r.repeatable ? " repeatable" : "",
260
304
  " on ",
261
- ...E(" | ", e.map(n, "locations"))
305
+ ...d(" | ", e.map(n, "locations"))
306
+ ];
307
+ case "DirectiveExtension": return [
308
+ "extend directive @",
309
+ n("name"),
310
+ y(e, n)
262
311
  ];
263
312
  case "EnumTypeExtension":
264
313
  case "EnumTypeDefinition": return [
265
314
  A(e, t, n),
266
- i.kind === "EnumTypeExtension" ? "extend " : "",
315
+ r.kind === "EnumTypeExtension" ? "extend " : "",
267
316
  "enum ",
268
317
  n("name"),
269
- _(e, n, i),
270
- i.values.length > 0 ? [
318
+ y(e, n),
319
+ T(r.values) ? [
271
320
  " {",
272
- x([f, E(f, g(e, t, n, "values"))]),
273
- f,
321
+ m([l, d(l, I(e, t, n, "values"))]),
322
+ l,
274
323
  "}"
275
324
  ] : ""
276
325
  ];
277
326
  case "EnumValueDefinition": return [
278
327
  A(e, t, n),
279
328
  n("name"),
280
- _(e, n, i)
329
+ y(e, n)
281
330
  ];
282
331
  case "InputValueDefinition": return [
283
332
  A(e, t, n),
284
333
  n("name"),
285
334
  ": ",
286
335
  n("type"),
287
- i.defaultValue ? [" = ", n("defaultValue")] : "",
288
- _(e, n, i)
336
+ r.defaultValue ? [" = ", n("defaultValue")] : "",
337
+ y(e, n)
289
338
  ];
290
339
  case "SchemaExtension": return [
291
340
  "extend schema",
292
- _(e, n, i),
293
- ...i.operationTypes.length > 0 ? [
341
+ y(e, n),
342
+ ...T(r.operationTypes) ? [
294
343
  " {",
295
- x([f, E(f, g(e, t, n, "operationTypes"))]),
296
- f,
344
+ m([l, d(l, I(e, t, n, "operationTypes"))]),
345
+ l,
297
346
  "}"
298
347
  ] : []
299
348
  ];
300
349
  case "SchemaDefinition": return [
301
350
  A(e, t, n),
302
351
  "schema",
303
- _(e, n, i),
352
+ y(e, n),
304
353
  " {",
305
- i.operationTypes.length > 0 ? x([f, E(f, g(e, t, n, "operationTypes"))]) : "",
306
- f,
354
+ T(r.operationTypes) ? m([l, d(l, I(e, t, n, "operationTypes"))]) : "",
355
+ l,
307
356
  "}"
308
357
  ];
309
358
  case "OperationTypeDefinition": return [
310
- i.operation,
359
+ r.operation,
311
360
  ": ",
312
361
  n("type")
313
362
  ];
314
363
  case "FragmentSpread": return [
315
364
  "...",
316
365
  n("name"),
317
- _(e, n, i)
366
+ me(e, t, n),
367
+ y(e, n)
318
368
  ];
319
369
  case "InlineFragment": return [
320
370
  "...",
321
- i.typeCondition ? [" on ", n("typeCondition")] : "",
322
- _(e, n, i),
371
+ r.typeCondition ? [" on ", n("typeCondition")] : "",
372
+ y(e, n),
323
373
  " ",
324
374
  n("selectionSet")
325
375
  ];
326
376
  case "UnionTypeExtension":
327
- case "UnionTypeDefinition": return y([A(e, t, n), y([
328
- i.kind === "UnionTypeExtension" ? "extend " : "",
377
+ case "UnionTypeDefinition": return N([A(e, t, n), N([
378
+ r.kind === "UnionTypeExtension" ? "extend " : "",
329
379
  "union ",
330
380
  n("name"),
331
- _(e, n, i),
332
- i.types.length > 0 ? [
381
+ y(e, n),
382
+ T(r.types) ? [
333
383
  " =",
334
- I("", " "),
335
- x([I([k, "| "]), E([k, "| "], e.map(n, "types"))])
384
+ _("", " "),
385
+ m([_([S, "| "]), d([S, "| "], e.map(n, "types"))])
336
386
  ] : ""
337
387
  ])]);
338
388
  case "ScalarTypeExtension":
339
389
  case "ScalarTypeDefinition": return [
340
390
  A(e, t, n),
341
- i.kind === "ScalarTypeExtension" ? "extend " : "",
391
+ r.kind === "ScalarTypeExtension" ? "extend " : "",
342
392
  "scalar ",
343
393
  n("name"),
344
- _(e, n, i)
394
+ y(e, n)
345
395
  ];
346
396
  case "NonNullType": return [n("type"), "!"];
347
397
  case "ListType": return [
@@ -349,302 +399,280 @@ function Dt(e, t, n) {
349
399
  n("type"),
350
400
  "]"
351
401
  ];
352
- default: throw new ke(i, "Graphql", "kind");
402
+ default: throw new Le(r, "Graphql", "kind");
353
403
  }
354
404
  }
355
- function _(e, t, n) {
356
- if (n.directives.length === 0) return "";
357
- let i = E(k, e.map(t, "directives"));
358
- return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(x([l, i]))];
359
- }
360
- function g(e, t, n, i) {
361
- return e.map(({ isLast: r, node: s }) => {
362
- let a = n();
363
- return !r && Se(t.originalText, q(s)) ? [a, f] : a;
364
- }, i);
365
- }
366
- function gt(e) {
405
+ function bt(e) {
367
406
  return e.kind !== "Comment";
368
407
  }
369
- function St({ node: e }) {
408
+ function Ft({ node: e }) {
370
409
  if (e.kind === "Comment") return "#" + e.value.trimEnd();
371
410
  throw new Error("Not a comment: " + JSON.stringify(e));
372
411
  }
373
- function kt(e, t, n) {
374
- let { node: i } = e, r = [], { interfaces: s } = i, a = e.map(n, "interfaces");
375
- for (let u = 0; u < s.length; u++) {
376
- let p = s[u];
377
- r.push(a[u]);
378
- let T = s[u + 1];
379
- if (T) {
380
- let D = t.originalText.slice(p.loc.end, T.loc.start).includes("#");
381
- r.push(" &", D ? k : " ");
382
- }
383
- }
384
- return r;
385
- }
386
- function Be(e, t) {
387
- let { node: n } = e;
388
- return se(n.variableDefinitions) ? y([
389
- "(",
390
- x([l, E([I("", ", "), l], e.map(t, "variableDefinitions"))]),
391
- l,
392
- ")"
393
- ]) : "";
394
- }
395
- function Ue(e, t) {
396
- e.kind === "StringValue" && e.block && !e.value.includes(`
397
- `) && (t.value = e.value.trim());
398
- }
399
- function Ct(e) {
412
+ function Pt(e) {
400
413
  let { node: t } = e;
401
414
  return t?.comments?.some((n) => n.value.trim() === "prettier-ignore");
402
415
  }
403
- function Xe(e) {
416
+ function Mt(e, t) {
417
+ return e?.__kind === t;
418
+ }
419
+ function Je(e) {
404
420
  return typeof e == "object" && e !== null;
405
421
  }
406
- function He(e, t) {
407
- if (!!!e) throw new Error(t ?? "Unexpected invariant triggered.");
422
+ function We(e, t) {
423
+ if (!e) throw new Error(t ?? "Unexpected invariant triggered.");
408
424
  }
409
- function M(e, t) {
410
- let n = 0, i = 1;
411
- for (let r of e.body.matchAll(bt)) {
412
- if (typeof r.index == "number" || He(!1), r.index >= t) break;
413
- n = r.index + r[0].length, i += 1;
425
+ function w(e, t) {
426
+ let n = 0, r = 1;
427
+ for (let i of e.body.matchAll(Ut)) {
428
+ if (typeof i.index != "number" && We(!1), i.index >= t) break;
429
+ n = i.index + i[0].length, r += 1;
414
430
  }
415
431
  return {
416
- line: i,
432
+ line: r,
417
433
  column: t + 1 - n
418
434
  };
419
435
  }
420
- function qe(e) {
421
- return ue(e.source, M(e.source, e.start));
422
- }
423
- function ue(e, t) {
424
- 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}
425
- `, d = i.split(/\r\n|[\n\r]/g), D = d[r];
426
- if (D.length > 120) {
427
- let O = Math.floor(p / 80), re = p % 80, N = [];
428
- for (let v = 0; v < D.length; v += 80) N.push(D.slice(v, v + 80));
429
- return T + Je([
430
- [`${a} |`, N[0]],
431
- ...N.slice(1, O + 1).map((v) => ["|", v]),
432
- ["|", "^".padStart(re)],
433
- ["|", N[O + 1]]
436
+ function Ee(e) {
437
+ return ne(e.source, w(e.source, e.start));
438
+ }
439
+ function ne(e, t) {
440
+ 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}
441
+ `, v = r.split(/\r\n|[\n\r]/g), P = v[i];
442
+ if (P.length > 120) {
443
+ let $ = Math.floor(E / 80), G = E % 80, k = [];
444
+ for (let C = 0; C < P.length; C += 80) k.push(P.slice(C, C + 80));
445
+ return x + ze([
446
+ [`${a} |`, k[0]],
447
+ ...k.slice(1, $ + 1).map((C) => ["|", C]),
448
+ ["|", "^".padStart(G)],
449
+ ["|", k[$ + 1]]
434
450
  ]);
435
451
  }
436
- return T + Je([
437
- [`${a - 1} |`, d[r - 1]],
438
- [`${a} |`, D],
439
- ["|", "^".padStart(p)],
440
- [`${a + 1} |`, d[r + 1]]
452
+ return x + ze([
453
+ [`${a - 1} |`, v[i - 1]],
454
+ [`${a} |`, P],
455
+ ["|", "^".padStart(E)],
456
+ [`${a + 1} |`, v[i + 1]]
441
457
  ]);
442
458
  }
443
- function Je(e) {
444
- let t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
445
- return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
459
+ function ze(e) {
460
+ let t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
461
+ return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
446
462
  `);
447
463
  }
448
- function Lt(e) {
449
- let t = e[0];
450
- return t == null || "kind" in t || "length" in t ? {
451
- nodes: t,
452
- source: e[1],
453
- positions: e[2],
454
- path: e[3],
455
- originalError: e[4],
456
- extensions: e[5]
457
- } : t;
458
- }
459
- function Qe(e) {
464
+ function Ze(e) {
460
465
  return e === void 0 || e.length === 0 ? void 0 : e;
461
466
  }
462
- function h(e, t, n) {
463
- return new Q(`Syntax Error: ${n}`, {
464
- source: e,
465
- positions: [t]
466
- });
467
+ function Te(e, t) {
468
+ if (!e) throw new Error(t);
467
469
  }
468
- function We(e) {
470
+ function tt(e) {
469
471
  return e === 9 || e === 32;
470
472
  }
471
- function b(e) {
473
+ function L(e) {
472
474
  return e >= 48 && e <= 57;
473
475
  }
474
- function ze(e) {
476
+ function nt(e) {
475
477
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
476
478
  }
477
- function pe(e) {
478
- return ze(e) || e === 95;
479
+ function xe(e) {
480
+ return nt(e) || e === 95;
479
481
  }
480
- function Ke(e) {
481
- return ze(e) || b(e) || e === 95;
482
+ function it(e) {
483
+ return nt(e) || L(e) || e === 95;
482
484
  }
483
- function Ze(e) {
484
- var t;
485
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
486
- for (let a = 0; a < e.length; ++a) {
487
- var s;
488
- let u = e[a], p = Pt(u);
489
- p !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p));
485
+ function rt(e) {
486
+ let t = Number.MAX_SAFE_INTEGER, n = null, r = -1;
487
+ for (let i = 0; i < e.length; ++i) {
488
+ let s = e[i], a = Mn(s);
489
+ a !== s.length && (n ?? (n = i), r = i, i !== 0 && a < t && (t = a));
490
490
  }
491
- return e.map((a, u) => u === 0 ? a : a.slice(n)).slice((t = i) !== null && t !== void 0 ? t : 0, r + 1);
491
+ return e.map((i, s) => s === 0 ? i : i.slice(t)).slice(n ?? 0, r + 1);
492
492
  }
493
- function Pt(e) {
493
+ function Mn(e) {
494
494
  let t = 0;
495
- for (; t < e.length && We(e.charCodeAt(t));) ++t;
495
+ for (; t < e.length && tt(e.charCodeAt(t));) ++t;
496
496
  return t;
497
497
  }
498
- function tt(e) {
498
+ function f(e, t, n) {
499
+ return new R(`Syntax Error: ${n}`, {
500
+ source: e,
501
+ positions: [t]
502
+ });
503
+ }
504
+ function Un() {
505
+ let e;
506
+ try {
507
+ let t = globalThis.process;
508
+ typeof t?.getBuiltinModule == "function" && (e = t.getBuiltinModule("node:diagnostics_channel"));
509
+ } catch {}
510
+ return e;
511
+ }
512
+ function st(e) {
513
+ if (e == null) return !1;
514
+ let t = e.hasSubscribers;
515
+ if (t !== void 0) return t;
516
+ for (let n of Bn) if (e[n].hasSubscribers) return !0;
517
+ return !1;
518
+ }
519
+ function at(e) {
499
520
  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;
500
521
  }
501
- function L(e) {
522
+ function U(e) {
502
523
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
503
524
  }
504
- function K(e, t) {
505
- return nt(e.charCodeAt(t)) && rt(e.charCodeAt(t + 1));
525
+ function re(e, t) {
526
+ return ct(e.charCodeAt(t)) && pt(e.charCodeAt(t + 1));
506
527
  }
507
- function nt(e) {
528
+ function ct(e) {
508
529
  return e >= 55296 && e <= 56319;
509
530
  }
510
- function rt(e) {
531
+ function pt(e) {
511
532
  return e >= 56320 && e <= 57343;
512
533
  }
513
- function R(e, t) {
534
+ function F(e, t) {
514
535
  let n = e.source.body.codePointAt(t);
515
536
  if (n === void 0) return o.EOF;
516
537
  if (n >= 32 && n <= 126) {
517
- let i = String.fromCodePoint(n);
518
- return i === "\"" ? `'"'` : `"${i}"`;
538
+ let r = String.fromCodePoint(n);
539
+ return r === "\"" ? `'"'` : `"${r}"`;
519
540
  }
520
541
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
521
542
  }
522
- function m(e, t, n, i, r) {
543
+ function h(e, t, n, r, i) {
523
544
  let s = e.line;
524
- return new F(t, n, i, s, 1 + n - e.lineStart, r);
545
+ return new V(t, n, r, s, 1 + n - e.lineStart, i);
525
546
  }
526
- function wt(e, t) {
527
- let n = e.source.body, i = n.length, r = t;
528
- for (; r < i;) {
529
- let s = n.charCodeAt(r);
547
+ function Gn(e, t) {
548
+ let n = e.source.body, r = n.length, i = t;
549
+ for (; i < r;) {
550
+ let s = n.charCodeAt(i);
530
551
  switch (s) {
531
552
  case 65279:
532
553
  case 9:
533
554
  case 32:
534
555
  case 44:
535
- ++r;
556
+ ++i;
536
557
  continue;
537
558
  case 10:
538
- ++r, ++e.line, e.lineStart = r;
559
+ ++i, ++e.line, e.lineStart = i;
539
560
  continue;
540
561
  case 13:
541
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
562
+ n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
542
563
  continue;
543
- case 35: return Ft(e, r);
544
- case 33: return m(e, o.BANG, r, r + 1);
545
- case 36: return m(e, o.DOLLAR, r, r + 1);
546
- case 38: return m(e, o.AMP, r, r + 1);
547
- case 40: return m(e, o.PAREN_L, r, r + 1);
548
- case 41: return m(e, o.PAREN_R, r, r + 1);
549
- case 46:
550
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46) return m(e, o.SPREAD, r, r + 3);
564
+ case 35: return Kn(e, i);
565
+ case 33: return h(e, o.BANG, i, i + 1);
566
+ case 36: return h(e, o.DOLLAR, i, i + 1);
567
+ case 38: return h(e, o.AMP, i, i + 1);
568
+ case 40: return h(e, o.PAREN_L, i, i + 1);
569
+ case 41: return h(e, o.PAREN_R, i, i + 1);
570
+ case 46: {
571
+ let a = n.charCodeAt(i + 1);
572
+ if (a === 46 && n.charCodeAt(i + 2) === 46) return h(e, o.SPREAD, i, i + 3);
573
+ if (a === 46) throw f(e.source, i, "Unexpected \"..\", did you mean \"...\"?");
574
+ if (L(a)) {
575
+ let p = e.source.body.slice(i + 1, ie(e, i + 1, a));
576
+ throw f(e.source, i, `Invalid number, expected digit before ".", did you mean "0.${p}"?`);
577
+ }
551
578
  break;
552
- case 58: return m(e, o.COLON, r, r + 1);
553
- case 61: return m(e, o.EQUALS, r, r + 1);
554
- case 64: return m(e, o.AT, r, r + 1);
555
- case 91: return m(e, o.BRACKET_L, r, r + 1);
556
- case 93: return m(e, o.BRACKET_R, r, r + 1);
557
- case 123: return m(e, o.BRACE_L, r, r + 1);
558
- case 124: return m(e, o.PIPE, r, r + 1);
559
- case 125: return m(e, o.BRACE_R, r, r + 1);
560
- case 34: return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Yt(e, r) : Vt(e, r);
561
- }
562
- if (b(s) || s === 45) return Mt(e, r, s);
563
- if (pe(s)) return jt(e, r);
564
- 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)}.`);
579
+ }
580
+ case 58: return h(e, o.COLON, i, i + 1);
581
+ case 61: return h(e, o.EQUALS, i, i + 1);
582
+ case 64: return h(e, o.AT, i, i + 1);
583
+ case 91: return h(e, o.BRACKET_L, i, i + 1);
584
+ case 93: return h(e, o.BRACKET_R, i, i + 1);
585
+ case 123: return h(e, o.BRACE_L, i, i + 1);
586
+ case 124: return h(e, o.PIPE, i, i + 1);
587
+ case 125: return h(e, o.BRACE_R, i, i + 1);
588
+ case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Xn(e, i) : Yn(e, i);
589
+ }
590
+ if (L(s) || s === 45) return jn(e, i, s);
591
+ if (xe(s)) return Hn(e, i);
592
+ 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)}.`);
565
593
  }
566
- return m(e, o.EOF, i, i);
594
+ return h(e, o.EOF, r, r);
567
595
  }
568
- function Ft(e, t) {
569
- let n = e.source.body, i = n.length, r = t + 1;
570
- for (; r < i;) {
571
- let s = n.charCodeAt(r);
596
+ function Kn(e, t) {
597
+ let n = e.source.body, r = n.length, i = t + 1;
598
+ for (; i < r;) {
599
+ let s = n.charCodeAt(i);
572
600
  if (s === 10 || s === 13) break;
573
- if (L(s)) ++r;
574
- else if (K(n, r)) r += 2;
601
+ if (U(s)) ++i;
602
+ else if (re(n, i)) i += 2;
575
603
  else break;
576
604
  }
577
- return m(e, o.COMMENT, t, r, n.slice(t + 1, r));
578
- }
579
- function Mt(e, t, n) {
580
- let i = e.source.body, r = t, s = n, a = !1;
581
- if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
582
- if (s = i.charCodeAt(++r), b(s)) throw h(e.source, r, `Invalid number, unexpected digit after 0: ${R(e, r)}.`);
583
- } else r = le(e, r, s), s = i.charCodeAt(r);
584
- 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)}.`);
585
- return m(e, a ? o.FLOAT : o.INT, t, r, i.slice(t, r));
586
- }
587
- function le(e, t, n) {
588
- if (!b(n)) throw h(e.source, t, `Invalid number, expected digit but got: ${R(e, t)}.`);
589
- let i = e.source.body, r = t + 1;
590
- for (; b(i.charCodeAt(r));) ++r;
591
- return r;
592
- }
593
- function Vt(e, t) {
594
- let n = e.source.body, i = n.length, r = t + 1, s = r, a = "";
595
- for (; r < i;) {
596
- let u = n.charCodeAt(r);
597
- if (u === 34) return a += n.slice(s, r), m(e, o.STRING, t, r + 1, a);
598
- if (u === 92) {
599
- a += n.slice(s, r);
600
- let p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Bt(e, r) : Ut(e, r) : Gt(e, r);
601
- a += p.value, r += p.size, s = r;
605
+ return h(e, o.COMMENT, t, i, n.slice(t + 1, i));
606
+ }
607
+ function jn(e, t, n) {
608
+ let r = e.source.body, i = t, s = n, a = !1;
609
+ if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
610
+ if (s = r.charCodeAt(++i), L(s)) throw f(e.source, i, `Invalid number, unexpected digit after 0: ${F(e, i)}.`);
611
+ } else i = ie(e, i, s), s = r.charCodeAt(i);
612
+ 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)}.`);
613
+ return h(e, a ? o.FLOAT : o.INT, t, i, r.slice(t, i));
614
+ }
615
+ function ie(e, t, n) {
616
+ if (!L(n)) throw f(e.source, t, `Invalid number, expected digit but got: ${F(e, t)}.`);
617
+ let r = e.source.body, i = t + 1;
618
+ for (; L(r.charCodeAt(i));) ++i;
619
+ return i;
620
+ }
621
+ function Yn(e, t) {
622
+ let n = e.source.body, r = n.length, i = t + 1, s = i, a = "";
623
+ for (; i < r;) {
624
+ let p = n.charCodeAt(i);
625
+ if (p === 34) return a += n.slice(s, i), h(e, o.STRING, t, i + 1, a);
626
+ if (p === 92) {
627
+ a += n.slice(s, i);
628
+ let E = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? qn(e, i) : Qn(e, i) : $n(e, i);
629
+ a += E.value, i += E.size, s = i;
602
630
  continue;
603
631
  }
604
- if (u === 10 || u === 13) break;
605
- if (L(u)) ++r;
606
- else if (K(n, r)) r += 2;
607
- else throw h(e.source, r, `Invalid character within String: ${R(e, r)}.`);
632
+ if (p === 10 || p === 13) break;
633
+ if (U(p)) ++i;
634
+ else if (re(n, i)) i += 2;
635
+ else throw f(e.source, i, `Invalid character within String: ${F(e, i)}.`);
608
636
  }
609
- throw h(e.source, r, "Unterminated string.");
637
+ throw f(e.source, i, "Unterminated string.");
610
638
  }
611
- function Bt(e, t) {
612
- let n = e.source.body, i = 0, r = 3;
613
- for (; r < 12;) {
614
- let s = n.charCodeAt(t + r++);
639
+ function qn(e, t) {
640
+ let n = e.source.body, r = 0, i = 3;
641
+ for (; i < 12;) {
642
+ let s = n.charCodeAt(t + i++);
615
643
  if (s === 125) {
616
- if (r < 5 || !L(i)) break;
644
+ if (i < 5 || !U(r)) break;
617
645
  return {
618
- value: String.fromCodePoint(i),
619
- size: r
646
+ value: String.fromCodePoint(r),
647
+ size: i
620
648
  };
621
649
  }
622
- if (i = i << 4 | V(s), i < 0) break;
650
+ if (r = r << 4 | q(s), r < 0) break;
623
651
  }
624
- throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + r)}".`);
652
+ throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + i)}".`);
625
653
  }
626
- function Ut(e, t) {
627
- let n = e.source.body, i = et(n, t + 2);
628
- if (L(i)) return {
629
- value: String.fromCodePoint(i),
654
+ function Qn(e, t) {
655
+ let n = e.source.body, r = ot(n, t + 2);
656
+ if (U(r)) return {
657
+ value: String.fromCodePoint(r),
630
658
  size: 6
631
659
  };
632
- if (nt(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
633
- let r = et(n, t + 8);
634
- if (rt(r)) return {
635
- value: String.fromCodePoint(i, r),
660
+ if (ct(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
661
+ let i = ot(n, t + 8);
662
+ if (pt(i)) return {
663
+ value: String.fromCodePoint(r, i),
636
664
  size: 12
637
665
  };
638
666
  }
639
- throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
667
+ throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
640
668
  }
641
- function et(e, t) {
642
- return V(e.charCodeAt(t)) << 12 | V(e.charCodeAt(t + 1)) << 8 | V(e.charCodeAt(t + 2)) << 4 | V(e.charCodeAt(t + 3));
669
+ function ot(e, t) {
670
+ return q(e.charCodeAt(t)) << 12 | q(e.charCodeAt(t + 1)) << 8 | q(e.charCodeAt(t + 2)) << 4 | q(e.charCodeAt(t + 3));
643
671
  }
644
- function V(e) {
672
+ function q(e) {
645
673
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
646
674
  }
647
- function Gt(e, t) {
675
+ function $n(e, t) {
648
676
  let n = e.source.body;
649
677
  switch (n.charCodeAt(t + 1)) {
650
678
  case 34: return {
@@ -681,220 +709,170 @@ function Gt(e, t) {
681
709
  size: 2
682
710
  };
683
711
  }
684
- throw h(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
685
- }
686
- function Yt(e, t) {
687
- let n = e.source.body, i = n.length, r = e.lineStart, s = t + 3, a = s, u = "", p = [];
688
- for (; s < i;) {
689
- let T = n.charCodeAt(s);
690
- if (T === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
691
- u += n.slice(a, s), p.push(u);
692
- let d = m(e, o.BLOCK_STRING, t, s + 3, Ze(p).join(`
712
+ throw f(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
713
+ }
714
+ function Xn(e, t) {
715
+ let n = e.source.body, r = n.length, i = e.lineStart, s = t + 3, a = s, p = "", E = [];
716
+ for (; s < r;) {
717
+ let x = n.charCodeAt(s);
718
+ if (x === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
719
+ p += n.slice(a, s), E.push(p);
720
+ let v = h(e, o.BLOCK_STRING, t, s + 3, rt(E).join(`
693
721
  `));
694
- return e.line += p.length - 1, e.lineStart = r, d;
722
+ return e.line += E.length - 1, e.lineStart = i, v;
695
723
  }
696
- if (T === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
697
- u += n.slice(a, s), a = s + 1, s += 4;
724
+ if (x === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
725
+ p += n.slice(a, s), a = s + 1, s += 4;
698
726
  continue;
699
727
  }
700
- if (T === 10 || T === 13) {
701
- u += n.slice(a, s), p.push(u), T === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, r = s;
728
+ if (x === 10 || x === 13) {
729
+ p += n.slice(a, s), E.push(p), x === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, p = "", a = s, i = s;
702
730
  continue;
703
731
  }
704
- if (L(T)) ++s;
705
- else if (K(n, s)) s += 2;
706
- else throw h(e.source, s, `Invalid character within String: ${R(e, s)}.`);
732
+ if (U(x)) ++s;
733
+ else if (re(n, s)) s += 2;
734
+ else throw f(e.source, s, `Invalid character within String: ${F(e, s)}.`);
707
735
  }
708
- throw h(e.source, s, "Unterminated string.");
736
+ throw f(e.source, s, "Unterminated string.");
709
737
  }
710
- function jt(e, t) {
711
- let n = e.source.body, i = n.length, r = t + 1;
712
- for (; r < i;) if (Ke(n.charCodeAt(r))) ++r;
738
+ function Hn(e, t) {
739
+ let n = e.source.body, r = n.length, i = t + 1;
740
+ for (; i < r;) if (it(n.charCodeAt(i))) ++i;
713
741
  else break;
714
- return m(e, o.NAME, t, r, n.slice(t, r));
742
+ return h(e, o.NAME, t, i, n.slice(t, i));
715
743
  }
716
- function Z(e, t) {
717
- if (!!!e) throw new Error(t);
744
+ function lt(e) {
745
+ return He(e, ut, B);
718
746
  }
719
- function ee(e) {
720
- return te(e, []);
747
+ function oe(e, t) {
748
+ return st(Ne) ? Ne.traceSync(() => dt(e, t), { source: e }) : dt(e, t);
721
749
  }
722
- function te(e, t) {
723
- switch (typeof e) {
724
- case "string": return JSON.stringify(e);
725
- case "function": return e.name ? `[function ${e.name}]` : "[function]";
726
- case "object": return $t(e, t);
727
- default: return String(e);
728
- }
729
- }
730
- function $t(e, t) {
731
- if (e === null) return "null";
732
- if (t.includes(e)) return "[Circular]";
733
- let n = [...t, e];
734
- if (Xt(e)) {
735
- let i = e.toJSON();
736
- if (i !== e) return typeof i == "string" ? i : te(i, n);
737
- } else if (Array.isArray(e)) return Jt(e, n);
738
- return Ht(e, n);
739
- }
740
- function Xt(e) {
741
- return typeof e.toJSON == "function";
742
- }
743
- function Ht(e, t) {
744
- let n = Object.entries(e);
745
- return n.length === 0 ? "{}" : t.length > 2 ? "[" + qt(e) + "]" : "{ " + n.map(([r, s]) => r + ": " + te(s, t)).join(", ") + " }";
746
- }
747
- function Jt(e, t) {
748
- if (e.length === 0) return "[]";
749
- if (t.length > 2) return "[Array]";
750
- let n = Math.min(10, e.length), i = e.length - n, r = [];
751
- for (let s = 0; s < n; ++s) r.push(te(e[s], t));
752
- return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
753
- }
754
- function qt(e) {
755
- let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
756
- if (t === "Object" && typeof e.constructor == "function") {
757
- let n = e.constructor.name;
758
- if (typeof n == "string" && n !== "") return n;
759
- }
760
- return t;
761
- }
762
- function st(e) {
763
- return it(e, B);
764
- }
765
- function ot(e, t) {
766
- let n = new fe(e, t), i = n.parseDocument();
767
- return Object.defineProperty(i, "tokenCount", {
750
+ function dt(e, t) {
751
+ let n = new De(e, t), r = n.parseDocument();
752
+ return Object.defineProperty(r, "tokenCount", {
768
753
  enumerable: !1,
769
754
  value: n.tokenCount
770
- }), i;
755
+ }), r;
771
756
  }
772
- function ne(e) {
757
+ function se(e) {
773
758
  let t = e.value;
774
- return at(e.kind) + (t != null ? ` "${t}"` : "");
759
+ return ft(e.kind) + (t != null ? ` "${t}"` : "");
775
760
  }
776
- function at(e) {
777
- return tt(e) ? `"${e}"` : e;
761
+ function ft(e) {
762
+ return at(e) ? `"${e}"` : e;
778
763
  }
779
- function Wt(e, t) {
764
+ function ei(e, t) {
780
765
  let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
781
766
  return Object.assign(n, t);
782
767
  }
783
- function zt(e) {
784
- let t = [], { startToken: n, endToken: i } = e.loc;
785
- for (let r = n; r !== i; r = r.next) r.kind === "Comment" && t.push({
786
- ...r,
768
+ function ti(e) {
769
+ let t = [], { startToken: n, endToken: r } = e.loc;
770
+ for (let i = n; i !== r; i = i.next) i.kind === "Comment" && t.push({
771
+ ...i,
787
772
  loc: {
788
- start: r.start,
789
- end: r.end
773
+ start: i.start,
774
+ end: i.end
790
775
  }
791
776
  });
792
777
  return t;
793
778
  }
794
- function Zt(e) {
795
- if (e?.name === "GraphQLError") {
796
- let { message: t, locations: [n] } = e;
797
- return ct(t, {
798
- loc: { start: n },
799
- cause: e
800
- });
801
- }
802
- return e;
779
+ function ii(e) {
780
+ if (!(e instanceof R)) return e;
781
+ let { message: t, locations: [n] } = e;
782
+ return mt(t, {
783
+ loc: { start: n },
784
+ cause: e
785
+ });
803
786
  }
804
- function en(e) {
787
+ function ri(e) {
805
788
  let t;
806
789
  try {
807
- t = ot(e, Kt);
790
+ t = oe(e, ni);
808
791
  } catch (n) {
809
- throw Zt(n);
792
+ throw ii(n);
810
793
  }
811
- return t.comments = zt(t), t;
794
+ return t.comments = ti(t), t;
812
795
  }
813
- var pt, de, ut, me, lt, U, ht, ie, Ee, Te, Ne, G, xe, S, Y, _e, k, l, f, $, ye, Ae, Oe, X, Ie, De, ge, Se, se, oe, ke, P, yt, Ce, H, F, ce, C, Re, be, J, q, Le, Pe, we, Fe, Me, Ve, A, Ge, Ye, $e, he, bt, Q, W, c, o, z, it, B, fe, ct, Kt, tn, nn;
796
+ var Et, ae, ht, Ae, Tt, X, yt, ce, Ie, ge, Se, H, Oe, O, J, pe, S, u, l, z, ve, ke, Ce, Z, Re, At, T, le, Le, K, St, be, D, Pe, ee, te, we, Ve, Me, Ue, Be, Ge, Ke, je, Ye, qe, Qe, Xe, _e, He, Ut, R, et, Y, V, M, c, Gt, Kt, jt, Yt, qt, Qt, $t, Xt, Ht, Jt, Wt, zt, Zt, en, tn, nn, rn, sn, on, an, cn, pn, un, ln, dn, fn, mn, hn, En, Tn, xn, yn, Nn, Dn, _n, An, In, gn, Sn, On, vn, kn, Cn, Rn, Ln, bn, Fn, Pn, wn, Vn, ye, b, Ne, Bn, o, Q, ut, B, De, mt, ni, si, oi;
814
797
  //#endregion
815
798
  __esmMin((() => {
816
- pt = Object.defineProperty;
817
- de = (e, t) => {
818
- for (var n in t) pt(e, n, {
799
+ Et = Object.defineProperty;
800
+ ae = (e, t) => {
801
+ for (var n in t) Et(e, n, {
819
802
  get: t[n],
820
803
  enumerable: !0
821
804
  });
822
805
  };
823
- ut = {};
824
- de(ut, {
825
- languages: () => Ye,
826
- options: () => $e,
827
- parsers: () => he,
828
- printers: () => nn
806
+ ht = {};
807
+ ae(ht, {
808
+ languages: () => Qe,
809
+ options: () => Xe,
810
+ parsers: () => _e,
811
+ printers: () => oi
829
812
  });
830
- me = (e, t) => (n, i, ...r) => n | 1 && i == null ? void 0 : (t.call(i) ?? i[e]).apply(i, r);
831
- lt = String.prototype.replaceAll ?? function(e, t) {
813
+ Ae = (e, t) => (n, r, ...i) => n | 1 && r == null ? void 0 : (t.call(r) ?? r[e]).apply(r, i);
814
+ Tt = String.prototype.replaceAll ?? function(e, t) {
832
815
  return e.global ? this.replace(e, t) : this.split(e).join(t);
833
- }, U = me("replaceAll", function() {
834
- if (typeof this == "string") return lt;
816
+ }, X = Ae("replaceAll", function() {
817
+ if (typeof this == "string") return Tt;
835
818
  });
836
- ht = () => {}, ie = ht;
837
- Ee = "indent";
838
- Te = "group";
839
- Ne = "if-break";
840
- G = "line";
841
- xe = "break-parent";
842
- S = ie, Y = ie;
843
- _e = { type: xe };
844
- k = { type: G }, l = {
845
- type: G,
819
+ yt = () => {}, ce = yt;
820
+ Ie = "indent";
821
+ ge = "group";
822
+ Se = "if-break";
823
+ H = "line";
824
+ Oe = "break-parent";
825
+ O = ce, J = ce;
826
+ pe = { type: Oe };
827
+ S = { type: H }, u = {
828
+ type: H,
846
829
  soft: !0
847
- }, f = [{
848
- type: G,
830
+ }, l = [{
831
+ type: H,
849
832
  hard: !0
850
- }, _e];
851
- $ = j(" "), ye = j(",; "), Ae = j(/[^\n\r]/u);
852
- Oe = (e) => e === `
833
+ }, pe];
834
+ z = W(" "), ve = W(",; "), ke = W(/[^\n\r]/);
835
+ Ce = (e) => e === `
853
836
  ` || e === "\r" || e === "\u2028" || e === "\u2029";
854
- X = mt;
855
- Ie = Et;
856
- De = Tt;
857
- ge = Nt;
858
- Se = xt;
859
- se = _t;
860
- oe = class extends Error {
837
+ Z = Dt;
838
+ Re = _t;
839
+ At = () => !0;
840
+ T = gt;
841
+ le = class extends Error {
861
842
  name = "UnexpectedNodeError";
862
- constructor(t, n, i = "type") {
863
- super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`), this.node = t;
864
- }
865
- }, ke = oe;
866
- P = null;
867
- yt = 10;
868
- for (let e = 0; e <= yt; e++) w();
869
- Ce = At, H = class {
870
- constructor(t, n, i) {
871
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
872
- }
873
- get [Symbol.toStringTag]() {
874
- return "Location";
875
- }
876
- toJSON() {
877
- return {
878
- start: this.start,
879
- end: this.end
880
- };
881
- }
882
- }, F = class {
883
- constructor(t, n, i, r, s, a) {
884
- this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null;
885
- }
886
- get [Symbol.toStringTag]() {
887
- return "Token";
888
- }
889
- toJSON() {
890
- return {
891
- kind: this.kind,
892
- value: this.value,
893
- line: this.line,
894
- column: this.column
895
- };
896
- }
897
- }, ce = {
843
+ constructor(t, n, r = "type") {
844
+ super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`), this.node = t;
845
+ }
846
+ }, Le = le;
847
+ K = null;
848
+ St = 10;
849
+ for (let e = 0; e <= St; e++) j();
850
+ be = Ot;
851
+ D = [
852
+ ["name"],
853
+ ["name", "value"],
854
+ ["type"],
855
+ [
856
+ "description",
857
+ "name",
858
+ "directives"
859
+ ],
860
+ [
861
+ "description",
862
+ "name",
863
+ "interfaces",
864
+ "directives",
865
+ "fields"
866
+ ],
867
+ ["name", "directives"],
868
+ [
869
+ "name",
870
+ "interfaces",
871
+ "directives",
872
+ "fields"
873
+ ]
874
+ ];
875
+ Pe = be({
898
876
  Name: [],
899
877
  Document: ["definitions"],
900
878
  OperationDefinition: [
@@ -911,7 +889,7 @@ __esmMin((() => {
911
889
  "defaultValue",
912
890
  "directives"
913
891
  ],
914
- Variable: ["name"],
892
+ Variable: D[0],
915
893
  SelectionSet: ["selections"],
916
894
  Field: [
917
895
  "alias",
@@ -920,8 +898,13 @@ __esmMin((() => {
920
898
  "directives",
921
899
  "selectionSet"
922
900
  ],
923
- Argument: ["name", "value"],
924
- FragmentSpread: ["name", "directives"],
901
+ Argument: D[1],
902
+ FragmentArgument: D[1],
903
+ FragmentSpread: [
904
+ "name",
905
+ "arguments",
906
+ "directives"
907
+ ],
925
908
  InlineFragment: [
926
909
  "typeCondition",
927
910
  "directives",
@@ -943,29 +926,19 @@ __esmMin((() => {
943
926
  EnumValue: [],
944
927
  ListValue: ["values"],
945
928
  ObjectValue: ["fields"],
946
- ObjectField: ["name", "value"],
929
+ ObjectField: D[1],
947
930
  Directive: ["name", "arguments"],
948
- NamedType: ["name"],
949
- ListType: ["type"],
950
- NonNullType: ["type"],
931
+ NamedType: D[0],
932
+ ListType: D[2],
933
+ NonNullType: D[2],
951
934
  SchemaDefinition: [
952
935
  "description",
953
936
  "directives",
954
937
  "operationTypes"
955
938
  ],
956
- OperationTypeDefinition: ["type"],
957
- ScalarTypeDefinition: [
958
- "description",
959
- "name",
960
- "directives"
961
- ],
962
- ObjectTypeDefinition: [
963
- "description",
964
- "name",
965
- "interfaces",
966
- "directives",
967
- "fields"
968
- ],
939
+ OperationTypeDefinition: D[2],
940
+ ScalarTypeDefinition: D[3],
941
+ ObjectTypeDefinition: D[4],
969
942
  FieldDefinition: [
970
943
  "description",
971
944
  "name",
@@ -980,13 +953,7 @@ __esmMin((() => {
980
953
  "defaultValue",
981
954
  "directives"
982
955
  ],
983
- InterfaceTypeDefinition: [
984
- "description",
985
- "name",
986
- "interfaces",
987
- "directives",
988
- "fields"
989
- ],
956
+ InterfaceTypeDefinition: D[4],
990
957
  UnionTypeDefinition: [
991
958
  "description",
992
959
  "name",
@@ -999,11 +966,7 @@ __esmMin((() => {
999
966
  "directives",
1000
967
  "values"
1001
968
  ],
1002
- EnumValueDefinition: [
1003
- "description",
1004
- "name",
1005
- "directives"
1006
- ],
969
+ EnumValueDefinition: D[3],
1007
970
  InputObjectTypeDefinition: [
1008
971
  "description",
1009
972
  "name",
@@ -1014,22 +977,14 @@ __esmMin((() => {
1014
977
  "description",
1015
978
  "name",
1016
979
  "arguments",
980
+ "directives",
1017
981
  "locations"
1018
982
  ],
1019
983
  SchemaExtension: ["directives", "operationTypes"],
1020
- ScalarTypeExtension: ["name", "directives"],
1021
- ObjectTypeExtension: [
1022
- "name",
1023
- "interfaces",
1024
- "directives",
1025
- "fields"
1026
- ],
1027
- InterfaceTypeExtension: [
1028
- "name",
1029
- "interfaces",
1030
- "directives",
1031
- "fields"
1032
- ],
984
+ DirectiveExtension: D[5],
985
+ ScalarTypeExtension: D[5],
986
+ ObjectTypeExtension: D[6],
987
+ InterfaceTypeExtension: D[6],
1033
988
  UnionTypeExtension: [
1034
989
  "name",
1035
990
  "directives",
@@ -1044,47 +999,27 @@ __esmMin((() => {
1044
999
  "name",
1045
1000
  "directives",
1046
1001
  "fields"
1047
- ],
1048
- TypeCoordinate: ["name"],
1049
- MemberCoordinate: ["name", "memberName"],
1050
- ArgumentCoordinate: [
1051
- "name",
1052
- "fieldName",
1053
- "argumentName"
1054
- ],
1055
- DirectiveCoordinate: ["name"],
1056
- DirectiveArgumentCoordinate: ["name", "argumentName"]
1057
- };
1058
- new Set(Object.keys(ce));
1059
- (function(e) {
1060
- e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
1061
- })(C || (C = {}));
1062
- Re = { ...ce };
1063
- for (let e of [
1064
- "ArgumentCoordinate",
1065
- "DirectiveArgumentCoordinate",
1066
- "DirectiveCoordinate",
1067
- "MemberCoordinate",
1068
- "TypeCoordinate"
1069
- ]) delete Re[e];
1070
- be = Ce(Re, "kind");
1071
- J = (e) => e.loc.start, q = (e) => e.loc.end;
1072
- Le = "format", Pe = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, we = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;
1073
- Fe = (e) => we.test(e), Me = (e) => Pe.test(e), Ve = (e) => `# @${Le}
1002
+ ]
1003
+ }, "kind");
1004
+ ee = (e) => e.loc.start, te = (e) => e.loc.end;
1005
+ fe.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
1006
+ we = "format", Ve = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/, Me = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;
1007
+ Ue = (e) => Me.test(e), Be = (e) => Ve.test(e), Ge = (e) => `# @${we}
1074
1008
 
1075
1009
  ${e}`;
1076
- A = It;
1077
- Ue.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
1078
- Ge = {
1079
- print: Dt,
1080
- massageAstNode: Ue,
1081
- hasPrettierIgnore: Ct,
1082
- insertPragma: Ve,
1083
- printComment: St,
1084
- canAttachComment: gt,
1085
- getVisitorKeys: be
1010
+ Ke = kt;
1011
+ je = Ct;
1012
+ Ye = Rt;
1013
+ qe = {
1014
+ print: Lt,
1015
+ massageAstNode: fe,
1016
+ hasPrettierIgnore: Pt,
1017
+ insertPragma: Ge,
1018
+ printComment: Ft,
1019
+ canAttachComment: bt,
1020
+ getVisitorKeys: Pe
1086
1021
  };
1087
- Ye = [{
1022
+ Qe = [{
1088
1023
  name: "GraphQL",
1089
1024
  type: "data",
1090
1025
  aceMode: "graphqlschema",
@@ -1098,7 +1033,7 @@ ${e}`;
1098
1033
  vscodeLanguageIds: ["graphql"],
1099
1034
  linguistLanguageId: 139
1100
1035
  }];
1101
- $e = { bracketSpacing: {
1036
+ Xe = { bracketSpacing: {
1102
1037
  bracketSpacing: {
1103
1038
  category: "Common",
1104
1039
  type: "boolean",
@@ -1158,18 +1093,20 @@ ${e}`;
1158
1093
  description: "Enforce single attribute per line in HTML, Vue and JSX."
1159
1094
  }
1160
1095
  }.bracketSpacing };
1161
- he = {};
1162
- de(he, { graphql: () => tn });
1163
- bt = /\r\n|[\n\r]/g;
1164
- Q = class e extends Error {
1165
- constructor(t, ...n) {
1166
- var i, r, s;
1167
- let { nodes: a, source: u, positions: p, path: T, originalError: d, extensions: D } = Lt(n);
1168
- 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);
1169
- let O = Qe((i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null));
1170
- 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));
1171
- let re = Xe(d?.extensions) ? d?.extensions : void 0;
1172
- this.extensions = (s = D ?? re) !== null && s !== void 0 ? s : Object.create(null), Object.defineProperties(this, {
1096
+ _e = {};
1097
+ ae(_e, { graphql: () => si });
1098
+ He = Mt;
1099
+ Ut = /\r\n|[\n\r]/g;
1100
+ R = class e extends Error {
1101
+ constructor(t, n = {}) {
1102
+ let { nodes: r, source: i, positions: s, path: a, originalError: p, cause: E, extensions: x } = n, v = "cause" in n;
1103
+ super(t, v || p != null ? { cause: v ? E : p } : void 0), this.name = "GraphQLError", this.path = a ?? void 0;
1104
+ let G = p ?? (E instanceof Error ? E : void 0);
1105
+ this.originalError = G, this.nodes = Ze(Array.isArray(r) ? r : r ? [r] : void 0);
1106
+ let k = Ze(this.nodes?.map((g) => g.loc).filter((g) => g != null));
1107
+ 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));
1108
+ let C = Je(G?.extensions) ? G.extensions : void 0;
1109
+ this.extensions = x ?? C ?? Object.create(null), Object.defineProperties(this, {
1173
1110
  message: {
1174
1111
  writable: !0,
1175
1112
  enumerable: !0
@@ -1179,11 +1116,11 @@ ${e}`;
1179
1116
  source: { enumerable: !1 },
1180
1117
  positions: { enumerable: !1 },
1181
1118
  originalError: { enumerable: !1 }
1182
- }), d != null && d.stack ? Object.defineProperty(this, "stack", {
1183
- value: d.stack,
1119
+ }), p?.stack != null ? Object.defineProperty(this, "stack", {
1120
+ value: p.stack,
1184
1121
  writable: !0,
1185
1122
  configurable: !0
1186
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
1123
+ }) : Error.captureStackTrace != null ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
1187
1124
  value: Error().stack,
1188
1125
  writable: !0,
1189
1126
  configurable: !0
@@ -1196,10 +1133,10 @@ ${e}`;
1196
1133
  let t = this.message;
1197
1134
  if (this.nodes) for (let n of this.nodes) n.loc && (t += `
1198
1135
 
1199
- ` + qe(n.loc));
1136
+ ` + Ee(n.loc));
1200
1137
  else if (this.source && this.locations) for (let n of this.locations) t += `
1201
1138
 
1202
- ` + ue(this.source, n);
1139
+ ` + ne(this.source, n);
1203
1140
  return t;
1204
1141
  }
1205
1142
  toJSON() {
@@ -1207,18 +1144,160 @@ ${e}`;
1207
1144
  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;
1208
1145
  }
1209
1146
  };
1210
- (function(e) {
1211
- 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";
1212
- })(W || (W = {}));
1213
- (function(e) {
1214
- 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";
1215
- })(c || (c = {}));
1216
- (function(e) {
1217
- 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";
1218
- })(o || (o = {}));
1219
- z = class {
1147
+ et = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty);
1148
+ Y = class {
1149
+ constructor(t, n, r) {
1150
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
1151
+ }
1152
+ get [Symbol.toStringTag]() {
1153
+ return "Location";
1154
+ }
1155
+ toJSON() {
1156
+ return {
1157
+ start: this.start,
1158
+ end: this.end
1159
+ };
1160
+ }
1161
+ }, V = class {
1162
+ constructor(t, n, r, i, s, a) {
1163
+ this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
1164
+ }
1165
+ get [Symbol.toStringTag]() {
1166
+ return "Token";
1167
+ }
1168
+ toJSON() {
1169
+ return {
1170
+ kind: this.kind,
1171
+ value: this.value,
1172
+ line: this.line,
1173
+ column: this.column
1174
+ };
1175
+ }
1176
+ };
1177
+ M = {
1178
+ QUERY: "query",
1179
+ MUTATION: "mutation",
1180
+ SUBSCRIPTION: "subscription"
1181
+ };
1182
+ c = {};
1183
+ ae(c, {
1184
+ ARGUMENT: () => $t,
1185
+ ARGUMENT_COORDINATE: () => Pn,
1186
+ BOOLEAN: () => nn,
1187
+ DIRECTIVE: () => pn,
1188
+ DIRECTIVE_ARGUMENT_COORDINATE: () => Vn,
1189
+ DIRECTIVE_COORDINATE: () => wn,
1190
+ DIRECTIVE_DEFINITION: () => In,
1191
+ DIRECTIVE_EXTENSION: () => Sn,
1192
+ DOCUMENT: () => Kt,
1193
+ ENUM: () => sn,
1194
+ ENUM_TYPE_DEFINITION: () => Dn,
1195
+ ENUM_TYPE_EXTENSION: () => Rn,
1196
+ ENUM_VALUE_DEFINITION: () => _n,
1197
+ FIELD: () => Qt,
1198
+ FIELD_DEFINITION: () => Tn,
1199
+ FLOAT: () => en,
1200
+ FRAGMENT_ARGUMENT: () => Xt,
1201
+ FRAGMENT_DEFINITION: () => Wt,
1202
+ FRAGMENT_SPREAD: () => Ht,
1203
+ INLINE_FRAGMENT: () => Jt,
1204
+ INPUT_OBJECT_TYPE_DEFINITION: () => An,
1205
+ INPUT_OBJECT_TYPE_EXTENSION: () => Ln,
1206
+ INPUT_VALUE_DEFINITION: () => xn,
1207
+ INT: () => Zt,
1208
+ INTERFACE_TYPE_DEFINITION: () => yn,
1209
+ INTERFACE_TYPE_EXTENSION: () => kn,
1210
+ LIST: () => on,
1211
+ LIST_TYPE: () => ln,
1212
+ MEMBER_COORDINATE: () => Fn,
1213
+ NAME: () => Gt,
1214
+ NAMED_TYPE: () => un,
1215
+ NON_NULL_TYPE: () => dn,
1216
+ NULL: () => rn,
1217
+ OBJECT: () => an,
1218
+ OBJECT_FIELD: () => cn,
1219
+ OBJECT_TYPE_DEFINITION: () => En,
1220
+ OBJECT_TYPE_EXTENSION: () => vn,
1221
+ OPERATION_DEFINITION: () => jt,
1222
+ OPERATION_TYPE_DEFINITION: () => mn,
1223
+ SCALAR_TYPE_DEFINITION: () => hn,
1224
+ SCALAR_TYPE_EXTENSION: () => On,
1225
+ SCHEMA_DEFINITION: () => fn,
1226
+ SCHEMA_EXTENSION: () => gn,
1227
+ SELECTION_SET: () => qt,
1228
+ STRING: () => tn,
1229
+ TYPE_COORDINATE: () => bn,
1230
+ UNION_TYPE_DEFINITION: () => Nn,
1231
+ UNION_TYPE_EXTENSION: () => Cn,
1232
+ VARIABLE: () => zt,
1233
+ VARIABLE_DEFINITION: () => Yt
1234
+ });
1235
+ 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";
1236
+ ye = {
1237
+ QUERY: "QUERY",
1238
+ MUTATION: "MUTATION",
1239
+ SUBSCRIPTION: "SUBSCRIPTION",
1240
+ FIELD: "FIELD",
1241
+ FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION",
1242
+ FRAGMENT_SPREAD: "FRAGMENT_SPREAD",
1243
+ INLINE_FRAGMENT: "INLINE_FRAGMENT",
1244
+ VARIABLE_DEFINITION: "VARIABLE_DEFINITION",
1245
+ FRAGMENT_VARIABLE_DEFINITION: "FRAGMENT_VARIABLE_DEFINITION",
1246
+ SCHEMA: "SCHEMA",
1247
+ SCALAR: "SCALAR",
1248
+ OBJECT: "OBJECT",
1249
+ FIELD_DEFINITION: "FIELD_DEFINITION",
1250
+ ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION",
1251
+ INTERFACE: "INTERFACE",
1252
+ UNION: "UNION",
1253
+ ENUM: "ENUM",
1254
+ ENUM_VALUE: "ENUM_VALUE",
1255
+ INPUT_OBJECT: "INPUT_OBJECT",
1256
+ INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION",
1257
+ DIRECTIVE_DEFINITION: "DIRECTIVE_DEFINITION"
1258
+ };
1259
+ b = Un(), Ne = b?.tracingChannel("graphql:parse");
1260
+ b?.tracingChannel("graphql:validate");
1261
+ b?.tracingChannel("graphql:execute");
1262
+ b?.tracingChannel("graphql:execute:variableCoercion");
1263
+ b?.tracingChannel("graphql:execute:rootSelectionSet");
1264
+ b?.tracingChannel("graphql:subscribe");
1265
+ b?.tracingChannel("graphql:resolve");
1266
+ Bn = [
1267
+ "start",
1268
+ "end",
1269
+ "asyncStart",
1270
+ "asyncEnd",
1271
+ "error"
1272
+ ];
1273
+ o = {
1274
+ SOF: "<SOF>",
1275
+ EOF: "<EOF>",
1276
+ BANG: "!",
1277
+ DOLLAR: "$",
1278
+ AMP: "&",
1279
+ PAREN_L: "(",
1280
+ PAREN_R: ")",
1281
+ DOT: ".",
1282
+ SPREAD: "...",
1283
+ COLON: ":",
1284
+ EQUALS: "=",
1285
+ AT: "@",
1286
+ BRACKET_L: "[",
1287
+ BRACKET_R: "]",
1288
+ BRACE_L: "{",
1289
+ PIPE: "|",
1290
+ BRACE_R: "}",
1291
+ NAME: "Name",
1292
+ INT: "Int",
1293
+ FLOAT: "Float",
1294
+ STRING: "String",
1295
+ BLOCK_STRING: "BlockString",
1296
+ COMMENT: "Comment"
1297
+ };
1298
+ Q = class {
1220
1299
  constructor(t) {
1221
- let n = new F(o.SOF, 0, 0, 0, 0);
1300
+ let n = new V(o.SOF, 0, 0, 0, 0);
1222
1301
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
1223
1302
  }
1224
1303
  get [Symbol.toStringTag]() {
@@ -1232,58 +1311,33 @@ ${e}`;
1232
1311
  if (t.kind !== o.EOF) do
1233
1312
  if (t.next) t = t.next;
1234
1313
  else {
1235
- let n = wt(this, t.end);
1314
+ let n = Gn(this, t.end);
1236
1315
  t.next = n, n.prev = t, t = n;
1237
1316
  }
1238
1317
  while (t.kind === o.COMMENT);
1239
1318
  return t;
1240
1319
  }
1241
1320
  };
1242
- it = globalThis.process && !0 ? function(t, n) {
1243
- return t instanceof n;
1244
- } : function(t, n) {
1245
- if (t instanceof n) return !0;
1246
- if (typeof t == "object" && t !== null) {
1247
- var i;
1248
- let r = n.prototype[Symbol.toStringTag];
1249
- if (r === (Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name)) {
1250
- let a = ee(t);
1251
- throw new Error(`Cannot use ${r} "${a}" from another module or realm.
1252
-
1253
- Ensure that there is only one instance of "graphql" in the node_modules
1254
- directory. If different versions of "graphql" are the dependencies of other
1255
- relied on modules, use "resolutions" to ensure only one version is installed.
1256
-
1257
- https://yarnpkg.com/en/docs/selective-version-resolutions
1258
-
1259
- Duplicate "graphql" modules cannot be used at the same time since different
1260
- versions may have different capabilities and behavior. The data from one
1261
- version used in the function from another could produce confusing and
1262
- spurious results.`);
1263
- }
1264
- }
1265
- return !1;
1266
- };
1267
- B = class {
1268
- constructor(t, n = "GraphQL request", i = {
1321
+ ut = Symbol("Source"), B = class {
1322
+ constructor(t, n = "GraphQL request", r = {
1269
1323
  line: 1,
1270
1324
  column: 1
1271
1325
  }) {
1272
- 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.");
1326
+ 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.");
1273
1327
  }
1274
1328
  get [Symbol.toStringTag]() {
1275
1329
  return "Source";
1276
1330
  }
1277
1331
  };
1278
- fe = class {
1332
+ De = class {
1279
1333
  constructor(t, n = {}) {
1280
- let { lexer: i, ...r } = n;
1281
- if (i) this._lexer = i;
1334
+ let { lexer: r, ...i } = n;
1335
+ if (r) this._lexer = r;
1282
1336
  else {
1283
- let s = st(t) ? t : new B(t);
1284
- this._lexer = new z(s);
1337
+ let s = lt(t) ? t : new B(t);
1338
+ this._lexer = new Q(s);
1285
1339
  }
1286
- this._options = r, this._tokenCounter = 0;
1340
+ this._options = i, this._tokenCounter = 0;
1287
1341
  }
1288
1342
  get tokenCount() {
1289
1343
  return this._tokenCounter;
@@ -1304,7 +1358,7 @@ spurious results.`);
1304
1358
  parseDefinition() {
1305
1359
  if (this.peek(o.BRACE_L)) return this.parseOperationDefinition();
1306
1360
  let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1307
- 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.");
1361
+ 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.");
1308
1362
  if (n.kind === o.NAME) {
1309
1363
  switch (n.value) {
1310
1364
  case "schema": return this.parseSchemaDefinition();
@@ -1322,10 +1376,8 @@ spurious results.`);
1322
1376
  case "subscription": return this.parseOperationDefinition();
1323
1377
  case "fragment": return this.parseFragmentDefinition();
1324
1378
  }
1325
- if (t) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
1326
- switch (n.value) {
1327
- case "extend": return this.parseTypeSystemExtension();
1328
- }
1379
+ if (t) throw f(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
1380
+ if (n.value === "extend") return this.parseTypeSystemExtension();
1329
1381
  }
1330
1382
  throw this.unexpected(n);
1331
1383
  }
@@ -1333,19 +1385,19 @@ spurious results.`);
1333
1385
  let t = this._lexer.token;
1334
1386
  if (this.peek(o.BRACE_L)) return this.node(t, {
1335
1387
  kind: c.OPERATION_DEFINITION,
1336
- operation: C.QUERY,
1388
+ operation: M.QUERY,
1337
1389
  description: void 0,
1338
1390
  name: void 0,
1339
- variableDefinitions: [],
1340
- directives: [],
1391
+ variableDefinitions: void 0,
1392
+ directives: void 0,
1341
1393
  selectionSet: this.parseSelectionSet()
1342
1394
  });
1343
- let n = this.parseDescription(), i = this.parseOperationType(), r;
1344
- return this.peek(o.NAME) && (r = this.parseName()), this.node(t, {
1395
+ let n = this.parseDescription(), r = this.parseOperationType(), i;
1396
+ return this.peek(o.NAME) && (i = this.parseName()), this.node(t, {
1345
1397
  kind: c.OPERATION_DEFINITION,
1346
- operation: i,
1398
+ operation: r,
1347
1399
  description: n,
1348
- name: r,
1400
+ name: i,
1349
1401
  variableDefinitions: this.parseVariableDefinitions(),
1350
1402
  directives: this.parseDirectives(!1),
1351
1403
  selectionSet: this.parseSelectionSet()
@@ -1354,9 +1406,9 @@ spurious results.`);
1354
1406
  parseOperationType() {
1355
1407
  let t = this.expectToken(o.NAME);
1356
1408
  switch (t.value) {
1357
- case "query": return C.QUERY;
1358
- case "mutation": return C.MUTATION;
1359
- case "subscription": return C.SUBSCRIPTION;
1409
+ case "query": return M.QUERY;
1410
+ case "mutation": return M.MUTATION;
1411
+ case "subscription": return M.SUBSCRIPTION;
1360
1412
  }
1361
1413
  throw this.unexpected(t);
1362
1414
  }
@@ -1390,11 +1442,11 @@ spurious results.`);
1390
1442
  return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
1391
1443
  }
1392
1444
  parseField() {
1393
- let t = this._lexer.token, n = this.parseName(), i, r;
1394
- return this.expectOptionalToken(o.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1445
+ let t = this._lexer.token, n = this.parseName(), r, i;
1446
+ return this.expectOptionalToken(o.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1395
1447
  kind: c.FIELD,
1396
- alias: i,
1397
- name: r,
1448
+ alias: r,
1449
+ name: i,
1398
1450
  arguments: this.parseArguments(!1),
1399
1451
  directives: this.parseDirectives(!1),
1400
1452
  selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1404,26 +1456,47 @@ spurious results.`);
1404
1456
  let n = t ? this.parseConstArgument : this.parseArgument;
1405
1457
  return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
1406
1458
  }
1459
+ parseFragmentArguments() {
1460
+ let t = this.parseFragmentArgument;
1461
+ return this.optionalMany(o.PAREN_L, t, o.PAREN_R);
1462
+ }
1407
1463
  parseArgument(t = !1) {
1408
- let n = this._lexer.token, i = this.parseName();
1464
+ let n = this._lexer.token, r = this.parseName();
1409
1465
  return this.expectToken(o.COLON), this.node(n, {
1410
1466
  kind: c.ARGUMENT,
1411
- name: i,
1467
+ name: r,
1412
1468
  value: this.parseValueLiteral(t)
1413
1469
  });
1414
1470
  }
1415
1471
  parseConstArgument() {
1416
1472
  return this.parseArgument(!0);
1417
1473
  }
1474
+ parseFragmentArgument() {
1475
+ let t = this._lexer.token, n = this.parseName();
1476
+ return this.expectToken(o.COLON), this.node(t, {
1477
+ kind: c.FRAGMENT_ARGUMENT,
1478
+ name: n,
1479
+ value: this.parseValueLiteral(!1)
1480
+ });
1481
+ }
1418
1482
  parseFragment() {
1419
1483
  let t = this._lexer.token;
1420
1484
  this.expectToken(o.SPREAD);
1421
1485
  let n = this.expectOptionalKeyword("on");
1422
- return !n && this.peek(o.NAME) ? this.node(t, {
1423
- kind: c.FRAGMENT_SPREAD,
1424
- name: this.parseFragmentName(),
1425
- directives: this.parseDirectives(!1)
1426
- }) : this.node(t, {
1486
+ if (!n && this.peek(o.NAME)) {
1487
+ let r = this.parseFragmentName();
1488
+ return this.peek(o.PAREN_L) && this._options.experimentalFragmentArguments ? this.node(t, {
1489
+ kind: c.FRAGMENT_SPREAD,
1490
+ name: r,
1491
+ arguments: this.parseFragmentArguments(),
1492
+ directives: this.parseDirectives(!1)
1493
+ }) : this.node(t, {
1494
+ kind: c.FRAGMENT_SPREAD,
1495
+ name: r,
1496
+ directives: this.parseDirectives(!1)
1497
+ });
1498
+ }
1499
+ return this.node(t, {
1427
1500
  kind: c.INLINE_FRAGMENT,
1428
1501
  typeCondition: n ? this.parseNamedType() : void 0,
1429
1502
  directives: this.parseDirectives(!1),
@@ -1432,7 +1505,7 @@ spurious results.`);
1432
1505
  }
1433
1506
  parseFragmentDefinition() {
1434
1507
  let t = this._lexer.token, n = this.parseDescription();
1435
- return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
1508
+ return this.expectKeyword("fragment"), this._options.experimentalFragmentArguments === !0 ? this.node(t, {
1436
1509
  kind: c.FRAGMENT_DEFINITION,
1437
1510
  description: n,
1438
1511
  name: this.parseFragmentName(),
@@ -1485,8 +1558,8 @@ spurious results.`);
1485
1558
  }
1486
1559
  case o.DOLLAR:
1487
1560
  if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
1488
- let i = this._lexer.token.value;
1489
- throw h(this._lexer.source, n.start, `Unexpected variable "$${i}" in constant value.`);
1561
+ let r = this._lexer.token.value;
1562
+ throw f(this._lexer.source, n.start, `Unexpected variable "$${r}" in constant value.`);
1490
1563
  } else throw this.unexpected(n);
1491
1564
  return this.parseVariable();
1492
1565
  default: throw this.unexpected();
@@ -1518,17 +1591,17 @@ spurious results.`);
1518
1591
  });
1519
1592
  }
1520
1593
  parseObjectField(t) {
1521
- let n = this._lexer.token, i = this.parseName();
1594
+ let n = this._lexer.token, r = this.parseName();
1522
1595
  return this.expectToken(o.COLON), this.node(n, {
1523
1596
  kind: c.OBJECT_FIELD,
1524
- name: i,
1597
+ name: r,
1525
1598
  value: this.parseValueLiteral(t)
1526
1599
  });
1527
1600
  }
1528
1601
  parseDirectives(t) {
1529
1602
  let n = [];
1530
1603
  for (; this.peek(o.AT);) n.push(this.parseDirective(t));
1531
- return n;
1604
+ if (n.length) return n;
1532
1605
  }
1533
1606
  parseConstDirectives() {
1534
1607
  return this.parseDirectives(!0);
@@ -1544,10 +1617,10 @@ spurious results.`);
1544
1617
  parseTypeReference() {
1545
1618
  let t = this._lexer.token, n;
1546
1619
  if (this.expectOptionalToken(o.BRACKET_L)) {
1547
- let i = this.parseTypeReference();
1620
+ let r = this.parseTypeReference();
1548
1621
  this.expectToken(o.BRACKET_R), n = this.node(t, {
1549
1622
  kind: c.LIST_TYPE,
1550
- type: i
1623
+ type: r
1551
1624
  });
1552
1625
  } else n = this.parseNamedType();
1553
1626
  return this.expectOptionalToken(o.BANG) ? this.node(t, {
@@ -1570,63 +1643,63 @@ spurious results.`);
1570
1643
  parseSchemaDefinition() {
1571
1644
  let t = this._lexer.token, n = this.parseDescription();
1572
1645
  this.expectKeyword("schema");
1573
- let i = this.parseConstDirectives(), r = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1646
+ let r = this.parseConstDirectives(), i = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1574
1647
  return this.node(t, {
1575
1648
  kind: c.SCHEMA_DEFINITION,
1576
1649
  description: n,
1577
- directives: i,
1578
- operationTypes: r
1650
+ directives: r,
1651
+ operationTypes: i
1579
1652
  });
1580
1653
  }
1581
1654
  parseOperationTypeDefinition() {
1582
1655
  let t = this._lexer.token, n = this.parseOperationType();
1583
1656
  this.expectToken(o.COLON);
1584
- let i = this.parseNamedType();
1657
+ let r = this.parseNamedType();
1585
1658
  return this.node(t, {
1586
1659
  kind: c.OPERATION_TYPE_DEFINITION,
1587
1660
  operation: n,
1588
- type: i
1661
+ type: r
1589
1662
  });
1590
1663
  }
1591
1664
  parseScalarTypeDefinition() {
1592
1665
  let t = this._lexer.token, n = this.parseDescription();
1593
1666
  this.expectKeyword("scalar");
1594
- let i = this.parseName(), r = this.parseConstDirectives();
1667
+ let r = this.parseName(), i = this.parseConstDirectives();
1595
1668
  return this.node(t, {
1596
1669
  kind: c.SCALAR_TYPE_DEFINITION,
1597
1670
  description: n,
1598
- name: i,
1599
- directives: r
1671
+ name: r,
1672
+ directives: i
1600
1673
  });
1601
1674
  }
1602
1675
  parseObjectTypeDefinition() {
1603
1676
  let t = this._lexer.token, n = this.parseDescription();
1604
1677
  this.expectKeyword("type");
1605
- let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1678
+ let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1606
1679
  return this.node(t, {
1607
1680
  kind: c.OBJECT_TYPE_DEFINITION,
1608
1681
  description: n,
1609
- name: i,
1610
- interfaces: r,
1682
+ name: r,
1683
+ interfaces: i,
1611
1684
  directives: s,
1612
1685
  fields: a
1613
1686
  });
1614
1687
  }
1615
1688
  parseImplementsInterfaces() {
1616
- return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : [];
1689
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : void 0;
1617
1690
  }
1618
1691
  parseFieldsDefinition() {
1619
1692
  return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R);
1620
1693
  }
1621
1694
  parseFieldDefinition() {
1622
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1695
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1623
1696
  this.expectToken(o.COLON);
1624
1697
  let s = this.parseTypeReference(), a = this.parseConstDirectives();
1625
1698
  return this.node(t, {
1626
1699
  kind: c.FIELD_DEFINITION,
1627
1700
  description: n,
1628
- name: i,
1629
- arguments: r,
1701
+ name: r,
1702
+ arguments: i,
1630
1703
  type: s,
1631
1704
  directives: a
1632
1705
  });
@@ -1635,16 +1708,16 @@ spurious results.`);
1635
1708
  return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R);
1636
1709
  }
1637
1710
  parseInputValueDef() {
1638
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1711
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1639
1712
  this.expectToken(o.COLON);
1640
- let r = this.parseTypeReference(), s;
1713
+ let i = this.parseTypeReference(), s;
1641
1714
  this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
1642
1715
  let a = this.parseConstDirectives();
1643
1716
  return this.node(t, {
1644
1717
  kind: c.INPUT_VALUE_DEFINITION,
1645
1718
  description: n,
1646
- name: i,
1647
- type: r,
1719
+ name: r,
1720
+ type: i,
1648
1721
  defaultValue: s,
1649
1722
  directives: a
1650
1723
  });
@@ -1652,12 +1725,12 @@ spurious results.`);
1652
1725
  parseInterfaceTypeDefinition() {
1653
1726
  let t = this._lexer.token, n = this.parseDescription();
1654
1727
  this.expectKeyword("interface");
1655
- let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1728
+ let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1656
1729
  return this.node(t, {
1657
1730
  kind: c.INTERFACE_TYPE_DEFINITION,
1658
1731
  description: n,
1659
- name: i,
1660
- interfaces: r,
1732
+ name: r,
1733
+ interfaces: i,
1661
1734
  directives: s,
1662
1735
  fields: a
1663
1736
  });
@@ -1665,27 +1738,27 @@ spurious results.`);
1665
1738
  parseUnionTypeDefinition() {
1666
1739
  let t = this._lexer.token, n = this.parseDescription();
1667
1740
  this.expectKeyword("union");
1668
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1741
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1669
1742
  return this.node(t, {
1670
1743
  kind: c.UNION_TYPE_DEFINITION,
1671
1744
  description: n,
1672
- name: i,
1673
- directives: r,
1745
+ name: r,
1746
+ directives: i,
1674
1747
  types: s
1675
1748
  });
1676
1749
  }
1677
1750
  parseUnionMemberTypes() {
1678
- return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : [];
1751
+ return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : void 0;
1679
1752
  }
1680
1753
  parseEnumTypeDefinition() {
1681
1754
  let t = this._lexer.token, n = this.parseDescription();
1682
1755
  this.expectKeyword("enum");
1683
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1756
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1684
1757
  return this.node(t, {
1685
1758
  kind: c.ENUM_TYPE_DEFINITION,
1686
1759
  description: n,
1687
- name: i,
1688
- directives: r,
1760
+ name: r,
1761
+ directives: i,
1689
1762
  values: s
1690
1763
  });
1691
1764
  }
@@ -1693,27 +1766,27 @@ spurious results.`);
1693
1766
  return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R);
1694
1767
  }
1695
1768
  parseEnumValueDefinition() {
1696
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1769
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1697
1770
  return this.node(t, {
1698
1771
  kind: c.ENUM_VALUE_DEFINITION,
1699
1772
  description: n,
1700
- name: i,
1701
- directives: r
1773
+ name: r,
1774
+ directives: i
1702
1775
  });
1703
1776
  }
1704
1777
  parseEnumValueName() {
1705
- 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.`);
1778
+ 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.`);
1706
1779
  return this.parseName();
1707
1780
  }
1708
1781
  parseInputObjectTypeDefinition() {
1709
1782
  let t = this._lexer.token, n = this.parseDescription();
1710
1783
  this.expectKeyword("input");
1711
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1784
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1712
1785
  return this.node(t, {
1713
1786
  kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1714
1787
  description: n,
1715
- name: i,
1716
- directives: r,
1788
+ name: r,
1789
+ directives: i,
1717
1790
  fields: s
1718
1791
  });
1719
1792
  }
@@ -1730,106 +1803,119 @@ spurious results.`);
1730
1803
  case "union": return this.parseUnionTypeExtension();
1731
1804
  case "enum": return this.parseEnumTypeExtension();
1732
1805
  case "input": return this.parseInputObjectTypeExtension();
1806
+ case "directive": return this.parseDirectiveExtension();
1733
1807
  }
1734
1808
  throw this.unexpected(t);
1735
1809
  }
1736
1810
  parseSchemaExtension() {
1737
1811
  let t = this._lexer.token;
1738
1812
  this.expectKeyword("extend"), this.expectKeyword("schema");
1739
- let n = this.parseConstDirectives(), i = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1740
- if (n.length === 0 && i.length === 0) throw this.unexpected();
1813
+ let n = this.parseConstDirectives(), r = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1814
+ if (n === void 0 && r === void 0) throw this.unexpected();
1741
1815
  return this.node(t, {
1742
1816
  kind: c.SCHEMA_EXTENSION,
1743
1817
  directives: n,
1744
- operationTypes: i
1818
+ operationTypes: r
1745
1819
  });
1746
1820
  }
1747
1821
  parseScalarTypeExtension() {
1748
1822
  let t = this._lexer.token;
1749
1823
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1750
- let n = this.parseName(), i = this.parseConstDirectives();
1751
- if (i.length === 0) throw this.unexpected();
1824
+ let n = this.parseName(), r = this.parseConstDirectives();
1825
+ if (r === void 0) throw this.unexpected();
1752
1826
  return this.node(t, {
1753
1827
  kind: c.SCALAR_TYPE_EXTENSION,
1754
1828
  name: n,
1755
- directives: i
1829
+ directives: r
1756
1830
  });
1757
1831
  }
1758
1832
  parseObjectTypeExtension() {
1759
1833
  let t = this._lexer.token;
1760
1834
  this.expectKeyword("extend"), this.expectKeyword("type");
1761
- let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1762
- if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1835
+ let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1836
+ if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
1763
1837
  return this.node(t, {
1764
1838
  kind: c.OBJECT_TYPE_EXTENSION,
1765
1839
  name: n,
1766
- interfaces: i,
1767
- directives: r,
1840
+ interfaces: r,
1841
+ directives: i,
1768
1842
  fields: s
1769
1843
  });
1770
1844
  }
1771
1845
  parseInterfaceTypeExtension() {
1772
1846
  let t = this._lexer.token;
1773
1847
  this.expectKeyword("extend"), this.expectKeyword("interface");
1774
- let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1775
- if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1848
+ let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1849
+ if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
1776
1850
  return this.node(t, {
1777
1851
  kind: c.INTERFACE_TYPE_EXTENSION,
1778
1852
  name: n,
1779
- interfaces: i,
1780
- directives: r,
1853
+ interfaces: r,
1854
+ directives: i,
1781
1855
  fields: s
1782
1856
  });
1783
1857
  }
1784
1858
  parseUnionTypeExtension() {
1785
1859
  let t = this._lexer.token;
1786
1860
  this.expectKeyword("extend"), this.expectKeyword("union");
1787
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1788
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1861
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1862
+ if (r === void 0 && i === void 0) throw this.unexpected();
1789
1863
  return this.node(t, {
1790
1864
  kind: c.UNION_TYPE_EXTENSION,
1791
1865
  name: n,
1792
- directives: i,
1793
- types: r
1866
+ directives: r,
1867
+ types: i
1794
1868
  });
1795
1869
  }
1796
1870
  parseEnumTypeExtension() {
1797
1871
  let t = this._lexer.token;
1798
1872
  this.expectKeyword("extend"), this.expectKeyword("enum");
1799
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1800
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1873
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1874
+ if (r === void 0 && i === void 0) throw this.unexpected();
1801
1875
  return this.node(t, {
1802
1876
  kind: c.ENUM_TYPE_EXTENSION,
1803
1877
  name: n,
1804
- directives: i,
1805
- values: r
1878
+ directives: r,
1879
+ values: i
1806
1880
  });
1807
1881
  }
1808
1882
  parseInputObjectTypeExtension() {
1809
1883
  let t = this._lexer.token;
1810
1884
  this.expectKeyword("extend"), this.expectKeyword("input");
1811
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1812
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1885
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1886
+ if (r === void 0 && i === void 0) throw this.unexpected();
1813
1887
  return this.node(t, {
1814
1888
  kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1815
1889
  name: n,
1816
- directives: i,
1817
- fields: r
1890
+ directives: r,
1891
+ fields: i
1892
+ });
1893
+ }
1894
+ parseDirectiveExtension() {
1895
+ let t = this._lexer.token;
1896
+ this.expectKeyword("extend"), this.expectKeyword("directive"), this.expectToken(o.AT);
1897
+ let n = this.parseName(), r = this.parseConstDirectives();
1898
+ if (r === void 0) throw this.unexpected();
1899
+ return this.node(t, {
1900
+ kind: c.DIRECTIVE_EXTENSION,
1901
+ name: n,
1902
+ directives: r
1818
1903
  });
1819
1904
  }
1820
1905
  parseDirectiveDefinition() {
1821
1906
  let t = this._lexer.token, n = this.parseDescription();
1822
1907
  this.expectKeyword("directive"), this.expectToken(o.AT);
1823
- let i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1908
+ let r = this.parseName(), i = this.parseArgumentDefs(), s = this.parseConstDirectives(), a = this.expectOptionalKeyword("repeatable");
1824
1909
  this.expectKeyword("on");
1825
- let a = this.parseDirectiveLocations();
1910
+ let p = this.parseDirectiveLocations();
1826
1911
  return this.node(t, {
1827
1912
  kind: c.DIRECTIVE_DEFINITION,
1828
1913
  description: n,
1829
- name: i,
1830
- arguments: r,
1831
- repeatable: s,
1832
- locations: a
1914
+ name: r,
1915
+ arguments: i,
1916
+ directives: s,
1917
+ repeatable: a,
1918
+ locations: p
1833
1919
  });
1834
1920
  }
1835
1921
  parseDirectiveLocations() {
@@ -1837,36 +1923,36 @@ spurious results.`);
1837
1923
  }
1838
1924
  parseDirectiveLocation() {
1839
1925
  let t = this._lexer.token, n = this.parseName();
1840
- if (Object.prototype.hasOwnProperty.call(W, n.value)) return n;
1926
+ if (et(ye, n.value)) return n;
1841
1927
  throw this.unexpected(t);
1842
1928
  }
1843
1929
  parseSchemaCoordinate() {
1844
- let t = this._lexer.token, n = this.expectOptionalToken(o.AT), i = this.parseName(), r;
1845
- !n && this.expectOptionalToken(o.DOT) && (r = this.parseName());
1930
+ let t = this._lexer.token, n = this.expectOptionalToken(o.AT), r = this.parseName(), i;
1931
+ !n && this.expectOptionalToken(o.DOT) && (i = this.parseName());
1846
1932
  let s;
1847
- 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, {
1933
+ 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, {
1848
1934
  kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1849
- name: i,
1935
+ name: r,
1850
1936
  argumentName: s
1851
1937
  }) : this.node(t, {
1852
1938
  kind: c.DIRECTIVE_COORDINATE,
1853
- name: i
1854
- }) : r ? s ? this.node(t, {
1939
+ name: r
1940
+ }) : i ? s ? this.node(t, {
1855
1941
  kind: c.ARGUMENT_COORDINATE,
1856
- name: i,
1857
- fieldName: r,
1942
+ name: r,
1943
+ fieldName: i,
1858
1944
  argumentName: s
1859
1945
  }) : this.node(t, {
1860
1946
  kind: c.MEMBER_COORDINATE,
1861
- name: i,
1862
- memberName: r
1947
+ name: r,
1948
+ memberName: i
1863
1949
  }) : this.node(t, {
1864
1950
  kind: c.TYPE_COORDINATE,
1865
- name: i
1951
+ name: r
1866
1952
  });
1867
1953
  }
1868
1954
  node(t, n) {
1869
- return this._options.noLocation !== !0 && (n.loc = new H(t, this._lexer.lastToken, this._lexer.source)), n;
1955
+ return this._options.noLocation !== !0 && (n.loc = new Y(t, this._lexer.lastToken, this._lexer.source)), n;
1870
1956
  }
1871
1957
  peek(t) {
1872
1958
  return this._lexer.token.kind === t;
@@ -1874,7 +1960,7 @@ spurious results.`);
1874
1960
  expectToken(t) {
1875
1961
  let n = this._lexer.token;
1876
1962
  if (n.kind === t) return this.advanceLexer(), n;
1877
- throw h(this._lexer.source, n.start, `Expected ${at(t)}, found ${ne(n)}.`);
1963
+ throw f(this._lexer.source, n.start, `Expected ${ft(t)}, found ${se(n)}.`);
1878
1964
  }
1879
1965
  expectOptionalToken(t) {
1880
1966
  return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
@@ -1882,7 +1968,7 @@ spurious results.`);
1882
1968
  expectKeyword(t) {
1883
1969
  let n = this._lexer.token;
1884
1970
  if (n.kind === o.NAME && n.value === t) this.advanceLexer();
1885
- else throw h(this._lexer.source, n.start, `Expected "${t}", found ${ne(n)}.`);
1971
+ else throw f(this._lexer.source, n.start, `Expected "${t}", found ${se(n)}.`);
1886
1972
  }
1887
1973
  expectOptionalKeyword(t) {
1888
1974
  let n = this._lexer.token;
@@ -1890,55 +1976,54 @@ spurious results.`);
1890
1976
  }
1891
1977
  unexpected(t) {
1892
1978
  let n = t ?? this._lexer.token;
1893
- return h(this._lexer.source, n.start, `Unexpected ${ne(n)}.`);
1979
+ return f(this._lexer.source, n.start, `Unexpected ${se(n)}.`);
1894
1980
  }
1895
- any(t, n, i) {
1981
+ any(t, n, r) {
1896
1982
  this.expectToken(t);
1897
- let r = [];
1898
- for (; !this.expectOptionalToken(i);) r.push(n.call(this));
1899
- return r;
1983
+ let i = [];
1984
+ for (; !this.expectOptionalToken(r);) i.push(n.call(this));
1985
+ return i;
1900
1986
  }
1901
- optionalMany(t, n, i) {
1987
+ optionalMany(t, n, r) {
1902
1988
  if (this.expectOptionalToken(t)) {
1903
- let r = [];
1989
+ let i = [];
1904
1990
  do
1905
- r.push(n.call(this));
1906
- while (!this.expectOptionalToken(i));
1907
- return r;
1991
+ i.push(n.call(this));
1992
+ while (!this.expectOptionalToken(r));
1993
+ return i;
1908
1994
  }
1909
- return [];
1910
1995
  }
1911
- many(t, n, i) {
1996
+ many(t, n, r) {
1912
1997
  this.expectToken(t);
1913
- let r = [];
1998
+ let i = [];
1914
1999
  do
1915
- r.push(n.call(this));
1916
- while (!this.expectOptionalToken(i));
1917
- return r;
2000
+ i.push(n.call(this));
2001
+ while (!this.expectOptionalToken(r));
2002
+ return i;
1918
2003
  }
1919
2004
  delimitedMany(t, n) {
1920
2005
  this.expectOptionalToken(t);
1921
- let i = [];
2006
+ let r = [];
1922
2007
  do
1923
- i.push(n.call(this));
2008
+ r.push(n.call(this));
1924
2009
  while (this.expectOptionalToken(t));
1925
- return i;
2010
+ return r;
1926
2011
  }
1927
2012
  advanceLexer() {
1928
2013
  let { maxTokens: t } = this._options, n = this._lexer.advance();
1929
- 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.`);
2014
+ 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.`);
1930
2015
  }
1931
2016
  };
1932
- ct = Wt;
1933
- Kt = { allowLegacyFragmentVariables: !0 };
1934
- tn = {
1935
- parse: en,
2017
+ mt = ei;
2018
+ ni = { experimentalFragmentArguments: !0 };
2019
+ si = {
2020
+ parse: ri,
1936
2021
  astFormat: "graphql",
1937
- hasPragma: Fe,
1938
- hasIgnorePragma: Me,
1939
- locStart: J,
1940
- locEnd: q
2022
+ hasPragma: Ue,
2023
+ hasIgnorePragma: Be,
2024
+ locStart: ee,
2025
+ locEnd: te
1941
2026
  };
1942
- nn = { graphql: Ge };
2027
+ oi = { graphql: qe };
1943
2028
  }))();
1944
- export { ut as default, Ye as languages, $e as options, he as parsers, nn as printers };
2029
+ export { ht as default, Qe as languages, Xe as options, _e as parsers, oi as printers };