prettier 3.0.0-alpha.4 → 3.0.0-alpha.6

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 (50) hide show
  1. package/LICENSE +849 -415
  2. package/README.md +3 -3
  3. package/doc.d.ts +248 -0
  4. package/doc.js +274 -199
  5. package/doc.mjs +269 -194
  6. package/index.cjs +380 -201
  7. package/index.d.ts +903 -0
  8. package/index.mjs +7539 -5795
  9. package/internal/cli.mjs +2025 -3219
  10. package/internal/third-party.mjs +2948 -5593
  11. package/package.json +32 -1
  12. package/plugins/acorn-and-espree.d.ts +10 -0
  13. package/plugins/acorn-and-espree.js +12 -12
  14. package/plugins/acorn-and-espree.mjs +12 -12
  15. package/plugins/angular.d.ts +12 -0
  16. package/plugins/angular.js +2 -2
  17. package/plugins/angular.mjs +2 -2
  18. package/plugins/babel.d.ts +17 -0
  19. package/plugins/babel.js +13 -13
  20. package/plugins/babel.mjs +13 -13
  21. package/plugins/flow.d.ts +9 -0
  22. package/plugins/flow.js +20 -20
  23. package/plugins/flow.mjs +20 -20
  24. package/plugins/glimmer.d.ts +9 -0
  25. package/plugins/glimmer.js +18 -17
  26. package/plugins/glimmer.mjs +18 -17
  27. package/plugins/graphql.d.ts +9 -0
  28. package/plugins/graphql.js +7 -7
  29. package/plugins/graphql.mjs +7 -7
  30. package/plugins/html.d.ts +12 -0
  31. package/plugins/html.js +17 -28
  32. package/plugins/html.mjs +17 -28
  33. package/plugins/markdown.d.ts +11 -0
  34. package/plugins/markdown.js +28 -29
  35. package/plugins/markdown.mjs +28 -29
  36. package/plugins/meriyah.d.ts +9 -0
  37. package/plugins/meriyah.js +5 -6
  38. package/plugins/meriyah.mjs +5 -6
  39. package/plugins/postcss.d.ts +11 -0
  40. package/plugins/postcss.js +32 -43
  41. package/plugins/postcss.mjs +32 -43
  42. package/plugins/typescript.d.ts +9 -0
  43. package/plugins/typescript.js +18 -27
  44. package/plugins/typescript.mjs +18 -27
  45. package/plugins/yaml.d.ts +9 -0
  46. package/plugins/yaml.js +108 -108
  47. package/plugins/yaml.mjs +108 -108
  48. package/standalone.d.ts +33 -0
  49. package/standalone.js +74 -80
  50. package/standalone.mjs +74 -80
