var Ne=Object.defineProperty,W=(e,t)=>{for(var i in t)Ne(e,i,{get:t[i],enumerable:!0})},Ie={};W(Ie,{languages:()=>ft,options:()=>Tt,parsers:()=>le,printers:()=>ii});var ve=(e,t)=>(i,r,...n)=>i|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,n),ye=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Oe=ve("replaceAll",function(){if(typeof this=="string")return ye}),B=Oe,De=()=>{},Ae=De,xe="indent",_e="group",ke="if-break",Y="line",ge="break-parent",Ce=Ae;function v(e){return{type:xe,contents:e}}var Se={type:ge};function O(e,t={}){return Ce(t.expandedStates),{type:_e,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function A(e,t="",i={}){return{type:ke,breakContents:e,flatContents:t,groupId:i.groupId}}function E(e,t){let i=[];for(let r=0;r<t.length;r++)r!==0&&i.push(e),i.push(t[r]);return i}var S={type:Y},p={type:Y,soft:!0},Re={type:Y,hard:!0},h=[Re,Se];function q(e){return(t,i,r)=>{let n=!!r?.backwards;if(i===!1)return!1;let{length:s}=t,o=i;for(;o>=0&&o<s;){let c=t.charAt(o);if(e instanceof RegExp){if(!e.test(c))return o}else if(!e.includes(c))return o;n?o--:o++}return o===-1||o===s?o:!1}}var Z=q(" 	"),be=q(",; 	"),Le=q(/[^\n\r]/u),J=e=>e===`
`||e==="\r"||e==="\u2028"||e==="\u2029";function Fe(e,t,i){let r=!!i?.backwards;if(t===!1)return!1;let n=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&n===`
`)return t-2;if(J(n))return t-1}else{if(n==="\r"&&e.charAt(t+1)===`
`)return t+2;if(J(n))return t+1}return t}var ee=Fe;function we(e,t,i={}){let r=Z(e,i.backwards?t-1:t,i),n=ee(e,r,i);return r!==n}var Pe=we;function Me(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let i=t+2;i<e.length;++i)if(e.charAt(i)==="*"&&e.charAt(i+1)==="/")return i+2}return t}var Ue=Me;function Ve(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Le(e,t):t}var Be=Ve;function je(e,t){let i=null,r=t;for(;r!==i;)i=r,r=be(e,r),r=Ue(e,r),r=Z(e,r);return r=Be(e,r),r=ee(e,r),r!==!1&&Pe(e,r)}var Ke=je;function $e(e){return Array.isArray(e)&&e.length>0}var te=$e,Ge=class extends Error{name="UnexpectedNodeError";constructor(e,t,i="type"){super(`Unexpected ${t} node ${i}: ${JSON.stringify(e[i])}.`),this.node=e}},Ye=Ge,b=null;function F(e){if(b!==null&&typeof b.property){let t=b;return b=F.prototype=null,t}return b=F.prototype=e??Object.create(null),new F}var qe=10;for(let e=0;e<=qe;e++)F();function Je(e){return F(e)}function Qe(e,t="type"){Je(e);function i(r){let n=r[t],s=e[n];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return s}return i}var Xe=Qe,ze=class{constructor(e,t,i){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ie=class{constructor(e,t,i,r,n,s){this.kind=e,this.start=t,this.end=i,this.line=r,this.column=n,this.value=s,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:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]};new Set(Object.keys(ne));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var re={...ne};for(let e of["ArgumentCoordinate","DirectiveArgumentCoordinate","DirectiveCoordinate","MemberCoordinate","TypeCoordinate"])delete re[e];var He=re,We=Xe(He,"kind"),Ze=We,se=e=>e.loc.start,ae=e=>e.loc.end,et="format",tt=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u,it=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u,nt=e=>it.test(e),rt=e=>tt.test(e),st=e=>`# @${et}

${e}`;function at(e,t,i){let{node:r}=e;if(!r.description)return"";let n=[i("description")];return r.kind==="InputValueDefinition"&&!r.description.block?n.push(S):n.push(h),n}var y=at;function ot(e,t,i){let{node:r}=e;switch(r.kind){case"Document":return[...E(h,D(e,t,i,"definitions")),h];case"OperationDefinition":{let n=t.originalText[se(r)]!=="{",s=!!r.name;return[y(e,t,i),n?r.operation:"",n&&s?[" ",i("name")]:"",n&&!s&&te(r.variableDefinitions)?" ":"",Q(e,i),T(e,i,r),!n&&!s?"":" ",i("selectionSet")]}case"FragmentDefinition":return[y(e,t,i),"fragment ",i("name"),Q(e,i)," on ",i("typeCondition"),T(e,i,r)," ",i("selectionSet")];case"SelectionSet":return["{",v([h,E(h,D(e,t,i,"selections"))]),h,"}"];case"Field":return O([r.alias?[i("alias"),": "]:"",i("name"),r.arguments.length>0?O(["(",v([p,E([A("",", "),p],D(e,t,i,"arguments"))]),p,")"]):"",T(e,i,r),r.selectionSet?" ":"",i("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let n=B(0,r.value,'"""','\\"""').split(`
`);return n.length===1&&(n[0]=n[0].trim()),n.every(s=>s==="")&&(n.length=0),E(h,['"""',...n,'"""'])}return['"',B(0,B(0,r.value,/["\\]/gu,"\\$&"),`
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",i("name")];case"ListValue":return O(["[",v([p,E([A("",", "),p],e.map(i,"values"))]),p,"]"]);case"ObjectValue":{let n=t.bracketSpacing&&r.fields.length>0?" ":"";return O(["{",n,v([p,E([A("",", "),p],e.map(i,"fields"))]),p,A("",n),"}"])}case"ObjectField":case"Argument":return[i("name"),": ",i("value")];case"Directive":return["@",i("name"),r.arguments.length>0?O(["(",v([p,E([A("",", "),p],D(e,t,i,"arguments"))]),p,")"]):""];case"NamedType":return i("name");case"VariableDefinition":return[y(e,t,i),i("variable"),": ",i("type"),r.defaultValue?[" = ",i("defaultValue")]:"",T(e,i,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:n}=r,s=[];return n.endsWith("TypeDefinition")?s.push(y(e,t,i)):s.push("extend "),n.startsWith("ObjectType")?s.push("type"):n.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",i("name")),!n.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...ut(e,t,i)),s.push(T(e,i,r)),r.fields.length>0&&s.push([" {",v([h,E(h,D(e,t,i,"fields"))]),h,"}"]),s}case"FieldDefinition":return[y(e,t,i),i("name"),r.arguments.length>0?O(["(",v([p,E([A("",", "),p],D(e,t,i,"arguments"))]),p,")"]):"",": ",i("type"),T(e,i,r)];case"DirectiveDefinition":return[y(e,t,i),"directive ","@",i("name"),r.arguments.length>0?O(["(",v([p,E([A("",", "),p],D(e,t,i,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(i,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[y(e,t,i),r.kind==="EnumTypeExtension"?"extend ":"","enum ",i("name"),T(e,i,r),r.values.length>0?[" {",v([h,E(h,D(e,t,i,"values"))]),h,"}"]:""];case"EnumValueDefinition":return[y(e,t,i),i("name"),T(e,i,r)];case"InputValueDefinition":return[y(e,t,i),i("name"),": ",i("type"),r.defaultValue?[" = ",i("defaultValue")]:"",T(e,i,r)];case"SchemaExtension":return["extend schema",T(e,i,r),...r.operationTypes.length>0?[" {",v([h,E(h,D(e,t,i,"operationTypes"))]),h,"}"]:[]];case"SchemaDefinition":return[y(e,t,i),"schema",T(e,i,r)," {",r.operationTypes.length>0?v([h,E(h,D(e,t,i,"operationTypes"))]):"",h,"}"];case"OperationTypeDefinition":return[r.operation,": ",i("type")];case"FragmentSpread":return["...",i("name"),T(e,i,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",i("typeCondition")]:"",T(e,i,r)," ",i("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return O([y(e,t,i),O([r.kind==="UnionTypeExtension"?"extend ":"","union ",i("name"),T(e,i,r),r.types.length>0?[" =",A(""," "),v([A([S,"| "]),E([S,"| "],e.map(i,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[y(e,t,i),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",i("name"),T(e,i,r)];case"NonNullType":return[i("type"),"!"];case"ListType":return["[",i("type"),"]"];default:throw new Ye(r,"Graphql","kind")}}function T(e,t,i){if(i.directives.length===0)return"";let r=E(S,e.map(t,"directives"));return i.kind==="FragmentDefinition"||i.kind==="OperationDefinition"?O([S,r]):[" ",O(v([p,r]))]}function D(e,t,i,r){return e.map(({isLast:n,node:s})=>{let o=i();return!n&&Ke(t.originalText,ae(s))?[o,h]:o},r)}function lt(e){return e.kind!=="Comment"}function ct({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function ut(e,t,i){let{node:r}=e,n=[],{interfaces:s}=r,o=e.map(i,"interfaces");for(let c=0;c<s.length;c++){let u=s[c];n.push(o[c]);let N=s[c+1];if(N){let I=t.originalText.slice(u.loc.end,N.loc.start).includes("#");n.push(" &",I?S:" ")}}return n}function Q(e,t){let{node:i}=e;return te(i.variableDefinitions)?O(["(",v([p,E([A("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function oe(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
`)&&(t.value=e.value.trim())}oe.ignoredProperties=new Set(["loc","comments"]);function pt(e){let{node:t}=e;return t?.comments?.some(i=>i.value.trim()==="prettier-ignore")}var ht={print:ot,massageAstNode:oe,hasPrettierIgnore:pt,insertPragma:st,printComment:ct,canAttachComment:lt,getVisitorKeys:Ze},dt=ht,ft=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],Et={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."}},mt={bracketSpacing:Et.bracketSpacing},Tt=mt,le={};W(le,{graphql:()=>ti});function Nt(e){return typeof e=="object"&&e!==null}function It(e,t){throw new Error("Unexpected invariant triggered.")}var vt=/\r\n|[\n\r]/g;function $(e,t){let i=0,r=1;for(let n of e.body.matchAll(vt)){if(typeof n.index=="number"||It(),n.index>=t)break;i=n.index+n[0].length,r+=1}return{line:r,column:t+1-i}}function yt(e){return ce(e.source,$(e.source,e.start))}function ce(e,t){let i=e.locationOffset.column-1,r="".padStart(i)+e.body,n=t.line-1,s=e.locationOffset.line-1,o=t.line+s,c=t.line===1?i:0,u=t.column+c,N=`${e.name}:${o}:${u}
`,I=r.split(/\r\n|[\n\r]/g),k=I[n];if(k.length>120){let x=Math.floor(u/80),V=u%80,m=[];for(let g=0;g<k.length;g+=80)m.push(k.slice(g,g+80));return N+X([[`${o} |`,m[0]],...m.slice(1,x+1).map(g=>["|",g]),["|","^".padStart(V)],["|",m[x+1]]])}return N+X([[`${o-1} |`,I[n-1]],[`${o} |`,k],["|","^".padStart(u)],[`${o+1} |`,I[n+1]]])}function X(e){let t=e.filter(([r,n])=>n!==void 0),i=Math.max(...t.map(([r])=>r.length));return t.map(([r,n])=>r.padStart(i)+(n?" "+n:"")).join(`
`)}function Ot(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 Dt=class ue extends Error{constructor(t,...i){var r,n,s;let{nodes:o,source:c,positions:u,path:N,originalError:I,extensions:k}=Ot(i);super(t),this.name="GraphQLError",this.path=N??void 0,this.originalError=I??void 0,this.nodes=z(Array.isArray(o)?o:o?[o]:void 0);let x=z((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=c??(x==null||(n=x[0])===null||n===void 0?void 0:n.source),this.positions=u??x?.map(m=>m.start),this.locations=u&&c?u.map(m=>$(c,m)):x?.map(m=>$(m.source,m.start));let V=Nt(I?.extensions)?I?.extensions:void 0;this.extensions=(s=k??V)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),I!=null&&I.stack?Object.defineProperty(this,"stack",{value:I.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,ue):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 i of this.nodes)i.loc&&(t+=`

`+yt(i.loc));else if(this.source&&this.locations)for(let i of this.locations)t+=`

`+ce(this.source,i);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 z(e){return e===void 0||e.length===0?void 0:e}function f(e,t,i){return new Dt(`Syntax Error: ${i}`,{source:e,positions:[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 l;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(l||(l={}));function At(e){return e===9||e===32}function w(e){return e>=48&&e<=57}function pe(e){return e>=97&&e<=122||e>=65&&e<=90}function he(e){return pe(e)||e===95}function xt(e){return pe(e)||w(e)||e===95}function _t(e){var t;let i=Number.MAX_SAFE_INTEGER,r=null,n=-1;for(let o=0;o<e.length;++o){var s;let c=e[o],u=kt(c);u!==c.length&&(r=(s=r)!==null&&s!==void 0?s:o,n=o,o!==0&&u<i&&(i=u))}return e.map((o,c)=>c===0?o:o.slice(i)).slice((t=r)!==null&&t!==void 0?t:0,n+1)}function kt(e){let t=0;for(;t<e.length&&At(e.charCodeAt(t));)++t;return t}var a;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(a||(a={}));var gt=class{constructor(e){let t=new ie(a.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==a.EOF)do if(e.next)e=e.next;else{let t=St(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===a.COMMENT);return e}};function Ct(e){return e===a.BANG||e===a.DOLLAR||e===a.AMP||e===a.PAREN_L||e===a.PAREN_R||e===a.DOT||e===a.SPREAD||e===a.COLON||e===a.EQUALS||e===a.AT||e===a.BRACKET_L||e===a.BRACKET_R||e===a.BRACE_L||e===a.PIPE||e===a.BRACE_R}function R(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function M(e,t){return de(e.charCodeAt(t))&&fe(e.charCodeAt(t+1))}function de(e){return e>=55296&&e<=56319}function fe(e){return e>=56320&&e<=57343}function _(e,t){let i=e.source.body.codePointAt(t);if(i===void 0)return a.EOF;if(i>=32&&i<=126){let r=String.fromCodePoint(i);return r==='"'?`'"'`:`"${r}"`}return"U+"+i.toString(16).toUpperCase().padStart(4,"0")}function d(e,t,i,r,n){let s=e.line,o=1+i-e.lineStart;return new ie(t,i,r,s,o,n)}function St(e,t){let i=e.source.body,r=i.length,n=t;for(;n<r;){let s=i.charCodeAt(n);switch(s){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:i.charCodeAt(n+1)===10?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return Rt(e,n);case 33:return d(e,a.BANG,n,n+1);case 36:return d(e,a.DOLLAR,n,n+1);case 38:return d(e,a.AMP,n,n+1);case 40:return d(e,a.PAREN_L,n,n+1);case 41:return d(e,a.PAREN_R,n,n+1);case 46:if(i.charCodeAt(n+1)===46&&i.charCodeAt(n+2)===46)return d(e,a.SPREAD,n,n+3);break;case 58:return d(e,a.COLON,n,n+1);case 61:return d(e,a.EQUALS,n,n+1);case 64:return d(e,a.AT,n,n+1);case 91:return d(e,a.BRACKET_L,n,n+1);case 93:return d(e,a.BRACKET_R,n,n+1);case 123:return d(e,a.BRACE_L,n,n+1);case 124:return d(e,a.PIPE,n,n+1);case 125:return d(e,a.BRACE_R,n,n+1);case 34:return i.charCodeAt(n+1)===34&&i.charCodeAt(n+2)===34?Mt(e,n):Lt(e,n)}if(w(s)||s===45)return bt(e,n,s);if(he(s))return Ut(e,n);throw f(e.source,n,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:R(s)||M(i,n)?`Unexpected character: ${_(e,n)}.`:`Invalid character: ${_(e,n)}.`)}return d(e,a.EOF,r,r)}function Rt(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){let s=i.charCodeAt(n);if(s===10||s===13)break;if(R(s))++n;else if(M(i,n))n+=2;else break}return d(e,a.COMMENT,t,n,i.slice(t+1,n))}function bt(e,t,i){let r=e.source.body,n=t,s=i,o=!1;if(s===45&&(s=r.charCodeAt(++n)),s===48){if(s=r.charCodeAt(++n),w(s))throw f(e.source,n,`Invalid number, unexpected digit after 0: ${_(e,n)}.`)}else n=j(e,n,s),s=r.charCodeAt(n);if(s===46&&(o=!0,s=r.charCodeAt(++n),n=j(e,n,s),s=r.charCodeAt(n)),(s===69||s===101)&&(o=!0,s=r.charCodeAt(++n),(s===43||s===45)&&(s=r.charCodeAt(++n)),n=j(e,n,s),s=r.charCodeAt(n)),s===46||he(s))throw f(e.source,n,`Invalid number, expected digit but got: ${_(e,n)}.`);return d(e,o?a.FLOAT:a.INT,t,n,r.slice(t,n))}function j(e,t,i){if(!w(i))throw f(e.source,t,`Invalid number, expected digit but got: ${_(e,t)}.`);let r=e.source.body,n=t+1;for(;w(r.charCodeAt(n));)++n;return n}function Lt(e,t){let i=e.source.body,r=i.length,n=t+1,s=n,o="";for(;n<r;){let c=i.charCodeAt(n);if(c===34)return o+=i.slice(s,n),d(e,a.STRING,t,n+1,o);if(c===92){o+=i.slice(s,n);let u=i.charCodeAt(n+1)===117?i.charCodeAt(n+2)===123?Ft(e,n):wt(e,n):Pt(e,n);o+=u.value,n+=u.size,s=n;continue}if(c===10||c===13)break;if(R(c))++n;else if(M(i,n))n+=2;else throw f(e.source,n,`Invalid character within String: ${_(e,n)}.`)}throw f(e.source,n,"Unterminated string.")}function Ft(e,t){let i=e.source.body,r=0,n=3;for(;n<12;){let s=i.charCodeAt(t+n++);if(s===125){if(n<5||!R(r))break;return{value:String.fromCodePoint(r),size:n}}if(r=r<<4|L(s),r<0)break}throw f(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+n)}".`)}function wt(e,t){let i=e.source.body,r=H(i,t+2);if(R(r))return{value:String.fromCodePoint(r),size:6};if(de(r)&&i.charCodeAt(t+6)===92&&i.charCodeAt(t+7)===117){let n=H(i,t+8);if(fe(n))return{value:String.fromCodePoint(r,n),size:12}}throw f(e.source,t,`Invalid Unicode escape sequence: "${i.slice(t,t+6)}".`)}function H(e,t){return L(e.charCodeAt(t))<<12|L(e.charCodeAt(t+1))<<8|L(e.charCodeAt(t+2))<<4|L(e.charCodeAt(t+3))}function L(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Pt(e,t){let i=e.source.body;switch(i.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${i.slice(t,t+2)}".`)}function Mt(e,t){let i=e.source.body,r=i.length,n=e.lineStart,s=t+3,o=s,c="",u=[];for(;s<r;){let N=i.charCodeAt(s);if(N===34&&i.charCodeAt(s+1)===34&&i.charCodeAt(s+2)===34){c+=i.slice(o,s),u.push(c);let I=d(e,a.BLOCK_STRING,t,s+3,_t(u).join(`
`));return e.line+=u.length-1,e.lineStart=n,I}if(N===92&&i.charCodeAt(s+1)===34&&i.charCodeAt(s+2)===34&&i.charCodeAt(s+3)===34){c+=i.slice(o,s),o=s+1,s+=4;continue}if(N===10||N===13){c+=i.slice(o,s),u.push(c),N===13&&i.charCodeAt(s+1)===10?s+=2:++s,c="",o=s,n=s;continue}if(R(N))++s;else if(M(i,s))s+=2;else throw f(e.source,s,`Invalid character within String: ${_(e,s)}.`)}throw f(e.source,s,"Unterminated string.")}function Ut(e,t){let i=e.source.body,r=i.length,n=t+1;for(;n<r;){let s=i.charCodeAt(n);if(xt(s))++n;else break}return d(e,a.NAME,t,n,i.slice(t,n))}function K(e,t){throw new Error(t)}function Ee(e){return U(e,[])}function U(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Vt(e,t);default:return String(e)}}function Vt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let i=[...t,e];if(Bt(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:U(r,i)}else if(Array.isArray(e))return Kt(e,i);return jt(e,i)}function Bt(e){return typeof e.toJSON=="function"}function jt(e,t){let i=Object.entries(e);return i.length===0?"{}":t.length>2?"["+$t(e)+"]":"{ "+i.map(([r,n])=>r+": "+U(n,t)).join(", ")+" }"}function Kt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let i=Math.min(10,e.length),r=e.length-i,n=[];for(let s=0;s<i;++s)n.push(U(e[s],t));return r===1?n.push("... 1 more item"):r>1&&n.push(`... ${r} more items`),"["+n.join(", ")+"]"}function $t(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let i=e.constructor.name;if(typeof i=="string"&&i!=="")return i}return t}var Gt=globalThis.process&&!0,Yt=Gt?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var i;let r=t.prototype[Symbol.toStringTag],n=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===n){let s=Ee(e);throw new Error(`Cannot use ${r} "${s}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1},me=class{constructor(e,t="GraphQL request",i={line:1,column:1}){typeof e=="string"||K(!1,`Body must be a string. Received: ${Ee(e)}.`),this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||K(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||K(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function qt(e){return Yt(e,me)}function Jt(e,t){let i=new Qt(e,t),r=i.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:i.tokenCount}),r}var Qt=class{constructor(e,t={}){let{lexer:i,...r}=t;if(i)this._lexer=i;else{let n=qt(e)?e:new me(e);this._lexer=new gt(n)}this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(a.NAME);return this.node(e,{kind:l.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(a.SOF,this.parseDefinition,a.EOF)})}parseDefinition(){if(this.peek(a.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===a.BRACE_L)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===a.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(t.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(a.BRACE_L))return this.node(e,{kind:l.OPERATION_DEFINITION,operation:C.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),i=this.parseOperationType(),r;return this.peek(a.NAME)&&(r=this.parseName()),this.node(e,{kind:l.OPERATION_DEFINITION,operation:i,description:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(a.NAME);switch(e.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(a.PAREN_L,this.parseVariableDefinition,a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(a.DOLLAR),this.node(e,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(a.BRACE_L,this.parseSelection,a.BRACE_R)})}parseSelection(){return this.peek(a.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,t=this.parseName(),i,r;return this.expectOptionalToken(a.COLON)?(i=t,r=this.parseName()):r=t,this.node(e,{kind:l.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(a.PAREN_L,t,a.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:l.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(a.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(a.NAME)?this.node(e,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:l.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:l.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:l.FRAGMENT_DEFINITION,description:t,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(e){let t=this._lexer.token;switch(t.kind){case a.BRACKET_L:return this.parseList(e);case a.BRACE_L:return this.parseObject(e);case a.INT:return this.advanceLexer(),this.node(t,{kind:l.INT,value:t.value});case a.FLOAT:return this.advanceLexer(),this.node(t,{kind:l.FLOAT,value:t.value});case a.STRING:case a.BLOCK_STRING:return this.parseStringLiteral();case a.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:l.BOOLEAN,value:!0});case"false":return this.node(t,{kind:l.BOOLEAN,value:!1});case"null":return this.node(t,{kind:l.NULL});default:return this.node(t,{kind:l.ENUM,value:t.value})}case a.DOLLAR:if(e)if(this.expectToken(a.DOLLAR),this._lexer.token.kind===a.NAME){let i=this._lexer.token.value;throw f(this._lexer.source,t.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:l.STRING,value:e.value,block:e.kind===a.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(a.BRACKET_L,t,a.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(a.BRACE_L,t,a.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,i=this.parseName();return this.expectToken(a.COLON),this.node(t,{kind:l.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(a.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(a.AT),this.node(t,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,t;if(this.expectOptionalToken(a.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(a.BRACKET_R),t=this.node(e,{kind:l.LIST_TYPE,type:i})}else t=this.parseNamedType();return this.expectOptionalToken(a.BANG)?this.node(e,{kind:l.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(a.STRING)||this.peek(a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);return this.node(e,{kind:l.SCHEMA_DEFINITION,description:t,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(a.COLON);let i=this.parseNamedType();return this.node(e,{kind:l.OPERATION_TYPE_DEFINITION,operation:t,type:i})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:l.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseFieldDefinition,a.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(a.COLON);let n=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:l.FIELD_DEFINITION,description:t,name:i,arguments:r,type:n,directives:s})}parseArgumentDefs(){return this.optionalMany(a.PAREN_L,this.parseInputValueDef,a.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName();this.expectToken(a.COLON);let r=this.parseTypeReference(),n;this.expectOptionalToken(a.EQUALS)&&(n=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(e,{kind:l.INPUT_VALUE_DEFINITION,description:t,name:i,type:r,defaultValue:n,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:l.INTERFACE_TYPE_DEFINITION,description:t,name:i,interfaces:r,directives:n,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();return this.node(e,{kind:l.UNION_TYPE_DEFINITION,description:t,name:i,directives:r,types:n})}parseUnionMemberTypes(){return this.expectOptionalToken(a.EQUALS)?this.delimitedMany(a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();return this.node(e,{kind:l.ENUM_TYPE_DEFINITION,description:t,name:i,directives:r,values:n})}parseEnumValuesDefinition(){return this.optionalMany(a.BRACE_L,this.parseEnumValueDefinition,a.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:l.ENUM_VALUE_DEFINITION,description:t,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw f(this._lexer.source,this._lexer.token.start,`${P(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:r,fields:n})}parseInputFieldsDefinition(){return this.optionalMany(a.BRACE_L,this.parseInputValueDef,a.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===a.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),i=this.optionalMany(a.BRACE_L,this.parseOperationTypeDefinition,a.BRACE_R);if(t.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:l.SCHEMA_EXTENSION,directives:t,operationTypes:i})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:l.SCALAR_TYPE_EXTENSION,name:t,directives:i})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:l.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:l.INTERFACE_TYPE_EXTENSION,name:t,interfaces:i,directives:r,fields:n})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:l.UNION_TYPE_EXTENSION,name:t,directives:i,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:l.ENUM_TYPE_EXTENSION,name:t,directives:i,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(a.AT);let i=this.parseName(),r=this.parseArgumentDefs(),n=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:l.DIRECTIVE_DEFINITION,description:t,name:i,arguments:r,repeatable:n,locations:s})}parseDirectiveLocations(){return this.delimitedMany(a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(G,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e=this._lexer.token,t=this.expectOptionalToken(a.AT),i=this.parseName(),r;!t&&this.expectOptionalToken(a.DOT)&&(r=this.parseName());let n;return(t||r)&&this.expectOptionalToken(a.PAREN_L)&&(n=this.parseName(),this.expectToken(a.COLON),this.expectToken(a.PAREN_R)),t?n?this.node(e,{kind:l.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:n}):this.node(e,{kind:l.DIRECTIVE_COORDINATE,name:i}):r?n?this.node(e,{kind:l.ARGUMENT_COORDINATE,name:i,fieldName:r,argumentName:n}):this.node(e,{kind:l.MEMBER_COORDINATE,name:i,memberName:r}):this.node(e,{kind:l.TYPE_COORDINATE,name:i})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new ze(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw f(this._lexer.source,t.start,`Expected ${Te(e)}, found ${P(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let t=this._lexer.token;if(t.kind===a.NAME&&t.value===e)this.advanceLexer();else throw f(this._lexer.source,t.start,`Expected "${e}", found ${P(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===a.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let t=e??this._lexer.token;return f(this._lexer.source,t.start,`Unexpected ${P(t)}.`)}any(e,t,i){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(i);)r.push(t.call(this));return r}optionalMany(e,t,i){if(this.expectOptionalToken(e)){let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,t,i){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,t){this.expectOptionalToken(e);let i=[];do i.push(t.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==a.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw f(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function P(e){let t=e.value;return Te(e.kind)+(t!=null?` "${t}"`:"")}function Te(e){return Ct(e)?`"${e}"`:e}function Xt(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var zt=Xt;function Ht(e){let t=[],{startToken:i,endToken:r}=e.loc;for(let n=i;n!==r;n=n.next)n.kind==="Comment"&&t.push({...n,loc:{start:n.start,end:n.end}});return t}var Wt={allowLegacyFragmentVariables:!0};function Zt(e){if(e?.name==="GraphQLError"){let{message:t,locations:[i]}=e;return zt(t,{loc:{start:i},cause:e})}return e}function ei(e){let t;try{t=Jt(e,Wt)}catch(i){throw Zt(i)}return t.comments=Ht(t),t}var ti={parse:ei,astFormat:"graphql",hasPragma:nt,hasIgnorePragma:rt,locStart:se,locEnd:ae},ii={graphql:dt};export{Ie as default,ft as languages,Tt as options,le as parsers,ii as printers};
