(self.webpackChunkui=self.webpackChunkui||[]).push([[10],{67:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(n.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(e){return e&&r.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function s(e){return"string"!=typeof e&&(e=String(e)),e}function a(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function p(e){var t=new FileReader,n=l(t);return t.readAsArrayBuffer(e),n}function d(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:n.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:n.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():n.arrayBuffer&&n.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=d(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=d(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e,t,n,r=u(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=l(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},f.call(m.prototype),f.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function T(e,r){return new Promise((function(i,o){var s=new m(e,r);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;i(new v(r,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&n.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}T.polyfill=!0,e.fetch||(e.fetch=T,e.Headers=c,e.Request=m,e.Response=v),t.Headers=c,t.Request=m,t.Response=v,t.fetch=T,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultJsonSerializer=void 0,t.defaultJsonSerializer=JSON},251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLWebSocketClient=void 0;const r=n(109),i=n(180),o="ping",s="pong",a="complete";class c{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(e,t,n){this._type=e,this._payload=t,this._id=n}get text(){const e={type:this.type};return null!=this.id&&null!=this.id&&(e.id=this.id),null!=this.payload&&null!=this.payload&&(e.payload=this.payload),JSON.stringify(e)}static parse(e,t){const{type:n,payload:r,id:i}=JSON.parse(e);return new c(n,t(r),i)}}class u{constructor(e,{onInit:t,onAcknowledged:n,onPing:r,onPong:u}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=e,e.addEventListener("open",(async n=>{var r;this.socketState.acknowledged=!1,this.socketState.subscriptions={},e.send((r=t?await t():null,new c("connection_init",r)).text)})),e.addEventListener("close",(e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}})),e.addEventListener("error",(e=>{console.error(e)})),e.addEventListener("message",(t=>{try{const p=function(e,t=(e=>e)){return c.parse(e,t)}(t.data);switch(p.type){case"connection_ack":return void(this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,n&&n(p.payload)));case o:return void(r?r(p.payload).then((t=>e.send(l(t).text))):e.send(l(null).text));case s:return void(u&&u(p.payload))}if(!this.socketState.acknowledged)return;if(void 0===p.id||null===p.id||!this.socketState.subscriptions[p.id])return;const{query:d,variables:f,subscriber:h}=this.socketState.subscriptions[p.id];switch(p.type){case"next":return!p.payload.errors&&p.payload.data&&h.next&&h.next(p.payload.data),void(p.payload.errors&&h.error&&h.error(new i.ClientError({...p.payload,status:200},{query:d,variables:f})));case"error":return void(h.error&&h.error(new i.ClientError({errors:p.payload,status:200},{query:d,variables:f})));case a:return h.complete&&h.complete(),void delete this.socketState.subscriptions[p.id]}}catch(t){console.error(t),e.close(1006)}e.close(4400,"Unknown graphql-ws message.")}))}makeSubscribe(e,t,n,r){const i=(this.socketState.lastRequestId++).toString();var o,s;return this.socketState.subscriptions[i]={query:e,variables:r,subscriber:n},this.socket.send((o=i,s={query:e,operationName:t,variables:r},new c("subscribe",s,o)).text),()=>{this.socket.send(function(e){return new c(a,void 0,e)}(i).text),delete this.socketState.subscriptions[i]}}rawRequest(e,t){return new Promise(((n,r)=>{let i;this.rawSubscribe(e,{next:(e,t)=>i={data:e,extensions:t},error:r,complete:()=>n(i)},t)}))}request(e,t){return new Promise(((n,r)=>{let i;this.subscribe(e,{next:e=>i=e,error:r,complete:()=>n(i)},t)}))}subscribe(e,t,n){const{query:i,operationName:o}=(0,r.resolveRequestDocument)(e);return this.makeSubscribe(i,o,t,n)}rawSubscribe(e,t,n){return this.makeSubscribe(e,void 0,t,n)}ping(e){this.socket.send(function(e){return new c(o,e,void 0)}(e).text)}close(){this.socket.close(1e3)}}function l(e){return new c(s,e,void 0)}u.PROTOCOL="graphql-transport-ws",t.GraphQLWebSocketClient=u},248:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeadersInstanceToPlainObject=t.uppercase=void 0,t.uppercase=e=>e.toUpperCase(),t.HeadersInstanceToPlainObject=e=>{const t={};return e.forEach(((e,n)=>{t[n]=e})),t}},16:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.request=t.rawRequest=t.GraphQLClient=t.ClientError=t.batchRequests=t.resolveRequestDocument=t.GraphQLWebSocketClient=t.gql=void 0;const s=n(247),a=n(248),c=n(249),u=n(109),l=n(180);Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return l.ClientError}});const p=o(n(67)),d=p,f=e=>{let t={};return e&&("undefined"!=typeof Headers&&e instanceof Headers||d&&d.Headers&&e instanceof d.Headers?t=(0,a.HeadersInstanceToPlainObject)(e):Array.isArray(e)?e.forEach((([e,n])=>{e&&void 0!==n&&(t[e]=n)})):t=e),t},h=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class m{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...e)=>{const[t,n,r]=e,i=(0,c.parseRawRequestArgs)(t,n,r),{headers:o,fetch:s=p.default,method:a="POST",requestMiddleware:l,responseMiddleware:d,...h}=this.requestConfig,{url:m}=this;void 0!==i.signal&&(h.signal=i.signal);const{operationName:v}=(0,u.resolveRequestDocument)(i.query);return y({url:m,query:i.query,variables:i.variables,headers:{...f(g(o)),...f(i.requestHeaders)},operationName:v,fetch:s,method:a,fetchOptions:h,middleware:l}).then((e=>(d&&d(e),e))).catch((e=>{throw d&&d(e),e}))}}async request(e,...t){const[n,r]=t,i=(0,c.parseRequestArgs)(e,n,r),{headers:o,fetch:s=p.default,method:a="POST",requestMiddleware:l,responseMiddleware:d,...h}=this.requestConfig,{url:m}=this;void 0!==i.signal&&(h.signal=i.signal);const{query:v,operationName:E}=(0,u.resolveRequestDocument)(i.document);return y({url:m,query:v,variables:i.variables,headers:{...f(g(o)),...f(i.requestHeaders)},operationName:E,fetch:s,method:a,fetchOptions:h,middleware:l}).then((e=>(d&&d(e),e.data))).catch((e=>{throw d&&d(e),e}))}batchRequests(e,t){const n=(0,c.parseBatchRequestArgs)(e,t),{headers:r,...i}=this.requestConfig;void 0!==n.signal&&(i.signal=n.signal);const o=n.documents.map((({document:e})=>(0,u.resolveRequestDocument)(e).query)),s=n.documents.map((({variables:e})=>e));return y({url:this.url,query:o,variables:s,headers:{...f(g(r)),...f(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??p.default,method:this.requestConfig.method||"POST",fetchOptions:i,middleware:this.requestConfig.requestMiddleware}).then((e=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e.data))).catch((e=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e}))}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}t.GraphQLClient=m;const y=async e=>{const{query:t,variables:n,fetchOptions:r}=e,i=(f=(0,a.uppercase)(e.method??"post"),async e=>{const{url:t,query:n,variables:r,operationName:i,fetch:o,fetchOptions:a,middleware:c}=e,u={...e.headers};let l,p="";"POST"===f?(l=T(n,r,i,a.jsonSerializer),"string"==typeof l&&(u["Content-Type"]="application/json")):p=(e=>{if(!Array.isArray(e.query)){const t=e,n=[`query=${encodeURIComponent(h(t.query))}`];return e.variables&&n.push(`variables=${encodeURIComponent(t.jsonSerializer.stringify(t.variables))}`),t.operationName&&n.push(`operationName=${encodeURIComponent(t.operationName)}`),n.join("&")}if(void 0!==e.variables&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce(((e,n,r)=>(e.push({query:h(n),variables:t.variables?t.jsonSerializer.stringify(t.variables[r]):void 0}),e)),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`})({query:n,variables:r,operationName:i,jsonSerializer:a.jsonSerializer??s.defaultJsonSerializer});const d={method:f,headers:u,body:l,...a};let m=t,y=d;if(c){const e=await Promise.resolve(c({...d,url:t,operationName:i,variables:r})),{url:n,...o}=e;m=n,y=o}return p&&(m=`${m}?${p}`),await o(m,y)}),o=Array.isArray(e.query),c=await i(e),u=await N(c,r.jsonSerializer??s.defaultJsonSerializer),p=Array.isArray(u)?!u.some((({data:e})=>!e)):Boolean(u.data),d=Array.isArray(u)||!u.errors||Array.isArray(u.errors)&&!u.errors.length||"all"===r.errorPolicy||"ignore"===r.errorPolicy;var f;if(c.ok&&d&&p){const{errors:e,...t}=(Array.isArray(u),u),n="ignore"===r.errorPolicy?t:u;return{...o?{data:n}:n,headers:c.headers,status:c.status}}{const e="string"==typeof u?{error:u}:u;throw new l.ClientError({...e,status:c.status,headers:c.headers},{query:t,variables:n})}};async function v(e,t,...n){const r=(0,c.parseRequestExtendedArgs)(e,t,...n);return new m(r.url).request({...r})}t.rawRequest=async(...e)=>{const[t,n,...r]=e,i=(0,c.parseRawRequestExtendedArgs)(t,n,...r);return new m(i.url).rawRequest({...i})},t.request=v,t.batchRequests=async(...e)=>{const t=E(e);return new m(t.url).batchRequests(t)};const E=e=>1===e.length?e[0]:{url:e[0],documents:e[1],requestHeaders:e[2],signal:void 0},T=(e,t,n,r)=>{const i=r??s.defaultJsonSerializer;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:n});if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const o=e.reduce(((e,n,r)=>(e.push({query:n,variables:t?t[r]:void 0}),e)),[]);return i.stringify(o)},N=async(e,t)=>{let n;return e.headers.forEach(((e,t)=>{"content-type"===t.toLowerCase()&&(n=e)})),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},g=e=>"function"==typeof e?e():e;t.gql=(e,...t)=>e.reduce(((e,n,r)=>`${e}${n}${r in t?String(t[r]):""}`),"");var I=n(251);Object.defineProperty(t,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return I.GraphQLWebSocketClient}});var b=n(109);Object.defineProperty(t,"resolveRequestDocument",{enumerable:!0,get:function(){return b.resolveRequestDocument}}),t.default=v},249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawRequestExtendedArgs=t.parseRequestExtendedArgs=t.parseBatchRequestArgs=t.parseRawRequestArgs=t.parseRequestArgs=void 0,t.parseRequestArgs=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},t.parseRawRequestArgs=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},t.parseBatchRequestArgs=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},t.parseRequestExtendedArgs=(e,t,...n)=>{const[r,i]=n;return e.document?e:{url:e,document:t,variables:r,requestHeaders:i,signal:void 0}},t.parseRawRequestExtendedArgs=(e,t,...n)=>{const[r,i]=n;return e.query?e:{url:e,query:t,variables:r,requestHeaders:i,signal:void 0}}},109:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveRequestDocument=void 0;const r=n(250),i=e=>{let t;const n=e.definitions.filter((e=>"OperationDefinition"===e.kind));return 1===n.length&&(t=n[0]?.name?.value),t};t.resolveRequestDocument=e=>{if("string"==typeof e){let t;try{const n=(0,r.parse)(e);t=i(n)}catch(e){}return{query:e,operationName:t}}const t=i(e);return{query:(0,r.print)(e),operationName:t}}},180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;class n extends Error{constructor(e,t){super(`${n.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`),Object.setPrototypeOf(this,n.prototype),this.response=e,this.request=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,n)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${e.status})`}}t.ClientError=n},250:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BREAK:()=>Fe,BreakingChangeType:()=>Wo,DEFAULT_DEPRECATION_REASON:()=>vn,DangerousChangeType:()=>Zo,DirectiveLocation:()=>O,ExecutableDefinitionsRule:()=>Er,FieldsOnCorrectTypeRule:()=>Tr,FragmentsOnCompositeTypesRule:()=>Nr,GRAPHQL_MAX_INT:()=>tn,GRAPHQL_MIN_INT:()=>nn,GraphQLBoolean:()=>an,GraphQLDeprecatedDirective:()=>En,GraphQLDirective:()=>hn,GraphQLEnumType:()=>Jt,GraphQLError:()=>h,GraphQLFloat:()=>on,GraphQLID:()=>cn,GraphQLIncludeDirective:()=>mn,GraphQLInputObjectType:()=>Ht,GraphQLInt:()=>rn,GraphQLInterfaceType:()=>Gt,GraphQLList:()=>bt,GraphQLNonNull:()=>_t,GraphQLObjectType:()=>Ct,GraphQLScalarType:()=>$t,GraphQLSchema:()=>Pn,GraphQLSkipDirective:()=>yn,GraphQLSpecifiedByDirective:()=>Tn,GraphQLString:()=>sn,GraphQLUnionType:()=>Qt,Kind:()=>w,KnownArgumentNamesRule:()=>gr,KnownDirectivesRule:()=>br,KnownFragmentNamesRule:()=>_r,KnownTypeNamesRule:()=>Or,Lexer:()=>V,Location:()=>T,LoneAnonymousOperationRule:()=>Dr,LoneSchemaDefinitionRule:()=>Ar,NoDeprecatedCustomRule:()=>ho,NoFragmentCyclesRule:()=>Sr,NoSchemaIntrospectionCustomRule:()=>mo,NoUndefinedVariablesRule:()=>Rr,NoUnusedFragmentsRule:()=>xr,NoUnusedVariablesRule:()=>Lr,OperationTypeNode:()=>_,OverlappingFieldsCanBeMergedRule:()=>$r,PossibleFragmentSpreadsRule:()=>Yr,PossibleTypeExtensionsRule:()=>Jr,ProvidedRequiredArgumentsRule:()=>Hr,ScalarLeafsRule:()=>Wr,SchemaMetaFieldDef:()=>Fn,SingleFieldSubscriptionsRule:()=>mi,Source:()=>ce,Token:()=>N,TokenKind:()=>D,TypeInfo:()=>or,TypeKind:()=>Ln,TypeMetaFieldDef:()=>$n,TypeNameMetaFieldDef:()=>Cn,UniqueArgumentDefinitionNamesRule:()=>vi,UniqueArgumentNamesRule:()=>Ei,UniqueDirectiveNamesRule:()=>Ti,UniqueDirectivesPerLocationRule:()=>Ni,UniqueEnumValueNamesRule:()=>gi,UniqueFieldDefinitionNamesRule:()=>Ii,UniqueFragmentNamesRule:()=>_i,UniqueInputFieldNamesRule:()=>Oi,UniqueOperationNamesRule:()=>wi,UniqueOperationTypesRule:()=>Di,UniqueTypeNamesRule:()=>Ai,UniqueVariableNamesRule:()=>Si,ValidationContext:()=>Mi,ValuesOfCorrectTypeRule:()=>Ri,VariablesAreInputTypesRule:()=>Li,VariablesInAllowedPositionRule:()=>ki,__Directive:()=>wn,__DirectiveLocation:()=>Dn,__EnumValue:()=>xn,__Field:()=>Sn,__InputValue:()=>Rn,__Schema:()=>On,__Type:()=>An,__TypeKind:()=>kn,assertAbstractType:()=>It,assertCompositeType:()=>Nt,assertDirective:()=>fn,assertEnumType:()=>st,assertEnumValueName:()=>Ke,assertInputObjectType:()=>ct,assertInputType:()=>ht,assertInterfaceType:()=>nt,assertLeafType:()=>Et,assertListType:()=>lt,assertName:()=>Je,assertNamedType:()=>xt,assertNonNullType:()=>dt,assertNullableType:()=>At,assertObjectType:()=>et,assertOutputType:()=>yt,assertScalarType:()=>We,assertSchema:()=>jn,assertType:()=>ze,assertUnionType:()=>it,assertValidName:()=>zo,assertValidSchema:()=>Gn,assertWrappingType:()=>wt,astFromValue:()=>bn,buildASTSchema:()=>wo,buildClientSchema:()=>No,buildSchema:()=>Do,coerceInputValue:()=>ni,concatAST:()=>Qo,createSourceEventStream:()=>fo,defaultFieldResolver:()=>oo,defaultTypeResolver:()=>io,doTypesOverlap:()=>en,execute:()=>Qi,executeSync:()=>Yi,extendSchema:()=>go,findBreakingChanges:()=>es,findDangerousChanges:()=>ts,formatError:()=>v,getArgumentValues:()=>ci,getDirectiveValues:()=>ui,getEnterLeaveForKind:()=>Ve,getIntrospectionQuery:()=>yo,getLocation:()=>l,getNamedType:()=>Lt,getNullableType:()=>St,getOperationAST:()=>vo,getOperationRootType:()=>Eo,getVariableValues:()=>ai,getVisitFn:()=>Ue,graphql:()=>ao,graphqlSync:()=>co,introspectionFromSchema:()=>To,introspectionTypes:()=>Vn,isAbstractType:()=>gt,isCompositeType:()=>Tt,isConstValueNode:()=>dr,isDefinitionNode:()=>cr,isDirective:()=>dn,isEnumType:()=>ot,isEqualType:()=>Wt,isExecutableDefinitionNode:()=>ur,isInputObjectType:()=>at,isInputType:()=>ft,isInterfaceType:()=>tt,isIntrospectionType:()=>Un,isLeafType:()=>vt,isListType:()=>ut,isNamedType:()=>Rt,isNonNullType:()=>pt,isNullableType:()=>Dt,isObjectType:()=>Ze,isOutputType:()=>mt,isRequiredArgument:()=>qt,isRequiredInputField:()=>Xt,isScalarType:()=>Xe,isSchema:()=>Mn,isSelectionNode:()=>lr,isSpecifiedDirective:()=>gn,isSpecifiedScalarType:()=>ln,isType:()=>He,isTypeDefinitionNode:()=>mr,isTypeExtensionNode:()=>vr,isTypeNode:()=>fr,isTypeSubTypeOf:()=>Zt,isTypeSystemDefinitionNode:()=>hr,isTypeSystemExtensionNode:()=>yr,isUnionType:()=>rt,isValidNameError:()=>Xo,isValueNode:()=>pr,isWrappingType:()=>Ot,lexicographicSortSchema:()=>Ao,locatedError:()=>qi,parse:()=>le,parseConstValue:()=>de,parseType:()=>fe,parseValue:()=>pe,print:()=>Me,printError:()=>y,printIntrospectionSchema:()=>ko,printLocation:()=>p,printSchema:()=>Lo,printSourceLocation:()=>d,printType:()=>Vo,resolveObjMapThunk:()=>Ft,resolveReadonlyArrayThunk:()=>kt,responsePathAsArray:()=>ti,separateOperations:()=>Yo,specifiedDirectives:()=>Nn,specifiedRules:()=>$i,specifiedScalarTypes:()=>un,stripIgnoredCharacters:()=>Ho,subscribe:()=>po,syntaxError:()=>E,typeFromAST:()=>ir,validate:()=>ji,validateSchema:()=>qn,valueFromAST:()=>oi,valueFromASTUntyped:()=>Ye,version:()=>r,versionInfo:()=>i,visit:()=>$e,visitInParallel:()=>Ce,visitWithTypeInfo:()=>ar});const r="16.6.0",i=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function o(e,t){if(!Boolean(e))throw new Error(t)}function s(e){return"function"==typeof(null==e?void 0:e.then)}function a(e){return"object"==typeof e&&null!==e}function c(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const u=/\r\n|[\n\r]/g;function l(e,t){let n=0,r=1;for(const i of e.body.matchAll(u)){if("number"==typeof i.index||c(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function p(e){return d(e.source,l(e.source,e.start))}function d(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,c=t.column+a,u=`${e.name}:${s}:${c}\n`,l=r.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){const e=Math.floor(c/80),t=c%80,n=[];for(let e=0;e["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return u+f([[s-1+" |",l[i-1]],[`${s} |`,p],["|","^".padStart(c)],[`${s+1} |`,l[i+1]]])}function f(e){const 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 h extends Error{constructor(e,...t){var n,r,i;const{nodes:o,source:s,positions:c,path:u,originalError:p,extensions:d}=function(e){const 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!=u?u:void 0,this.originalError=null!=p?p:void 0,this.nodes=m(Array.isArray(o)?o:o?[o]:void 0);const f=m(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(r=f[0])||void 0===r?void 0:r.source,this.positions=null!=c?c:null==f?void 0:f.map((e=>e.start)),this.locations=c&&s?c.map((e=>l(s,e))):null==f?void 0:f.map((e=>l(e.source,e.start)));const y=a(null==p?void 0:p.extensions)?null==p?void 0:p.extensions:void 0;this.extensions=null!==(i=null!=d?d:y)&&void 0!==i?i: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!=p&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,h):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(const t of this.nodes)t.loc&&(e+="\n\n"+p(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+d(this.source,t);return e}toJSON(){const 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 m(e){return void 0===e||0===e.length?void 0:e}function y(e){return e.toString()}function v(e){return e.toJSON()}function E(e,t,n){return new h(`Syntax Error: ${n}`,{source:e,positions:[t]})}class T{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 N{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,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}}}const g={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"]},I=new Set(Object.keys(g));function b(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&I.has(t)}var _,O,w,D;function A(e){return 9===e||32===e}function S(e){return e>=48&&e<=57}function R(e){return e>=97&&e<=122||e>=65&&e<=90}function x(e){return R(e)||95===e}function L(e){return R(e)||S(e)||95===e}function k(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let t=0;t0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function F(e){let t=0;for(;t1&&r.slice(1).every((e=>0===e.length||A(e.charCodeAt(0)))),s=n.endsWith('\\"""'),a=e.endsWith('"')&&!s,c=e.endsWith("\\"),u=a||c,l=!(null!=t&&t.minimize)&&(!i||e.length>70||u||o||s);let p="";const d=i&&A(e.charCodeAt(0));return(l&&!d||o)&&(p+="\n"),p+=n,(l||u)&&(p+="\n"),'"""'+p+'"""'}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(_||(_={})),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"}(O||(O={})),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"}(w||(w={})),function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(D||(D={}));class V{constructor(e){const t=new N(D.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!==D.EOF)do{if(e.next)e=e.next;else{const t=Q(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===D.COMMENT);return e}}function U(e){return e===D.BANG||e===D.DOLLAR||e===D.AMP||e===D.PAREN_L||e===D.PAREN_R||e===D.SPREAD||e===D.COLON||e===D.EQUALS||e===D.AT||e===D.BRACKET_L||e===D.BRACKET_R||e===D.BRACE_L||e===D.PIPE||e===D.BRACE_R}function M(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function j(e,t){return P(e.charCodeAt(t))&&B(e.charCodeAt(t+1))}function P(e){return e>=55296&&e<=56319}function B(e){return e>=56320&&e<=57343}function q(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return D.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function G(e,t,n,r,i){const o=e.line,s=1+n-e.lineStart;return new N(t,n,r,o,s,i)}function Q(e,t){const n=e.source.body,r=n.length;let i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function ee(e,t){const 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:"\t",size:2}}throw E(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function te(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,s=o,a="";const c=[];for(;oie)return"[Array]";const n=Math.min(re,e.length),r=e.length-n,i=[];for(let r=0;r1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>ie)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+se(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const ae=function(e,t){return e instanceof t};class ce{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||o(!1,`Body must be a string. Received: ${oe(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||o(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function ue(e){return ae(e,ce)}function le(e,t){return new he(e,t).parseDocument()}function pe(e,t){const n=new he(e,t);n.expectToken(D.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(D.EOF),r}function de(e,t){const n=new he(e,t);n.expectToken(D.SOF);const r=n.parseConstValueLiteral();return n.expectToken(D.EOF),r}function fe(e,t){const n=new he(e,t);n.expectToken(D.SOF);const r=n.parseTypeReference();return n.expectToken(D.EOF),r}class he{constructor(e,t={}){const n=ue(e)?e:new ce(e);this._lexer=new V(n),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(D.NAME);return this.node(e,{kind:w.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:w.DOCUMENT,definitions:this.many(D.SOF,this.parseDefinition,D.EOF)})}parseDefinition(){if(this.peek(D.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===D.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 E(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(){const e=this._lexer.token;if(this.peek(D.BRACE_L))return this.node(e,{kind:w.OPERATION_DEFINITION,operation:_.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(D.NAME)&&(n=this.parseName()),this.node(e,{kind:w.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(D.NAME);switch(e.value){case"query":return _.QUERY;case"mutation":return _.MUTATION;case"subscription":return _.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(D.PAREN_L,this.parseVariableDefinition,D.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:w.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(D.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(D.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(D.DOLLAR),this.node(e,{kind:w.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:w.SELECTION_SET,selections:this.many(D.BRACE_L,this.parseSelection,D.BRACE_R)})}parseSelection(){return this.peek(D.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(D.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:w.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(D.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(D.PAREN_L,t,D.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(D.COLON),this.node(t,{kind:w.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(D.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(D.NAME)?this.node(e,{kind:w.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:w.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:w.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:w.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){const t=this._lexer.token;switch(t.kind){case D.BRACKET_L:return this.parseList(e);case D.BRACE_L:return this.parseObject(e);case D.INT:return this.advanceLexer(),this.node(t,{kind:w.INT,value:t.value});case D.FLOAT:return this.advanceLexer(),this.node(t,{kind:w.FLOAT,value:t.value});case D.STRING:case D.BLOCK_STRING:return this.parseStringLiteral();case D.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:w.BOOLEAN,value:!0});case"false":return this.node(t,{kind:w.BOOLEAN,value:!1});case"null":return this.node(t,{kind:w.NULL});default:return this.node(t,{kind:w.ENUM,value:t.value})}case D.DOLLAR:if(e){if(this.expectToken(D.DOLLAR),this._lexer.token.kind===D.NAME){const e=this._lexer.token.value;throw E(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(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:w.STRING,value:e.value,block:e.kind===D.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:w.LIST,values:this.any(D.BRACKET_L,(()=>this.parseValueLiteral(e)),D.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:w.OBJECT,fields:this.any(D.BRACE_L,(()=>this.parseObjectField(e)),D.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(D.COLON),this.node(t,{kind:w.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(D.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(D.AT),this.node(t,{kind:w.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(D.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(D.BRACKET_R),t=this.node(e,{kind:w.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(D.BANG)?this.node(e,{kind:w.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:w.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(D.STRING)||this.peek(D.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);return this.node(e,{kind:w.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(D.COLON);const n=this.parseNamedType();return this.node(e,{kind:w.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:w.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:w.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(D.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(D.BRACE_L,this.parseFieldDefinition,D.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(D.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:w.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(D.PAREN_L,this.parseInputValueDef,D.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(D.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(D.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:w.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:w.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:w.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(D.EQUALS)?this.delimitedMany(D.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:w.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(D.BRACE_L,this.parseEnumValueDefinition,D.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:w.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 E(this._lexer.source,this._lexer.token.start,`${me(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:w.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(D.BRACE_L,this.parseInputValueDef,D.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===D.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(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(D.BRACE_L,this.parseOperationTypeDefinition,D.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:w.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:w.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:w.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:w.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:w.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:w.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:w.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(D.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:w.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(D.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(O,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new T(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw E(this._lexer.source,t.start,`Expected ${ye(e)}, found ${me(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==D.NAME||t.value!==e)throw E(this._lexer.source,t.start,`Expected "${e}", found ${me(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===D.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return E(this._lexer.source,t.start,`Unexpected ${me(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==D.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw E(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function me(e){const t=e.value;return ye(e.kind)+(null!=t?` "${t}"`:"")}function ye(e){return U(e)?`"${e}"`:e}const ve=5;function Ee(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const o=r.map((e=>`"${e}"`));switch(o.length){case 0:return"";case 1:return i+o[0]+"?";case 2:return i+o[0]+" or "+o[1]+"?"}const s=o.slice(0,ve),a=s.pop();return i+s.join(", ")+", or "+a+"?"}function Te(e){return e}function Ne(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function ge(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function Ie(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function be(e,t){let n=0,r=0;for(;n0);let a=0;do{++r,a=10*a+o-_e,o=t.charCodeAt(r)}while(we(o)&&a>0);if(sa)return 1}else{if(io)return 1;++n,++r}}return e.length-t.length}const _e=48,Oe=57;function we(e){return!isNaN(e)&&_e<=e&&e<=Oe}function De(e,t){const n=Object.create(null),r=new Ae(e),i=Math.floor(.4*e.length)+1;for(const e of t){const t=r.measure(e,i);void 0!==t&&(n[e]=t)}return Object.keys(n).sort(((e,t)=>{const r=n[e]-n[t];return 0!==r?r:be(e,t)}))}class Ae{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=Se(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let r=Se(n),i=this._inputArray;if(r.lengtht)return;const a=this._rows;for(let e=0;e<=s;e++)a[0][e]=e;for(let e=1;e<=o;e++){const n=a[(e-1)%3],o=a[e%3];let c=o[0]=e;for(let t=1;t<=s;t++){const s=r[e-1]===i[t-1]?0:1;let u=Math.min(n[t]+1,o[t-1]+1,n[t-1]+s);if(e>1&&t>1&&r[e-1]===i[t-2]&&r[e-2]===i[t-1]){const n=a[(e-2)%3][t-2];u=Math.min(u,n+1)}ut)return}const c=a[o%3][s];return c<=t?c:void 0}}function Se(e){const t=e.length,n=new Array(t);for(let r=0;re.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Pe(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=qe("(",Pe(e.variableDefinitions,", "),")"),n=Pe([e.operation,Pe([e.name,t]),Pe(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+qe(" = ",n)+qe(" ",Pe(r," "))},SelectionSet:{leave:({selections:e})=>Be(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=qe("",e,": ")+t;let s=o+qe("(",Pe(n,", "),")");return s.length>80&&(s=o+qe("(\n",Ge(Pe(n,"\n")),"\n)")),Pe([s,Pe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+qe(" ",Pe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Pe(["...",qe("on ",e),Pe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${qe("(",Pe(n,", "),")")} on ${t} ${qe("",Pe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?C(e):`"${e.replace(xe,Le)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Pe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Pe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+qe("(",Pe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>qe("",e,"\n")+Pe(["schema",Pe(t," "),Be(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>qe("",e,"\n")+Pe(["scalar",t,Pe(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>qe("",e,"\n")+Pe(["type",t,qe("implements ",Pe(n," & ")),Pe(r," "),Be(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>qe("",e,"\n")+t+(Qe(n)?qe("(\n",Ge(Pe(n,"\n")),"\n)"):qe("(",Pe(n,", "),")"))+": "+r+qe(" ",Pe(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>qe("",e,"\n")+Pe([t+": "+n,qe("= ",r),Pe(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>qe("",e,"\n")+Pe(["interface",t,qe("implements ",Pe(n," & ")),Pe(r," "),Be(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>qe("",e,"\n")+Pe(["union",t,Pe(n," "),qe("= ",Pe(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>qe("",e,"\n")+Pe(["enum",t,Pe(n," "),Be(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>qe("",e,"\n")+Pe([t,Pe(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>qe("",e,"\n")+Pe(["input",t,Pe(n," "),Be(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>qe("",e,"\n")+"directive @"+t+(Qe(n)?qe("(\n",Ge(Pe(n,"\n")),"\n)"):qe("(",Pe(n,", "),")"))+(r?" repeatable":"")+" on "+Pe(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Pe(["extend schema",Pe(e," "),Be(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Pe(["extend scalar",e,Pe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Pe(["extend type",e,qe("implements ",Pe(t," & ")),Pe(n," "),Be(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Pe(["extend interface",e,qe("implements ",Pe(t," & ")),Pe(n," "),Be(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Pe(["extend union",e,Pe(t," "),qe("= ",Pe(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Pe(["extend enum",e,Pe(t," "),Be(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Pe(["extend input",e,Pe(t," "),Be(n)]," ")}};function Pe(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function Be(e){return qe("{\n",Ge(Pe(e,"\n")),"\n}")}function qe(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Ge(e){return qe(" ",e.replace(/\n/g,"\n "))}function Qe(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}function Ye(e,t){switch(e.kind){case w.NULL:return null;case w.INT:return parseInt(e.value,10);case w.FLOAT:return parseFloat(e.value);case w.STRING:case w.ENUM:case w.BOOLEAN:return e.value;case w.LIST:return e.values.map((e=>Ye(e,t)));case w.OBJECT:return ge(e.fields,(e=>e.name.value),(e=>Ye(e.value,t)));case w.VARIABLE:return null==t?void 0:t[e.name.value]}}function Je(e){if(null!=e||o(!1,"Must provide name."),"string"==typeof e||o(!1,"Expected name to be a string."),0===e.length)throw new h("Expected name to be a non-empty string.");for(let t=1;ts(Ye(e,t)),this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(i=e.extensionASTNodes)&&void 0!==i?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||o(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${oe(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||o(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||o(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ct{constructor(e){var t;this.name=Je(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>Ut(e),this._interfaces=()=>Vt(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||o(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${oe(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Pt(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Vt(e){var t;const n=kt(null!==(t=e.interfaces)&&void 0!==t?t:[]);return Array.isArray(n)||o(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Ut(e){const t=Ft(e.fields);return jt(t)||o(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ie(t,((t,n)=>{var r;jt(t)||o(!1,`${e.name}.${n} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||o(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${oe(t.resolve)}.`);const i=null!==(r=t.args)&&void 0!==r?r:{};return jt(i)||o(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:Je(n),description:t.description,type:t.type,args:Mt(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:Re(t.extensions),astNode:t.astNode}}))}function Mt(e){return Object.entries(e).map((([e,t])=>({name:Je(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Re(t.extensions),astNode:t.astNode})))}function jt(e){return a(e)&&!Array.isArray(e)}function Pt(e){return Ie(e,(e=>({description:e.description,type:e.type,args:Bt(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function Bt(e){return ge(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function qt(e){return pt(e.type)&&void 0===e.defaultValue}class Gt{constructor(e){var t;this.name=Je(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=Ut.bind(void 0,e),this._interfaces=Vt.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||o(!1,`${this.name} must provide "resolveType" as a function, but got: ${oe(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Pt(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Qt{constructor(e){var t;this.name=Je(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=Yt.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||o(!1,`${this.name} must provide "resolveType" as a function, but got: ${oe(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Yt(e){const t=kt(e.types);return Array.isArray(t)||o(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class Jt{constructor(e){var t,n,r;this.name=Je(e.name),this.description=e.description,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values=(n=this.name,jt(r=e.values)||o(!1,`${n} values must be an object with value names as keys.`),Object.entries(r).map((([e,t])=>(jt(t)||o(!1,`${n}.${e} must refer to an object with a "value" key representing an internal value but got: ${oe(t)}.`),{name:Ke(e),description:t.description,value:void 0!==t.value?t.value:e,deprecationReason:t.deprecationReason,extensions:Re(t.extensions),astNode:t.astNode})))),this._valueLookup=new Map(this._values.map((e=>[e.value,e]))),this._nameLookup=Ne(this._values,(e=>e.name))}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(void 0===t)throw new h(`Enum "${this.name}" cannot represent value: ${oe(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=oe(e);throw new h(`Enum "${this.name}" cannot represent non-string value: ${t}.`+Kt(this,t))}const t=this.getValue(e);if(null==t)throw new h(`Value "${e}" does not exist in "${this.name}" enum.`+Kt(this,e));return t.value}parseLiteral(e,t){if(e.kind!==w.ENUM){const t=Me(e);throw new h(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+Kt(this,t),{nodes:e})}const n=this.getValue(e.value);if(null==n){const t=Me(e);throw new h(`Value "${t}" does not exist in "${this.name}" enum.`+Kt(this,t),{nodes:e})}return n.value}toConfig(){const e=ge(this.getValues(),(e=>e.name),(e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Kt(e,t){return Ee("the enum value",De(t,e.getValues().map((e=>e.name))))}class Ht{constructor(e){var t;this.name=Je(e.name),this.description=e.description,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=zt.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=Ie(this.getFields(),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function zt(e){const t=Ft(e.fields);return jt(t)||o(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ie(t,((t,n)=>(!("resolve"in t)||o(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:Je(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:Re(t.extensions),astNode:t.astNode})))}function Xt(e){return pt(e.type)&&void 0===e.defaultValue}function Wt(e,t){return e===t||(pt(e)&&pt(t)||!(!ut(e)||!ut(t)))&&Wt(e.ofType,t.ofType)}function Zt(e,t,n){return t===n||(pt(n)?!!pt(t)&&Zt(e,t.ofType,n.ofType):pt(t)?Zt(e,t.ofType,n):ut(n)?!!ut(t)&&Zt(e,t.ofType,n.ofType):!ut(t)&>(n)&&(tt(t)||Ze(t))&&e.isSubType(n,t))}function en(e,t,n){return t===n||(gt(t)?gt(n)?e.getPossibleTypes(t).some((t=>e.isSubType(n,t))):e.isSubType(t,n):!!gt(n)&&e.isSubType(n,t))}const tn=2147483647,nn=-2147483648,rn=new $t({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=pn(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isInteger(n))throw new h(`Int cannot represent non-integer value: ${oe(t)}`);if(n>tn||ntn||etn||te.name===t))}function pn(e){if(a(e)){if("function"==typeof e.valueOf){const t=e.valueOf();if(!a(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}function dn(e){return ae(e,hn)}function fn(e){if(!dn(e))throw new Error(`Expected ${oe(e)} to be a GraphQL directive.`);return e}class hn{constructor(e){var t,n;this.name=Je(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=Re(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||o(!1,`@${e.name} locations must be an Array.`);const r=null!==(n=e.args)&&void 0!==n?n:{};a(r)&&!Array.isArray(r)||o(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=Mt(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Bt(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const mn=new hn({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[O.FIELD,O.FRAGMENT_SPREAD,O.INLINE_FRAGMENT],args:{if:{type:new _t(an),description:"Included when true."}}}),yn=new hn({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[O.FIELD,O.FRAGMENT_SPREAD,O.INLINE_FRAGMENT],args:{if:{type:new _t(an),description:"Skipped when true."}}}),vn="No longer supported",En=new hn({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[O.FIELD_DEFINITION,O.ARGUMENT_DEFINITION,O.INPUT_FIELD_DEFINITION,O.ENUM_VALUE],args:{reason:{type:sn,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:vn}}}),Tn=new hn({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[O.SCALAR],args:{url:{type:new _t(sn),description:"The URL that specifies the behavior of this scalar."}}}),Nn=Object.freeze([mn,yn,En,Tn]);function gn(e){return Nn.some((({name:t})=>t===e.name))}function In(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function bn(e,t){if(pt(t)){const n=bn(e,t.ofType);return(null==n?void 0:n.kind)===w.NULL?null:n}if(null===e)return{kind:w.NULL};if(void 0===e)return null;if(ut(t)){const n=t.ofType;if(In(e)){const t=[];for(const r of e){const e=bn(r,n);null!=e&&t.push(e)}return{kind:w.LIST,values:t}}return bn(e,n)}if(at(t)){if(!a(e))return null;const n=[];for(const r of Object.values(t.getFields())){const t=bn(e[r.name],r.type);t&&n.push({kind:w.OBJECT_FIELD,name:{kind:w.NAME,value:r.name},value:t})}return{kind:w.OBJECT,fields:n}}if(vt(t)){const n=t.serialize(e);if(null==n)return null;if("boolean"==typeof n)return{kind:w.BOOLEAN,value:n};if("number"==typeof n&&Number.isFinite(n)){const e=String(n);return _n.test(e)?{kind:w.INT,value:e}:{kind:w.FLOAT,value:e}}if("string"==typeof n)return ot(t)?{kind:w.ENUM,value:n}:t===cn&&_n.test(n)?{kind:w.INT,value:n}:{kind:w.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${oe(n)}.`)}c(!1,"Unexpected input type: "+oe(t))}const _n=/^-?(?:0|[1-9][0-9]*)$/,On=new Ct({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:sn,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new _t(new bt(new _t(An))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new _t(An),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:An,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:An,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new _t(new bt(new _t(wn))),resolve:e=>e.getDirectives()}})}),wn=new Ct({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new _t(sn),resolve:e=>e.name},description:{type:sn,resolve:e=>e.description},isRepeatable:{type:new _t(an),resolve:e=>e.isRepeatable},locations:{type:new _t(new bt(new _t(Dn))),resolve:e=>e.locations},args:{type:new _t(new bt(new _t(Rn))),args:{includeDeprecated:{type:an,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))}})}),Dn=new Jt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:O.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:O.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:O.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:O.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:O.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:O.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:O.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:O.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:O.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:O.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:O.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:O.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:O.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:O.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:O.UNION,description:"Location adjacent to a union definition."},ENUM:{value:O.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:O.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:O.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:O.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),An=new Ct({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new _t(kn),resolve:e=>Xe(e)?Ln.SCALAR:Ze(e)?Ln.OBJECT:tt(e)?Ln.INTERFACE:rt(e)?Ln.UNION:ot(e)?Ln.ENUM:at(e)?Ln.INPUT_OBJECT:ut(e)?Ln.LIST:pt(e)?Ln.NON_NULL:void c(!1,`Unexpected type: "${oe(e)}".`)},name:{type:sn,resolve:e=>"name"in e?e.name:void 0},description:{type:sn,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:sn,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new bt(new _t(Sn)),args:{includeDeprecated:{type:an,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Ze(e)||tt(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},interfaces:{type:new bt(new _t(An)),resolve(e){if(Ze(e)||tt(e))return e.getInterfaces()}},possibleTypes:{type:new bt(new _t(An)),resolve(e,t,n,{schema:r}){if(gt(e))return r.getPossibleTypes(e)}},enumValues:{type:new bt(new _t(xn)),args:{includeDeprecated:{type:an,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ot(e)){const n=e.getValues();return t?n:n.filter((e=>null==e.deprecationReason))}}},inputFields:{type:new bt(new _t(Rn)),args:{includeDeprecated:{type:an,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(at(e)){const n=Object.values(e.getFields());return t?n:n.filter((e=>null==e.deprecationReason))}}},ofType:{type:An,resolve:e=>"ofType"in e?e.ofType:void 0}})}),Sn=new Ct({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new _t(sn),resolve:e=>e.name},description:{type:sn,resolve:e=>e.description},args:{type:new _t(new bt(new _t(Rn))),args:{includeDeprecated:{type:an,defaultValue:!1}},resolve:(e,{includeDeprecated:t})=>t?e.args:e.args.filter((e=>null==e.deprecationReason))},type:{type:new _t(An),resolve:e=>e.type},isDeprecated:{type:new _t(an),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:sn,resolve:e=>e.deprecationReason}})}),Rn=new Ct({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new _t(sn),resolve:e=>e.name},description:{type:sn,resolve:e=>e.description},type:{type:new _t(An),resolve:e=>e.type},defaultValue:{type:sn,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=bn(n,t);return r?Me(r):null}},isDeprecated:{type:new _t(an),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:sn,resolve:e=>e.deprecationReason}})}),xn=new Ct({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new _t(sn),resolve:e=>e.name},description:{type:sn,resolve:e=>e.description},isDeprecated:{type:new _t(an),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:sn,resolve:e=>e.deprecationReason}})});var Ln;!function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"}(Ln||(Ln={}));const kn=new Jt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Ln.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Ln.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Ln.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Ln.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Ln.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Ln.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Ln.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Ln.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Fn={name:"__schema",type:new _t(On),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},$n={name:"__type",type:An,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new _t(sn),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Cn={name:"__typename",type:new _t(sn),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Vn=Object.freeze([On,wn,Dn,An,Sn,Rn,xn,kn]);function Un(e){return Vn.some((({name:t})=>e.name===t))}function Mn(e){return ae(e,Pn)}function jn(e){if(!Mn(e))throw new Error(`Expected ${oe(e)} to be a GraphQL schema.`);return e}class Pn{constructor(e){var t,n;this.__validationErrors=!0===e.assumeValid?[]:void 0,a(e)||o(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||o(!1,`"types" must be Array if provided but got: ${oe(e.types)}.`),!e.directives||Array.isArray(e.directives)||o(!1,`"directives" must be Array if provided but got: ${oe(e.directives)}.`),this.description=e.description,this.extensions=Re(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(n=e.directives)&&void 0!==n?n:Nn;const r=new Set(e.types);if(null!=e.types)for(const t of e.types)r.delete(t),Bn(t,r);null!=this._queryType&&Bn(this._queryType,r),null!=this._mutationType&&Bn(this._mutationType,r),null!=this._subscriptionType&&Bn(this._subscriptionType,r);for(const e of this._directives)if(dn(e))for(const t of e.args)Bn(t.type,r);Bn(On,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const e of r){if(null==e)continue;const t=e.name;if(t||o(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[t])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${t}".`);if(this._typeMap[t]=e,tt(e)){for(const t of e.getInterfaces())if(tt(t)){let n=this._implementationsMap[t.name];void 0===n&&(n=this._implementationsMap[t.name]={objects:[],interfaces:[]}),n.interfaces.push(e)}}else if(Ze(e))for(const t of e.getInterfaces())if(tt(t)){let n=this._implementationsMap[t.name];void 0===n&&(n=this._implementationsMap[t.name]={objects:[],interfaces:[]}),n.objects.push(e)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case _.QUERY:return this.getQueryType();case _.MUTATION:return this.getMutationType();case _.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return rt(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(void 0===n){if(n=Object.create(null),rt(e))for(const t of e.getTypes())n[t.name]=!0;else{const t=this.getImplementations(e);for(const e of t.objects)n[e.name]=!0;for(const e of t.interfaces)n[e.name]=!0}this._subTypeMap[e.name]=n}return void 0!==n[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find((t=>t.name===e))}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function Bn(e,t){const n=Lt(e);if(!t.has(n))if(t.add(n),rt(n))for(const e of n.getTypes())Bn(e,t);else if(Ze(n)||tt(n)){for(const e of n.getInterfaces())Bn(e,t);for(const e of Object.values(n.getFields())){Bn(e.type,t);for(const n of e.args)Bn(n.type,t)}}else if(at(n))for(const e of Object.values(n.getFields()))Bn(e.type,t);return t}function qn(e){if(jn(e),e.__validationErrors)return e.__validationErrors;const t=new Qn(e);!function(e){const t=e.schema,n=t.getQueryType();if(n){if(!Ze(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${oe(n)}.`,null!==(r=Yn(t,_.QUERY))&&void 0!==r?r:n.astNode)}}else e.reportError("Query root type must be provided.",t.astNode);const i=t.getMutationType();var o;i&&!Ze(i)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${oe(i)}.`,null!==(o=Yn(t,_.MUTATION))&&void 0!==o?o:i.astNode);const s=t.getSubscriptionType();var a;s&&!Ze(s)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${oe(s)}.`,null!==(a=Yn(t,_.SUBSCRIPTION))&&void 0!==a?a:s.astNode)}(t),function(e){for(const n of e.schema.getDirectives())if(dn(n)){Jn(e,n);for(const r of n.args){var t;Jn(e,r),ft(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${oe(r.type)}.`,r.astNode),qt(r)&&null!=r.deprecationReason&&e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[rr(r.astNode),null===(t=r.astNode)||void 0===t?void 0:t.type])}}else e.reportError(`Expected directive but got: ${oe(n)}.`,null==n?void 0:n.astNode)}(t),function(e){const t=function(e){const t=Object.create(null),n=[],r=Object.create(null);return function i(o){if(t[o.name])return;t[o.name]=!0,r[o.name]=n.length;const s=Object.values(o.getFields());for(const t of s)if(pt(t.type)&&at(t.type.ofType)){const o=t.type.ofType,s=r[o.name];if(n.push(t),void 0===s)i(o);else{const t=n.slice(s),r=t.map((e=>e.name)).join(".");e.reportError(`Cannot reference Input Object "${o.name}" within itself through a series of non-null fields: "${r}".`,t.map((e=>e.astNode)))}n.pop()}r[o.name]=void 0}}(e),n=e.schema.getTypeMap();for(const r of Object.values(n))Rt(r)?(Un(r)||Jn(e,r),Ze(r)||tt(r)?(Kn(e,r),Hn(e,r)):rt(r)?Wn(e,r):ot(r)?Zn(e,r):at(r)&&(er(e,r),t(r))):e.reportError(`Expected GraphQL named type but got: ${oe(r)}.`,r.astNode)}(t);const n=t.getErrors();return e.__validationErrors=n,n}function Gn(e){const t=qn(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}class Qn{constructor(e){this._errors=[],this.schema=e}reportError(e,t){const n=Array.isArray(t)?t.filter(Boolean):t;this._errors.push(new h(e,{nodes:n}))}getErrors(){return this._errors}}function Yn(e,t){var n;return null===(n=[e.astNode,...e.extensionASTNodes].flatMap((e=>{var t;return null!==(t=null==e?void 0:e.operationTypes)&&void 0!==t?t:[]})).find((e=>e.operation===t)))||void 0===n?void 0:n.type}function Jn(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Kn(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){var r;Jn(e,s),mt(s.type)||e.reportError(`The type of ${t.name}.${s.name} must be Output Type but got: ${oe(s.type)}.`,null===(r=s.astNode)||void 0===r?void 0:r.type);for(const n of s.args){const r=n.name;var i,o;Jn(e,n),ft(n.type)||e.reportError(`The type of ${t.name}.${s.name}(${r}:) must be Input Type but got: ${oe(n.type)}.`,null===(i=n.astNode)||void 0===i?void 0:i.type),qt(n)&&null!=n.deprecationReason&&e.reportError(`Required argument ${t.name}.${s.name}(${r}:) cannot be deprecated.`,[rr(n.astNode),null===(o=n.astNode)||void 0===o?void 0:o.type])}}}function Hn(e,t){const n=Object.create(null);for(const r of t.getInterfaces())tt(r)?t!==r?n[r.name]?e.reportError(`Type ${t.name} can only implement ${r.name} once.`,tr(t,r)):(n[r.name]=!0,Xn(e,t,r),zn(e,t,r)):e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,tr(t,r)):e.reportError(`Type ${oe(t)} must only implement Interface types, it cannot implement ${oe(r)}.`,tr(t,r))}function zn(e,t,n){const r=t.getFields();for(const c of Object.values(n.getFields())){const u=c.name,l=r[u];if(l){var i,o;Zt(e.schema,l.type,c.type)||e.reportError(`Interface field ${n.name}.${u} expects type ${oe(c.type)} but ${t.name}.${u} is type ${oe(l.type)}.`,[null===(i=c.astNode)||void 0===i?void 0:i.type,null===(o=l.astNode)||void 0===o?void 0:o.type]);for(const r of c.args){const i=r.name,o=l.args.find((e=>e.name===i));var s,a;o?Wt(r.type,o.type)||e.reportError(`Interface field argument ${n.name}.${u}(${i}:) expects type ${oe(r.type)} but ${t.name}.${u}(${i}:) is type ${oe(o.type)}.`,[null===(s=r.astNode)||void 0===s?void 0:s.type,null===(a=o.astNode)||void 0===a?void 0:a.type]):e.reportError(`Interface field argument ${n.name}.${u}(${i}:) expected but ${t.name}.${u} does not provide it.`,[r.astNode,l.astNode])}for(const r of l.args){const i=r.name;!c.args.find((e=>e.name===i))&&qt(r)&&e.reportError(`Object field ${t.name}.${u} includes required argument ${i} that is missing from the Interface field ${n.name}.${u}.`,[r.astNode,c.astNode])}}else e.reportError(`Interface field ${n.name}.${u} expected but ${t.name} does not provide it.`,[c.astNode,t.astNode,...t.extensionASTNodes])}}function Xn(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...tr(n,i),...tr(t,n)])}function Wn(e,t){const n=t.getTypes();0===n.length&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n)r[i.name]?e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,nr(t,i.name)):(r[i.name]=!0,Ze(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${oe(i)}.`,nr(t,String(i))))}function Zn(e,t){const n=t.getValues();0===n.length&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const t of n)Jn(e,t)}function er(e,t){const n=Object.values(t.getFields());0===n.length&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){var r,i;Jn(e,o),ft(o.type)||e.reportError(`The type of ${t.name}.${o.name} must be Input Type but got: ${oe(o.type)}.`,null===(r=o.astNode)||void 0===r?void 0:r.type),Xt(o)&&null!=o.deprecationReason&&e.reportError(`Required input field ${t.name}.${o.name} cannot be deprecated.`,[rr(o.astNode),null===(i=o.astNode)||void 0===i?void 0:i.type])}}function tr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.interfaces)&&void 0!==t?t:[]})).filter((e=>e.name.value===t.name))}function nr(e,t){const{astNode:n,extensionASTNodes:r}=e;return(null!=n?[n,...r]:r).flatMap((e=>{var t;return null!==(t=e.types)&&void 0!==t?t:[]})).filter((e=>e.name.value===t))}function rr(e){var t;return null==e||null===(t=e.directives)||void 0===t?void 0:t.find((e=>e.name.value===En.name))}function ir(e,t){switch(t.kind){case w.LIST_TYPE:{const n=ir(e,t.type);return n&&new bt(n)}case w.NON_NULL_TYPE:{const n=ir(e,t.type);return n&&new _t(n)}case w.NAMED_TYPE:return e.getType(t.name.value)}}class or{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=n?n:sr,t&&(ft(t)&&this._inputTypeStack.push(t),Tt(t)&&this._parentTypeStack.push(t),mt(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case w.SELECTION_SET:{const e=Lt(this.getType());this._parentTypeStack.push(Tt(e)?e:void 0);break}case w.FIELD:{const n=this.getParentType();let r,i;n&&(r=this._getFieldDef(t,n,e),r&&(i=r.type)),this._fieldDefStack.push(r),this._typeStack.push(mt(i)?i:void 0);break}case w.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case w.OPERATION_DEFINITION:{const n=t.getRootType(e.operation);this._typeStack.push(Ze(n)?n:void 0);break}case w.INLINE_FRAGMENT:case w.FRAGMENT_DEFINITION:{const n=e.typeCondition,r=n?ir(t,n):Lt(this.getType());this._typeStack.push(mt(r)?r:void 0);break}case w.VARIABLE_DEFINITION:{const n=ir(t,e.type);this._inputTypeStack.push(ft(n)?n:void 0);break}case w.ARGUMENT:{var n;let t,r;const i=null!==(n=this.getDirective())&&void 0!==n?n:this.getFieldDef();i&&(t=i.args.find((t=>t.name===e.name.value)),t&&(r=t.type)),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push(ft(r)?r:void 0);break}case w.LIST:{const e=St(this.getInputType()),t=ut(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ft(t)?t:void 0);break}case w.OBJECT_FIELD:{const t=Lt(this.getInputType());let n,r;at(t)&&(r=t.getFields()[e.name.value],r&&(n=r.type)),this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push(ft(n)?n:void 0);break}case w.ENUM:{const t=Lt(this.getInputType());let n;ot(t)&&(n=t.getValue(e.value)),this._enumValue=n;break}}}leave(e){switch(e.kind){case w.SELECTION_SET:this._parentTypeStack.pop();break;case w.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case w.DIRECTIVE:this._directive=null;break;case w.OPERATION_DEFINITION:case w.INLINE_FRAGMENT:case w.FRAGMENT_DEFINITION:this._typeStack.pop();break;case w.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case w.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case w.LIST:case w.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case w.ENUM:this._enumValue=null}}}function sr(e,t,n){const r=n.name.value;return r===Fn.name&&e.getQueryType()===t?Fn:r===$n.name&&e.getQueryType()===t?$n:r===Cn.name&&Tt(t)?Cn:Ze(t)||tt(t)?t.getFields()[r]:void 0}function ar(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=Ve(t,r.kind).enter;if(i){const o=i.apply(t,n);return void 0!==o&&(e.leave(r),b(o)&&e.enter(o)),o}},leave(...n){const r=n[0],i=Ve(t,r.kind).leave;let o;return i&&(o=i.apply(t,n)),e.leave(r),o}}}function cr(e){return ur(e)||hr(e)||yr(e)}function ur(e){return e.kind===w.OPERATION_DEFINITION||e.kind===w.FRAGMENT_DEFINITION}function lr(e){return e.kind===w.FIELD||e.kind===w.FRAGMENT_SPREAD||e.kind===w.INLINE_FRAGMENT}function pr(e){return e.kind===w.VARIABLE||e.kind===w.INT||e.kind===w.FLOAT||e.kind===w.STRING||e.kind===w.BOOLEAN||e.kind===w.NULL||e.kind===w.ENUM||e.kind===w.LIST||e.kind===w.OBJECT}function dr(e){return pr(e)&&(e.kind===w.LIST?e.values.some(dr):e.kind===w.OBJECT?e.fields.some((e=>dr(e.value))):e.kind!==w.VARIABLE)}function fr(e){return e.kind===w.NAMED_TYPE||e.kind===w.LIST_TYPE||e.kind===w.NON_NULL_TYPE}function hr(e){return e.kind===w.SCHEMA_DEFINITION||mr(e)||e.kind===w.DIRECTIVE_DEFINITION}function mr(e){return e.kind===w.SCALAR_TYPE_DEFINITION||e.kind===w.OBJECT_TYPE_DEFINITION||e.kind===w.INTERFACE_TYPE_DEFINITION||e.kind===w.UNION_TYPE_DEFINITION||e.kind===w.ENUM_TYPE_DEFINITION||e.kind===w.INPUT_OBJECT_TYPE_DEFINITION}function yr(e){return e.kind===w.SCHEMA_EXTENSION||vr(e)}function vr(e){return e.kind===w.SCALAR_TYPE_EXTENSION||e.kind===w.OBJECT_TYPE_EXTENSION||e.kind===w.INTERFACE_TYPE_EXTENSION||e.kind===w.UNION_TYPE_EXTENSION||e.kind===w.ENUM_TYPE_EXTENSION||e.kind===w.INPUT_OBJECT_TYPE_EXTENSION}function Er(e){return{Document(t){for(const n of t.definitions)if(!ur(n)){const t=n.kind===w.SCHEMA_DEFINITION||n.kind===w.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new h(`The ${t} definition is not executable.`,{nodes:n}))}return!1}}}function Tr(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const r=e.getSchema(),i=t.name.value;let o=Ee("to use an inline fragment on",function(e,t,n){if(!gt(t))return[];const r=new Set,i=Object.create(null);for(const s of e.getPossibleTypes(t))if(s.getFields()[n]){r.add(s),i[s.name]=1;for(const e of s.getInterfaces()){var o;e.getFields()[n]&&(r.add(e),i[e.name]=(null!==(o=i[e.name])&&void 0!==o?o:0)+1)}}return[...r].sort(((t,n)=>{const r=i[n.name]-i[t.name];return 0!==r?r:tt(t)&&e.isSubType(t,n)?-1:tt(n)&&e.isSubType(n,t)?1:be(t.name,n.name)})).map((e=>e.name))}(r,n,i));""===o&&(o=Ee(function(e,t){return Ze(e)||tt(e)?De(t,Object.keys(e.getFields())):[]}(n,i))),e.reportError(new h(`Cannot query field "${i}" on type "${n.name}".`+o,{nodes:t}))}}}}function Nr(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const t=ir(e.getSchema(),n);if(t&&!Tt(t)){const t=Me(n);e.reportError(new h(`Fragment cannot condition on non composite type "${t}".`,{nodes:n}))}}},FragmentDefinition(t){const n=ir(e.getSchema(),t.typeCondition);if(n&&!Tt(n)){const n=Me(t.typeCondition);e.reportError(new h(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function gr(e){return{...Ir(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const n=t.name.value,o=De(n,r.args.map((e=>e.name)));e.reportError(new h(`Unknown argument "${n}" on field "${i.name}.${r.name}".`+Ee(o),{nodes:t}))}}}}function Ir(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Nn;for(const e of r)t[e.name]=e.args.map((e=>e.name));const i=e.getDocument().definitions;for(const e of i)if(e.kind===w.DIRECTIVE_DEFINITION){var o;const n=null!==(o=e.arguments)&&void 0!==o?o:[];t[e.name.value]=n.map((e=>e.name.value))}return{Directive(n){const r=n.name.value,i=t[r];if(n.arguments&&i)for(const t of n.arguments){const n=t.name.value;if(!i.includes(n)){const o=De(n,i);e.reportError(new h(`Unknown argument "${n}" on directive "@${r}".`+Ee(o),{nodes:t}))}}return!1}}}function br(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Nn;for(const e of r)t[e.name]=e.locations;const i=e.getDocument().definitions;for(const e of i)e.kind===w.DIRECTIVE_DEFINITION&&(t[e.name.value]=e.locations.map((e=>e.value)));return{Directive(n,r,i,o,s){const a=n.name.value,u=t[a];if(!u)return void e.reportError(new h(`Unknown directive "@${a}".`,{nodes:n}));const l=function(e){const t=e[e.length-1];switch("kind"in t||c(!1),t.kind){case w.OPERATION_DEFINITION:return function(e){switch(e){case _.QUERY:return O.QUERY;case _.MUTATION:return O.MUTATION;case _.SUBSCRIPTION:return O.SUBSCRIPTION}}(t.operation);case w.FIELD:return O.FIELD;case w.FRAGMENT_SPREAD:return O.FRAGMENT_SPREAD;case w.INLINE_FRAGMENT:return O.INLINE_FRAGMENT;case w.FRAGMENT_DEFINITION:return O.FRAGMENT_DEFINITION;case w.VARIABLE_DEFINITION:return O.VARIABLE_DEFINITION;case w.SCHEMA_DEFINITION:case w.SCHEMA_EXTENSION:return O.SCHEMA;case w.SCALAR_TYPE_DEFINITION:case w.SCALAR_TYPE_EXTENSION:return O.SCALAR;case w.OBJECT_TYPE_DEFINITION:case w.OBJECT_TYPE_EXTENSION:return O.OBJECT;case w.FIELD_DEFINITION:return O.FIELD_DEFINITION;case w.INTERFACE_TYPE_DEFINITION:case w.INTERFACE_TYPE_EXTENSION:return O.INTERFACE;case w.UNION_TYPE_DEFINITION:case w.UNION_TYPE_EXTENSION:return O.UNION;case w.ENUM_TYPE_DEFINITION:case w.ENUM_TYPE_EXTENSION:return O.ENUM;case w.ENUM_VALUE_DEFINITION:return O.ENUM_VALUE;case w.INPUT_OBJECT_TYPE_DEFINITION:case w.INPUT_OBJECT_TYPE_EXTENSION:return O.INPUT_OBJECT;case w.INPUT_VALUE_DEFINITION:{const t=e[e.length-3];return"kind"in t||c(!1),t.kind===w.INPUT_OBJECT_TYPE_DEFINITION?O.INPUT_FIELD_DEFINITION:O.ARGUMENT_DEFINITION}default:c(!1,"Unexpected kind: "+oe(t.kind))}}(s);l&&!u.includes(l)&&e.reportError(new h(`Directive "@${a}" may not be used on ${l}.`,{nodes:n}))}}}function _r(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new h(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Or(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const t of e.getDocument().definitions)mr(t)&&(r[t.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(t,o,s,a,c){const u=t.name.value;if(!n[u]&&!r[u]){var l;const n=null!==(l=c[2])&&void 0!==l?l:s,r=null!=n&&"kind"in(p=n)&&(hr(p)||yr(p));if(r&&wr.includes(u))return;const o=De(u,r?wr.concat(i):i);e.reportError(new h(`Unknown type "${u}".`+Ee(o),{nodes:t}))}var p}}}const wr=[...un,...Vn].map((e=>e.name));function Dr(e){let t=0;return{Document(e){t=e.definitions.filter((e=>e.kind===w.OPERATION_DEFINITION)).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new h("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function Ar(e){var t,n,r;const i=e.getSchema(),o=null!==(t=null!==(n=null!==(r=null==i?void 0:i.astNode)&&void 0!==r?r:null==i?void 0:i.getQueryType())&&void 0!==n?n:null==i?void 0:i.getMutationType())&&void 0!==t?t:null==i?void 0:i.getSubscriptionType();let s=0;return{SchemaDefinition(t){o?e.reportError(new h("Cannot define a new schema within a schema extension.",{nodes:t})):(s>0&&e.reportError(new h("Must provide only one schema definition.",{nodes:t})),++s)}}}function Sr(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(o){if(t[o.name.value])return;const s=o.name.value;t[s]=!0;const a=e.getFragmentSpreads(o.selectionSet);if(0!==a.length){r[s]=n.length;for(const t of a){const o=t.name.value,s=r[o];if(n.push(t),void 0===s){const t=e.getFragment(o);t&&i(t)}else{const t=n.slice(s),r=t.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new h(`Cannot spread fragment "${o}" within itself`+(""!==r?` via ${r}.`:"."),{nodes:t}))}n.pop()}r[s]=void 0}}}function Rr(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const r=i.name.value;!0!==t[r]&&e.reportError(new h(n.name?`Variable "$${r}" is not defined by operation "${n.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}function xr(e){const t=[],n=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(n.push(e),!1),Document:{leave(){const r=Object.create(null);for(const n of t)for(const t of e.getRecursivelyReferencedFragments(n))r[t.name.value]=!0;for(const t of n){const n=t.name.value;!0!==r[n]&&e.reportError(new h(`Fragment "${n}" is never used.`,{nodes:t}))}}}}}function Lr(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:e}of i)r[e.name.value]=!0;for(const i of t){const t=i.variable.name.value;!0!==r[t]&&e.reportError(new h(n.name?`Variable "$${t}" is never used in operation "${n.name.value}".`:`Variable "$${t}" is never used.`,{nodes:i}))}}},VariableDefinition(e){t.push(e)}}}function kr(e){switch(e.kind){case w.OBJECT:return{...e,fields:(t=e.fields,t.map((e=>({...e,value:kr(e.value)}))).sort(((e,t)=>be(e.name.value,t.name.value))))};case w.LIST:return{...e,values:e.values.map(kr)};case w.INT:case w.FLOAT:case w.STRING:case w.BOOLEAN:case w.NULL:case w.ENUM:case w.VARIABLE:return e}var t}function Fr(e){return Array.isArray(e)?e.map((([e,t])=>`subfields "${e}" conflict because `+Fr(t))).join(" and "):e}function $r(e){const t=new Qr,n=new Map;return{SelectionSet(r){const i=function(e,t,n,r,i){const o=[],[s,a]=Br(e,t,r,i);if(function(e,t,n,r,i){for(const[o,s]of Object.entries(i))if(s.length>1)for(let i=0;i0)return[[t,e.map((([e])=>e))],[n,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(r,i,c,p)}}function jr(e){var t;const n=null!==(t=e.arguments)&&void 0!==t?t:[];return Me(kr({kind:w.OBJECT,fields:n.map((e=>({kind:w.OBJECT_FIELD,name:e.name,value:e.value})))}))}function Pr(e,t){return ut(e)?!ut(t)||Pr(e.ofType,t.ofType):!!ut(t)||(pt(e)?!pt(t)||Pr(e.ofType,t.ofType):!!pt(t)||!(!vt(e)&&!vt(t))&&e!==t)}function Br(e,t,n,r){const i=t.get(r);if(i)return i;const o=Object.create(null),s=Object.create(null);Gr(e,n,r,o,s);const a=[o,Object.keys(s)];return t.set(r,a),a}function qr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=ir(e.getSchema(),n.typeCondition);return Br(e,t,i,n.selectionSet)}function Gr(e,t,n,r,i){for(const o of n.selections)switch(o.kind){case w.FIELD:{const e=o.name.value;let n;(Ze(t)||tt(t))&&(n=t.getFields()[e]);const i=o.alias?o.alias.value:e;r[i]||(r[i]=[]),r[i].push([t,o,n]);break}case w.FRAGMENT_SPREAD:i[o.name.value]=!0;break;case w.INLINE_FRAGMENT:{const n=o.typeCondition,s=n?ir(e.getSchema(),n):t;Gr(e,s,o.selectionSet,r,i);break}}}class Qr{constructor(){this._data=new Map}has(e,t,n){var r;const[i,o]=ee.name.value)));for(const n of r.args)if(!i.has(n.name)&&qt(n)){const i=oe(n.type);e.reportError(new h(`Field "${r.name}" argument "${n.name}" of type "${i}" is required, but it was not provided.`,{nodes:t}))}}}}}function zr(e){var t;const n=Object.create(null),r=e.getSchema(),i=null!==(t=null==r?void 0:r.getDirectives())&&void 0!==t?t:Nn;for(const e of i)n[e.name]=Ne(e.args.filter(qt),(e=>e.name));const o=e.getDocument().definitions;for(const e of o)if(e.kind===w.DIRECTIVE_DEFINITION){var s;const t=null!==(s=e.arguments)&&void 0!==s?s:[];n[e.name.value]=Ne(t.filter(Xr),(e=>e.name.value))}return{Directive:{leave(t){const r=t.name.value,i=n[r];if(i){var o;const n=null!==(o=t.arguments)&&void 0!==o?o:[],s=new Set(n.map((e=>e.name.value)));for(const[n,o]of Object.entries(i))if(!s.has(n)){const i=He(o.type)?oe(o.type):Me(o.type);e.reportError(new h(`Directive "@${r}" argument "${n}" of type "${i}" is required, but it was not provided.`,{nodes:t}))}}}}}}function Xr(e){return e.type.kind===w.NON_NULL_TYPE&&null==e.defaultValue}function Wr(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n)if(vt(Lt(n))){if(r){const i=t.name.value,o=oe(n);e.reportError(new h(`Field "${i}" must not have a selection since type "${o}" has no subfields.`,{nodes:r}))}}else if(!r){const r=t.name.value,i=oe(n);e.reportError(new h(`Field "${r}" of type "${i}" must have a selection of subfields. Did you mean "${r} { ... }"?`,{nodes:t}))}}}}function Zr(e){return e.map((e=>"number"==typeof e?"["+e.toString()+"]":"."+e)).join("")}function ei(e,t,n){return{prev:e,key:t,typename:n}}function ti(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function ni(e,t,n=ri){return ii(e,t,n,void 0)}function ri(e,t,n){let r="Invalid value "+oe(t);throw e.length>0&&(r+=` at "value${Zr(e)}"`),n.message=r+": "+n.message,n}function ii(e,t,n,r){if(pt(t))return null!=e?ii(e,t.ofType,n,r):void n(ti(r),e,new h(`Expected non-nullable type "${oe(t)}" not to be null.`));if(null==e)return null;if(ut(t)){const i=t.ofType;return In(e)?Array.from(e,((e,t)=>{const o=ei(r,t,void 0);return ii(e,i,n,o)})):[ii(e,i,n,r)]}if(at(t)){if(!a(e))return void n(ti(r),e,new h(`Expected type "${t.name}" to be an object.`));const i={},o=t.getFields();for(const s of Object.values(o)){const o=e[s.name];if(void 0!==o)i[s.name]=ii(o,s.type,n,ei(r,s.name,t.name));else if(void 0!==s.defaultValue)i[s.name]=s.defaultValue;else if(pt(s.type)){const t=oe(s.type);n(ti(r),e,new h(`Field "${s.name}" of required type "${t}" was not provided.`))}}for(const i of Object.keys(e))if(!o[i]){const o=De(i,Object.keys(t.getFields()));n(ti(r),e,new h(`Field "${i}" is not defined by type "${t.name}".`+Ee(o)))}return i}if(vt(t)){let i;try{i=t.parseValue(e)}catch(i){return void n(ti(r),e,i instanceof h?i:new h(`Expected type "${t.name}". `+i.message,{originalError:i}))}return void 0===i&&n(ti(r),e,new h(`Expected type "${t.name}".`)),i}c(!1,"Unexpected input type: "+oe(t))}function oi(e,t,n){if(e){if(e.kind===w.VARIABLE){const r=e.name.value;if(null==n||void 0===n[r])return;const i=n[r];if(null===i&&pt(t))return;return i}if(pt(t)){if(e.kind===w.NULL)return;return oi(e,t.ofType,n)}if(e.kind===w.NULL)return null;if(ut(t)){const r=t.ofType;if(e.kind===w.LIST){const t=[];for(const i of e.values)if(si(i,n)){if(pt(r))return;t.push(null)}else{const e=oi(i,r,n);if(void 0===e)return;t.push(e)}return t}const i=oi(e,r,n);if(void 0===i)return;return[i]}if(at(t)){if(e.kind!==w.OBJECT)return;const r=Object.create(null),i=Ne(e.fields,(e=>e.name.value));for(const e of Object.values(t.getFields())){const t=i[e.name];if(!t||si(t.value,n)){if(void 0!==e.defaultValue)r[e.name]=e.defaultValue;else if(pt(e.type))return;continue}const o=oi(t.value,e.type,n);if(void 0===o)return;r[e.name]=o}return r}if(vt(t)){let r;try{r=t.parseLiteral(e,n)}catch(e){return}if(void 0===r)return;return r}c(!1,"Unexpected input type: "+oe(t))}}function si(e,t){return e.kind===w.VARIABLE&&(null==t||void 0===t[e.name.value])}function ai(e,t,n,r){const i=[],o=null==r?void 0:r.maxErrors;try{const r=function(e,t,n,r){const i={};for(const o of t){const t=o.variable.name.value,s=ir(e,o.type);if(!ft(s)){const e=Me(o.type);r(new h(`Variable "$${t}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!li(n,t)){if(o.defaultValue)i[t]=oi(o.defaultValue,s);else if(pt(s)){const e=oe(s);r(new h(`Variable "$${t}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const a=n[t];if(null===a&&pt(s)){const e=oe(s);r(new h(`Variable "$${t}" of non-null type "${e}" must not be null.`,{nodes:o}))}else i[t]=ni(a,s,((e,n,i)=>{let s=`Variable "$${t}" got invalid value `+oe(n);e.length>0&&(s+=` at "${t}${Zr(e)}"`),r(new h(s+"; "+i.message,{nodes:o,originalError:i.originalError}))}))}return i}(e,t,n,(e=>{if(null!=o&&i.length>=o)throw new h("Too many errors processing variables, error limit reached. Execution aborted.");i.push(e)}));if(0===i.length)return{coerced:r}}catch(e){i.push(e)}return{errors:i}}function ci(e,t,n){var r;const i={},o=Ne(null!==(r=t.arguments)&&void 0!==r?r:[],(e=>e.name.value));for(const r of e.args){const e=r.name,s=r.type,a=o[e];if(!a){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(pt(s))throw new h(`Argument "${e}" of required type "${oe(s)}" was not provided.`,{nodes:t});continue}const c=a.value;let u=c.kind===w.NULL;if(c.kind===w.VARIABLE){const t=c.name.value;if(null==n||!li(n,t)){if(void 0!==r.defaultValue)i[e]=r.defaultValue;else if(pt(s))throw new h(`Argument "${e}" of required type "${oe(s)}" was provided the variable "$${t}" which was not provided a runtime value.`,{nodes:c});continue}u=null==n[t]}if(u&&pt(s))throw new h(`Argument "${e}" of non-null type "${oe(s)}" must not be null.`,{nodes:c});const l=oi(c,s,n);if(void 0===l)throw new h(`Argument "${e}" has invalid value ${Me(c)}.`,{nodes:c});i[e]=l}return i}function ui(e,t,n){var r;const i=null===(r=t.directives)||void 0===r?void 0:r.find((t=>t.name.value===e.name));if(i)return ci(e,i,n)}function li(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pi(e,t,n,r,i){const o=new Map;return di(e,t,n,r,i,o,new Set),o}function di(e,t,n,r,i,o,s){for(const c of i.selections)switch(c.kind){case w.FIELD:{if(!fi(n,c))continue;const e=(a=c).alias?a.alias.value:a.name.value,t=o.get(e);void 0!==t?t.push(c):o.set(e,[c]);break}case w.INLINE_FRAGMENT:if(!fi(n,c)||!hi(e,c,r))continue;di(e,t,n,r,c.selectionSet,o,s);break;case w.FRAGMENT_SPREAD:{const i=c.name.value;if(s.has(i)||!fi(n,c))continue;s.add(i);const a=t[i];if(!a||!hi(e,a,r))continue;di(e,t,n,r,a.selectionSet,o,s);break}}var a}function fi(e,t){const n=ui(yn,t,e);if(!0===(null==n?void 0:n.if))return!1;const r=ui(mn,t,e);return!1!==(null==r?void 0:r.if)}function hi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=ir(e,r);return i===n||!!gt(i)&&e.isSubType(i,n)}function mi(e){return{OperationDefinition(t){if("subscription"===t.operation){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,o=Object.create(null),s=e.getDocument(),a=Object.create(null);for(const e of s.definitions)e.kind===w.FRAGMENT_DEFINITION&&(a[e.name.value]=e);const c=pi(n,a,o,r,t.selectionSet);if(c.size>1){const t=[...c.values()].slice(1).flat();e.reportError(new h(null!=i?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:t}))}for(const t of c.values())t[0].name.value.startsWith("__")&&e.reportError(new h(null!=i?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:t}))}}}}}function yi(e,t){const n=new Map;for(const r of e){const e=t(r),i=n.get(e);void 0===i?n.set(e,[r]):i.push(r)}return n}function vi(e){return{DirectiveDefinition(e){var t;const r=null!==(t=e.arguments)&&void 0!==t?t:[];return n(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t;const r=e.name.value,i=null!==(t=e.fields)&&void 0!==t?t:[];for(const e of i){var o;n(`${r}.${e.name.value}`,null!==(o=e.arguments)&&void 0!==o?o:[])}return!1}function n(t,n){const r=yi(n,(e=>e.name.value));for(const[n,i]of r)i.length>1&&e.reportError(new h(`Argument "${t}(${n}:)" can only be defined once.`,{nodes:i.map((e=>e.name))}));return!1}}function Ei(e){return{Field:t,Directive:t};function t(t){var n;const r=yi(null!==(n=t.arguments)&&void 0!==n?n:[],(e=>e.name.value));for(const[t,n]of r)n.length>1&&e.reportError(new h(`There can be only one argument named "${t}".`,{nodes:n.map((e=>e.name))}))}}function Ti(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(null==n||!n.getDirective(i))return t[i]?e.reportError(new h(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new h(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}))}}}function Ni(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Nn;for(const e of r)t[e.name]=!e.isRepeatable;const i=e.getDocument().definitions;for(const e of i)e.kind===w.DIRECTIVE_DEFINITION&&(t[e.name.value]=!e.repeatable);const o=Object.create(null),s=Object.create(null);return{enter(n){if(!("directives"in n)||!n.directives)return;let r;if(n.kind===w.SCHEMA_DEFINITION||n.kind===w.SCHEMA_EXTENSION)r=o;else if(mr(n)||vr(n)){const e=n.name.value;r=s[e],void 0===r&&(s[e]=r=Object.create(null))}else r=Object.create(null);for(const i of n.directives){const n=i.name.value;t[n]&&(r[n]?e.reportError(new h(`The directive "@${n}" can only be used once at this location.`,{nodes:[r[n],i]})):r[n]=i)}}}}function gi(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const s=null!==(i=t.values)&&void 0!==i?i:[],a=r[o];for(const t of s){const r=t.name.value,i=n[o];ot(i)&&i.getValue(r)?e.reportError(new h(`Enum value "${o}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):a[r]?e.reportError(new h(`Enum value "${o}.${r}" can only be defined once.`,{nodes:[a[r],t.name]})):a[r]=t.name}return!1}}function Ii(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i;const o=t.name.value;r[o]||(r[o]=Object.create(null));const s=null!==(i=t.fields)&&void 0!==i?i:[],a=r[o];for(const t of s){const r=t.name.value;bi(n[o],r)?e.reportError(new h(`Field "${o}.${r}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:t.name})):a[r]?e.reportError(new h(`Field "${o}.${r}" can only be defined once.`,{nodes:[a[r],t.name]})):a[r]=t.name}return!1}}function bi(e,t){return!!(Ze(e)||tt(e)||at(e))&&null!=e.getFields()[t]}function _i(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new h(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Oi(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const e=t.pop();e||c(!1),n=e}},ObjectField(t){const r=t.name.value;n[r]?e.reportError(new h(`There can be only one input field named "${r}".`,{nodes:[n[r],t.name]})):n[r]=t.name}}}function wi(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new h(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Di(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;const o=null!==(i=t.operationTypes)&&void 0!==i?i:[];for(const t of o){const i=t.operation,o=n[i];r[i]?e.reportError(new h(`Type for ${i} already defined in the schema. It cannot be redefined.`,{nodes:t})):o?e.reportError(new h(`There can be only one ${i} type in schema.`,{nodes:[o,t]})):n[i]=t}return!1}}function Ai(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(r){const i=r.name.value;if(null==n||!n.getType(i))return t[i]?e.reportError(new h(`There can be only one type named "${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1;e.reportError(new h(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:r.name}))}}function Si(e){return{OperationDefinition(t){var n;const r=yi(null!==(n=t.variableDefinitions)&&void 0!==n?n:[],(e=>e.variable.name.value));for(const[t,n]of r)n.length>1&&e.reportError(new h(`There can be only one variable named "$${t}".`,{nodes:n.map((e=>e.variable.name))}))}}}function Ri(e){return{ListValue(t){if(!ut(St(e.getParentInputType())))return xi(e,t),!1},ObjectValue(t){const n=Lt(e.getInputType());if(!at(n))return xi(e,t),!1;const r=Ne(t.fields,(e=>e.name.value));for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xt(i)){const r=oe(i.type);e.reportError(new h(`Field "${n.name}.${i.name}" of required type "${r}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Lt(e.getParentInputType());if(!e.getInputType()&&at(n)){const r=De(t.name.value,Object.keys(n.getFields()));e.reportError(new h(`Field "${t.name.value}" is not defined by type "${n.name}".`+Ee(r),{nodes:t}))}},NullValue(t){const n=e.getInputType();pt(n)&&e.reportError(new h(`Expected value of type "${oe(n)}", found ${Me(t)}.`,{nodes:t}))},EnumValue:t=>xi(e,t),IntValue:t=>xi(e,t),FloatValue:t=>xi(e,t),StringValue:t=>xi(e,t),BooleanValue:t=>xi(e,t)}}function xi(e,t){const n=e.getInputType();if(!n)return;const r=Lt(n);if(vt(r))try{if(void 0===r.parseLiteral(t,void 0)){const r=oe(n);e.reportError(new h(`Expected value of type "${r}", found ${Me(t)}.`,{nodes:t}))}}catch(r){const i=oe(n);r instanceof h?e.reportError(r):e.reportError(new h(`Expected value of type "${i}", found ${Me(t)}; `+r.message,{nodes:t,originalError:r}))}else{const r=oe(n);e.reportError(new h(`Expected value of type "${r}", found ${Me(t)}.`,{nodes:t}))}}function Li(e){return{VariableDefinition(t){const n=ir(e.getSchema(),t.type);if(void 0!==n&&!ft(n)){const n=t.variable.name.value,r=Me(t.type);e.reportError(new h(`Variable "$${n}" cannot be non-input type "${r}".`,{nodes:t.type}))}}}}function ki(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:n,type:i,defaultValue:o}of r){const r=n.name.value,s=t[r];if(s&&i){const t=e.getSchema(),a=ir(t,s.type);if(a&&!Fi(t,a,s.defaultValue,i,o)){const t=oe(a),o=oe(i);e.reportError(new h(`Variable "$${r}" of type "${t}" used in position expecting type "${o}".`,{nodes:[s,n]}))}}}}},VariableDefinition(e){t[e.variable.name.value]=e}}}function Fi(e,t,n,r,i){return pt(r)&&!pt(t)?(null!=n&&n.kind!==w.NULL||void 0!==i)&&Zt(e,t,r.ofType):Zt(e,t,r)}const $i=Object.freeze([Er,wi,Dr,mi,Or,Nr,Li,Wr,Tr,_i,_r,xr,Yr,Sr,Si,Rr,Lr,br,Ni,gr,Ei,Ri,Hr,ki,$r,Oi]),Ci=Object.freeze([Ar,Di,Ai,gi,Ii,vi,Ti,Or,br,Ni,Jr,Ir,Ei,Oi,zr]);class Vi{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const e of this.getDocument().definitions)e.kind===w.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];const n=[e];let r;for(;r=n.pop();)for(const e of r.selections)e.kind===w.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&n.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];const n=Object.create(null),r=[e.selectionSet];let i;for(;i=r.pop();)for(const e of this.getFragmentSpreads(i)){const i=e.name.value;if(!0!==n[i]){n[i]=!0;const e=this.getFragment(i);e&&(t.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class Ui extends Vi{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Mi extends Vi{constructor(e,t,n,r){super(t,r),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){const n=[],r=new or(this._schema);$e(e,ar(r,{VariableDefinition:()=>!1,Variable(e){n.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue()})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(const n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function ji(e,t,n=$i,r,i=new or(e)){var s;const a=null!==(s=null==r?void 0:r.maxErrors)&&void 0!==s?s:100;t||o(!1,"Must provide document."),Gn(e);const c=Object.freeze({}),u=[],l=new Mi(e,t,i,(e=>{if(u.length>=a)throw u.push(new h("Too many validation errors, error limit reached. Validation aborted.")),c;u.push(e)})),p=Ce(n.map((e=>e(l))));try{$e(t,ar(i,p))}catch(e){if(e!==c)throw e}return u}function Pi(e,t,n=Ci){const r=[],i=new Ui(e,t,(e=>{r.push(e)}));return $e(e,Ce(n.map((e=>e(i))))),r}class Bi extends Error{constructor(e){super("Unexpected error value: "+oe(e)),this.name="NonErrorThrown",this.thrownValue=e}}function qi(e,t,n){var r;const i=(o=e)instanceof Error?o:new Bi(o);var o,s;return s=i,Array.isArray(s.path)?i:new h(i.message,{nodes:null!==(r=i.nodes)&&void 0!==r?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}const Gi=function(e){let t;return function(e,n,r){void 0===t&&(t=new WeakMap);let i=t.get(e);void 0===i&&(i=new WeakMap,t.set(e,i));let o=i.get(n);void 0===o&&(o=new WeakMap,i.set(n,o));let s=o.get(r);return void 0===s&&(c=n,u=r,s=function(e,t,n,r,i){const o=new Map,s=new Set;for(const a of i)a.selectionSet&&di(e,t,n,r,a.selectionSet,o,s);return o}((a=e).schema,a.fragments,a.variableValues,c,u),o.set(r,s)),s;var a,c,u}}();function Qi(e){arguments.length<2||o(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Ki(t,n,r);const a=Hi(e);if(!("schema"in a))return{errors:a};try{const{operation:e}=a,t=function(e,t,n){const r=e.schema.getRootType(t.operation);if(null==r)throw new h(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=pi(e.schema,e.fragments,e.variableValues,r,t.selectionSet),o=void 0;switch(t.operation){case _.QUERY:return zi(e,r,n,o,i);case _.MUTATION:return function(e,t,n,r,i){return function(e,t,n){let r=Object.create(null);for(const n of e)r=s(r)?r.then((e=>t(e,n))):t(r,n);return r}(i.entries(),((r,[i,o])=>{const a=ei(undefined,i,t.name),c=Xi(e,t,n,o,a);return void 0===c?r:s(c)?c.then((e=>(r[i]=e,r))):(r[i]=c,r)}))}(e,r,n,0,i);case _.SUBSCRIPTION:return zi(e,r,n,o,i)}}(a,e,i);return s(t)?t.then((e=>Ji(e,a.errors)),(e=>(a.errors.push(e),Ji(null,a.errors)))):Ji(t,a.errors)}catch(e){return a.errors.push(e),Ji(null,a.errors)}}function Yi(e){const t=Qi(e);if(s(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Ji(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function Ki(e,t,n){t||o(!1,"Must provide document."),Gn(e),null==n||a(n)||o(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Hi(e){var t,n;const{schema:r,document:i,rootValue:o,contextValue:s,variableValues:a,operationName:c,fieldResolver:u,typeResolver:l,subscribeFieldResolver:p}=e;let d;const f=Object.create(null);for(const e of i.definitions)switch(e.kind){case w.OPERATION_DEFINITION:if(null==c){if(void 0!==d)return[new h("Must provide operation name if query contains multiple operations.")];d=e}else(null===(t=e.name)||void 0===t?void 0:t.value)===c&&(d=e);break;case w.FRAGMENT_DEFINITION:f[e.name.value]=e}if(!d)return null!=c?[new h(`Unknown operation named "${c}".`)]:[new h("Must provide an operation.")];const m=ai(r,null!==(n=d.variableDefinitions)&&void 0!==n?n:[],null!=a?a:{},{maxErrors:50});return m.errors?m.errors:{schema:r,fragments:f,rootValue:o,contextValue:s,operation:d,variableValues:m.coerced,fieldResolver:null!=u?u:oo,typeResolver:null!=l?l:io,subscribeFieldResolver:null!=p?p:oo,errors:[]}}function zi(e,t,n,r,i){const o=Object.create(null);let a=!1;for(const[c,u]of i.entries()){const i=Xi(e,t,n,u,ei(r,c,t.name));void 0!==i&&(o[c]=i,s(i)&&(a=!0))}return a?(c=o,Promise.all(Object.values(c)).then((e=>{const t=Object.create(null);for(const[n,r]of Object.keys(c).entries())t[r]=e[n];return t}))):o;var c}function Xi(e,t,n,r,i){var o;const a=so(e.schema,t,r[0]);if(!a)return;const c=a.type,u=null!==(o=a.resolve)&&void 0!==o?o:e.fieldResolver,l=Wi(e,a,r,t,i);try{const t=u(n,ci(a,r[0],e.variableValues),e.contextValue,l);let o;return o=s(t)?t.then((t=>eo(e,c,r,l,i,t))):eo(e,c,r,l,i,t),s(o)?o.then(void 0,(t=>Zi(qi(t,r,ti(i)),c,e))):o}catch(t){return Zi(qi(t,r,ti(i)),c,e)}}function Wi(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Zi(e,t,n){if(pt(t))throw e;return n.errors.push(e),null}function eo(e,t,n,r,i,o){if(o instanceof Error)throw o;if(pt(t)){const s=eo(e,t.ofType,n,r,i,o);if(null===s)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return s}return null==o?null:ut(t)?function(e,t,n,r,i,o){if(!In(o))throw new h(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const a=t.ofType;let c=!1;const u=Array.from(o,((t,o)=>{const u=ei(i,o,void 0);try{let i;return i=s(t)?t.then((t=>eo(e,a,n,r,u,t))):eo(e,a,n,r,u,t),s(i)?(c=!0,i.then(void 0,(t=>Zi(qi(t,n,ti(u)),a,e)))):i}catch(t){return Zi(qi(t,n,ti(u)),a,e)}}));return c?Promise.all(u):u}(e,t,n,r,i,o):vt(t)?function(e,t){const n=e.serialize(t);if(null==n)throw new Error(`Expected \`${oe(e)}.serialize(${oe(t)})\` to return non-nullable value, returned: ${oe(n)}`);return n}(t,o):gt(t)?function(e,t,n,r,i,o){var a;const c=null!==(a=t.resolveType)&&void 0!==a?a:e.typeResolver,u=e.contextValue,l=c(o,u,r,t);return s(l)?l.then((s=>no(e,to(s,e,t,n,r,o),n,r,i,o))):no(e,to(l,e,t,n,r,o),n,r,i,o)}(e,t,n,r,i,o):Ze(t)?no(e,t,n,r,i,o):void c(!1,"Cannot complete value of unexpected output type: "+oe(t))}function to(e,t,n,r,i,o){if(null==e)throw new h(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(Ze(e))throw new h("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new h(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${oe(o)}, received "${oe(e)}".`);const s=t.schema.getType(e);if(null==s)throw new h(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!Ze(s))throw new h(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,s))throw new h(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,{nodes:r});return s}function no(e,t,n,r,i,o){const a=Gi(e,t,n);if(t.isTypeOf){const c=t.isTypeOf(o,e.contextValue,r);if(s(c))return c.then((r=>{if(!r)throw ro(t,o,n);return zi(e,t,o,i,a)}));if(!c)throw ro(t,o,n)}return zi(e,t,o,i,a)}function ro(e,t,n){return new h(`Expected value of type "${e.name}" but got: ${oe(t)}.`,{nodes:n})}const io=function(e,t,n,r){if(a(e)&&"string"==typeof e.__typename)return e.__typename;const i=n.schema.getPossibleTypes(r),o=[];for(let r=0;r{for(let t=0;tt(uo(e))))}function co(e){const t=uo(e);if(s(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function uo(e){arguments.length<2||o(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:s,operationName:a,fieldResolver:c,typeResolver:u}=e,l=qn(t);if(l.length>0)return{errors:l};let p;try{p=le(n)}catch(e){return{errors:[e]}}const d=ji(t,p);return d.length>0?{errors:d}:Qi({schema:t,document:p,rootValue:r,contextValue:i,variableValues:s,operationName:a,fieldResolver:c,typeResolver:u})}function lo(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function po(e){arguments.length<2||o(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await fo(e);return lo(t)?function(t,n){const r=t[Symbol.asyncIterator]();async function i(t){if(t.done)return t;try{return{value:await(n=t.value,Qi({...e,rootValue:n})),done:!1}}catch(e){if("function"==typeof r.return)try{await r.return()}catch(e){}throw e}var n}return{next:async()=>i(await r.next()),return:async()=>"function"==typeof r.return?i(await r.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof r.throw)return i(await r.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(t):t}async function fo(...e){const t=function(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}(e),{schema:n,document:r,variableValues:i}=t;Ki(n,r,i);const o=Hi(t);if(!("schema"in o))return{errors:o};try{const e=await async function(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:o}=e,s=t.getSubscriptionType();if(null==s)throw new h("Schema is not configured to execute subscription operation.",{nodes:r});const a=pi(t,n,i,s,r.selectionSet),[c,u]=[...a.entries()][0],l=so(t,s,u[0]);if(!l){const e=u[0].name.value;throw new h(`The subscription field "${e}" is not defined.`,{nodes:u})}const p=ei(void 0,c,s.name),d=Wi(e,l,u,s,p);try{var f;const t=ci(l,u[0],i),n=e.contextValue,r=null!==(f=l.subscribe)&&void 0!==f?f:e.subscribeFieldResolver,s=await r(o,t,n,d);if(s instanceof Error)throw s;return s}catch(e){throw qi(e,u,ti(p))}}(o);if(!lo(e))throw new Error(`Subscription field must return Async Iterable. Received: ${oe(e)}.`);return e}catch(e){if(e instanceof h)return{errors:[e]};throw e}}function ho(e){return{Field(t){const n=e.getFieldDef(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getParentType();null!=i||c(!1),e.reportError(new h(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=e.getDirective();if(null!=i)e.reportError(new h(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const i=e.getParentType(),o=e.getFieldDef();null!=i&&null!=o||c(!1),e.reportError(new h(`Field "${i.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Lt(e.getParentInputType());if(at(n)){const r=n.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new h(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=null==n?void 0:n.deprecationReason;if(n&&null!=r){const i=Lt(e.getInputType());null!=i||c(!1),e.reportError(new h(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function mo(e){return{Field(t){const n=Lt(e.getType());n&&Un(n)&&e.reportError(new h(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function yo(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"";function o(e){return t.inputValueDeprecation?e:""}return`\n query IntrospectionQuery {\n __schema {\n ${t.schemaDescription?n:""}\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ${n}\n ${i}\n locations\n args${o("(includeDeprecated: true)")} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${n}\n ${r}\n fields(includeDeprecated: true) {\n name\n ${n}\n args${o("(includeDeprecated: true)")} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${o("(includeDeprecated: true)")} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${n}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${n}\n type { ...TypeRef }\n defaultValue\n ${o("isDeprecated")}\n ${o("deprecationReason")}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n `}function vo(e,t){let n=null;for(const i of e.definitions){var r;if(i.kind===w.OPERATION_DEFINITION)if(null==t){if(n)return null;n=i}else if((null===(r=i.name)||void 0===r?void 0:r.value)===t)return i}return n}function Eo(e,t){if("query"===t.operation){const n=e.getQueryType();if(!n)throw new h("Schema does not define the required query root type.",{nodes:t});return n}if("mutation"===t.operation){const n=e.getMutationType();if(!n)throw new h("Schema is not configured for mutations.",{nodes:t});return n}if("subscription"===t.operation){const n=e.getSubscriptionType();if(!n)throw new h("Schema is not configured for subscriptions.",{nodes:t});return n}throw new h("Can only have query, mutation and subscription operations.",{nodes:t})}function To(e,t){const n=Yi({schema:e,document:le(yo({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t}))});return!n.errors&&n.data||c(!1),n.data}function No(e,t){a(e)&&a(e.__schema)||o(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${oe(e)}.`);const n=e.__schema,r=ge(n.types,(e=>e.name),(e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case Ln.SCALAR:return new $t({name:(r=e).name,description:r.description,specifiedByURL:r.specifiedByURL});case Ln.OBJECT:return new Ct({name:(n=e).name,description:n.description,interfaces:()=>h(n),fields:()=>m(n)});case Ln.INTERFACE:return new Gt({name:(t=e).name,description:t.description,interfaces:()=>h(t),fields:()=>m(t)});case Ln.UNION:return function(e){if(!e.possibleTypes){const t=oe(e);throw new Error(`Introspection result missing possibleTypes: ${t}.`)}return new Qt({name:e.name,description:e.description,types:()=>e.possibleTypes.map(d)})}(e);case Ln.ENUM:return function(e){if(!e.enumValues){const t=oe(e);throw new Error(`Introspection result missing enumValues: ${t}.`)}return new Jt({name:e.name,description:e.description,values:ge(e.enumValues,(e=>e.name),(e=>({description:e.description,deprecationReason:e.deprecationReason})))})}(e);case Ln.INPUT_OBJECT:return function(e){if(!e.inputFields){const t=oe(e);throw new Error(`Introspection result missing inputFields: ${t}.`)}return new Ht({name:e.name,description:e.description,fields:()=>v(e.inputFields)})}(e)}var t,n,r;const i=oe(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${i}.`)}(e)));for(const e of[...un,...Vn])r[e.name]&&(r[e.name]=e);const i=n.queryType?d(n.queryType):null,s=n.mutationType?d(n.mutationType):null,c=n.subscriptionType?d(n.subscriptionType):null,u=n.directives?n.directives.map((function(e){if(!e.args){const t=oe(e);throw new Error(`Introspection result missing directive args: ${t}.`)}if(!e.locations){const t=oe(e);throw new Error(`Introspection result missing directive locations: ${t}.`)}return new hn({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:v(e.args)})})):[];return new Pn({description:n.description,query:i,mutation:s,subscription:c,types:Object.values(r),directives:u,assumeValid:null==t?void 0:t.assumeValid});function l(e){if(e.kind===Ln.LIST){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new bt(l(t))}if(e.kind===Ln.NON_NULL){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");const n=l(t);return new _t(At(n))}return p(e)}function p(e){const t=e.name;if(!t)throw new Error(`Unknown type reference: ${oe(e)}.`);const n=r[t];if(!n)throw new Error(`Invalid or incomplete schema, unknown type: ${t}. Ensure that a full introspection query is used in order to build a client schema.`);return n}function d(e){return et(p(e))}function f(e){return nt(p(e))}function h(e){if(null===e.interfaces&&e.kind===Ln.INTERFACE)return[];if(!e.interfaces){const t=oe(e);throw new Error(`Introspection result missing interfaces: ${t}.`)}return e.interfaces.map(f)}function m(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${oe(e)}.`);return ge(e.fields,(e=>e.name),y)}function y(e){const t=l(e.type);if(!mt(t)){const e=oe(t);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const t=oe(e);throw new Error(`Introspection result missing field args: ${t}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:v(e.args)}}function v(e){return ge(e,(e=>e.name),E)}function E(e){const t=l(e.type);if(!ft(t)){const e=oe(t);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const n=null!=e.defaultValue?oi(pe(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:n,deprecationReason:e.deprecationReason}}}function go(e,t,n){jn(e),null!=t&&t.kind===w.DOCUMENT||o(!1,"Must provide valid Document AST."),!0!==(null==n?void 0:n.assumeValid)&&!0!==(null==n?void 0:n.assumeValidSDL)&&function(e,t){const n=Pi(e,t);if(0!==n.length)throw new Error(n.map((e=>e.message)).join("\n\n"))}(t,e);const r=e.toConfig(),i=Io(r,t,n);return r===i?e:new Pn(i)}function Io(e,t,n){var r,i,o,s;const a=[],u=Object.create(null),l=[];let p;const d=[];for(const e of t.definitions)if(e.kind===w.SCHEMA_DEFINITION)p=e;else if(e.kind===w.SCHEMA_EXTENSION)d.push(e);else if(mr(e))a.push(e);else if(vr(e)){const t=e.name.value,n=u[t];u[t]=n?n.concat([e]):[e]}else e.kind===w.DIRECTIVE_DEFINITION&&l.push(e);if(0===Object.keys(u).length&&0===a.length&&0===l.length&&0===d.length&&null==p)return e;const f=Object.create(null);for(const t of e.types)f[t.name]=Un(h=t)||ln(h)?h:Xe(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];let i=n.specifiedByURL;for(const e of r){var o;i=null!==(o=Oo(e))&&void 0!==o?o:i}return new $t({...n,specifiedByURL:i,extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):Ze(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new Ct({...n,interfaces:()=>[...e.getInterfaces().map(E),...S(r)],fields:()=>({...Ie(n.fields,T),..._(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):tt(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new Gt({...n,interfaces:()=>[...e.getInterfaces().map(E),...S(r)],fields:()=>({...Ie(n.fields,T),..._(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):rt(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new Qt({...n,types:()=>[...e.getTypes().map(E),...R(r)],extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):ot(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[e.name])&&void 0!==t?t:[];return new Jt({...n,values:{...n.values,...A(r)},extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):at(h)?function(e){var t;const n=e.toConfig(),r=null!==(t=u[n.name])&&void 0!==t?t:[];return new Ht({...n,fields:()=>({...Ie(n.fields,(e=>({...e,type:v(e.type)}))),...D(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(h):void c(!1,"Unexpected type: "+oe(h));var h;for(const e of a){var m;const t=e.name.value;f[t]=null!==(m=bo[t])&&void 0!==m?m:x(e)}const y={query:e.query&&E(e.query),mutation:e.mutation&&E(e.mutation),subscription:e.subscription&&E(e.subscription),...p&&g([p]),...g(d)};return{description:null===(r=p)||void 0===r||null===(i=r.description)||void 0===i?void 0:i.value,...y,types:Object.values(f),directives:[...e.directives.map((function(e){const t=e.toConfig();return new hn({...t,args:Ie(t.args,N)})})),...l.map((function(e){var t;return new hn({name:e.name.value,description:null===(t=e.description)||void 0===t?void 0:t.value,locations:e.locations.map((({value:e})=>e)),isRepeatable:e.repeatable,args:O(e.arguments),astNode:e})}))],extensions:Object.create(null),astNode:null!==(o=p)&&void 0!==o?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:null!==(s=null==n?void 0:n.assumeValid)&&void 0!==s&&s};function v(e){return ut(e)?new bt(v(e.ofType)):pt(e)?new _t(v(e.ofType)):E(e)}function E(e){return f[e.name]}function T(e){return{...e,type:v(e.type),args:e.args&&Ie(e.args,N)}}function N(e){return{...e,type:v(e.type)}}function g(e){const t={};for(const r of e){var n;const e=null!==(n=r.operationTypes)&&void 0!==n?n:[];for(const n of e)t[n.operation]=I(n.type)}return t}function I(e){var t;const n=e.name.value,r=null!==(t=bo[n])&&void 0!==t?t:f[n];if(void 0===r)throw new Error(`Unknown type: "${n}".`);return r}function b(e){return e.kind===w.LIST_TYPE?new bt(b(e.type)):e.kind===w.NON_NULL_TYPE?new _t(b(e.type)):I(e)}function _(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={type:b(n.type),description:null===(r=n.description)||void 0===r?void 0:r.value,args:O(n.arguments),deprecationReason:_o(n),astNode:n}}}return t}function O(e){const t=null!=e?e:[],n=Object.create(null);for(const e of t){var r;const t=b(e.type);n[e.name.value]={type:t,description:null===(r=e.description)||void 0===r?void 0:r.value,defaultValue:oi(e.defaultValue,t),deprecationReason:_o(e),astNode:e}}return n}function D(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.fields)&&void 0!==n?n:[];for(const n of e){var r;const e=b(n.type);t[n.name.value]={type:e,description:null===(r=n.description)||void 0===r?void 0:r.value,defaultValue:oi(n.defaultValue,e),deprecationReason:_o(n),astNode:n}}}return t}function A(e){const t=Object.create(null);for(const i of e){var n;const e=null!==(n=i.values)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={description:null===(r=n.description)||void 0===r?void 0:r.value,deprecationReason:_o(n),astNode:n}}}return t}function S(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.interfaces)||void 0===n?void 0:n.map(I))&&void 0!==t?t:[]}))}function R(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.types)||void 0===n?void 0:n.map(I))&&void 0!==t?t:[]}))}function x(e){var t;const n=e.name.value,r=null!==(t=u[n])&&void 0!==t?t:[];switch(e.kind){case w.OBJECT_TYPE_DEFINITION:{var i;const t=[e,...r];return new Ct({name:n,description:null===(i=e.description)||void 0===i?void 0:i.value,interfaces:()=>S(t),fields:()=>_(t),astNode:e,extensionASTNodes:r})}case w.INTERFACE_TYPE_DEFINITION:{var o;const t=[e,...r];return new Gt({name:n,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>S(t),fields:()=>_(t),astNode:e,extensionASTNodes:r})}case w.ENUM_TYPE_DEFINITION:{var s;const t=[e,...r];return new Jt({name:n,description:null===(s=e.description)||void 0===s?void 0:s.value,values:A(t),astNode:e,extensionASTNodes:r})}case w.UNION_TYPE_DEFINITION:{var a;const t=[e,...r];return new Qt({name:n,description:null===(a=e.description)||void 0===a?void 0:a.value,types:()=>R(t),astNode:e,extensionASTNodes:r})}case w.SCALAR_TYPE_DEFINITION:var c;return new $t({name:n,description:null===(c=e.description)||void 0===c?void 0:c.value,specifiedByURL:Oo(e),astNode:e,extensionASTNodes:r});case w.INPUT_OBJECT_TYPE_DEFINITION:{var l;const t=[e,...r];return new Ht({name:n,description:null===(l=e.description)||void 0===l?void 0:l.value,fields:()=>D(t),astNode:e,extensionASTNodes:r})}}}}const bo=Ne([...un,...Vn],(e=>e.name));function _o(e){const t=ui(En,e);return null==t?void 0:t.reason}function Oo(e){const t=ui(Tn,e);return null==t?void 0:t.url}function wo(e,t){null!=e&&e.kind===w.DOCUMENT||o(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e){const t=Pi(e);if(0!==t.length)throw new Error(t.map((e=>e.message)).join("\n\n"))}(e);const n=Io({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(const e of n.types)switch(e.name){case"Query":n.query=e;break;case"Mutation":n.mutation=e;break;case"Subscription":n.subscription=e}const r=[...n.directives,...Nn.filter((e=>n.directives.every((t=>t.name!==e.name))))];return new Pn({...n,directives:r})}function Do(e,t){return wo(le(e,{noLocation:null==t?void 0:t.noLocation,allowLegacyFragmentVariables:null==t?void 0:t.allowLegacyFragmentVariables}),{assumeValidSDL:null==t?void 0:t.assumeValidSDL,assumeValid:null==t?void 0:t.assumeValid})}function Ao(e){const t=e.toConfig(),n=ge(Ro(t.types),(e=>e.name),(function(e){if(Xe(e)||Un(e))return e;if(Ze(e)){const t=e.toConfig();return new Ct({...t,interfaces:()=>u(t.interfaces),fields:()=>a(t.fields)})}if(tt(e)){const t=e.toConfig();return new Gt({...t,interfaces:()=>u(t.interfaces),fields:()=>a(t.fields)})}if(rt(e)){const t=e.toConfig();return new Qt({...t,types:()=>u(t.types)})}if(ot(e)){const t=e.toConfig();return new Jt({...t,values:So(t.values,(e=>e))})}if(at(e)){const t=e.toConfig();return new Ht({...t,fields:()=>So(t.fields,(e=>({...e,type:r(e.type)})))})}c(!1,"Unexpected type: "+oe(e))}));return new Pn({...t,types:Object.values(n),directives:Ro(t.directives).map((function(e){const t=e.toConfig();return new hn({...t,locations:xo(t.locations,(e=>e)),args:s(t.args)})})),query:o(t.query),mutation:o(t.mutation),subscription:o(t.subscription)});function r(e){return ut(e)?new bt(r(e.ofType)):pt(e)?new _t(r(e.ofType)):i(e)}function i(e){return n[e.name]}function o(e){return e&&i(e)}function s(e){return So(e,(e=>({...e,type:r(e.type)})))}function a(e){return So(e,(e=>({...e,type:r(e.type),args:e.args&&s(e.args)})))}function u(e){return Ro(e).map(i)}}function So(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(be))n[r]=t(e[r]);return n}function Ro(e){return xo(e,(e=>e.name))}function xo(e,t){return e.slice().sort(((e,n)=>be(t(e),t(n))))}function Lo(e){return $o(e,(e=>!gn(e)),Fo)}function ko(e){return $o(e,gn,Un)}function Fo(e){return!ln(e)&&!Un(e)}function $o(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Co(e),...r.map((e=>function(e){return Go(e)+"directive @"+e.name+Po(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e))),...i.map((e=>Vo(e)))].filter(Boolean).join("\n\n")}function Co(e){if(null==e.description&&function(e){const t=e.getQueryType();if(t&&"Query"!==t.name)return!1;const n=e.getMutationType();if(n&&"Mutation"!==n.name)return!1;const r=e.getSubscriptionType();return!r||"Subscription"===r.name}(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Go(e)+`schema {\n${t.join("\n")}\n}`}function Vo(e){return Xe(e)?function(e){return Go(e)+`scalar ${e.name}`+(null==(t=e).specifiedByURL?"":` @specifiedBy(url: ${Me({kind:w.STRING,value:t.specifiedByURL})})`);var t}(e):Ze(e)?function(e){return Go(e)+`type ${e.name}`+Uo(e)+Mo(e)}(e):tt(e)?function(e){return Go(e)+`interface ${e.name}`+Uo(e)+Mo(e)}(e):rt(e)?function(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Go(e)+"union "+e.name+n}(e):ot(e)?function(e){const t=e.getValues().map(((e,t)=>Go(e," ",!t)+" "+e.name+qo(e.deprecationReason)));return Go(e)+`enum ${e.name}`+jo(t)}(e):at(e)?function(e){const t=Object.values(e.getFields()).map(((e,t)=>Go(e," ",!t)+" "+Bo(e)));return Go(e)+`input ${e.name}`+jo(t)}(e):void c(!1,"Unexpected type: "+oe(e))}function Uo(e){const t=e.getInterfaces();return t.length?" implements "+t.map((e=>e.name)).join(" & "):""}function Mo(e){return jo(Object.values(e.getFields()).map(((e,t)=>Go(e," ",!t)+" "+e.name+Po(e.args," ")+": "+String(e.type)+qo(e.deprecationReason))))}function jo(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function Po(e,t=""){return 0===e.length?"":e.every((e=>!e.description))?"("+e.map(Bo).join(", ")+")":"(\n"+e.map(((e,n)=>Go(e," "+t,!n)+" "+t+Bo(e))).join("\n")+"\n"+t+")"}function Bo(e){const t=bn(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${Me(t)}`),n+qo(e.deprecationReason)}function qo(e){return null==e?"":e!==vn?` @deprecated(reason: ${Me({kind:w.STRING,value:e})})`:" @deprecated"}function Go(e,t="",n=!0){const{description:r}=e;return null==r?"":(t&&!n?"\n"+t:t)+Me({kind:w.STRING,value:r,block:$(r)}).replace(/\n/g,"\n"+t)+"\n"}function Qo(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:w.DOCUMENT,definitions:t}}function Yo(e){const t=[],n=Object.create(null);for(const r of e.definitions)switch(r.kind){case w.OPERATION_DEFINITION:t.push(r);break;case w.FRAGMENT_DEFINITION:n[r.name.value]=Ko(r.selectionSet)}const r=Object.create(null);for(const i of t){const t=new Set;for(const e of Ko(i.selectionSet))Jo(t,n,e);r[i.name?i.name.value:""]={kind:w.DOCUMENT,definitions:e.definitions.filter((e=>e===i||e.kind===w.FRAGMENT_DEFINITION&&t.has(e.name.value)))}}return r}function Jo(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(void 0!==r)for(const n of r)Jo(e,t,n)}}function Ko(e){const t=[];return $e(e,{FragmentSpread(e){t.push(e.name.value)}}),t}function Ho(e){const t=ue(e)?e:new ce(e),n=t.body,r=new V(t);let i="",o=!1;for(;r.advance().kind!==D.EOF;){const e=r.token,t=e.kind,s=!U(e.kind);o&&(s||e.kind===D.SPREAD)&&(i+=" ");const a=n.slice(e.start,e.end);t===D.BLOCK_STRING?i+=C(e.value,{minimize:!0}):i+=a,o=s}return i}function zo(e){const t=Xo(e);if(t)throw t;return e}function Xo(e){if("string"==typeof e||o(!1,"Expected name to be a string."),e.startsWith("__"))return new h(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Je(e)}catch(e){return e}}var Wo,Zo;function es(e,t){return ns(e,t).filter((e=>e.type in Wo))}function ts(e,t){return ns(e,t).filter((e=>e.type in Zo))}function ns(e,t){return[...is(e,t),...rs(e,t)]}function rs(e,t){const n=[],r=ms(e.getDirectives(),t.getDirectives());for(const e of r.removed)n.push({type:Wo.DIRECTIVE_REMOVED,description:`${e.name} was removed.`});for(const[e,t]of r.persisted){const r=ms(e.args,t.args);for(const t of r.added)qt(t)&&n.push({type:Wo.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${t.name} on directive ${e.name} was added.`});for(const t of r.removed)n.push({type:Wo.DIRECTIVE_ARG_REMOVED,description:`${t.name} was removed from ${e.name}.`});e.isRepeatable&&!t.isRepeatable&&n.push({type:Wo.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${e.name}.`});for(const r of e.locations)t.locations.includes(r)||n.push({type:Wo.DIRECTIVE_LOCATION_REMOVED,description:`${r} was removed from ${e.name}.`})}return n}function is(e,t){const n=[],r=ms(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const e of r.removed)n.push({type:Wo.TYPE_REMOVED,description:ln(e)?`Standard scalar ${e.name} was removed because it is not referenced anymore.`:`${e.name} was removed.`});for(const[e,t]of r.persisted)ot(e)&&ot(t)?n.push(...as(e,t)):rt(e)&&rt(t)?n.push(...ss(e,t)):at(e)&&at(t)?n.push(...os(e,t)):Ze(e)&&Ze(t)||tt(e)&&tt(t)?n.push(...us(e,t),...cs(e,t)):e.constructor!==t.constructor&&n.push({type:Wo.TYPE_CHANGED_KIND,description:`${e.name} changed from ${fs(e)} to ${fs(t)}.`});return n}function os(e,t){const n=[],r=ms(Object.values(e.getFields()),Object.values(t.getFields()));for(const t of r.added)Xt(t)?n.push({type:Wo.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${t.name} on input type ${e.name} was added.`}):n.push({type:Zo.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${t.name} on input type ${e.name} was added.`});for(const t of r.removed)n.push({type:Wo.FIELD_REMOVED,description:`${e.name}.${t.name} was removed.`});for(const[t,i]of r.persisted)ds(t.type,i.type)||n.push({type:Wo.FIELD_CHANGED_KIND,description:`${e.name}.${t.name} changed type from ${String(t.type)} to ${String(i.type)}.`});return n}function ss(e,t){const n=[],r=ms(e.getTypes(),t.getTypes());for(const t of r.added)n.push({type:Zo.TYPE_ADDED_TO_UNION,description:`${t.name} was added to union type ${e.name}.`});for(const t of r.removed)n.push({type:Wo.TYPE_REMOVED_FROM_UNION,description:`${t.name} was removed from union type ${e.name}.`});return n}function as(e,t){const n=[],r=ms(e.getValues(),t.getValues());for(const t of r.added)n.push({type:Zo.VALUE_ADDED_TO_ENUM,description:`${t.name} was added to enum type ${e.name}.`});for(const t of r.removed)n.push({type:Wo.VALUE_REMOVED_FROM_ENUM,description:`${t.name} was removed from enum type ${e.name}.`});return n}function cs(e,t){const n=[],r=ms(e.getInterfaces(),t.getInterfaces());for(const t of r.added)n.push({type:Zo.IMPLEMENTED_INTERFACE_ADDED,description:`${t.name} added to interfaces implemented by ${e.name}.`});for(const t of r.removed)n.push({type:Wo.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${t.name}.`});return n}function us(e,t){const n=[],r=ms(Object.values(e.getFields()),Object.values(t.getFields()));for(const t of r.removed)n.push({type:Wo.FIELD_REMOVED,description:`${e.name}.${t.name} was removed.`});for(const[t,i]of r.persisted)n.push(...ls(e,t,i)),ps(t.type,i.type)||n.push({type:Wo.FIELD_CHANGED_KIND,description:`${e.name}.${t.name} changed type from ${String(t.type)} to ${String(i.type)}.`});return n}function ls(e,t,n){const r=[],i=ms(t.args,n.args);for(const n of i.removed)r.push({type:Wo.ARG_REMOVED,description:`${e.name}.${t.name} arg ${n.name} was removed.`});for(const[n,o]of i.persisted)if(ds(n.type,o.type)){if(void 0!==n.defaultValue)if(void 0===o.defaultValue)r.push({type:Zo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${n.name} defaultValue was removed.`});else{const i=hs(n.defaultValue,n.type),s=hs(o.defaultValue,o.type);i!==s&&r.push({type:Zo.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${n.name} has changed defaultValue from ${i} to ${s}.`})}}else r.push({type:Wo.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${n.name} has changed type from ${String(n.type)} to ${String(o.type)}.`});for(const n of i.added)qt(n)?r.push({type:Wo.REQUIRED_ARG_ADDED,description:`A required arg ${n.name} on ${e.name}.${t.name} was added.`}):r.push({type:Zo.OPTIONAL_ARG_ADDED,description:`An optional arg ${n.name} on ${e.name}.${t.name} was added.`});return r}function ps(e,t){return ut(e)?ut(t)&&ps(e.ofType,t.ofType)||pt(t)&&ps(e,t.ofType):pt(e)?pt(t)&&ps(e.ofType,t.ofType):Rt(t)&&e.name===t.name||pt(t)&&ps(e,t.ofType)}function ds(e,t){return ut(e)?ut(t)&&ds(e.ofType,t.ofType):pt(e)?pt(t)&&ds(e.ofType,t.ofType)||!pt(t)&&ds(e.ofType,t):Rt(t)&&e.name===t.name}function fs(e){return Xe(e)?"a Scalar type":Ze(e)?"an Object type":tt(e)?"an Interface type":rt(e)?"a Union type":ot(e)?"an Enum type":at(e)?"an Input type":void c(!1,"Unexpected type: "+oe(e))}function hs(e,t){const n=bn(e,t);return null!=n||c(!1),Me(kr(n))}function ms(e,t){const n=[],r=[],i=[],o=Ne(e,(({name:e})=>e)),s=Ne(t,(({name:e})=>e));for(const t of e){const e=s[t.name];void 0===e?r.push(t):i.push([t,e])}for(const e of t)void 0===o[e.name]&&n.push(e);return{added:n,persisted:i,removed:r}}!function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"}(Wo||(Wo={})),function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"}(Zo||(Zo={}))}}]);