@@ -0,0 +1,9 @@
1
+ import { Parser } from "../index.js";
2
+
3
+ declare const plugin: {
4
+ parsers: {
5
+ graphql: Parser;
6
+ };
7
+ };
8
+
9
+ export default plugin;
@@ -1,9 +1,9 @@
1
- (function(e){function n(i){var l=i();return l.default}if(typeof exports=="object"&&typeof module=="object")module.exports=n(e);else if(typeof define=="function"&&define.amd)define(function(){return n(e)});else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=n(e)}})(function(){"use strict";var B=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var be=Object.prototype.hasOwnProperty;var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>{for(var n in t)B(e,n,{get:t[n],enumerable:!0})},Fe=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Re(t))!be.call(e,i)&&i!==n&&B(e,i,{get:()=>t[i],enumerable:!(s=Le(t,i))||s.enumerable});return e};var we=e=>Fe(B({},"__esModule",{value:!0}),e);var u=m(()=>{});function ee(e){return typeof e=="object"&&e!==null}var te=m(()=>{u()});function ne(e,t){if(!Boolean(e))throw new Error(t!=null?t:"Unexpected invariant triggered.")}var ie=m(()=>{u()});function k(e,t){let n=0,s=1;for(let i of e.body.matchAll(Me)){if(typeof i.index=="number"||ne(!1),i.index>=t)break;n=i.index+i[0].length,s+=1}return{line:s,column:t+1-n}}var Me,j=m(()=>{u();ie();Me=/\r\n|[\n\r]/g});function re(e){return $(e.source,k(e.source,e.start))}function $(e,t){let n=e.locationOffset.column-1,s="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,p=t.line===1?n:0,l=t.column+p,T=`${e.name}:${a}:${l}
2
- `,E=s.split(/\r\n|[\n\r]/g),I=E[i];if(I.length>120){let x=Math.floor(l/80),V=l%80,N=[];for(let y=0;y<I.length;y+=80)N.push(I.slice(y,y+80));return T+se([[`${a} |`,N[0]],...N.slice(1,x+1).map(y=>["|",y]),["|","^".padStart(V)],["|",N[x+1]]])}return T+se([[`${a-1} |`,E[i-1]],[`${a} |`,I],["|","^".padStart(l)],[`${a+1} |`,E[i+1]]])}function se(e){let t=e.filter(([s,i])=>i!==void 0),n=Math.max(...t.map(([s])=>s.length));return t.map(([s,i])=>s.padStart(n)+(i?" "+i:"")).join(`
3
- `)}var oe=m(()=>{u();j()});function Ue(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}function ae(e){return e===void 0||e.length===0?void 0:e}var D,ce=m(()=>{u();te();j();oe();D=class extends Error{constructor(t,...n){var s,i,o;let{nodes:a,source:p,positions:l,path:T,originalError:E,extensions:I}=Ue(n);super(t),this.name="GraphQLError",this.path=T!=null?T:void 0,this.originalError=E!=null?E:void 0,this.nodes=ae(Array.isArray(a)?a:a?[a]:void 0);let x=ae((s=this.nodes)===null||s===void 0?void 0:s.map(N=>N.loc).filter(N=>N!=null));this.source=p!=null?p:x==null||(i=x[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:x==null?void 0:x.map(N=>N.start),this.locations=l&&p?l.map(N=>k(p,N)):x==null?void 0:x.map(N=>k(N.source,N.start));let V=ee(E==null?void 0:E.extensions)?E==null?void 0:E.extensions:void 0;this.extensions=(o=I!=null?I:V)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),E!=null&&E.stack?Object.defineProperty(this,"stack",{value:E.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,D):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
1
+ (function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var P=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var le=Object.prototype.hasOwnProperty;var he=(e,t)=>{for(var n in t)P(e,n,{get:t[n],enumerable:!0})},de=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pe(t))!le.call(e,i)&&i!==n&&P(e,i,{get:()=>t[i],enumerable:!(s=ue(t,i))||s.enumerable});return e};var fe=e=>de(P({},"__esModule",{value:!0}),e);var Be={};he(Be,{default:()=>Ve});function j(e){return typeof e=="object"&&e!==null}function $(e,t){if(!Boolean(e))throw new Error(t??"Unexpected invariant triggered.")}var Ee=/\r\n|[\n\r]/g;function y(e,t){let n=0,s=1;for(let i of e.body.matchAll(Ee)){if(typeof i.index=="number"||$(!1),i.index>=t)break;n=i.index+i[0].length,s+=1}return{line:s,column:t+1-n}}function Y(e){return M(e.source,y(e.source,e.start))}function M(e,t){let n=e.locationOffset.column-1,s="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,u=t.line===1?n:0,p=t.column+u,E=`${e.name}:${a}:${p}
2
+ `,d=s.split(/\r\n|[\n\r]/g),N=d[i];if(N.length>120){let m=Math.floor(p/80),w=p%80,f=[];for(let I=0;I<N.length;I+=80)f.push(N.slice(I,I+80));return E+G([[`${a} |`,f[0]],...f.slice(1,m+1).map(I=>["|",I]),["|","^".padStart(w)],["|",f[m+1]]])}return E+G([[`${a-1} |`,d[i-1]],[`${a} |`,N],["|","^".padStart(p)],[`${a+1} |`,d[i+1]]])}function G(e){let t=e.filter(([s,i])=>i!==void 0),n=Math.max(...t.map(([s])=>s.length));return t.map(([s,i])=>s.padStart(n)+(i?" "+i:"")).join(`
3
+ `)}function me(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var _=class extends Error{constructor(t,...n){var s,i,o;let{nodes:a,source:u,positions:p,path:E,originalError:d,extensions:N}=me(n);super(t),this.name="GraphQLError",this.path=E??void 0,this.originalError=d??void 0,this.nodes=J(Array.isArray(a)?a:a?[a]:void 0);let m=J((s=this.nodes)===null||s===void 0?void 0:s.map(f=>f.loc).filter(f=>f!=null));this.source=u??(m==null||(i=m[0])===null||i===void 0?void 0:i.source),this.positions=p??(m==null?void 0:m.map(f=>f.start)),this.locations=p&&u?p.map(f=>y(u,f)):m==null?void 0:m.map(f=>y(f.source,f.start));let w=j(d==null?void 0:d.extensions)?d==null?void 0:d.extensions:void 0;this.extensions=(o=N??w)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
4
4
 
5
- `+re(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
5
+ `+Y(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
6
6
 
7
- `+$(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}});function d(e,t,n){return new D(`Syntax Error: ${n}`,{source:e,positions:[t]})}var Y=m(()=>{u();ce()});var R,g,Ve,Vt,_,G=m(()=>{u();R=class{constructor(t,n,s){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},g=class{constructor(t,n,s,i,o,a){this.kind=t,this.start=n,this.end=s,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Ve={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Vt=new Set(Object.keys(Ve));(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(_||(_={}))});var b,ue=m(()=>{u();(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(b||(b={}))});var c,pe=m(()=>{u();(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}))});function le(e){return e===9||e===32}function S(e){return e>=48&&e<=57}function he(e){return e>=97&&e<=122||e>=65&&e<=90}function J(e){return he(e)||e===95}function de(e){return he(e)||S(e)||e===95}var X=m(()=>{u()});function fe(e){var t;let n=Number.MAX_SAFE_INTEGER,s=null,i=-1;for(let a=0;a<e.length;++a){var o;let p=e[a],l=Be(p);l!==p.length&&(s=(o=s)!==null&&o!==void 0?o:a,i=a,a!==0&&l<n&&(n=l))}return e.map((a,p)=>p===0?a:a.slice(n)).slice((t=s)!==null&&t!==void 0?t:0,i+1)}function Be(e){let t=0;for(;t<e.length&&le(e.charCodeAt(t));)++t;return t}var Ee=m(()=>{u();X()});var r,Q=m(()=>{u();(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",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"})(r||(r={}))});function Ne(e){return e===r.BANG||e===r.DOLLAR||e===r.AMP||e===r.PAREN_L||e===r.PAREN_R||e===r.SPREAD||e===r.COLON||e===r.EQUALS||e===r.AT||e===r.BRACKET_L||e===r.BRACKET_R||e===r.BRACE_L||e===r.PIPE||e===r.BRACE_R}function v(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function w(e,t){return Te(e.charCodeAt(t))&&xe(e.charCodeAt(t+1))}function Te(e){return e>=55296&&e<=56319}function xe(e){return e>=56320&&e<=57343}function O(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return r.EOF;if(n>=32&&n<=126){let s=String.fromCodePoint(n);return s==='"'?`'"'`:`"${s}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function f(e,t,n,s,i){let o=e.line,a=1+n-e.lineStart;return new g(t,n,s,o,a,i)}function je(e,t){let n=e.source.body,s=n.length,i=t;for(;i<s;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return $e(e,i);case 33:return f(e,r.BANG,i,i+1);case 36:return f(e,r.DOLLAR,i,i+1);case 38:return f(e,r.AMP,i,i+1);case 40:return f(e,r.PAREN_L,i,i+1);case 41:return f(e,r.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return f(e,r.SPREAD,i,i+3);break;case 58:return f(e,r.COLON,i,i+1);case 61:return f(e,r.EQUALS,i,i+1);case 64:return f(e,r.AT,i,i+1);case 91:return f(e,r.BRACKET_L,i,i+1);case 93:return f(e,r.BRACKET_R,i,i+1);case 123:return f(e,r.BRACE_L,i,i+1);case 124:return f(e,r.PIPE,i,i+1);case 125:return f(e,r.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?qe(e,i):Ge(e,i)}if(S(o)||o===45)return Ye(e,i,o);if(J(o))return ze(e,i);throw d(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:v(o)||w(n,i)?`Unexpected character: ${O(e,i)}.`:`Invalid character: ${O(e,i)}.`)}return f(e,r.EOF,s,s)}function $e(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(v(o))++i;else if(w(n,i))i+=2;else break}return f(e,r.COMMENT,t,i,n.slice(t+1,i))}function Ye(e,t,n){let s=e.source.body,i=t,o=n,a=!1;if(o===45&&(o=s.charCodeAt(++i)),o===48){if(o=s.charCodeAt(++i),S(o))throw d(e.source,i,`Invalid number, unexpected digit after 0: ${O(e,i)}.`)}else i=q(e,i,o),o=s.charCodeAt(i);if(o===46&&(a=!0,o=s.charCodeAt(++i),i=q(e,i,o),o=s.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=s.charCodeAt(++i),(o===43||o===45)&&(o=s.charCodeAt(++i)),i=q(e,i,o),o=s.charCodeAt(i)),o===46||J(o))throw d(e.source,i,`Invalid number, expected digit but got: ${O(e,i)}.`);return f(e,a?r.FLOAT:r.INT,t,i,s.slice(t,i))}function q(e,t,n){if(!S(n))throw d(e.source,t,`Invalid number, expected digit but got: ${O(e,t)}.`);let s=e.source.body,i=t+1;for(;S(s.charCodeAt(i));)++i;return i}function Ge(e,t){let n=e.source.body,s=n.length,i=t+1,o=i,a="";for(;i<s;){let p=n.charCodeAt(i);if(p===34)return a+=n.slice(o,i),f(e,r.STRING,t,i+1,a);if(p===92){a+=n.slice(o,i);let l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Je(e,i):Xe(e,i):Qe(e,i);a+=l.value,i+=l.size,o=i;continue}if(p===10||p===13)break;if(v(p))++i;else if(w(n,i))i+=2;else throw d(e.source,i,`Invalid character within String: ${O(e,i)}.`)}throw d(e.source,i,"Unterminated string.")}function Je(e,t){let n=e.source.body,s=0,i=3;for(;i<12;){let o=n.charCodeAt(t+i++);if(o===125){if(i<5||!v(s))break;return{value:String.fromCodePoint(s),size:i}}if(s=s<<4|C(o),s<0)break}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Xe(e,t){let n=e.source.body,s=me(n,t+2);if(v(s))return{value:String.fromCodePoint(s),size:6};if(Te(s)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=me(n,t+8);if(xe(i))return{value:String.fromCodePoint(s,i),size:12}}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function me(e,t){return C(e.charCodeAt(t))<<12|C(e.charCodeAt(t+1))<<8|C(e.charCodeAt(t+2))<<4|C(e.charCodeAt(t+3))}function C(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Qe(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
8
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function qe(e,t){let n=e.source.body,s=n.length,i=e.lineStart,o=t+3,a=o,p="",l=[];for(;o<s;){let T=n.charCodeAt(o);if(T===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){p+=n.slice(a,o),l.push(p);let E=f(e,r.BLOCK_STRING,t,o+3,fe(l).join(`
9
- `));return e.line+=l.length-1,e.lineStart=i,E}if(T===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){p+=n.slice(a,o),a=o+1,o+=4;continue}if(T===10||T===13){p+=n.slice(a,o),l.push(p),T===13&&n.charCodeAt(o+1)===10?o+=2:++o,p="",a=o,i=o;continue}if(v(T))++o;else if(w(n,o))o+=2;else throw d(e.source,o,`Invalid character within String: ${O(e,o)}.`)}throw d(e.source,o,"Unterminated string.")}function ze(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(de(o))++i;else break}return f(e,r.NAME,t,i,n.slice(t,i))}var F,Ie=m(()=>{u();Y();G();Ee();X();Q();F=class{constructor(t){let n=new g(r.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{let n=je(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===r.COMMENT);return t}}});function P(e,t){if(!Boolean(e))throw new Error(t)}var _e=m(()=>{u()});function Oe(e){return M(e,[])}function M(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return He(e,t);default:return String(e)}}function He(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(We(e)){let s=e.toJSON();if(s!==e)return typeof s=="string"?s:M(s,n)}else if(Array.isArray(e))return Ke(e,n);return Ze(e,n)}function We(e){return typeof e.toJSON=="function"}function Ze(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+et(e)+"]":"{ "+n.map(([i,o])=>i+": "+M(o,t)).join(", ")+" }"}function Ke(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),s=e.length-n,i=[];for(let o=0;o<n;++o)i.push(M(e[o],t));return s===1?i.push("... 1 more item"):s>1&&i.push(`... ${s} more items`),"["+i.join(", ")+"]"}function et(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var Ae=m(()=>{u()});var ye,De=m(()=>{u();ye=function(t,n){return t instanceof n}});function Se(e){return ye(e,L)}var L,ve=m(()=>{u();_e();Ae();De();L=class{constructor(t,n="GraphQL request",s={line:1,column:1}){typeof t=="string"||P(!1,`Body must be a string. Received: ${Oe(t)}.`),this.body=t,this.name=n,this.locationOffset=s,this.locationOffset.line>0||P(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||P(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});var ge={};z(ge,{Parser:()=>A,parse:()=>tt,parseConstValue:()=>it,parseType:()=>st,parseValue:()=>nt});function tt(e,t){return new A(e,t).parseDocument()}function nt(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseValueLiteral(!1);return n.expectToken(r.EOF),s}function it(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseConstValueLiteral();return n.expectToken(r.EOF),s}function st(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseTypeReference();return n.expectToken(r.EOF),s}function U(e){let t=e.value;return ke(e.kind)+(t!=null?` "${t}"`:"")}function ke(e){return Ne(e)?`"${e}"`:e}var A,Ce=m(()=>{u();Y();G();ue();pe();Ie();ve();Q();A=class{constructor(t,n={}){let s=Se(t)?t:new L(t);this._lexer=new F(s),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(r.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===r.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:_.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),s;return this.peek(r.NAME)&&(s=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(r.NAME);switch(t.value){case"query":return _.QUERY;case"mutation":return _.MUTATION;case"subscription":return _.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),s,i;return this.expectOptionalToken(r.COLON)?(s=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:s,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,n,r.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(r.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(r.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case r.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){let s=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(r.BRACKET_L,n,r.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(r.BRACE_L,n,r.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(r.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(r.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(r.BRACKET_L)){let s=this.parseTypeReference();this.expectToken(r.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:s})}else n=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let s=this.parseConstDirectives(),i=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:s,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(r.COLON);let s=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:s})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let s=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:s,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName(),i=this.parseArgumentDefs();this.expectToken(r.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:s,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);let i=this.parseTypeReference(),o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:s,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:s,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:s,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:s,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${U(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:s,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(n.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:s})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:s})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:s,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:s,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:s,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);let s=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:s,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(b,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new R(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${ke(t)}, found ${U(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===r.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${U(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===r.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${U(n)}.`)}any(t,n,s){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(s);)i.push(n.call(this));return i}optionalMany(t,n,s){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}return[]}many(t,n,s){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}delimitedMany(t,n){this.expectOptionalToken(t);let s=[];do s.push(n.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==r.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}});var lt={};z(lt,{default:()=>pt});u();u();function Pe(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var H=Pe;u();function W(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}u();function Z(e){return e.kind==="Comment"?e.start:e.loc.start}function K(e){return e.kind==="Comment"?e.end:e.loc.end}function rt(e){let t=[],{startToken:n,endToken:s}=e.loc;for(let i=n;i!==s;i=i.next)i.kind==="Comment"&&t.push(i);return t}var ot={allowLegacyFragmentVariables:!0};function at(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return H(t,{loc:{start:n},cause:e})}return e}async function ct(e){let{parse:t}=await Promise.resolve().then(()=>(Ce(),ge)),n;try{n=t(e,ot)}catch(s){throw at(s)}return n.comments=rt(n),n}var ut={parsers:{graphql:{parse:ct,astFormat:"graphql",hasPragma:W,locStart:Z,locEnd:K}}},pt=ut;return we(lt);});
7
+ `+M(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function J(e){return e===void 0||e.length===0?void 0:e}function l(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}var k=class{constructor(t,n,s){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},D=class{constructor(t,n,s,i,o,a){this.kind=t,this.start=n,this.end=s,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Ne={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},et=new Set(Object.keys(Ne));var T;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(T||(T={}));var g;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(g||(g={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function X(e){return e===9||e===32}function O(e){return e>=48&&e<=57}function Q(e){return e>=97&&e<=122||e>=65&&e<=90}function U(e){return Q(e)||e===95}function q(e){return Q(e)||O(e)||e===95}function z(e){var t;let n=Number.MAX_SAFE_INTEGER,s=null,i=-1;for(let a=0;a<e.length;++a){var o;let u=e[a],p=Te(u);p!==u.length&&(s=(o=s)!==null&&o!==void 0?o:a,i=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=s)!==null&&t!==void 0?t:0,i+1)}function Te(e){let t=0;for(;t<e.length&&X(e.charCodeAt(t));)++t;return t}var r;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",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"})(r||(r={}));var C=class{constructor(t){let n=new D(r.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{let n=xe(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===r.COMMENT);return t}};function W(e){return e===r.BANG||e===r.DOLLAR||e===r.AMP||e===r.PAREN_L||e===r.PAREN_R||e===r.SPREAD||e===r.COLON||e===r.EQUALS||e===r.AT||e===r.BRACKET_L||e===r.BRACKET_R||e===r.BRACE_L||e===r.PIPE||e===r.BRACE_R}function A(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function L(e,t){return Z(e.charCodeAt(t))&&K(e.charCodeAt(t+1))}function Z(e){return e>=55296&&e<=56319}function K(e){return e>=56320&&e<=57343}function x(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return r.EOF;if(n>=32&&n<=126){let s=String.fromCodePoint(n);return s==='"'?`'"'`:`"${s}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function h(e,t,n,s,i){let o=e.line,a=1+n-e.lineStart;return new D(t,n,s,o,a,i)}function xe(e,t){let n=e.source.body,s=n.length,i=t;for(;i<s;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Ie(e,i);case 33:return h(e,r.BANG,i,i+1);case 36:return h(e,r.DOLLAR,i,i+1);case 38:return h(e,r.AMP,i,i+1);case 40:return h(e,r.PAREN_L,i,i+1);case 41:return h(e,r.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return h(e,r.SPREAD,i,i+3);break;case 58:return h(e,r.COLON,i,i+1);case 61:return h(e,r.EQUALS,i,i+1);case 64:return h(e,r.AT,i,i+1);case 91:return h(e,r.BRACKET_L,i,i+1);case 93:return h(e,r.BRACKET_R,i,i+1);case 123:return h(e,r.BRACE_L,i,i+1);case 124:return h(e,r.PIPE,i,i+1);case 125:return h(e,r.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Se(e,i):Oe(e,i)}if(O(o)||o===45)return _e(e,i,o);if(U(o))return ve(e,i);throw l(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:A(o)||L(n,i)?`Unexpected character: ${x(e,i)}.`:`Invalid character: ${x(e,i)}.`)}return h(e,r.EOF,s,s)}function Ie(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(A(o))++i;else if(L(n,i))i+=2;else break}return h(e,r.COMMENT,t,i,n.slice(t+1,i))}function _e(e,t,n){let s=e.source.body,i=t,o=n,a=!1;if(o===45&&(o=s.charCodeAt(++i)),o===48){if(o=s.charCodeAt(++i),O(o))throw l(e.source,i,`Invalid number, unexpected digit after 0: ${x(e,i)}.`)}else i=V(e,i,o),o=s.charCodeAt(i);if(o===46&&(a=!0,o=s.charCodeAt(++i),i=V(e,i,o),o=s.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=s.charCodeAt(++i),(o===43||o===45)&&(o=s.charCodeAt(++i)),i=V(e,i,o),o=s.charCodeAt(i)),o===46||U(o))throw l(e.source,i,`Invalid number, expected digit but got: ${x(e,i)}.`);return h(e,a?r.FLOAT:r.INT,t,i,s.slice(t,i))}function V(e,t,n){if(!O(n))throw l(e.source,t,`Invalid number, expected digit but got: ${x(e,t)}.`);let s=e.source.body,i=t+1;for(;O(s.charCodeAt(i));)++i;return i}function Oe(e,t){let n=e.source.body,s=n.length,i=t+1,o=i,a="";for(;i<s;){let u=n.charCodeAt(i);if(u===34)return a+=n.slice(o,i),h(e,r.STRING,t,i+1,a);if(u===92){a+=n.slice(o,i);let p=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Ae(e,i):ye(e,i):De(e,i);a+=p.value,i+=p.size,o=i;continue}if(u===10||u===13)break;if(A(u))++i;else if(L(n,i))i+=2;else throw l(e.source,i,`Invalid character within String: ${x(e,i)}.`)}throw l(e.source,i,"Unterminated string.")}function Ae(e,t){let n=e.source.body,s=0,i=3;for(;i<12;){let o=n.charCodeAt(t+i++);if(o===125){if(i<5||!A(s))break;return{value:String.fromCodePoint(s),size:i}}if(s=s<<4|S(o),s<0)break}throw l(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function ye(e,t){let n=e.source.body,s=H(n,t+2);if(A(s))return{value:String.fromCodePoint(s),size:6};if(Z(s)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=H(n,t+8);if(K(i))return{value:String.fromCodePoint(s,i),size:12}}throw l(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function H(e,t){return S(e.charCodeAt(t))<<12|S(e.charCodeAt(t+1))<<8|S(e.charCodeAt(t+2))<<4|S(e.charCodeAt(t+3))}function S(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function De(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
8
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw l(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Se(e,t){let n=e.source.body,s=n.length,i=e.lineStart,o=t+3,a=o,u="",p=[];for(;o<s;){let E=n.charCodeAt(o);if(E===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){u+=n.slice(a,o),p.push(u);let d=h(e,r.BLOCK_STRING,t,o+3,z(p).join(`
9
+ `));return e.line+=p.length-1,e.lineStart=i,d}if(E===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){u+=n.slice(a,o),a=o+1,o+=4;continue}if(E===10||E===13){u+=n.slice(a,o),p.push(u),E===13&&n.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(A(E))++o;else if(L(n,o))o+=2;else throw l(e.source,o,`Invalid character within String: ${x(e,o)}.`)}throw l(e.source,o,"Unterminated string.")}function ve(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(q(o))++i;else break}return h(e,r.NAME,t,i,n.slice(t,i))}function R(e,t){if(!Boolean(e))throw new Error(t)}function ee(e){return b(e,[])}function b(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return ke(e,t);default:return String(e)}}function ke(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(ge(e)){let s=e.toJSON();if(s!==e)return typeof s=="string"?s:b(s,n)}else if(Array.isArray(e))return Le(e,n);return Ce(e,n)}function ge(e){return typeof e.toJSON=="function"}function Ce(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+Re(e)+"]":"{ "+n.map(([i,o])=>i+": "+b(o,t)).join(", ")+" }"}function Le(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),s=e.length-n,i=[];for(let o=0;o<n;++o)i.push(b(e[o],t));return s===1?i.push("... 1 more item"):s>1&&i.push(`... ${s} more items`),"["+i.join(", ")+"]"}function Re(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var te=function(t,n){return t instanceof n};var v=class{constructor(t,n="GraphQL request",s={line:1,column:1}){typeof t=="string"||R(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=s,this.locationOffset.line>0||R(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||R(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ne(e){return te(e,v)}function ie(e,t){return new B(e,t).parseDocument()}var B=class{constructor(t,n={}){let s=ne(t)?t:new v(t);this._lexer=new C(s),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(r.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===r.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw l(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:T.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),s;return this.peek(r.NAME)&&(s=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(r.NAME);switch(t.value){case"query":return T.QUERY;case"mutation":return T.MUTATION;case"subscription":return T.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),s,i;return this.expectOptionalToken(r.COLON)?(s=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:s,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,n,r.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(r.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(r.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case r.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){let s=this._lexer.token.value;throw l(this._lexer.source,n.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(r.BRACKET_L,n,r.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(r.BRACE_L,n,r.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(r.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(r.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(r.BRACKET_L)){let s=this.parseTypeReference();this.expectToken(r.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:s})}else n=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let s=this.parseConstDirectives(),i=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:s,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(r.COLON);let s=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:s})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let s=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:s,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName(),i=this.parseArgumentDefs();this.expectToken(r.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:s,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);let i=this.parseTypeReference(),o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:s,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:s,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:s,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:s,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw l(this._lexer.source,this._lexer.token.start,`${F(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:s,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(n.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:s})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:s})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:s,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:s,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:s,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);let s=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:s,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(g,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new k(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw l(this._lexer.source,n.start,`Expected ${se(t)}, found ${F(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===r.NAME&&n.value===t)this.advanceLexer();else throw l(this._lexer.source,n.start,`Expected "${t}", found ${F(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===r.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return l(this._lexer.source,n.start,`Unexpected ${F(n)}.`)}any(t,n,s){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(s);)i.push(n.call(this));return i}optionalMany(t,n,s){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}return[]}many(t,n,s){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}delimitedMany(t,n){this.expectOptionalToken(t);let s=[];do s.push(n.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==r.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw l(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function F(e){let t=e.value;return se(e.kind)+(t!=null?` "${t}"`:"")}function se(e){return W(e)?`"${e}"`:e}function be(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var re=be;function oe(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ae(e){return e.kind==="Comment"?e.start:e.loc.start}function ce(e){return e.kind==="Comment"?e.end:e.loc.end}function Fe(e){let t=[],{startToken:n,endToken:s}=e.loc;for(let i=n;i!==s;i=i.next)i.kind==="Comment"&&t.push(i);return t}var we={allowLegacyFragmentVariables:!0};function Pe(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return re(t,{loc:{start:n},cause:e})}return e}function Me(e){let t;try{t=ie(e,we)}catch(n){throw Pe(n)}return t.comments=Fe(t),t}var Ue={parsers:{graphql:{parse:Me,astFormat:"graphql",hasPragma:oe,locStart:ae,locEnd:ce}}},Ve=Ue;return fe(Be);});
@@ -1,9 +1,9 @@
1
- var ge=Object.defineProperty;var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>{for(var n in t)ge(e,n,{get:t[n],enumerable:!0})};var u=m(()=>{});function Z(e){return typeof e=="object"&&e!==null}var K=m(()=>{u()});function ee(e,t){if(!Boolean(e))throw new Error(t!=null?t:"Unexpected invariant triggered.")}var te=m(()=>{u()});function k(e,t){let n=0,s=1;for(let i of e.body.matchAll(Re)){if(typeof i.index=="number"||ee(!1),i.index>=t)break;n=i.index+i[0].length,s+=1}return{line:s,column:t+1-n}}var Re,B=m(()=>{u();te();Re=/\r\n|[\n\r]/g});function ie(e){return j(e.source,k(e.source,e.start))}function j(e,t){let n=e.locationOffset.column-1,s="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,p=t.line===1?n:0,l=t.column+p,T=`${e.name}:${a}:${l}
2
- `,E=s.split(/\r\n|[\n\r]/g),I=E[i];if(I.length>120){let x=Math.floor(l/80),V=l%80,N=[];for(let y=0;y<I.length;y+=80)N.push(I.slice(y,y+80));return T+ne([[`${a} |`,N[0]],...N.slice(1,x+1).map(y=>["|",y]),["|","^".padStart(V)],["|",N[x+1]]])}return T+ne([[`${a-1} |`,E[i-1]],[`${a} |`,I],["|","^".padStart(l)],[`${a+1} |`,E[i+1]]])}function ne(e){let t=e.filter(([s,i])=>i!==void 0),n=Math.max(...t.map(([s])=>s.length));return t.map(([s,i])=>s.padStart(n)+(i?" "+i:"")).join(`
3
- `)}var se=m(()=>{u();B()});function be(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}function re(e){return e===void 0||e.length===0?void 0:e}var D,oe=m(()=>{u();K();B();se();D=class extends Error{constructor(t,...n){var s,i,o;let{nodes:a,source:p,positions:l,path:T,originalError:E,extensions:I}=be(n);super(t),this.name="GraphQLError",this.path=T!=null?T:void 0,this.originalError=E!=null?E:void 0,this.nodes=re(Array.isArray(a)?a:a?[a]:void 0);let x=re((s=this.nodes)===null||s===void 0?void 0:s.map(N=>N.loc).filter(N=>N!=null));this.source=p!=null?p:x==null||(i=x[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:x==null?void 0:x.map(N=>N.start),this.locations=l&&p?l.map(N=>k(p,N)):x==null?void 0:x.map(N=>k(N.source,N.start));let V=Z(E==null?void 0:E.extensions)?E==null?void 0:E.extensions:void 0;this.extensions=(o=I!=null?I:V)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),E!=null&&E.stack?Object.defineProperty(this,"stack",{value:E.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,D):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
1
+ function B(e){return typeof e=="object"&&e!==null}function j(e,t){if(!Boolean(e))throw new Error(t??"Unexpected invariant triggered.")}var ce=/\r\n|[\n\r]/g;function y(e,t){let n=0,s=1;for(let i of e.body.matchAll(ce)){if(typeof i.index=="number"||j(!1),i.index>=t)break;n=i.index+i[0].length,s+=1}return{line:s,column:t+1-n}}function G(e){return P(e.source,y(e.source,e.start))}function P(e,t){let n=e.locationOffset.column-1,s="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,u=t.line===1?n:0,p=t.column+u,E=`${e.name}:${a}:${p}
2
+ `,d=s.split(/\r\n|[\n\r]/g),N=d[i];if(N.length>120){let m=Math.floor(p/80),w=p%80,f=[];for(let I=0;I<N.length;I+=80)f.push(N.slice(I,I+80));return E+$([[`${a} |`,f[0]],...f.slice(1,m+1).map(I=>["|",I]),["|","^".padStart(w)],["|",f[m+1]]])}return E+$([[`${a-1} |`,d[i-1]],[`${a} |`,N],["|","^".padStart(p)],[`${a+1} |`,d[i+1]]])}function $(e){let t=e.filter(([s,i])=>i!==void 0),n=Math.max(...t.map(([s])=>s.length));return t.map(([s,i])=>s.padStart(n)+(i?" "+i:"")).join(`
3
+ `)}function ue(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var _=class extends Error{constructor(t,...n){var s,i,o;let{nodes:a,source:u,positions:p,path:E,originalError:d,extensions:N}=ue(n);super(t),this.name="GraphQLError",this.path=E??void 0,this.originalError=d??void 0,this.nodes=Y(Array.isArray(a)?a:a?[a]:void 0);let m=Y((s=this.nodes)===null||s===void 0?void 0:s.map(f=>f.loc).filter(f=>f!=null));this.source=u??(m==null||(i=m[0])===null||i===void 0?void 0:i.source),this.positions=p??(m==null?void 0:m.map(f=>f.start)),this.locations=p&&u?p.map(f=>y(u,f)):m==null?void 0:m.map(f=>y(f.source,f.start));let w=B(d==null?void 0:d.extensions)?d==null?void 0:d.extensions:void 0;this.extensions=(o=N??w)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
4
4
 
5
- `+ie(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
5
+ `+G(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
6
6
 
7
- `+j(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}});function d(e,t,n){return new D(`Syntax Error: ${n}`,{source:e,positions:[t]})}var $=m(()=>{u();oe()});var R,g,Fe,Rt,_,Y=m(()=>{u();R=class{constructor(t,n,s){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},g=class{constructor(t,n,s,i,o,a){this.kind=t,this.start=n,this.end=s,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Fe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Rt=new Set(Object.keys(Fe));(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(_||(_={}))});var b,ae=m(()=>{u();(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(b||(b={}))});var c,ce=m(()=>{u();(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}))});function ue(e){return e===9||e===32}function S(e){return e>=48&&e<=57}function pe(e){return e>=97&&e<=122||e>=65&&e<=90}function G(e){return pe(e)||e===95}function le(e){return pe(e)||S(e)||e===95}var J=m(()=>{u()});function he(e){var t;let n=Number.MAX_SAFE_INTEGER,s=null,i=-1;for(let a=0;a<e.length;++a){var o;let p=e[a],l=we(p);l!==p.length&&(s=(o=s)!==null&&o!==void 0?o:a,i=a,a!==0&&l<n&&(n=l))}return e.map((a,p)=>p===0?a:a.slice(n)).slice((t=s)!==null&&t!==void 0?t:0,i+1)}function we(e){let t=0;for(;t<e.length&&ue(e.charCodeAt(t));)++t;return t}var de=m(()=>{u();J()});var r,X=m(()=>{u();(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",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"})(r||(r={}))});function Ee(e){return e===r.BANG||e===r.DOLLAR||e===r.AMP||e===r.PAREN_L||e===r.PAREN_R||e===r.SPREAD||e===r.COLON||e===r.EQUALS||e===r.AT||e===r.BRACKET_L||e===r.BRACKET_R||e===r.BRACE_L||e===r.PIPE||e===r.BRACE_R}function v(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function w(e,t){return me(e.charCodeAt(t))&&Ne(e.charCodeAt(t+1))}function me(e){return e>=55296&&e<=56319}function Ne(e){return e>=56320&&e<=57343}function O(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return r.EOF;if(n>=32&&n<=126){let s=String.fromCodePoint(n);return s==='"'?`'"'`:`"${s}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function f(e,t,n,s,i){let o=e.line,a=1+n-e.lineStart;return new g(t,n,s,o,a,i)}function Pe(e,t){let n=e.source.body,s=n.length,i=t;for(;i<s;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Me(e,i);case 33:return f(e,r.BANG,i,i+1);case 36:return f(e,r.DOLLAR,i,i+1);case 38:return f(e,r.AMP,i,i+1);case 40:return f(e,r.PAREN_L,i,i+1);case 41:return f(e,r.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return f(e,r.SPREAD,i,i+3);break;case 58:return f(e,r.COLON,i,i+1);case 61:return f(e,r.EQUALS,i,i+1);case 64:return f(e,r.AT,i,i+1);case 91:return f(e,r.BRACKET_L,i,i+1);case 93:return f(e,r.BRACKET_R,i,i+1);case 123:return f(e,r.BRACE_L,i,i+1);case 124:return f(e,r.PIPE,i,i+1);case 125:return f(e,r.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Ye(e,i):Ve(e,i)}if(S(o)||o===45)return Ue(e,i,o);if(G(o))return Ge(e,i);throw d(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:v(o)||w(n,i)?`Unexpected character: ${O(e,i)}.`:`Invalid character: ${O(e,i)}.`)}return f(e,r.EOF,s,s)}function Me(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(v(o))++i;else if(w(n,i))i+=2;else break}return f(e,r.COMMENT,t,i,n.slice(t+1,i))}function Ue(e,t,n){let s=e.source.body,i=t,o=n,a=!1;if(o===45&&(o=s.charCodeAt(++i)),o===48){if(o=s.charCodeAt(++i),S(o))throw d(e.source,i,`Invalid number, unexpected digit after 0: ${O(e,i)}.`)}else i=Q(e,i,o),o=s.charCodeAt(i);if(o===46&&(a=!0,o=s.charCodeAt(++i),i=Q(e,i,o),o=s.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=s.charCodeAt(++i),(o===43||o===45)&&(o=s.charCodeAt(++i)),i=Q(e,i,o),o=s.charCodeAt(i)),o===46||G(o))throw d(e.source,i,`Invalid number, expected digit but got: ${O(e,i)}.`);return f(e,a?r.FLOAT:r.INT,t,i,s.slice(t,i))}function Q(e,t,n){if(!S(n))throw d(e.source,t,`Invalid number, expected digit but got: ${O(e,t)}.`);let s=e.source.body,i=t+1;for(;S(s.charCodeAt(i));)++i;return i}function Ve(e,t){let n=e.source.body,s=n.length,i=t+1,o=i,a="";for(;i<s;){let p=n.charCodeAt(i);if(p===34)return a+=n.slice(o,i),f(e,r.STRING,t,i+1,a);if(p===92){a+=n.slice(o,i);let l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Be(e,i):je(e,i):$e(e,i);a+=l.value,i+=l.size,o=i;continue}if(p===10||p===13)break;if(v(p))++i;else if(w(n,i))i+=2;else throw d(e.source,i,`Invalid character within String: ${O(e,i)}.`)}throw d(e.source,i,"Unterminated string.")}function Be(e,t){let n=e.source.body,s=0,i=3;for(;i<12;){let o=n.charCodeAt(t+i++);if(o===125){if(i<5||!v(s))break;return{value:String.fromCodePoint(s),size:i}}if(s=s<<4|C(o),s<0)break}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function je(e,t){let n=e.source.body,s=fe(n,t+2);if(v(s))return{value:String.fromCodePoint(s),size:6};if(me(s)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=fe(n,t+8);if(Ne(i))return{value:String.fromCodePoint(s,i),size:12}}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function fe(e,t){return C(e.charCodeAt(t))<<12|C(e.charCodeAt(t+1))<<8|C(e.charCodeAt(t+2))<<4|C(e.charCodeAt(t+3))}function C(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function $e(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
8
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ye(e,t){let n=e.source.body,s=n.length,i=e.lineStart,o=t+3,a=o,p="",l=[];for(;o<s;){let T=n.charCodeAt(o);if(T===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){p+=n.slice(a,o),l.push(p);let E=f(e,r.BLOCK_STRING,t,o+3,he(l).join(`
9
- `));return e.line+=l.length-1,e.lineStart=i,E}if(T===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){p+=n.slice(a,o),a=o+1,o+=4;continue}if(T===10||T===13){p+=n.slice(a,o),l.push(p),T===13&&n.charCodeAt(o+1)===10?o+=2:++o,p="",a=o,i=o;continue}if(v(T))++o;else if(w(n,o))o+=2;else throw d(e.source,o,`Invalid character within String: ${O(e,o)}.`)}throw d(e.source,o,"Unterminated string.")}function Ge(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(le(o))++i;else break}return f(e,r.NAME,t,i,n.slice(t,i))}var F,Te=m(()=>{u();$();Y();de();J();X();F=class{constructor(t){let n=new g(r.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{let n=Pe(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===r.COMMENT);return t}}});function P(e,t){if(!Boolean(e))throw new Error(t)}var xe=m(()=>{u()});function Ie(e){return M(e,[])}function M(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Je(e,t);default:return String(e)}}function Je(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Xe(e)){let s=e.toJSON();if(s!==e)return typeof s=="string"?s:M(s,n)}else if(Array.isArray(e))return qe(e,n);return Qe(e,n)}function Xe(e){return typeof e.toJSON=="function"}function Qe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+ze(e)+"]":"{ "+n.map(([i,o])=>i+": "+M(o,t)).join(", ")+" }"}function qe(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),s=e.length-n,i=[];for(let o=0;o<n;++o)i.push(M(e[o],t));return s===1?i.push("... 1 more item"):s>1&&i.push(`... ${s} more items`),"["+i.join(", ")+"]"}function ze(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var _e=m(()=>{u()});var Oe,Ae=m(()=>{u();Oe=function(t,n){return t instanceof n}});function ye(e){return Oe(e,L)}var L,De=m(()=>{u();xe();_e();Ae();L=class{constructor(t,n="GraphQL request",s={line:1,column:1}){typeof t=="string"||P(!1,`Body must be a string. Received: ${Ie(t)}.`),this.body=t,this.name=n,this.locationOffset=s,this.locationOffset.line>0||P(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||P(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});var ve={};Ce(ve,{Parser:()=>A,parse:()=>He,parseConstValue:()=>Ze,parseType:()=>Ke,parseValue:()=>We});function He(e,t){return new A(e,t).parseDocument()}function We(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseValueLiteral(!1);return n.expectToken(r.EOF),s}function Ze(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseConstValueLiteral();return n.expectToken(r.EOF),s}function Ke(e,t){let n=new A(e,t);n.expectToken(r.SOF);let s=n.parseTypeReference();return n.expectToken(r.EOF),s}function U(e){let t=e.value;return Se(e.kind)+(t!=null?` "${t}"`:"")}function Se(e){return Ee(e)?`"${e}"`:e}var A,ke=m(()=>{u();$();Y();ae();ce();Te();De();X();A=class{constructor(t,n={}){let s=ye(t)?t:new L(t);this._lexer=new F(s),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(r.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===r.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:_.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),s;return this.peek(r.NAME)&&(s=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(r.NAME);switch(t.value){case"query":return _.QUERY;case"mutation":return _.MUTATION;case"subscription":return _.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),s,i;return this.expectOptionalToken(r.COLON)?(s=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:s,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,n,r.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(r.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(r.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case r.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){let s=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(r.BRACKET_L,n,r.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(r.BRACE_L,n,r.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(r.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(r.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(r.BRACKET_L)){let s=this.parseTypeReference();this.expectToken(r.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:s})}else n=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let s=this.parseConstDirectives(),i=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:s,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(r.COLON);let s=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:s})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let s=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:s,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName(),i=this.parseArgumentDefs();this.expectToken(r.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:s,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);let i=this.parseTypeReference(),o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:s,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:s,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:s,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:s,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${U(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:s,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(n.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:s})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:s})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:s,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:s,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:s,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);let s=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:s,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(b,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new R(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Se(t)}, found ${U(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===r.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${U(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===r.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${U(n)}.`)}any(t,n,s){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(s);)i.push(n.call(this));return i}optionalMany(t,n,s){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}return[]}many(t,n,s){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}delimitedMany(t,n){this.expectOptionalToken(t);let s=[];do s.push(n.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==r.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}});u();u();function Le(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var q=Le;u();function z(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}u();function H(e){return e.kind==="Comment"?e.start:e.loc.start}function W(e){return e.kind==="Comment"?e.end:e.loc.end}function et(e){let t=[],{startToken:n,endToken:s}=e.loc;for(let i=n;i!==s;i=i.next)i.kind==="Comment"&&t.push(i);return t}var tt={allowLegacyFragmentVariables:!0};function nt(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return q(t,{loc:{start:n},cause:e})}return e}async function it(e){let{parse:t}=await Promise.resolve().then(()=>(ke(),ve)),n;try{n=t(e,tt)}catch(s){throw nt(s)}return n.comments=et(n),n}var st={parsers:{graphql:{parse:it,astFormat:"graphql",hasPragma:z,locStart:H,locEnd:W}}},On=st;export{On as default};
7
+ `+P(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Y(e){return e===void 0||e.length===0?void 0:e}function l(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}var k=class{constructor(t,n,s){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=s}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},D=class{constructor(t,n,s,i,o,a){this.kind=t,this.start=n,this.end=s,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},pe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ye=new Set(Object.keys(pe));var T;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(T||(T={}));var g;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(g||(g={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function J(e){return e===9||e===32}function O(e){return e>=48&&e<=57}function X(e){return e>=97&&e<=122||e>=65&&e<=90}function M(e){return X(e)||e===95}function Q(e){return X(e)||O(e)||e===95}function q(e){var t;let n=Number.MAX_SAFE_INTEGER,s=null,i=-1;for(let a=0;a<e.length;++a){var o;let u=e[a],p=le(u);p!==u.length&&(s=(o=s)!==null&&o!==void 0?o:a,i=a,a!==0&&p<n&&(n=p))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=s)!==null&&t!==void 0?t:0,i+1)}function le(e){let t=0;for(;t<e.length&&J(e.charCodeAt(t));)++t;return t}var r;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",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"})(r||(r={}));var C=class{constructor(t){let n=new D(r.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==r.EOF)do if(t.next)t=t.next;else{let n=he(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===r.COMMENT);return t}};function H(e){return e===r.BANG||e===r.DOLLAR||e===r.AMP||e===r.PAREN_L||e===r.PAREN_R||e===r.SPREAD||e===r.COLON||e===r.EQUALS||e===r.AT||e===r.BRACKET_L||e===r.BRACKET_R||e===r.BRACE_L||e===r.PIPE||e===r.BRACE_R}function A(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function L(e,t){return W(e.charCodeAt(t))&&Z(e.charCodeAt(t+1))}function W(e){return e>=55296&&e<=56319}function Z(e){return e>=56320&&e<=57343}function x(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return r.EOF;if(n>=32&&n<=126){let s=String.fromCodePoint(n);return s==='"'?`'"'`:`"${s}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function h(e,t,n,s,i){let o=e.line,a=1+n-e.lineStart;return new D(t,n,s,o,a,i)}function he(e,t){let n=e.source.body,s=n.length,i=t;for(;i<s;){let o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return de(e,i);case 33:return h(e,r.BANG,i,i+1);case 36:return h(e,r.DOLLAR,i,i+1);case 38:return h(e,r.AMP,i,i+1);case 40:return h(e,r.PAREN_L,i,i+1);case 41:return h(e,r.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return h(e,r.SPREAD,i,i+3);break;case 58:return h(e,r.COLON,i,i+1);case 61:return h(e,r.EQUALS,i,i+1);case 64:return h(e,r.AT,i,i+1);case 91:return h(e,r.BRACKET_L,i,i+1);case 93:return h(e,r.BRACKET_R,i,i+1);case 123:return h(e,r.BRACE_L,i,i+1);case 124:return h(e,r.PIPE,i,i+1);case 125:return h(e,r.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?xe(e,i):Ee(e,i)}if(O(o)||o===45)return fe(e,i,o);if(M(o))return Ie(e,i);throw l(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:A(o)||L(n,i)?`Unexpected character: ${x(e,i)}.`:`Invalid character: ${x(e,i)}.`)}return h(e,r.EOF,s,s)}function de(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(o===10||o===13)break;if(A(o))++i;else if(L(n,i))i+=2;else break}return h(e,r.COMMENT,t,i,n.slice(t+1,i))}function fe(e,t,n){let s=e.source.body,i=t,o=n,a=!1;if(o===45&&(o=s.charCodeAt(++i)),o===48){if(o=s.charCodeAt(++i),O(o))throw l(e.source,i,`Invalid number, unexpected digit after 0: ${x(e,i)}.`)}else i=U(e,i,o),o=s.charCodeAt(i);if(o===46&&(a=!0,o=s.charCodeAt(++i),i=U(e,i,o),o=s.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=s.charCodeAt(++i),(o===43||o===45)&&(o=s.charCodeAt(++i)),i=U(e,i,o),o=s.charCodeAt(i)),o===46||M(o))throw l(e.source,i,`Invalid number, expected digit but got: ${x(e,i)}.`);return h(e,a?r.FLOAT:r.INT,t,i,s.slice(t,i))}function U(e,t,n){if(!O(n))throw l(e.source,t,`Invalid number, expected digit but got: ${x(e,t)}.`);let s=e.source.body,i=t+1;for(;O(s.charCodeAt(i));)++i;return i}function Ee(e,t){let n=e.source.body,s=n.length,i=t+1,o=i,a="";for(;i<s;){let u=n.charCodeAt(i);if(u===34)return a+=n.slice(o,i),h(e,r.STRING,t,i+1,a);if(u===92){a+=n.slice(o,i);let p=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?me(e,i):Ne(e,i):Te(e,i);a+=p.value,i+=p.size,o=i;continue}if(u===10||u===13)break;if(A(u))++i;else if(L(n,i))i+=2;else throw l(e.source,i,`Invalid character within String: ${x(e,i)}.`)}throw l(e.source,i,"Unterminated string.")}function me(e,t){let n=e.source.body,s=0,i=3;for(;i<12;){let o=n.charCodeAt(t+i++);if(o===125){if(i<5||!A(s))break;return{value:String.fromCodePoint(s),size:i}}if(s=s<<4|S(o),s<0)break}throw l(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ne(e,t){let n=e.source.body,s=z(n,t+2);if(A(s))return{value:String.fromCodePoint(s),size:6};if(W(s)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=z(n,t+8);if(Z(i))return{value:String.fromCodePoint(s,i),size:12}}throw l(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function z(e,t){return S(e.charCodeAt(t))<<12|S(e.charCodeAt(t+1))<<8|S(e.charCodeAt(t+2))<<4|S(e.charCodeAt(t+3))}function S(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Te(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
8
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw l(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function xe(e,t){let n=e.source.body,s=n.length,i=e.lineStart,o=t+3,a=o,u="",p=[];for(;o<s;){let E=n.charCodeAt(o);if(E===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){u+=n.slice(a,o),p.push(u);let d=h(e,r.BLOCK_STRING,t,o+3,q(p).join(`
9
+ `));return e.line+=p.length-1,e.lineStart=i,d}if(E===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){u+=n.slice(a,o),a=o+1,o+=4;continue}if(E===10||E===13){u+=n.slice(a,o),p.push(u),E===13&&n.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(A(E))++o;else if(L(n,o))o+=2;else throw l(e.source,o,`Invalid character within String: ${x(e,o)}.`)}throw l(e.source,o,"Unterminated string.")}function Ie(e,t){let n=e.source.body,s=n.length,i=t+1;for(;i<s;){let o=n.charCodeAt(i);if(Q(o))++i;else break}return h(e,r.NAME,t,i,n.slice(t,i))}function R(e,t){if(!Boolean(e))throw new Error(t)}function K(e){return b(e,[])}function b(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return _e(e,t);default:return String(e)}}function _e(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Oe(e)){let s=e.toJSON();if(s!==e)return typeof s=="string"?s:b(s,n)}else if(Array.isArray(e))return ye(e,n);return Ae(e,n)}function Oe(e){return typeof e.toJSON=="function"}function Ae(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+De(e)+"]":"{ "+n.map(([i,o])=>i+": "+b(o,t)).join(", ")+" }"}function ye(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),s=e.length-n,i=[];for(let o=0;o<n;++o)i.push(b(e[o],t));return s===1?i.push("... 1 more item"):s>1&&i.push(`... ${s} more items`),"["+i.join(", ")+"]"}function De(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var ee=function(t,n){return t instanceof n};var v=class{constructor(t,n="GraphQL request",s={line:1,column:1}){typeof t=="string"||R(!1,`Body must be a string. Received: ${K(t)}.`),this.body=t,this.name=n,this.locationOffset=s,this.locationOffset.line>0||R(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||R(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function te(e){return ee(e,v)}function ne(e,t){return new V(e,t).parseDocument()}var V=class{constructor(t,n={}){let s=te(t)?t:new v(t);this._lexer=new C(s),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(r.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(r.SOF,this.parseDefinition,r.EOF)})}parseDefinition(){if(this.peek(r.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===r.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw l(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(r.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:T.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),s;return this.peek(r.NAME)&&(s=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(r.NAME);switch(t.value){case"query":return T.QUERY;case"mutation":return T.MUTATION;case"subscription":return T.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(r.PAREN_L,this.parseVariableDefinition,r.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(r.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(r.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(r.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(r.BRACE_L,this.parseSelection,r.BRACE_R)})}parseSelection(){return this.peek(r.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),s,i;return this.expectOptionalToken(r.COLON)?(s=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:s,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(r.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(r.PAREN_L,n,r.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.ARGUMENT,name:s,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(r.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(r.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case r.BRACKET_L:return this.parseList(t);case r.BRACE_L:return this.parseObject(t);case r.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case r.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case r.STRING:case r.BLOCK_STRING:return this.parseStringLiteral();case r.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case r.DOLLAR:if(t)if(this.expectToken(r.DOLLAR),this._lexer.token.kind===r.NAME){let s=this._lexer.token.value;throw l(this._lexer.source,n.start,`Unexpected variable "$${s}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===r.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(r.BRACKET_L,n,r.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(r.BRACE_L,n,r.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,s=this.parseName();return this.expectToken(r.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:s,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(r.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(r.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(r.BRACKET_L)){let s=this.parseTypeReference();this.expectToken(r.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:s})}else n=this.parseNamedType();return this.expectOptionalToken(r.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(r.STRING)||this.peek(r.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let s=this.parseConstDirectives(),i=this.many(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:s,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(r.COLON);let s=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:s})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let s=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:s,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(r.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseFieldDefinition,r.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName(),i=this.parseArgumentDefs();this.expectToken(r.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:s,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(r.PAREN_L,this.parseInputValueDef,r.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseName();this.expectToken(r.COLON);let i=this.parseTypeReference(),o;this.expectOptionalToken(r.EQUALS)&&(o=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:s,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let s=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:s,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:s,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(r.EQUALS)?this.delimitedMany(r.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:s,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(r.BRACE_L,this.parseEnumValueDefinition,r.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),s=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:s,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw l(this._lexer.source,this._lexer.token.start,`${F(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let s=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:s,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(r.BRACE_L,this.parseInputValueDef,r.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===r.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),s=this.optionalMany(r.BRACE_L,this.parseOperationTypeDefinition,r.BRACE_R);if(n.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:s})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),s=this.parseConstDirectives();if(s.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:s})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(s.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:s,directives:i,fields:o})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:s,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:s,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:s,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(r.AT);let s=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:s,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(r.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(g,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new k(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw l(this._lexer.source,n.start,`Expected ${ie(t)}, found ${F(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===r.NAME&&n.value===t)this.advanceLexer();else throw l(this._lexer.source,n.start,`Expected "${t}", found ${F(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===r.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return l(this._lexer.source,n.start,`Unexpected ${F(n)}.`)}any(t,n,s){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(s);)i.push(n.call(this));return i}optionalMany(t,n,s){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}return[]}many(t,n,s){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(s));return i}delimitedMany(t,n){this.expectOptionalToken(t);let s=[];do s.push(n.call(this));while(this.expectOptionalToken(t));return s}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==r.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw l(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function F(e){let t=e.value;return ie(e.kind)+(t!=null?` "${t}"`:"")}function ie(e){return H(e)?`"${e}"`:e}function Se(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var se=Se;function re(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function oe(e){return e.kind==="Comment"?e.start:e.loc.start}function ae(e){return e.kind==="Comment"?e.end:e.loc.end}function ve(e){let t=[],{startToken:n,endToken:s}=e.loc;for(let i=n;i!==s;i=i.next)i.kind==="Comment"&&t.push(i);return t}var ke={allowLegacyFragmentVariables:!0};function ge(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return se(t,{loc:{start:n},cause:e})}return e}function Ce(e){let t;try{t=ne(e,ke)}catch(n){throw ge(n)}return t.comments=ve(t),t}var Le={parsers:{graphql:{parse:Ce,astFormat:"graphql",hasPragma:re,locStart:oe,locEnd:ae}}},St=Le;export{St as default};
@@ -0,0 +1,12 @@
1
+ import { Parser } from "../index.js";
2
+
3
+ declare const plugin: {
4
+ parsers: {
5
+ html: Parser;
6
+ angular: Parser;
7
+ vue: Parser;
8
+ lwc: Parser;
9
+ };
10
+ };
11
+
12
+ export default plugin;