"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[473],{2962:function(e,t,n){n.d(t,{PB:function(){return f}});var i=n(67294),r=n(9008),a=n.n(r);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function s(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}var l=["keyOverride"],p=["crossOrigin"],u={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},c=function(e,t,n){void 0===t&&(t=[]);var r=void 0===n?{}:n,a=r.defaultWidth,o=r.defaultHeight;return t.reduce(function(t,n,r){return t.push(i.createElement("meta",{key:"og:"+e+":0"+r,property:"og:"+e,content:n.url})),n.alt&&t.push(i.createElement("meta",{key:"og:"+e+":alt0"+r,property:"og:"+e+":alt",content:n.alt})),n.secureUrl&&t.push(i.createElement("meta",{key:"og:"+e+":secure_url0"+r,property:"og:"+e+":secure_url",content:n.secureUrl.toString()})),n.type&&t.push(i.createElement("meta",{key:"og:"+e+":type0"+r,property:"og:"+e+":type",content:n.type.toString()})),n.width?t.push(i.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:n.width.toString()})):a&&t.push(i.createElement("meta",{key:"og:"+e+":width0"+r,property:"og:"+e+":width",content:a.toString()})),n.height?t.push(i.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:n.height.toString()})):o&&t.push(i.createElement("meta",{key:"og:"+e+":height"+r,property:"og:"+e+":height",content:o.toString()})),t},[])},h=function(e){var t,n,r,a,h,d=[];e.titleTemplate&&(u.templateTitle=e.titleTemplate);var f="";e.title?(f=e.title,u.templateTitle&&(f=u.templateTitle.replace(/%s/g,function(){return f}))):e.defaultTitle&&(f=e.defaultTitle),f&&d.push(i.createElement("title",{key:"title"},f));var m=void 0===e.noindex?u.noindex||e.dangerouslySetAllPagesToNoIndex:e.noindex,E=void 0===e.nofollow?u.nofollow||e.dangerouslySetAllPagesToNoFollow:e.nofollow,y=e.norobots||u.norobots,T="";if(e.robotsProps){var g=e.robotsProps,v=g.nosnippet,N=g.maxSnippet,I=g.maxImagePreview,O=g.maxVideoPreview,k=g.noarchive,x=g.noimageindex,_=g.notranslate,A=g.unavailableAfter;T=(v?",nosnippet":"")+(N?",max-snippet:"+N:"")+(I?",max-image-preview:"+I:"")+(k?",noarchive":"")+(A?",unavailable_after:"+A:"")+(x?",noimageindex":"")+(O?",max-video-preview:"+O:"")+(_?",notranslate":"")}if(e.norobots&&(u.norobots=!0),m||E?(e.dangerouslySetAllPagesToNoIndex&&(u.noindex=!0),e.dangerouslySetAllPagesToNoFollow&&(u.nofollow=!0),d.push(i.createElement("meta",{key:"robots",name:"robots",content:(m?"noindex":"index")+","+(E?"nofollow":"follow")+T}))):(!y||T)&&d.push(i.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+T})),e.description&&d.push(i.createElement("meta",{key:"description",name:"description",content:e.description})),e.themeColor&&d.push(i.createElement("meta",{key:"theme-color",name:"theme-color",content:e.themeColor})),e.mobileAlternate&&d.push(i.createElement("link",{rel:"alternate",key:"mobileAlternate",media:e.mobileAlternate.media,href:e.mobileAlternate.href})),e.languageAlternates&&e.languageAlternates.length>0&&e.languageAlternates.forEach(function(e){d.push(i.createElement("link",{rel:"alternate",key:"languageAlternate-"+e.hrefLang,hrefLang:e.hrefLang,href:e.href}))}),e.twitter&&(e.twitter.cardType&&d.push(i.createElement("meta",{key:"twitter:card",name:"twitter:card",content:e.twitter.cardType})),e.twitter.site&&d.push(i.createElement("meta",{key:"twitter:site",name:"twitter:site",content:e.twitter.site})),e.twitter.handle&&d.push(i.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:e.twitter.handle}))),e.facebook&&e.facebook.appId&&d.push(i.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:e.facebook.appId})),(null!=(t=e.openGraph)&&t.title||f)&&d.push(i.createElement("meta",{key:"og:title",property:"og:title",content:(null==(a=e.openGraph)?void 0:a.title)||f})),(null!=(n=e.openGraph)&&n.description||e.description)&&d.push(i.createElement("meta",{key:"og:description",property:"og:description",content:(null==(h=e.openGraph)?void 0:h.description)||e.description})),e.openGraph){if((e.openGraph.url||e.canonical)&&d.push(i.createElement("meta",{key:"og:url",property:"og:url",content:e.openGraph.url||e.canonical})),e.openGraph.type){var D=e.openGraph.type.toLowerCase();d.push(i.createElement("meta",{key:"og:type",property:"og:type",content:D})),"profile"===D&&e.openGraph.profile?(e.openGraph.profile.firstName&&d.push(i.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:e.openGraph.profile.firstName})),e.openGraph.profile.lastName&&d.push(i.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:e.openGraph.profile.lastName})),e.openGraph.profile.username&&d.push(i.createElement("meta",{key:"profile:username",property:"profile:username",content:e.openGraph.profile.username})),e.openGraph.profile.gender&&d.push(i.createElement("meta",{key:"profile:gender",property:"profile:gender",content:e.openGraph.profile.gender}))):"book"===D&&e.openGraph.book?(e.openGraph.book.authors&&e.openGraph.book.authors.length&&e.openGraph.book.authors.forEach(function(e,t){d.push(i.createElement("meta",{key:"book:author:0"+t,property:"book:author",content:e}))}),e.openGraph.book.isbn&&d.push(i.createElement("meta",{key:"book:isbn",property:"book:isbn",content:e.openGraph.book.isbn})),e.openGraph.book.releaseDate&&d.push(i.createElement("meta",{key:"book:release_date",property:"book:release_date",content:e.openGraph.book.releaseDate})),e.openGraph.book.tags&&e.openGraph.book.tags.length&&e.openGraph.book.tags.forEach(function(e,t){d.push(i.createElement("meta",{key:"book:tag:0"+t,property:"book:tag",content:e}))})):"article"===D&&e.openGraph.article?(e.openGraph.article.publishedTime&&d.push(i.createElement("meta",{key:"article:published_time",property:"article:published_time",content:e.openGraph.article.publishedTime})),e.openGraph.article.modifiedTime&&d.push(i.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:e.openGraph.article.modifiedTime})),e.openGraph.article.expirationTime&&d.push(i.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:e.openGraph.article.expirationTime})),e.openGraph.article.authors&&e.openGraph.article.authors.length&&e.openGraph.article.authors.forEach(function(e,t){d.push(i.createElement("meta",{key:"article:author:0"+t,property:"article:author",content:e}))}),e.openGraph.article.section&&d.push(i.createElement("meta",{key:"article:section",property:"article:section",content:e.openGraph.article.section})),e.openGraph.article.tags&&e.openGraph.article.tags.length&&e.openGraph.article.tags.forEach(function(e,t){d.push(i.createElement("meta",{key:"article:tag:0"+t,property:"article:tag",content:e}))})):("video.movie"===D||"video.episode"===D||"video.tv_show"===D||"video.other"===D)&&e.openGraph.video&&(e.openGraph.video.actors&&e.openGraph.video.actors.length&&e.openGraph.video.actors.forEach(function(e,t){e.profile&&d.push(i.createElement("meta",{key:"video:actor:0"+t,property:"video:actor",content:e.profile})),e.role&&d.push(i.createElement("meta",{key:"video:actor:role:0"+t,property:"video:actor:role",content:e.role}))}),e.openGraph.video.directors&&e.openGraph.video.directors.length&&e.openGraph.video.directors.forEach(function(e,t){d.push(i.createElement("meta",{key:"video:director:0"+t,property:"video:director",content:e}))}),e.openGraph.video.writers&&e.openGraph.video.writers.length&&e.openGraph.video.writers.forEach(function(e,t){d.push(i.createElement("meta",{key:"video:writer:0"+t,property:"video:writer",content:e}))}),e.openGraph.video.duration&&d.push(i.createElement("meta",{key:"video:duration",property:"video:duration",content:e.openGraph.video.duration.toString()})),e.openGraph.video.releaseDate&&d.push(i.createElement("meta",{key:"video:release_date",property:"video:release_date",content:e.openGraph.video.releaseDate})),e.openGraph.video.tags&&e.openGraph.video.tags.length&&e.openGraph.video.tags.forEach(function(e,t){d.push(i.createElement("meta",{key:"video:tag:0"+t,property:"video:tag",content:e}))}),e.openGraph.video.series&&d.push(i.createElement("meta",{key:"video:series",property:"video:series",content:e.openGraph.video.series})))}e.defaultOpenGraphImageWidth&&(u.defaultOpenGraphImageWidth=e.defaultOpenGraphImageWidth),e.defaultOpenGraphImageHeight&&(u.defaultOpenGraphImageHeight=e.defaultOpenGraphImageHeight),e.openGraph.images&&e.openGraph.images.length&&d.push.apply(d,c("image",e.openGraph.images,{defaultWidth:u.defaultOpenGraphImageWidth,defaultHeight:u.defaultOpenGraphImageHeight})),e.defaultOpenGraphVideoWidth&&(u.defaultOpenGraphVideoWidth=e.defaultOpenGraphVideoWidth),e.defaultOpenGraphVideoHeight&&(u.defaultOpenGraphVideoHeight=e.defaultOpenGraphVideoHeight),e.openGraph.videos&&e.openGraph.videos.length&&d.push.apply(d,c("video",e.openGraph.videos,{defaultWidth:u.defaultOpenGraphVideoWidth,defaultHeight:u.defaultOpenGraphVideoHeight})),e.openGraph.audio&&d.push.apply(d,c("audio",e.openGraph.audio)),e.openGraph.locale&&d.push(i.createElement("meta",{key:"og:locale",property:"og:locale",content:e.openGraph.locale})),(e.openGraph.siteName||e.openGraph.site_name)&&d.push(i.createElement("meta",{key:"og:site_name",property:"og:site_name",content:e.openGraph.siteName||e.openGraph.site_name}))}return e.canonical&&d.push(i.createElement("link",{rel:"canonical",href:e.canonical,key:"canonical"})),e.additionalMetaTags&&e.additionalMetaTags.length>0&&e.additionalMetaTags.forEach(function(e){var t,n,r=e.keyOverride,a=s(e,l);d.push(i.createElement("meta",o({key:"meta:"+(null!=(t=null!=(n=null!=r?r:a.name)?n:a.property)?t:a.httpEquiv)},a)))}),null!=(r=e.additionalLinkTags)&&r.length&&e.additionalLinkTags.forEach(function(e){var t,n=e.crossOrigin,r=s(e,p);d.push(i.createElement("link",o({key:"link"+(null!=(t=r.keyOverride)?t:r.href)+r.rel},r,{crossOrigin:"anonymous"===n||"use-credentials"===n||""===n?n:void 0})))}),d},d=function(e){return i.createElement(a(),null,h(e))},f=function(e){var t=e.title,n=e.themeColor,r=e.noindex,a=e.nofollow,o=e.robotsProps,s=e.description,l=e.canonical,p=e.openGraph,u=e.facebook,c=e.twitter,h=e.additionalMetaTags,f=e.titleTemplate,m=e.defaultTitle,E=e.mobileAlternate,y=e.languageAlternates,T=e.additionalLinkTags;return i.createElement(i.Fragment,null,i.createElement(d,{title:t,themeColor:n,noindex:r,nofollow:a,robotsProps:o,description:s,canonical:l,facebook:u,openGraph:p,additionalMetaTags:h,twitter:c,titleTemplate:f,defaultTitle:m,mobileAlternate:E,languageAlternates:y,additionalLinkTags:T}))};RegExp("["+Object.keys(Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})).join("")+"]","g")},82729:function(e,t,n){n.d(t,{_:function(){return i}});function i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},47273:function(e,t,n){var i,r,a,o,s,l,p,u;n.d(t,{g6:function(){return eL},Ps:function(){return eG}});class c extends Error{response;request;constructor(e,t){super(`${c.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`),Object.setPrototypeOf(this,c.prototype),this.response=e,this.request=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,c)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}n(83454);let h=e=>e.toUpperCase(),d=e=>"function"==typeof e?e():e,f=(e,t)=>e.map((e,n)=>[e,t[n]]),m=e=>{let t={};return e instanceof Headers?t=E(e):Array.isArray(e)?e.forEach(([e,n])=>{e&&void 0!==n&&(t[e]=n)}):e&&(t=e),t},E=e=>{let t={};return e.forEach((e,n)=>{t[n]=e}),t},y=e=>{try{let t=e();if(g(t))return t.catch(e=>T(e));return t}catch(e){return T(e)}},T=e=>e instanceof Error?e:Error(String(e)),g=e=>"object"==typeof e&&null!==e&&"then"in e&&"function"==typeof e.then&&"catch"in e&&"function"==typeof e.catch&&"finally"in e&&"function"==typeof e.finally,v=e=>{throw Error(`Unhandled case: ${String(e)}`)},N=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),I=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},O=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0};(s=i||(i={})).NAME="Name",s.DOCUMENT="Document",s.OPERATION_DEFINITION="OperationDefinition",s.VARIABLE_DEFINITION="VariableDefinition",s.SELECTION_SET="SelectionSet",s.FIELD="Field",s.ARGUMENT="Argument",s.FRAGMENT_SPREAD="FragmentSpread",s.INLINE_FRAGMENT="InlineFragment",s.FRAGMENT_DEFINITION="FragmentDefinition",s.VARIABLE="Variable",s.INT="IntValue",s.FLOAT="FloatValue",s.STRING="StringValue",s.BOOLEAN="BooleanValue",s.NULL="NullValue",s.ENUM="EnumValue",s.LIST="ListValue",s.OBJECT="ObjectValue",s.OBJECT_FIELD="ObjectField",s.DIRECTIVE="Directive",s.NAMED_TYPE="NamedType",s.LIST_TYPE="ListType",s.NON_NULL_TYPE="NonNullType",s.SCHEMA_DEFINITION="SchemaDefinition",s.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",s.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",s.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",s.FIELD_DEFINITION="FieldDefinition",s.INPUT_VALUE_DEFINITION="InputValueDefinition",s.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",s.UNION_TYPE_DEFINITION="UnionTypeDefinition",s.ENUM_TYPE_DEFINITION="EnumTypeDefinition",s.ENUM_VALUE_DEFINITION="EnumValueDefinition",s.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",s.DIRECTIVE_DEFINITION="DirectiveDefinition",s.SCHEMA_EXTENSION="SchemaExtension",s.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",s.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",s.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",s.UNION_TYPE_EXTENSION="UnionTypeExtension",s.ENUM_TYPE_EXTENSION="EnumTypeExtension",s.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";let k="Accept",x="Content-Type",_="application/json",A="application/graphql-response+json",D=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),b=e=>{let t=e.toLowerCase();return t.includes(A)||t.includes(_)},S=e=>{try{if(Array.isArray(e))return{_tag:"Batch",executionResults:e.map(C)};if(N(e))return{_tag:"Single",executionResult:C(e)};throw Error(`Invalid execution result: result is not object or array. 
Got:
${String(e)}`)}catch(e){return e}},C=e=>{let t,n,i;if("object"!=typeof e||null===e)throw Error("Invalid execution result: result is not object");if("errors"in e){if(!N(e.errors)&&!Array.isArray(e.errors))throw Error("Invalid execution result: errors is not plain object OR array");t=e.errors}if("data"in e){if(!N(e.data)&&null!==e.data)throw Error("Invalid execution result: data is not plain object");n=e.data}if("extensions"in e){if(!N(e.extensions))throw Error("Invalid execution result: extensions is not plain object");i=e.extensions}return{data:n,errors:t,extensions:i}},w=e=>"Batch"===e._tag?e.executionResults.some(R):R(e.executionResult),R=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,L=e=>"object"==typeof e&&null!==e&&"kind"in e&&e.kind===i.OPERATION_DEFINITION;class F{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class G{constructor(e,t,n,i,r,a){this.kind=e,this.start=t,this.end=n,this.line=i,this.column=r,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}}}let P={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"]},M=new Set(Object.keys(P));function U(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&M.has(t)}(l=r||(r={})).QUERY="query",l.MUTATION="mutation",l.SUBSCRIPTION="subscription";let V=/\r\n|[\n\r]/g;function B(e,t){let n=0,i=1;for(let r of e.body.matchAll(V)){if("number"==typeof r.index||function(e,t){if(!e)throw Error("Unexpected invariant triggered.")}(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function q(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=1===t.line?n:0,l=t.column+s,p=`${e.name}:${o}:${l}
`,u=i.split(/\r\n|[\n\r]/g),c=u[r];if(c.length>120){let e=Math.floor(l/80),t=[];for(let e=0;e<c.length;e+=80)t.push(c.slice(e,e+80));return p+j([[`${o} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(l%80)],["|",t[e+1]]])}return p+j([[`${o-1} |`,u[r-1]],[`${o} |`,c],["|","^".padStart(l)],[`${o+1} |`,u[r+1]]])}function j(e){let t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}class $ extends Error{constructor(e,...t){var n,i,r,a;let{nodes:o,source:s,positions:l,path:p,originalError:u,extensions:c}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=p?p:void 0,this.originalError=null!=u?u:void 0,this.nodes=K(Array.isArray(o)?o:o?[o]:void 0);let h=K(null===(n=this.nodes)||void 0===n?void 0:n.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==h?void 0:null===(i=h[0])||void 0===i?void 0:i.source,this.positions=null!=l?l:null==h?void 0:h.map(e=>e.start),this.locations=l&&s?l.map(e=>B(s,e)):null==h?void 0:h.map(e=>B(e.source,e.start));let d="object"==typeof(a=null==u?void 0:u.extensions)&&null!==a?null==u?void 0:u.extensions:void 0;this.extensions=null!==(r=null!=c?c:d)&&void 0!==r?r: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}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.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 e=this.message;if(this.nodes){for(let n of this.nodes)if(n.loc){var t;e+="\n\n"+q((t=n.loc).source,B(t.source,t.start))}}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+q(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function K(e){return void 0===e||0===e.length?void 0:e}function Y(e,t,n){return new $(`Syntax Error: ${n}`,{source:e,positions:[t]})}function H(e){return 9===e||32===e}function J(e){return e>=48&&e<=57}function z(e){return e>=97&&e<=122||e>=65&&e<=90}function W(e){return z(e)||95===e}(p=a||(a={})).QUERY="QUERY",p.MUTATION="MUTATION",p.SUBSCRIPTION="SUBSCRIPTION",p.FIELD="FIELD",p.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",p.FRAGMENT_SPREAD="FRAGMENT_SPREAD",p.INLINE_FRAGMENT="INLINE_FRAGMENT",p.VARIABLE_DEFINITION="VARIABLE_DEFINITION",p.SCHEMA="SCHEMA",p.SCALAR="SCALAR",p.OBJECT="OBJECT",p.FIELD_DEFINITION="FIELD_DEFINITION",p.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",p.INTERFACE="INTERFACE",p.UNION="UNION",p.ENUM="ENUM",p.ENUM_VALUE="ENUM_VALUE",p.INPUT_OBJECT="INPUT_OBJECT",p.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",(u=o||(o={})).SOF="<SOF>",u.EOF="<EOF>",u.BANG="!",u.DOLLAR="$",u.AMP="&",u.PAREN_L="(",u.PAREN_R=")",u.SPREAD="...",u.COLON=":",u.EQUALS="=",u.AT="@",u.BRACKET_L="[",u.BRACKET_R="]",u.BRACE_L="{",u.PIPE="|",u.BRACE_R="}",u.NAME="Name",u.INT="Int",u.FLOAT="Float",u.STRING="String",u.BLOCK_STRING="BlockString",u.COMMENT="Comment";class Q{constructor(e){let t=new G(o.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!==o.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let t=n.charCodeAt(r);switch(t){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:10===n.charCodeAt(r+1)?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return function(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let e=n.charCodeAt(r);if(10===e||13===e)break;if(X(e))++r;else if(Z(n,r))r+=2;else break}return ei(e,o.COMMENT,t,r,n.slice(t+1,r))}(e,r);case 33:return ei(e,o.BANG,r,r+1);case 36:return ei(e,o.DOLLAR,r,r+1);case 38:return ei(e,o.AMP,r,r+1);case 40:return ei(e,o.PAREN_L,r,r+1);case 41:return ei(e,o.PAREN_R,r,r+1);case 46:if(46===n.charCodeAt(r+1)&&46===n.charCodeAt(r+2))return ei(e,o.SPREAD,r,r+3);break;case 58:return ei(e,o.COLON,r,r+1);case 61:return ei(e,o.EQUALS,r,r+1);case 64:return ei(e,o.AT,r,r+1);case 91:return ei(e,o.BRACKET_L,r,r+1);case 93:return ei(e,o.BRACKET_R,r,r+1);case 123:return ei(e,o.BRACE_L,r,r+1);case 124:return ei(e,o.PIPE,r,r+1);case 125:return ei(e,o.BRACE_R,r,r+1);case 34:if(34===n.charCodeAt(r+1)&&34===n.charCodeAt(r+2))return function(e,t){let n=e.source.body,i=n.length,r=e.lineStart,a=t+3,s=a,l="",p=[];for(;a<i;){let i=n.charCodeAt(a);if(34===i&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)){l+=n.slice(s,a),p.push(l);let i=ei(e,o.BLOCK_STRING,t,a+3,(function(e){var t,n;let i=Number.MAX_SAFE_INTEGER,r=null,a=-1;for(let t=0;t<e.length;++t){let o=e[t],s=function(e){let t=0;for(;t<e.length&&H(e.charCodeAt(t));)++t;return t}(o);s!==o.length&&(r=null!==(n=r)&&void 0!==n?n:t,a=t,0!==t&&s<i&&(i=s))}return e.map((e,t)=>0===t?e:e.slice(i)).slice(null!==(t=r)&&void 0!==t?t:0,a+1)})(p).join("\n"));return e.line+=p.length-1,e.lineStart=r,i}if(92===i&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2)&&34===n.charCodeAt(a+3)){l+=n.slice(s,a),s=a+1,a+=4;continue}if(10===i||13===i){l+=n.slice(s,a),p.push(l),13===i&&10===n.charCodeAt(a+1)?a+=2:++a,l="",s=a,r=a;continue}if(X(i))++a;else if(Z(n,a))a+=2;else throw Y(e.source,a,`Invalid character within String: ${en(e,a)}.`)}throw Y(e.source,a,"Unterminated string.")}(e,r);return function(e,t){let n=e.source.body,i=n.length,r=t+1,a=r,s="";for(;r<i;){let i=n.charCodeAt(r);if(34===i)return s+=n.slice(a,r),ei(e,o.STRING,t,r+1,s);if(92===i){s+=n.slice(a,r);let t=117===n.charCodeAt(r+1)?123===n.charCodeAt(r+2)?function(e,t){let n=e.source.body,i=0,r=3;for(;r<12;){let e=n.charCodeAt(t+r++);if(125===e){if(r<5||!X(i))break;return{value:String.fromCodePoint(i),size:r}}if((i=i<<4|eo(e))<0)break}throw Y(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+r)}".`)}(e,r):function(e,t){let n=e.source.body,i=ea(n,t+2);if(X(i))return{value:String.fromCodePoint(i),size:6};if(ee(i)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){let e=ea(n,t+8);if(et(e))return{value:String.fromCodePoint(i,e),size:12}}throw Y(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}(e,r):function(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:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw Y(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}(e,r);s+=t.value,r+=t.size,a=r;continue}if(10===i||13===i)break;if(X(i))++r;else if(Z(n,r))r+=2;else throw Y(e.source,r,`Invalid character within String: ${en(e,r)}.`)}throw Y(e.source,r,"Unterminated string.")}(e,r)}if(J(t)||45===t)return function(e,t,n){let i=e.source.body,r=t,a=n,s=!1;if(45===a&&(a=i.charCodeAt(++r)),48===a){if(J(a=i.charCodeAt(++r)))throw Y(e.source,r,`Invalid number, unexpected digit after 0: ${en(e,r)}.`)}else r=er(e,r,a),a=i.charCodeAt(r);if(46===a&&(s=!0,a=i.charCodeAt(++r),r=er(e,r,a),a=i.charCodeAt(r)),(69===a||101===a)&&(s=!0,(43===(a=i.charCodeAt(++r))||45===a)&&(a=i.charCodeAt(++r)),r=er(e,r,a),a=i.charCodeAt(r)),46===a||W(a))throw Y(e.source,r,`Invalid number, expected digit but got: ${en(e,r)}.`);return ei(e,s?o.FLOAT:o.INT,t,r,i.slice(t,r))}(e,r,t);if(W(t))return function(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){var a;if(z(a=n.charCodeAt(r))||J(a)||95===a)++r;else break}return ei(e,o.NAME,t,r,n.slice(t,r))}(e,r);throw Y(e.source,r,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":X(t)||Z(n,r)?`Unexpected character: ${en(e,r)}.`:`Invalid character: ${en(e,r)}.`)}return ei(e,o.EOF,i,i)}(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===o.COMMENT);return e}}function X(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Z(e,t){return ee(e.charCodeAt(t))&&et(e.charCodeAt(t+1))}function ee(e){return e>=55296&&e<=56319}function et(e){return e>=56320&&e<=57343}function en(e,t){let n=e.source.body.codePointAt(t);if(void 0===n)return o.EOF;if(n>=32&&n<=126){let e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ei(e,t,n,i,r){let a=e.line,o=1+n-e.lineStart;return new G(t,n,i,a,o,r)}function er(e,t,n){if(!J(n))throw Y(e.source,t,`Invalid number, expected digit but got: ${en(e,t)}.`);let i=e.source.body,r=t+1;for(;J(i.charCodeAt(r));)++r;return r}function ea(e,t){return eo(e.charCodeAt(t))<<12|eo(e.charCodeAt(t+1))<<8|eo(e.charCodeAt(t+2))<<4|eo(e.charCodeAt(t+3))}function eo(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function es(e,t){if(!e)throw Error(t)}function el(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if("function"==typeof e.toJSON){let t=e.toJSON();if(t!==e)return"string"==typeof t?t:el(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let i=0;i<n;++i)r.push(el(e[i],t));return 1===i?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}(e,n);return function(e,t){let n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]":"{ "+n.map(([e,n])=>e+": "+el(n,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}let ep=globalThis.process?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;let i=t.prototype[Symbol.toStringTag];if(i===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){let t=el(e,[]);throw Error(`Cannot use ${i} "${t}" 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};class eu{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||es(!1,`Body must be a string. Received: ${el(e,[])}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||es(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||es(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class ec{constructor(e,t={}){let n=ep(e,eu)?e:new eu(e);this._lexer=new Q(n),this._options=t,this._tokenCounter=0}parseName(){let e=this.expectToken(o.NAME);return this.node(e,{kind:i.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:i.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===o.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()}if(e)throw Y(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e;let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:i.OPERATION_DEFINITION,operation:r.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType();return this.peek(o.NAME)&&(e=this.parseName()),this.node(t,{kind:i.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(o.NAME);switch(e.value){case"query":return r.QUERY;case"mutation":return r.MUTATION;case"subscription":return r.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:i.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(e,{kind:i.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:i.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t;let n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(o.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:i.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,t,o.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(o.COLON),this.node(t,{kind:i.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(o.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(o.NAME)?this.node(e,{kind:i.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:i.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:i.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:i.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case o.BRACKET_L:return this.parseList(e);case o.BRACE_L:return this.parseObject(e);case o.INT:return this.advanceLexer(),this.node(t,{kind:i.INT,value:t.value});case o.FLOAT:return this.advanceLexer(),this.node(t,{kind:i.FLOAT,value:t.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:i.BOOLEAN,value:!0});case"false":return this.node(t,{kind:i.BOOLEAN,value:!1});case"null":return this.node(t,{kind:i.NULL});default:return this.node(t,{kind:i.ENUM,value:t.value})}case o.DOLLAR:if(e){if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let e=this._lexer.token.value;throw Y(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}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:i.STRING,value:e.value,block:e.kind===o.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:i.LIST,values:this.any(o.BRACKET_L,()=>this.parseValueLiteral(e),o.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:i.OBJECT,fields:this.any(o.BRACE_L,()=>this.parseObjectField(e),o.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(o.COLON),this.node(t,{kind:i.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(o.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(o.AT),this.node(t,{kind:i.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e;let t=this._lexer.token;if(this.expectOptionalToken(o.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(o.BRACKET_R),e=this.node(t,{kind:i.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:i.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:i.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(e,{kind:i.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(o.COLON);let n=this.parseNamedType();return this.node(e,{kind:i.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:i.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:i.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let a=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:i.FIELD_DEFINITION,description:t,name:n,arguments:r,type:a,directives:s})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let e;let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let a=this.parseTypeReference();this.expectOptionalToken(o.EQUALS)&&(e=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(t,{kind:i.INPUT_VALUE_DEFINITION,description:n,name:r,type:a,defaultValue:e,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:i.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:a,fields:o})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(e,{kind:i.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(e,{kind:i.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:a})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:i.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Y(this._lexer.source,this._lexer.token.start,`${eh(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 n=this.parseName(),r=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(e,{kind:i.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===o.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(),n=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:i.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:i.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:i.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:a})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===a.length)throw this.unexpected();return this.node(e,{kind:i.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:a})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:i.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:i.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:i.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let n=this.parseName(),r=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:i.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:a,locations:s})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(a,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new F(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 Y(this._lexer.source,t.start,`Expected ${ed(e)}, found ${eh(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===o.NAME&&t.value===e)this.advanceLexer();else throw Y(this._lexer.source,t.start,`Expected "${e}", found ${eh(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===o.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return Y(this._lexer.source,t.start,`Unexpected ${eh(t)}.`)}any(e,t,n){this.expectToken(e);let i=[];for(;!this.expectOptionalToken(n);)i.push(t.call(this));return i}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);let i=[];do i.push(t.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Y(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function eh(e){let t=e.value;return ed(e.kind)+(null!=t?` "${t}"`:"")}function ed(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R?`"${e}"`:e}let ef=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function em(e){return eE[e.charCodeAt(0)]}let eE=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],ey=Object.freeze({}),eT={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>eg(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=eN("(",eg(e.variableDefinitions,", "),")"),n=eg([e.operation,eg([e.name,t]),eg(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:i})=>e+": "+t+eN(" = ",n)+eN(" ",eg(i," "))},SelectionSet:{leave:({selections:e})=>ev(e)},Field:{leave({alias:e,name:t,arguments:n,directives:i,selectionSet:r}){let a=eN("",e,": ")+t,o=a+eN("(",eg(n,", "),")");return o.length>80&&(o=a+eN("(\n",eI(eg(n,"\n")),"\n)")),eg([o,eg(i," "),r]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+eN(" ",eg(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>eg(["...",eN("on ",e),eg(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${e}${eN("(",eg(n,", "),")")} on ${t} ${eN("",eg(i," ")," ")}`+r},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){let n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=1===i.length,a=i.length>1&&i.slice(1).every(e=>0===e.length||H(e.charCodeAt(0))),o=n.endsWith('\\"""'),s=e.endsWith('"')&&!o,l=e.endsWith("\\"),p=s||l,u=!r||e.length>70||p||a||o,c="",h=r&&H(e.charCodeAt(0));return(u&&!h||a)&&(c+="\n"),c+=n,(u||p)&&(c+="\n"),'"""'+c+'"""'}(e):`"${e.replace(ef,em)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+eg(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+eg(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+eN("(",eg(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>eN("",e,"\n")+eg(["schema",eg(t," "),ev(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>eN("",e,"\n")+eg(["scalar",t,eg(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:r})=>eN("",e,"\n")+eg(["type",t,eN("implements ",eg(n," & ")),eg(i," "),ev(r)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:i,directives:r})=>eN("",e,"\n")+t+(eO(n)?eN("(\n",eI(eg(n,"\n")),"\n)"):eN("(",eg(n,", "),")"))+": "+i+eN(" ",eg(r," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:i,directives:r})=>eN("",e,"\n")+eg([t+": "+n,eN("= ",i),eg(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:r})=>eN("",e,"\n")+eg(["interface",t,eN("implements ",eg(n," & ")),eg(i," "),ev(r)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:i})=>eN("",e,"\n")+eg(["union",t,eg(n," "),eN("= ",eg(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:i})=>eN("",e,"\n")+eg(["enum",t,eg(n," "),ev(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>eN("",e,"\n")+eg([t,eg(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:i})=>eN("",e,"\n")+eg(["input",t,eg(n," "),ev(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:i,locations:r})=>eN("",e,"\n")+"directive @"+t+(eO(n)?eN("(\n",eI(eg(n,"\n")),"\n)"):eN("(",eg(n,", "),")"))+(i?" repeatable":"")+" on "+eg(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>eg(["extend schema",eg(e," "),ev(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>eg(["extend scalar",e,eg(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>eg(["extend type",e,eN("implements ",eg(t," & ")),eg(n," "),ev(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>eg(["extend interface",e,eN("implements ",eg(t," & ")),eg(n," "),ev(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>eg(["extend union",e,eg(t," "),eN("= ",eg(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>eg(["extend enum",e,eg(t," "),ev(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>eg(["extend input",e,eg(t," "),ev(n)]," ")}};function eg(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function ev(e){return eN("{\n",eI(eg(e,"\n")),"\n}")}function eN(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function eI(e){return eN("  ",e.replace(/\n/g,"\n  "))}function eO(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}let ek=e=>{let t;let n=e.definitions.filter(L);return 1===n.length&&(t=n[0].name?.value),t},ex=e=>{let t=!1,n=e.definitions.filter(L);return 1===n.length&&(t=n[0].operation===r.MUTATION),t},e_=(e,t)=>{let n;let r="string"==typeof e?e:function(e,t,n=P){let r,a,o;let s=new Map;for(let e of Object.values(i))s.set(e,function(e,t){let n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let l=Array.isArray(e),p=[e],u=-1,c=[],h=e,d=[],f=[];do{var m,E,y;let e;let i=++u===p.length,T=i&&0!==c.length;if(i){if(a=0===f.length?void 0:d[d.length-1],h=o,o=f.pop(),T){if(l){h=h.slice();let e=0;for(let[t,n]of c){let i=t-e;null===n?(h.splice(i,1),e++):h[i]=n}}else for(let[e,t]of(h=Object.defineProperties({},Object.getOwnPropertyDescriptors(h)),c))h[e]=t}u=r.index,p=r.keys,c=r.edits,l=r.inArray,r=r.prev}else if(o){if(null==(h=o[a=l?u:p[u]]))continue;d.push(a)}if(!Array.isArray(h)){U(h)||es(!1,`Invalid AST Node: ${el(h,[])}.`);let n=i?null===(m=s.get(h.kind))||void 0===m?void 0:m.leave:null===(E=s.get(h.kind))||void 0===E?void 0:E.enter;if((e=null==n?void 0:n.call(t,h,a,o,d,f))===ey)break;if(!1===e){if(!i){d.pop();continue}}else if(void 0!==e&&(c.push([a,e]),!i)){if(U(e))h=e;else{d.pop();continue}}}void 0===e&&T&&c.push([a,h]),i?d.pop():(r={inArray:l,index:u,keys:p,edits:c,prev:r},p=(l=Array.isArray(h))?h:null!==(y=n[h.kind])&&void 0!==y?y:[],u=-1,c=[],o&&f.push(o),o=h)}while(void 0!==r);return 0!==c.length?c[c.length-1][1]:e}(e,eT),a=!1;if(t)return{expression:r,isMutation:a,operationName:n};let o=y(()=>"string"==typeof e?new ec(e,void 0).parseDocument():e);return o instanceof Error?{expression:r,isMutation:a,operationName:n}:{expression:r,operationName:n=ek(o),isMutation:a=ex(o)}},eA=JSON,eD=async e=>{let t={...e,method:"Single"===e.request._tag?e.request.document.isMutation?"POST":h(e.method??"post"):e.request.hasMutations?"POST":h(e.method??"post"),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??"none"}},n=eC(t.method),i=await n(t);if(!i.ok)return new c({status:i.status,headers:i.headers},{query:"Single"===e.request._tag?e.request.document.expression:e.request.query,variables:e.request.variables});let r=await eS(i,e.fetchOptions.jsonSerializer??eA);if(r instanceof Error)throw r;let a={status:i.status,headers:i.headers};if(w(r)&&"none"===t.fetchOptions.errorPolicy)return new c("Batch"===r._tag?{...r.executionResults,...a}:{...r.executionResult,...a},{query:"Single"===e.request._tag?e.request.document.expression:e.request.query,variables:e.request.variables});switch(r._tag){case"Single":return{...a,...eb(t)(r.executionResult)};case"Batch":return{...a,data:r.executionResults.map(eb(t))};default:v(r)}},eb=e=>t=>({extensions:t.extensions,data:t.data,errors:"all"===e.fetchOptions.errorPolicy?t.errors:void 0}),eS=async(e,t)=>{let n=e.headers.get(x),i=await e.text();return n&&b(n)?S(t.parse(i)):S(i)},eC=e=>async t=>{let n;let i=new Headers(t.headers),r=null;i.has(k)||i.set(k,[A,_].join(", ")),"POST"===e?"string"!=typeof(n=(t.fetchOptions.jsonSerializer??eA).stringify(ew(t)))||i.has(x)||i.set(x,_):r=eR(t);let a={method:e,headers:i,body:n,...t.fetchOptions},o=new URL(t.url),s=a;if(t.middleware){let{url:e,...n}=await Promise.resolve(t.middleware({...a,url:t.url,operationName:"Single"===t.request._tag?t.request.document.operationName:void 0,variables:t.request.variables}));o=new URL(e),s=n}r&&r.forEach((e,t)=>{o.searchParams.append(t,e)});let l=t.fetch??fetch;return await l(o,s)},ew=e=>{switch(e.request._tag){case"Single":return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case"Batch":return f(e.request.query,e.request.variables??[]).map(([e,t])=>({query:e,variables:t}));default:throw v(e.request)}},eR=e=>{let t=e.fetchOptions.jsonSerializer??eA,n=new URLSearchParams;switch(e.request._tag){case"Single":return n.append("query",D(e.request.document.expression)),e.request.variables&&n.append("variables",t.stringify(e.request.variables)),e.request.document.operationName&&n.append("operationName",e.request.document.operationName),n;case"Batch":{let i=e.request.variables?.map(e=>t.stringify(e))??[],r=f(e.request.query.map(D),i).map(([e,t])=>({query:e,variables:t}));return n.append("query",t.stringify(r)),n}default:throw v(e.request)}};class eL{url;requestConfig;constructor(e,t={}){this.url=e,this.requestConfig=t}rawRequest=async(...e)=>{let[t,n,i]=e,r=O(t,n,i),{headers:a,fetch:o=globalThis.fetch,method:s="POST",requestMiddleware:l,responseMiddleware:p,excludeOperationName:u,...c}=this.requestConfig,{url:h}=this;void 0!==r.signal&&(c.signal=r.signal);let f=e_(r.query,u),E=await eD({url:h,request:{_tag:"Single",document:f,variables:r.variables},headers:{...m(d(a)),...m(r.requestHeaders)},fetch:o,method:s,fetchOptions:c,middleware:l});if(p&&await p(E,{operationName:f.operationName,variables:n,url:this.url}),E instanceof Error)throw E;return E};async request(e,...t){let[n,i]=t,r=eF(e,n,i),{headers:a,fetch:o=globalThis.fetch,method:s="POST",requestMiddleware:l,responseMiddleware:p,excludeOperationName:u,...c}=this.requestConfig,{url:h}=this;void 0!==r.signal&&(c.signal=r.signal);let f=e_(r.document,u),E=await eD({url:h,request:{_tag:"Single",document:f,variables:r.variables},headers:{...m(d(a)),...m(r.requestHeaders)},fetch:o,method:s,fetchOptions:c,middleware:l});if(p&&await p(E,{operationName:f.operationName,variables:r.variables,url:this.url}),E instanceof Error)throw E;return E.data}async batchRequests(e,t){let n=I(e,t),{headers:i,excludeOperationName:r,...a}=this.requestConfig;void 0!==n.signal&&(a.signal=n.signal);let o=n.documents.map(({document:e})=>e_(e,r)),s=o.map(({expression:e})=>e),l=o.some(({isMutation:e})=>e),p=n.documents.map(({variables:e})=>e),u=await eD({url:this.url,request:{_tag:"Batch",operationName:void 0,query:s,hasMutations:l,variables:p},headers:{...m(d(i)),...m(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(u,{operationName:void 0,variables:p,url:this.url}),u instanceof Error)throw u;return u.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){let{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}let eF=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},eG=(e,...t)=>e.reduce((e,n,i)=>`${e}${n}${i in t?String(t[i]):""}`,"")}}]);