From 2582268bbaae3514dc4c84e1053bc8061d0b6614 Mon Sep 17 00:00:00 2001 From: Aenimus Date: Fri, 27 Feb 2026 13:59:13 +0000 Subject: [PATCH 1/2] fix: handle fully external, unresolvable entity keys --- composition-go/index.global.js | 268 +++++++++--------- .../src/resolvability-graph/graph-nodes.ts | 7 +- composition/src/resolvability-graph/graph.ts | 15 + .../node-resolution-data.ts | 16 +- .../node-resolution-data/types/params.ts | 7 +- .../src/resolvability-graph/types/params.ts | 1 + .../src/resolvability-graph/types/types.ts | 1 + .../src/resolvability-graph/utils/utils.ts | 65 +++-- .../walker/entity-walker/entity-walker.ts | 39 ++- .../walker/entity-walker/types/params.ts | 6 +- .../root-field-walkers/root-field-walker.ts | 24 +- .../walker/root-field-walkers/types/params.ts | 1 + composition/src/utils/types.ts | 8 +- .../src/v1/federation/federation-factory.ts | 1 + .../v1/normalization/normalization-factory.ts | 2 +- composition/src/v1/normalization/utils.ts | 24 +- composition/tests/v1/resolvability.test.ts | 132 +++++++++ 17 files changed, 436 insertions(+), 181 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 9fa7aba2e9..51fd8a9bfa 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -15,17 +15,17 @@ class URL { return urlCanParse(url, base || ''); } } -"use strict";var shim=(()=>{var BH=Object.create;var Gd=Object.defineProperty,UH=Object.defineProperties,kH=Object.getOwnPropertyDescriptor,MH=Object.getOwnPropertyDescriptors,xH=Object.getOwnPropertyNames,Km=Object.getOwnPropertySymbols,qH=Object.getPrototypeOf,Yy=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable;var cn=Math.pow,Qy=(e,t,n)=>t in e?Gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Qy(e,n,t[n]);if(Km)for(var n of Km(t))$R.call(t,n)&&Qy(e,n,t[n]);return e},$=(e,t)=>UH(e,MH(t));var GR=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&$R.call(e,r)&&(n[r]=e[r]);return n};var Zu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$m=(e,t)=>{for(var n in t)Gd(e,n,{get:t[n],enumerable:!0})},QR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xH(t))!Yy.call(e,i)&&i!==n&&Gd(e,i,{get:()=>t[i],enumerable:!(r=kH(t,i))||r.enumerable});return e};var mi=(e,t,n)=>(n=e!=null?BH(qH(e)):{},QR(t||!e||!e.__esModule?Gd(n,"default",{value:e,enumerable:!0}):n,e)),Gm=e=>QR(Gd({},"__esModule",{value:!0}),e);var g=(e,t,n)=>(Qy(e,typeof t!="symbol"?t+"":t,n),n),Jy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hy=(e,t,n)=>(Jy(e,t,"read from private field"),n?n.call(e):t.get(e)),ec=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zy=(e,t,n,r)=>(Jy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var El=(e,t,n)=>(Jy(e,t,"access private method"),n);var Fi=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{u(n.next(l))}catch(d){i(d)}},o=l=>{try{u(n.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);u((n=n.apply(e,t)).next())});var m=Zu(()=>{"use strict"});var S={};$m(S,{_debugEnd:()=>CP,_debugProcess:()=>LP,_events:()=>zP,_eventsCount:()=>WP,_exiting:()=>mP,_fatalExceptions:()=>RP,_getActiveHandles:()=>hP,_getActiveRequests:()=>EP,_kill:()=>IP,_linkedBinding:()=>fP,_maxListeners:()=>HP,_preload_modules:()=>QP,_rawDebug:()=>lP,_startProfilerIdleNotifier:()=>BP,_stopProfilerIdleNotifier:()=>UP,_tickCallback:()=>wP,abort:()=>qP,addListener:()=>XP,allowedNodeEnvironmentFlags:()=>DP,arch:()=>WR,argv:()=>eP,argv0:()=>GP,assert:()=>bP,binding:()=>aP,chdir:()=>uP,config:()=>NP,cpuUsage:()=>Jm,cwd:()=>oP,debugPort:()=>$P,default:()=>oF,dlopen:()=>TP,domain:()=>pP,emit:()=>rF,emitWarning:()=>iP,env:()=>ZR,execArgv:()=>tP,execPath:()=>KP,exit:()=>OP,features:()=>AP,hasUncaughtExceptionCaptureCallback:()=>FP,hrtime:()=>Ym,kill:()=>vP,listeners:()=>sF,memoryUsage:()=>_P,moduleLoadList:()=>dP,nextTick:()=>JR,off:()=>eF,on:()=>Ss,once:()=>ZP,openStdin:()=>SP,pid:()=>VP,platform:()=>XR,ppid:()=>jP,prependListener:()=>iF,prependOnceListener:()=>aF,reallyExit:()=>yP,release:()=>cP,removeAllListeners:()=>nF,removeListener:()=>tF,resourceUsage:()=>gP,setSourceMapsEnabled:()=>YP,setUncaughtExceptionCaptureCallback:()=>PP,stderr:()=>MP,stdin:()=>xP,stdout:()=>kP,title:()=>zR,umask:()=>sP,uptime:()=>JP,version:()=>nP,versions:()=>rP});function Zy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function VH(){!hl||!tc||(hl=!1,tc.length?Os=tc.concat(Os):Qm=-1,Os.length&&YR())}function YR(){if(!hl){var e=setTimeout(VH,0);hl=!0;for(var t=Os.length;t;){for(tc=Os,Os=[];++Qm1)for(var n=1;n{"use strict";m();T();N();Os=[],hl=!1,Qm=-1;HR.prototype.run=function(){this.fun.apply(null,this.array)};zR="browser",WR="x64",XR="browser",ZR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},eP=["/usr/bin/node"],tP=[],nP="v16.8.0",rP={},iP=function(e,t){console.warn((t?t+": ":"")+e)},aP=function(e){Zy("binding")},sP=function(e){return 0},oP=function(){return"/"},uP=function(e){},cP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};lP=br,dP=[];pP={},mP=!1,NP={};yP=br,IP=br,Jm=function(){return{}},gP=Jm,_P=Jm,vP=br,OP=br,SP=br,DP={};AP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},RP=br,PP=br;wP=br,LP=br,CP=br,BP=br,UP=br,kP=void 0,MP=void 0,xP=void 0,qP=br,VP=2,jP=1,KP="/bin/usr/node",$P=9229,GP="node",QP=[],YP=br,fu={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};fu.now===void 0&&(Wy=Date.now(),fu.timing&&fu.timing.navigationStart&&(Wy=fu.timing.navigationStart),fu.now=()=>Date.now()-Wy);Xy=1e9;Ym.bigint=function(e){var t=Ym(e);return typeof BigInt=="undefined"?t[0]*Xy+t[1]:BigInt(t[0]*Xy)+BigInt(t[1])};HP=10,zP={},WP=0;XP=Ss,ZP=Ss,eF=Ss,tF=Ss,nF=Ss,rF=br,iF=Ss,aF=Ss;oF={version:nP,versions:rP,arch:WR,platform:XR,release:cP,_rawDebug:lP,moduleLoadList:dP,binding:aP,_linkedBinding:fP,_events:zP,_eventsCount:WP,_maxListeners:HP,on:Ss,addListener:XP,once:ZP,off:eF,removeListener:tF,removeAllListeners:nF,emit:rF,prependListener:iF,prependOnceListener:aF,listeners:sF,domain:pP,_exiting:mP,config:NP,dlopen:TP,uptime:JP,_getActiveRequests:EP,_getActiveHandles:hP,reallyExit:yP,_kill:IP,cpuUsage:Jm,resourceUsage:gP,memoryUsage:_P,kill:vP,exit:OP,openStdin:SP,allowedNodeEnvironmentFlags:DP,assert:bP,features:AP,_fatalExceptions:RP,setUncaughtExceptionCaptureCallback:PP,hasUncaughtExceptionCaptureCallback:FP,emitWarning:iP,nextTick:JR,_tickCallback:wP,_debugProcess:LP,_debugEnd:CP,_startProfilerIdleNotifier:BP,_stopProfilerIdleNotifier:UP,stdout:kP,stdin:xP,stderr:MP,abort:qP,umask:sP,chdir:uP,cwd:oP,env:ZR,title:zR,argv:eP,execArgv:tP,pid:VP,ppid:jP,execPath:KP,debugPort:$P,hrtime:Ym,argv0:GP,_preload_modules:QP,setSourceMapsEnabled:YP}});var N=Zu(()=>{"use strict";uF()});function jH(){if(cF)return Qd;cF=!0,Qd.byteLength=u,Qd.toByteArray=d,Qd.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function u(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],Q=U[1],re=new n(l(v,j,Q)),ee=0,me=Q>0?j-4:j,ue;for(ue=0;ue>16&255,re[ee++]=A>>8&255,re[ee++]=A&255;return Q===2&&(A=t[v.charCodeAt(ue)]<<2|t[v.charCodeAt(ue+1)]>>4,re[ee++]=A&255),Q===1&&(A=t[v.charCodeAt(ue)]<<10|t[v.charCodeAt(ue+1)]<<4|t[v.charCodeAt(ue+2)]>>2,re[ee++]=A>>8&255,re[ee++]=A&255),re}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,Q=[],re=A;reme?me:ee+re));return j===1?(A=v[U-1],Q.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],Q.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),Q.join("")}return Qd}function KH(){if(lF)return Hm;lF=!0;return Hm.read=function(e,t,n,r,i){var a,o,u=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=u;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},Hm.write=function(e,t,n,r,i,a){var o,u,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(u=0,o=p):o+E>=1?(u=(t*l-1)*Math.pow(2,i),o=o+E):(u=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=u&255,v+=A,u/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},Hm}function $H(){if(dF)return nc;dF=!0;let e=jH(),t=KH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nc.Buffer=o,nc.SlowBuffer=Q,nc.INSPECT_MAX_BYTES=50;let r=2147483647;nc.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,_){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return u(P,y,_)}o.poolSize=8192;function u(P,y,_){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(xt(P,ArrayBuffer)||P&&xt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(xt(P,SharedArrayBuffer)||P&&xt(P.buffer,SharedArrayBuffer)))return A(P,y,_);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,_);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,_){return u(P,y,_)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,_){return l(P),P<=0?a(P):y!==void 0?typeof _=="string"?a(P).fill(y,_):a(P).fill(y):a(P)}o.alloc=function(P,y,_){return d(P,y,_)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let _=re(P,y)|0,B=a(_),K=B.write(P,y);return K!==_&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,_=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function Q(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,_){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),xt(_,Uint8Array)&&(_=o.from(_,_.offset,_.byteLength)),!o.isBuffer(y)||!o.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let B=y.length,K=_.length;for(let te=0,ce=Math.min(B,K);teK.length?(o.isBuffer(ce)||(ce=o.from(ce)),ce.copy(K,te)):Uint8Array.prototype.set.call(K,ce,te);else if(o.isBuffer(ce))ce.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ce.length}return K};function re(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||xt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let _=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ms(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ir(P).length;default:if(K)return B?-1:ms(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=re;function ee(P,y,_){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return dr(this,y,_);case"utf8":case"utf-8":return an(this,y,_);case"ascii":return Tn(this,y,_);case"latin1":case"binary":return kr(this,y,_);case"base64":return rn(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gn(this,y,_);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function me(P,y,_){let B=P[y];P[y]=P[_],P[_]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,_,B,K,te){if(xt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),_<0||B>y.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&_>=B)return 0;if(K>=te)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,te>>>=0,this===y)return 0;let ce=te-K,Tt=B-_,En=Math.min(ce,Tt),un=this.slice(K,te),_n=y.slice(_,B);for(let sn=0;sn2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,gr(_)&&(_=K?0:P.length-1),_<0&&(_=P.length+_),_>=P.length){if(K)return-1;_=P.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ae(P,y,_,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,_):Uint8Array.prototype.lastIndexOf.call(P,y,_):Ae(P,[y],_,B,K);throw new TypeError("val must be string, number or Buffer")}function Ae(P,y,_,B,K){let te=1,ce=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;te=2,ce/=2,Tt/=2,_/=2}function En(_n,sn){return te===1?_n[sn]:_n.readUInt16BE(sn*te)}let un;if(K){let _n=-1;for(un=_;unce&&(_=ce-Tt),un=_;un>=0;un--){let _n=!0;for(let sn=0;snK&&(B=K)):B=K;let te=y.length;B>te/2&&(B=te/2);let ce;for(ce=0;ce>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-_;if((B===void 0||B>te)&&(B=te),y.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ce=!1;for(;;)switch(K){case"hex":return Me(this,y,_,B);case"utf8":case"utf-8":return Ze(this,y,_,B);case"ascii":case"latin1":case"binary":return Z(this,y,_,B);case"base64":return ve(this,y,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,y,_,B);default:if(ce)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ce=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(P,y,_){return y===0&&_===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,_))}function an(P,y,_){_=Math.min(P.length,_);let B=[],K=y;for(;K<_;){let te=P[K],ce=null,Tt=te>239?4:te>223?3:te>191?2:1;if(K+Tt<=_){let En,un,_n,sn;switch(Tt){case 1:te<128&&(ce=te);break;case 2:En=P[K+1],(En&192)===128&&(sn=(te&31)<<6|En&63,sn>127&&(ce=sn));break;case 3:En=P[K+1],un=P[K+2],(En&192)===128&&(un&192)===128&&(sn=(te&15)<<12|(En&63)<<6|un&63,sn>2047&&(sn<55296||sn>57343)&&(ce=sn));break;case 4:En=P[K+1],un=P[K+2],_n=P[K+3],(En&192)===128&&(un&192)===128&&(_n&192)===128&&(sn=(te&15)<<18|(En&63)<<12|(un&63)<<6|_n&63,sn>65535&&sn<1114112&&(ce=sn))}}ce===null?(ce=65533,Tt=1):ce>65535&&(ce-=65536,B.push(ce>>>10&1023|55296),ce=56320|ce&1023),B.push(ce),K+=Tt}return Gt(B)}let wn=4096;function Gt(P){let y=P.length;if(y<=wn)return String.fromCharCode.apply(String,P);let _="",B=0;for(;BB)&&(_=B);let K="";for(let te=y;te<_;++te)K+=ju[P[te]];return K}function gn(P,y,_){let B=P.slice(y,_),K="";for(let te=0;teB&&(y=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ce=0;for(;++ce<_&&(te*=256);)K+=this[y+ce]*te;return K},o.prototype.readUintBE=o.prototype.readUIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y+--_],te=1;for(;_>0&&(te*=256);)K+=this[y+--_]*te;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=Ua(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_+this[++y]*cn(2,8)+this[++y]*cn(2,16)+this[++y]*cn(2,24),te=this[++y]+this[++y]*cn(2,8)+this[++y]*cn(2,16)+B*cn(2,24);return BigInt(K)+(BigInt(te)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y],te=this[++y]*cn(2,24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+B;return(BigInt(K)<>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ce=0;for(;++ce<_&&(te*=256);)K+=this[y+ce]*te;return te*=128,K>=te&&(K-=Math.pow(2,8*_)),K},o.prototype.readIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=_,te=1,ce=this[y+--K];for(;K>0&&(te*=256);)ce+=this[y+--K]*te;return te*=128,ce>=te&&(ce-=Math.pow(2,8*_)),ce},o.prototype.readInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=Ua(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=this[y+4]+this[y+5]*cn(2,8)+this[y+6]*cn(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=(_<<24)+this[++y]*cn(2,16)+this[++y]*cn(2,8)+this[++y];return(BigInt(K)<>>0,_||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,_,B,K,te){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=1,ce=0;for(this[_]=y&255;++ce>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=B-1,ce=1;for(this[_+te]=y&255;--te>=0&&(ce*=256);)this[_+te]=y/ce&255;return _+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,255,0),this[_]=y&255,_+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function ae(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[_++]=ce,ce=ce>>8,P[_++]=ce,ce=ce>>8,P[_++]=ce,ce=ce>>8,P[_++]=ce,_}function De(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_+7]=te,te=te>>8,P[_+6]=te,te=te>>8,P[_+5]=te,te=te>>8,P[_+4]=te;let ce=Number(y>>BigInt(32)&BigInt(4294967295));return P[_+3]=ce,ce=ce>>8,P[_+2]=ce,ce=ce>>8,P[_+1]=ce,ce=ce>>8,P[_]=ce,_+8}o.prototype.writeBigUInt64LE=Ua(function(y,_=0){return ae(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Ua(function(y,_=0){return De(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,_,B,En-1,-En)}let te=0,ce=1,Tt=0;for(this[_]=y&255;++te>0)-Tt&255;return _+B},o.prototype.writeIntBE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let En=Math.pow(2,8*B-1);Ln(this,y,_,B,En-1,-En)}let te=B-1,ce=1,Tt=0;for(this[_+te]=y&255;--te>=0&&(ce*=256);)y<0&&Tt===0&&this[_+te+1]!==0&&(Tt=1),this[_+te]=(y/ce>>0)-Tt&255;return _+B},o.prototype.writeInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},o.prototype.writeInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},o.prototype.writeInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},o.prototype.writeBigInt64LE=Ua(function(y,_=0){return ae(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Ua(function(y,_=0){return De(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(P,y,_,B,K,te){if(_+B>P.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Le(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,4),t.write(P,y,_,B,23,4),_+4}o.prototype.writeFloatLE=function(y,_,B){return Le(this,y,_,!0,B)},o.prototype.writeFloatBE=function(y,_,B){return Le(this,y,_,!1,B)};function St(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,8),t.write(P,y,_,B,52,8),_+8}o.prototype.writeDoubleLE=function(y,_,B){return St(this,y,_,!0,B)},o.prototype.writeDoubleBE=function(y,_,B){return St(this,y,_,!1,B)},o.prototype.copy=function(y,_,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=y.length&&(_=y.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-_>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let te;if(typeof y=="number")for(te=_;tecn(2,32)?K=xe(String(_)):typeof _=="bigint"&&(K=String(_),(_>cn(BigInt(2),BigInt(32))||_<-cn(BigInt(2),BigInt(32)))&&(K=xe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function xe(P){let y="",_=P.length,B=P[0]==="-"?1:0;for(;_>=B+4;_-=3)y=`_${P.slice(_-3,_)}${y}`;return`${P.slice(0,_)}${y}`}function He(P,y,_){it(y,"offset"),(P[y]===void 0||P[y+_]===void 0)&&Pt(y,P.length-(_+1))}function Bt(P,y,_,B,K,te){if(P>_||P3?y===0||y===BigInt(0)?Tt=`>= 0${ce} and < 2${ce} ** ${(te+1)*8}${ce}`:Tt=`>= -(2${ce} ** ${(te+1)*8-1}${ce}) and < 2 ** ${(te+1)*8-1}${ce}`:Tt=`>= ${y}${ce} and <= ${_}${ce}`,new Y.ERR_OUT_OF_RANGE("value",Tt,P)}He(B,K,te)}function it(P,y){if(typeof P!="number")throw new Y.ERR_INVALID_ARG_TYPE(y,"number",P)}function Pt(P,y,_){throw Math.floor(P)!==P?(it(P,_),new Y.ERR_OUT_OF_RANGE(_||"offset","an integer",P)):y<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,P)}let ps=/[^+/0-9A-Za-z-_]/g;function Yr(P){if(P=P.split("=")[0],P=P.trim().replace(ps,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function ms(P,y){y=y||1/0;let _,B=P.length,K=null,te=[];for(let ce=0;ce55295&&_<57344){if(!K){if(_>56319){(y-=3)>-1&&te.push(239,191,189);continue}else if(ce+1===B){(y-=3)>-1&&te.push(239,191,189);continue}K=_;continue}if(_<56320){(y-=3)>-1&&te.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(y-=3)>-1&&te.push(239,191,189);if(K=null,_<128){if((y-=1)<0)break;te.push(_)}else if(_<2048){if((y-=2)<0)break;te.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;te.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;te.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return te}function rl(P){let y=[];for(let _=0;_>8,K=_%256,te.push(K),te.push(B);return te}function Ir(P){return e.toByteArray(Yr(P))}function oi(P,y,_,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+_]=P[K];return K}function xt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function gr(P){return P!==P}let ju=function(){let P="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){let B=_*16;for(let K=0;K<16;++K)y[B+K]=P[_]+P[K]}return y}();function Ua(P){return typeof BigInt=="undefined"?Ku:P}function Ku(){throw new Error("BigInt not supported")}return nc}var Qd,cF,Hm,lF,nc,dF,rc,D,Vpe,jpe,fF=Zu(()=>{"use strict";m();T();N();Qd={},cF=!1;Hm={},lF=!1;nc={},dF=!1;rc=$H();rc.Buffer;rc.SlowBuffer;rc.INSPECT_MAX_BYTES;rc.kMaxLength;D=rc.Buffer,Vpe=rc.INSPECT_MAX_BYTES,jpe=rc.kMaxLength});var T=Zu(()=>{"use strict";fF()});var pF=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.versionInfo=yl.version=void 0;var GH="16.9.0";yl.version=GH;var QH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});yl.versionInfo=QH});var Vr=w(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.devAssert=YH;function YH(e,t){if(!!!e)throw new Error(t)}});var zm=w(tI=>{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.isPromise=JH;function JH(e){return typeof(e==null?void 0:e.then)=="function"}});var qa=w(nI=>{"use strict";m();T();N();Object.defineProperty(nI,"__esModule",{value:!0});nI.isObjectLike=HH;function HH(e){return typeof e=="object"&&e!==null}});var Ar=w(rI=>{"use strict";m();T();N();Object.defineProperty(rI,"__esModule",{value:!0});rI.invariant=zH;function zH(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Wm=w(iI=>{"use strict";m();T();N();Object.defineProperty(iI,"__esModule",{value:!0});iI.getLocation=ZH;var WH=Ar(),XH=/\r\n|[\n\r]/g;function ZH(e,t){let n=0,r=1;for(let i of e.body.matchAll(XH)){if(typeof i.index=="number"||(0,WH.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var aI=w(Xm=>{"use strict";m();T();N();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.printLocation=t3;Xm.printSourceLocation=NF;var e3=Wm();function t3(e){return NF(e.source,(0,e3.getLocation)(e.source,e.start))}function NF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} +"use strict";var shim=(()=>{var UH=Object.create;var Gd=Object.defineProperty,kH=Object.defineProperties,MH=Object.getOwnPropertyDescriptor,xH=Object.getOwnPropertyDescriptors,qH=Object.getOwnPropertyNames,Km=Object.getOwnPropertySymbols,VH=Object.getPrototypeOf,Yy=Object.prototype.hasOwnProperty,$R=Object.prototype.propertyIsEnumerable;var ln=Math.pow,Qy=(e,t,n)=>t in e?Gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))Yy.call(t,n)&&Qy(e,n,t[n]);if(Km)for(var n of Km(t))$R.call(t,n)&&Qy(e,n,t[n]);return e},$=(e,t)=>kH(e,xH(t));var GR=(e,t)=>{var n={};for(var r in e)Yy.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&$R.call(e,r)&&(n[r]=e[r]);return n};var Zu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$m=(e,t)=>{for(var n in t)Gd(e,n,{get:t[n],enumerable:!0})},QR=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qH(t))!Yy.call(e,i)&&i!==n&&Gd(e,i,{get:()=>t[i],enumerable:!(r=MH(t,i))||r.enumerable});return e};var Ni=(e,t,n)=>(n=e!=null?UH(VH(e)):{},QR(t||!e||!e.__esModule?Gd(n,"default",{value:e,enumerable:!0}):n,e)),Gm=e=>QR(Gd({},"__esModule",{value:!0}),e);var g=(e,t,n)=>(Qy(e,typeof t!="symbol"?t+"":t,n),n),Jy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hy=(e,t,n)=>(Jy(e,t,"read from private field"),n?n.call(e):t.get(e)),ec=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zy=(e,t,n,r)=>(Jy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var El=(e,t,n)=>(Jy(e,t,"access private method"),n);var wi=(e,t,n)=>new Promise((r,i)=>{var a=l=>{try{u(n.next(l))}catch(d){i(d)}},o=l=>{try{u(n.throw(l))}catch(d){i(d)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,o);u((n=n.apply(e,t)).next())});var m=Zu(()=>{"use strict"});var S={};$m(S,{_debugEnd:()=>CP,_debugProcess:()=>LP,_events:()=>zP,_eventsCount:()=>WP,_exiting:()=>mP,_fatalExceptions:()=>RP,_getActiveHandles:()=>hP,_getActiveRequests:()=>EP,_kill:()=>IP,_linkedBinding:()=>fP,_maxListeners:()=>HP,_preload_modules:()=>QP,_rawDebug:()=>lP,_startProfilerIdleNotifier:()=>BP,_stopProfilerIdleNotifier:()=>UP,_tickCallback:()=>wP,abort:()=>qP,addListener:()=>XP,allowedNodeEnvironmentFlags:()=>DP,arch:()=>WR,argv:()=>eP,argv0:()=>GP,assert:()=>bP,binding:()=>aP,chdir:()=>uP,config:()=>NP,cpuUsage:()=>Jm,cwd:()=>oP,debugPort:()=>$P,default:()=>oF,dlopen:()=>TP,domain:()=>pP,emit:()=>rF,emitWarning:()=>iP,env:()=>ZR,execArgv:()=>tP,execPath:()=>KP,exit:()=>OP,features:()=>AP,hasUncaughtExceptionCaptureCallback:()=>FP,hrtime:()=>Ym,kill:()=>vP,listeners:()=>sF,memoryUsage:()=>_P,moduleLoadList:()=>dP,nextTick:()=>JR,off:()=>eF,on:()=>Ss,once:()=>ZP,openStdin:()=>SP,pid:()=>VP,platform:()=>XR,ppid:()=>jP,prependListener:()=>iF,prependOnceListener:()=>aF,reallyExit:()=>yP,release:()=>cP,removeAllListeners:()=>nF,removeListener:()=>tF,resourceUsage:()=>gP,setSourceMapsEnabled:()=>YP,setUncaughtExceptionCaptureCallback:()=>PP,stderr:()=>MP,stdin:()=>xP,stdout:()=>kP,title:()=>zR,umask:()=>sP,uptime:()=>JP,version:()=>nP,versions:()=>rP});function Zy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function jH(){!hl||!tc||(hl=!1,tc.length?Os=tc.concat(Os):Qm=-1,Os.length&&YR())}function YR(){if(!hl){var e=setTimeout(jH,0);hl=!0;for(var t=Os.length;t;){for(tc=Os,Os=[];++Qm1)for(var n=1;n{"use strict";m();T();N();Os=[],hl=!1,Qm=-1;HR.prototype.run=function(){this.fun.apply(null,this.array)};zR="browser",WR="x64",XR="browser",ZR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},eP=["/usr/bin/node"],tP=[],nP="v16.8.0",rP={},iP=function(e,t){console.warn((t?t+": ":"")+e)},aP=function(e){Zy("binding")},sP=function(e){return 0},oP=function(){return"/"},uP=function(e){},cP={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};lP=br,dP=[];pP={},mP=!1,NP={};yP=br,IP=br,Jm=function(){return{}},gP=Jm,_P=Jm,vP=br,OP=br,SP=br,DP={};AP={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},RP=br,PP=br;wP=br,LP=br,CP=br,BP=br,UP=br,kP=void 0,MP=void 0,xP=void 0,qP=br,VP=2,jP=1,KP="/bin/usr/node",$P=9229,GP="node",QP=[],YP=br,fu={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};fu.now===void 0&&(Wy=Date.now(),fu.timing&&fu.timing.navigationStart&&(Wy=fu.timing.navigationStart),fu.now=()=>Date.now()-Wy);Xy=1e9;Ym.bigint=function(e){var t=Ym(e);return typeof BigInt=="undefined"?t[0]*Xy+t[1]:BigInt(t[0]*Xy)+BigInt(t[1])};HP=10,zP={},WP=0;XP=Ss,ZP=Ss,eF=Ss,tF=Ss,nF=Ss,rF=br,iF=Ss,aF=Ss;oF={version:nP,versions:rP,arch:WR,platform:XR,release:cP,_rawDebug:lP,moduleLoadList:dP,binding:aP,_linkedBinding:fP,_events:zP,_eventsCount:WP,_maxListeners:HP,on:Ss,addListener:XP,once:ZP,off:eF,removeListener:tF,removeAllListeners:nF,emit:rF,prependListener:iF,prependOnceListener:aF,listeners:sF,domain:pP,_exiting:mP,config:NP,dlopen:TP,uptime:JP,_getActiveRequests:EP,_getActiveHandles:hP,reallyExit:yP,_kill:IP,cpuUsage:Jm,resourceUsage:gP,memoryUsage:_P,kill:vP,exit:OP,openStdin:SP,allowedNodeEnvironmentFlags:DP,assert:bP,features:AP,_fatalExceptions:RP,setUncaughtExceptionCaptureCallback:PP,hasUncaughtExceptionCaptureCallback:FP,emitWarning:iP,nextTick:JR,_tickCallback:wP,_debugProcess:LP,_debugEnd:CP,_startProfilerIdleNotifier:BP,_stopProfilerIdleNotifier:UP,stdout:kP,stdin:xP,stderr:MP,abort:qP,umask:sP,chdir:uP,cwd:oP,env:ZR,title:zR,argv:eP,execArgv:tP,pid:VP,ppid:jP,execPath:KP,debugPort:$P,hrtime:Ym,argv0:GP,_preload_modules:QP,setSourceMapsEnabled:YP}});var N=Zu(()=>{"use strict";uF()});function KH(){if(cF)return Qd;cF=!0,Qd.byteLength=u,Qd.toByteArray=d,Qd.fromByteArray=I;for(var e=[],t=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var U=v.indexOf("=");U===-1&&(U=A);var j=U===A?0:4-U%4;return[U,j]}function u(v){var A=o(v),U=A[0],j=A[1];return(U+j)*3/4-j}function l(v,A,U){return(A+U)*3/4-U}function d(v){var A,U=o(v),j=U[0],Q=U[1],ee=new n(l(v,j,Q)),ne=0,pe=Q>0?j-4:j,le;for(le=0;le>16&255,ee[ne++]=A>>8&255,ee[ne++]=A&255;return Q===2&&(A=t[v.charCodeAt(le)]<<2|t[v.charCodeAt(le+1)]>>4,ee[ne++]=A&255),Q===1&&(A=t[v.charCodeAt(le)]<<10|t[v.charCodeAt(le+1)]<<4|t[v.charCodeAt(le+2)]>>2,ee[ne++]=A>>8&255,ee[ne++]=A&255),ee}function p(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function E(v,A,U){for(var j,Q=[],ee=A;eepe?pe:ne+ee));return j===1?(A=v[U-1],Q.push(e[A>>2]+e[A<<4&63]+"==")):j===2&&(A=(v[U-2]<<8)+v[U-1],Q.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),Q.join("")}return Qd}function $H(){if(lF)return Hm;lF=!0;return Hm.read=function(e,t,n,r,i){var a,o,u=i*8-r-1,l=(1<>1,p=-7,E=n?i-1:0,I=n?-1:1,v=e[t+E];for(E+=I,a=v&(1<<-p)-1,v>>=-p,p+=u;p>0;a=a*256+e[t+E],E+=I,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=r;p>0;o=o*256+e[t+E],E+=I,p-=8);if(a===0)a=1-d;else{if(a===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-d}return(v?-1:1)*o*Math.pow(2,a-r)},Hm.write=function(e,t,n,r,i,a){var o,u,l,d=a*8-i-1,p=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,A=r?1:-1,U=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+E>=1?t+=I/l:t+=I*Math.pow(2,1-E),t*l>=2&&(o++,l/=2),o+E>=p?(u=0,o=p):o+E>=1?(u=(t*l-1)*Math.pow(2,i),o=o+E):(u=t*Math.pow(2,E-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=u&255,v+=A,u/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=A,o/=256,d-=8);e[n+v-A]|=U*128},Hm}function GH(){if(dF)return nc;dF=!0;let e=KH(),t=$H(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nc.Buffer=o,nc.SlowBuffer=Q,nc.INSPECT_MAX_BYTES=50;let r=2147483647;nc.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{let P=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(P,y),P.foo()===42}catch(P){return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(P){if(P>r)throw new RangeError('The value "'+P+'" is invalid for option "size"');let y=new Uint8Array(P);return Object.setPrototypeOf(y,o.prototype),y}function o(P,y,_){if(typeof P=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(P)}return u(P,y,_)}o.poolSize=8192;function u(P,y,_){if(typeof P=="string")return E(P,y);if(ArrayBuffer.isView(P))return v(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(qt(P,ArrayBuffer)||P&&qt(P.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qt(P,SharedArrayBuffer)||P&&qt(P.buffer,SharedArrayBuffer)))return A(P,y,_);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=P.valueOf&&P.valueOf();if(B!=null&&B!==P)return o.from(B,y,_);let K=U(P);if(K)return K;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return o.from(P[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}o.from=function(P,y,_){return u(P,y,_)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function d(P,y,_){return l(P),P<=0?a(P):y!==void 0?typeof _=="string"?a(P).fill(y,_):a(P).fill(y):a(P)}o.alloc=function(P,y,_){return d(P,y,_)};function p(P){return l(P),a(P<0?0:j(P)|0)}o.allocUnsafe=function(P){return p(P)},o.allocUnsafeSlow=function(P){return p(P)};function E(P,y){if((typeof y!="string"||y==="")&&(y="utf8"),!o.isEncoding(y))throw new TypeError("Unknown encoding: "+y);let _=ee(P,y)|0,B=a(_),K=B.write(P,y);return K!==_&&(B=B.slice(0,K)),B}function I(P){let y=P.length<0?0:j(P.length)|0,_=a(y);for(let B=0;B=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return P|0}function Q(P){return+P!=P&&(P=0),o.alloc(+P)}o.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==o.prototype},o.compare=function(y,_){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),qt(_,Uint8Array)&&(_=o.from(_,_.offset,_.byteLength)),!o.isBuffer(y)||!o.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let B=y.length,K=_.length;for(let te=0,ue=Math.min(B,K);teK.length?(o.isBuffer(ue)||(ue=o.from(ue)),ue.copy(K,te)):Uint8Array.prototype.set.call(K,ue,te);else if(o.isBuffer(ue))ue.copy(K,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=ue.length}return K};function ee(P,y){if(o.isBuffer(P))return P.length;if(ArrayBuffer.isView(P)||qt(P,ArrayBuffer))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);let _=P.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&_===0)return 0;let K=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ms(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ir(P).length;default:if(K)return B?-1:ms(P).length;y=(""+y).toLowerCase(),K=!0}}o.byteLength=ee;function ne(P,y,_){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(P||(P="utf8");;)switch(P){case"hex":return nr(this,y,_);case"utf8":case"utf-8":return un(this,y,_);case"ascii":return an(this,y,_);case"latin1":case"binary":return kr(this,y,_);case"base64":return rn(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return En(this,y,_);default:if(B)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),B=!0}}o.prototype._isBuffer=!0;function pe(P,y,_){let B=P[y];P[y]=P[_],P[_]=B}o.prototype.swap16=function(){let y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(y+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(y,_,B,K,te){if(qt(y,Uint8Array)&&(y=o.from(y,y.offset,y.byteLength)),!o.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),B===void 0&&(B=y?y.length:0),K===void 0&&(K=0),te===void 0&&(te=this.length),_<0||B>y.length||K<0||te>this.length)throw new RangeError("out of range index");if(K>=te&&_>=B)return 0;if(K>=te)return-1;if(_>=B)return 1;if(_>>>=0,B>>>=0,K>>>=0,te>>>=0,this===y)return 0;let ue=te-K,Tt=B-_,hn=Math.min(ue,Tt),cn=this.slice(K,te),vn=y.slice(_,B);for(let sn=0;sn2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,gr(_)&&(_=K?0:P.length-1),_<0&&(_=P.length+_),_>=P.length){if(K)return-1;_=P.length-1}else if(_<0)if(K)_=0;else return-1;if(typeof y=="string"&&(y=o.from(y,B)),o.isBuffer(y))return y.length===0?-1:Ae(P,y,_,B,K);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(P,y,_):Uint8Array.prototype.lastIndexOf.call(P,y,_):Ae(P,[y],_,B,K);throw new TypeError("val must be string, number or Buffer")}function Ae(P,y,_,B,K){let te=1,ue=P.length,Tt=y.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(P.length<2||y.length<2)return-1;te=2,ue/=2,Tt/=2,_/=2}function hn(vn,sn){return te===1?vn[sn]:vn.readUInt16BE(sn*te)}let cn;if(K){let vn=-1;for(cn=_;cnue&&(_=ue-Tt),cn=_;cn>=0;cn--){let vn=!0;for(let sn=0;snK&&(B=K)):B=K;let te=y.length;B>te/2&&(B=te/2);let ue;for(ue=0;ue>>0,isFinite(B)?(B=B>>>0,K===void 0&&(K="utf8")):(K=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-_;if((B===void 0||B>te)&&(B=te),y.length>0&&(B<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");let ue=!1;for(;;)switch(K){case"hex":return Me(this,y,_,B);case"utf8":case"utf-8":return Ze(this,y,_,B);case"ascii":case"latin1":case"binary":return Z(this,y,_,B);case"base64":return ve(this,y,_,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,y,_,B);default:if(ue)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ue=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rn(P,y,_){return y===0&&_===P.length?e.fromByteArray(P):e.fromByteArray(P.slice(y,_))}function un(P,y,_){_=Math.min(P.length,_);let B=[],K=y;for(;K<_;){let te=P[K],ue=null,Tt=te>239?4:te>223?3:te>191?2:1;if(K+Tt<=_){let hn,cn,vn,sn;switch(Tt){case 1:te<128&&(ue=te);break;case 2:hn=P[K+1],(hn&192)===128&&(sn=(te&31)<<6|hn&63,sn>127&&(ue=sn));break;case 3:hn=P[K+1],cn=P[K+2],(hn&192)===128&&(cn&192)===128&&(sn=(te&15)<<12|(hn&63)<<6|cn&63,sn>2047&&(sn<55296||sn>57343)&&(ue=sn));break;case 4:hn=P[K+1],cn=P[K+2],vn=P[K+3],(hn&192)===128&&(cn&192)===128&&(vn&192)===128&&(sn=(te&15)<<18|(hn&63)<<12|(cn&63)<<6|vn&63,sn>65535&&sn<1114112&&(ue=sn))}}ue===null?(ue=65533,Tt=1):ue>65535&&(ue-=65536,B.push(ue>>>10&1023|55296),ue=56320|ue&1023),B.push(ue),K+=Tt}return xt(B)}let In=4096;function xt(P){let y=P.length;if(y<=In)return String.fromCharCode.apply(String,P);let _="",B=0;for(;BB)&&(_=B);let K="";for(let te=y;te<_;++te)K+=ju[P[te]];return K}function En(P,y,_){let B=P.slice(y,_),K="";for(let te=0;teB&&(y=B),_<0?(_+=B,_<0&&(_=0)):_>B&&(_=B),__)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ue=0;for(;++ue<_&&(te*=256);)K+=this[y+ue]*te;return K},o.prototype.readUintBE=o.prototype.readUIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y+--_],te=1;for(;_>0&&(te*=256);)K+=this[y+--_]*te;return K},o.prototype.readUint8=o.prototype.readUInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]|this[y+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||Ht(y,2,this.length),this[y]<<8|this[y+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},o.prototype.readBigUInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_+this[++y]*ln(2,8)+this[++y]*ln(2,16)+this[++y]*ln(2,24),te=this[++y]+this[++y]*ln(2,8)+this[++y]*ln(2,16)+B*ln(2,24);return BigInt(K)+(BigInt(te)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=_*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y],te=this[++y]*ln(2,24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+B;return(BigInt(K)<>>0,_=_>>>0,B||Ht(y,_,this.length);let K=this[y],te=1,ue=0;for(;++ue<_&&(te*=256);)K+=this[y+ue]*te;return te*=128,K>=te&&(K-=Math.pow(2,8*_)),K},o.prototype.readIntBE=function(y,_,B){y=y>>>0,_=_>>>0,B||Ht(y,_,this.length);let K=_,te=1,ue=this[y+--K];for(;K>0&&(te*=256);)ue+=this[y+--K]*te;return te*=128,ue>=te&&(ue-=Math.pow(2,8*_)),ue},o.prototype.readInt8=function(y,_){return y=y>>>0,_||Ht(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},o.prototype.readInt16LE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y]|this[y+1]<<8;return B&32768?B|4294901760:B},o.prototype.readInt16BE=function(y,_){y=y>>>0,_||Ht(y,2,this.length);let B=this[y+1]|this[y]<<8;return B&32768?B|4294901760:B},o.prototype.readInt32LE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},o.prototype.readInt32BE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},o.prototype.readBigInt64LE=ka(function(y){y=y>>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=this[y+4]+this[y+5]*ln(2,8)+this[y+6]*ln(2,16)+(B<<24);return(BigInt(K)<>>0,it(y,"offset");let _=this[y],B=this[y+7];(_===void 0||B===void 0)&&Pt(y,this.length-8);let K=(_<<24)+this[++y]*ln(2,16)+this[++y]*ln(2,8)+this[++y];return(BigInt(K)<>>0,_||Ht(y,4,this.length),t.read(this,y,!0,23,4)},o.prototype.readFloatBE=function(y,_){return y=y>>>0,_||Ht(y,4,this.length),t.read(this,y,!1,23,4)},o.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!0,52,8)},o.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||Ht(y,8,this.length),t.read(this,y,!1,52,8)};function Ln(P,y,_,B,K,te){if(!o.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>K||yP.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=1,ue=0;for(this[_]=y&255;++ue>>0,B=B>>>0,!K){let Tt=Math.pow(2,8*B)-1;Ln(this,y,_,B,Tt,0)}let te=B-1,ue=1;for(this[_+te]=y&255;--te>=0&&(ue*=256);)this[_+te]=y/ue&255;return _+B},o.prototype.writeUint8=o.prototype.writeUInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,255,0),this[_]=y&255,_+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function ae(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te,te=te>>8,P[_++]=te;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,ue=ue>>8,P[_++]=ue,_}function De(P,y,_,B,K){Bt(y,B,K,P,_,7);let te=Number(y&BigInt(4294967295));P[_+7]=te,te=te>>8,P[_+6]=te,te=te>>8,P[_+5]=te,te=te>>8,P[_+4]=te;let ue=Number(y>>BigInt(32)&BigInt(4294967295));return P[_+3]=ue,ue=ue>>8,P[_+2]=ue,ue=ue>>8,P[_+1]=ue,ue=ue>>8,P[_]=ue,_+8}o.prototype.writeBigUInt64LE=ka(function(y,_=0){return ae(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=ka(function(y,_=0){return De(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let hn=Math.pow(2,8*B-1);Ln(this,y,_,B,hn-1,-hn)}let te=0,ue=1,Tt=0;for(this[_]=y&255;++te>0)-Tt&255;return _+B},o.prototype.writeIntBE=function(y,_,B,K){if(y=+y,_=_>>>0,!K){let hn=Math.pow(2,8*B-1);Ln(this,y,_,B,hn-1,-hn)}let te=B-1,ue=1,Tt=0;for(this[_+te]=y&255;--te>=0&&(ue*=256);)y<0&&Tt===0&&this[_+te+1]!==0&&(Tt=1),this[_+te]=(y/ue>>0)-Tt&255;return _+B},o.prototype.writeInt8=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},o.prototype.writeInt16LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},o.prototype.writeInt16BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},o.prototype.writeInt32LE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},o.prototype.writeInt32BE=function(y,_,B){return y=+y,_=_>>>0,B||Ln(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},o.prototype.writeBigInt64LE=ka(function(y,_=0){return ae(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=ka(function(y,_=0){return De(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ge(P,y,_,B,K,te){if(_+B>P.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Le(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,4),t.write(P,y,_,B,23,4),_+4}o.prototype.writeFloatLE=function(y,_,B){return Le(this,y,_,!0,B)},o.prototype.writeFloatBE=function(y,_,B){return Le(this,y,_,!1,B)};function St(P,y,_,B,K){return y=+y,_=_>>>0,K||ge(P,y,_,8),t.write(P,y,_,B,52,8),_+8}o.prototype.writeDoubleLE=function(y,_,B){return St(this,y,_,!0,B)},o.prototype.writeDoubleBE=function(y,_,B){return St(this,y,_,!1,B)},o.prototype.copy=function(y,_,B,K){if(!o.isBuffer(y))throw new TypeError("argument should be a Buffer");if(B||(B=0),!K&&K!==0&&(K=this.length),_>=y.length&&(_=y.length),_||(_=0),K>0&&K=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),y.length-_>>0,B=B===void 0?this.length:B>>>0,y||(y=0);let te;if(typeof y=="number")for(te=_;teln(2,32)?K=xe(String(_)):typeof _=="bigint"&&(K=String(_),(_>ln(BigInt(2),BigInt(32))||_<-ln(BigInt(2),BigInt(32)))&&(K=xe(K)),K+="n"),B+=` It must be ${y}. Received ${K}`,B},RangeError);function xe(P){let y="",_=P.length,B=P[0]==="-"?1:0;for(;_>=B+4;_-=3)y=`_${P.slice(_-3,_)}${y}`;return`${P.slice(0,_)}${y}`}function He(P,y,_){it(y,"offset"),(P[y]===void 0||P[y+_]===void 0)&&Pt(y,P.length-(_+1))}function Bt(P,y,_,B,K,te){if(P>_||P3?y===0||y===BigInt(0)?Tt=`>= 0${ue} and < 2${ue} ** ${(te+1)*8}${ue}`:Tt=`>= -(2${ue} ** ${(te+1)*8-1}${ue}) and < 2 ** ${(te+1)*8-1}${ue}`:Tt=`>= ${y}${ue} and <= ${_}${ue}`,new Y.ERR_OUT_OF_RANGE("value",Tt,P)}He(B,K,te)}function it(P,y){if(typeof P!="number")throw new Y.ERR_INVALID_ARG_TYPE(y,"number",P)}function Pt(P,y,_){throw Math.floor(P)!==P?(it(P,_),new Y.ERR_OUT_OF_RANGE(_||"offset","an integer",P)):y<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,P)}let ps=/[^+/0-9A-Za-z-_]/g;function Yr(P){if(P=P.split("=")[0],P=P.trim().replace(ps,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function ms(P,y){y=y||1/0;let _,B=P.length,K=null,te=[];for(let ue=0;ue55295&&_<57344){if(!K){if(_>56319){(y-=3)>-1&&te.push(239,191,189);continue}else if(ue+1===B){(y-=3)>-1&&te.push(239,191,189);continue}K=_;continue}if(_<56320){(y-=3)>-1&&te.push(239,191,189),K=_;continue}_=(K-55296<<10|_-56320)+65536}else K&&(y-=3)>-1&&te.push(239,191,189);if(K=null,_<128){if((y-=1)<0)break;te.push(_)}else if(_<2048){if((y-=2)<0)break;te.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;te.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;te.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return te}function rl(P){let y=[];for(let _=0;_>8,K=_%256,te.push(K),te.push(B);return te}function Ir(P){return e.toByteArray(Yr(P))}function ui(P,y,_,B){let K;for(K=0;K=y.length||K>=P.length);++K)y[K+_]=P[K];return K}function qt(P,y){return P instanceof y||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===y.name}function gr(P){return P!==P}let ju=function(){let P="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){let B=_*16;for(let K=0;K<16;++K)y[B+K]=P[_]+P[K]}return y}();function ka(P){return typeof BigInt=="undefined"?Ku:P}function Ku(){throw new Error("BigInt not supported")}return nc}var Qd,cF,Hm,lF,nc,dF,rc,D,Vpe,jpe,fF=Zu(()=>{"use strict";m();T();N();Qd={},cF=!1;Hm={},lF=!1;nc={},dF=!1;rc=GH();rc.Buffer;rc.SlowBuffer;rc.INSPECT_MAX_BYTES;rc.kMaxLength;D=rc.Buffer,Vpe=rc.INSPECT_MAX_BYTES,jpe=rc.kMaxLength});var T=Zu(()=>{"use strict";fF()});var pF=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.versionInfo=yl.version=void 0;var QH="16.9.0";yl.version=QH;var YH=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});yl.versionInfo=YH});var Vr=w(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.devAssert=JH;function JH(e,t){if(!!!e)throw new Error(t)}});var zm=w(tI=>{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.isPromise=HH;function HH(e){return typeof(e==null?void 0:e.then)=="function"}});var Va=w(nI=>{"use strict";m();T();N();Object.defineProperty(nI,"__esModule",{value:!0});nI.isObjectLike=zH;function zH(e){return typeof e=="object"&&e!==null}});var Ar=w(rI=>{"use strict";m();T();N();Object.defineProperty(rI,"__esModule",{value:!0});rI.invariant=WH;function WH(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Wm=w(iI=>{"use strict";m();T();N();Object.defineProperty(iI,"__esModule",{value:!0});iI.getLocation=e3;var XH=Ar(),ZH=/\r\n|[\n\r]/g;function e3(e,t){let n=0,r=1;for(let i of e.body.matchAll(ZH)){if(typeof i.index=="number"||(0,XH.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var aI=w(Xm=>{"use strict";m();T();N();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.printLocation=n3;Xm.printSourceLocation=NF;var t3=Wm();function n3(e){return NF(e.source,(0,t3.getLocation)(e.source,e.start))}function NF(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,u=t.line===1?n:0,l=t.column+u,d=`${e.name}:${o}:${l} `,p=r.split(/\r\n|[\n\r]/g),E=p[i];if(E.length>120){let I=Math.floor(l/80),v=l%80,A=[];for(let U=0;U["|",U]),["|","^".padStart(v)],["|",A[I+1]]])}return d+mF([[`${o-1} |`,p[i-1]],[`${o} |`,E],["|","^".padStart(l)],[`${o+1} |`,p[i+1]]])}function mF(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}});var ze=w(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.GraphQLError=void 0;Il.formatError=a3;Il.printError=i3;var n3=qa(),TF=Wm(),EF=aI();function r3(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var sI=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:E}=r3(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hF(Array.isArray(o)?o:o?[o]:void 0);let I=hF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=u!=null?u:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&u?l.map(A=>(0,TF.getLocation)(u,A)):I==null?void 0:I.map(A=>(0,TF.getLocation)(A.source,A.start));let v=(0,n3.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a: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}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` +`)}});var ze=w(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.GraphQLError=void 0;Il.formatError=s3;Il.printError=a3;var r3=Va(),TF=Wm(),EF=aI();function i3(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var sI=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:u,positions:l,path:d,originalError:p,extensions:E}=i3(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=p!=null?p:void 0,this.nodes=hF(Array.isArray(o)?o:o?[o]:void 0);let I=hF((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=u!=null?u:I==null||(i=I[0])===null||i===void 0?void 0:i.source,this.positions=l!=null?l:I==null?void 0:I.map(A=>A.start),this.locations=l&&u?l.map(A=>(0,TF.getLocation)(u,A)):I==null?void 0:I.map(A=>(0,TF.getLocation)(A.source,A.start));let v=(0,r3.isObjectLike)(p==null?void 0:p.extensions)?p==null?void 0:p.extensions:void 0;this.extensions=(a=E!=null?E:v)!==null&&a!==void 0?a: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}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` `+(0,EF.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,EF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};Il.GraphQLError=sI;function hF(e){return e===void 0||e.length===0?void 0:e}function i3(e){return e.toString()}function a3(e){return e.toJSON()}});var Zm=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.syntaxError=o3;var s3=ze();function o3(e,t,n){return new s3.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var Va=w(wi=>{"use strict";m();T();N();Object.defineProperty(wi,"__esModule",{value:!0});wi.Token=wi.QueryDocumentKeys=wi.OperationTypeNode=wi.Location=void 0;wi.isNode=c3;var uI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};wi.Location=uI;var cI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,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}}};wi.Token=cI;var yF={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"]};wi.QueryDocumentKeys=yF;var u3=new Set(Object.keys(yF));function c3(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&u3.has(t)}var lI;wi.OperationTypeNode=lI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(lI||(wi.OperationTypeNode=lI={}))});var gl=w(Yd=>{"use strict";m();T();N();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.DirectiveLocation=void 0;var dI;Yd.DirectiveLocation=dI;(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"})(dI||(Yd.DirectiveLocation=dI={}))});var wt=w(Jd=>{"use strict";m();T();N();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.Kind=void 0;var fI;Jd.Kind=fI;(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"})(fI||(Jd.Kind=fI={}))});var eN=w(ic=>{"use strict";m();T();N();Object.defineProperty(ic,"__esModule",{value:!0});ic.isDigit=IF;ic.isLetter=pI;ic.isNameContinue=f3;ic.isNameStart=d3;ic.isWhiteSpace=l3;function l3(e){return e===9||e===32}function IF(e){return e>=48&&e<=57}function pI(e){return e>=97&&e<=122||e>=65&&e<=90}function d3(e){return pI(e)||e===95}function f3(e){return pI(e)||IF(e)||e===95}});var zd=w(Hd=>{"use strict";m();T();N();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.dedentBlockStringLines=p3;Hd.isPrintableAsBlockString=N3;Hd.printBlockString=T3;var mI=eN();function p3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;ou===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function m3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,mI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),u=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=u||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,mI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` +`+(0,EF.printSourceLocation)(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};Il.GraphQLError=sI;function hF(e){return e===void 0||e.length===0?void 0:e}function a3(e){return e.toString()}function s3(e){return e.toJSON()}});var Zm=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.syntaxError=u3;var o3=ze();function u3(e,t,n){return new o3.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ja=w(Li=>{"use strict";m();T();N();Object.defineProperty(Li,"__esModule",{value:!0});Li.Token=Li.QueryDocumentKeys=Li.OperationTypeNode=Li.Location=void 0;Li.isNode=l3;var uI=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};Li.Location=uI;var cI=class{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,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}}};Li.Token=cI;var yF={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"]};Li.QueryDocumentKeys=yF;var c3=new Set(Object.keys(yF));function l3(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&c3.has(t)}var lI;Li.OperationTypeNode=lI;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(lI||(Li.OperationTypeNode=lI={}))});var gl=w(Yd=>{"use strict";m();T();N();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.DirectiveLocation=void 0;var dI;Yd.DirectiveLocation=dI;(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"})(dI||(Yd.DirectiveLocation=dI={}))});var wt=w(Jd=>{"use strict";m();T();N();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.Kind=void 0;var fI;Jd.Kind=fI;(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"})(fI||(Jd.Kind=fI={}))});var eN=w(ic=>{"use strict";m();T();N();Object.defineProperty(ic,"__esModule",{value:!0});ic.isDigit=IF;ic.isLetter=pI;ic.isNameContinue=p3;ic.isNameStart=f3;ic.isWhiteSpace=d3;function d3(e){return e===9||e===32}function IF(e){return e>=48&&e<=57}function pI(e){return e>=97&&e<=122||e>=65&&e<=90}function f3(e){return pI(e)||e===95}function p3(e){return pI(e)||IF(e)||e===95}});var zd=w(Hd=>{"use strict";m();T();N();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.dedentBlockStringLines=m3;Hd.isPrintableAsBlockString=T3;Hd.printBlockString=E3;var mI=eN();function m3(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;ou===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function N3(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,mI.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),u=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=u||l,p=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),E="",I=i&&(0,mI.isWhiteSpace)(e.charCodeAt(0));return(p&&!I||a)&&(E+=` `),E+=n,(p||d)&&(E+=` -`),'"""'+E+'"""'}});var Xd=w(Wd=>{"use strict";m();T();N();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.TokenKind=void 0;var NI;Wd.TokenKind=NI;(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"})(NI||(Wd.TokenKind=NI={}))});var nN=w(ef=>{"use strict";m();T();N();Object.defineProperty(ef,"__esModule",{value:!0});ef.Lexer=void 0;ef.isPunctuatorTokenKind=h3;var ca=Zm(),_F=Va(),E3=zd(),ac=eN(),_t=Xd(),EI=class{constructor(t){let n=new _F.Token(_t.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==_t.TokenKind.EOF)do if(t.next)t=t.next;else{let n=y3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===_t.TokenKind.COMMENT);return t}};ef.Lexer=EI;function h3(e){return e===_t.TokenKind.BANG||e===_t.TokenKind.DOLLAR||e===_t.TokenKind.AMP||e===_t.TokenKind.PAREN_L||e===_t.TokenKind.PAREN_R||e===_t.TokenKind.SPREAD||e===_t.TokenKind.COLON||e===_t.TokenKind.EQUALS||e===_t.TokenKind.AT||e===_t.TokenKind.BRACKET_L||e===_t.TokenKind.BRACKET_R||e===_t.TokenKind.BRACE_L||e===_t.TokenKind.PIPE||e===_t.TokenKind.BRACE_R}function _l(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function tN(e,t){return vF(e.charCodeAt(t))&&OF(e.charCodeAt(t+1))}function vF(e){return e>=55296&&e<=56319}function OF(e){return e>=56320&&e<=57343}function sc(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return _t.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new _F.Token(t,n,r,a,o,i)}function y3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function S3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,ca.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function D3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,u="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(hI,"__esModule",{value:!0});hI.inspect=R3;var A3=10,SF=2;function R3(e){return rN(e,[])}function rN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return P3(e,t);default:return String(e)}}function P3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(F3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:rN(r,n)}else if(Array.isArray(e))return L3(e,n);return w3(e,n)}function F3(e){return typeof e.toJSON=="function"}function w3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>SF?"["+C3(e)+"]":"{ "+n.map(([i,a])=>i+": "+rN(a,t)).join(", ")+" }"}function L3(e,t){if(e.length===0)return"[]";if(t.length>SF)return"[Array]";let n=Math.min(A3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function C3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var tf=w(iN=>{"use strict";m();T();N();Object.defineProperty(iN,"__esModule",{value:!0});iN.instanceOf=void 0;var B3=Wt(),U3=globalThis.process&&S.env.NODE_ENV==="production",k3=U3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,B3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`),'"""'+E+'"""'}});var Xd=w(Wd=>{"use strict";m();T();N();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.TokenKind=void 0;var NI;Wd.TokenKind=NI;(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"})(NI||(Wd.TokenKind=NI={}))});var nN=w(ef=>{"use strict";m();T();N();Object.defineProperty(ef,"__esModule",{value:!0});ef.Lexer=void 0;ef.isPunctuatorTokenKind=y3;var la=Zm(),_F=ja(),h3=zd(),ac=eN(),vt=Xd(),EI=class{constructor(t){let n=new _F.Token(vt.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==vt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=I3(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===vt.TokenKind.COMMENT);return t}};ef.Lexer=EI;function y3(e){return e===vt.TokenKind.BANG||e===vt.TokenKind.DOLLAR||e===vt.TokenKind.AMP||e===vt.TokenKind.PAREN_L||e===vt.TokenKind.PAREN_R||e===vt.TokenKind.SPREAD||e===vt.TokenKind.COLON||e===vt.TokenKind.EQUALS||e===vt.TokenKind.AT||e===vt.TokenKind.BRACKET_L||e===vt.TokenKind.BRACKET_R||e===vt.TokenKind.BRACE_L||e===vt.TokenKind.PIPE||e===vt.TokenKind.BRACE_R}function _l(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function tN(e,t){return vF(e.charCodeAt(t))&&OF(e.charCodeAt(t+1))}function vF(e){return e>=55296&&e<=56319}function OF(e){return e>=56320&&e<=57343}function sc(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return vt.TokenKind.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Hn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new _F.Token(t,n,r,a,o,i)}function I3(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function D3(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw(0,la.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function b3(e,t){let n=e.source.body,r=n.length,i=e.lineStart,a=t+3,o=a,u="",l=[];for(;a{"use strict";m();T();N();Object.defineProperty(hI,"__esModule",{value:!0});hI.inspect=P3;var R3=10,SF=2;function P3(e){return rN(e,[])}function rN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return F3(e,t);default:return String(e)}}function F3(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(w3(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:rN(r,n)}else if(Array.isArray(e))return C3(e,n);return L3(e,n)}function w3(e){return typeof e.toJSON=="function"}function L3(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>SF?"["+B3(e)+"]":"{ "+n.map(([i,a])=>i+": "+rN(a,t)).join(", ")+" }"}function C3(e,t){if(e.length===0)return"[]";if(t.length>SF)return"[Array]";let n=Math.min(R3,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function B3(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}});var tf=w(iN=>{"use strict";m();T();N();Object.defineProperty(iN,"__esModule",{value:!0});iN.instanceOf=void 0;var U3=Wt(),k3=globalThis.process&&S.env.NODE_ENV==="production",M3=k3?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){let o=(0,U3.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -36,42 +36,42 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};iN.instanceOf=k3});var sN=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.Source=void 0;nf.isSource=q3;var yI=Vr(),M3=Wt(),x3=tf(),aN=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,yI.devAssert)(!1,`Body must be a string. Received: ${(0,M3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,yI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,yI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};nf.Source=aN;function q3(e){return(0,x3.instanceOf)(e,aN)}});var vl=w(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.Parser=void 0;pu.parse=j3;pu.parseConstValue=$3;pu.parseType=G3;pu.parseValue=K3;var oc=Zm(),rf=Va(),V3=gl(),ot=wt(),bF=nN(),DF=sN(),Se=Xd();function j3(e,t){return new uc(e,t).parseDocument()}function K3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Se.TokenKind.EOF),r}function $3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Se.TokenKind.EOF),r}function G3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Se.TokenKind.EOF),r}var uc=class{constructor(t,n={}){let r=(0,DF.isSource)(t)?t:new DF.Source(t);this._lexer=new bF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Se.TokenKind.NAME);return this.node(t,{kind:ot.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.Kind.DOCUMENT,definitions:this.many(Se.TokenKind.SOF,this.parseDefinition,Se.TokenKind.EOF)})}parseDefinition(){if(this.peek(Se.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(Se.TokenKind.BRACE_L))return this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:rf.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Se.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Se.TokenKind.NAME);switch(t.value){case"query":return rf.OperationTypeNode.QUERY;case"mutation":return rf.OperationTypeNode.MUTATION;case"subscription":return rf.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseVariableDefinition,Se.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Se.TokenKind.DOLLAR),this.node(t,{kind:ot.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.Kind.SELECTION_SET,selections:this.many(Se.TokenKind.BRACE_L,this.parseSelection,Se.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Se.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Se.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ot.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.TokenKind.PAREN_L,n,Se.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Se.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.TokenKind.NAME)?this.node(t,{kind:ot.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ot.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case Se.TokenKind.BRACKET_L:return this.parseList(t);case Se.TokenKind.BRACE_L:return this.parseObject(t);case Se.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.INT,value:n.value});case Se.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.FLOAT,value:n.value});case Se.TokenKind.STRING:case Se.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Se.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ot.Kind.NULL});default:return this.node(n,{kind:ot.Kind.ENUM,value:n.value})}case Se.TokenKind.DOLLAR:if(t)if(this.expectToken(Se.TokenKind.DOLLAR),this._lexer.token.kind===Se.TokenKind.NAME){let r=this._lexer.token.value;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ot.Kind.STRING,value:t.value,block:t.kind===Se.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ot.Kind.LIST,values:this.any(Se.TokenKind.BRACKET_L,n,Se.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ot.Kind.OBJECT,fields:this.any(Se.TokenKind.BRACE_L,n,Se.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Se.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Se.TokenKind.AT),this.node(n,{kind:ot.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Se.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Se.TokenKind.BRACKET_R),n=this.node(t,{kind:ot.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Se.TokenKind.BANG)?this.node(t,{kind:ot.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ot.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.TokenKind.STRING)||this.peek(Se.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);return this.node(t,{kind:ot.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ot.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseFieldDefinition,Se.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Se.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseInputValueDef,Se.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Se.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Se.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ot.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.TokenKind.EQUALS)?this.delimitedMany(Se.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ot.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseEnumValueDefinition,Se.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,`${oN(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseInputValueDef,Se.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Se.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ot.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(V3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new rf.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected ${AF(t)}, found ${oN(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Se.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${oN(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Se.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected ${oN(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==Se.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,oc.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};pu.Parser=uc;function oN(e){let t=e.value;return AF(e.kind)+(t!=null?` "${t}"`:"")}function AF(e){return(0,bF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var mu=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.didYouMean=Y3;var Q3=5;function Y3(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,Q3),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var RF=w(gI=>{"use strict";m();T();N();Object.defineProperty(gI,"__esModule",{value:!0});gI.identityFunc=J3;function J3(e){return e}});var Nu=w(_I=>{"use strict";m();T();N();Object.defineProperty(_I,"__esModule",{value:!0});_I.keyMap=H3;function H3(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var af=w(vI=>{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.keyValMap=z3;function z3(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var SI=w(OI=>{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.mapValue=W3;function W3(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var sf=w(bI=>{"use strict";m();T();N();Object.defineProperty(bI,"__esModule",{value:!0});bI.naturalCompare=X3;function X3(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+a-DI,a=t.charCodeAt(r);while(uN(a)&&u>0);if(ou)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var DI=48,Z3=57;function uN(e){return!isNaN(e)&&DI<=e&&e<=Z3}});var Tu=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.suggestionList=t6;var e6=sf();function t6(e,t){let n=Object.create(null),r=new AI(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let u=n[a]-n[o];return u!==0?u:(0,e6.naturalCompare)(a,o)})}var AI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=PF(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=PF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=u;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=u;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let Q=l[(p-2)%3][A-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function PF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(PI,"__esModule",{value:!0});PI.toObjMap=n6;function n6(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var FF=w(FI=>{"use strict";m();T();N();Object.defineProperty(FI,"__esModule",{value:!0});FI.printString=r6;function r6(e){return`"${e.replace(i6,a6)}"`}var i6=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function a6(e){return s6[e.charCodeAt(0)]}var s6=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var cc=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.BREAK=void 0;Eu.getEnterLeaveForKind=lN;Eu.getVisitFn=d6;Eu.visit=c6;Eu.visitInParallel=l6;var o6=Vr(),u6=Wt(),wI=Va(),wF=wt(),Ol=Object.freeze({});Eu.BREAK=Ol;function c6(e,t,n=wI.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(wF.Kind))r.set(Q,lN(t,Q));let i,a=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,E,I=[],v=[];do{u++;let Q=u===o.length,re=Q&&l.length!==0;if(Q){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),re)if(a){d=d.slice();let me=0;for(let[ue,Ae]of l){let Me=ue-me;Ae===null?(d.splice(Me,1),me++):d[Me]=Ae}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[me,ue]of l)d[me]=ue}u=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?u:o[u],d=E[p],d==null)continue;I.push(p)}let ee;if(!Array.isArray(d)){var A,U;(0,wI.isNode)(d)||(0,o6.devAssert)(!1,`Invalid AST Node: ${(0,u6.inspect)(d)}.`);let me=Q?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(ee=me==null?void 0:me.call(t,d,p,E,I,v),ee===Ol)break;if(ee===!1){if(!Q){I.pop();continue}}else if(ee!==void 0&&(l.push([p,ee]),!Q))if((0,wI.isNode)(ee))d=ee;else{I.pop();continue}}if(ee===void 0&&re&&l.push([p,d]),Q)I.pop();else{var j;i={inArray:a,index:u,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function l6(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(wF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(LI,"__esModule",{value:!0});LI.print=N6;var f6=zd(),p6=FF(),m6=cc();function N6(e){return(0,m6.visit)(e,E6)}var T6=80,E6={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>qe(e.definitions,` +spurious results.`)}}return!1};iN.instanceOf=M3});var sN=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.Source=void 0;nf.isSource=V3;var yI=Vr(),x3=Wt(),q3=tf(),aN=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,yI.devAssert)(!1,`Body must be a string. Received: ${(0,x3.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,yI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,yI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};nf.Source=aN;function V3(e){return(0,q3.instanceOf)(e,aN)}});var vl=w(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.Parser=void 0;pu.parse=K3;pu.parseConstValue=G3;pu.parseType=Q3;pu.parseValue=$3;var oc=Zm(),rf=ja(),j3=gl(),ot=wt(),bF=nN(),DF=sN(),Se=Xd();function K3(e,t){return new uc(e,t).parseDocument()}function $3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Se.TokenKind.EOF),r}function G3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Se.TokenKind.EOF),r}function Q3(e,t){let n=new uc(e,t);n.expectToken(Se.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Se.TokenKind.EOF),r}var uc=class{constructor(t,n={}){let r=(0,DF.isSource)(t)?t:new DF.Source(t);this._lexer=new bF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Se.TokenKind.NAME);return this.node(t,{kind:ot.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:ot.Kind.DOCUMENT,definitions:this.many(Se.TokenKind.SOF,this.parseDefinition,Se.TokenKind.EOF)})}parseDefinition(){if(this.peek(Se.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Se.TokenKind.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(Se.TokenKind.BRACE_L))return this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:rf.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Se.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:ot.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Se.TokenKind.NAME);switch(t.value){case"query":return rf.OperationTypeNode.QUERY;case"mutation":return rf.OperationTypeNode.MUTATION;case"subscription":return rf.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseVariableDefinition,Se.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ot.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Se.TokenKind.DOLLAR),this.node(t,{kind:ot.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ot.Kind.SELECTION_SET,selections:this.many(Se.TokenKind.BRACE_L,this.parseSelection,Se.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Se.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Se.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:ot.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.TokenKind.PAREN_L,n,Se.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Se.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Se.TokenKind.NAME)?this.node(t,{kind:ot.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:ot.Kind.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:ot.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case Se.TokenKind.BRACKET_L:return this.parseList(t);case Se.TokenKind.BRACE_L:return this.parseObject(t);case Se.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.INT,value:n.value});case Se.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:ot.Kind.FLOAT,value:n.value});case Se.TokenKind.STRING:case Se.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Se.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:ot.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:ot.Kind.NULL});default:return this.node(n,{kind:ot.Kind.ENUM,value:n.value})}case Se.TokenKind.DOLLAR:if(t)if(this.expectToken(Se.TokenKind.DOLLAR),this._lexer.token.kind===Se.TokenKind.NAME){let r=this._lexer.token.value;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:ot.Kind.STRING,value:t.value,block:t.kind===Se.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:ot.Kind.LIST,values:this.any(Se.TokenKind.BRACKET_L,n,Se.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:ot.Kind.OBJECT,fields:this.any(Se.TokenKind.BRACE_L,n,Se.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Se.TokenKind.COLON),this.node(n,{kind:ot.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Se.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Se.TokenKind.AT),this.node(n,{kind:ot.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Se.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Se.TokenKind.BRACKET_R),n=this.node(t,{kind:ot.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Se.TokenKind.BANG)?this.node(t,{kind:ot.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:ot.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.TokenKind.STRING)||this.peek(Se.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);return this.node(t,{kind:ot.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Se.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:ot.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseFieldDefinition,Se.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Se.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Se.TokenKind.PAREN_L,this.parseInputValueDef,Se.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Se.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Se.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:ot.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.TokenKind.EQUALS)?this.delimitedMany(Se.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:ot.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseEnumValueDefinition,Se.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:ot.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw(0,oc.syntaxError)(this._lexer.source,this._lexer.token.start,`${oN(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Se.TokenKind.BRACE_L,this.parseInputValueDef,Se.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Se.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(Se.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Se.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:ot.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.TokenKind.AT);let r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:ot.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Se.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(j3.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new rf.Location(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected ${AF(t)}, found ${oN(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Se.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,oc.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${oN(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Se.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,oc.syntaxError)(this._lexer.source,n.start,`Unexpected ${oN(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==Se.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,oc.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};pu.Parser=uc;function oN(e){let t=e.value;return AF(e.kind)+(t!=null?` "${t}"`:"")}function AF(e){return(0,bF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var mu=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.didYouMean=J3;var Y3=5;function J3(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let a=r.map(l=>`"${l}"`);switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}let o=a.slice(0,Y3),u=o.pop();return i+o.join(", ")+", or "+u+"?"}});var RF=w(gI=>{"use strict";m();T();N();Object.defineProperty(gI,"__esModule",{value:!0});gI.identityFunc=H3;function H3(e){return e}});var Nu=w(_I=>{"use strict";m();T();N();Object.defineProperty(_I,"__esModule",{value:!0});_I.keyMap=z3;function z3(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var af=w(vI=>{"use strict";m();T();N();Object.defineProperty(vI,"__esModule",{value:!0});vI.keyValMap=W3;function W3(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var SI=w(OI=>{"use strict";m();T();N();Object.defineProperty(OI,"__esModule",{value:!0});OI.mapValue=X3;function X3(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var sf=w(bI=>{"use strict";m();T();N();Object.defineProperty(bI,"__esModule",{value:!0});bI.naturalCompare=Z3;function Z3(e,t){let n=0,r=0;for(;n0);let u=0;do++r,u=u*10+a-DI,a=t.charCodeAt(r);while(uN(a)&&u>0);if(ou)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var DI=48,ez=57;function uN(e){return!isNaN(e)&&DI<=e&&e<=ez}});var Tu=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.suggestionList=nz;var tz=sf();function nz(e,t){let n=Object.create(null),r=new AI(e),i=Math.floor(e.length*.4)+1;for(let a of t){let o=r.measure(a,i);o!==void 0&&(n[a]=o)}return Object.keys(n).sort((a,o)=>{let u=n[a]-n[o];return u!==0?u:(0,tz.naturalCompare)(a,o)})}var AI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=PF(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=PF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let p=0;p<=u;p++)l[0][p]=p;for(let p=1;p<=o;p++){let E=l[(p-1)%3],I=l[p%3],v=I[0]=p;for(let A=1;A<=u;A++){let U=i[p-1]===a[A-1]?0:1,j=Math.min(E[A]+1,I[A-1]+1,E[A-1]+U);if(p>1&&A>1&&i[p-1]===a[A-2]&&i[p-2]===a[A-1]){let Q=l[(p-2)%3][A-2];j=Math.min(j,Q+1)}jn)return}let d=l[o%3][u];return d<=n?d:void 0}};function PF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(PI,"__esModule",{value:!0});PI.toObjMap=rz;function rz(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);for(let[n,r]of Object.entries(e))t[n]=r;return t}});var FF=w(FI=>{"use strict";m();T();N();Object.defineProperty(FI,"__esModule",{value:!0});FI.printString=iz;function iz(e){return`"${e.replace(az,sz)}"`}var az=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function sz(e){return oz[e.charCodeAt(0)]}var oz=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]});var cc=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.BREAK=void 0;Eu.getEnterLeaveForKind=lN;Eu.getVisitFn=fz;Eu.visit=lz;Eu.visitInParallel=dz;var uz=Vr(),cz=Wt(),wI=ja(),wF=wt(),Ol=Object.freeze({});Eu.BREAK=Ol;function lz(e,t,n=wI.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(wF.Kind))r.set(Q,lN(t,Q));let i,a=Array.isArray(e),o=[e],u=-1,l=[],d=e,p,E,I=[],v=[];do{u++;let Q=u===o.length,ee=Q&&l.length!==0;if(Q){if(p=v.length===0?void 0:I[I.length-1],d=E,E=v.pop(),ee)if(a){d=d.slice();let pe=0;for(let[le,Ae]of l){let Me=le-pe;Ae===null?(d.splice(Me,1),pe++):d[Me]=Ae}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[pe,le]of l)d[pe]=le}u=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(E){if(p=a?u:o[u],d=E[p],d==null)continue;I.push(p)}let ne;if(!Array.isArray(d)){var A,U;(0,wI.isNode)(d)||(0,uz.devAssert)(!1,`Invalid AST Node: ${(0,cz.inspect)(d)}.`);let pe=Q?(A=r.get(d.kind))===null||A===void 0?void 0:A.leave:(U=r.get(d.kind))===null||U===void 0?void 0:U.enter;if(ne=pe==null?void 0:pe.call(t,d,p,E,I,v),ne===Ol)break;if(ne===!1){if(!Q){I.pop();continue}}else if(ne!==void 0&&(l.push([p,ne]),!Q))if((0,wI.isNode)(ne))d=ne;else{I.pop();continue}}if(ne===void 0&&ee&&l.push([p,d]),Q)I.pop();else{var j;i={inArray:a,index:u,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(j=n[d.kind])!==null&&j!==void 0?j:[],u=-1,l=[],E&&v.push(E),E=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function dz(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(wF.Kind)){let i=!1,a=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let l=0;l{"use strict";m();T();N();Object.defineProperty(LI,"__esModule",{value:!0});LI.print=Tz;var pz=zd(),mz=FF(),Nz=cc();function Tz(e){return(0,Nz.visit)(e,hz)}var Ez=80,hz={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>qe(e.definitions,` -`)},OperationDefinition:{leave(e){let t=At("(",qe(e.variableDefinitions,", "),")"),n=qe([e.operation,qe([e.name,t]),qe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",qe(r," "))},SelectionSet:{leave:({selections:e})=>la(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",qe(n,", "),")");return o.length>T6&&(o=a+At(`( +`)},OperationDefinition:{leave(e){let t=At("(",qe(e.variableDefinitions,", "),")"),n=qe([e.operation,qe([e.name,t]),qe(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+At(" = ",n)+At(" ",qe(r," "))},SelectionSet:{leave:({selections:e})=>da(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=At("",e,": ")+t,o=a+At("(",qe(n,", "),")");return o.length>Ez&&(o=a+At(`( `,dN(qe(n,` `)),` -)`)),qe([o,qe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",qe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>qe(["...",At("on ",e),qe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",qe(n,", "),")")} on ${t} ${At("",qe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,f6.printBlockString)(e):(0,p6.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+qe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+qe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",qe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` -`)+qe(["schema",qe(t," "),la(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` +)`)),qe([o,qe(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+At(" ",qe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>qe(["...",At("on ",e),qe(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${At("(",qe(n,", "),")")} on ${t} ${At("",qe(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,pz.printBlockString)(e):(0,mz.printString)(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+qe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+qe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+At("(",qe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>At("",e,` +`)+qe(["schema",qe(t," "),da(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` `)+qe(["scalar",t,qe(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>At("",e,` -`)+qe(["type",t,At("implements ",qe(n," & ")),qe(r," "),la(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>At("",e,` +`)+qe(["type",t,At("implements ",qe(n," & ")),qe(r," "),da(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>At("",e,` `)+t+(LF(n)?At(`( `,dN(qe(n,` `)),` )`):At("(",qe(n,", "),")"))+": "+r+At(" ",qe(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>At("",e,` `)+qe([t+": "+n,At("= ",r),qe(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>At("",e,` -`)+qe(["interface",t,At("implements ",qe(n," & ")),qe(r," "),la(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>At("",e,` +`)+qe(["interface",t,At("implements ",qe(n," & ")),qe(r," "),da(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>At("",e,` `)+qe(["union",t,qe(n," "),At("= ",qe(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>At("",e,` -`)+qe(["enum",t,qe(n," "),la(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` +`)+qe(["enum",t,qe(n," "),da(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>At("",e,` `)+qe([t,qe(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>At("",e,` -`)+qe(["input",t,qe(n," "),la(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>At("",e,` +`)+qe(["input",t,qe(n," "),da(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>At("",e,` `)+"directive @"+t+(LF(n)?At(`( `,dN(qe(n,` `)),` -)`):At("(",qe(n,", "),")"))+(r?" repeatable":"")+" on "+qe(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>qe(["extend schema",qe(e," "),la(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>qe(["extend scalar",e,qe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>qe(["extend type",e,At("implements ",qe(t," & ")),qe(n," "),la(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>qe(["extend interface",e,At("implements ",qe(t," & ")),qe(n," "),la(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>qe(["extend union",e,qe(t," "),At("= ",qe(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>qe(["extend enum",e,qe(t," "),la(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>qe(["extend input",e,qe(t," "),la(n)]," ")}};function qe(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function la(e){return At(`{ +)`):At("(",qe(n,", "),")"))+(r?" repeatable":"")+" on "+qe(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>qe(["extend schema",qe(e," "),da(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>qe(["extend scalar",e,qe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>qe(["extend type",e,At("implements ",qe(t," & ")),qe(n," "),da(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>qe(["extend interface",e,At("implements ",qe(t," & ")),qe(n," "),da(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>qe(["extend union",e,qe(t," "),At("= ",qe(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>qe(["extend enum",e,qe(t," "),da(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>qe(["extend input",e,qe(t," "),da(n)]," ")}};function qe(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function da(e){return At(`{ `,dN(qe(e,` `)),` }`)}function At(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function dN(e){return At(" ",e.replace(/\n/g,` `))}function LF(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}});var UI=w(BI=>{"use strict";m();T();N();Object.defineProperty(BI,"__esModule",{value:!0});BI.valueFromASTUntyped=CI;var h6=af(),Ds=wt();function CI(e,t){switch(e.kind){case Ds.Kind.NULL:return null;case Ds.Kind.INT:return parseInt(e.value,10);case Ds.Kind.FLOAT:return parseFloat(e.value);case Ds.Kind.STRING:case Ds.Kind.ENUM:case Ds.Kind.BOOLEAN:return e.value;case Ds.Kind.LIST:return e.values.map(n=>CI(n,t));case Ds.Kind.OBJECT:return(0,h6.keyValMap)(e.fields,n=>n.name.value,n=>CI(n.value,t));case Ds.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var of=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.assertEnumValueName=y6;pN.assertName=UF;var CF=Vr(),fN=ze(),BF=eN();function UF(e){if(e!=null||(0,CF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,CF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new fN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=HF;Ge.assertAbstractType=x6;Ge.assertCompositeType=M6;Ge.assertEnumType=F6;Ge.assertInputObjectType=w6;Ge.assertInputType=B6;Ge.assertInterfaceType=R6;Ge.assertLeafType=k6;Ge.assertListType=L6;Ge.assertNamedType=K6;Ge.assertNonNullType=C6;Ge.assertNullableType=V6;Ge.assertObjectType=A6;Ge.assertOutputType=U6;Ge.assertScalarType=b6;Ge.assertType=D6;Ge.assertUnionType=P6;Ge.assertWrappingType=q6;Ge.defineArguments=YF;Ge.getNamedType=$6;Ge.getNullableType=j6;Ge.isAbstractType=KF;Ge.isCompositeType=jF;Ge.isEnumType=pc;Ge.isInputObjectType=cf;Ge.isInputType=kI;Ge.isInterfaceType=dc;Ge.isLeafType=VF;Ge.isListType=SN;Ge.isNamedType=$F;Ge.isNonNullType=yu;Ge.isNullableType=xI;Ge.isObjectType=Dl;Ge.isOutputType=MI;Ge.isRequiredArgument=G6;Ge.isRequiredInputField=J6;Ge.isScalarType=lc;Ge.isType=ON;Ge.isUnionType=fc;Ge.isWrappingType=lf;Ge.resolveObjMapThunk=VI;Ge.resolveReadonlyArrayThunk=qI;var mr=Vr(),I6=mu(),kF=RF(),Nn=Wt(),hu=tf(),g6=qa(),_6=Nu(),qF=af(),vN=SI(),v6=Tu(),ja=cN(),uf=ze(),O6=wt(),MF=Ni(),S6=UI(),Ka=of();function ON(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)||SN(e)||yu(e)}function D6(e){if(!ON(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL type.`);return e}function lc(e){return(0,hu.instanceOf)(e,EN)}function b6(e){if(!lc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function Dl(e){return(0,hu.instanceOf)(e,hN)}function A6(e){if(!Dl(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Object type.`);return e}function dc(e){return(0,hu.instanceOf)(e,yN)}function R6(e){if(!dc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Interface type.`);return e}function fc(e){return(0,hu.instanceOf)(e,IN)}function P6(e){if(!fc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Union type.`);return e}function pc(e){return(0,hu.instanceOf)(e,gN)}function F6(e){if(!pc(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Enum type.`);return e}function cf(e){return(0,hu.instanceOf)(e,_N)}function w6(e){if(!cf(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function SN(e){return(0,hu.instanceOf)(e,NN)}function L6(e){if(!SN(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL List type.`);return e}function yu(e){return(0,hu.instanceOf)(e,TN)}function C6(e){if(!yu(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function kI(e){return lc(e)||pc(e)||cf(e)||lf(e)&&kI(e.ofType)}function B6(e){if(!kI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL input type.`);return e}function MI(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||lf(e)&&MI(e.ofType)}function U6(e){if(!MI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL output type.`);return e}function VF(e){return lc(e)||pc(e)}function k6(e){if(!VF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL leaf type.`);return e}function jF(e){return Dl(e)||dc(e)||fc(e)}function M6(e){if(!jF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL composite type.`);return e}function KF(e){return dc(e)||fc(e)}function x6(e){if(!KF(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL abstract type.`);return e}var NN=class{constructor(t){ON(t)||(0,mr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=NN;var TN=class{constructor(t){xI(t)||(0,mr.devAssert)(!1,`Expected ${(0,Nn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Ge.GraphQLNonNull=TN;function lf(e){return SN(e)||yu(e)}function q6(e){if(!lf(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function xI(e){return ON(e)&&!yu(e)}function V6(e){if(!xI(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL nullable type.`);return e}function j6(e){if(e)return yu(e)?e.ofType:e}function $F(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)}function K6(e){if(!$F(e))throw new Error(`Expected ${(0,Nn.inspect)(e)} to be a GraphQL named type.`);return e}function $6(e){if(e){let t=e;for(;lf(t);)t=t.ofType;return t}}function qI(e){return typeof e=="function"?e():e}function VI(e){return typeof e=="function"?e():e}var EN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:kF.identityFunc;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:kF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(u,l)=>o((0,S6.valueFromASTUntyped)(u,l)),this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,mr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Nn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,mr.devAssert)(!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.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,mr.devAssert)(!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()}};Ge.GraphQLScalarType=EN;var hN=class{constructor(t){var n;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>QF(t),this._interfaces=()=>GF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Nn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=hN;function GF(e){var t;let n=qI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,mr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function QF(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>{var i;Sl(n)||(0,mr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,mr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Nn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return Sl(a)||(0,mr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ka.assertName)(r),description:n.description,type:n.type,args:YF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,ja.toObjMap)(n.extensions),astNode:n.astNode}})}function YF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ka.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ja.toObjMap)(n.extensions),astNode:n.astNode}))}function Sl(e){return(0,g6.isObjectLike)(e)&&!Array.isArray(e)}function JF(e){return(0,vN.mapValue)(e,t=>({description:t.description,type:t.type,args:HF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function HF(e){return(0,qF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function G6(e){return yu(e.type)&&e.defaultValue===void 0}var yN=class{constructor(t){var n;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=QF.bind(void 0,t),this._interfaces=GF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=yN;var IN=class{constructor(t){var n;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Q6.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Nn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(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()}};Ge.GraphQLUnionType=IN;function Q6(e){let t=qI(e.types);return Array.isArray(t)||(0,mr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var gN=class{constructor(t){var n;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:xF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=xF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,_6.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new uf.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Nn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Nn.inspect)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+mN(this,r))}let n=this.getValue(t);if(n==null)throw new uf.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+mN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==O6.Kind.ENUM){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+mN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+mN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,qF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLEnumType=gN;function mN(e,t){let n=e.getValues().map(i=>i.name),r=(0,v6.suggestionList)(t,n);return(0,I6.didYouMean)("the enum value",r)}function xF(e,t){return Sl(t)||(0,mr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Sl(r)||(0,mr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Nn.inspect)(r)}.`),{name:(0,Ka.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,ja.toObjMap)(r.extensions),astNode:r.astNode}))}var _N=class{constructor(t){var n,r;this.name=(0,Ka.assertName)(t.name),this.description=t.description,this.extensions=(0,ja.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=Y6.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,vN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInputObjectType=_N;function Y6(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,mr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ka.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,ja.toObjMap)(n.extensions),astNode:n.astNode}))}function J6(e){return yu(e.type)&&e.defaultValue===void 0}});var ff=w(df=>{"use strict";m();T();N();Object.defineProperty(df,"__esModule",{value:!0});df.doTypesOverlap=H6;df.isEqualType=jI;df.isTypeSubTypeOf=DN;var Rr=Lt();function jI(e,t){return e===t?!0:(0,Rr.isNonNullType)(e)&&(0,Rr.isNonNullType)(t)||(0,Rr.isListType)(e)&&(0,Rr.isListType)(t)?jI(e.ofType,t.ofType):!1}function DN(e,t,n){return t===n?!0:(0,Rr.isNonNullType)(n)?(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n):(0,Rr.isListType)(n)?(0,Rr.isListType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isListType)(t)?!1:(0,Rr.isAbstractType)(n)&&((0,Rr.isInterfaceType)(t)||(0,Rr.isObjectType)(t))&&e.isSubType(n,t)}function H6(e,t,n){return t===n?!0:(0,Rr.isAbstractType)(t)?(0,Rr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Rr.isAbstractType)(n)?e.isSubType(n,t):!1}});var $a=w(ir=>{"use strict";m();T();N();Object.defineProperty(ir,"__esModule",{value:!0});ir.GraphQLString=ir.GraphQLInt=ir.GraphQLID=ir.GraphQLFloat=ir.GraphQLBoolean=ir.GRAPHQL_MIN_INT=ir.GRAPHQL_MAX_INT=void 0;ir.isSpecifiedScalarType=z6;ir.specifiedScalarTypes=void 0;var da=Wt(),zF=qa(),Nr=ze(),mc=wt(),pf=Ni(),mf=Lt(),bN=2147483647;ir.GRAPHQL_MAX_INT=bN;var AN=-2147483648;ir.GRAPHQL_MIN_INT=AN;var WF=new mf.GraphQLScalarType({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){let t=Nf(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new Nr.GraphQLError(`Int cannot represent non-integer value: ${(0,da.inspect)(t)}`);if(n>bN||nbN||ebN||te.name===t)}function Nf(e){if((0,zF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,zF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Xr=w(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=nz;jn.isDirective=iw;jn.isSpecifiedDirective=rz;jn.specifiedDirectives=void 0;var rw=Vr(),W6=Wt(),X6=tf(),Z6=qa(),ez=cN(),Li=gl(),tz=of(),Tf=Lt(),RN=$a();function iw(e){return(0,X6.instanceOf)(e,bs)}function nz(e){if(!iw(e))throw new Error(`Expected ${(0,W6.inspect)(e)} to be a GraphQL directive.`);return e}var bs=class{constructor(t){var n,r;this.name=(0,tz.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,ez.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,rw.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,Z6.isObjectLike)(i)&&!Array.isArray(i)||(0,rw.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Tf.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Tf.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=bs;var aw=new bs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Li.DirectiveLocation.FIELD,Li.DirectiveLocation.FRAGMENT_SPREAD,Li.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=aw;var sw=new bs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Li.DirectiveLocation.FIELD,Li.DirectiveLocation.FRAGMENT_SPREAD,Li.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=sw;var ow="No longer supported";jn.DEFAULT_DEPRECATION_REASON=ow;var uw=new bs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Li.DirectiveLocation.FIELD_DEFINITION,Li.DirectiveLocation.ARGUMENT_DEFINITION,Li.DirectiveLocation.INPUT_FIELD_DEFINITION,Li.DirectiveLocation.ENUM_VALUE],args:{reason:{type:RN.GraphQLString,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:ow}}});jn.GraphQLDeprecatedDirective=uw;var cw=new bs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Li.DirectiveLocation.SCALAR],args:{url:{type:new Tf.GraphQLNonNull(RN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=cw;var lw=new bs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Li.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=lw;var dw=Object.freeze([aw,sw,uw,cw,lw]);jn.specifiedDirectives=dw;function rz(e){return dw.some(({name:t})=>t===e.name)}});var PN=w(KI=>{"use strict";m();T();N();Object.defineProperty(KI,"__esModule",{value:!0});KI.isIterableObject=iz;function iz(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var yf=w($I=>{"use strict";m();T();N();Object.defineProperty($I,"__esModule",{value:!0});$I.astFromValue=hf;var fw=Wt(),az=Ar(),sz=PN(),oz=qa(),Ci=wt(),Ef=Lt(),uz=$a();function hf(e,t){if((0,Ef.isNonNullType)(t)){let n=hf(e,t.ofType);return(n==null?void 0:n.kind)===Ci.Kind.NULL?null:n}if(e===null)return{kind:Ci.Kind.NULL};if(e===void 0)return null;if((0,Ef.isListType)(t)){let n=t.ofType;if((0,sz.isIterableObject)(e)){let r=[];for(let i of e){let a=hf(i,n);a!=null&&r.push(a)}return{kind:Ci.Kind.LIST,values:r}}return hf(e,n)}if((0,Ef.isInputObjectType)(t)){if(!(0,oz.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=hf(e[r.name],r.type);i&&n.push({kind:Ci.Kind.OBJECT_FIELD,name:{kind:Ci.Kind.NAME,value:r.name},value:i})}return{kind:Ci.Kind.OBJECT,fields:n}}if((0,Ef.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Ci.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return pw.test(r)?{kind:Ci.Kind.INT,value:r}:{kind:Ci.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,Ef.isEnumType)(t)?{kind:Ci.Kind.ENUM,value:n}:t===uz.GraphQLID&&pw.test(n)?{kind:Ci.Kind.INT,value:n}:{kind:Ci.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,fw.inspect)(n)}.`)}(0,az.invariant)(!1,"Unexpected input type: "+(0,fw.inspect)(t))}var pw=/^-?(?:0|[1-9][0-9]*)$/});var Ui=w(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=Tz;var cz=Wt(),lz=Ar(),ar=gl(),dz=Ni(),fz=yf(),Ue=Lt(),ln=$a(),GI=new Ue.GraphQLObjectType({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:ln.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(Bi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Ue.GraphQLNonNull(Bi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Bi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Bi,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(QI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=GI;var QI=new Ue.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +`)))!==null&&t!==void 0?t:!1}});var UI=w(BI=>{"use strict";m();T();N();Object.defineProperty(BI,"__esModule",{value:!0});BI.valueFromASTUntyped=CI;var yz=af(),Ds=wt();function CI(e,t){switch(e.kind){case Ds.Kind.NULL:return null;case Ds.Kind.INT:return parseInt(e.value,10);case Ds.Kind.FLOAT:return parseFloat(e.value);case Ds.Kind.STRING:case Ds.Kind.ENUM:case Ds.Kind.BOOLEAN:return e.value;case Ds.Kind.LIST:return e.values.map(n=>CI(n,t));case Ds.Kind.OBJECT:return(0,yz.keyValMap)(e.fields,n=>n.name.value,n=>CI(n.value,t));case Ds.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var of=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.assertEnumValueName=Iz;pN.assertName=UF;var CF=Vr(),fN=ze(),BF=eN();function UF(e){if(e!=null||(0,CF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,CF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new fN.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=HF;Ge.assertAbstractType=qz;Ge.assertCompositeType=xz;Ge.assertEnumType=wz;Ge.assertInputObjectType=Lz;Ge.assertInputType=Uz;Ge.assertInterfaceType=Pz;Ge.assertLeafType=Mz;Ge.assertListType=Cz;Ge.assertNamedType=$z;Ge.assertNonNullType=Bz;Ge.assertNullableType=jz;Ge.assertObjectType=Rz;Ge.assertOutputType=kz;Ge.assertScalarType=Az;Ge.assertType=bz;Ge.assertUnionType=Fz;Ge.assertWrappingType=Vz;Ge.defineArguments=YF;Ge.getNamedType=Gz;Ge.getNullableType=Kz;Ge.isAbstractType=KF;Ge.isCompositeType=jF;Ge.isEnumType=pc;Ge.isInputObjectType=cf;Ge.isInputType=kI;Ge.isInterfaceType=dc;Ge.isLeafType=VF;Ge.isListType=SN;Ge.isNamedType=$F;Ge.isNonNullType=yu;Ge.isNullableType=xI;Ge.isObjectType=Dl;Ge.isOutputType=MI;Ge.isRequiredArgument=Qz;Ge.isRequiredInputField=Hz;Ge.isScalarType=lc;Ge.isType=ON;Ge.isUnionType=fc;Ge.isWrappingType=lf;Ge.resolveObjMapThunk=VI;Ge.resolveReadonlyArrayThunk=qI;var mr=Vr(),gz=mu(),kF=RF(),Tn=Wt(),hu=tf(),_z=Va(),vz=Nu(),qF=af(),vN=SI(),Oz=Tu(),Ka=cN(),uf=ze(),Sz=wt(),MF=Ti(),Dz=UI(),$a=of();function ON(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)||SN(e)||yu(e)}function bz(e){if(!ON(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL type.`);return e}function lc(e){return(0,hu.instanceOf)(e,EN)}function Az(e){if(!lc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function Dl(e){return(0,hu.instanceOf)(e,hN)}function Rz(e){if(!Dl(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Object type.`);return e}function dc(e){return(0,hu.instanceOf)(e,yN)}function Pz(e){if(!dc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Interface type.`);return e}function fc(e){return(0,hu.instanceOf)(e,IN)}function Fz(e){if(!fc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Union type.`);return e}function pc(e){return(0,hu.instanceOf)(e,gN)}function wz(e){if(!pc(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Enum type.`);return e}function cf(e){return(0,hu.instanceOf)(e,_N)}function Lz(e){if(!cf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function SN(e){return(0,hu.instanceOf)(e,NN)}function Cz(e){if(!SN(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL List type.`);return e}function yu(e){return(0,hu.instanceOf)(e,TN)}function Bz(e){if(!yu(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function kI(e){return lc(e)||pc(e)||cf(e)||lf(e)&&kI(e.ofType)}function Uz(e){if(!kI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL input type.`);return e}function MI(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||lf(e)&&MI(e.ofType)}function kz(e){if(!MI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL output type.`);return e}function VF(e){return lc(e)||pc(e)}function Mz(e){if(!VF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL leaf type.`);return e}function jF(e){return Dl(e)||dc(e)||fc(e)}function xz(e){if(!jF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL composite type.`);return e}function KF(e){return dc(e)||fc(e)}function qz(e){if(!KF(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL abstract type.`);return e}var NN=class{constructor(t){ON(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=NN;var TN=class{constructor(t){xI(t)||(0,mr.devAssert)(!1,`Expected ${(0,Tn.inspect)(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};Ge.GraphQLNonNull=TN;function lf(e){return SN(e)||yu(e)}function Vz(e){if(!lf(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function xI(e){return ON(e)&&!yu(e)}function jz(e){if(!xI(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL nullable type.`);return e}function Kz(e){if(e)return yu(e)?e.ofType:e}function $F(e){return lc(e)||Dl(e)||dc(e)||fc(e)||pc(e)||cf(e)}function $z(e){if(!$F(e))throw new Error(`Expected ${(0,Tn.inspect)(e)} to be a GraphQL named type.`);return e}function Gz(e){if(e){let t=e;for(;lf(t);)t=t.ofType;return t}}function qI(e){return typeof e=="function"?e():e}function VI(e){return typeof e=="function"?e():e}var EN=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:kF.identityFunc;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:kF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(u,l)=>o((0,Dz.valueFromASTUntyped)(u,l)),this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(a=t.extensionASTNodes)!==null&&a!==void 0?a:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||(0,mr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,Tn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,mr.devAssert)(!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.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||(0,mr.devAssert)(!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()}};Ge.GraphQLScalarType=EN;var hN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>QF(t),this._interfaces=()=>GF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,Tn.inspect)(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=hN;function GF(e){var t;let n=qI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,mr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function QF(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>{var i;Sl(n)||(0,mr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,mr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,Tn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return Sl(a)||(0,mr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,args:YF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}})}function YF(e){return Object.entries(e).map(([t,n])=>({name:(0,$a.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function Sl(e){return(0,_z.isObjectLike)(e)&&!Array.isArray(e)}function JF(e){return(0,vN.mapValue)(e,t=>({description:t.description,type:t.type,args:HF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function HF(e){return(0,qF.keyValMap)(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Qz(e){return yu(e.type)&&e.defaultValue===void 0}var yN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=QF.bind(void 0,t),this._interfaces=GF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:JF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=yN;var IN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Yz.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,mr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,Tn.inspect)(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(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()}};Ge.GraphQLUnionType=IN;function Yz(e){let t=qI(e.types);return Array.isArray(t)||(0,mr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var gN=class{constructor(t){var n;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:xF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=xF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,vz.keyMap)(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new uf.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,Tn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,Tn.inspect)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+mN(this,r))}let n=this.getValue(t);if(n==null)throw new uf.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+mN(this,t));return n.value}parseLiteral(t,n){if(t.kind!==Sz.Kind.ENUM){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+mN(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,MF.print)(t);throw new uf.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+mN(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,qF.keyValMap)(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLEnumType=gN;function mN(e,t){let n=e.getValues().map(i=>i.name),r=(0,Oz.suggestionList)(t,n);return(0,gz.didYouMean)("the enum value",r)}function xF(e,t){return Sl(t)||(0,mr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Sl(r)||(0,mr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,Tn.inspect)(r)}.`),{name:(0,$a.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Ka.toObjMap)(r.extensions),astNode:r.astNode}))}var _N=class{constructor(t){var n,r;this.name=(0,$a.assertName)(t.name),this.description=t.description,this.extensions=(0,Ka.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=Jz.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=(0,vN.mapValue)(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInputObjectType=_N;function Jz(e){let t=VI(e.fields);return Sl(t)||(0,mr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,vN.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,mr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,$a.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Ka.toObjMap)(n.extensions),astNode:n.astNode}))}function Hz(e){return yu(e.type)&&e.defaultValue===void 0}});var ff=w(df=>{"use strict";m();T();N();Object.defineProperty(df,"__esModule",{value:!0});df.doTypesOverlap=zz;df.isEqualType=jI;df.isTypeSubTypeOf=DN;var Rr=Lt();function jI(e,t){return e===t?!0:(0,Rr.isNonNullType)(e)&&(0,Rr.isNonNullType)(t)||(0,Rr.isListType)(e)&&(0,Rr.isListType)(t)?jI(e.ofType,t.ofType):!1}function DN(e,t,n){return t===n?!0:(0,Rr.isNonNullType)(n)?(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isNonNullType)(t)?DN(e,t.ofType,n):(0,Rr.isListType)(n)?(0,Rr.isListType)(t)?DN(e,t.ofType,n.ofType):!1:(0,Rr.isListType)(t)?!1:(0,Rr.isAbstractType)(n)&&((0,Rr.isInterfaceType)(t)||(0,Rr.isObjectType)(t))&&e.isSubType(n,t)}function zz(e,t,n){return t===n?!0:(0,Rr.isAbstractType)(t)?(0,Rr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,Rr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Ga=w(ar=>{"use strict";m();T();N();Object.defineProperty(ar,"__esModule",{value:!0});ar.GraphQLString=ar.GraphQLInt=ar.GraphQLID=ar.GraphQLFloat=ar.GraphQLBoolean=ar.GRAPHQL_MIN_INT=ar.GRAPHQL_MAX_INT=void 0;ar.isSpecifiedScalarType=Wz;ar.specifiedScalarTypes=void 0;var fa=Wt(),zF=Va(),Nr=ze(),mc=wt(),pf=Ti(),mf=Lt(),bN=2147483647;ar.GRAPHQL_MAX_INT=bN;var AN=-2147483648;ar.GRAPHQL_MIN_INT=AN;var WF=new mf.GraphQLScalarType({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){let t=Nf(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new Nr.GraphQLError(`Int cannot represent non-integer value: ${(0,fa.inspect)(t)}`);if(n>bN||nbN||ebN||te.name===t)}function Nf(e){if((0,zF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,zF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Xr=w(jn=>{"use strict";m();T();N();Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphQLSpecifiedByDirective=jn.GraphQLSkipDirective=jn.GraphQLOneOfDirective=jn.GraphQLIncludeDirective=jn.GraphQLDirective=jn.GraphQLDeprecatedDirective=jn.DEFAULT_DEPRECATION_REASON=void 0;jn.assertDirective=r6;jn.isDirective=iw;jn.isSpecifiedDirective=i6;jn.specifiedDirectives=void 0;var rw=Vr(),Xz=Wt(),Zz=tf(),e6=Va(),t6=cN(),Ci=gl(),n6=of(),Tf=Lt(),RN=Ga();function iw(e){return(0,Zz.instanceOf)(e,bs)}function r6(e){if(!iw(e))throw new Error(`Expected ${(0,Xz.inspect)(e)} to be a GraphQL directive.`);return e}var bs=class{constructor(t){var n,r;this.name=(0,n6.assertName)(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=(0,t6.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,rw.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,e6.isObjectLike)(i)&&!Array.isArray(i)||(0,rw.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Tf.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Tf.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};jn.GraphQLDirective=bs;var aw=new bs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Included when true."}}});jn.GraphQLIncludeDirective=aw;var sw=new bs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ci.DirectiveLocation.FIELD,Ci.DirectiveLocation.FRAGMENT_SPREAD,Ci.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Tf.GraphQLNonNull(RN.GraphQLBoolean),description:"Skipped when true."}}});jn.GraphQLSkipDirective=sw;var ow="No longer supported";jn.DEFAULT_DEPRECATION_REASON=ow;var uw=new bs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ci.DirectiveLocation.FIELD_DEFINITION,Ci.DirectiveLocation.ARGUMENT_DEFINITION,Ci.DirectiveLocation.INPUT_FIELD_DEFINITION,Ci.DirectiveLocation.ENUM_VALUE],args:{reason:{type:RN.GraphQLString,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:ow}}});jn.GraphQLDeprecatedDirective=uw;var cw=new bs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ci.DirectiveLocation.SCALAR],args:{url:{type:new Tf.GraphQLNonNull(RN.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});jn.GraphQLSpecifiedByDirective=cw;var lw=new bs({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ci.DirectiveLocation.INPUT_OBJECT],args:{}});jn.GraphQLOneOfDirective=lw;var dw=Object.freeze([aw,sw,uw,cw,lw]);jn.specifiedDirectives=dw;function i6(e){return dw.some(({name:t})=>t===e.name)}});var PN=w(KI=>{"use strict";m();T();N();Object.defineProperty(KI,"__esModule",{value:!0});KI.isIterableObject=a6;function a6(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var yf=w($I=>{"use strict";m();T();N();Object.defineProperty($I,"__esModule",{value:!0});$I.astFromValue=hf;var fw=Wt(),s6=Ar(),o6=PN(),u6=Va(),Bi=wt(),Ef=Lt(),c6=Ga();function hf(e,t){if((0,Ef.isNonNullType)(t)){let n=hf(e,t.ofType);return(n==null?void 0:n.kind)===Bi.Kind.NULL?null:n}if(e===null)return{kind:Bi.Kind.NULL};if(e===void 0)return null;if((0,Ef.isListType)(t)){let n=t.ofType;if((0,o6.isIterableObject)(e)){let r=[];for(let i of e){let a=hf(i,n);a!=null&&r.push(a)}return{kind:Bi.Kind.LIST,values:r}}return hf(e,n)}if((0,Ef.isInputObjectType)(t)){if(!(0,u6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=hf(e[r.name],r.type);i&&n.push({kind:Bi.Kind.OBJECT_FIELD,name:{kind:Bi.Kind.NAME,value:r.name},value:i})}return{kind:Bi.Kind.OBJECT,fields:n}}if((0,Ef.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Bi.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return pw.test(r)?{kind:Bi.Kind.INT,value:r}:{kind:Bi.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,Ef.isEnumType)(t)?{kind:Bi.Kind.ENUM,value:n}:t===c6.GraphQLID&&pw.test(n)?{kind:Bi.Kind.INT,value:n}:{kind:Bi.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,fw.inspect)(n)}.`)}(0,s6.invariant)(!1,"Unexpected input type: "+(0,fw.inspect)(t))}var pw=/^-?(?:0|[1-9][0-9]*)$/});var ki=w(Xt=>{"use strict";m();T();N();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.introspectionTypes=Xt.__TypeKind=Xt.__Type=Xt.__Schema=Xt.__InputValue=Xt.__Field=Xt.__EnumValue=Xt.__DirectiveLocation=Xt.__Directive=Xt.TypeNameMetaFieldDef=Xt.TypeMetaFieldDef=Xt.TypeKind=Xt.SchemaMetaFieldDef=void 0;Xt.isIntrospectionType=E6;var l6=Wt(),d6=Ar(),sr=gl(),f6=Ti(),p6=yf(),Ue=Lt(),dn=Ga(),GI=new Ue.GraphQLObjectType({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:dn.GraphQLString,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ui,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ui,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(QI))),resolve:e=>e.getDirectives()}})});Xt.__Schema=GI;var QI=new Ue.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In 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 Ue.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new Ue.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(YI))),resolve:e=>e.locations},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=QI;var YI=new Ue.GraphQLEnumType({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:ar.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ar.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ar.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ar.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ar.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ar.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ar.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ar.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ar.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ar.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ar.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ar.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ar.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ar.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ar.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ar.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ar.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ar.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ar.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=YI;var Bi=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(zI),resolve(e){if((0,Ue.isScalarType)(e))return sr.SCALAR;if((0,Ue.isObjectType)(e))return sr.OBJECT;if((0,Ue.isInterfaceType)(e))return sr.INTERFACE;if((0,Ue.isUnionType)(e))return sr.UNION;if((0,Ue.isEnumType)(e))return sr.ENUM;if((0,Ue.isInputObjectType)(e))return sr.INPUT_OBJECT;if((0,Ue.isListType)(e))return sr.LIST;if((0,Ue.isNonNullType)(e))return sr.NON_NULL;(0,lz.invariant)(!1,`Unexpected type: "${(0,cz.inspect)(e)}".`)}},name:{type:ln.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:ln.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:ln.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(JI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Bi)),resolve(e){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Bi)),resolve(e,t,n,{schema:r}){if((0,Ue.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(HI)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(If)),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Bi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:ln.GraphQLBoolean,resolve:e=>{if((0,Ue.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=Bi;var JI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:ln.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new Ue.GraphQLNonNull(Bi),resolve:e=>e.type},isDeprecated:{type:new Ue.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=JI;var If=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},type:{type:new Ue.GraphQLNonNull(Bi),resolve:e=>e.type},defaultValue:{type:ln.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,fz.astFromValue)(n,t);return r?(0,dz.print)(r):null}},isDeprecated:{type:new Ue.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=If;var HI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(ln.GraphQLString),resolve:e=>e.name},description:{type:ln.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new Ue.GraphQLNonNull(ln.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:ln.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=HI;var sr;Xt.TypeKind=sr;(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"})(sr||(Xt.TypeKind=sr={}));var zI=new Ue.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:sr.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:sr.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:sr.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:sr.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:sr.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:sr.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:sr.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:sr.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=zI;var pz={name:"__schema",type:new Ue.GraphQLNonNull(GI),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};Xt.SchemaMetaFieldDef=pz;var mz={name:"__type",type:Bi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Ue.GraphQLNonNull(ln.GraphQLString),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};Xt.TypeMetaFieldDef=mz;var Nz={name:"__typename",type:new Ue.GraphQLNonNull(ln.GraphQLString),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};Xt.TypeNameMetaFieldDef=Nz;var mw=Object.freeze([GI,QI,YI,Bi,JI,If,HI,zI]);Xt.introspectionTypes=mw;function Tz(e){return mw.some(({name:t})=>e.name===t)}});var Nc=w(bl=>{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.GraphQLSchema=void 0;bl.assertSchema=gz;bl.isSchema=Tw;var FN=Vr(),XI=Wt(),Ez=tf(),hz=qa(),yz=cN(),WI=Va(),fa=Lt(),Nw=Xr(),Iz=Ui();function Tw(e){return(0,Ez.instanceOf)(e,wN)}function gz(e){if(!Tw(e))throw new Error(`Expected ${(0,XI.inspect)(e)} to be a GraphQL schema.`);return e}var wN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,hz.isObjectLike)(t)||(0,FN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,FN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,XI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,FN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,XI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,yz.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Nw.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),pa(a,i);this._queryType!=null&&pa(this._queryType,i),this._mutationType!=null&&pa(this._mutationType,i),this._subscriptionType!=null&&pa(this._subscriptionType,i);for(let a of this._directives)if((0,Nw.isDirective)(a))for(let o of a.args)pa(o.type,i);pa(Iz.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,FN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,fa.isInterfaceType)(a)){for(let u of a.getInterfaces())if((0,fa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,fa.isObjectType)(a)){for(let u of a.getInterfaces())if((0,fa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case WI.OperationTypeNode.QUERY:return this.getQueryType();case WI.OperationTypeNode.MUTATION:return this.getMutationType();case WI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,fa.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,fa.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}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:this.__validationErrors!==void 0}}};bl.GraphQLSchema=wN;function pa(e,t){let n=(0,fa.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,fa.isUnionType)(n))for(let r of n.getTypes())pa(r,t);else if((0,fa.isObjectType)(n)||(0,fa.isInterfaceType)(n)){for(let r of n.getInterfaces())pa(r,t);for(let r of Object.values(n.getFields())){pa(r.type,t);for(let i of r.args)pa(i.type,t)}}else if((0,fa.isInputObjectType)(n))for(let r of Object.values(n.getFields()))pa(r.type,t)}return t}});var _f=w(LN=>{"use strict";m();T();N();Object.defineProperty(LN,"__esModule",{value:!0});LN.assertValidSchema=Sz;LN.validateSchema=_w;var Pr=Wt(),_z=ze(),ZI=Va(),Ew=ff(),Bn=Lt(),gw=Xr(),vz=Ui(),Oz=Nc();function _w(e){if((0,Oz.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new tg(e);Dz(t),bz(t),Az(t);let n=t.getErrors();return e.__validationErrors=n,n}function Sz(e){let t=_w(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +In 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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(YI))),resolve:e=>e.locations},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Xt.__Directive=QI;var YI=new Ue.GraphQLEnumType({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:sr.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:sr.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:sr.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:sr.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:sr.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:sr.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:sr.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:sr.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:sr.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:sr.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:sr.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:sr.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:sr.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:sr.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:sr.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:sr.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:sr.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:sr.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:sr.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Xt.__DirectiveLocation=YI;var Ui=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(zI),resolve(e){if((0,Ue.isScalarType)(e))return or.SCALAR;if((0,Ue.isObjectType)(e))return or.OBJECT;if((0,Ue.isInterfaceType)(e))return or.INTERFACE;if((0,Ue.isUnionType)(e))return or.UNION;if((0,Ue.isEnumType)(e))return or.ENUM;if((0,Ue.isInputObjectType)(e))return or.INPUT_OBJECT;if((0,Ue.isListType)(e))return or.LIST;if((0,Ue.isNonNullType)(e))return or.NON_NULL;(0,d6.invariant)(!1,`Unexpected type: "${(0,l6.inspect)(e)}".`)}},name:{type:dn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:dn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:dn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(JI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui)),resolve(e){if((0,Ue.isObjectType)(e)||(0,Ue.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(Ui)),resolve(e,t,n,{schema:r}){if((0,Ue.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(HI)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isEnumType)(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Ue.GraphQLList(new Ue.GraphQLNonNull(If)),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if((0,Ue.isInputObjectType)(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ui,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:dn.GraphQLBoolean,resolve:e=>{if((0,Ue.isInputObjectType)(e))return e.isOneOf}}})});Xt.__Type=Ui;var JI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},args:{type:new Ue.GraphQLNonNull(new Ue.GraphQLList(new Ue.GraphQLNonNull(If))),args:{includeDeprecated:{type:dn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.type},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__Field=JI;var If=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},type:{type:new Ue.GraphQLNonNull(Ui),resolve:e=>e.type},defaultValue:{type:dn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,p6.astFromValue)(n,t);return r?(0,f6.print)(r):null}},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__InputValue=If;var HI=new Ue.GraphQLObjectType({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 Ue.GraphQLNonNull(dn.GraphQLString),resolve:e=>e.name},description:{type:dn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new Ue.GraphQLNonNull(dn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:dn.GraphQLString,resolve:e=>e.deprecationReason}})});Xt.__EnumValue=HI;var or;Xt.TypeKind=or;(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"})(or||(Xt.TypeKind=or={}));var zI=new Ue.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:or.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:or.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:or.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:or.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:or.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:or.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:or.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:or.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Xt.__TypeKind=zI;var m6={name:"__schema",type:new Ue.GraphQLNonNull(GI),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};Xt.SchemaMetaFieldDef=m6;var N6={name:"__type",type:Ui,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Ue.GraphQLNonNull(dn.GraphQLString),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};Xt.TypeMetaFieldDef=N6;var T6={name:"__typename",type:new Ue.GraphQLNonNull(dn.GraphQLString),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};Xt.TypeNameMetaFieldDef=T6;var mw=Object.freeze([GI,QI,YI,Ui,JI,If,HI,zI]);Xt.introspectionTypes=mw;function E6(e){return mw.some(({name:t})=>e.name===t)}});var Nc=w(bl=>{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.GraphQLSchema=void 0;bl.assertSchema=_6;bl.isSchema=Tw;var FN=Vr(),XI=Wt(),h6=tf(),y6=Va(),I6=cN(),WI=ja(),pa=Lt(),Nw=Xr(),g6=ki();function Tw(e){return(0,h6.instanceOf)(e,wN)}function _6(e){if(!Tw(e))throw new Error(`Expected ${(0,XI.inspect)(e)} to be a GraphQL schema.`);return e}var wN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,y6.isObjectLike)(t)||(0,FN.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,FN.devAssert)(!1,`"types" must be Array if provided but got: ${(0,XI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,FN.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,XI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,I6.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Nw.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ma(a,i);this._queryType!=null&&ma(this._queryType,i),this._mutationType!=null&&ma(this._mutationType,i),this._subscriptionType!=null&&ma(this._subscriptionType,i);for(let a of this._directives)if((0,Nw.isDirective)(a))for(let o of a.args)ma(o.type,i);ma(g6.__Schema,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let a of i){if(a==null)continue;let o=a.name;if(o||(0,FN.devAssert)(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=a,(0,pa.isInterfaceType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.interfaces.push(a)}}else if((0,pa.isObjectType)(a)){for(let u of a.getInterfaces())if((0,pa.isInterfaceType)(u)){let l=this._implementationsMap[u.name];l===void 0&&(l=this._implementationsMap[u.name]={objects:[],interfaces:[]}),l.objects.push(a)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case WI.OperationTypeNode.QUERY:return this.getQueryType();case WI.OperationTypeNode.MUTATION:return this.getMutationType();case WI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,pa.isUnionType)(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n!=null?n:{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),(0,pa.isUnionType)(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let a of i.objects)r[a.name]=!0;for(let a of i.interfaces)r[a.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}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:this.__validationErrors!==void 0}}};bl.GraphQLSchema=wN;function ma(e,t){let n=(0,pa.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,pa.isUnionType)(n))for(let r of n.getTypes())ma(r,t);else if((0,pa.isObjectType)(n)||(0,pa.isInterfaceType)(n)){for(let r of n.getInterfaces())ma(r,t);for(let r of Object.values(n.getFields())){ma(r.type,t);for(let i of r.args)ma(i.type,t)}}else if((0,pa.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ma(r.type,t)}return t}});var _f=w(LN=>{"use strict";m();T();N();Object.defineProperty(LN,"__esModule",{value:!0});LN.assertValidSchema=D6;LN.validateSchema=_w;var Pr=Wt(),v6=ze(),ZI=ja(),Ew=ff(),Bn=Lt(),gw=Xr(),O6=ki(),S6=Nc();function _w(e){if((0,S6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new tg(e);b6(t),A6(t),R6(t);let n=t.getErrors();return e.__validationErrors=n,n}function D6(e){let t=_w(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var tg=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _z.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function Dz(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Pr.inspect)(n)}.`,(r=eg(t,ZI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(i)}.`,(a=eg(t,ZI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(o)}.`,(u=eg(t,ZI.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function eg(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function bz(e){for(let n of e.schema.getDirectives()){if(!(0,gw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Pr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Tc(e,n);for(let r of n.args)if(Tc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Pr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[ng(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Tc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Az(e){let t=Bz(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Pr.inspect)(r)}.`,r.astNode);continue}(0,vz.isIntrospectionType)(r)||Tc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(hw(e,r),yw(e,r)):(0,Bn.isUnionType)(r)?Fz(e,r):(0,Bn.isEnumType)(r)?wz(e,r):(0,Bn.isInputObjectType)(r)&&(Lz(e,r),t(r))}}function hw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(Tc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Pr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(Tc(e,u),!(0,Bn.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Pr.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(u)&&u.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[ng(u.astNode),(a=u.astNode)===null||a===void 0?void 0:a.type])}}}}function yw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Pr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Pr.inspect)(r)}.`,gf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,gf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,gf(t,r));continue}n[r.name]=!0,Pz(e,t,r),Rz(e,t,r)}}function Rz(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,Ew.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Pr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Pr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,Ew.isEqualType)(E.type,v.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Pr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Pr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(u=v.astNode)===null||u===void 0?void 0:u.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function Pz(e,t,n){let r=t.getInterfaces();for(let 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}.`,[...gf(n,i),...gf(t,n)])}function Fz(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Iw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Pr.inspect)(i)}.`,Iw(t,String(i)))}}function wz(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)Tc(e,r)}function Lz(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(Tc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Pr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[ng(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&Cz(t,a,e)}}function Cz(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function Bz(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let u of o)if((0,Bn.isNonNullType)(u.type)&&(0,Bn.isInputObjectType)(u.type.ofType)){let l=u.type.ofType,d=r[l.name];if(n.push(u),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function gf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function Iw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function ng(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===gw.GraphQLDeprecatedDirective.name)}});var Ga=w(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.typeFromAST=ig;var rg=wt(),vw=Lt();function ig(e,t){switch(t.kind){case rg.Kind.LIST_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLList(n)}case rg.Kind.NON_NULL_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLNonNull(n)}case rg.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var CN=w(vf=>{"use strict";m();T();N();Object.defineProperty(vf,"__esModule",{value:!0});vf.TypeInfo=void 0;vf.visitWithTypeInfo=Mz;var Uz=Va(),Un=wt(),Ow=cc(),kn=Lt(),Al=Ui(),Sw=Ga(),sg=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:kz,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}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(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,Sw.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,Sw.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};vf.TypeInfo=sg;function kz(e,t,n){let r=n.name.value;if(r===Al.SchemaMetaFieldDef.name&&e.getQueryType()===t)return Al.SchemaMetaFieldDef;if(r===Al.TypeMetaFieldDef.name&&e.getQueryType()===t)return Al.TypeMetaFieldDef;if(r===Al.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return Al.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function Mz(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,Ow.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,Uz.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,Ow.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var Ec=w(ki=>{"use strict";m();T();N();Object.defineProperty(ki,"__esModule",{value:!0});ki.isConstValueNode=og;ki.isDefinitionNode=xz;ki.isExecutableDefinitionNode=Dw;ki.isSelectionNode=qz;ki.isTypeDefinitionNode=Rw;ki.isTypeExtensionNode=Fw;ki.isTypeNode=Vz;ki.isTypeSystemDefinitionNode=Aw;ki.isTypeSystemExtensionNode=Pw;ki.isValueNode=bw;var Ct=wt();function xz(e){return Dw(e)||Aw(e)||Pw(e)}function Dw(e){return e.kind===Ct.Kind.OPERATION_DEFINITION||e.kind===Ct.Kind.FRAGMENT_DEFINITION}function qz(e){return e.kind===Ct.Kind.FIELD||e.kind===Ct.Kind.FRAGMENT_SPREAD||e.kind===Ct.Kind.INLINE_FRAGMENT}function bw(e){return e.kind===Ct.Kind.VARIABLE||e.kind===Ct.Kind.INT||e.kind===Ct.Kind.FLOAT||e.kind===Ct.Kind.STRING||e.kind===Ct.Kind.BOOLEAN||e.kind===Ct.Kind.NULL||e.kind===Ct.Kind.ENUM||e.kind===Ct.Kind.LIST||e.kind===Ct.Kind.OBJECT}function og(e){return bw(e)&&(e.kind===Ct.Kind.LIST?e.values.some(og):e.kind===Ct.Kind.OBJECT?e.fields.some(t=>og(t.value)):e.kind!==Ct.Kind.VARIABLE)}function Vz(e){return e.kind===Ct.Kind.NAMED_TYPE||e.kind===Ct.Kind.LIST_TYPE||e.kind===Ct.Kind.NON_NULL_TYPE}function Aw(e){return e.kind===Ct.Kind.SCHEMA_DEFINITION||Rw(e)||e.kind===Ct.Kind.DIRECTIVE_DEFINITION}function Rw(e){return e.kind===Ct.Kind.SCALAR_TYPE_DEFINITION||e.kind===Ct.Kind.OBJECT_TYPE_DEFINITION||e.kind===Ct.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Ct.Kind.UNION_TYPE_DEFINITION||e.kind===Ct.Kind.ENUM_TYPE_DEFINITION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Pw(e){return e.kind===Ct.Kind.SCHEMA_EXTENSION||Fw(e)}function Fw(e){return e.kind===Ct.Kind.SCALAR_TYPE_EXTENSION||e.kind===Ct.Kind.OBJECT_TYPE_EXTENSION||e.kind===Ct.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Ct.Kind.UNION_TYPE_EXTENSION||e.kind===Ct.Kind.ENUM_TYPE_EXTENSION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var cg=w(ug=>{"use strict";m();T();N();Object.defineProperty(ug,"__esModule",{value:!0});ug.ExecutableDefinitionsRule=$z;var jz=ze(),ww=wt(),Kz=Ec();function $z(e){return{Document(t){for(let n of t.definitions)if(!(0,Kz.isExecutableDefinitionNode)(n)){let r=n.kind===ww.Kind.SCHEMA_DEFINITION||n.kind===ww.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new jz.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var dg=w(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.FieldsOnCorrectTypeRule=Jz;var Lw=mu(),Gz=sf(),Qz=Tu(),Yz=ze(),Of=Lt();function Jz(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,Lw.didYouMean)("to use an inline fragment on",Hz(i,n,a));o===""&&(o=(0,Lw.didYouMean)(zz(n,a))),e.reportError(new Yz.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function Hz(e,t,n){if(!(0,Of.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let u of o.getInterfaces()){var a;u.getFields()[n]&&(r.add(u),i[u.name]=((a=i[u.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,Of.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,Of.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,Gz.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function zz(e,t){if((0,Of.isObjectType)(e)||(0,Of.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Qz.suggestionList)(t,n)}return[]}});var pg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.FragmentsOnCompositeTypesRule=Wz;var Cw=ze(),Bw=Ni(),Uw=Lt(),kw=Ga();function Wz(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,kw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Uw.isCompositeType)(r)){let i=(0,Bw.print)(n);e.reportError(new Cw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,kw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Uw.isCompositeType)(n)){let r=(0,Bw.print)(t.typeCondition);e.reportError(new Cw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var mg=w(BN=>{"use strict";m();T();N();Object.defineProperty(BN,"__esModule",{value:!0});BN.KnownArgumentNamesOnDirectivesRule=Vw;BN.KnownArgumentNamesRule=eW;var Mw=mu(),xw=Tu(),qw=ze(),Xz=wt(),Zz=Xr();function eW(e){return $(k({},Vw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),u=(0,xw.suggestionList)(a,o);e.reportError(new qw.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,Mw.didYouMean)(u),{nodes:t}))}}})}function Vw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Zz.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(u=>u.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===Xz.Kind.DIRECTIVE_DEFINITION){var a;let u=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=u.map(l=>l.name.value)}return{Directive(o){let u=o.name.value,l=t[u];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,xw.suggestionList)(p,l);e.reportError(new qw.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,Mw.didYouMean)(E),{nodes:d}))}}return!1}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.KnownDirectivesRule=rW;var tW=Wt(),Ng=Ar(),jw=ze(),Tg=Va(),or=gl(),In=wt(),nW=Xr();function rW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():nW.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===In.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,u,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new jw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=iW(d);I&&!E.includes(I)&&e.reportError(new jw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function iW(e){let t=e[e.length-1];switch("kind"in t||(0,Ng.invariant)(!1),t.kind){case In.Kind.OPERATION_DEFINITION:return aW(t.operation);case In.Kind.FIELD:return or.DirectiveLocation.FIELD;case In.Kind.FRAGMENT_SPREAD:return or.DirectiveLocation.FRAGMENT_SPREAD;case In.Kind.INLINE_FRAGMENT:return or.DirectiveLocation.INLINE_FRAGMENT;case In.Kind.FRAGMENT_DEFINITION:return or.DirectiveLocation.FRAGMENT_DEFINITION;case In.Kind.VARIABLE_DEFINITION:return or.DirectiveLocation.VARIABLE_DEFINITION;case In.Kind.SCHEMA_DEFINITION:case In.Kind.SCHEMA_EXTENSION:return or.DirectiveLocation.SCHEMA;case In.Kind.SCALAR_TYPE_DEFINITION:case In.Kind.SCALAR_TYPE_EXTENSION:return or.DirectiveLocation.SCALAR;case In.Kind.OBJECT_TYPE_DEFINITION:case In.Kind.OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.OBJECT;case In.Kind.FIELD_DEFINITION:return or.DirectiveLocation.FIELD_DEFINITION;case In.Kind.INTERFACE_TYPE_DEFINITION:case In.Kind.INTERFACE_TYPE_EXTENSION:return or.DirectiveLocation.INTERFACE;case In.Kind.UNION_TYPE_DEFINITION:case In.Kind.UNION_TYPE_EXTENSION:return or.DirectiveLocation.UNION;case In.Kind.ENUM_TYPE_DEFINITION:case In.Kind.ENUM_TYPE_EXTENSION:return or.DirectiveLocation.ENUM;case In.Kind.ENUM_VALUE_DEFINITION:return or.DirectiveLocation.ENUM_VALUE;case In.Kind.INPUT_OBJECT_TYPE_DEFINITION:case In.Kind.INPUT_OBJECT_TYPE_EXTENSION:return or.DirectiveLocation.INPUT_OBJECT;case In.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,Ng.invariant)(!1),n.kind===In.Kind.INPUT_OBJECT_TYPE_DEFINITION?or.DirectiveLocation.INPUT_FIELD_DEFINITION:or.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,Ng.invariant)(!1,"Unexpected kind: "+(0,tW.inspect)(t.kind))}}function aW(e){switch(e){case Tg.OperationTypeNode.QUERY:return or.DirectiveLocation.QUERY;case Tg.OperationTypeNode.MUTATION:return or.DirectiveLocation.MUTATION;case Tg.OperationTypeNode.SUBSCRIPTION:return or.DirectiveLocation.SUBSCRIPTION}}});var Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.KnownFragmentNamesRule=oW;var sW=ze();function oW(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new sW.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var vg=w(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.KnownTypeNamesRule=pW;var uW=mu(),cW=Tu(),lW=ze(),gg=Ec(),dW=Ui(),fW=$a();function pW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,gg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,u,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:u,v=I!=null&&mW(I);if(v&&Kw.includes(p))return;let A=(0,cW.suggestionList)(p,v?Kw.concat(i):i);e.reportError(new lW.GraphQLError(`Unknown type "${p}".`+(0,uW.didYouMean)(A),{nodes:a}))}}}}var Kw=[...fW.specifiedScalarTypes,...dW.introspectionTypes].map(e=>e.name);function mW(e){return"kind"in e&&((0,gg.isTypeSystemDefinitionNode)(e)||(0,gg.isTypeSystemExtensionNode)(e))}});var Sg=w(Og=>{"use strict";m();T();N();Object.defineProperty(Og,"__esModule",{value:!0});Og.LoneAnonymousOperationRule=EW;var NW=ze(),TW=wt();function EW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===TW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new NW.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var bg=w(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.LoneSchemaDefinitionRule=hW;var $w=ze();function hW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(u){if(a){e.reportError(new $w.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new $w.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var Rg=w(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.MaxIntrospectionDepthRule=gW;var yW=ze(),Gw=wt(),IW=3;function gW(e){function t(n,r=Object.create(null),i=0){if(n.kind===Gw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===Gw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=IW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new yW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Fg=w(Pg=>{"use strict";m();T();N();Object.defineProperty(Pg,"__esModule",{value:!0});Pg.NoFragmentCyclesRule=vW;var _W=ze();function vW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let u=e.getFragmentSpreads(a.selectionSet);if(u.length!==0){r[o]=n.length;for(let l of u){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new _W.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var Lg=w(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.NoUndefinedVariablesRule=SW;var OW=ze();function SW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new OW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Bg=w(Cg=>{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.NoUnusedFragmentsRule=bW;var DW=ze();function bW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new DW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.NoUnusedVariablesRule=RW;var AW=ze();function RW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new AW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var qg=w(xg=>{"use strict";m();T();N();Object.defineProperty(xg,"__esModule",{value:!0});xg.sortValueNode=Mg;var PW=sf(),As=wt();function Mg(e){switch(e.kind){case As.Kind.OBJECT:return $(k({},e),{fields:FW(e.fields)});case As.Kind.LIST:return $(k({},e),{values:e.values.map(Mg)});case As.Kind.INT:case As.Kind.FLOAT:case As.Kind.STRING:case As.Kind.BOOLEAN:case As.Kind.NULL:case As.Kind.ENUM:case As.Kind.VARIABLE:return e}}function FW(e){return e.map(t=>$(k({},t),{value:Mg(t.value)})).sort((t,n)=>(0,PW.naturalCompare)(t.name.value,n.name.value))}});var Yg=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.OverlappingFieldsCanBeMergedRule=BW;var Qw=Wt(),wW=ze(),Vg=wt(),LW=Ni(),Zr=Lt(),CW=qg(),Jw=Ga();function Hw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Hw(n)).join(" and "):e}function BW(e){let t=new $g,n=new Map;return{SelectionSet(r){let i=UW(e,n,t,e.getParentType(),r);for(let[[a,o],u,l]of i){let d=Hw(o);e.reportError(new wW.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function UW(e,t,n,r,i){let a=[],[o,u]=MN(e,t,r,i);if(MW(e,a,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[a.value,o]));return n.every(a=>{let o=a.value,u=i.get(a.name.value);return u===void 0?!1:Yw(o)===Yw(u)})}function Yw(e){return(0,LW.print)((0,CW.sortValueNode)(e))}function jg(e,t){return(0,Zr.isListType)(e)?(0,Zr.isListType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isListType)(t)?!0:(0,Zr.isNonNullType)(e)?(0,Zr.isNonNullType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isNonNullType)(t)?!0:(0,Zr.isLeafType)(e)||(0,Zr.isLeafType)(t)?e!==t:!1}function MN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);Ww(e,n,r,a,o);let u=[a,Object.keys(o)];return t.set(r,u),u}function Kg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,Jw.typeFromAST)(e.getSchema(),n.typeCondition);return MN(e,t,i,n.selectionSet)}function Ww(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Vg.Kind.FIELD:{let o=a.name.value,u;((0,Zr.isObjectType)(t)||(0,Zr.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,u]);break}case Vg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Vg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,u=o?(0,Jw.typeFromAST)(e.getSchema(),o):t;Ww(e,u,a.selectionSet,r,i);break}}}function qW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var $g=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.PossibleFragmentSpreadsRule=jW;var xN=Wt(),Xw=ze(),Jg=Lt(),Zw=ff(),VW=Ga();function jW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Jg.isCompositeType)(n)&&(0,Jg.isCompositeType)(r)&&!(0,Zw.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,xN.inspect)(r),a=(0,xN.inspect)(n);e.reportError(new Xw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=KW(e,n),i=e.getParentType();if(r&&i&&!(0,Zw.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,xN.inspect)(i),o=(0,xN.inspect)(r);e.reportError(new Xw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function KW(e,t){let n=e.getFragment(t);if(n){let r=(0,VW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Jg.isCompositeType)(r))return r}}});var Xg=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.PossibleTypeExtensionsRule=YW;var $W=mu(),tL=Wt(),nL=Ar(),GW=Tu(),eL=ze(),On=wt(),QW=Ec(),Rl=Lt();function YW(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,QW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],u=t==null?void 0:t.getType(a),l;if(o?l=JW[o.kind]:u&&(l=HW(u)),l){if(l!==i.kind){let d=zW(i.kind);e.reportError(new eL.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,GW.suggestionList)(a,d);e.reportError(new eL.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,$W.didYouMean)(p),{nodes:i.name}))}}}var JW={[On.Kind.SCALAR_TYPE_DEFINITION]:On.Kind.SCALAR_TYPE_EXTENSION,[On.Kind.OBJECT_TYPE_DEFINITION]:On.Kind.OBJECT_TYPE_EXTENSION,[On.Kind.INTERFACE_TYPE_DEFINITION]:On.Kind.INTERFACE_TYPE_EXTENSION,[On.Kind.UNION_TYPE_DEFINITION]:On.Kind.UNION_TYPE_EXTENSION,[On.Kind.ENUM_TYPE_DEFINITION]:On.Kind.ENUM_TYPE_EXTENSION,[On.Kind.INPUT_OBJECT_TYPE_DEFINITION]:On.Kind.INPUT_OBJECT_TYPE_EXTENSION};function HW(e){if((0,Rl.isScalarType)(e))return On.Kind.SCALAR_TYPE_EXTENSION;if((0,Rl.isObjectType)(e))return On.Kind.OBJECT_TYPE_EXTENSION;if((0,Rl.isInterfaceType)(e))return On.Kind.INTERFACE_TYPE_EXTENSION;if((0,Rl.isUnionType)(e))return On.Kind.UNION_TYPE_EXTENSION;if((0,Rl.isEnumType)(e))return On.Kind.ENUM_TYPE_EXTENSION;if((0,Rl.isInputObjectType)(e))return On.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,nL.invariant)(!1,"Unexpected type: "+(0,tL.inspect)(e))}function zW(e){switch(e){case On.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case On.Kind.OBJECT_TYPE_EXTENSION:return"object";case On.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case On.Kind.UNION_TYPE_EXTENSION:return"union";case On.Kind.ENUM_TYPE_EXTENSION:return"enum";case On.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,nL.invariant)(!1,"Unexpected kind: "+(0,tL.inspect)(e))}}});var e_=w(qN=>{"use strict";m();T();N();Object.defineProperty(qN,"__esModule",{value:!0});qN.ProvidedRequiredArgumentsOnDirectivesRule=oL;qN.ProvidedRequiredArgumentsRule=ZW;var iL=Wt(),rL=Nu(),aL=ze(),sL=wt(),WW=Ni(),Zg=Lt(),XW=Xr();function ZW(e){return $(k({},oL(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Zg.isRequiredArgument)(a)){let o=(0,iL.inspect)(a.type);e.reportError(new aL.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function oL(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:XW.specifiedDirectives;for(let u of i)n[u.name]=(0,rL.keyMap)(u.args.filter(Zg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let u of a)if(u.kind===sL.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,rL.keyMap)(l.filter(e4),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let E=(p=u.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Zg.isType)(A.type)?(0,iL.inspect)(A.type):(0,WW.print)(A.type);e.reportError(new aL.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:u}))}}}}}}function e4(e){return e.type.kind===sL.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var n_=w(t_=>{"use strict";m();T();N();Object.defineProperty(t_,"__esModule",{value:!0});t_.ScalarLeafsRule=t4;var uL=Wt(),cL=ze(),lL=Lt();function t4(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,lL.isLeafType)((0,lL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var i_=w(r_=>{"use strict";m();T();N();Object.defineProperty(r_,"__esModule",{value:!0});r_.printPathArray=n4;function n4(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Sf=w(VN=>{"use strict";m();T();N();Object.defineProperty(VN,"__esModule",{value:!0});VN.addPath=r4;VN.pathToArray=i4;function r4(e,t,n){return{prev:e,key:t,typename:n}}function i4(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.coerceInputValue=d4;var a4=mu(),jN=Wt(),s4=Ar(),o4=PN(),u4=qa(),ma=Sf(),c4=i_(),l4=Tu(),Rs=ze(),Df=Lt();function d4(e,t,n=f4){return bf(e,t,n,void 0)}function f4(e,t,n){let r="Invalid value "+(0,jN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,c4.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function bf(e,t,n,r){if((0,Df.isNonNullType)(t)){if(e!=null)return bf(e,t.ofType,n,r);n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Expected non-nullable type "${(0,jN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Df.isListType)(t)){let i=t.ofType;return(0,o4.isIterableObject)(e)?Array.from(e,(a,o)=>{let u=(0,ma.addPath)(r,o,void 0);return bf(a,i,n,u)}):[bf(e,i,n,r)]}if((0,Df.isInputObjectType)(t)){if(!(0,u4.isObjectLike)(e)){n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Df.isNonNullType)(o.type)){let l=(0,jN.inspect)(o.type);n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=bf(u,o.type,n,(0,ma.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let u=(0,l4.suggestionList)(o,Object.keys(t.getFields()));n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,a4.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,ma.pathToArray)(r).concat(u),l,new Rs.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Df.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Rs.GraphQLError?n((0,ma.pathToArray)(r),e,a):n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,ma.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}".`)),i}(0,s4.invariant)(!1,"Unexpected input type: "+(0,jN.inspect)(t))}});var Rf=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.valueFromAST=Af;var p4=Wt(),m4=Ar(),N4=Nu(),Pl=wt(),hc=Lt();function Af(e,t,n){if(e){if(e.kind===Pl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,hc.isNonNullType)(t)?void 0:i}if((0,hc.isNonNullType)(t))return e.kind===Pl.Kind.NULL?void 0:Af(e,t.ofType,n);if(e.kind===Pl.Kind.NULL)return null;if((0,hc.isListType)(t)){let r=t.ofType;if(e.kind===Pl.Kind.LIST){let a=[];for(let o of e.values)if(dL(o,n)){if((0,hc.isNonNullType)(r))return;a.push(null)}else{let u=Af(o,r,n);if(u===void 0)return;a.push(u)}return a}let i=Af(e,r,n);return i===void 0?void 0:[i]}if((0,hc.isInputObjectType)(t)){if(e.kind!==Pl.Kind.OBJECT)return;let r=Object.create(null),i=(0,N4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||dL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,hc.isNonNullType)(a.type))return;continue}let u=Af(o.value,a.type,n);if(u===void 0)return;r[a.name]=u}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,hc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,m4.invariant)(!1,"Unexpected input type: "+(0,p4.inspect)(t))}}function dL(e,t){return e.kind===Pl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Ll=w(Pf=>{"use strict";m();T();N();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getArgumentValues=NL;Pf.getDirectiveValues=_4;Pf.getVariableValues=I4;var Fl=Wt(),T4=Nu(),E4=i_(),Ps=ze(),fL=wt(),pL=Ni(),wl=Lt(),h4=s_(),y4=Ga(),mL=Rf();function I4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=g4(e,t,n,u=>{if(a!=null&&i.length>=a)throw new Ps.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(u)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function g4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,u=(0,y4.typeFromAST)(e,a.type);if(!(0,wl.isInputType)(u)){let d=(0,pL.print)(a.type);r(new Ps.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!TL(n,o)){if(a.defaultValue)i[o]=(0,mL.valueFromAST)(a.defaultValue,u);else if((0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,h4.coerceInputValue)(l,u,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,Fl.inspect)(p);d.length>0&&(I+=` at "${o}${(0,E4.printPathArray)(d)}"`),r(new Ps.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function NL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,T4.keyMap)(a,u=>u.name.value);for(let u of e.args){let l=u.name,d=u.type,p=o[l];if(!p){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===fL.Kind.NULL;if(E.kind===fL.Kind.VARIABLE){let A=E.name.value;if(n==null||!TL(n,A)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of non-null type "${(0,Fl.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,mL.valueFromAST)(E,d,n);if(v===void 0)throw new Ps.GraphQLError(`Argument "${l}" has invalid value ${(0,pL.print)(E)}.`,{nodes:E});i[l]=v}return i}function _4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return NL(e,i,n)}function TL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var GN=w($N=>{"use strict";m();T();N();Object.defineProperty($N,"__esModule",{value:!0});$N.collectFields=S4;$N.collectSubfields=D4;var u_=wt(),v4=Lt(),EL=Xr(),O4=Ga(),hL=Ll();function S4(e,t,n,r,i){let a=new Map;return KN(e,t,n,r,i,a,new Set),a}function D4(e,t,n,r,i){let a=new Map,o=new Set;for(let u of i)u.selectionSet&&KN(e,t,n,r,u.selectionSet,a,o);return a}function KN(e,t,n,r,i,a,o){for(let u of i.selections)switch(u.kind){case u_.Kind.FIELD:{if(!c_(n,u))continue;let l=b4(u),d=a.get(l);d!==void 0?d.push(u):a.set(l,[u]);break}case u_.Kind.INLINE_FRAGMENT:{if(!c_(n,u)||!yL(e,u,r))continue;KN(e,t,n,r,u.selectionSet,a,o);break}case u_.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!c_(n,u))continue;o.add(l);let d=t[l];if(!d||!yL(e,d,r))continue;KN(e,t,n,r,d.selectionSet,a,o);break}}}function c_(e,t){let n=(0,hL.getDirectiveValues)(EL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,hL.getDirectiveValues)(EL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function yL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,O4.typeFromAST)(e,r);return i===n?!0:(0,v4.isAbstractType)(i)?e.isSubType(i,n):!1}function b4(e){return e.alias?e.alias.value:e.name.value}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.SingleFieldSubscriptionsRule=P4;var IL=ze(),A4=wt(),R4=GN();function P4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===A4.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,R4.collectFields)(n,u,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var QN=w(f_=>{"use strict";m();T();N();Object.defineProperty(f_,"__esModule",{value:!0});f_.groupBy=F4;function F4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var m_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueArgumentDefinitionNamesRule=C4;var w4=QN(),L4=ze();function C4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var u;let d=l.name.value,p=(u=l.arguments)!==null&&u!==void 0?u:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,w4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new L4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var T_=w(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.UniqueArgumentNamesRule=k4;var B4=QN(),U4=ze();function k4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,B4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new U4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var h_=w(E_=>{"use strict";m();T();N();Object.defineProperty(E_,"__esModule",{value:!0});E_.UniqueDirectiveNamesRule=M4;var gL=ze();function M4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new gL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new gL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueDirectivesPerLocationRule=V4;var x4=ze(),y_=wt(),_L=Ec(),q4=Xr();function V4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():q4.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===y_.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===y_.Kind.SCHEMA_DEFINITION||u.kind===y_.Kind.SCHEMA_EXTENSION)l=a;else if((0,_L.isTypeDefinitionNode)(u)||(0,_L.isTypeExtensionNode)(u)){let d=u.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of u.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new x4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueEnumValueNamesRule=K4;var vL=ze(),j4=Lt();function K4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value,I=n[u];(0,j4.isEnumType)(I)&&I.getValue(E)?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var D_=w(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.UniqueFieldDefinitionNamesRule=$4;var OL=ze(),O_=Lt();function $4(e){let 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(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value;G4(n[u],E)?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function G4(e,t){return(0,O_.isObjectType)(e)||(0,O_.isInterfaceType)(e)||(0,O_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.UniqueFragmentNamesRule=Y4;var Q4=ze();function Y4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Q4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.UniqueInputFieldNamesRule=z4;var J4=Ar(),H4=ze();function z4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,J4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new H4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var w_=w(F_=>{"use strict";m();T();N();Object.defineProperty(F_,"__esModule",{value:!0});F_.UniqueOperationNamesRule=X4;var W4=ze();function X4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new W4.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C_=w(L_=>{"use strict";m();T();N();Object.defineProperty(L_,"__esModule",{value:!0});L_.UniqueOperationTypesRule=Z4;var SL=ze();function Z4(e){let 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(a){var o;let u=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new SL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new SL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var U_=w(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.UniqueTypeNamesRule=e8;var DL=ze();function e8(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new DL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new DL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var M_=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.UniqueVariableNamesRule=r8;var t8=QN(),n8=ze();function r8(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,t8.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new n8.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var V_=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.ValuesOfCorrectTypeRule=o8;var i8=mu(),Ff=Wt(),a8=Nu(),s8=Tu(),Ya=ze(),x_=wt(),YN=Ni(),Qa=Lt();function o8(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Qa.getNullableType)(e.getParentInputType());if(!(0,Qa.isListType)(r))return yc(e,n),!1},ObjectValue(n){let r=(0,Qa.getNamedType)(e.getInputType());if(!(0,Qa.isInputObjectType)(r))return yc(e,n),!1;let i=(0,a8.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Qa.isRequiredInputField)(a)){let u=(0,Ff.inspect)(a.type);e.reportError(new Ya.GraphQLError(`Field "${r.name}.${a.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&u8(e,n,r,i,t)},ObjectField(n){let r=(0,Qa.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Qa.isInputObjectType)(r)){let a=(0,s8.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new Ya.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,i8.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Qa.isNonNullType)(r)&&e.reportError(new Ya.GraphQLError(`Expected value of type "${(0,Ff.inspect)(r)}", found ${(0,YN.print)(n)}.`,{nodes:n}))},EnumValue:n=>yc(e,n),IntValue:n=>yc(e,n),FloatValue:n=>yc(e,n),StringValue:n=>yc(e,n),BooleanValue:n=>yc(e,n)}}function yc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Qa.getNamedType)(n);if(!(0,Qa.isLeafType)(r)){let i=(0,Ff.inspect)(n);e.reportError(new Ya.GraphQLError(`Expected value of type "${i}", found ${(0,YN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,Ff.inspect)(n);e.reportError(new Ya.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,Ff.inspect)(n);i instanceof Ya.GraphQLError?e.reportError(i):e.reportError(new Ya.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function u8(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new Ya.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===x_.Kind.NULL,p=(l==null?void 0:l.kind)===x_.Kind.VARIABLE;if(d){e.reportError(new Ya.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==x_.Kind.NON_NULL_TYPE&&e.reportError(new Ya.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var K_=w(j_=>{"use strict";m();T();N();Object.defineProperty(j_,"__esModule",{value:!0});j_.VariablesAreInputTypesRule=p8;var c8=ze(),l8=Ni(),d8=Lt(),f8=Ga();function p8(e){return{VariableDefinition(t){let n=(0,f8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,d8.isInputType)(n)){let r=t.variable.name.value,i=(0,l8.print)(t.type);e.reportError(new c8.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var G_=w($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.VariablesInAllowedPositionRule=E8;var bL=Wt(),m8=ze(),N8=wt(),AL=Lt(),RL=ff(),T8=Ga();function E8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&a){let d=e.getSchema(),p=(0,T8.typeFromAST)(d,l.type);if(p&&!h8(d,p,l.defaultValue,a,o)){let E=(0,bL.inspect)(p),I=(0,bL.inspect)(a);e.reportError(new m8.GraphQLError(`Variable "$${u}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function h8(e,t,n,r,i){if((0,AL.isNonNullType)(r)&&!(0,AL.isNonNullType)(t)){if(!(n!=null&&n.kind!==N8.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,RL.isTypeSubTypeOf)(e,t,u)}return(0,RL.isTypeSubTypeOf)(e,t,r)}});var Q_=w(Iu=>{"use strict";m();T();N();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.specifiedSDLRules=Iu.specifiedRules=Iu.recommendedRules=void 0;var y8=cg(),I8=dg(),g8=pg(),PL=mg(),FL=hg(),_8=Ig(),wL=vg(),v8=Sg(),O8=bg(),S8=Rg(),D8=Fg(),b8=Lg(),A8=Bg(),R8=kg(),P8=Yg(),F8=zg(),w8=Xg(),LL=e_(),L8=n_(),C8=d_(),B8=m_(),CL=T_(),U8=h_(),BL=g_(),k8=v_(),M8=D_(),x8=A_(),UL=P_(),q8=w_(),V8=C_(),j8=U_(),K8=M_(),$8=V_(),G8=K_(),Q8=G_(),kL=Object.freeze([S8.MaxIntrospectionDepthRule]);Iu.recommendedRules=kL;var Y8=Object.freeze([y8.ExecutableDefinitionsRule,q8.UniqueOperationNamesRule,v8.LoneAnonymousOperationRule,C8.SingleFieldSubscriptionsRule,wL.KnownTypeNamesRule,g8.FragmentsOnCompositeTypesRule,G8.VariablesAreInputTypesRule,L8.ScalarLeafsRule,I8.FieldsOnCorrectTypeRule,x8.UniqueFragmentNamesRule,_8.KnownFragmentNamesRule,A8.NoUnusedFragmentsRule,F8.PossibleFragmentSpreadsRule,D8.NoFragmentCyclesRule,K8.UniqueVariableNamesRule,b8.NoUndefinedVariablesRule,R8.NoUnusedVariablesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,PL.KnownArgumentNamesRule,CL.UniqueArgumentNamesRule,$8.ValuesOfCorrectTypeRule,LL.ProvidedRequiredArgumentsRule,Q8.VariablesInAllowedPositionRule,P8.OverlappingFieldsCanBeMergedRule,UL.UniqueInputFieldNamesRule,...kL]);Iu.specifiedRules=Y8;var J8=Object.freeze([O8.LoneSchemaDefinitionRule,V8.UniqueOperationTypesRule,j8.UniqueTypeNamesRule,k8.UniqueEnumValueNamesRule,M8.UniqueFieldDefinitionNamesRule,B8.UniqueArgumentDefinitionNamesRule,U8.UniqueDirectiveNamesRule,wL.KnownTypeNamesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,w8.PossibleTypeExtensionsRule,PL.KnownArgumentNamesOnDirectivesRule,CL.UniqueArgumentNamesRule,UL.UniqueInputFieldNamesRule,LL.ProvidedRequiredArgumentsOnDirectivesRule]);Iu.specifiedSDLRules=J8});var H_=w(gu=>{"use strict";m();T();N();Object.defineProperty(gu,"__esModule",{value:!0});gu.ValidationContext=gu.SDLValidationContext=gu.ASTValidationContext=void 0;var ML=wt(),H8=cc(),xL=CN(),wf=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===ML.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===ML.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let u=o.name.value;if(r[u]!==!0){r[u]=!0;let l=this.getFragment(u);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};gu.ASTValidationContext=wf;var Y_=class extends wf{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gu.SDLValidationContext=Y_;var J_=class extends wf{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new xL.TypeInfo(this._schema);(0,H8.visit)(t,(0,xL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}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()}};gu.ValidationContext=J_});var Bl=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.assertValidSDL=eX;Cl.assertValidSDLExtension=tX;Cl.validate=Z8;Cl.validateSDL=z_;var z8=Vr(),W8=ze(),JN=cc(),X8=_f(),qL=CN(),VL=Q_(),jL=H_();function Z8(e,t,n=VL.specifiedRules,r,i=new qL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,z8.devAssert)(!1,"Must provide document."),(0,X8.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new jL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new W8.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(E)}),p=(0,JN.visitInParallel)(n.map(E=>E(d)));try{(0,JN.visit)(t,(0,qL.visitWithTypeInfo)(i,p))}catch(E){if(E!==u)throw E}return l}function z_(e,t,n=VL.specifiedSDLRules){let r=[],i=new jL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,JN.visit)(e,(0,JN.visitInParallel)(a)),r}function eX(e){let t=z_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var tg=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new v6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function b6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Bn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,Pr.inspect)(n)}.`,(r=eg(t,ZI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Bn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(i)}.`,(a=eg(t,ZI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Bn.isObjectType)(o)){var u;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,Pr.inspect)(o)}.`,(u=eg(t,ZI.OperationTypeNode.SUBSCRIPTION))!==null&&u!==void 0?u:o.astNode)}}function eg(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function A6(e){for(let n of e.schema.getDirectives()){if(!(0,gw.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,Pr.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Tc(e,n);for(let r of n.args)if(Tc(e,r),(0,Bn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,Pr.inspect)(r.type)}.`,r.astNode),(0,Bn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[ng(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Tc(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function R6(e){let t=U6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Bn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,Pr.inspect)(r)}.`,r.astNode);continue}(0,O6.isIntrospectionType)(r)||Tc(e,r),(0,Bn.isObjectType)(r)||(0,Bn.isInterfaceType)(r)?(hw(e,r),yw(e,r)):(0,Bn.isUnionType)(r)?w6(e,r):(0,Bn.isEnumType)(r)?L6(e,r):(0,Bn.isInputObjectType)(r)&&(C6(e,r),t(r))}}function hw(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(Tc(e,o),!(0,Bn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,Pr.inspect)(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let u of o.args){let l=u.name;if(Tc(e,u),!(0,Bn.isInputType)(u.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,Pr.inspect)(u.type)}.`,(i=u.astNode)===null||i===void 0?void 0:i.type)}if((0,Bn.isRequiredArgument)(u)&&u.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[ng(u.astNode),(a=u.astNode)===null||a===void 0?void 0:a.type])}}}}function yw(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Bn.isInterfaceType)(r)){e.reportError(`Type ${(0,Pr.inspect)(t)} must only implement Interface types, it cannot implement ${(0,Pr.inspect)(r)}.`,gf(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,gf(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,gf(t,r));continue}n[r.name]=!0,F6(e,t,r),P6(e,t,r)}}function P6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,p=r[d];if(!p){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,Ew.isTypeSubTypeOf)(e.schema,p.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,Pr.inspect)(l.type)} but ${t.name}.${d} is type ${(0,Pr.inspect)(p.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=p.astNode)===null||a===void 0?void 0:a.type])}for(let E of l.args){let I=E.name,v=p.args.find(A=>A.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[E.astNode,p.astNode]);continue}if(!(0,Ew.isEqualType)(E.type,v.type)){var o,u;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,Pr.inspect)(E.type)} but ${t.name}.${d}(${I}:) is type ${(0,Pr.inspect)(v.type)}.`,[(o=E.astNode)===null||o===void 0?void 0:o.type,(u=v.astNode)===null||u===void 0?void 0:u.type])}}for(let E of p.args){let I=E.name;!l.args.find(A=>A.name===I)&&(0,Bn.isRequiredArgument)(E)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[E.astNode,l.astNode])}}}function F6(e,t,n){let r=t.getInterfaces();for(let 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}.`,[...gf(n,i),...gf(t,n)])}function w6(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Iw(t,i.name));continue}r[i.name]=!0,(0,Bn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,Pr.inspect)(i)}.`,Iw(t,String(i)))}}function L6(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)Tc(e,r)}function C6(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let a of n){if(Tc(e,a),!(0,Bn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,Pr.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Bn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[ng(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&B6(t,a,e)}}function B6(e,t,n){if((0,Bn.isNonNullType)(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function U6(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(a){if(t[a.name])return;t[a.name]=!0,r[a.name]=n.length;let o=Object.values(a.getFields());for(let u of o)if((0,Bn.isNonNullType)(u.type)&&(0,Bn.isInputObjectType)(u.type.ofType)){let l=u.type.ofType,d=r[l.name];if(n.push(u),d===void 0)i(l);else{let p=n.slice(d),E=p.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${E}".`,p.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function gf(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.interfaces)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t.name)}function Iw(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(a=>{var o;return(o=a.types)!==null&&o!==void 0?o:[]}).filter(a=>a.name.value===t)}function ng(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===gw.GraphQLDeprecatedDirective.name)}});var Qa=w(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.typeFromAST=ig;var rg=wt(),vw=Lt();function ig(e,t){switch(t.kind){case rg.Kind.LIST_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLList(n)}case rg.Kind.NON_NULL_TYPE:{let n=ig(e,t.type);return n&&new vw.GraphQLNonNull(n)}case rg.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var CN=w(vf=>{"use strict";m();T();N();Object.defineProperty(vf,"__esModule",{value:!0});vf.TypeInfo=void 0;vf.visitWithTypeInfo=x6;var k6=ja(),Un=wt(),Ow=cc(),kn=Lt(),Al=ki(),Sw=Qa(),sg=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r!=null?r:M6,n&&((0,kn.isInputType)(n)&&this._inputTypeStack.push(n),(0,kn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,kn.isOutputType)(n)&&this._typeStack.push(n))}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(t){let n=this._schema;switch(t.kind){case Un.Kind.SELECTION_SET:{let i=(0,kn.getNamedType)(this.getType());this._parentTypeStack.push((0,kn.isCompositeType)(i)?i:void 0);break}case Un.Kind.FIELD:{let i=this.getParentType(),a,o;i&&(a=this._getFieldDef(n,i,t),a&&(o=a.type)),this._fieldDefStack.push(a),this._typeStack.push((0,kn.isOutputType)(o)?o:void 0);break}case Un.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Un.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,kn.isObjectType)(i)?i:void 0);break}case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,Sw.typeFromAST)(n,i):(0,kn.getNamedType)(this.getType());this._typeStack.push((0,kn.isOutputType)(a)?a:void 0);break}case Un.Kind.VARIABLE_DEFINITION:{let i=(0,Sw.typeFromAST)(n,t.type);this._inputTypeStack.push((0,kn.isInputType)(i)?i:void 0);break}case Un.Kind.ARGUMENT:{var r;let i,a,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(u=>u.name===t.name.value),i&&(a=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.LIST:{let i=(0,kn.getNullableType)(this.getInputType()),a=(0,kn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.OBJECT_FIELD:{let i=(0,kn.getNamedType)(this.getInputType()),a,o;(0,kn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,kn.isInputType)(a)?a:void 0);break}case Un.Kind.ENUM:{let i=(0,kn.getNamedType)(this.getInputType()),a;(0,kn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Un.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Un.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Un.Kind.DIRECTIVE:this._directive=null;break;case Un.Kind.OPERATION_DEFINITION:case Un.Kind.INLINE_FRAGMENT:case Un.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Un.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Un.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.LIST:case Un.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Un.Kind.ENUM:this._enumValue=null;break;default:}}};vf.TypeInfo=sg;function M6(e,t,n){let r=n.name.value;if(r===Al.SchemaMetaFieldDef.name&&e.getQueryType()===t)return Al.SchemaMetaFieldDef;if(r===Al.TypeMetaFieldDef.name&&e.getQueryType()===t)return Al.TypeMetaFieldDef;if(r===Al.TypeNameMetaFieldDef.name&&(0,kn.isCompositeType)(t))return Al.TypeNameMetaFieldDef;if((0,kn.isObjectType)(t)||(0,kn.isInterfaceType)(t))return t.getFields()[r]}function x6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,Ow.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,k6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,Ow.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var Ec=w(Mi=>{"use strict";m();T();N();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.isConstValueNode=og;Mi.isDefinitionNode=q6;Mi.isExecutableDefinitionNode=Dw;Mi.isSelectionNode=V6;Mi.isTypeDefinitionNode=Rw;Mi.isTypeExtensionNode=Fw;Mi.isTypeNode=j6;Mi.isTypeSystemDefinitionNode=Aw;Mi.isTypeSystemExtensionNode=Pw;Mi.isValueNode=bw;var Ct=wt();function q6(e){return Dw(e)||Aw(e)||Pw(e)}function Dw(e){return e.kind===Ct.Kind.OPERATION_DEFINITION||e.kind===Ct.Kind.FRAGMENT_DEFINITION}function V6(e){return e.kind===Ct.Kind.FIELD||e.kind===Ct.Kind.FRAGMENT_SPREAD||e.kind===Ct.Kind.INLINE_FRAGMENT}function bw(e){return e.kind===Ct.Kind.VARIABLE||e.kind===Ct.Kind.INT||e.kind===Ct.Kind.FLOAT||e.kind===Ct.Kind.STRING||e.kind===Ct.Kind.BOOLEAN||e.kind===Ct.Kind.NULL||e.kind===Ct.Kind.ENUM||e.kind===Ct.Kind.LIST||e.kind===Ct.Kind.OBJECT}function og(e){return bw(e)&&(e.kind===Ct.Kind.LIST?e.values.some(og):e.kind===Ct.Kind.OBJECT?e.fields.some(t=>og(t.value)):e.kind!==Ct.Kind.VARIABLE)}function j6(e){return e.kind===Ct.Kind.NAMED_TYPE||e.kind===Ct.Kind.LIST_TYPE||e.kind===Ct.Kind.NON_NULL_TYPE}function Aw(e){return e.kind===Ct.Kind.SCHEMA_DEFINITION||Rw(e)||e.kind===Ct.Kind.DIRECTIVE_DEFINITION}function Rw(e){return e.kind===Ct.Kind.SCALAR_TYPE_DEFINITION||e.kind===Ct.Kind.OBJECT_TYPE_DEFINITION||e.kind===Ct.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Ct.Kind.UNION_TYPE_DEFINITION||e.kind===Ct.Kind.ENUM_TYPE_DEFINITION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_DEFINITION}function Pw(e){return e.kind===Ct.Kind.SCHEMA_EXTENSION||Fw(e)}function Fw(e){return e.kind===Ct.Kind.SCALAR_TYPE_EXTENSION||e.kind===Ct.Kind.OBJECT_TYPE_EXTENSION||e.kind===Ct.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Ct.Kind.UNION_TYPE_EXTENSION||e.kind===Ct.Kind.ENUM_TYPE_EXTENSION||e.kind===Ct.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var cg=w(ug=>{"use strict";m();T();N();Object.defineProperty(ug,"__esModule",{value:!0});ug.ExecutableDefinitionsRule=G6;var K6=ze(),ww=wt(),$6=Ec();function G6(e){return{Document(t){for(let n of t.definitions)if(!(0,$6.isExecutableDefinitionNode)(n)){let r=n.kind===ww.Kind.SCHEMA_DEFINITION||n.kind===ww.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new K6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var dg=w(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.FieldsOnCorrectTypeRule=H6;var Lw=mu(),Q6=sf(),Y6=Tu(),J6=ze(),Of=Lt();function H6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,Lw.didYouMean)("to use an inline fragment on",z6(i,n,a));o===""&&(o=(0,Lw.didYouMean)(W6(n,a))),e.reportError(new J6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function z6(e,t,n){if(!(0,Of.isAbstractType)(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let u of o.getInterfaces()){var a;u.getFields()[n]&&(r.add(u),i[u.name]=((a=i[u.name])!==null&&a!==void 0?a:0)+1)}}return[...r].sort((o,u)=>{let l=i[u.name]-i[o.name];return l!==0?l:(0,Of.isInterfaceType)(o)&&e.isSubType(o,u)?-1:(0,Of.isInterfaceType)(u)&&e.isSubType(u,o)?1:(0,Q6.naturalCompare)(o.name,u.name)}).map(o=>o.name)}function W6(e,t){if((0,Of.isObjectType)(e)||(0,Of.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,Y6.suggestionList)(t,n)}return[]}});var pg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.FragmentsOnCompositeTypesRule=X6;var Cw=ze(),Bw=Ti(),Uw=Lt(),kw=Qa();function X6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,kw.typeFromAST)(e.getSchema(),n);if(r&&!(0,Uw.isCompositeType)(r)){let i=(0,Bw.print)(n);e.reportError(new Cw.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,kw.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,Uw.isCompositeType)(n)){let r=(0,Bw.print)(t.typeCondition);e.reportError(new Cw.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var mg=w(BN=>{"use strict";m();T();N();Object.defineProperty(BN,"__esModule",{value:!0});BN.KnownArgumentNamesOnDirectivesRule=Vw;BN.KnownArgumentNamesRule=tW;var Mw=mu(),xw=Tu(),qw=ze(),Z6=wt(),eW=Xr();function tW(e){return $(k({},Vw(e)),{Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let a=t.name.value,o=r.args.map(l=>l.name),u=(0,xw.suggestionList)(a,o);e.reportError(new qw.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,Mw.didYouMean)(u),{nodes:t}))}}})}function Vw(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():eW.specifiedDirectives;for(let o of r)t[o.name]=o.args.map(u=>u.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===Z6.Kind.DIRECTIVE_DEFINITION){var a;let u=(a=o.arguments)!==null&&a!==void 0?a:[];t[o.name.value]=u.map(l=>l.name.value)}return{Directive(o){let u=o.name.value,l=t[u];if(o.arguments&&l)for(let d of o.arguments){let p=d.name.value;if(!l.includes(p)){let E=(0,xw.suggestionList)(p,l);e.reportError(new qw.GraphQLError(`Unknown argument "${p}" on directive "@${u}".`+(0,Mw.didYouMean)(E),{nodes:d}))}}return!1}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.KnownDirectivesRule=iW;var nW=Wt(),Ng=Ar(),jw=ze(),Tg=ja(),ur=gl(),_n=wt(),rW=Xr();function iW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():rW.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===_n.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,u,l,d){let p=a.name.value,E=t[p];if(!E){e.reportError(new jw.GraphQLError(`Unknown directive "@${p}".`,{nodes:a}));return}let I=aW(d);I&&!E.includes(I)&&e.reportError(new jw.GraphQLError(`Directive "@${p}" may not be used on ${I}.`,{nodes:a}))}}}function aW(e){let t=e[e.length-1];switch("kind"in t||(0,Ng.invariant)(!1),t.kind){case _n.Kind.OPERATION_DEFINITION:return sW(t.operation);case _n.Kind.FIELD:return ur.DirectiveLocation.FIELD;case _n.Kind.FRAGMENT_SPREAD:return ur.DirectiveLocation.FRAGMENT_SPREAD;case _n.Kind.INLINE_FRAGMENT:return ur.DirectiveLocation.INLINE_FRAGMENT;case _n.Kind.FRAGMENT_DEFINITION:return ur.DirectiveLocation.FRAGMENT_DEFINITION;case _n.Kind.VARIABLE_DEFINITION:return ur.DirectiveLocation.VARIABLE_DEFINITION;case _n.Kind.SCHEMA_DEFINITION:case _n.Kind.SCHEMA_EXTENSION:return ur.DirectiveLocation.SCHEMA;case _n.Kind.SCALAR_TYPE_DEFINITION:case _n.Kind.SCALAR_TYPE_EXTENSION:return ur.DirectiveLocation.SCALAR;case _n.Kind.OBJECT_TYPE_DEFINITION:case _n.Kind.OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.OBJECT;case _n.Kind.FIELD_DEFINITION:return ur.DirectiveLocation.FIELD_DEFINITION;case _n.Kind.INTERFACE_TYPE_DEFINITION:case _n.Kind.INTERFACE_TYPE_EXTENSION:return ur.DirectiveLocation.INTERFACE;case _n.Kind.UNION_TYPE_DEFINITION:case _n.Kind.UNION_TYPE_EXTENSION:return ur.DirectiveLocation.UNION;case _n.Kind.ENUM_TYPE_DEFINITION:case _n.Kind.ENUM_TYPE_EXTENSION:return ur.DirectiveLocation.ENUM;case _n.Kind.ENUM_VALUE_DEFINITION:return ur.DirectiveLocation.ENUM_VALUE;case _n.Kind.INPUT_OBJECT_TYPE_DEFINITION:case _n.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ur.DirectiveLocation.INPUT_OBJECT;case _n.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,Ng.invariant)(!1),n.kind===_n.Kind.INPUT_OBJECT_TYPE_DEFINITION?ur.DirectiveLocation.INPUT_FIELD_DEFINITION:ur.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,Ng.invariant)(!1,"Unexpected kind: "+(0,nW.inspect)(t.kind))}}function sW(e){switch(e){case Tg.OperationTypeNode.QUERY:return ur.DirectiveLocation.QUERY;case Tg.OperationTypeNode.MUTATION:return ur.DirectiveLocation.MUTATION;case Tg.OperationTypeNode.SUBSCRIPTION:return ur.DirectiveLocation.SUBSCRIPTION}}});var Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.KnownFragmentNamesRule=uW;var oW=ze();function uW(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new oW.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var vg=w(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.KnownTypeNamesRule=mW;var cW=mu(),lW=Tu(),dW=ze(),gg=Ec(),fW=ki(),pW=Ga();function mW(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,gg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,u,l,d){let p=a.name.value;if(!n[p]&&!r[p]){var E;let I=(E=d[2])!==null&&E!==void 0?E:u,v=I!=null&&NW(I);if(v&&Kw.includes(p))return;let A=(0,lW.suggestionList)(p,v?Kw.concat(i):i);e.reportError(new dW.GraphQLError(`Unknown type "${p}".`+(0,cW.didYouMean)(A),{nodes:a}))}}}}var Kw=[...pW.specifiedScalarTypes,...fW.introspectionTypes].map(e=>e.name);function NW(e){return"kind"in e&&((0,gg.isTypeSystemDefinitionNode)(e)||(0,gg.isTypeSystemExtensionNode)(e))}});var Sg=w(Og=>{"use strict";m();T();N();Object.defineProperty(Og,"__esModule",{value:!0});Og.LoneAnonymousOperationRule=hW;var TW=ze(),EW=wt();function hW(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===EW.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new TW.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var bg=w(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.LoneSchemaDefinitionRule=yW;var $w=ze();function yW(e){var t,n,r;let i=e.getSchema(),a=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType(),o=0;return{SchemaDefinition(u){if(a){e.reportError(new $w.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:u}));return}o>0&&e.reportError(new $w.GraphQLError("Must provide only one schema definition.",{nodes:u})),++o}}}});var Rg=w(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.MaxIntrospectionDepthRule=_W;var IW=ze(),Gw=wt(),gW=3;function _W(e){function t(n,r=Object.create(null),i=0){if(n.kind===Gw.Kind.FRAGMENT_SPREAD){let a=n.name.value;if(r[a]===!0)return!1;let o=e.getFragment(a);if(!o)return!1;try{return r[a]=!0,t(o,r,i)}finally{r[a]=void 0}}if(n.kind===Gw.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=gW))return!0;if("selectionSet"in n&&n.selectionSet){for(let a of n.selectionSet.selections)if(t(a,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new IW.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Fg=w(Pg=>{"use strict";m();T();N();Object.defineProperty(Pg,"__esModule",{value:!0});Pg.NoFragmentCyclesRule=OW;var vW=ze();function OW(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(a){return i(a),!1}};function i(a){if(t[a.name.value])return;let o=a.name.value;t[o]=!0;let u=e.getFragmentSpreads(a.selectionSet);if(u.length!==0){r[o]=n.length;for(let l of u){let d=l.name.value,p=r[d];if(n.push(l),p===void 0){let E=e.getFragment(d);E&&i(E)}else{let E=n.slice(p),I=E.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new vW.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:E}))}n.pop()}r[o]=void 0}}}});var Lg=w(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.NoUndefinedVariablesRule=DW;var SW=ze();function DW(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let a=i.name.value;t[a]!==!0&&e.reportError(new SW.GraphQLError(n.name?`Variable "$${a}" is not defined by operation "${n.name.value}".`:`Variable "$${a}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}});var Bg=w(Cg=>{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.NoUnusedFragmentsRule=AW;var bW=ze();function AW(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let a of e.getRecursivelyReferencedFragments(i))r[a.name.value]=!0;for(let i of n){let a=i.name.value;r[a]!==!0&&e.reportError(new bW.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.NoUnusedVariablesRule=PW;var RW=ze();function PW(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:a}of i)r[a.name.value]=!0;for(let a of t){let o=a.variable.name.value;r[o]!==!0&&e.reportError(new RW.GraphQLError(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:a}))}}},VariableDefinition(n){t.push(n)}}}});var qg=w(xg=>{"use strict";m();T();N();Object.defineProperty(xg,"__esModule",{value:!0});xg.sortValueNode=Mg;var FW=sf(),As=wt();function Mg(e){switch(e.kind){case As.Kind.OBJECT:return $(k({},e),{fields:wW(e.fields)});case As.Kind.LIST:return $(k({},e),{values:e.values.map(Mg)});case As.Kind.INT:case As.Kind.FLOAT:case As.Kind.STRING:case As.Kind.BOOLEAN:case As.Kind.NULL:case As.Kind.ENUM:case As.Kind.VARIABLE:return e}}function wW(e){return e.map(t=>$(k({},t),{value:Mg(t.value)})).sort((t,n)=>(0,FW.naturalCompare)(t.name.value,n.name.value))}});var Yg=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.OverlappingFieldsCanBeMergedRule=UW;var Qw=Wt(),LW=ze(),Vg=wt(),CW=Ti(),Zr=Lt(),BW=qg(),Jw=Qa();function Hw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Hw(n)).join(" and "):e}function UW(e){let t=new $g,n=new Map;return{SelectionSet(r){let i=kW(e,n,t,e.getParentType(),r);for(let[[a,o],u,l]of i){let d=Hw(o);e.reportError(new LW.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function kW(e,t,n,r,i){let a=[],[o,u]=MN(e,t,r,i);if(xW(e,a,t,n,o),u.length!==0)for(let l=0;l1)for(let u=0;u[a.value,o]));return n.every(a=>{let o=a.value,u=i.get(a.name.value);return u===void 0?!1:Yw(o)===Yw(u)})}function Yw(e){return(0,CW.print)((0,BW.sortValueNode)(e))}function jg(e,t){return(0,Zr.isListType)(e)?(0,Zr.isListType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isListType)(t)?!0:(0,Zr.isNonNullType)(e)?(0,Zr.isNonNullType)(t)?jg(e.ofType,t.ofType):!0:(0,Zr.isNonNullType)(t)?!0:(0,Zr.isLeafType)(e)||(0,Zr.isLeafType)(t)?e!==t:!1}function MN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);Ww(e,n,r,a,o);let u=[a,Object.keys(o)];return t.set(r,u),u}function Kg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,Jw.typeFromAST)(e.getSchema(),n.typeCondition);return MN(e,t,i,n.selectionSet)}function Ww(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Vg.Kind.FIELD:{let o=a.name.value,u;((0,Zr.isObjectType)(t)||(0,Zr.isInterfaceType)(t))&&(u=t.getFields()[o]);let l=a.alias?a.alias.value:o;r[l]||(r[l]=[]),r[l].push([t,a,u]);break}case Vg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Vg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,u=o?(0,Jw.typeFromAST)(e.getSchema(),o):t;Ww(e,u,a.selectionSet,r,i);break}}}function VW(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var $g=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.PossibleFragmentSpreadsRule=KW;var xN=Wt(),Xw=ze(),Jg=Lt(),Zw=ff(),jW=Qa();function KW(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Jg.isCompositeType)(n)&&(0,Jg.isCompositeType)(r)&&!(0,Zw.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,xN.inspect)(r),a=(0,xN.inspect)(n);e.reportError(new Xw.GraphQLError(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${a}".`,{nodes:t}))}},FragmentSpread(t){let n=t.name.value,r=$W(e,n),i=e.getParentType();if(r&&i&&!(0,Zw.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,xN.inspect)(i),o=(0,xN.inspect)(r);e.reportError(new Xw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function $W(e,t){let n=e.getFragment(t);if(n){let r=(0,jW.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Jg.isCompositeType)(r))return r}}});var Xg=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.PossibleTypeExtensionsRule=JW;var GW=mu(),tL=Wt(),nL=Ar(),QW=Tu(),eL=ze(),Sn=wt(),YW=Ec(),Rl=Lt();function JW(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,YW.isTypeDefinitionNode)(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){let a=i.name.value,o=n[a],u=t==null?void 0:t.getType(a),l;if(o?l=HW[o.kind]:u&&(l=zW(u)),l){if(l!==i.kind){let d=WW(i.kind);e.reportError(new eL.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(k(k({},n),t==null?void 0:t.getTypeMap())),p=(0,QW.suggestionList)(a,d);e.reportError(new eL.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,GW.didYouMean)(p),{nodes:i.name}))}}}var HW={[Sn.Kind.SCALAR_TYPE_DEFINITION]:Sn.Kind.SCALAR_TYPE_EXTENSION,[Sn.Kind.OBJECT_TYPE_DEFINITION]:Sn.Kind.OBJECT_TYPE_EXTENSION,[Sn.Kind.INTERFACE_TYPE_DEFINITION]:Sn.Kind.INTERFACE_TYPE_EXTENSION,[Sn.Kind.UNION_TYPE_DEFINITION]:Sn.Kind.UNION_TYPE_EXTENSION,[Sn.Kind.ENUM_TYPE_DEFINITION]:Sn.Kind.ENUM_TYPE_EXTENSION,[Sn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function zW(e){if((0,Rl.isScalarType)(e))return Sn.Kind.SCALAR_TYPE_EXTENSION;if((0,Rl.isObjectType)(e))return Sn.Kind.OBJECT_TYPE_EXTENSION;if((0,Rl.isInterfaceType)(e))return Sn.Kind.INTERFACE_TYPE_EXTENSION;if((0,Rl.isUnionType)(e))return Sn.Kind.UNION_TYPE_EXTENSION;if((0,Rl.isEnumType)(e))return Sn.Kind.ENUM_TYPE_EXTENSION;if((0,Rl.isInputObjectType)(e))return Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,nL.invariant)(!1,"Unexpected type: "+(0,tL.inspect)(e))}function WW(e){switch(e){case Sn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case Sn.Kind.OBJECT_TYPE_EXTENSION:return"object";case Sn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case Sn.Kind.UNION_TYPE_EXTENSION:return"union";case Sn.Kind.ENUM_TYPE_EXTENSION:return"enum";case Sn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,nL.invariant)(!1,"Unexpected kind: "+(0,tL.inspect)(e))}}});var e_=w(qN=>{"use strict";m();T();N();Object.defineProperty(qN,"__esModule",{value:!0});qN.ProvidedRequiredArgumentsOnDirectivesRule=oL;qN.ProvidedRequiredArgumentsRule=e4;var iL=Wt(),rL=Nu(),aL=ze(),sL=wt(),XW=Ti(),Zg=Lt(),ZW=Xr();function e4(e){return $(k({},oL(e)),{Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return!1;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(a=>a.name.value));for(let a of r.args)if(!i.has(a.name)&&(0,Zg.isRequiredArgument)(a)){let o=(0,iL.inspect)(a.type);e.reportError(new aL.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function oL(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:ZW.specifiedDirectives;for(let u of i)n[u.name]=(0,rL.keyMap)(u.args.filter(Zg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let u of a)if(u.kind===sL.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=u.arguments)!==null&&o!==void 0?o:[];n[u.name.value]=(0,rL.keyMap)(l.filter(t4),d=>d.name.value)}return{Directive:{leave(u){let l=u.name.value,d=n[l];if(d){var p;let E=(p=u.arguments)!==null&&p!==void 0?p:[],I=new Set(E.map(v=>v.name.value));for(let[v,A]of Object.entries(d))if(!I.has(v)){let U=(0,Zg.isType)(A.type)?(0,iL.inspect)(A.type):(0,XW.print)(A.type);e.reportError(new aL.GraphQLError(`Directive "@${l}" argument "${v}" of type "${U}" is required, but it was not provided.`,{nodes:u}))}}}}}}function t4(e){return e.type.kind===sL.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var n_=w(t_=>{"use strict";m();T();N();Object.defineProperty(t_,"__esModule",{value:!0});t_.ScalarLeafsRule=n4;var uL=Wt(),cL=ze(),lL=Lt();function n4(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,lL.isLeafType)((0,lL.getNamedType)(n))){if(r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" must not have a selection since type "${a}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,a=(0,uL.inspect)(n);e.reportError(new cL.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var i_=w(r_=>{"use strict";m();T();N();Object.defineProperty(r_,"__esModule",{value:!0});r_.printPathArray=r4;function r4(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var Sf=w(VN=>{"use strict";m();T();N();Object.defineProperty(VN,"__esModule",{value:!0});VN.addPath=i4;VN.pathToArray=a4;function i4(e,t,n){return{prev:e,key:t,typename:n}}function a4(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.coerceInputValue=f4;var s4=mu(),jN=Wt(),o4=Ar(),u4=PN(),c4=Va(),Na=Sf(),l4=i_(),d4=Tu(),Rs=ze(),Df=Lt();function f4(e,t,n=p4){return bf(e,t,n,void 0)}function p4(e,t,n){let r="Invalid value "+(0,jN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,l4.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function bf(e,t,n,r){if((0,Df.isNonNullType)(t)){if(e!=null)return bf(e,t.ofType,n,r);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected non-nullable type "${(0,jN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,Df.isListType)(t)){let i=t.ofType;return(0,u4.isIterableObject)(e)?Array.from(e,(a,o)=>{let u=(0,Na.addPath)(r,o,void 0);return bf(a,i,n,u)}):[bf(e,i,n,r)]}if((0,Df.isInputObjectType)(t)){if(!(0,c4.isObjectLike)(e)){n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}" to be an object.`));return}let i={},a=t.getFields();for(let o of Object.values(a)){let u=e[o.name];if(u===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if((0,Df.isNonNullType)(o.type)){let l=(0,jN.inspect)(o.type);n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=bf(u,o.type,n,(0,Na.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let u=(0,d4.suggestionList)(o,Object.keys(t.getFields()));n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,s4.didYouMean)(u)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let u=o[0],l=i[u];l===null&&n((0,Na.pathToArray)(r).concat(u),l,new Rs.GraphQLError(`Field "${u}" must be non-null.`))}return i}if((0,Df.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof Rs.GraphQLError?n((0,Na.pathToArray)(r),e,a):n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,Na.pathToArray)(r),e,new Rs.GraphQLError(`Expected type "${t.name}".`)),i}(0,o4.invariant)(!1,"Unexpected input type: "+(0,jN.inspect)(t))}});var Rf=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.valueFromAST=Af;var m4=Wt(),N4=Ar(),T4=Nu(),Pl=wt(),hc=Lt();function Af(e,t,n){if(e){if(e.kind===Pl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,hc.isNonNullType)(t)?void 0:i}if((0,hc.isNonNullType)(t))return e.kind===Pl.Kind.NULL?void 0:Af(e,t.ofType,n);if(e.kind===Pl.Kind.NULL)return null;if((0,hc.isListType)(t)){let r=t.ofType;if(e.kind===Pl.Kind.LIST){let a=[];for(let o of e.values)if(dL(o,n)){if((0,hc.isNonNullType)(r))return;a.push(null)}else{let u=Af(o,r,n);if(u===void 0)return;a.push(u)}return a}let i=Af(e,r,n);return i===void 0?void 0:[i]}if((0,hc.isInputObjectType)(t)){if(e.kind!==Pl.Kind.OBJECT)return;let r=Object.create(null),i=(0,T4.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||dL(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,hc.isNonNullType)(a.type))return;continue}let u=Af(o.value,a.type,n);if(u===void 0)return;r[a.name]=u}if(t.isOneOf){let a=Object.keys(r);if(a.length!==1||r[a[0]]===null)return}return r}if((0,hc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,N4.invariant)(!1,"Unexpected input type: "+(0,m4.inspect)(t))}}function dL(e,t){return e.kind===Pl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var Ll=w(Pf=>{"use strict";m();T();N();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.getArgumentValues=NL;Pf.getDirectiveValues=v4;Pf.getVariableValues=g4;var Fl=Wt(),E4=Nu(),h4=i_(),Ps=ze(),fL=wt(),pL=Ti(),wl=Lt(),y4=s_(),I4=Qa(),mL=Rf();function g4(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=_4(e,t,n,u=>{if(a!=null&&i.length>=a)throw new Ps.GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");i.push(u)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function _4(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,u=(0,I4.typeFromAST)(e,a.type);if(!(0,wl.isInputType)(u)){let d=(0,pL.print)(a.type);r(new Ps.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!TL(n,o)){if(a.defaultValue)i[o]=(0,mL.valueFromAST)(a.defaultValue,u);else if((0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,wl.isNonNullType)(u)){let d=(0,Fl.inspect)(u);r(new Ps.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,y4.coerceInputValue)(l,u,(d,p,E)=>{let I=`Variable "$${o}" got invalid value `+(0,Fl.inspect)(p);d.length>0&&(I+=` at "${o}${(0,h4.printPathArray)(d)}"`),r(new Ps.GraphQLError(I+"; "+E.message,{nodes:a,originalError:E}))})}return i}function NL(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,E4.keyMap)(a,u=>u.name.value);for(let u of e.args){let l=u.name,d=u.type,p=o[l];if(!p){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was not provided.`,{nodes:t});continue}let E=p.value,I=E.kind===fL.Kind.NULL;if(E.kind===fL.Kind.VARIABLE){let A=E.name.value;if(n==null||!TL(n,A)){if(u.defaultValue!==void 0)i[l]=u.defaultValue;else if((0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of required type "${(0,Fl.inspect)(d)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:E});continue}I=n[A]==null}if(I&&(0,wl.isNonNullType)(d))throw new Ps.GraphQLError(`Argument "${l}" of non-null type "${(0,Fl.inspect)(d)}" must not be null.`,{nodes:E});let v=(0,mL.valueFromAST)(E,d,n);if(v===void 0)throw new Ps.GraphQLError(`Argument "${l}" has invalid value ${(0,pL.print)(E)}.`,{nodes:E});i[l]=v}return i}function v4(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(a=>a.name.value===e.name);if(i)return NL(e,i,n)}function TL(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var GN=w($N=>{"use strict";m();T();N();Object.defineProperty($N,"__esModule",{value:!0});$N.collectFields=D4;$N.collectSubfields=b4;var u_=wt(),O4=Lt(),EL=Xr(),S4=Qa(),hL=Ll();function D4(e,t,n,r,i){let a=new Map;return KN(e,t,n,r,i,a,new Set),a}function b4(e,t,n,r,i){let a=new Map,o=new Set;for(let u of i)u.selectionSet&&KN(e,t,n,r,u.selectionSet,a,o);return a}function KN(e,t,n,r,i,a,o){for(let u of i.selections)switch(u.kind){case u_.Kind.FIELD:{if(!c_(n,u))continue;let l=A4(u),d=a.get(l);d!==void 0?d.push(u):a.set(l,[u]);break}case u_.Kind.INLINE_FRAGMENT:{if(!c_(n,u)||!yL(e,u,r))continue;KN(e,t,n,r,u.selectionSet,a,o);break}case u_.Kind.FRAGMENT_SPREAD:{let l=u.name.value;if(o.has(l)||!c_(n,u))continue;o.add(l);let d=t[l];if(!d||!yL(e,d,r))continue;KN(e,t,n,r,d.selectionSet,a,o);break}}}function c_(e,t){let n=(0,hL.getDirectiveValues)(EL.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,hL.getDirectiveValues)(EL.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function yL(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,S4.typeFromAST)(e,r);return i===n?!0:(0,O4.isAbstractType)(i)?e.isSubType(i,n):!1}function A4(e){return e.alias?e.alias.value:e.name.value}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.SingleFieldSubscriptionsRule=F4;var IL=ze(),R4=wt(),P4=GN();function F4(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,a=Object.create(null),o=e.getDocument(),u=Object.create(null);for(let d of o.definitions)d.kind===R4.Kind.FRAGMENT_DEFINITION&&(u[d.name.value]=d);let l=(0,P4.collectFields)(n,u,a,r,t.selectionSet);if(l.size>1){let E=[...l.values()].slice(1).flat();e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:E}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new IL.GraphQLError(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:d}))}}}}}});var QN=w(f_=>{"use strict";m();T();N();Object.defineProperty(f_,"__esModule",{value:!0});f_.groupBy=w4;function w4(e,t){let n=new Map;for(let r of e){let i=t(r),a=n.get(i);a===void 0?n.set(i,[r]):a.push(r)}return n}});var m_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueArgumentDefinitionNamesRule=B4;var L4=QN(),C4=ze();function B4(e){return{DirectiveDefinition(r){var i;let a=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,a)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let a=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let l of o){var u;let d=l.name.value,p=(u=l.arguments)!==null&&u!==void 0?u:[];n(`${a}.${d}`,p)}return!1}function n(r,i){let a=(0,L4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new C4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:u.map(l=>l.name)}));return!1}}});var T_=w(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.UniqueArgumentNamesRule=M4;var U4=QN(),k4=ze();function M4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,U4.groupBy)(i,o=>o.name.value);for(let[o,u]of a)u.length>1&&e.reportError(new k4.GraphQLError(`There can be only one argument named "${o}".`,{nodes:u.map(l=>l.name)}))}}});var h_=w(E_=>{"use strict";m();T();N();Object.defineProperty(E_,"__esModule",{value:!0});E_.UniqueDirectiveNamesRule=x4;var gL=ze();function x4(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new gL.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new gL.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueDirectivesPerLocationRule=j4;var q4=ze(),y_=wt(),_L=Ec(),V4=Xr();function j4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():V4.specifiedDirectives;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===y_.Kind.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let a=Object.create(null),o=Object.create(null);return{enter(u){if(!("directives"in u)||!u.directives)return;let l;if(u.kind===y_.Kind.SCHEMA_DEFINITION||u.kind===y_.Kind.SCHEMA_EXTENSION)l=a;else if((0,_L.isTypeDefinitionNode)(u)||(0,_L.isTypeExtensionNode)(u)){let d=u.name.value;l=o[d],l===void 0&&(o[d]=l=Object.create(null))}else l=Object.create(null);for(let d of u.directives){let p=d.name.value;t[p]&&(l[p]?e.reportError(new q4.GraphQLError(`The directive "@${p}" can only be used once at this location.`,{nodes:[l[p],d]})):l[p]=d)}}}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueEnumValueNamesRule=$4;var vL=ze(),K4=Lt();function $4(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.values)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value,I=n[u];(0,K4.isEnumType)(I)&&I.getValue(E)?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new vL.GraphQLError(`Enum value "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}});var D_=w(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.UniqueFieldDefinitionNamesRule=G4;var OL=ze(),O_=Lt();function G4(e){let 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(a){var o;let u=a.name.value;r[u]||(r[u]=Object.create(null));let l=(o=a.fields)!==null&&o!==void 0?o:[],d=r[u];for(let p of l){let E=p.name.value;Q4(n[u],E)?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:p.name})):d[E]?e.reportError(new OL.GraphQLError(`Field "${u}.${E}" can only be defined once.`,{nodes:[d[E],p.name]})):d[E]=p.name}return!1}}function Q4(e,t){return(0,O_.isObjectType)(e)||(0,O_.isInterfaceType)(e)||(0,O_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.UniqueFragmentNamesRule=J4;var Y4=ze();function J4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new Y4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.UniqueInputFieldNamesRule=W4;var H4=Ar(),z4=ze();function W4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,H4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new z4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var w_=w(F_=>{"use strict";m();T();N();Object.defineProperty(F_,"__esModule",{value:!0});F_.UniqueOperationNamesRule=Z4;var X4=ze();function Z4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new X4.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var C_=w(L_=>{"use strict";m();T();N();Object.defineProperty(L_,"__esModule",{value:!0});L_.UniqueOperationTypesRule=e8;var SL=ze();function e8(e){let 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(a){var o;let u=(o=a.operationTypes)!==null&&o!==void 0?o:[];for(let l of u){let d=l.operation,p=n[d];r[d]?e.reportError(new SL.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):p?e.reportError(new SL.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[p,l]})):n[d]=l}return!1}}});var U_=w(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.UniqueTypeNamesRule=t8;var DL=ze();function t8(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let a=i.name.value;if(n!=null&&n.getType(a)){e.reportError(new DL.GraphQLError(`Type "${a}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[a]?e.reportError(new DL.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var M_=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.UniqueVariableNamesRule=i8;var n8=QN(),r8=ze();function i8(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,n8.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new r8.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(u=>u.variable.name)}))}}}});var V_=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.ValuesOfCorrectTypeRule=u8;var a8=mu(),Ff=Wt(),s8=Nu(),o8=Tu(),Ja=ze(),x_=wt(),YN=Ti(),Ya=Lt();function u8(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Ya.getNullableType)(e.getParentInputType());if(!(0,Ya.isListType)(r))return yc(e,n),!1},ObjectValue(n){let r=(0,Ya.getNamedType)(e.getInputType());if(!(0,Ya.isInputObjectType)(r))return yc(e,n),!1;let i=(0,s8.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Ya.isRequiredInputField)(a)){let u=(0,Ff.inspect)(a.type);e.reportError(new Ja.GraphQLError(`Field "${r.name}.${a.name}" of required type "${u}" was not provided.`,{nodes:n}))}r.isOneOf&&c8(e,n,r,i,t)},ObjectField(n){let r=(0,Ya.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Ya.isInputObjectType)(r)){let a=(0,o8.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new Ja.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,a8.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Ya.isNonNullType)(r)&&e.reportError(new Ja.GraphQLError(`Expected value of type "${(0,Ff.inspect)(r)}", found ${(0,YN.print)(n)}.`,{nodes:n}))},EnumValue:n=>yc(e,n),IntValue:n=>yc(e,n),FloatValue:n=>yc(e,n),StringValue:n=>yc(e,n),BooleanValue:n=>yc(e,n)}}function yc(e,t){let n=e.getInputType();if(!n)return;let r=(0,Ya.getNamedType)(n);if(!(0,Ya.isLeafType)(r)){let i=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${i}", found ${(0,YN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,Ff.inspect)(n);e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,Ff.inspect)(n);i instanceof Ja.GraphQLError?e.reportError(i):e.reportError(new Ja.GraphQLError(`Expected value of type "${a}", found ${(0,YN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function c8(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new Ja.GraphQLError(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let l=(a=r[o[0]])===null||a===void 0?void 0:a.value,d=!l||l.kind===x_.Kind.NULL,p=(l==null?void 0:l.kind)===x_.Kind.VARIABLE;if(d){e.reportError(new Ja.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(p){let E=l.name.value;i[E].type.kind!==x_.Kind.NON_NULL_TYPE&&e.reportError(new Ja.GraphQLError(`Variable "${E}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var K_=w(j_=>{"use strict";m();T();N();Object.defineProperty(j_,"__esModule",{value:!0});j_.VariablesAreInputTypesRule=m8;var l8=ze(),d8=Ti(),f8=Lt(),p8=Qa();function m8(e){return{VariableDefinition(t){let n=(0,p8.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,f8.isInputType)(n)){let r=t.variable.name.value,i=(0,d8.print)(t.type);e.reportError(new l8.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var G_=w($_=>{"use strict";m();T();N();Object.defineProperty($_,"__esModule",{value:!0});$_.VariablesInAllowedPositionRule=h8;var bL=Wt(),N8=ze(),T8=wt(),AL=Lt(),RL=ff(),E8=Qa();function h8(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:a,defaultValue:o}of r){let u=i.name.value,l=t[u];if(l&&a){let d=e.getSchema(),p=(0,E8.typeFromAST)(d,l.type);if(p&&!y8(d,p,l.defaultValue,a,o)){let E=(0,bL.inspect)(p),I=(0,bL.inspect)(a);e.reportError(new N8.GraphQLError(`Variable "$${u}" of type "${E}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function y8(e,t,n,r,i){if((0,AL.isNonNullType)(r)&&!(0,AL.isNonNullType)(t)){if(!(n!=null&&n.kind!==T8.Kind.NULL)&&!(i!==void 0))return!1;let u=r.ofType;return(0,RL.isTypeSubTypeOf)(e,t,u)}return(0,RL.isTypeSubTypeOf)(e,t,r)}});var Q_=w(Iu=>{"use strict";m();T();N();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.specifiedSDLRules=Iu.specifiedRules=Iu.recommendedRules=void 0;var I8=cg(),g8=dg(),_8=pg(),PL=mg(),FL=hg(),v8=Ig(),wL=vg(),O8=Sg(),S8=bg(),D8=Rg(),b8=Fg(),A8=Lg(),R8=Bg(),P8=kg(),F8=Yg(),w8=zg(),L8=Xg(),LL=e_(),C8=n_(),B8=d_(),U8=m_(),CL=T_(),k8=h_(),BL=g_(),M8=v_(),x8=D_(),q8=A_(),UL=P_(),V8=w_(),j8=C_(),K8=U_(),$8=M_(),G8=V_(),Q8=K_(),Y8=G_(),kL=Object.freeze([D8.MaxIntrospectionDepthRule]);Iu.recommendedRules=kL;var J8=Object.freeze([I8.ExecutableDefinitionsRule,V8.UniqueOperationNamesRule,O8.LoneAnonymousOperationRule,B8.SingleFieldSubscriptionsRule,wL.KnownTypeNamesRule,_8.FragmentsOnCompositeTypesRule,Q8.VariablesAreInputTypesRule,C8.ScalarLeafsRule,g8.FieldsOnCorrectTypeRule,q8.UniqueFragmentNamesRule,v8.KnownFragmentNamesRule,R8.NoUnusedFragmentsRule,w8.PossibleFragmentSpreadsRule,b8.NoFragmentCyclesRule,$8.UniqueVariableNamesRule,A8.NoUndefinedVariablesRule,P8.NoUnusedVariablesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,PL.KnownArgumentNamesRule,CL.UniqueArgumentNamesRule,G8.ValuesOfCorrectTypeRule,LL.ProvidedRequiredArgumentsRule,Y8.VariablesInAllowedPositionRule,F8.OverlappingFieldsCanBeMergedRule,UL.UniqueInputFieldNamesRule,...kL]);Iu.specifiedRules=J8;var H8=Object.freeze([S8.LoneSchemaDefinitionRule,j8.UniqueOperationTypesRule,K8.UniqueTypeNamesRule,M8.UniqueEnumValueNamesRule,x8.UniqueFieldDefinitionNamesRule,U8.UniqueArgumentDefinitionNamesRule,k8.UniqueDirectiveNamesRule,wL.KnownTypeNamesRule,FL.KnownDirectivesRule,BL.UniqueDirectivesPerLocationRule,L8.PossibleTypeExtensionsRule,PL.KnownArgumentNamesOnDirectivesRule,CL.UniqueArgumentNamesRule,UL.UniqueInputFieldNamesRule,LL.ProvidedRequiredArgumentsOnDirectivesRule]);Iu.specifiedSDLRules=H8});var H_=w(gu=>{"use strict";m();T();N();Object.defineProperty(gu,"__esModule",{value:!0});gu.ValidationContext=gu.SDLValidationContext=gu.ASTValidationContext=void 0;var ML=wt(),z8=cc(),xL=CN(),wf=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===ML.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let a of i.selections)a.kind===ML.Kind.FRAGMENT_SPREAD?n.push(a):a.selectionSet&&r.push(a.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],a;for(;a=i.pop();)for(let o of this.getFragmentSpreads(a)){let u=o.name.value;if(r[u]!==!0){r[u]=!0;let l=this.getFragment(u);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}};gu.ASTValidationContext=wf;var Y_=class extends wf{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};gu.SDLValidationContext=Y_;var J_=class extends wf{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new xL.TypeInfo(this._schema);(0,z8.visit)(t,(0,xL.visitWithTypeInfo)(i,{VariableDefinition:()=>!1,Variable(a){r.push({node:a,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}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()}};gu.ValidationContext=J_});var Bl=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.assertValidSDL=tX;Cl.assertValidSDLExtension=nX;Cl.validate=eX;Cl.validateSDL=z_;var W8=Vr(),X8=ze(),JN=cc(),Z8=_f(),qL=CN(),VL=Q_(),jL=H_();function eX(e,t,n=VL.specifiedRules,r,i=new qL.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,W8.devAssert)(!1,"Must provide document."),(0,Z8.assertValidSchema)(e);let u=Object.freeze({}),l=[],d=new jL.ValidationContext(e,t,i,E=>{if(l.length>=o)throw l.push(new X8.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),u;l.push(E)}),p=(0,JN.visitInParallel)(n.map(E=>E(d)));try{(0,JN.visit)(t,(0,qL.visitWithTypeInfo)(i,p))}catch(E){if(E!==u)throw E}return l}function z_(e,t,n=VL.specifiedSDLRules){let r=[],i=new jL.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,JN.visit)(e,(0,JN.visitInParallel)(a)),r}function tX(e){let t=z_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function tX(e,t){let n=z_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` +`))}function nX(e,t){let n=z_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var KL=w(W_=>{"use strict";m();T();N();Object.defineProperty(W_,"__esModule",{value:!0});W_.memoize3=nX;function nX(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let u=o.get(i);u===void 0&&(u=new WeakMap,o.set(i,u));let l=u.get(a);return l===void 0&&(l=e(r,i,a),u.set(a,l)),l}}});var $L=w(X_=>{"use strict";m();T();N();Object.defineProperty(X_,"__esModule",{value:!0});X_.promiseForObject=rX;function rX(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var GL=w(Z_=>{"use strict";m();T();N();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.promiseReduce=aX;var iX=zm();function aX(e,t,n){let r=n;for(let i of e)r=(0,iX.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var QL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.toError=oX;var sX=Wt();function oX(e){return e instanceof Error?e:new ev(e)}var ev=class extends Error{constructor(t){super("Unexpected error value: "+(0,sX.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var HN=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.locatedError=lX;var uX=QL(),cX=ze();function lX(e,t,n){var r;let i=(0,uX.toError)(e);return dX(i)?i:new cX.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function dX(e){return Array.isArray(e.path)}});var Cf=w(xi=>{"use strict";m();T();N();Object.defineProperty(xi,"__esModule",{value:!0});xi.assertValidExecutionArguments=eC;xi.buildExecutionContext=tC;xi.buildResolveInfo=rC;xi.defaultTypeResolver=xi.defaultFieldResolver=void 0;xi.execute=ZL;xi.executeSync=hX;xi.getFieldDef=aC;var iv=Vr(),Ic=Wt(),fX=Ar(),pX=PN(),ov=qa(),Na=zm(),mX=KL(),gc=Sf(),YL=$L(),NX=GL(),Mi=ze(),WN=HN(),rv=Va(),JL=wt(),_u=Lt(),Ul=Ui(),TX=_f(),WL=GN(),XL=Ll(),EX=(0,mX.memoize3)((e,t,n)=>(0,WL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function ZL(e){arguments.length<2||(0,iv.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;eC(t,n,r);let a=tC(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,u=yX(a,o,i);return(0,Na.isPromise)(u)?u.then(l=>zN(l,a.errors),l=>(a.errors.push(l),zN(null,a.errors))):zN(u,a.errors)}catch(o){return a.errors.push(o),zN(null,a.errors)}}function hX(e){let t=ZL(e);if((0,Na.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function zN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function eC(e,t,n){t||(0,iv.devAssert)(!1,"Must provide document."),(0,TX.assertValidSchema)(e),n==null||(0,ov.isObjectLike)(n)||(0,iv.devAssert)(!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 tC(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case JL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Mi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case JL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new Mi.GraphQLError(`Unknown operation named "${l}".`)]:[new Mi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,XL.getVariableValues)(r,A,u!=null?u:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:sv,typeResolver:p!=null?p:iC,subscribeFieldResolver:E!=null?E:sv,errors:[]}}function yX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Mi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,WL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case rv.OperationTypeNode.QUERY:return XN(e,r,n,a,i);case rv.OperationTypeNode.MUTATION:return IX(e,r,n,a,i);case rv.OperationTypeNode.SUBSCRIPTION:return XN(e,r,n,a,i)}}function IX(e,t,n,r,i){return(0,NX.promiseReduce)(i.entries(),(a,[o,u])=>{let l=(0,gc.addPath)(r,o,t.name),d=nC(e,t,n,u,l);return d===void 0?a:(0,Na.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function XN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,gc.addPath)(r,u,t.name),p=nC(e,t,n,l,d);p!==void 0&&(a[u]=p,(0,Na.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,YL.promiseForObject)(a).finally(()=>{throw u});throw u}return o?(0,YL.promiseForObject)(a):a}function nC(e,t,n,r,i){var a;let o=aC(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=rC(e,o,r,t,i);try{let p=(0,XL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,Na.isPromise)(I)?v=I.then(A=>Lf(e,u,r,d,i,A)):v=Lf(e,u,r,d,i,I),(0,Na.isPromise)(v)?v.then(void 0,A=>{let U=(0,WN.locatedError)(A,r,(0,gc.pathToArray)(i));return ZN(U,u,e)}):v}catch(p){let E=(0,WN.locatedError)(p,r,(0,gc.pathToArray)(i));return ZN(E,u,e)}}function rC(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 ZN(e,t,n){if((0,_u.isNonNullType)(t))throw e;return n.errors.push(e),null}function Lf(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,_u.isNonNullType)(t)){let o=Lf(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,_u.isListType)(t))return gX(e,t,n,r,i,a);if((0,_u.isLeafType)(t))return _X(t,a);if((0,_u.isAbstractType)(t))return vX(e,t,n,r,i,a);if((0,_u.isObjectType)(t))return av(e,t,n,r,i,a);(0,fX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Ic.inspect)(t))}function gX(e,t,n,r,i,a){if(!(0,pX.isIterableObject)(a))throw new Mi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(a,(d,p)=>{let E=(0,gc.addPath)(i,p,void 0);try{let I;return(0,Na.isPromise)(d)?I=d.then(v=>Lf(e,o,n,r,E,v)):I=Lf(e,o,n,r,E,d),(0,Na.isPromise)(I)?(u=!0,I.then(void 0,v=>{let A=(0,WN.locatedError)(v,n,(0,gc.pathToArray)(E));return ZN(A,o,e)})):I}catch(I){let v=(0,WN.locatedError)(I,n,(0,gc.pathToArray)(E));return ZN(v,o,e)}});return u?Promise.all(l):l}function _X(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Ic.inspect)(e)}.serialize(${(0,Ic.inspect)(t)})\` to return non-nullable value, returned: ${(0,Ic.inspect)(n)}`);return n}function vX(e,t,n,r,i,a){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(a,l,r,t);return(0,Na.isPromise)(d)?d.then(p=>av(e,HL(p,e,t,n,r,a),n,r,i,a)):av(e,HL(d,e,t,n,r,a),n,r,i,a)}function HL(e,t,n,r,i,a){if(e==null)throw new Mi.GraphQLError(`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((0,_u.isObjectType)(e))throw new Mi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new Mi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Ic.inspect)(a)}, received "${(0,Ic.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Mi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,_u.isObjectType)(o))throw new Mi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Mi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function av(e,t,n,r,i,a){let o=EX(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(a,e.contextValue,r);if((0,Na.isPromise)(u))return u.then(l=>{if(!l)throw zL(t,a,n);return XN(e,t,a,i,o)});if(!u)throw zL(t,a,n)}return XN(e,t,a,i,o)}function zL(e,t,n){return new Mi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Ic.inspect)(t)}.`,{nodes:n})}var iC=function(e,t,n,r){if((0,ov.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.graphql=PX;eT.graphqlSync=FX;var OX=Vr(),SX=zm(),DX=vl(),bX=_f(),AX=Bl(),RX=Cf();function PX(e){return new Promise(t=>t(sC(e)))}function FX(e){let t=sC(e);if((0,SX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sC(e){arguments.length<2||(0,OX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,bX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,DX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,AX.validate)(t,p);return E.length>0?{errors:E}:(0,RX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l})}});var lC=w(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Ta.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return Fs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Ta.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return Ta.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return Fs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return Fs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Ta.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return Fs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Ta.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return uv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Ta.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Ta.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return Fs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ei.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return ei.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return ei.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return ei.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return ei.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return ei.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return ei.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return ei.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return ei.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return ei.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return Ta.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return cC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return cC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return uv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return uC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return ei.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return Ta.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return ei.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return uv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return Ta.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Fs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return Ta.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return Fs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return uC.validateSchema}});var uv=Nc(),at=Lt(),Ta=Xr(),Fs=$a(),ei=Ui(),uC=_f(),cC=of()});var fC=w(Ut=>{"use strict";m();T();N();Object.defineProperty(Ut,"__esModule",{value:!0});Object.defineProperty(Ut,"BREAK",{enumerable:!0,get:function(){return Bf.BREAK}});Object.defineProperty(Ut,"DirectiveLocation",{enumerable:!0,get:function(){return MX.DirectiveLocation}});Object.defineProperty(Ut,"Kind",{enumerable:!0,get:function(){return CX.Kind}});Object.defineProperty(Ut,"Lexer",{enumerable:!0,get:function(){return UX.Lexer}});Object.defineProperty(Ut,"Location",{enumerable:!0,get:function(){return cv.Location}});Object.defineProperty(Ut,"OperationTypeNode",{enumerable:!0,get:function(){return cv.OperationTypeNode}});Object.defineProperty(Ut,"Source",{enumerable:!0,get:function(){return wX.Source}});Object.defineProperty(Ut,"Token",{enumerable:!0,get:function(){return cv.Token}});Object.defineProperty(Ut,"TokenKind",{enumerable:!0,get:function(){return BX.TokenKind}});Object.defineProperty(Ut,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Bf.getEnterLeaveForKind}});Object.defineProperty(Ut,"getLocation",{enumerable:!0,get:function(){return LX.getLocation}});Object.defineProperty(Ut,"getVisitFn",{enumerable:!0,get:function(){return Bf.getVisitFn}});Object.defineProperty(Ut,"isConstValueNode",{enumerable:!0,get:function(){return Ja.isConstValueNode}});Object.defineProperty(Ut,"isDefinitionNode",{enumerable:!0,get:function(){return Ja.isDefinitionNode}});Object.defineProperty(Ut,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ja.isExecutableDefinitionNode}});Object.defineProperty(Ut,"isSelectionNode",{enumerable:!0,get:function(){return Ja.isSelectionNode}});Object.defineProperty(Ut,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ja.isTypeDefinitionNode}});Object.defineProperty(Ut,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ja.isTypeExtensionNode}});Object.defineProperty(Ut,"isTypeNode",{enumerable:!0,get:function(){return Ja.isTypeNode}});Object.defineProperty(Ut,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ja.isTypeSystemDefinitionNode}});Object.defineProperty(Ut,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ja.isTypeSystemExtensionNode}});Object.defineProperty(Ut,"isValueNode",{enumerable:!0,get:function(){return Ja.isValueNode}});Object.defineProperty(Ut,"parse",{enumerable:!0,get:function(){return tT.parse}});Object.defineProperty(Ut,"parseConstValue",{enumerable:!0,get:function(){return tT.parseConstValue}});Object.defineProperty(Ut,"parseType",{enumerable:!0,get:function(){return tT.parseType}});Object.defineProperty(Ut,"parseValue",{enumerable:!0,get:function(){return tT.parseValue}});Object.defineProperty(Ut,"print",{enumerable:!0,get:function(){return kX.print}});Object.defineProperty(Ut,"printLocation",{enumerable:!0,get:function(){return dC.printLocation}});Object.defineProperty(Ut,"printSourceLocation",{enumerable:!0,get:function(){return dC.printSourceLocation}});Object.defineProperty(Ut,"visit",{enumerable:!0,get:function(){return Bf.visit}});Object.defineProperty(Ut,"visitInParallel",{enumerable:!0,get:function(){return Bf.visitInParallel}});var wX=sN(),LX=Wm(),dC=aI(),CX=wt(),BX=Xd(),UX=nN(),tT=vl(),kX=Ni(),Bf=cc(),cv=Va(),Ja=Ec(),MX=gl()});var pC=w(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.isAsyncIterable=xX;function xX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var mC=w(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.mapAsyncIterator=qX;function qX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Fi(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return Fi(this,null,function*(){return r(yield n.next())})},return(){return Fi(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Fi(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var hC=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.createSourceEventStream=EC;nT.subscribe=YX;var VX=Vr(),jX=Wt(),TC=pC(),NC=Sf(),fv=ze(),KX=HN(),$X=GN(),Uf=Cf(),GX=mC(),QX=Ll();function YX(t){return Fi(this,arguments,function*(e){arguments.length<2||(0,VX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield EC(e);if(!(0,TC.isAsyncIterable)(n))return n;let r=i=>(0,Uf.execute)($(k({},e),{rootValue:i}));return(0,GX.mapAsyncIterator)(n,r)})}function JX(e){let 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]}}function EC(...e){return Fi(this,null,function*(){let t=JX(e),{schema:n,document:r,variableValues:i}=t;(0,Uf.assertValidExecutionArguments)(n,r,i);let a=(0,Uf.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield HX(a);if(!(0,TC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,jX.inspect)(o)}.`);return o}catch(o){if(o instanceof fv.GraphQLError)return{errors:[o]};throw o}})}function HX(e){return Fi(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new fv.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,$X.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,Uf.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new fv.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,NC.addPath)(void 0,l,o.name),I=(0,Uf.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,QX.getArgumentValues)(p,d[0],i),U=e.contextValue,Q=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if(Q instanceof Error)throw Q;return Q}catch(A){throw(0,KX.locatedError)(A,d,(0,NC.pathToArray)(E))}})}});var IC=w(qi=>{"use strict";m();T();N();Object.defineProperty(qi,"__esModule",{value:!0});Object.defineProperty(qi,"createSourceEventStream",{enumerable:!0,get:function(){return yC.createSourceEventStream}});Object.defineProperty(qi,"defaultFieldResolver",{enumerable:!0,get:function(){return rT.defaultFieldResolver}});Object.defineProperty(qi,"defaultTypeResolver",{enumerable:!0,get:function(){return rT.defaultTypeResolver}});Object.defineProperty(qi,"execute",{enumerable:!0,get:function(){return rT.execute}});Object.defineProperty(qi,"executeSync",{enumerable:!0,get:function(){return rT.executeSync}});Object.defineProperty(qi,"getArgumentValues",{enumerable:!0,get:function(){return pv.getArgumentValues}});Object.defineProperty(qi,"getDirectiveValues",{enumerable:!0,get:function(){return pv.getDirectiveValues}});Object.defineProperty(qi,"getVariableValues",{enumerable:!0,get:function(){return pv.getVariableValues}});Object.defineProperty(qi,"responsePathAsArray",{enumerable:!0,get:function(){return zX.pathToArray}});Object.defineProperty(qi,"subscribe",{enumerable:!0,get:function(){return yC.subscribe}});var zX=Sf(),rT=Cf(),yC=hC(),pv=Ll()});var gC=w(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.NoDeprecatedCustomRule=WX;var mv=Ar(),kf=ze(),Nv=Lt();function WX(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new kf.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,Nv.getNamedType)(e.getParentInputType());if((0,Nv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new kf.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,Nv.getNamedType)(e.getInputType());i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var _C=w(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.NoSchemaIntrospectionCustomRule=t5;var XX=ze(),ZX=Lt(),e5=Ui();function t5(e){return{Field(t){let n=(0,ZX.getNamedType)(e.getType());n&&(0,e5.isIntrospectionType)(n)&&e.reportError(new XX.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var OC=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return i5.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return a5.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return s5.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return o5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return u5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return c5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return l5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return d5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return F5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return P5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return x5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return f5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return q5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return p5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return m5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return N5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return T5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return E5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return M5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return h5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return y5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return I5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return U5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return g5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return k5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return _5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return C5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return B5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return v5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return O5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return S5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return w5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return L5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return D5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return r5.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return b5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return A5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return R5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return vC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return vC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return n5.validate}});var n5=Bl(),r5=H_(),vC=Q_(),i5=cg(),a5=dg(),s5=pg(),o5=mg(),u5=hg(),c5=Ig(),l5=vg(),d5=Sg(),f5=Fg(),p5=Lg(),m5=Bg(),N5=kg(),T5=Yg(),E5=zg(),h5=e_(),y5=n_(),I5=d_(),g5=T_(),_5=g_(),v5=A_(),O5=P_(),S5=w_(),D5=M_(),b5=V_(),A5=K_(),R5=G_(),P5=Rg(),F5=bg(),w5=C_(),L5=U_(),C5=v_(),B5=D_(),U5=m_(),k5=h_(),M5=Xg(),x5=gC(),q5=_C()});var SC=w(_c=>{"use strict";m();T();N();Object.defineProperty(_c,"__esModule",{value:!0});Object.defineProperty(_c,"GraphQLError",{enumerable:!0,get:function(){return hv.GraphQLError}});Object.defineProperty(_c,"formatError",{enumerable:!0,get:function(){return hv.formatError}});Object.defineProperty(_c,"locatedError",{enumerable:!0,get:function(){return j5.locatedError}});Object.defineProperty(_c,"printError",{enumerable:!0,get:function(){return hv.printError}});Object.defineProperty(_c,"syntaxError",{enumerable:!0,get:function(){return V5.syntaxError}});var hv=ze(),V5=Zm(),j5=HN()});var Iv=w(yv=>{"use strict";m();T();N();Object.defineProperty(yv,"__esModule",{value:!0});yv.getIntrospectionQuery=K5;function K5(e){let t=k({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` +`))}});var KL=w(W_=>{"use strict";m();T();N();Object.defineProperty(W_,"__esModule",{value:!0});W_.memoize3=rX;function rX(e){let t;return function(r,i,a){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let u=o.get(i);u===void 0&&(u=new WeakMap,o.set(i,u));let l=u.get(a);return l===void 0&&(l=e(r,i,a),u.set(a,l)),l}}});var $L=w(X_=>{"use strict";m();T();N();Object.defineProperty(X_,"__esModule",{value:!0});X_.promiseForObject=iX;function iX(e){return Promise.all(Object.values(e)).then(t=>{let n=Object.create(null);for(let[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}});var GL=w(Z_=>{"use strict";m();T();N();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.promiseReduce=sX;var aX=zm();function sX(e,t,n){let r=n;for(let i of e)r=(0,aX.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var QL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.toError=uX;var oX=Wt();function uX(e){return e instanceof Error?e:new ev(e)}var ev=class extends Error{constructor(t){super("Unexpected error value: "+(0,oX.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var HN=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.locatedError=dX;var cX=QL(),lX=ze();function dX(e,t,n){var r;let i=(0,cX.toError)(e);return fX(i)?i:new lX.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function fX(e){return Array.isArray(e.path)}});var Cf=w(qi=>{"use strict";m();T();N();Object.defineProperty(qi,"__esModule",{value:!0});qi.assertValidExecutionArguments=eC;qi.buildExecutionContext=tC;qi.buildResolveInfo=rC;qi.defaultTypeResolver=qi.defaultFieldResolver=void 0;qi.execute=ZL;qi.executeSync=yX;qi.getFieldDef=aC;var iv=Vr(),Ic=Wt(),pX=Ar(),mX=PN(),ov=Va(),Ta=zm(),NX=KL(),gc=Sf(),YL=$L(),TX=GL(),xi=ze(),WN=HN(),rv=ja(),JL=wt(),_u=Lt(),Ul=ki(),EX=_f(),WL=GN(),XL=Ll(),hX=(0,NX.memoize3)((e,t,n)=>(0,WL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function ZL(e){arguments.length<2||(0,iv.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,document:n,variableValues:r,rootValue:i}=e;eC(t,n,r);let a=tC(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,u=IX(a,o,i);return(0,Ta.isPromise)(u)?u.then(l=>zN(l,a.errors),l=>(a.errors.push(l),zN(null,a.errors))):zN(u,a.errors)}catch(o){return a.errors.push(o),zN(null,a.errors)}}function yX(e){let t=ZL(e);if((0,Ta.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function zN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function eC(e,t,n){t||(0,iv.devAssert)(!1,"Must provide document."),(0,EX.assertValidSchema)(e),n==null||(0,ov.isObjectLike)(n)||(0,iv.devAssert)(!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 tC(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:u,operationName:l,fieldResolver:d,typeResolver:p,subscribeFieldResolver:E}=e,I,v=Object.create(null);for(let j of i.definitions)switch(j.kind){case JL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new xi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=j}else((t=j.name)===null||t===void 0?void 0:t.value)===l&&(I=j);break;case JL.Kind.FRAGMENT_DEFINITION:v[j.name.value]=j;break;default:}if(!I)return l!=null?[new xi.GraphQLError(`Unknown operation named "${l}".`)]:[new xi.GraphQLError("Must provide an operation.")];let A=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],U=(0,XL.getVariableValues)(r,A,u!=null?u:{},{maxErrors:50});return U.errors?U.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:U.coerced,fieldResolver:d!=null?d:sv,typeResolver:p!=null?p:iC,subscribeFieldResolver:E!=null?E:sv,errors:[]}}function IX(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new xi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,WL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case rv.OperationTypeNode.QUERY:return XN(e,r,n,a,i);case rv.OperationTypeNode.MUTATION:return gX(e,r,n,a,i);case rv.OperationTypeNode.SUBSCRIPTION:return XN(e,r,n,a,i)}}function gX(e,t,n,r,i){return(0,TX.promiseReduce)(i.entries(),(a,[o,u])=>{let l=(0,gc.addPath)(r,o,t.name),d=nC(e,t,n,u,l);return d===void 0?a:(0,Ta.isPromise)(d)?d.then(p=>(a[o]=p,a)):(a[o]=d,a)},Object.create(null))}function XN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[u,l]of i.entries()){let d=(0,gc.addPath)(r,u,t.name),p=nC(e,t,n,l,d);p!==void 0&&(a[u]=p,(0,Ta.isPromise)(p)&&(o=!0))}}catch(u){if(o)return(0,YL.promiseForObject)(a).finally(()=>{throw u});throw u}return o?(0,YL.promiseForObject)(a):a}function nC(e,t,n,r,i){var a;let o=aC(e.schema,t,r[0]);if(!o)return;let u=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=rC(e,o,r,t,i);try{let p=(0,XL.getArgumentValues)(o,r[0],e.variableValues),E=e.contextValue,I=l(n,p,E,d),v;return(0,Ta.isPromise)(I)?v=I.then(A=>Lf(e,u,r,d,i,A)):v=Lf(e,u,r,d,i,I),(0,Ta.isPromise)(v)?v.then(void 0,A=>{let U=(0,WN.locatedError)(A,r,(0,gc.pathToArray)(i));return ZN(U,u,e)}):v}catch(p){let E=(0,WN.locatedError)(p,r,(0,gc.pathToArray)(i));return ZN(E,u,e)}}function rC(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 ZN(e,t,n){if((0,_u.isNonNullType)(t))throw e;return n.errors.push(e),null}function Lf(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,_u.isNonNullType)(t)){let o=Lf(e,t.ofType,n,r,i,a);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(a==null)return null;if((0,_u.isListType)(t))return _X(e,t,n,r,i,a);if((0,_u.isLeafType)(t))return vX(t,a);if((0,_u.isAbstractType)(t))return OX(e,t,n,r,i,a);if((0,_u.isObjectType)(t))return av(e,t,n,r,i,a);(0,pX.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Ic.inspect)(t))}function _X(e,t,n,r,i,a){if(!(0,mX.isIterableObject)(a))throw new xi.GraphQLError(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);let o=t.ofType,u=!1,l=Array.from(a,(d,p)=>{let E=(0,gc.addPath)(i,p,void 0);try{let I;return(0,Ta.isPromise)(d)?I=d.then(v=>Lf(e,o,n,r,E,v)):I=Lf(e,o,n,r,E,d),(0,Ta.isPromise)(I)?(u=!0,I.then(void 0,v=>{let A=(0,WN.locatedError)(v,n,(0,gc.pathToArray)(E));return ZN(A,o,e)})):I}catch(I){let v=(0,WN.locatedError)(I,n,(0,gc.pathToArray)(E));return ZN(v,o,e)}});return u?Promise.all(l):l}function vX(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Ic.inspect)(e)}.serialize(${(0,Ic.inspect)(t)})\` to return non-nullable value, returned: ${(0,Ic.inspect)(n)}`);return n}function OX(e,t,n,r,i,a){var o;let u=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,l=e.contextValue,d=u(a,l,r,t);return(0,Ta.isPromise)(d)?d.then(p=>av(e,HL(p,e,t,n,r,a),n,r,i,a)):av(e,HL(d,e,t,n,r,a),n,r,i,a)}function HL(e,t,n,r,i,a){if(e==null)throw new xi.GraphQLError(`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((0,_u.isObjectType)(e))throw new xi.GraphQLError("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new xi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Ic.inspect)(a)}, received "${(0,Ic.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,_u.isObjectType)(o))throw new xi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new xi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function av(e,t,n,r,i,a){let o=hX(e,t,n);if(t.isTypeOf){let u=t.isTypeOf(a,e.contextValue,r);if((0,Ta.isPromise)(u))return u.then(l=>{if(!l)throw zL(t,a,n);return XN(e,t,a,i,o)});if(!u)throw zL(t,a,n)}return XN(e,t,a,i,o)}function zL(e,t,n){return new xi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Ic.inspect)(t)}.`,{nodes:n})}var iC=function(e,t,n,r){if((0,ov.isObjectLike)(e)&&typeof e.__typename=="string")return e.__typename;let i=n.schema.getPossibleTypes(r),a=[];for(let o=0;o{for(let u=0;u{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.graphql=FX;eT.graphqlSync=wX;var SX=Vr(),DX=zm(),bX=vl(),AX=_f(),RX=Bl(),PX=Cf();function FX(e){return new Promise(t=>t(sC(e)))}function wX(e){let t=sC(e);if((0,DX.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sC(e){arguments.length<2||(0,SX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let{schema:t,source:n,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l}=e,d=(0,AX.validateSchema)(t);if(d.length>0)return{errors:d};let p;try{p=(0,bX.parse)(n)}catch(I){return{errors:[I]}}let E=(0,RX.validate)(t,p);return E.length>0?{errors:E}:(0,PX.execute)({schema:t,document:p,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:u,typeResolver:l})}});var lC=w(he=>{"use strict";m();T();N();Object.defineProperty(he,"__esModule",{value:!0});Object.defineProperty(he,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return Ea.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(he,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MAX_INT}});Object.defineProperty(he,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Fs.GRAPHQL_MIN_INT}});Object.defineProperty(he,"GraphQLBoolean",{enumerable:!0,get:function(){return Fs.GraphQLBoolean}});Object.defineProperty(he,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return Ea.GraphQLDeprecatedDirective}});Object.defineProperty(he,"GraphQLDirective",{enumerable:!0,get:function(){return Ea.GraphQLDirective}});Object.defineProperty(he,"GraphQLEnumType",{enumerable:!0,get:function(){return at.GraphQLEnumType}});Object.defineProperty(he,"GraphQLFloat",{enumerable:!0,get:function(){return Fs.GraphQLFloat}});Object.defineProperty(he,"GraphQLID",{enumerable:!0,get:function(){return Fs.GraphQLID}});Object.defineProperty(he,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return Ea.GraphQLIncludeDirective}});Object.defineProperty(he,"GraphQLInputObjectType",{enumerable:!0,get:function(){return at.GraphQLInputObjectType}});Object.defineProperty(he,"GraphQLInt",{enumerable:!0,get:function(){return Fs.GraphQLInt}});Object.defineProperty(he,"GraphQLInterfaceType",{enumerable:!0,get:function(){return at.GraphQLInterfaceType}});Object.defineProperty(he,"GraphQLList",{enumerable:!0,get:function(){return at.GraphQLList}});Object.defineProperty(he,"GraphQLNonNull",{enumerable:!0,get:function(){return at.GraphQLNonNull}});Object.defineProperty(he,"GraphQLObjectType",{enumerable:!0,get:function(){return at.GraphQLObjectType}});Object.defineProperty(he,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return Ea.GraphQLOneOfDirective}});Object.defineProperty(he,"GraphQLScalarType",{enumerable:!0,get:function(){return at.GraphQLScalarType}});Object.defineProperty(he,"GraphQLSchema",{enumerable:!0,get:function(){return uv.GraphQLSchema}});Object.defineProperty(he,"GraphQLSkipDirective",{enumerable:!0,get:function(){return Ea.GraphQLSkipDirective}});Object.defineProperty(he,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return Ea.GraphQLSpecifiedByDirective}});Object.defineProperty(he,"GraphQLString",{enumerable:!0,get:function(){return Fs.GraphQLString}});Object.defineProperty(he,"GraphQLUnionType",{enumerable:!0,get:function(){return at.GraphQLUnionType}});Object.defineProperty(he,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ei.SchemaMetaFieldDef}});Object.defineProperty(he,"TypeKind",{enumerable:!0,get:function(){return ei.TypeKind}});Object.defineProperty(he,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeMetaFieldDef}});Object.defineProperty(he,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ei.TypeNameMetaFieldDef}});Object.defineProperty(he,"__Directive",{enumerable:!0,get:function(){return ei.__Directive}});Object.defineProperty(he,"__DirectiveLocation",{enumerable:!0,get:function(){return ei.__DirectiveLocation}});Object.defineProperty(he,"__EnumValue",{enumerable:!0,get:function(){return ei.__EnumValue}});Object.defineProperty(he,"__Field",{enumerable:!0,get:function(){return ei.__Field}});Object.defineProperty(he,"__InputValue",{enumerable:!0,get:function(){return ei.__InputValue}});Object.defineProperty(he,"__Schema",{enumerable:!0,get:function(){return ei.__Schema}});Object.defineProperty(he,"__Type",{enumerable:!0,get:function(){return ei.__Type}});Object.defineProperty(he,"__TypeKind",{enumerable:!0,get:function(){return ei.__TypeKind}});Object.defineProperty(he,"assertAbstractType",{enumerable:!0,get:function(){return at.assertAbstractType}});Object.defineProperty(he,"assertCompositeType",{enumerable:!0,get:function(){return at.assertCompositeType}});Object.defineProperty(he,"assertDirective",{enumerable:!0,get:function(){return Ea.assertDirective}});Object.defineProperty(he,"assertEnumType",{enumerable:!0,get:function(){return at.assertEnumType}});Object.defineProperty(he,"assertEnumValueName",{enumerable:!0,get:function(){return cC.assertEnumValueName}});Object.defineProperty(he,"assertInputObjectType",{enumerable:!0,get:function(){return at.assertInputObjectType}});Object.defineProperty(he,"assertInputType",{enumerable:!0,get:function(){return at.assertInputType}});Object.defineProperty(he,"assertInterfaceType",{enumerable:!0,get:function(){return at.assertInterfaceType}});Object.defineProperty(he,"assertLeafType",{enumerable:!0,get:function(){return at.assertLeafType}});Object.defineProperty(he,"assertListType",{enumerable:!0,get:function(){return at.assertListType}});Object.defineProperty(he,"assertName",{enumerable:!0,get:function(){return cC.assertName}});Object.defineProperty(he,"assertNamedType",{enumerable:!0,get:function(){return at.assertNamedType}});Object.defineProperty(he,"assertNonNullType",{enumerable:!0,get:function(){return at.assertNonNullType}});Object.defineProperty(he,"assertNullableType",{enumerable:!0,get:function(){return at.assertNullableType}});Object.defineProperty(he,"assertObjectType",{enumerable:!0,get:function(){return at.assertObjectType}});Object.defineProperty(he,"assertOutputType",{enumerable:!0,get:function(){return at.assertOutputType}});Object.defineProperty(he,"assertScalarType",{enumerable:!0,get:function(){return at.assertScalarType}});Object.defineProperty(he,"assertSchema",{enumerable:!0,get:function(){return uv.assertSchema}});Object.defineProperty(he,"assertType",{enumerable:!0,get:function(){return at.assertType}});Object.defineProperty(he,"assertUnionType",{enumerable:!0,get:function(){return at.assertUnionType}});Object.defineProperty(he,"assertValidSchema",{enumerable:!0,get:function(){return uC.assertValidSchema}});Object.defineProperty(he,"assertWrappingType",{enumerable:!0,get:function(){return at.assertWrappingType}});Object.defineProperty(he,"getNamedType",{enumerable:!0,get:function(){return at.getNamedType}});Object.defineProperty(he,"getNullableType",{enumerable:!0,get:function(){return at.getNullableType}});Object.defineProperty(he,"introspectionTypes",{enumerable:!0,get:function(){return ei.introspectionTypes}});Object.defineProperty(he,"isAbstractType",{enumerable:!0,get:function(){return at.isAbstractType}});Object.defineProperty(he,"isCompositeType",{enumerable:!0,get:function(){return at.isCompositeType}});Object.defineProperty(he,"isDirective",{enumerable:!0,get:function(){return Ea.isDirective}});Object.defineProperty(he,"isEnumType",{enumerable:!0,get:function(){return at.isEnumType}});Object.defineProperty(he,"isInputObjectType",{enumerable:!0,get:function(){return at.isInputObjectType}});Object.defineProperty(he,"isInputType",{enumerable:!0,get:function(){return at.isInputType}});Object.defineProperty(he,"isInterfaceType",{enumerable:!0,get:function(){return at.isInterfaceType}});Object.defineProperty(he,"isIntrospectionType",{enumerable:!0,get:function(){return ei.isIntrospectionType}});Object.defineProperty(he,"isLeafType",{enumerable:!0,get:function(){return at.isLeafType}});Object.defineProperty(he,"isListType",{enumerable:!0,get:function(){return at.isListType}});Object.defineProperty(he,"isNamedType",{enumerable:!0,get:function(){return at.isNamedType}});Object.defineProperty(he,"isNonNullType",{enumerable:!0,get:function(){return at.isNonNullType}});Object.defineProperty(he,"isNullableType",{enumerable:!0,get:function(){return at.isNullableType}});Object.defineProperty(he,"isObjectType",{enumerable:!0,get:function(){return at.isObjectType}});Object.defineProperty(he,"isOutputType",{enumerable:!0,get:function(){return at.isOutputType}});Object.defineProperty(he,"isRequiredArgument",{enumerable:!0,get:function(){return at.isRequiredArgument}});Object.defineProperty(he,"isRequiredInputField",{enumerable:!0,get:function(){return at.isRequiredInputField}});Object.defineProperty(he,"isScalarType",{enumerable:!0,get:function(){return at.isScalarType}});Object.defineProperty(he,"isSchema",{enumerable:!0,get:function(){return uv.isSchema}});Object.defineProperty(he,"isSpecifiedDirective",{enumerable:!0,get:function(){return Ea.isSpecifiedDirective}});Object.defineProperty(he,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Fs.isSpecifiedScalarType}});Object.defineProperty(he,"isType",{enumerable:!0,get:function(){return at.isType}});Object.defineProperty(he,"isUnionType",{enumerable:!0,get:function(){return at.isUnionType}});Object.defineProperty(he,"isWrappingType",{enumerable:!0,get:function(){return at.isWrappingType}});Object.defineProperty(he,"resolveObjMapThunk",{enumerable:!0,get:function(){return at.resolveObjMapThunk}});Object.defineProperty(he,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return at.resolveReadonlyArrayThunk}});Object.defineProperty(he,"specifiedDirectives",{enumerable:!0,get:function(){return Ea.specifiedDirectives}});Object.defineProperty(he,"specifiedScalarTypes",{enumerable:!0,get:function(){return Fs.specifiedScalarTypes}});Object.defineProperty(he,"validateSchema",{enumerable:!0,get:function(){return uC.validateSchema}});var uv=Nc(),at=Lt(),Ea=Xr(),Fs=Ga(),ei=ki(),uC=_f(),cC=of()});var fC=w(Ut=>{"use strict";m();T();N();Object.defineProperty(Ut,"__esModule",{value:!0});Object.defineProperty(Ut,"BREAK",{enumerable:!0,get:function(){return Bf.BREAK}});Object.defineProperty(Ut,"DirectiveLocation",{enumerable:!0,get:function(){return xX.DirectiveLocation}});Object.defineProperty(Ut,"Kind",{enumerable:!0,get:function(){return BX.Kind}});Object.defineProperty(Ut,"Lexer",{enumerable:!0,get:function(){return kX.Lexer}});Object.defineProperty(Ut,"Location",{enumerable:!0,get:function(){return cv.Location}});Object.defineProperty(Ut,"OperationTypeNode",{enumerable:!0,get:function(){return cv.OperationTypeNode}});Object.defineProperty(Ut,"Source",{enumerable:!0,get:function(){return LX.Source}});Object.defineProperty(Ut,"Token",{enumerable:!0,get:function(){return cv.Token}});Object.defineProperty(Ut,"TokenKind",{enumerable:!0,get:function(){return UX.TokenKind}});Object.defineProperty(Ut,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Bf.getEnterLeaveForKind}});Object.defineProperty(Ut,"getLocation",{enumerable:!0,get:function(){return CX.getLocation}});Object.defineProperty(Ut,"getVisitFn",{enumerable:!0,get:function(){return Bf.getVisitFn}});Object.defineProperty(Ut,"isConstValueNode",{enumerable:!0,get:function(){return Ha.isConstValueNode}});Object.defineProperty(Ut,"isDefinitionNode",{enumerable:!0,get:function(){return Ha.isDefinitionNode}});Object.defineProperty(Ut,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ha.isExecutableDefinitionNode}});Object.defineProperty(Ut,"isSelectionNode",{enumerable:!0,get:function(){return Ha.isSelectionNode}});Object.defineProperty(Ut,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeDefinitionNode}});Object.defineProperty(Ut,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeExtensionNode}});Object.defineProperty(Ut,"isTypeNode",{enumerable:!0,get:function(){return Ha.isTypeNode}});Object.defineProperty(Ut,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemDefinitionNode}});Object.defineProperty(Ut,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ha.isTypeSystemExtensionNode}});Object.defineProperty(Ut,"isValueNode",{enumerable:!0,get:function(){return Ha.isValueNode}});Object.defineProperty(Ut,"parse",{enumerable:!0,get:function(){return tT.parse}});Object.defineProperty(Ut,"parseConstValue",{enumerable:!0,get:function(){return tT.parseConstValue}});Object.defineProperty(Ut,"parseType",{enumerable:!0,get:function(){return tT.parseType}});Object.defineProperty(Ut,"parseValue",{enumerable:!0,get:function(){return tT.parseValue}});Object.defineProperty(Ut,"print",{enumerable:!0,get:function(){return MX.print}});Object.defineProperty(Ut,"printLocation",{enumerable:!0,get:function(){return dC.printLocation}});Object.defineProperty(Ut,"printSourceLocation",{enumerable:!0,get:function(){return dC.printSourceLocation}});Object.defineProperty(Ut,"visit",{enumerable:!0,get:function(){return Bf.visit}});Object.defineProperty(Ut,"visitInParallel",{enumerable:!0,get:function(){return Bf.visitInParallel}});var LX=sN(),CX=Wm(),dC=aI(),BX=wt(),UX=Xd(),kX=nN(),tT=vl(),MX=Ti(),Bf=cc(),cv=ja(),Ha=Ec(),xX=gl()});var pC=w(lv=>{"use strict";m();T();N();Object.defineProperty(lv,"__esModule",{value:!0});lv.isAsyncIterable=qX;function qX(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var mC=w(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.mapAsyncIterator=VX;function VX(e,t){let n=e[Symbol.asyncIterator]();function r(a){return wi(this,null,function*(){if(a.done)return a;try{return{value:yield t(a.value),done:!1}}catch(o){if(typeof n.return=="function")try{yield n.return()}catch(u){}throw o}})}return{next(){return wi(this,null,function*(){return r(yield n.next())})},return(){return wi(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return wi(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var hC=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.createSourceEventStream=EC;nT.subscribe=JX;var jX=Vr(),KX=Wt(),TC=pC(),NC=Sf(),fv=ze(),$X=HN(),GX=GN(),Uf=Cf(),QX=mC(),YX=Ll();function JX(t){return wi(this,arguments,function*(e){arguments.length<2||(0,jX.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield EC(e);if(!(0,TC.isAsyncIterable)(n))return n;let r=i=>(0,Uf.execute)($(k({},e),{rootValue:i}));return(0,QX.mapAsyncIterator)(n,r)})}function HX(e){let 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]}}function EC(...e){return wi(this,null,function*(){let t=HX(e),{schema:n,document:r,variableValues:i}=t;(0,Uf.assertValidExecutionArguments)(n,r,i);let a=(0,Uf.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield zX(a);if(!(0,TC.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,KX.inspect)(o)}.`);return o}catch(o){if(o instanceof fv.GraphQLError)return{errors:[o]};throw o}})}function zX(e){return wi(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new fv.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let u=(0,GX.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...u.entries()][0],p=(0,Uf.getFieldDef)(t,o,d[0]);if(!p){let A=d[0].name.value;throw new fv.GraphQLError(`The subscription field "${A}" is not defined.`,{nodes:d})}let E=(0,NC.addPath)(void 0,l,o.name),I=(0,Uf.buildResolveInfo)(e,p,d,o,E);try{var v;let A=(0,YX.getArgumentValues)(p,d[0],i),U=e.contextValue,Q=yield((v=p.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,A,U,I);if(Q instanceof Error)throw Q;return Q}catch(A){throw(0,$X.locatedError)(A,d,(0,NC.pathToArray)(E))}})}});var IC=w(Vi=>{"use strict";m();T();N();Object.defineProperty(Vi,"__esModule",{value:!0});Object.defineProperty(Vi,"createSourceEventStream",{enumerable:!0,get:function(){return yC.createSourceEventStream}});Object.defineProperty(Vi,"defaultFieldResolver",{enumerable:!0,get:function(){return rT.defaultFieldResolver}});Object.defineProperty(Vi,"defaultTypeResolver",{enumerable:!0,get:function(){return rT.defaultTypeResolver}});Object.defineProperty(Vi,"execute",{enumerable:!0,get:function(){return rT.execute}});Object.defineProperty(Vi,"executeSync",{enumerable:!0,get:function(){return rT.executeSync}});Object.defineProperty(Vi,"getArgumentValues",{enumerable:!0,get:function(){return pv.getArgumentValues}});Object.defineProperty(Vi,"getDirectiveValues",{enumerable:!0,get:function(){return pv.getDirectiveValues}});Object.defineProperty(Vi,"getVariableValues",{enumerable:!0,get:function(){return pv.getVariableValues}});Object.defineProperty(Vi,"responsePathAsArray",{enumerable:!0,get:function(){return WX.pathToArray}});Object.defineProperty(Vi,"subscribe",{enumerable:!0,get:function(){return yC.subscribe}});var WX=Sf(),rT=Cf(),yC=hC(),pv=Ll()});var gC=w(Tv=>{"use strict";m();T();N();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.NoDeprecatedCustomRule=XX;var mv=Ar(),kf=ze(),Nv=Lt();function XX(e){return{Field(t){let n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new kf.GraphQLError(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let a=e.getParentType(),o=e.getFieldDef();a!=null&&o!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,Nv.getNamedType)(e.getParentInputType());if((0,Nv.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new kf.GraphQLError(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){let i=(0,Nv.getNamedType)(e.getInputType());i!=null||(0,mv.invariant)(!1),e.reportError(new kf.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var _C=w(Ev=>{"use strict";m();T();N();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.NoSchemaIntrospectionCustomRule=n5;var ZX=ze(),e5=Lt(),t5=ki();function n5(e){return{Field(t){let n=(0,e5.getNamedType)(e.getType());n&&(0,t5.isIntrospectionType)(n)&&e.reportError(new ZX.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var OC=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return a5.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return s5.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return o5.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return u5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return c5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return l5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return d5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return f5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return w5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return F5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return q5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return p5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return V5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return m5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return N5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return T5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return E5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return h5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return x5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return y5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return I5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return g5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return k5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return _5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return M5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return v5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return B5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return U5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return O5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return S5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return D5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return L5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return C5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return b5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return i5.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return A5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return R5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return P5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return vC.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return vC.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return r5.validate}});var r5=Bl(),i5=H_(),vC=Q_(),a5=cg(),s5=dg(),o5=pg(),u5=mg(),c5=hg(),l5=Ig(),d5=vg(),f5=Sg(),p5=Fg(),m5=Lg(),N5=Bg(),T5=kg(),E5=Yg(),h5=zg(),y5=e_(),I5=n_(),g5=d_(),_5=T_(),v5=g_(),O5=A_(),S5=P_(),D5=w_(),b5=M_(),A5=V_(),R5=K_(),P5=G_(),F5=Rg(),w5=bg(),L5=C_(),C5=U_(),B5=v_(),U5=D_(),k5=m_(),M5=h_(),x5=Xg(),q5=gC(),V5=_C()});var SC=w(_c=>{"use strict";m();T();N();Object.defineProperty(_c,"__esModule",{value:!0});Object.defineProperty(_c,"GraphQLError",{enumerable:!0,get:function(){return hv.GraphQLError}});Object.defineProperty(_c,"formatError",{enumerable:!0,get:function(){return hv.formatError}});Object.defineProperty(_c,"locatedError",{enumerable:!0,get:function(){return K5.locatedError}});Object.defineProperty(_c,"printError",{enumerable:!0,get:function(){return hv.printError}});Object.defineProperty(_c,"syntaxError",{enumerable:!0,get:function(){return j5.syntaxError}});var hv=ze(),j5=Zm(),K5=HN()});var Iv=w(yv=>{"use strict";m();T();N();Object.defineProperty(yv,"__esModule",{value:!0});yv.getIntrospectionQuery=$5;function $5(e){let t=k({descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1},e),n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",a=t.schemaDescription?n:"";function o(l){return t.inputValueDeprecation?l:""}let u=t.oneOf?"isOneOf":"";return` query IntrospectionQuery { __schema { ${a} @@ -177,85 +177,85 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}});var DC=w(gv=>{"use strict";m();T();N();Object.defineProperty(gv,"__esModule",{value:!0});gv.getOperationAST=G5;var $5=wt();function G5(e,t){let n=null;for(let i of e.definitions)if(i.kind===$5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var bC=w(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.getOperationRootType=Q5;var iT=ze();function Q5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new iT.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new iT.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new iT.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new iT.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var AC=w(vv=>{"use strict";m();T();N();Object.defineProperty(vv,"__esModule",{value:!0});vv.introspectionFromSchema=W5;var Y5=Ar(),J5=vl(),H5=Cf(),z5=Iv();function W5(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,J5.parse)((0,z5.getIntrospectionQuery)(n)),i=(0,H5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,Y5.invariant)(!1),i.data}});var PC=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildClientSchema=i9;var X5=Vr(),Ti=Wt(),RC=qa(),aT=af(),Z5=vl(),Ei=Lt(),e9=Xr(),Ha=Ui(),t9=$a(),n9=Nc(),r9=Rf();function i9(e,t){(0,RC.isObjectLike)(e)&&(0,RC.isObjectLike)(e.__schema)||(0,X5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,Ti.inspect)(e)}.`);let n=e.__schema,r=(0,aT.keyValMap)(n.types,Z=>Z.name,Z=>I(Z));for(let Z of[...t9.specifiedScalarTypes,...Ha.introspectionTypes])r[Z.name]&&(r[Z.name]=Z);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(Ze):[];return new n9.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(Z){if(Z.kind===Ha.TypeKind.LIST){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");return new Ei.GraphQLList(l(ve))}if(Z.kind===Ha.TypeKind.NON_NULL){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");let vt=l(ve);return new Ei.GraphQLNonNull((0,Ei.assertNullableType)(vt))}return d(Z)}function d(Z){let ve=Z.name;if(!ve)throw new Error(`Unknown type reference: ${(0,Ti.inspect)(Z)}.`);let vt=r[ve];if(!vt)throw new Error(`Invalid or incomplete schema, unknown type: ${ve}. Ensure that a full introspection query is used in order to build a client schema.`);return vt}function p(Z){return(0,Ei.assertObjectType)(d(Z))}function E(Z){return(0,Ei.assertInterfaceType)(d(Z))}function I(Z){if(Z!=null&&Z.name!=null&&Z.kind!=null)switch(Z.kind){case Ha.TypeKind.SCALAR:return v(Z);case Ha.TypeKind.OBJECT:return U(Z);case Ha.TypeKind.INTERFACE:return j(Z);case Ha.TypeKind.UNION:return Q(Z);case Ha.TypeKind.ENUM:return re(Z);case Ha.TypeKind.INPUT_OBJECT:return ee(Z)}let ve=(0,Ti.inspect)(Z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${ve}.`)}function v(Z){return new Ei.GraphQLScalarType({name:Z.name,description:Z.description,specifiedByURL:Z.specifiedByURL})}function A(Z){if(Z.interfaces===null&&Z.kind===Ha.TypeKind.INTERFACE)return[];if(!Z.interfaces){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing interfaces: ${ve}.`)}return Z.interfaces.map(E)}function U(Z){return new Ei.GraphQLObjectType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function j(Z){return new Ei.GraphQLInterfaceType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>me(Z)})}function Q(Z){if(!Z.possibleTypes){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing possibleTypes: ${ve}.`)}return new Ei.GraphQLUnionType({name:Z.name,description:Z.description,types:()=>Z.possibleTypes.map(p)})}function re(Z){if(!Z.enumValues){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing enumValues: ${ve}.`)}return new Ei.GraphQLEnumType({name:Z.name,description:Z.description,values:(0,aT.keyValMap)(Z.enumValues,ve=>ve.name,ve=>({description:ve.description,deprecationReason:ve.deprecationReason}))})}function ee(Z){if(!Z.inputFields){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing inputFields: ${ve}.`)}return new Ei.GraphQLInputObjectType({name:Z.name,description:Z.description,fields:()=>Ae(Z.inputFields),isOneOf:Z.isOneOf})}function me(Z){if(!Z.fields)throw new Error(`Introspection result missing fields: ${(0,Ti.inspect)(Z)}.`);return(0,aT.keyValMap)(Z.fields,ve=>ve.name,ue)}function ue(Z){let ve=l(Z.type);if(!(0,Ei.isOutputType)(ve)){let vt=(0,Ti.inspect)(ve);throw new Error(`Introspection must provide output type for fields, but received: ${vt}.`)}if(!Z.args){let vt=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing field args: ${vt}.`)}return{description:Z.description,deprecationReason:Z.deprecationReason,type:ve,args:Ae(Z.args)}}function Ae(Z){return(0,aT.keyValMap)(Z,ve=>ve.name,Me)}function Me(Z){let ve=l(Z.type);if(!(0,Ei.isInputType)(ve)){let rn=(0,Ti.inspect)(ve);throw new Error(`Introspection must provide input type for arguments, but received: ${rn}.`)}let vt=Z.defaultValue!=null?(0,r9.valueFromAST)((0,Z5.parseValue)(Z.defaultValue),ve):void 0;return{description:Z.description,type:ve,defaultValue:vt,deprecationReason:Z.deprecationReason}}function Ze(Z){if(!Z.args){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing directive args: ${ve}.`)}if(!Z.locations){let ve=(0,Ti.inspect)(Z);throw new Error(`Introspection result missing directive locations: ${ve}.`)}return new e9.GraphQLDirective({name:Z.name,description:Z.description,isRepeatable:Z.isRepeatable,locations:Z.locations.slice(),args:Ae(Z.args)})}}});var Dv=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.extendSchema=l9;oT.extendSchemaImpl=MC;var a9=Vr(),s9=Wt(),o9=Ar(),u9=Nu(),Mf=SI(),Vi=wt(),FC=Ec(),Sn=Lt(),xf=Xr(),UC=Ui(),kC=$a(),wC=Nc(),c9=Bl(),Sv=Ll(),LC=Rf();function l9(e,t,n){(0,wC.assertSchema)(e),t!=null&&t.kind===Vi.Kind.DOCUMENT||(0,a9.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,c9.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=MC(r,t,n);return r===i?e:new wC.GraphQLSchema(i)}function MC(e,t,n){var r,i,a,o;let u=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===Vi.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===Vi.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,FC.isTypeDefinitionNode)(ae))u.push(ae);else if((0,FC.isTypeExtensionNode)(ae)){let De=ae.name.value,ge=l[De];l[De]=ge?ge.concat([ae]):[ae]}else ae.kind===Vi.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=re(ae);for(let ae of u){var v;let De=ae.name.value;I[De]=(v=CC[De])!==null&&v!==void 0?v:Ln(ae)}let A=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&&vt([p])),vt(E));return $(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map(Q),...d.map(wn)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Sn.isListType)(ae)?new Sn.GraphQLList(U(ae.ofType)):(0,Sn.isNonNullType)(ae)?new Sn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function Q(ae){let De=ae.toConfig();return new xf.GraphQLDirective($(k({},De),{args:(0,Mf.mapValue)(De.args,ve)}))}function re(ae){if((0,UC.isIntrospectionType)(ae)||(0,kC.isSpecifiedScalarType)(ae))return ae;if((0,Sn.isScalarType)(ae))return ue(ae);if((0,Sn.isObjectType)(ae))return Ae(ae);if((0,Sn.isInterfaceType)(ae))return Me(ae);if((0,Sn.isUnionType)(ae))return Ze(ae);if((0,Sn.isEnumType)(ae))return me(ae);if((0,Sn.isInputObjectType)(ae))return ee(ae);(0,o9.invariant)(!1,"Unexpected type: "+(0,s9.inspect)(ae))}function ee(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInputObjectType($(k({},ge),{fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,St=>$(k({},St),{type:U(St.type)}))),kr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function me(ae){var De;let ge=ae.toConfig(),Le=(De=l[ae.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLEnumType($(k({},ge),{values:k(k({},ge.values),dr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function ue(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[],St=ge.specifiedByURL;for(let ie of Le){var Y;St=(Y=BC(ie))!==null&&Y!==void 0?Y:St}return new Sn.GraphQLScalarType($(k({},ge),{specifiedByURL:St,extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ae(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLObjectType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),Gt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Me(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLInterfaceType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...gn(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),Gt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ze(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Sn.GraphQLUnionType($(k({},ge),{types:()=>[...ae.getTypes().map(j),...Ht(Le)],extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Z(ae){return $(k({},ae),{type:U(ae.type),args:ae.args&&(0,Mf.mapValue)(ae.args,ve)})}function ve(ae){return $(k({},ae),{type:U(ae.type)})}function vt(ae){let De={};for(let Le of ae){var ge;let St=(ge=Le.operationTypes)!==null&&ge!==void 0?ge:[];for(let Y of St)De[Y.operation]=rn(Y.type)}return De}function rn(ae){var De;let ge=ae.name.value,Le=(De=CC[ge])!==null&&De!==void 0?De:I[ge];if(Le===void 0)throw new Error(`Unknown type: "${ge}".`);return Le}function an(ae){return ae.kind===Vi.Kind.LIST_TYPE?new Sn.GraphQLList(an(ae.type)):ae.kind===Vi.Kind.NON_NULL_TYPE?new Sn.GraphQLNonNull(an(ae.type)):rn(ae)}function wn(ae){var De;return new xf.GraphQLDirective({name:ae.name.value,description:(De=ae.description)===null||De===void 0?void 0:De.value,locations:ae.locations.map(({value:ge})=>ge),isRepeatable:ae.repeatable,args:Tn(ae.arguments),astNode:ae})}function Gt(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={type:an(ie.type),description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,args:Tn(ie.arguments),deprecationReason:sT(ie),astNode:ie}}}return De}function Tn(ae){let De=ae!=null?ae:[],ge=Object.create(null);for(let St of De){var Le;let Y=an(St.type);ge[St.name.value]={type:Y,description:(Le=St.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(St.defaultValue,Y),deprecationReason:sT(St),astNode:St}}return ge}function kr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;let xe=an(ie.type);De[ie.name.value]={type:xe,description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(ie.defaultValue,xe),deprecationReason:sT(ie),astNode:ie}}}return De}function dr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.values)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,deprecationReason:sT(ie),astNode:ie}}}return De}function gn(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.interfaces)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ht(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.types)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ln(ae){var De;let ge=ae.name.value,Le=(De=l[ge])!==null&&De!==void 0?De:[];switch(ae.kind){case Vi.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Le];return new Sn.GraphQLObjectType({name:ge,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>gn(it),fields:()=>Gt(it),astNode:ae,extensionASTNodes:Le})}case Vi.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let it=[ae,...Le];return new Sn.GraphQLInterfaceType({name:ge,description:(Y=ae.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>gn(it),fields:()=>Gt(it),astNode:ae,extensionASTNodes:Le})}case Vi.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Le];return new Sn.GraphQLEnumType({name:ge,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:dr(it),astNode:ae,extensionASTNodes:Le})}case Vi.Kind.UNION_TYPE_DEFINITION:{var xe;let it=[ae,...Le];return new Sn.GraphQLUnionType({name:ge,description:(xe=ae.description)===null||xe===void 0?void 0:xe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Le})}case Vi.Kind.SCALAR_TYPE_DEFINITION:{var He;return new Sn.GraphQLScalarType({name:ge,description:(He=ae.description)===null||He===void 0?void 0:He.value,specifiedByURL:BC(ae),astNode:ae,extensionASTNodes:Le})}case Vi.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Bt;let it=[ae,...Le];return new Sn.GraphQLInputObjectType({name:ge,description:(Bt=ae.description)===null||Bt===void 0?void 0:Bt.value,fields:()=>kr(it),astNode:ae,extensionASTNodes:Le,isOneOf:d9(ae)})}}}}var CC=(0,u9.keyMap)([...kC.specifiedScalarTypes,...UC.introspectionTypes],e=>e.name);function sT(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function BC(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function d9(e){return!!(0,Sv.getDirectiveValues)(xf.GraphQLOneOfDirective,e)}});var qC=w(uT=>{"use strict";m();T();N();Object.defineProperty(uT,"__esModule",{value:!0});uT.buildASTSchema=xC;uT.buildSchema=y9;var f9=Vr(),p9=wt(),m9=vl(),N9=Xr(),T9=Nc(),E9=Bl(),h9=Dv();function xC(e,t){e!=null&&e.kind===p9.Kind.DOCUMENT||(0,f9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,E9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,h9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...N9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new T9.GraphQLSchema($(k({},r),{directives:i}))}function y9(e,t){let n=(0,m9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return xC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var KC=w(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.lexicographicSortSchema=D9;var I9=Wt(),g9=Ar(),_9=af(),VC=sf(),jr=Lt(),v9=Xr(),O9=Ui(),S9=Nc();function D9(e){let t=e.toConfig(),n=(0,_9.keyValMap)(bv(t.types),I=>I.name,E);return new S9.GraphQLSchema($(k({},t),{types:Object.values(n),directives:bv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,jr.isListType)(I)?new jr.GraphQLList(r(I.ofType)):(0,jr.isNonNullType)(I)?new jr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new v9.GraphQLDirective($(k({},v),{locations:jC(v.locations,A=>A),args:u(v.args)}))}function u(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function l(I){return cT(I,v=>$(k({},v),{type:r(v.type),args:v.args&&u(v.args)}))}function d(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function p(I){return bv(I).map(i)}function E(I){if((0,jr.isScalarType)(I)||(0,O9.isIntrospectionType)(I))return I;if((0,jr.isObjectType)(I)){let v=I.toConfig();return new jr.GraphQLObjectType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isInterfaceType)(I)){let v=I.toConfig();return new jr.GraphQLInterfaceType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isUnionType)(I)){let v=I.toConfig();return new jr.GraphQLUnionType($(k({},v),{types:()=>p(v.types)}))}if((0,jr.isEnumType)(I)){let v=I.toConfig();return new jr.GraphQLEnumType($(k({},v),{values:cT(v.values,A=>A)}))}if((0,jr.isInputObjectType)(I)){let v=I.toConfig();return new jr.GraphQLInputObjectType($(k({},v),{fields:()=>d(v.fields)}))}(0,g9.invariant)(!1,"Unexpected type: "+(0,I9.inspect)(I))}}function cT(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(VC.naturalCompare))n[r]=t(e[r]);return n}function bv(e){return jC(e,t=>t.name)}function jC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,VC.naturalCompare)(i,a)})}});var zC=w(qf=>{"use strict";m();T();N();Object.defineProperty(qf,"__esModule",{value:!0});qf.printIntrospectionSchema=L9;qf.printSchema=w9;qf.printType=QC;var b9=Wt(),A9=Ar(),R9=zd(),Pv=wt(),lT=Ni(),kl=Lt(),Fv=Xr(),$C=Ui(),P9=$a(),F9=yf();function w9(e){return GC(e,t=>!(0,Fv.isSpecifiedDirective)(t),C9)}function L9(e){return GC(e,Fv.isSpecifiedDirective,$C.isIntrospectionType)}function C9(e){return!(0,P9.isSpecifiedScalarType)(e)&&!(0,$C.isIntrospectionType)(e)}function GC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[B9(e),...r.map(a=>K9(a)),...i.map(a=>QC(a))].filter(Boolean).join(` + `}});var DC=w(gv=>{"use strict";m();T();N();Object.defineProperty(gv,"__esModule",{value:!0});gv.getOperationAST=Q5;var G5=wt();function Q5(e,t){let n=null;for(let i of e.definitions)if(i.kind===G5.Kind.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}});var bC=w(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.getOperationRootType=Y5;var iT=ze();function Y5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new iT.GraphQLError("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){let n=e.getMutationType();if(!n)throw new iT.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new iT.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new iT.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var AC=w(vv=>{"use strict";m();T();N();Object.defineProperty(vv,"__esModule",{value:!0});vv.introspectionFromSchema=X5;var J5=Ar(),H5=vl(),z5=Cf(),W5=Iv();function X5(e,t){let n=k({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,H5.parse)((0,W5.getIntrospectionQuery)(n)),i=(0,z5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,J5.invariant)(!1),i.data}});var PC=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildClientSchema=a9;var Z5=Vr(),Ei=Wt(),RC=Va(),aT=af(),e9=vl(),hi=Lt(),t9=Xr(),za=ki(),n9=Ga(),r9=Nc(),i9=Rf();function a9(e,t){(0,RC.isObjectLike)(e)&&(0,RC.isObjectLike)(e.__schema)||(0,Z5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,Ei.inspect)(e)}.`);let n=e.__schema,r=(0,aT.keyValMap)(n.types,Z=>Z.name,Z=>I(Z));for(let Z of[...n9.specifiedScalarTypes,...za.introspectionTypes])r[Z.name]&&(r[Z.name]=Z);let i=n.queryType?p(n.queryType):null,a=n.mutationType?p(n.mutationType):null,o=n.subscriptionType?p(n.subscriptionType):null,u=n.directives?n.directives.map(Ze):[];return new r9.GraphQLSchema({description:n.description,query:i,mutation:a,subscription:o,types:Object.values(r),directives:u,assumeValid:t==null?void 0:t.assumeValid});function l(Z){if(Z.kind===za.TypeKind.LIST){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");return new hi.GraphQLList(l(ve))}if(Z.kind===za.TypeKind.NON_NULL){let ve=Z.ofType;if(!ve)throw new Error("Decorated type deeper than introspection query.");let gt=l(ve);return new hi.GraphQLNonNull((0,hi.assertNullableType)(gt))}return d(Z)}function d(Z){let ve=Z.name;if(!ve)throw new Error(`Unknown type reference: ${(0,Ei.inspect)(Z)}.`);let gt=r[ve];if(!gt)throw new Error(`Invalid or incomplete schema, unknown type: ${ve}. Ensure that a full introspection query is used in order to build a client schema.`);return gt}function p(Z){return(0,hi.assertObjectType)(d(Z))}function E(Z){return(0,hi.assertInterfaceType)(d(Z))}function I(Z){if(Z!=null&&Z.name!=null&&Z.kind!=null)switch(Z.kind){case za.TypeKind.SCALAR:return v(Z);case za.TypeKind.OBJECT:return U(Z);case za.TypeKind.INTERFACE:return j(Z);case za.TypeKind.UNION:return Q(Z);case za.TypeKind.ENUM:return ee(Z);case za.TypeKind.INPUT_OBJECT:return ne(Z)}let ve=(0,Ei.inspect)(Z);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${ve}.`)}function v(Z){return new hi.GraphQLScalarType({name:Z.name,description:Z.description,specifiedByURL:Z.specifiedByURL})}function A(Z){if(Z.interfaces===null&&Z.kind===za.TypeKind.INTERFACE)return[];if(!Z.interfaces){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing interfaces: ${ve}.`)}return Z.interfaces.map(E)}function U(Z){return new hi.GraphQLObjectType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>pe(Z)})}function j(Z){return new hi.GraphQLInterfaceType({name:Z.name,description:Z.description,interfaces:()=>A(Z),fields:()=>pe(Z)})}function Q(Z){if(!Z.possibleTypes){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing possibleTypes: ${ve}.`)}return new hi.GraphQLUnionType({name:Z.name,description:Z.description,types:()=>Z.possibleTypes.map(p)})}function ee(Z){if(!Z.enumValues){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing enumValues: ${ve}.`)}return new hi.GraphQLEnumType({name:Z.name,description:Z.description,values:(0,aT.keyValMap)(Z.enumValues,ve=>ve.name,ve=>({description:ve.description,deprecationReason:ve.deprecationReason}))})}function ne(Z){if(!Z.inputFields){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing inputFields: ${ve}.`)}return new hi.GraphQLInputObjectType({name:Z.name,description:Z.description,fields:()=>Ae(Z.inputFields),isOneOf:Z.isOneOf})}function pe(Z){if(!Z.fields)throw new Error(`Introspection result missing fields: ${(0,Ei.inspect)(Z)}.`);return(0,aT.keyValMap)(Z.fields,ve=>ve.name,le)}function le(Z){let ve=l(Z.type);if(!(0,hi.isOutputType)(ve)){let gt=(0,Ei.inspect)(ve);throw new Error(`Introspection must provide output type for fields, but received: ${gt}.`)}if(!Z.args){let gt=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing field args: ${gt}.`)}return{description:Z.description,deprecationReason:Z.deprecationReason,type:ve,args:Ae(Z.args)}}function Ae(Z){return(0,aT.keyValMap)(Z,ve=>ve.name,Me)}function Me(Z){let ve=l(Z.type);if(!(0,hi.isInputType)(ve)){let rn=(0,Ei.inspect)(ve);throw new Error(`Introspection must provide input type for arguments, but received: ${rn}.`)}let gt=Z.defaultValue!=null?(0,i9.valueFromAST)((0,e9.parseValue)(Z.defaultValue),ve):void 0;return{description:Z.description,type:ve,defaultValue:gt,deprecationReason:Z.deprecationReason}}function Ze(Z){if(!Z.args){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing directive args: ${ve}.`)}if(!Z.locations){let ve=(0,Ei.inspect)(Z);throw new Error(`Introspection result missing directive locations: ${ve}.`)}return new t9.GraphQLDirective({name:Z.name,description:Z.description,isRepeatable:Z.isRepeatable,locations:Z.locations.slice(),args:Ae(Z.args)})}}});var Dv=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.extendSchema=d9;oT.extendSchemaImpl=MC;var s9=Vr(),o9=Wt(),u9=Ar(),c9=Nu(),Mf=SI(),ji=wt(),FC=Ec(),Dn=Lt(),xf=Xr(),UC=ki(),kC=Ga(),wC=Nc(),l9=Bl(),Sv=Ll(),LC=Rf();function d9(e,t,n){(0,wC.assertSchema)(e),t!=null&&t.kind===ji.Kind.DOCUMENT||(0,s9.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,l9.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=MC(r,t,n);return r===i?e:new wC.GraphQLSchema(i)}function MC(e,t,n){var r,i,a,o;let u=[],l=Object.create(null),d=[],p,E=[];for(let ae of t.definitions)if(ae.kind===ji.Kind.SCHEMA_DEFINITION)p=ae;else if(ae.kind===ji.Kind.SCHEMA_EXTENSION)E.push(ae);else if((0,FC.isTypeDefinitionNode)(ae))u.push(ae);else if((0,FC.isTypeExtensionNode)(ae)){let De=ae.name.value,ge=l[De];l[De]=ge?ge.concat([ae]):[ae]}else ae.kind===ji.Kind.DIRECTIVE_DEFINITION&&d.push(ae);if(Object.keys(l).length===0&&u.length===0&&d.length===0&&E.length===0&&p==null)return e;let I=Object.create(null);for(let ae of e.types)I[ae.name]=ee(ae);for(let ae of u){var v;let De=ae.name.value;I[De]=(v=CC[De])!==null&&v!==void 0?v:Ln(ae)}let A=k(k({query:e.query&&j(e.query),mutation:e.mutation&&j(e.mutation),subscription:e.subscription&&j(e.subscription)},p&>([p])),gt(E));return $(k({description:(r=p)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},A),{types:Object.values(I),directives:[...e.directives.map(Q),...d.map(In)],extensions:Object.create(null),astNode:(a=p)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(E),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function U(ae){return(0,Dn.isListType)(ae)?new Dn.GraphQLList(U(ae.ofType)):(0,Dn.isNonNullType)(ae)?new Dn.GraphQLNonNull(U(ae.ofType)):j(ae)}function j(ae){return I[ae.name]}function Q(ae){let De=ae.toConfig();return new xf.GraphQLDirective($(k({},De),{args:(0,Mf.mapValue)(De.args,ve)}))}function ee(ae){if((0,UC.isIntrospectionType)(ae)||(0,kC.isSpecifiedScalarType)(ae))return ae;if((0,Dn.isScalarType)(ae))return le(ae);if((0,Dn.isObjectType)(ae))return Ae(ae);if((0,Dn.isInterfaceType)(ae))return Me(ae);if((0,Dn.isUnionType)(ae))return Ze(ae);if((0,Dn.isEnumType)(ae))return pe(ae);if((0,Dn.isInputObjectType)(ae))return ne(ae);(0,u9.invariant)(!1,"Unexpected type: "+(0,o9.inspect)(ae))}function ne(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLInputObjectType($(k({},ge),{fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,St=>$(k({},St),{type:U(St.type)}))),kr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function pe(ae){var De;let ge=ae.toConfig(),Le=(De=l[ae.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLEnumType($(k({},ge),{values:k(k({},ge.values),nr(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function le(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[],St=ge.specifiedByURL;for(let ie of Le){var Y;St=(Y=BC(ie))!==null&&Y!==void 0?Y:St}return new Dn.GraphQLScalarType($(k({},ge),{specifiedByURL:St,extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ae(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLObjectType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...En(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),xt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Me(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLInterfaceType($(k({},ge),{interfaces:()=>[...ae.getInterfaces().map(j),...En(Le)],fields:()=>k(k({},(0,Mf.mapValue)(ge.fields,Z)),xt(Le)),extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Ze(ae){var De;let ge=ae.toConfig(),Le=(De=l[ge.name])!==null&&De!==void 0?De:[];return new Dn.GraphQLUnionType($(k({},ge),{types:()=>[...ae.getTypes().map(j),...Ht(Le)],extensionASTNodes:ge.extensionASTNodes.concat(Le)}))}function Z(ae){return $(k({},ae),{type:U(ae.type),args:ae.args&&(0,Mf.mapValue)(ae.args,ve)})}function ve(ae){return $(k({},ae),{type:U(ae.type)})}function gt(ae){let De={};for(let Le of ae){var ge;let St=(ge=Le.operationTypes)!==null&&ge!==void 0?ge:[];for(let Y of St)De[Y.operation]=rn(Y.type)}return De}function rn(ae){var De;let ge=ae.name.value,Le=(De=CC[ge])!==null&&De!==void 0?De:I[ge];if(Le===void 0)throw new Error(`Unknown type: "${ge}".`);return Le}function un(ae){return ae.kind===ji.Kind.LIST_TYPE?new Dn.GraphQLList(un(ae.type)):ae.kind===ji.Kind.NON_NULL_TYPE?new Dn.GraphQLNonNull(un(ae.type)):rn(ae)}function In(ae){var De;return new xf.GraphQLDirective({name:ae.name.value,description:(De=ae.description)===null||De===void 0?void 0:De.value,locations:ae.locations.map(({value:ge})=>ge),isRepeatable:ae.repeatable,args:an(ae.arguments),astNode:ae})}function xt(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={type:un(ie.type),description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,args:an(ie.arguments),deprecationReason:sT(ie),astNode:ie}}}return De}function an(ae){let De=ae!=null?ae:[],ge=Object.create(null);for(let St of De){var Le;let Y=un(St.type);ge[St.name.value]={type:Y,description:(Le=St.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(St.defaultValue,Y),deprecationReason:sT(St),astNode:St}}return ge}function kr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.fields)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;let xe=un(ie.type);De[ie.name.value]={type:xe,description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,defaultValue:(0,LC.valueFromAST)(ie.defaultValue,xe),deprecationReason:sT(ie),astNode:ie}}}return De}function nr(ae){let De=Object.create(null);for(let St of ae){var ge;let Y=(ge=St.values)!==null&&ge!==void 0?ge:[];for(let ie of Y){var Le;De[ie.name.value]={description:(Le=ie.description)===null||Le===void 0?void 0:Le.value,deprecationReason:sT(ie),astNode:ie}}}return De}function En(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.interfaces)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ht(ae){return ae.flatMap(De=>{var ge,Le;return(ge=(Le=De.types)===null||Le===void 0?void 0:Le.map(rn))!==null&&ge!==void 0?ge:[]})}function Ln(ae){var De;let ge=ae.name.value,Le=(De=l[ge])!==null&&De!==void 0?De:[];switch(ae.kind){case ji.Kind.OBJECT_TYPE_DEFINITION:{var St;let it=[ae,...Le];return new Dn.GraphQLObjectType({name:ge,description:(St=ae.description)===null||St===void 0?void 0:St.value,interfaces:()=>En(it),fields:()=>xt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let it=[ae,...Le];return new Dn.GraphQLInterfaceType({name:ge,description:(Y=ae.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>En(it),fields:()=>xt(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.ENUM_TYPE_DEFINITION:{var ie;let it=[ae,...Le];return new Dn.GraphQLEnumType({name:ge,description:(ie=ae.description)===null||ie===void 0?void 0:ie.value,values:nr(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.UNION_TYPE_DEFINITION:{var xe;let it=[ae,...Le];return new Dn.GraphQLUnionType({name:ge,description:(xe=ae.description)===null||xe===void 0?void 0:xe.value,types:()=>Ht(it),astNode:ae,extensionASTNodes:Le})}case ji.Kind.SCALAR_TYPE_DEFINITION:{var He;return new Dn.GraphQLScalarType({name:ge,description:(He=ae.description)===null||He===void 0?void 0:He.value,specifiedByURL:BC(ae),astNode:ae,extensionASTNodes:Le})}case ji.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Bt;let it=[ae,...Le];return new Dn.GraphQLInputObjectType({name:ge,description:(Bt=ae.description)===null||Bt===void 0?void 0:Bt.value,fields:()=>kr(it),astNode:ae,extensionASTNodes:Le,isOneOf:f9(ae)})}}}}var CC=(0,c9.keyMap)([...kC.specifiedScalarTypes,...UC.introspectionTypes],e=>e.name);function sT(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function BC(e){let t=(0,Sv.getDirectiveValues)(xf.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function f9(e){return!!(0,Sv.getDirectiveValues)(xf.GraphQLOneOfDirective,e)}});var qC=w(uT=>{"use strict";m();T();N();Object.defineProperty(uT,"__esModule",{value:!0});uT.buildASTSchema=xC;uT.buildSchema=I9;var p9=Vr(),m9=wt(),N9=vl(),T9=Xr(),E9=Nc(),h9=Bl(),y9=Dv();function xC(e,t){e!=null&&e.kind===m9.Kind.DOCUMENT||(0,p9.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,h9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,y9.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...T9.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new E9.GraphQLSchema($(k({},r),{directives:i}))}function I9(e,t){let n=(0,N9.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return xC(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var KC=w(Av=>{"use strict";m();T();N();Object.defineProperty(Av,"__esModule",{value:!0});Av.lexicographicSortSchema=b9;var g9=Wt(),_9=Ar(),v9=af(),VC=sf(),jr=Lt(),O9=Xr(),S9=ki(),D9=Nc();function b9(e){let t=e.toConfig(),n=(0,v9.keyValMap)(bv(t.types),I=>I.name,E);return new D9.GraphQLSchema($(k({},t),{types:Object.values(n),directives:bv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,jr.isListType)(I)?new jr.GraphQLList(r(I.ofType)):(0,jr.isNonNullType)(I)?new jr.GraphQLNonNull(r(I.ofType)):i(I)}function i(I){return n[I.name]}function a(I){return I&&i(I)}function o(I){let v=I.toConfig();return new O9.GraphQLDirective($(k({},v),{locations:jC(v.locations,A=>A),args:u(v.args)}))}function u(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function l(I){return cT(I,v=>$(k({},v),{type:r(v.type),args:v.args&&u(v.args)}))}function d(I){return cT(I,v=>$(k({},v),{type:r(v.type)}))}function p(I){return bv(I).map(i)}function E(I){if((0,jr.isScalarType)(I)||(0,S9.isIntrospectionType)(I))return I;if((0,jr.isObjectType)(I)){let v=I.toConfig();return new jr.GraphQLObjectType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isInterfaceType)(I)){let v=I.toConfig();return new jr.GraphQLInterfaceType($(k({},v),{interfaces:()=>p(v.interfaces),fields:()=>l(v.fields)}))}if((0,jr.isUnionType)(I)){let v=I.toConfig();return new jr.GraphQLUnionType($(k({},v),{types:()=>p(v.types)}))}if((0,jr.isEnumType)(I)){let v=I.toConfig();return new jr.GraphQLEnumType($(k({},v),{values:cT(v.values,A=>A)}))}if((0,jr.isInputObjectType)(I)){let v=I.toConfig();return new jr.GraphQLInputObjectType($(k({},v),{fields:()=>d(v.fields)}))}(0,_9.invariant)(!1,"Unexpected type: "+(0,g9.inspect)(I))}}function cT(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(VC.naturalCompare))n[r]=t(e[r]);return n}function bv(e){return jC(e,t=>t.name)}function jC(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,VC.naturalCompare)(i,a)})}});var zC=w(qf=>{"use strict";m();T();N();Object.defineProperty(qf,"__esModule",{value:!0});qf.printIntrospectionSchema=C9;qf.printSchema=L9;qf.printType=QC;var A9=Wt(),R9=Ar(),P9=zd(),Pv=wt(),lT=Ti(),kl=Lt(),Fv=Xr(),$C=ki(),F9=Ga(),w9=yf();function L9(e){return GC(e,t=>!(0,Fv.isSpecifiedDirective)(t),B9)}function C9(e){return GC(e,Fv.isSpecifiedDirective,$C.isIntrospectionType)}function B9(e){return!(0,F9.isSpecifiedScalarType)(e)&&!(0,$C.isIntrospectionType)(e)}function GC(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[U9(e),...r.map(a=>$9(a)),...i.map(a=>QC(a))].filter(Boolean).join(` -`)}function B9(e){if(e.description==null&&U9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),ji(e)+`schema { +`)}function U9(e){if(e.description==null&&k9(e))return;let t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);let r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),Ki(e)+`schema { ${t.join(` `)} -}`}function U9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function QC(e){if((0,kl.isScalarType)(e))return k9(e);if((0,kl.isObjectType)(e))return M9(e);if((0,kl.isInterfaceType)(e))return x9(e);if((0,kl.isUnionType)(e))return q9(e);if((0,kl.isEnumType)(e))return V9(e);if((0,kl.isInputObjectType)(e))return j9(e);(0,A9.invariant)(!1,"Unexpected type: "+(0,b9.inspect)(e))}function k9(e){return ji(e)+`scalar ${e.name}`+$9(e)}function YC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function M9(e){return ji(e)+`type ${e.name}`+YC(e)+JC(e)}function x9(e){return ji(e)+`interface ${e.name}`+YC(e)+JC(e)}function q9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ji(e)+"union "+e.name+n}function V9(e){let t=e.getValues().map((n,r)=>ji(n," ",!r)+" "+n.name+Lv(n.deprecationReason));return ji(e)+`enum ${e.name}`+wv(t)}function j9(e){let t=Object.values(e.getFields()).map((n,r)=>ji(n," ",!r)+" "+Rv(n));return ji(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+wv(t)}function JC(e){let t=Object.values(e.getFields()).map((n,r)=>ji(n," ",!r)+" "+n.name+HC(n.args," ")+": "+String(n.type)+Lv(n.deprecationReason));return wv(t)}function wv(e){return e.length!==0?` { +}`}function k9(e){let t=e.getQueryType();if(t&&t.name!=="Query")return!1;let n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;let r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function QC(e){if((0,kl.isScalarType)(e))return M9(e);if((0,kl.isObjectType)(e))return x9(e);if((0,kl.isInterfaceType)(e))return q9(e);if((0,kl.isUnionType)(e))return V9(e);if((0,kl.isEnumType)(e))return j9(e);if((0,kl.isInputObjectType)(e))return K9(e);(0,R9.invariant)(!1,"Unexpected type: "+(0,A9.inspect)(e))}function M9(e){return Ki(e)+`scalar ${e.name}`+G9(e)}function YC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function x9(e){return Ki(e)+`type ${e.name}`+YC(e)+JC(e)}function q9(e){return Ki(e)+`interface ${e.name}`+YC(e)+JC(e)}function V9(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ki(e)+"union "+e.name+n}function j9(e){let t=e.getValues().map((n,r)=>Ki(n," ",!r)+" "+n.name+Lv(n.deprecationReason));return Ki(e)+`enum ${e.name}`+wv(t)}function K9(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+Rv(n));return Ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+wv(t)}function JC(e){let t=Object.values(e.getFields()).map((n,r)=>Ki(n," ",!r)+" "+n.name+HC(n.args," ")+": "+String(n.type)+Lv(n.deprecationReason));return wv(t)}function wv(e){return e.length!==0?` { `+e.join(` `)+` }`:""}function HC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Rv).join(", ")+")":`( -`+e.map((n,r)=>ji(n," "+t,!r)+" "+t+Rv(n)).join(` +`+e.map((n,r)=>Ki(n," "+t,!r)+" "+t+Rv(n)).join(` `)+` -`+t+")"}function Rv(e){let t=(0,F9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,lT.print)(t)}`),n+Lv(e.deprecationReason)}function K9(e){return ji(e)+"directive @"+e.name+HC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Lv(e){return e==null?"":e!==Fv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e})})`:" @deprecated"}function $9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e.specifiedByURL})})`}function ji(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,lT.print)({kind:Pv.Kind.STRING,value:r,block:(0,R9.isPrintableAsBlockString)(r)});return(t&&!n?` +`+t+")"}function Rv(e){let t=(0,w9.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,lT.print)(t)}`),n+Lv(e.deprecationReason)}function $9(e){return Ki(e)+"directive @"+e.name+HC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Lv(e){return e==null?"":e!==Fv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e})})`:" @deprecated"}function G9(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,lT.print)({kind:Pv.Kind.STRING,value:e.specifiedByURL})})`}function Ki(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,lT.print)({kind:Pv.Kind.STRING,value:r,block:(0,P9.isPrintableAsBlockString)(r)});return(t&&!n?` `+t:t)+i.replace(/\n/g,` `+t)+` -`}});var WC=w(Cv=>{"use strict";m();T();N();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.concatAST=Q9;var G9=wt();function Q9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:G9.Kind.DOCUMENT,definitions:t}}});var eB=w(Bv=>{"use strict";m();T();N();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.separateOperations=J9;var dT=wt(),Y9=cc();function J9(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case dT.Kind.OPERATION_DEFINITION:t.push(i);break;case dT.Kind.FRAGMENT_DEFINITION:n[i.name.value]=XC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let u of XC(i.selectionSet))ZC(a,n,u);let o=i.name?i.name.value:"";r[o]={kind:dT.Kind.DOCUMENT,definitions:e.definitions.filter(u=>u===i||u.kind===dT.Kind.FRAGMENT_DEFINITION&&a.has(u.name.value))}}return r}function ZC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)ZC(e,t,i)}}function XC(e){let t=[];return(0,Y9.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var rB=w(kv=>{"use strict";m();T();N();Object.defineProperty(kv,"__esModule",{value:!0});kv.stripIgnoredCharacters=z9;var H9=zd(),tB=nN(),nB=sN(),Uv=Xd();function z9(e){let t=(0,nB.isSource)(e)?e:new nB.Source(e),n=t.body,r=new tB.Lexer(t),i="",a=!1;for(;r.advance().kind!==Uv.TokenKind.EOF;){let o=r.token,u=o.kind,l=!(0,tB.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Uv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);u===Uv.TokenKind.BLOCK_STRING?i+=(0,H9.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var aB=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.assertValidName=e7;fT.isValidNameError=iB;var W9=Vr(),X9=ze(),Z9=of();function e7(e){let t=iB(e);if(t)throw t;return e}function iB(e){if(typeof e=="string"||(0,W9.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new X9.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,Z9.assertName)(e)}catch(t){return t}}});var pB=w(za=>{"use strict";m();T();N();Object.defineProperty(za,"__esModule",{value:!0});za.DangerousChangeType=za.BreakingChangeType=void 0;za.findBreakingChanges=s7;za.findDangerousChanges=o7;var t7=Wt(),dB=Ar(),sB=Nu(),n7=Ni(),qt=Lt(),r7=$a(),i7=yf(),a7=qg(),Mn;za.BreakingChangeType=Mn;(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"})(Mn||(za.BreakingChangeType=Mn={}));var Ea;za.DangerousChangeType=Ea;(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"})(Ea||(za.DangerousChangeType=Ea={}));function s7(e,t){return fB(e,t).filter(n=>n.type in Mn)}function o7(e,t){return fB(e,t).filter(n=>n.type in Ea)}function fB(e,t){return[...c7(e,t),...u7(e,t)]}function u7(e,t){let n=[],r=ws(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=ws(i.args,a.args);for(let u of o.added)(0,qt.isRequiredArgument)(u)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${u.name} on directive ${i.name} was added.`});for(let u of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${u.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let u of i.locations)a.locations.includes(u)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${u} was removed from ${i.name}.`})}return n}function c7(e,t){let n=[],r=ws(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,r7.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,qt.isEnumType)(i)&&(0,qt.isEnumType)(a)?n.push(...f7(i,a)):(0,qt.isUnionType)(i)&&(0,qt.isUnionType)(a)?n.push(...d7(i,a)):(0,qt.isInputObjectType)(i)&&(0,qt.isInputObjectType)(a)?n.push(...l7(i,a)):(0,qt.isObjectType)(i)&&(0,qt.isObjectType)(a)?n.push(...uB(i,a),...oB(i,a)):(0,qt.isInterfaceType)(i)&&(0,qt.isInterfaceType)(a)?n.push(...uB(i,a),...oB(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${cB(i)} to ${cB(a)}.`});return n}function l7(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,qt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Ea.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)jf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function d7(e,t){let n=[],r=ws(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:Ea.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function f7(e,t){let n=[],r=ws(e.getValues(),t.getValues());for(let i of r.added)n.push({type:Ea.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function oB(e,t){let n=[],r=ws(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:Ea.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function uB(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...p7(e,i,a)),Vf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function p7(e,t,n){let r=[],i=ws(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!jf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:Ea.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=lB(a.defaultValue,a.type),d=lB(o.defaultValue,o.type);l!==d&&r.push({type:Ea.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,qt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:Ea.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Vf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&Vf(e.ofType,t.ofType)||(0,qt.isNonNullType)(t)&&Vf(e,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&Vf(e.ofType,t.ofType):(0,qt.isNamedType)(t)&&e.name===t.name||(0,qt.isNonNullType)(t)&&Vf(e,t.ofType)}function jf(e,t){return(0,qt.isListType)(e)?(0,qt.isListType)(t)&&jf(e.ofType,t.ofType):(0,qt.isNonNullType)(e)?(0,qt.isNonNullType)(t)&&jf(e.ofType,t.ofType)||!(0,qt.isNonNullType)(t)&&jf(e.ofType,t):(0,qt.isNamedType)(t)&&e.name===t.name}function cB(e){if((0,qt.isScalarType)(e))return"a Scalar type";if((0,qt.isObjectType)(e))return"an Object type";if((0,qt.isInterfaceType)(e))return"an Interface type";if((0,qt.isUnionType)(e))return"a Union type";if((0,qt.isEnumType)(e))return"an Enum type";if((0,qt.isInputObjectType)(e))return"an Input type";(0,dB.invariant)(!1,"Unexpected type: "+(0,t7.inspect)(e))}function lB(e,t){let n=(0,i7.astFromValue)(e,t);return n!=null||(0,dB.invariant)(!1),(0,n7.print)((0,a7.sortValueNode)(n))}function ws(e,t){let n=[],r=[],i=[],a=(0,sB.keyMap)(e,({name:u})=>u),o=(0,sB.keyMap)(t,({name:u})=>u);for(let u of e){let l=o[u.name];l===void 0?r.push(u):i.push([u,l])}for(let u of t)a[u.name]===void 0&&n.push(u);return{added:n,persisted:i,removed:r}}});var EB=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BreakingChangeType",{enumerable:!0,get:function(){return pT.BreakingChangeType}});Object.defineProperty(kt,"DangerousChangeType",{enumerable:!0,get:function(){return pT.DangerousChangeType}});Object.defineProperty(kt,"TypeInfo",{enumerable:!0,get:function(){return NB.TypeInfo}});Object.defineProperty(kt,"assertValidName",{enumerable:!0,get:function(){return TB.assertValidName}});Object.defineProperty(kt,"astFromValue",{enumerable:!0,get:function(){return O7.astFromValue}});Object.defineProperty(kt,"buildASTSchema",{enumerable:!0,get:function(){return mB.buildASTSchema}});Object.defineProperty(kt,"buildClientSchema",{enumerable:!0,get:function(){return h7.buildClientSchema}});Object.defineProperty(kt,"buildSchema",{enumerable:!0,get:function(){return mB.buildSchema}});Object.defineProperty(kt,"coerceInputValue",{enumerable:!0,get:function(){return S7.coerceInputValue}});Object.defineProperty(kt,"concatAST",{enumerable:!0,get:function(){return D7.concatAST}});Object.defineProperty(kt,"doTypesOverlap",{enumerable:!0,get:function(){return xv.doTypesOverlap}});Object.defineProperty(kt,"extendSchema",{enumerable:!0,get:function(){return y7.extendSchema}});Object.defineProperty(kt,"findBreakingChanges",{enumerable:!0,get:function(){return pT.findBreakingChanges}});Object.defineProperty(kt,"findDangerousChanges",{enumerable:!0,get:function(){return pT.findDangerousChanges}});Object.defineProperty(kt,"getIntrospectionQuery",{enumerable:!0,get:function(){return m7.getIntrospectionQuery}});Object.defineProperty(kt,"getOperationAST",{enumerable:!0,get:function(){return N7.getOperationAST}});Object.defineProperty(kt,"getOperationRootType",{enumerable:!0,get:function(){return T7.getOperationRootType}});Object.defineProperty(kt,"introspectionFromSchema",{enumerable:!0,get:function(){return E7.introspectionFromSchema}});Object.defineProperty(kt,"isEqualType",{enumerable:!0,get:function(){return xv.isEqualType}});Object.defineProperty(kt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return xv.isTypeSubTypeOf}});Object.defineProperty(kt,"isValidNameError",{enumerable:!0,get:function(){return TB.isValidNameError}});Object.defineProperty(kt,"lexicographicSortSchema",{enumerable:!0,get:function(){return I7.lexicographicSortSchema}});Object.defineProperty(kt,"printIntrospectionSchema",{enumerable:!0,get:function(){return Mv.printIntrospectionSchema}});Object.defineProperty(kt,"printSchema",{enumerable:!0,get:function(){return Mv.printSchema}});Object.defineProperty(kt,"printType",{enumerable:!0,get:function(){return Mv.printType}});Object.defineProperty(kt,"separateOperations",{enumerable:!0,get:function(){return b7.separateOperations}});Object.defineProperty(kt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return A7.stripIgnoredCharacters}});Object.defineProperty(kt,"typeFromAST",{enumerable:!0,get:function(){return g7.typeFromAST}});Object.defineProperty(kt,"valueFromAST",{enumerable:!0,get:function(){return _7.valueFromAST}});Object.defineProperty(kt,"valueFromASTUntyped",{enumerable:!0,get:function(){return v7.valueFromASTUntyped}});Object.defineProperty(kt,"visitWithTypeInfo",{enumerable:!0,get:function(){return NB.visitWithTypeInfo}});var m7=Iv(),N7=DC(),T7=bC(),E7=AC(),h7=PC(),mB=qC(),y7=Dv(),I7=KC(),Mv=zC(),g7=Ga(),_7=Rf(),v7=UI(),O7=yf(),NB=CN(),S7=s_(),D7=WC(),b7=eB(),A7=rB(),xv=ff(),TB=aB(),pT=pB()});var Ie=w(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return ht.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return ht.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return ht.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Kf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ht.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return ht.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ht.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return ht.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ht.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return ht.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return ht.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return ht.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return ht.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return ht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ht.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return ht.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ht.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return ht.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return ht.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return ht.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return ht.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return ht.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return ht.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return ht.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return ht.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return ht.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return ht.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return ht.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return ht.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return ht.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return ht.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return ht.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return ht.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return ht.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return ht.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return ht.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Wa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Wa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Wa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Wa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Wa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Kf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Wa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Wa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Wa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return yB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return yB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Kf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Kf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return ht.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Wa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return ht.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Wa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Kf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ht.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return hB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return hB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var hB=pF(),yB=oC(),ye=lC(),Yt=fC(),Wa=IC(),ht=OC(),Kf=SC(),Jt=EB()});var zn=w(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var vu=Ie();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` +`}});var WC=w(Cv=>{"use strict";m();T();N();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.concatAST=Y9;var Q9=wt();function Y9(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:Q9.Kind.DOCUMENT,definitions:t}}});var eB=w(Bv=>{"use strict";m();T();N();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.separateOperations=H9;var dT=wt(),J9=cc();function H9(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case dT.Kind.OPERATION_DEFINITION:t.push(i);break;case dT.Kind.FRAGMENT_DEFINITION:n[i.name.value]=XC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let u of XC(i.selectionSet))ZC(a,n,u);let o=i.name?i.name.value:"";r[o]={kind:dT.Kind.DOCUMENT,definitions:e.definitions.filter(u=>u===i||u.kind===dT.Kind.FRAGMENT_DEFINITION&&a.has(u.name.value))}}return r}function ZC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)ZC(e,t,i)}}function XC(e){let t=[];return(0,J9.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var rB=w(kv=>{"use strict";m();T();N();Object.defineProperty(kv,"__esModule",{value:!0});kv.stripIgnoredCharacters=W9;var z9=zd(),tB=nN(),nB=sN(),Uv=Xd();function W9(e){let t=(0,nB.isSource)(e)?e:new nB.Source(e),n=t.body,r=new tB.Lexer(t),i="",a=!1;for(;r.advance().kind!==Uv.TokenKind.EOF;){let o=r.token,u=o.kind,l=!(0,tB.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===Uv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);u===Uv.TokenKind.BLOCK_STRING?i+=(0,z9.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var aB=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.assertValidName=t7;fT.isValidNameError=iB;var X9=Vr(),Z9=ze(),e7=of();function t7(e){let t=iB(e);if(t)throw t;return e}function iB(e){if(typeof e=="string"||(0,X9.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new Z9.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,e7.assertName)(e)}catch(t){return t}}});var pB=w(Wa=>{"use strict";m();T();N();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DangerousChangeType=Wa.BreakingChangeType=void 0;Wa.findBreakingChanges=o7;Wa.findDangerousChanges=u7;var n7=Wt(),dB=Ar(),sB=Nu(),r7=Ti(),Vt=Lt(),i7=Ga(),a7=yf(),s7=qg(),Mn;Wa.BreakingChangeType=Mn;(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"})(Mn||(Wa.BreakingChangeType=Mn={}));var ha;Wa.DangerousChangeType=ha;(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"})(ha||(Wa.DangerousChangeType=ha={}));function o7(e,t){return fB(e,t).filter(n=>n.type in Mn)}function u7(e,t){return fB(e,t).filter(n=>n.type in ha)}function fB(e,t){return[...l7(e,t),...c7(e,t)]}function c7(e,t){let n=[],r=ws(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Mn.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=ws(i.args,a.args);for(let u of o.added)(0,Vt.isRequiredArgument)(u)&&n.push({type:Mn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${u.name} on directive ${i.name} was added.`});for(let u of o.removed)n.push({type:Mn.DIRECTIVE_ARG_REMOVED,description:`${u.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Mn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let u of i.locations)a.locations.includes(u)||n.push({type:Mn.DIRECTIVE_LOCATION_REMOVED,description:`${u} was removed from ${i.name}.`})}return n}function l7(e,t){let n=[],r=ws(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED,description:(0,i7.isSpecifiedScalarType)(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(let[i,a]of r.persisted)(0,Vt.isEnumType)(i)&&(0,Vt.isEnumType)(a)?n.push(...p7(i,a)):(0,Vt.isUnionType)(i)&&(0,Vt.isUnionType)(a)?n.push(...f7(i,a)):(0,Vt.isInputObjectType)(i)&&(0,Vt.isInputObjectType)(a)?n.push(...d7(i,a)):(0,Vt.isObjectType)(i)&&(0,Vt.isObjectType)(a)?n.push(...uB(i,a),...oB(i,a)):(0,Vt.isInterfaceType)(i)&&(0,Vt.isInterfaceType)(a)?n.push(...uB(i,a),...oB(i,a)):i.constructor!==a.constructor&&n.push({type:Mn.TYPE_CHANGED_KIND,description:`${i.name} changed from ${cB(i)} to ${cB(a)}.`});return n}function d7(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,Vt.isRequiredInputField)(i)?n.push({type:Mn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ha.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)jf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function f7(e,t){let n=[],r=ws(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ha.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function p7(e,t){let n=[],r=ws(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ha.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Mn.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function oB(e,t){let n=[],r=ws(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ha.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Mn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function uB(e,t){let n=[],r=ws(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Mn.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...m7(e,i,a)),Vf(i.type,a.type)||n.push({type:Mn.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function m7(e,t,n){let r=[],i=ws(t.args,n.args);for(let a of i.removed)r.push({type:Mn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!jf(a.type,o.type))r.push({type:Mn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${a.name} has changed type from ${String(a.type)} to ${String(o.type)}.`});else if(a.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=lB(a.defaultValue,a.type),d=lB(o.defaultValue,o.type);l!==d&&r.push({type:ha.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} has changed defaultValue from ${l} to ${d}.`})}for(let a of i.added)(0,Vt.isRequiredArgument)(a)?r.push({type:Mn.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ha.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Vf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&Vf(e.ofType,t.ofType)||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&Vf(e.ofType,t.ofType):(0,Vt.isNamedType)(t)&&e.name===t.name||(0,Vt.isNonNullType)(t)&&Vf(e,t.ofType)}function jf(e,t){return(0,Vt.isListType)(e)?(0,Vt.isListType)(t)&&jf(e.ofType,t.ofType):(0,Vt.isNonNullType)(e)?(0,Vt.isNonNullType)(t)&&jf(e.ofType,t.ofType)||!(0,Vt.isNonNullType)(t)&&jf(e.ofType,t):(0,Vt.isNamedType)(t)&&e.name===t.name}function cB(e){if((0,Vt.isScalarType)(e))return"a Scalar type";if((0,Vt.isObjectType)(e))return"an Object type";if((0,Vt.isInterfaceType)(e))return"an Interface type";if((0,Vt.isUnionType)(e))return"a Union type";if((0,Vt.isEnumType)(e))return"an Enum type";if((0,Vt.isInputObjectType)(e))return"an Input type";(0,dB.invariant)(!1,"Unexpected type: "+(0,n7.inspect)(e))}function lB(e,t){let n=(0,a7.astFromValue)(e,t);return n!=null||(0,dB.invariant)(!1),(0,r7.print)((0,s7.sortValueNode)(n))}function ws(e,t){let n=[],r=[],i=[],a=(0,sB.keyMap)(e,({name:u})=>u),o=(0,sB.keyMap)(t,({name:u})=>u);for(let u of e){let l=o[u.name];l===void 0?r.push(u):i.push([u,l])}for(let u of t)a[u.name]===void 0&&n.push(u);return{added:n,persisted:i,removed:r}}});var EB=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BreakingChangeType",{enumerable:!0,get:function(){return pT.BreakingChangeType}});Object.defineProperty(kt,"DangerousChangeType",{enumerable:!0,get:function(){return pT.DangerousChangeType}});Object.defineProperty(kt,"TypeInfo",{enumerable:!0,get:function(){return NB.TypeInfo}});Object.defineProperty(kt,"assertValidName",{enumerable:!0,get:function(){return TB.assertValidName}});Object.defineProperty(kt,"astFromValue",{enumerable:!0,get:function(){return S7.astFromValue}});Object.defineProperty(kt,"buildASTSchema",{enumerable:!0,get:function(){return mB.buildASTSchema}});Object.defineProperty(kt,"buildClientSchema",{enumerable:!0,get:function(){return y7.buildClientSchema}});Object.defineProperty(kt,"buildSchema",{enumerable:!0,get:function(){return mB.buildSchema}});Object.defineProperty(kt,"coerceInputValue",{enumerable:!0,get:function(){return D7.coerceInputValue}});Object.defineProperty(kt,"concatAST",{enumerable:!0,get:function(){return b7.concatAST}});Object.defineProperty(kt,"doTypesOverlap",{enumerable:!0,get:function(){return xv.doTypesOverlap}});Object.defineProperty(kt,"extendSchema",{enumerable:!0,get:function(){return I7.extendSchema}});Object.defineProperty(kt,"findBreakingChanges",{enumerable:!0,get:function(){return pT.findBreakingChanges}});Object.defineProperty(kt,"findDangerousChanges",{enumerable:!0,get:function(){return pT.findDangerousChanges}});Object.defineProperty(kt,"getIntrospectionQuery",{enumerable:!0,get:function(){return N7.getIntrospectionQuery}});Object.defineProperty(kt,"getOperationAST",{enumerable:!0,get:function(){return T7.getOperationAST}});Object.defineProperty(kt,"getOperationRootType",{enumerable:!0,get:function(){return E7.getOperationRootType}});Object.defineProperty(kt,"introspectionFromSchema",{enumerable:!0,get:function(){return h7.introspectionFromSchema}});Object.defineProperty(kt,"isEqualType",{enumerable:!0,get:function(){return xv.isEqualType}});Object.defineProperty(kt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return xv.isTypeSubTypeOf}});Object.defineProperty(kt,"isValidNameError",{enumerable:!0,get:function(){return TB.isValidNameError}});Object.defineProperty(kt,"lexicographicSortSchema",{enumerable:!0,get:function(){return g7.lexicographicSortSchema}});Object.defineProperty(kt,"printIntrospectionSchema",{enumerable:!0,get:function(){return Mv.printIntrospectionSchema}});Object.defineProperty(kt,"printSchema",{enumerable:!0,get:function(){return Mv.printSchema}});Object.defineProperty(kt,"printType",{enumerable:!0,get:function(){return Mv.printType}});Object.defineProperty(kt,"separateOperations",{enumerable:!0,get:function(){return A7.separateOperations}});Object.defineProperty(kt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return R7.stripIgnoredCharacters}});Object.defineProperty(kt,"typeFromAST",{enumerable:!0,get:function(){return _7.typeFromAST}});Object.defineProperty(kt,"valueFromAST",{enumerable:!0,get:function(){return v7.valueFromAST}});Object.defineProperty(kt,"valueFromASTUntyped",{enumerable:!0,get:function(){return O7.valueFromASTUntyped}});Object.defineProperty(kt,"visitWithTypeInfo",{enumerable:!0,get:function(){return NB.visitWithTypeInfo}});var N7=Iv(),T7=DC(),E7=bC(),h7=AC(),y7=PC(),mB=qC(),I7=Dv(),g7=KC(),Mv=zC(),_7=Qa(),v7=Rf(),O7=UI(),S7=yf(),NB=CN(),D7=s_(),b7=WC(),A7=eB(),R7=rB(),xv=ff(),TB=aB(),pT=pB()});var Ie=w(q=>{"use strict";m();T();N();Object.defineProperty(q,"__esModule",{value:!0});Object.defineProperty(q,"BREAK",{enumerable:!0,get:function(){return Yt.BREAK}});Object.defineProperty(q,"BreakingChangeType",{enumerable:!0,get:function(){return Jt.BreakingChangeType}});Object.defineProperty(q,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ye.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(q,"DangerousChangeType",{enumerable:!0,get:function(){return Jt.DangerousChangeType}});Object.defineProperty(q,"DirectiveLocation",{enumerable:!0,get:function(){return Yt.DirectiveLocation}});Object.defineProperty(q,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return ht.ExecutableDefinitionsRule}});Object.defineProperty(q,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return ht.FieldsOnCorrectTypeRule}});Object.defineProperty(q,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return ht.FragmentsOnCompositeTypesRule}});Object.defineProperty(q,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MAX_INT}});Object.defineProperty(q,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ye.GRAPHQL_MIN_INT}});Object.defineProperty(q,"GraphQLBoolean",{enumerable:!0,get:function(){return ye.GraphQLBoolean}});Object.defineProperty(q,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ye.GraphQLDeprecatedDirective}});Object.defineProperty(q,"GraphQLDirective",{enumerable:!0,get:function(){return ye.GraphQLDirective}});Object.defineProperty(q,"GraphQLEnumType",{enumerable:!0,get:function(){return ye.GraphQLEnumType}});Object.defineProperty(q,"GraphQLError",{enumerable:!0,get:function(){return Kf.GraphQLError}});Object.defineProperty(q,"GraphQLFloat",{enumerable:!0,get:function(){return ye.GraphQLFloat}});Object.defineProperty(q,"GraphQLID",{enumerable:!0,get:function(){return ye.GraphQLID}});Object.defineProperty(q,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ye.GraphQLIncludeDirective}});Object.defineProperty(q,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ye.GraphQLInputObjectType}});Object.defineProperty(q,"GraphQLInt",{enumerable:!0,get:function(){return ye.GraphQLInt}});Object.defineProperty(q,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ye.GraphQLInterfaceType}});Object.defineProperty(q,"GraphQLList",{enumerable:!0,get:function(){return ye.GraphQLList}});Object.defineProperty(q,"GraphQLNonNull",{enumerable:!0,get:function(){return ye.GraphQLNonNull}});Object.defineProperty(q,"GraphQLObjectType",{enumerable:!0,get:function(){return ye.GraphQLObjectType}});Object.defineProperty(q,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ye.GraphQLOneOfDirective}});Object.defineProperty(q,"GraphQLScalarType",{enumerable:!0,get:function(){return ye.GraphQLScalarType}});Object.defineProperty(q,"GraphQLSchema",{enumerable:!0,get:function(){return ye.GraphQLSchema}});Object.defineProperty(q,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ye.GraphQLSkipDirective}});Object.defineProperty(q,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ye.GraphQLSpecifiedByDirective}});Object.defineProperty(q,"GraphQLString",{enumerable:!0,get:function(){return ye.GraphQLString}});Object.defineProperty(q,"GraphQLUnionType",{enumerable:!0,get:function(){return ye.GraphQLUnionType}});Object.defineProperty(q,"Kind",{enumerable:!0,get:function(){return Yt.Kind}});Object.defineProperty(q,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return ht.KnownArgumentNamesRule}});Object.defineProperty(q,"KnownDirectivesRule",{enumerable:!0,get:function(){return ht.KnownDirectivesRule}});Object.defineProperty(q,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return ht.KnownFragmentNamesRule}});Object.defineProperty(q,"KnownTypeNamesRule",{enumerable:!0,get:function(){return ht.KnownTypeNamesRule}});Object.defineProperty(q,"Lexer",{enumerable:!0,get:function(){return Yt.Lexer}});Object.defineProperty(q,"Location",{enumerable:!0,get:function(){return Yt.Location}});Object.defineProperty(q,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return ht.LoneAnonymousOperationRule}});Object.defineProperty(q,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return ht.LoneSchemaDefinitionRule}});Object.defineProperty(q,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return ht.MaxIntrospectionDepthRule}});Object.defineProperty(q,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return ht.NoDeprecatedCustomRule}});Object.defineProperty(q,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return ht.NoFragmentCyclesRule}});Object.defineProperty(q,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return ht.NoSchemaIntrospectionCustomRule}});Object.defineProperty(q,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return ht.NoUndefinedVariablesRule}});Object.defineProperty(q,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return ht.NoUnusedFragmentsRule}});Object.defineProperty(q,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return ht.NoUnusedVariablesRule}});Object.defineProperty(q,"OperationTypeNode",{enumerable:!0,get:function(){return Yt.OperationTypeNode}});Object.defineProperty(q,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return ht.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(q,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return ht.PossibleFragmentSpreadsRule}});Object.defineProperty(q,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return ht.PossibleTypeExtensionsRule}});Object.defineProperty(q,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return ht.ProvidedRequiredArgumentsRule}});Object.defineProperty(q,"ScalarLeafsRule",{enumerable:!0,get:function(){return ht.ScalarLeafsRule}});Object.defineProperty(q,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ye.SchemaMetaFieldDef}});Object.defineProperty(q,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return ht.SingleFieldSubscriptionsRule}});Object.defineProperty(q,"Source",{enumerable:!0,get:function(){return Yt.Source}});Object.defineProperty(q,"Token",{enumerable:!0,get:function(){return Yt.Token}});Object.defineProperty(q,"TokenKind",{enumerable:!0,get:function(){return Yt.TokenKind}});Object.defineProperty(q,"TypeInfo",{enumerable:!0,get:function(){return Jt.TypeInfo}});Object.defineProperty(q,"TypeKind",{enumerable:!0,get:function(){return ye.TypeKind}});Object.defineProperty(q,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeMetaFieldDef}});Object.defineProperty(q,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ye.TypeNameMetaFieldDef}});Object.defineProperty(q,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(q,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return ht.UniqueArgumentNamesRule}});Object.defineProperty(q,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return ht.UniqueDirectiveNamesRule}});Object.defineProperty(q,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return ht.UniqueDirectivesPerLocationRule}});Object.defineProperty(q,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return ht.UniqueEnumValueNamesRule}});Object.defineProperty(q,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return ht.UniqueFieldDefinitionNamesRule}});Object.defineProperty(q,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return ht.UniqueFragmentNamesRule}});Object.defineProperty(q,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return ht.UniqueInputFieldNamesRule}});Object.defineProperty(q,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return ht.UniqueOperationNamesRule}});Object.defineProperty(q,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return ht.UniqueOperationTypesRule}});Object.defineProperty(q,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return ht.UniqueTypeNamesRule}});Object.defineProperty(q,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return ht.UniqueVariableNamesRule}});Object.defineProperty(q,"ValidationContext",{enumerable:!0,get:function(){return ht.ValidationContext}});Object.defineProperty(q,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return ht.ValuesOfCorrectTypeRule}});Object.defineProperty(q,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return ht.VariablesAreInputTypesRule}});Object.defineProperty(q,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return ht.VariablesInAllowedPositionRule}});Object.defineProperty(q,"__Directive",{enumerable:!0,get:function(){return ye.__Directive}});Object.defineProperty(q,"__DirectiveLocation",{enumerable:!0,get:function(){return ye.__DirectiveLocation}});Object.defineProperty(q,"__EnumValue",{enumerable:!0,get:function(){return ye.__EnumValue}});Object.defineProperty(q,"__Field",{enumerable:!0,get:function(){return ye.__Field}});Object.defineProperty(q,"__InputValue",{enumerable:!0,get:function(){return ye.__InputValue}});Object.defineProperty(q,"__Schema",{enumerable:!0,get:function(){return ye.__Schema}});Object.defineProperty(q,"__Type",{enumerable:!0,get:function(){return ye.__Type}});Object.defineProperty(q,"__TypeKind",{enumerable:!0,get:function(){return ye.__TypeKind}});Object.defineProperty(q,"assertAbstractType",{enumerable:!0,get:function(){return ye.assertAbstractType}});Object.defineProperty(q,"assertCompositeType",{enumerable:!0,get:function(){return ye.assertCompositeType}});Object.defineProperty(q,"assertDirective",{enumerable:!0,get:function(){return ye.assertDirective}});Object.defineProperty(q,"assertEnumType",{enumerable:!0,get:function(){return ye.assertEnumType}});Object.defineProperty(q,"assertEnumValueName",{enumerable:!0,get:function(){return ye.assertEnumValueName}});Object.defineProperty(q,"assertInputObjectType",{enumerable:!0,get:function(){return ye.assertInputObjectType}});Object.defineProperty(q,"assertInputType",{enumerable:!0,get:function(){return ye.assertInputType}});Object.defineProperty(q,"assertInterfaceType",{enumerable:!0,get:function(){return ye.assertInterfaceType}});Object.defineProperty(q,"assertLeafType",{enumerable:!0,get:function(){return ye.assertLeafType}});Object.defineProperty(q,"assertListType",{enumerable:!0,get:function(){return ye.assertListType}});Object.defineProperty(q,"assertName",{enumerable:!0,get:function(){return ye.assertName}});Object.defineProperty(q,"assertNamedType",{enumerable:!0,get:function(){return ye.assertNamedType}});Object.defineProperty(q,"assertNonNullType",{enumerable:!0,get:function(){return ye.assertNonNullType}});Object.defineProperty(q,"assertNullableType",{enumerable:!0,get:function(){return ye.assertNullableType}});Object.defineProperty(q,"assertObjectType",{enumerable:!0,get:function(){return ye.assertObjectType}});Object.defineProperty(q,"assertOutputType",{enumerable:!0,get:function(){return ye.assertOutputType}});Object.defineProperty(q,"assertScalarType",{enumerable:!0,get:function(){return ye.assertScalarType}});Object.defineProperty(q,"assertSchema",{enumerable:!0,get:function(){return ye.assertSchema}});Object.defineProperty(q,"assertType",{enumerable:!0,get:function(){return ye.assertType}});Object.defineProperty(q,"assertUnionType",{enumerable:!0,get:function(){return ye.assertUnionType}});Object.defineProperty(q,"assertValidName",{enumerable:!0,get:function(){return Jt.assertValidName}});Object.defineProperty(q,"assertValidSchema",{enumerable:!0,get:function(){return ye.assertValidSchema}});Object.defineProperty(q,"assertWrappingType",{enumerable:!0,get:function(){return ye.assertWrappingType}});Object.defineProperty(q,"astFromValue",{enumerable:!0,get:function(){return Jt.astFromValue}});Object.defineProperty(q,"buildASTSchema",{enumerable:!0,get:function(){return Jt.buildASTSchema}});Object.defineProperty(q,"buildClientSchema",{enumerable:!0,get:function(){return Jt.buildClientSchema}});Object.defineProperty(q,"buildSchema",{enumerable:!0,get:function(){return Jt.buildSchema}});Object.defineProperty(q,"coerceInputValue",{enumerable:!0,get:function(){return Jt.coerceInputValue}});Object.defineProperty(q,"concatAST",{enumerable:!0,get:function(){return Jt.concatAST}});Object.defineProperty(q,"createSourceEventStream",{enumerable:!0,get:function(){return Xa.createSourceEventStream}});Object.defineProperty(q,"defaultFieldResolver",{enumerable:!0,get:function(){return Xa.defaultFieldResolver}});Object.defineProperty(q,"defaultTypeResolver",{enumerable:!0,get:function(){return Xa.defaultTypeResolver}});Object.defineProperty(q,"doTypesOverlap",{enumerable:!0,get:function(){return Jt.doTypesOverlap}});Object.defineProperty(q,"execute",{enumerable:!0,get:function(){return Xa.execute}});Object.defineProperty(q,"executeSync",{enumerable:!0,get:function(){return Xa.executeSync}});Object.defineProperty(q,"extendSchema",{enumerable:!0,get:function(){return Jt.extendSchema}});Object.defineProperty(q,"findBreakingChanges",{enumerable:!0,get:function(){return Jt.findBreakingChanges}});Object.defineProperty(q,"findDangerousChanges",{enumerable:!0,get:function(){return Jt.findDangerousChanges}});Object.defineProperty(q,"formatError",{enumerable:!0,get:function(){return Kf.formatError}});Object.defineProperty(q,"getArgumentValues",{enumerable:!0,get:function(){return Xa.getArgumentValues}});Object.defineProperty(q,"getDirectiveValues",{enumerable:!0,get:function(){return Xa.getDirectiveValues}});Object.defineProperty(q,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Yt.getEnterLeaveForKind}});Object.defineProperty(q,"getIntrospectionQuery",{enumerable:!0,get:function(){return Jt.getIntrospectionQuery}});Object.defineProperty(q,"getLocation",{enumerable:!0,get:function(){return Yt.getLocation}});Object.defineProperty(q,"getNamedType",{enumerable:!0,get:function(){return ye.getNamedType}});Object.defineProperty(q,"getNullableType",{enumerable:!0,get:function(){return ye.getNullableType}});Object.defineProperty(q,"getOperationAST",{enumerable:!0,get:function(){return Jt.getOperationAST}});Object.defineProperty(q,"getOperationRootType",{enumerable:!0,get:function(){return Jt.getOperationRootType}});Object.defineProperty(q,"getVariableValues",{enumerable:!0,get:function(){return Xa.getVariableValues}});Object.defineProperty(q,"getVisitFn",{enumerable:!0,get:function(){return Yt.getVisitFn}});Object.defineProperty(q,"graphql",{enumerable:!0,get:function(){return yB.graphql}});Object.defineProperty(q,"graphqlSync",{enumerable:!0,get:function(){return yB.graphqlSync}});Object.defineProperty(q,"introspectionFromSchema",{enumerable:!0,get:function(){return Jt.introspectionFromSchema}});Object.defineProperty(q,"introspectionTypes",{enumerable:!0,get:function(){return ye.introspectionTypes}});Object.defineProperty(q,"isAbstractType",{enumerable:!0,get:function(){return ye.isAbstractType}});Object.defineProperty(q,"isCompositeType",{enumerable:!0,get:function(){return ye.isCompositeType}});Object.defineProperty(q,"isConstValueNode",{enumerable:!0,get:function(){return Yt.isConstValueNode}});Object.defineProperty(q,"isDefinitionNode",{enumerable:!0,get:function(){return Yt.isDefinitionNode}});Object.defineProperty(q,"isDirective",{enumerable:!0,get:function(){return ye.isDirective}});Object.defineProperty(q,"isEnumType",{enumerable:!0,get:function(){return ye.isEnumType}});Object.defineProperty(q,"isEqualType",{enumerable:!0,get:function(){return Jt.isEqualType}});Object.defineProperty(q,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Yt.isExecutableDefinitionNode}});Object.defineProperty(q,"isInputObjectType",{enumerable:!0,get:function(){return ye.isInputObjectType}});Object.defineProperty(q,"isInputType",{enumerable:!0,get:function(){return ye.isInputType}});Object.defineProperty(q,"isInterfaceType",{enumerable:!0,get:function(){return ye.isInterfaceType}});Object.defineProperty(q,"isIntrospectionType",{enumerable:!0,get:function(){return ye.isIntrospectionType}});Object.defineProperty(q,"isLeafType",{enumerable:!0,get:function(){return ye.isLeafType}});Object.defineProperty(q,"isListType",{enumerable:!0,get:function(){return ye.isListType}});Object.defineProperty(q,"isNamedType",{enumerable:!0,get:function(){return ye.isNamedType}});Object.defineProperty(q,"isNonNullType",{enumerable:!0,get:function(){return ye.isNonNullType}});Object.defineProperty(q,"isNullableType",{enumerable:!0,get:function(){return ye.isNullableType}});Object.defineProperty(q,"isObjectType",{enumerable:!0,get:function(){return ye.isObjectType}});Object.defineProperty(q,"isOutputType",{enumerable:!0,get:function(){return ye.isOutputType}});Object.defineProperty(q,"isRequiredArgument",{enumerable:!0,get:function(){return ye.isRequiredArgument}});Object.defineProperty(q,"isRequiredInputField",{enumerable:!0,get:function(){return ye.isRequiredInputField}});Object.defineProperty(q,"isScalarType",{enumerable:!0,get:function(){return ye.isScalarType}});Object.defineProperty(q,"isSchema",{enumerable:!0,get:function(){return ye.isSchema}});Object.defineProperty(q,"isSelectionNode",{enumerable:!0,get:function(){return Yt.isSelectionNode}});Object.defineProperty(q,"isSpecifiedDirective",{enumerable:!0,get:function(){return ye.isSpecifiedDirective}});Object.defineProperty(q,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ye.isSpecifiedScalarType}});Object.defineProperty(q,"isType",{enumerable:!0,get:function(){return ye.isType}});Object.defineProperty(q,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeDefinitionNode}});Object.defineProperty(q,"isTypeExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeExtensionNode}});Object.defineProperty(q,"isTypeNode",{enumerable:!0,get:function(){return Yt.isTypeNode}});Object.defineProperty(q,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Jt.isTypeSubTypeOf}});Object.defineProperty(q,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemDefinitionNode}});Object.defineProperty(q,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Yt.isTypeSystemExtensionNode}});Object.defineProperty(q,"isUnionType",{enumerable:!0,get:function(){return ye.isUnionType}});Object.defineProperty(q,"isValidNameError",{enumerable:!0,get:function(){return Jt.isValidNameError}});Object.defineProperty(q,"isValueNode",{enumerable:!0,get:function(){return Yt.isValueNode}});Object.defineProperty(q,"isWrappingType",{enumerable:!0,get:function(){return ye.isWrappingType}});Object.defineProperty(q,"lexicographicSortSchema",{enumerable:!0,get:function(){return Jt.lexicographicSortSchema}});Object.defineProperty(q,"locatedError",{enumerable:!0,get:function(){return Kf.locatedError}});Object.defineProperty(q,"parse",{enumerable:!0,get:function(){return Yt.parse}});Object.defineProperty(q,"parseConstValue",{enumerable:!0,get:function(){return Yt.parseConstValue}});Object.defineProperty(q,"parseType",{enumerable:!0,get:function(){return Yt.parseType}});Object.defineProperty(q,"parseValue",{enumerable:!0,get:function(){return Yt.parseValue}});Object.defineProperty(q,"print",{enumerable:!0,get:function(){return Yt.print}});Object.defineProperty(q,"printError",{enumerable:!0,get:function(){return Kf.printError}});Object.defineProperty(q,"printIntrospectionSchema",{enumerable:!0,get:function(){return Jt.printIntrospectionSchema}});Object.defineProperty(q,"printLocation",{enumerable:!0,get:function(){return Yt.printLocation}});Object.defineProperty(q,"printSchema",{enumerable:!0,get:function(){return Jt.printSchema}});Object.defineProperty(q,"printSourceLocation",{enumerable:!0,get:function(){return Yt.printSourceLocation}});Object.defineProperty(q,"printType",{enumerable:!0,get:function(){return Jt.printType}});Object.defineProperty(q,"recommendedRules",{enumerable:!0,get:function(){return ht.recommendedRules}});Object.defineProperty(q,"resolveObjMapThunk",{enumerable:!0,get:function(){return ye.resolveObjMapThunk}});Object.defineProperty(q,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ye.resolveReadonlyArrayThunk}});Object.defineProperty(q,"responsePathAsArray",{enumerable:!0,get:function(){return Xa.responsePathAsArray}});Object.defineProperty(q,"separateOperations",{enumerable:!0,get:function(){return Jt.separateOperations}});Object.defineProperty(q,"specifiedDirectives",{enumerable:!0,get:function(){return ye.specifiedDirectives}});Object.defineProperty(q,"specifiedRules",{enumerable:!0,get:function(){return ht.specifiedRules}});Object.defineProperty(q,"specifiedScalarTypes",{enumerable:!0,get:function(){return ye.specifiedScalarTypes}});Object.defineProperty(q,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Jt.stripIgnoredCharacters}});Object.defineProperty(q,"subscribe",{enumerable:!0,get:function(){return Xa.subscribe}});Object.defineProperty(q,"syntaxError",{enumerable:!0,get:function(){return Kf.syntaxError}});Object.defineProperty(q,"typeFromAST",{enumerable:!0,get:function(){return Jt.typeFromAST}});Object.defineProperty(q,"validate",{enumerable:!0,get:function(){return ht.validate}});Object.defineProperty(q,"validateSchema",{enumerable:!0,get:function(){return ye.validateSchema}});Object.defineProperty(q,"valueFromAST",{enumerable:!0,get:function(){return Jt.valueFromAST}});Object.defineProperty(q,"valueFromASTUntyped",{enumerable:!0,get:function(){return Jt.valueFromASTUntyped}});Object.defineProperty(q,"version",{enumerable:!0,get:function(){return hB.version}});Object.defineProperty(q,"versionInfo",{enumerable:!0,get:function(){return hB.versionInfo}});Object.defineProperty(q,"visit",{enumerable:!0,get:function(){return Yt.visit}});Object.defineProperty(q,"visitInParallel",{enumerable:!0,get:function(){return Yt.visitInParallel}});Object.defineProperty(q,"visitWithTypeInfo",{enumerable:!0,get:function(){return Jt.visitWithTypeInfo}});var hB=pF(),yB=oC(),ye=lC(),Yt=fC(),Xa=IC(),ht=OC(),Kf=SC(),Jt=EB()});var zn=w(R=>{"use strict";m();T();N();Object.defineProperty(R,"__esModule",{value:!0});R.FIELD_UPPER=R.FIELD_PATH=R.FIELD=R.EXTENSIONS=R.EXTENDS=R.EXTERNAL=R.EXECUTION=R.ENUM_VALUE_UPPER=R.ENUM_VALUE=R.ENUM_UPPER=R.ENUM=R.ENTITY_UNION=R.ENTITIES_FIELD=R.ENTITIES=R.EDFS_REDIS_SUBSCRIBE=R.EDFS_REDIS_PUBLISH=R.EDFS_NATS_STREAM_CONFIGURATION=R.EDFS_PUBLISH_RESULT=R.EDFS_NATS_SUBSCRIBE=R.EDFS_NATS_REQUEST=R.EDFS_NATS_PUBLISH=R.EDFS_KAFKA_SUBSCRIBE=R.EDFS_KAFKA_PUBLISH=R.DIRECTIVE_DEFINITION=R.DESCRIPTION_OVERRIDE=R.DEPRECATED_DEFAULT_ARGUMENT_VALUE=R.DEPRECATED=R.DEFAULT_SUBSCRIPTION=R.DEFAULT_QUERY=R.DEFAULT_MUTATION=R.DEFAULT_EDFS_PROVIDER_ID=R.DEFAULT=R.CONTEXT=R.CONNECT_FIELD_RESOLVER=R.CONSUMER_NAME=R.CONSUMER_INACTIVE_THRESHOLD=R.CONFIGURE_CHILD_DESCRIPTIONS=R.CONFIGURE_DESCRIPTION=R.CONDITION=R.COMPOSE_DIRECTIVE=R.CHANNELS=R.CHANNEL=R.BOOLEAN_SCALAR=R.BOOLEAN=R.ARGUMENT_DEFINITION_UPPER=R.AUTHENTICATED=R.ARGUMENT=R.ANY_SCALAR=R.AND_UPPER=R.AS=void 0;R.NOT_UPPER=R.NON_NULLABLE_STRING=R.NON_NULLABLE_INT=R.NON_NULLABLE_BOOLEAN=R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=R.NAME=R.NOT_APPLICABLE=R.PROVIDER_TYPE_REDIS=R.PROVIDER_TYPE_NATS=R.PROVIDER_TYPE_KAFKA=R.PROPAGATE=R.MUTATION_UPPER=R.MUTATION=R.NUMBER=R.LITERAL_PERIOD=R.LITERAL_NEW_LINE=R.LITERAL_SPACE=R.LIST=R.LINK_PURPOSE=R.LINK_IMPORT=R.LINK=R.LEVELS=R.LEFT_PARENTHESIS=R.KEY=R.INTERFACE_OBJECT=R.INTERFACE_UPPER=R.INTERFACE=R.INT_SCALAR=R.INPUT_VALUE=R.INPUT_OBJECT_UPPER=R.INPUT_OBJECT=R.INPUT_FIELD_DEFINITION_UPPER=R.INPUT_FIELD=R.INPUT=R.INLINE_FRAGMENT_UPPER=R.INLINE_FRAGMENT=R.INACCESSIBLE=R.IN_UPPER=R.IMPORT=R.ID_SCALAR=R.HYPHEN_JOIN=R.FROM=R.FRAGMENT_SPREAD_UPPER=R.FRAGMENT_DEFINITION_UPPER=R.FOR=R.FLOAT_SCALAR=R.FIRST_ORDINAL=R.FIELD_DEFINITION_UPPER=R.FIELDS=R.FIELD_SET_SCALAR=void 0;R.TAG=R.SUCCESS=R.SUBSCRIPTION_UPPER=R.SUBSCRIBE=R.SUBSCRIPTION_FILTER_VALUE=R.SUBSCRIPTION_FILTER_CONDITION=R.SUBSCRIPTION_FILTER=R.SUBSCRIPTION_FIELD_CONDITION=R.SUBSCRIPTION=R.SUBJECTS=R.SUBJECT=R.STRING_SCALAR=R.STRING=R.STREAM_NAME=R.STREAM_CONFIGURATION=R.SPECIFIED_BY=R.SHAREABLE=R.SERVICE_FIELD=R.SERVICE_OBJECT=R.SEMANTIC_NON_NULL=R.SELECTION_REPRESENTATION=R.SECURITY=R.SCOPE_SCALAR=R.SCOPES=R.SCHEMA_UPPER=R.SCHEMA=R.SCALAR_UPPER=R.SCALAR=R.RESOLVABLE=R.REQUIRES_SCOPES=R.REQUIRES=R.REQUIRE_FETCH_REASONS=R.REQUEST=R.REASON=R.QUOTATION_JOIN=R.QUERY_UPPER=R.QUERY=R.PUBLISH=R.PROVIDES=R.PROVIDER_ID=R.PARENT_EXTENSION_DATA_MAP=R.PARENT_DEFINITION_DATA_MAP=R.PARENT_DEFINITION_DATA=R.OVERRIDE=R.OR_UPPER=R.OBJECT_UPPER=R.OBJECT=R.OPERATION_TO_DEFAULT=R.ONE_OF=R.NULL=void 0;R.NON_REPEATABLE_PERSISTED_DIRECTIVES=R.OUTPUT_NODE_KINDS=R.INPUT_NODE_KINDS=R.IGNORED_FIELDS=R.INHERITABLE_DIRECTIVE_NAMES=R.PERSISTED_CLIENT_DIRECTIVES=R.AUTHORIZATION_DIRECTIVES=R.ROOT_TYPE_NAMES=R.EXECUTABLE_DIRECTIVE_LOCATIONS=R.VARIABLE_DEFINITION_UPPER=R.VALUES=R.URL_LOWER=R.UNION_UPPER=R.UNION=R.TYPENAME=R.TOPICS=R.TOPIC=void 0;var vu=Ie();R.AS="as";R.AND_UPPER="AND";R.ANY_SCALAR="_Any";R.ARGUMENT="argument";R.AUTHENTICATED="authenticated";R.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";R.BOOLEAN="boolean";R.BOOLEAN_SCALAR="Boolean";R.CHANNEL="channel";R.CHANNELS="channels";R.COMPOSE_DIRECTIVE="composeDirective";R.CONDITION="condition";R.CONFIGURE_DESCRIPTION="openfed__configureDescription";R.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";R.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";R.CONSUMER_NAME="consumerName";R.CONNECT_FIELD_RESOLVER="connect__fieldResolver";R.CONTEXT="context";R.DEFAULT="default";R.DEFAULT_EDFS_PROVIDER_ID="default";R.DEFAULT_MUTATION="Mutation";R.DEFAULT_QUERY="Query";R.DEFAULT_SUBSCRIPTION="Subscription";R.DEPRECATED="deprecated";R.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";R.DESCRIPTION_OVERRIDE="descriptionOverride";R.DIRECTIVE_DEFINITION="directive definition";R.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";R.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";R.EDFS_NATS_PUBLISH="edfs__natsPublish";R.EDFS_NATS_REQUEST="edfs__natsRequest";R.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";R.EDFS_PUBLISH_RESULT="edfs__PublishResult";R.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";R.EDFS_REDIS_PUBLISH="edfs__redisPublish";R.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";R.ENTITIES="entities";R.ENTITIES_FIELD="_entities";R.ENTITY_UNION="_Entity";R.ENUM="Enum";R.ENUM_UPPER="ENUM";R.ENUM_VALUE="Enum Value";R.ENUM_VALUE_UPPER="ENUM_VALUE";R.EXECUTION="EXECUTION";R.EXTERNAL="external";R.EXTENDS="extends";R.EXTENSIONS="extensions";R.FIELD="field";R.FIELD_PATH="fieldPath";R.FIELD_UPPER="FIELD";R.FIELD_SET_SCALAR="openfed__FieldSet";R.FIELDS="fields";R.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";R.FIRST_ORDINAL="1st";R.FLOAT_SCALAR="Float";R.FOR="for";R.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";R.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";R.FROM="from";R.HYPHEN_JOIN=` -`;R.ID_SCALAR="ID";R.IMPORT="import";R.IN_UPPER="IN";R.INACCESSIBLE="inaccessible";R.INLINE_FRAGMENT="inlineFragment";R.INLINE_FRAGMENT_UPPER="INLINE_FRAGMENT";R.INPUT="Input";R.INPUT_FIELD="Input field";R.INPUT_FIELD_DEFINITION_UPPER="INPUT_FIELD_DEFINITION";R.INPUT_OBJECT="Input Object";R.INPUT_OBJECT_UPPER="INPUT_OBJECT";R.INPUT_VALUE="Input Value";R.INT_SCALAR="Int";R.INTERFACE="Interface";R.INTERFACE_UPPER="INTERFACE";R.INTERFACE_OBJECT="interfaceObject";R.KEY="key";R.LEFT_PARENTHESIS="(";R.LEVELS="levels";R.LINK="link";R.LINK_IMPORT="link__Import";R.LINK_PURPOSE="link__Purpose";R.LIST="list";R.LITERAL_SPACE=" ";R.LITERAL_NEW_LINE=` -`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INPUT_OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INTERFACE_TYPE_DEFINITION,vu.Kind.OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION,vu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Fr=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=R7;Wn.isNodeInterfaceObject=P7;Wn.stringToNameNode=NT;Wn.stringArrayToNameNodeArray=F7;Wn.setToNameNodeArray=w7;Wn.stringToNamedTypeNode=IB;Wn.setToNamedTypeNodeArray=L7;Wn.nodeKindToDirectiveLocation=C7;Wn.isKindAbstract=B7;Wn.extractExecutableDirectiveLocations=U7;Wn.formatDescription=k7;Wn.lexicographicallySortArgumentNodes=gB;Wn.lexicographicallySortSelectionSetNode=mT;Wn.lexicographicallySortDocumentNode=M7;Wn.parse=_B;Wn.safeParse=x7;var Mt=Ie(),An=zn();function R7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.KEY)return!0;return!1}function P7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===An.INTERFACE_OBJECT)return!0;return!1}function NT(e){return{kind:Mt.Kind.NAME,value:e}}function F7(e){let t=[];for(let n of e)t.push(NT(n));return t}function w7(e){let t=[];for(let n of e)t.push(NT(n));return t}function IB(e){return{kind:Mt.Kind.NAMED_TYPE,name:NT(e)}}function L7(e){let t=[];for(let n of e)t.push(IB(n));return t}function C7(e){switch(e){case Mt.Kind.ARGUMENT:return An.ARGUMENT_DEFINITION_UPPER;case Mt.Kind.ENUM_TYPE_DEFINITION:case Mt.Kind.ENUM_TYPE_EXTENSION:return An.ENUM_UPPER;case Mt.Kind.ENUM_VALUE_DEFINITION:return An.ENUM_VALUE_UPPER;case Mt.Kind.FIELD_DEFINITION:return An.FIELD_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_DEFINITION:return An.FRAGMENT_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_SPREAD:return An.FRAGMENT_SPREAD_UPPER;case Mt.Kind.INLINE_FRAGMENT:return An.INLINE_FRAGMENT_UPPER;case Mt.Kind.INPUT_VALUE_DEFINITION:return An.INPUT_FIELD_DEFINITION_UPPER;case Mt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Mt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return An.INPUT_OBJECT_UPPER;case Mt.Kind.INTERFACE_TYPE_DEFINITION:case Mt.Kind.INTERFACE_TYPE_EXTENSION:return An.INTERFACE_UPPER;case Mt.Kind.OBJECT_TYPE_DEFINITION:case Mt.Kind.OBJECT_TYPE_EXTENSION:return An.OBJECT_UPPER;case Mt.Kind.SCALAR_TYPE_DEFINITION:case Mt.Kind.SCALAR_TYPE_EXTENSION:return An.SCALAR_UPPER;case Mt.Kind.SCHEMA_DEFINITION:case Mt.Kind.SCHEMA_EXTENSION:return An.SCHEMA_UPPER;case Mt.Kind.UNION_TYPE_DEFINITION:case Mt.Kind.UNION_TYPE_EXTENSION:return An.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[Mt.OperationTypeNode.MUTATION,An.MUTATION],[Mt.OperationTypeNode.QUERY,An.QUERY],[Mt.OperationTypeNode.SUBSCRIPTION,An.SUBSCRIPTION]]);function B7(e){return e===Mt.Kind.INTERFACE_TYPE_DEFINITION||e===Mt.Kind.UNION_TYPE_DEFINITION}function U7(e,t){for(let n of e){let r=n.value;An.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function k7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` +`;R.LITERAL_PERIOD=".";R.NUMBER="number";R.MUTATION="Mutation";R.MUTATION_UPPER="MUTATION";R.PROPAGATE="propagate";R.PROVIDER_TYPE_KAFKA="kafka";R.PROVIDER_TYPE_NATS="nats";R.PROVIDER_TYPE_REDIS="redis";R.NOT_APPLICABLE="N/A";R.NAME="name";R.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";R.NON_NULLABLE_BOOLEAN="Boolean!";R.NON_NULLABLE_INT="Int!";R.NON_NULLABLE_STRING="String!";R.NOT_UPPER="NOT";R.NULL="Null";R.ONE_OF="oneOf";R.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";R.OBJECT="Object";R.OBJECT_UPPER="OBJECT";R.OR_UPPER="OR";R.OVERRIDE="override";R.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";R.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";R.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";R.PROVIDER_ID="providerId";R.PROVIDES="provides";R.PUBLISH="publish";R.QUERY="Query";R.QUERY_UPPER="QUERY";R.QUOTATION_JOIN='", "';R.REASON="reason";R.REQUEST="request";R.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";R.REQUIRES="requires";R.REQUIRES_SCOPES="requiresScopes";R.RESOLVABLE="resolvable";R.SCALAR="Scalar";R.SCALAR_UPPER="SCALAR";R.SCHEMA="schema";R.SCHEMA_UPPER="SCHEMA";R.SCOPES="scopes";R.SCOPE_SCALAR="openfed__Scope";R.SECURITY="SECURITY";R.SELECTION_REPRESENTATION=" { ... }";R.SEMANTIC_NON_NULL="semanticNonNull";R.SERVICE_OBJECT="_Service";R.SERVICE_FIELD="_service";R.SHAREABLE="shareable";R.SPECIFIED_BY="specifiedBy";R.STREAM_CONFIGURATION="streamConfiguration";R.STREAM_NAME="streamName";R.STRING="string";R.STRING_SCALAR="String";R.SUBJECT="subject";R.SUBJECTS="subjects";R.SUBSCRIPTION="Subscription";R.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";R.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";R.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";R.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";R.SUBSCRIBE="subscribe";R.SUBSCRIPTION_UPPER="SUBSCRIPTION";R.SUCCESS="success";R.TAG="tag";R.TOPIC="topic";R.TOPICS="topics";R.TYPENAME="__typename";R.UNION="Union";R.UNION_UPPER="UNION";R.URL_LOWER="url";R.VALUES="values";R.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";R.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([R.FIELD_UPPER,R.FRAGMENT_DEFINITION_UPPER,R.FRAGMENT_SPREAD_UPPER,R.INLINE_FRAGMENT_UPPER,R.MUTATION_UPPER,R.QUERY_UPPER,R.SUBSCRIPTION_UPPER]);R.ROOT_TYPE_NAMES=new Set([R.MUTATION,R.QUERY,R.SUBSCRIPTION]);R.AUTHORIZATION_DIRECTIVES=new Set([R.AUTHENTICATED,R.REQUIRES_SCOPES]);R.PERSISTED_CLIENT_DIRECTIVES=new Set([R.DEPRECATED,R.ONE_OF,R.SEMANTIC_NON_NULL]);R.INHERITABLE_DIRECTIVE_NAMES=new Set([R.EXTERNAL,R.REQUIRE_FETCH_REASONS,R.SHAREABLE]);R.IGNORED_FIELDS=new Set([R.ENTITIES_FIELD,R.SERVICE_FIELD]);R.INPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INPUT_OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION]);R.OUTPUT_NODE_KINDS=new Set([vu.Kind.ENUM_TYPE_DEFINITION,vu.Kind.INTERFACE_TYPE_DEFINITION,vu.Kind.OBJECT_TYPE_DEFINITION,vu.Kind.SCALAR_TYPE_DEFINITION,vu.Kind.UNION_TYPE_DEFINITION]);R.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([R.INACCESSIBLE,R.ONE_OF,R.SEMANTIC_NON_NULL])});var Fr=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.operationTypeNodeToDefaultType=void 0;Wn.isObjectLikeNodeEntity=P7;Wn.isNodeInterfaceObject=F7;Wn.stringToNameNode=NT;Wn.stringArrayToNameNodeArray=w7;Wn.setToNameNodeArray=L7;Wn.stringToNamedTypeNode=IB;Wn.setToNamedTypeNodeArray=C7;Wn.nodeKindToDirectiveLocation=B7;Wn.isKindAbstract=U7;Wn.extractExecutableDirectiveLocations=k7;Wn.formatDescription=M7;Wn.lexicographicallySortArgumentNodes=gB;Wn.lexicographicallySortSelectionSetNode=mT;Wn.lexicographicallySortDocumentNode=x7;Wn.parse=_B;Wn.safeParse=q7;var Mt=Ie(),Rn=zn();function P7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.KEY)return!0;return!1}function F7(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Rn.INTERFACE_OBJECT)return!0;return!1}function NT(e){return{kind:Mt.Kind.NAME,value:e}}function w7(e){let t=[];for(let n of e)t.push(NT(n));return t}function L7(e){let t=[];for(let n of e)t.push(NT(n));return t}function IB(e){return{kind:Mt.Kind.NAMED_TYPE,name:NT(e)}}function C7(e){let t=[];for(let n of e)t.push(IB(n));return t}function B7(e){switch(e){case Mt.Kind.ARGUMENT:return Rn.ARGUMENT_DEFINITION_UPPER;case Mt.Kind.ENUM_TYPE_DEFINITION:case Mt.Kind.ENUM_TYPE_EXTENSION:return Rn.ENUM_UPPER;case Mt.Kind.ENUM_VALUE_DEFINITION:return Rn.ENUM_VALUE_UPPER;case Mt.Kind.FIELD_DEFINITION:return Rn.FIELD_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_DEFINITION:return Rn.FRAGMENT_DEFINITION_UPPER;case Mt.Kind.FRAGMENT_SPREAD:return Rn.FRAGMENT_SPREAD_UPPER;case Mt.Kind.INLINE_FRAGMENT:return Rn.INLINE_FRAGMENT_UPPER;case Mt.Kind.INPUT_VALUE_DEFINITION:return Rn.INPUT_FIELD_DEFINITION_UPPER;case Mt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Mt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Rn.INPUT_OBJECT_UPPER;case Mt.Kind.INTERFACE_TYPE_DEFINITION:case Mt.Kind.INTERFACE_TYPE_EXTENSION:return Rn.INTERFACE_UPPER;case Mt.Kind.OBJECT_TYPE_DEFINITION:case Mt.Kind.OBJECT_TYPE_EXTENSION:return Rn.OBJECT_UPPER;case Mt.Kind.SCALAR_TYPE_DEFINITION:case Mt.Kind.SCALAR_TYPE_EXTENSION:return Rn.SCALAR_UPPER;case Mt.Kind.SCHEMA_DEFINITION:case Mt.Kind.SCHEMA_EXTENSION:return Rn.SCHEMA_UPPER;case Mt.Kind.UNION_TYPE_DEFINITION:case Mt.Kind.UNION_TYPE_EXTENSION:return Rn.UNION_UPPER;default:return e}}Wn.operationTypeNodeToDefaultType=new Map([[Mt.OperationTypeNode.MUTATION,Rn.MUTATION],[Mt.OperationTypeNode.QUERY,Rn.QUERY],[Mt.OperationTypeNode.SUBSCRIPTION,Rn.SUBSCRIPTION]]);function U7(e){return e===Mt.Kind.INTERFACE_TYPE_DEFINITION||e===Mt.Kind.UNION_TYPE_DEFINITION}function k7(e,t){for(let n of e){let r=n.value;Rn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function M7(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` `);n.length>1&&(t=n.map(r=>r.trimStart()).join(` -`))}return $(k({},e),{value:t,block:!0})}function gB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function mT(e){let t=e.selections;return $(k({},e),{selections:t.sort((n,r)=>{var a,o,u,l;return An.NAME in n?An.NAME in r?n.name.value.localeCompare(r.name.value):-1:An.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(u=r.typeCondition)==null?void 0:u.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case Mt.Kind.FIELD:return $(k({},n),{arguments:gB(n),selectionSet:n.selectionSet?mT(n.selectionSet):n.selectionSet});case Mt.Kind.FRAGMENT_SPREAD:return n;case Mt.Kind.INLINE_FRAGMENT:return $(k({},n),{selectionSet:mT(n.selectionSet)})}})})}function M7(e){return $(k({},e),{definitions:e.definitions.map(t=>t.kind!==Mt.Kind.OPERATION_DEFINITION?t:$(k({},t),{selectionSet:mT(t.selectionSet)}))})}function _B(e,t=!0){return(0,Mt.parse)(e,{noLocation:t})}function x7(e,t=!0){try{return{documentNode:_B(e,t)}}catch(n){return{error:n}}}});var SB=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.AccumulatorMap=void 0;xl.mapValue=Ml;xl.extendSchemaImpl=q7;var Be=Ie(),Ls=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};xl.AccumulatorMap=Ls;function Ml(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function q7(e,t,n){var De,ge,Le,St;let r=[],i=new Ls,a=new Ls,o=new Ls,u=new Ls,l=new Ls,d=new Ls,p=[],E,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Be.Kind.SCHEMA_DEFINITION:E=Y;break;case Be.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Be.Kind.DIRECTIVE_DEFINITION:p.push(Y);break;case Be.Kind.SCALAR_TYPE_DEFINITION:case Be.Kind.OBJECT_TYPE_DEFINITION:case Be.Kind.INTERFACE_TYPE_DEFINITION:case Be.Kind.UNION_TYPE_DEFINITION:case Be.Kind.ENUM_TYPE_DEFINITION:case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Y);break;case Be.Kind.SCALAR_TYPE_EXTENSION:i.add(Y.name.value,Y);break;case Be.Kind.OBJECT_TYPE_EXTENSION:a.add(Y.name.value,Y);break;case Be.Kind.INTERFACE_TYPE_EXTENSION:o.add(Y.name.value,Y);break;case Be.Kind.UNION_TYPE_EXTENSION:u.add(Y.name.value,Y);break;case Be.Kind.ENUM_TYPE_EXTENSION:l.add(Y.name.value,Y);break;case Be.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Y.name.value,Y);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Y of e.types){let ie=ee(Y);ie&&A.set(Y.name,ie)}for(let Y of r){let ie=Y.name.value;A.set(ie,(De=vB.get(ie))!=null?De:ae(Y))}for(let[Y,ie]of a)A.set(Y,new Be.GraphQLObjectType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,ie]of o)A.set(Y,new Be.GraphQLInterfaceType({name:Y,interfaces:()=>Ht(ie),fields:()=>Tn(ie),extensionASTNodes:ie}));for(let[Y,ie]of l)A.set(Y,new Be.GraphQLEnumType({name:Y,values:gn(ie),extensionASTNodes:ie}));for(let[Y,ie]of u)A.set(Y,new Be.GraphQLUnionType({name:Y,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Y,ie]of i)A.set(Y,new Be.GraphQLScalarType({name:Y,extensionASTNodes:ie}));for(let[Y,ie]of d)A.set(Y,new Be.GraphQLInputObjectType({name:Y,fields:()=>dr(ie),extensionASTNodes:ie}))}let U=k(k({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},E&&rn([E])),rn(I));return $(k({description:(Le=(ge=E==null?void 0:E.description)==null?void 0:ge.value)!=null?Le:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(re),...p.map(Gt)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Y){return(0,Be.isListType)(Y)?new Be.GraphQLList(j(Y.ofType)):(0,Be.isNonNullType)(Y)?new Be.GraphQLNonNull(j(Y.ofType)):Q(Y)}function Q(Y){return A.get(Y.name)}function re(Y){if((0,Be.isSpecifiedDirective)(Y))return Y;let ie=Y.toConfig();return new Be.GraphQLDirective($(k({},ie),{args:Ml(ie.args,vt)}))}function ee(Y){if((0,Be.isIntrospectionType)(Y)||(0,Be.isSpecifiedScalarType)(Y))return Y;if((0,Be.isScalarType)(Y))return Ae(Y);if((0,Be.isObjectType)(Y))return Me(Y);if((0,Be.isInterfaceType)(Y))return Ze(Y);if((0,Be.isUnionType)(Y))return Z(Y);if((0,Be.isEnumType)(Y))return ue(Y);if((0,Be.isInputObjectType)(Y))return me(Y)}function me(Y){var He;let ie=Y.toConfig(),xe=(He=d.get(ie.name))!=null?He:[];return new Be.GraphQLInputObjectType($(k({},ie),{fields:()=>k(k({},Ml(ie.fields,Bt=>$(k({},Bt),{type:j(Bt.type)}))),dr(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function ue(Y){var He;let ie=Y.toConfig(),xe=(He=l.get(Y.name))!=null?He:[];return new Be.GraphQLEnumType($(k({},ie),{values:k(k({},ie.values),gn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ae(Y){var Bt,it;let ie=Y.toConfig(),xe=(Bt=i.get(ie.name))!=null?Bt:[],He=ie.specifiedByURL;for(let Pt of xe)He=(it=OB(Pt))!=null?it:He;return new Be.GraphQLScalarType($(k({},ie),{specifiedByURL:He,extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Me(Y){var He;let ie=Y.toConfig(),xe=(He=a.get(ie.name))!=null?He:[];return new Be.GraphQLObjectType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),Tn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ze(Y){var He;let ie=Y.toConfig(),xe=(He=o.get(ie.name))!=null?He:[];return new Be.GraphQLInterfaceType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),Tn(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Z(Y){var He;let ie=Y.toConfig(),xe=(He=u.get(ie.name))!=null?He:[];return new Be.GraphQLUnionType($(k({},ie),{types:()=>[...Y.getTypes().map(Q),...Ln(xe)],extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function ve(Y){return $(k({},Y),{type:j(Y.type),args:Y.args&&Ml(Y.args,vt)})}function vt(Y){return $(k({},Y),{type:j(Y.type)})}function rn(Y){var xe;let ie={};for(let He of Y){let Bt=(xe=He.operationTypes)!=null?xe:[];for(let it of Bt)ie[it.operation]=an(it.type)}return ie}function an(Y){var He;let ie=Y.name.value,xe=(He=vB.get(ie))!=null?He:A.get(ie);if(xe===void 0)throw new Error(`Unknown type: "${ie}".`);return xe}function wn(Y){return Y.kind===Be.Kind.LIST_TYPE?new Be.GraphQLList(wn(Y.type)):Y.kind===Be.Kind.NON_NULL_TYPE?new Be.GraphQLNonNull(wn(Y.type)):an(Y)}function Gt(Y){var ie;return new Be.GraphQLDirective({name:Y.name.value,description:(ie=Y.description)==null?void 0:ie.value,locations:Y.locations.map(({value:xe})=>xe),isRepeatable:Y.repeatable,args:kr(Y.arguments),astNode:Y})}function Tn(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={type:wn(Pt.type),description:(He=Pt.description)==null?void 0:He.value,args:kr(Pt.arguments),deprecationReason:TT(Pt),astNode:Pt}}return ie}function kr(Y){var He;let ie=Y!=null?Y:[],xe=Object.create(null);for(let Bt of ie){let it=wn(Bt.type);xe[Bt.name.value]={type:it,description:(He=Bt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Bt.defaultValue,it),deprecationReason:TT(Bt),astNode:Bt}}return xe}function dr(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it){let ps=wn(Pt.type);ie[Pt.name.value]={type:ps,description:(He=Pt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Pt.defaultValue,ps),deprecationReason:TT(Pt),astNode:Pt}}}return ie}function gn(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.values)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={description:(He=Pt.description)==null?void 0:He.value,deprecationReason:TT(Pt),astNode:Pt}}return ie}function Ht(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.interfaces)==null?void 0:xe.map(an))!=null?He:[]})}function Ln(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.types)==null?void 0:xe.map(an))!=null?He:[]})}function ae(Y){var xe,He,Bt,it,Pt,ps,Yr,ms,rl,Ba,Ir,oi;let ie=Y.name.value;switch(Y.kind){case Be.Kind.OBJECT_TYPE_DEFINITION:{let xt=(xe=a.get(ie))!=null?xe:[],gr=[Y,...xt];return a.delete(ie),new Be.GraphQLObjectType({name:ie,description:(He=Y.description)==null?void 0:He.value,interfaces:()=>Ht(gr),fields:()=>Tn(gr),astNode:Y,extensionASTNodes:xt})}case Be.Kind.INTERFACE_TYPE_DEFINITION:{let xt=(Bt=o.get(ie))!=null?Bt:[],gr=[Y,...xt];return o.delete(ie),new Be.GraphQLInterfaceType({name:ie,description:(it=Y.description)==null?void 0:it.value,interfaces:()=>Ht(gr),fields:()=>Tn(gr),astNode:Y,extensionASTNodes:xt})}case Be.Kind.ENUM_TYPE_DEFINITION:{let xt=(Pt=l.get(ie))!=null?Pt:[],gr=[Y,...xt];return l.delete(ie),new Be.GraphQLEnumType({name:ie,description:(ps=Y.description)==null?void 0:ps.value,values:gn(gr),astNode:Y,extensionASTNodes:xt})}case Be.Kind.UNION_TYPE_DEFINITION:{let xt=(Yr=u.get(ie))!=null?Yr:[],gr=[Y,...xt];return u.delete(ie),new Be.GraphQLUnionType({name:ie,description:(ms=Y.description)==null?void 0:ms.value,types:()=>Ln(gr),astNode:Y,extensionASTNodes:xt})}case Be.Kind.SCALAR_TYPE_DEFINITION:{let xt=(rl=i.get(ie))!=null?rl:[];return i.delete(ie),new Be.GraphQLScalarType({name:ie,description:(Ba=Y.description)==null?void 0:Ba.value,specifiedByURL:OB(Y),astNode:Y,extensionASTNodes:xt})}case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let xt=(Ir=d.get(ie))!=null?Ir:[],gr=[Y,...xt];return d.delete(ie),new Be.GraphQLInputObjectType({name:ie,description:(oi=Y.description)==null?void 0:oi.value,fields:()=>dr(gr),astNode:Y,extensionASTNodes:xt})}}}}var vB=new Map([...Be.specifiedScalarTypes,...Be.introspectionTypes].map(e=>[e.name,e]));function TT(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function OB(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Vv=w(qv=>{"use strict";m();T();N();Object.defineProperty(qv,"__esModule",{value:!0});qv.buildASTSchema=K7;var DB=Ie(),V7=Bl(),j7=SB();function K7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,V7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,j7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...DB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new DB.GraphQLSchema($(k({},r),{directives:i}))}});var ql=w(Ou=>{"use strict";m();T();N();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.MAX_INT32=Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=Ou.MAXIMUM_TYPE_NESTING=void 0;Ou.MAXIMUM_TYPE_NESTING=30;Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=5;Ou.MAX_INT32=cn(2,31)-1});var wr=w(ur=>{"use strict";m();T();N();Object.defineProperty(ur,"__esModule",{value:!0});ur.getOrThrowError=G7;ur.getEntriesNotInHashSet=Q7;ur.numberToOrdinal=Y7;ur.addIterableToSet=J7;ur.addOptionalIterableToSet=H7;ur.addSets=z7;ur.kindToNodeType=W7;ur.getValueOrDefault=X7;ur.add=Z7;ur.generateSimpleDirective=eZ;ur.generateRequiresScopesDirective=tZ;ur.generateSemanticNonNullDirective=nZ;ur.copyObjectValueMap=rZ;ur.addNewObjectValueMapEntries=iZ;ur.copyArrayValueMap=aZ;ur.addMapEntries=sZ;ur.getFirstEntry=oZ;var Vt=Ie(),Tr=zn(),$7=Ki(),$f=Fr();function G7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,$7.invalidKeyFatalError)(t,n);return r}function Q7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function Y7(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function J7({source:e,target:t}){for(let n of e)t.add(n)}function H7({source:e,target:t}){if(e)for(let n of e)t.add(n)}function z7(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function W7(e){switch(e){case Vt.Kind.BOOLEAN:return Tr.BOOLEAN_SCALAR;case Vt.Kind.ENUM:case Vt.Kind.ENUM_TYPE_DEFINITION:return Tr.ENUM;case Vt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Vt.Kind.ENUM_VALUE_DEFINITION:return Tr.ENUM_VALUE;case Vt.Kind.FIELD_DEFINITION:return Tr.FIELD;case Vt.Kind.FLOAT:return Tr.FLOAT_SCALAR;case Vt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Tr.INPUT_OBJECT;case Vt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Vt.Kind.INPUT_VALUE_DEFINITION:return Tr.INPUT_VALUE;case Vt.Kind.INT:return Tr.INT_SCALAR;case Vt.Kind.INTERFACE_TYPE_DEFINITION:return Tr.INTERFACE;case Vt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Vt.Kind.NULL:return Tr.NULL;case Vt.Kind.OBJECT:case Vt.Kind.OBJECT_TYPE_DEFINITION:return Tr.OBJECT;case Vt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Vt.Kind.STRING:return Tr.STRING_SCALAR;case Vt.Kind.SCALAR_TYPE_DEFINITION:return Tr.SCALAR;case Vt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Vt.Kind.UNION_TYPE_DEFINITION:return Tr.UNION;case Vt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function X7(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function Z7(e,t){return e.has(t)?!1:(e.add(t),!0)}function eZ(e){return{kind:Vt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(e)}}function tZ(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Vt.Kind.STRING,value:i});t.push({kind:Vt.Kind.LIST,values:r})}return{kind:Vt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.REQUIRES_SCOPES),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.SCOPES),value:{kind:Vt.Kind.LIST,values:t}}]}}function nZ(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Vt.Kind.INT,value:r.toString()});return{kind:Vt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.SEMANTIC_NON_NULL),arguments:[{kind:Vt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.LEVELS),value:{kind:Vt.Kind.LIST,values:n}}]}}function rZ(e){let t=new Map;for(let[n,r]of e)t.set(n,k({},r));return t}function iZ(e,t){for(let[n,r]of e)t.set(n,k({},r))}function aZ(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function sZ({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function oZ(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Gf=w(ET=>{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.ExtensionType=void 0;var bB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(bB||(ET.ExtensionType=bB={}))});var Su=w(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getMutableDirectiveDefinitionNode=cZ;Cr.getMutableEnumNode=lZ;Cr.getMutableEnumValueNode=dZ;Cr.getMutableFieldNode=fZ;Cr.getMutableInputObjectNode=pZ;Cr.getMutableInputValueNode=mZ;Cr.getMutableInterfaceNode=NZ;Cr.getMutableObjectNode=TZ;Cr.getMutableObjectExtensionNode=EZ;Cr.getMutableScalarNode=hZ;Cr.getMutableTypeNode=jv;Cr.getMutableUnionNode=yZ;Cr.getTypeNodeNamedTypeName=Kv;Cr.getNamedTypeNode=RB;var Lr=Ie(),Vl=Fr(),AB=Ki(),uZ=ql();function cZ(e){return{arguments:[],kind:e.kind,locations:[],name:k({},e.name),repeatable:e.repeatable,description:(0,Vl.formatDescription)(e.description)}}function lZ(e){return{kind:Lr.Kind.ENUM_TYPE_DEFINITION,name:k({},e)}}function dZ(e){return{directives:[],kind:e.kind,name:k({},e.name),description:(0,Vl.formatDescription)(e.description)}}function fZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),description:(0,Vl.formatDescription)(e.description)}}function pZ(e){return{kind:Lr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:k({},e)}}function mZ(e,t,n){return{directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Vl.formatDescription)(e.description)}}function NZ(e){return{kind:Lr.Kind.INTERFACE_TYPE_DEFINITION,name:k({},e)}}function TZ(e){return{kind:Lr.Kind.OBJECT_TYPE_DEFINITION,name:k({},e)}}function EZ(e){let t=e.kind===Lr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Lr.Kind.OBJECT_TYPE_EXTENSION,name:k({},e.name),description:(0,Vl.formatDescription)(t)}}function hZ(e){return{kind:Lr.Kind.SCALAR_TYPE_DEFINITION,name:k({},e)}}function jv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(jl,"__esModule",{value:!0});jl.REQUIRED_FIELDSET_TYPE_NODE=jl.REQUIRED_STRING_TYPE_NODE=void 0;var PB=Ie(),FB=Fr(),wB=zn();jl.REQUIRED_STRING_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.STRING_SCALAR)};jl.REQUIRED_FIELDSET_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.FIELD_SET_SCALAR)}});var Qf=w(je=>{"use strict";m();T();N();Object.defineProperty(je,"__esModule",{value:!0});je.TAG_DEFINITION=je.SUBSCRIPTION_FILTER_DEFINITION=je.SPECIFIED_BY_DEFINITION=je.SHAREABLE_DEFINITION=je.SEMANTIC_NON_NULL_DEFINITION=je.REQUIRES_SCOPES_DEFINITION=je.REQUIRES_DEFINITION=je.REQUIRE_FETCH_REASONS_DEFINITION=je.PROVIDES_DEFINITION=je.OVERRIDE_DEFINITION=je.ONE_OF_DEFINITION=je.LINK_DEFINITION=je.KEY_DEFINITION=je.INTERFACE_OBJECT_DEFINITION=je.INACCESSIBLE_DEFINITION=je.EDFS_REDIS_SUBSCRIBE_DEFINITION=je.EDFS_REDIS_PUBLISH_DEFINITION=je.EDFS_NATS_SUBSCRIBE_DEFINITION=je.EDFS_NATS_REQUEST_DEFINITION=je.EDFS_NATS_PUBLISH_DEFINITION=je.EDFS_KAFKA_SUBSCRIBE_DEFINITION=je.EDFS_KAFKA_PUBLISH_DEFINITION=je.EXTERNAL_DEFINITION=je.EXTENDS_DEFINITION=je.DEPRECATED_DEFINITION=je.CONNECT_FIELD_RESOLVER_DEFINITION=je.CONFIGURE_DESCRIPTION_DEFINITION=je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=je.COMPOSE_DIRECTIVE_DEFINITION=je.AUTHENTICATED_DEFINITION=void 0;var Ee=Ie(),pe=Fr(),H=zn(),vr=hT();je.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};je.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};je.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};je.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONTEXT),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};je.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.REASON),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.DEPRECATED),repeatable:!1};je.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTENDS),repeatable:!1};je.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.EXTERNAL),repeatable:!1};je.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPIC),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};je.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};je.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};je.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};je.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,pe.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};je.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNEL),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};je.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};je.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};je.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};je.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.RESOLVABLE),type:(0,pe.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.KEY),repeatable:!0};je.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.AS),type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FOR),type:(0,pe.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,pe.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,pe.stringToNameNode)(H.LINK),repeatable:!0};je.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.ONE_OF),repeatable:!1};je.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.OVERRIDE),repeatable:!1};je.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.PROVIDES),repeatable:!1};je.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};je.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.REQUIRES),repeatable:!1};je.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};je.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,pe.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,pe.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};je.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,pe.stringToNameNode)(H.SHAREABLE),repeatable:!0};je.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.URL_LOWER),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,pe.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};je.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,pe.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};je.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,pe.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,pe.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,pe.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,pe.stringToNameNode)(H.TAG),repeatable:!0}});var Du=w($i=>{"use strict";m();T();N();Object.defineProperty($i,"__esModule",{value:!0});$i.MAX_OR_SCOPES=$i.EDFS_ARGS_REGEXP=$i.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=$i.BASE_SCALARS=$i.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ut=zn(),Ot=Qf();$i.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ut.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ut.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ut.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ut.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ut.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ut.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ut.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ut.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ut.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ut.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ut.EXTENDS,Ot.EXTENDS_DEFINITION],[ut.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.KEY,Ot.KEY_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.ONE_OF,Ot.ONE_OF_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.PROVIDES,Ot.PROVIDES_DEFINITION],[ut.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ut.REQUIRES,Ot.REQUIRES_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ut.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ut.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ut.TAG,Ot.TAG_DEFINITION]]);$i.BASE_SCALARS=new Set(["_Any","_Entities",ut.BOOLEAN_SCALAR,ut.FLOAT_SCALAR,ut.ID_SCALAR,ut.INT_SCALAR,ut.FIELD_SET_SCALAR,ut.SCOPE_SCALAR,ut.STRING_SCALAR]);$i.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);$i.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;$i.MAX_OR_SCOPES=16});var yT=w(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.newParentTagData=OZ;vc.newChildTagData=SZ;vc.validateImplicitFieldSets=DZ;vc.newContractTagOptionsFromArrays=bZ;vc.getDescriptionFromString=AZ;var ti=Ie(),IZ=Su(),gZ=Du(),_Z=Fr(),LB=wr(),vZ=zn();function OZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function SZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function DZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let u=(0,LB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(u.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ti.visit)(d,{Argument:{enter(){return U=!1,ti.BREAK}},Field:{enter(j){let Q=p[v];if(A)return U=!1,ti.BREAK;let re=j.name.value;if(re===vZ.TYPENAME)return;let ee=Q.fieldDataByName.get(re);if(!ee||ee.argumentDataByName.size||E[v].has(re))return U=!1,ti.BREAK;let{isUnconditionallyProvided:me}=(0,LB.getOrThrowError)(ee.externalFieldDataBySubgraphName,t,`${ee.originalParentTypeName}.${re}.externalFieldDataBySubgraphName`),ue=e.get(`${ee.renamedParentTypeName}.${re}`);if(ue){if(ue.providedBy.length>0)I.push(...ue.providedBy);else if(ue.requiredBy.length>0)return U=!1,ti.BREAK}else if(!me)return U=!1,ti.BREAK;E[v].add(re);let Ae=(0,IZ.getTypeNodeNamedTypeName)(ee.node.type);if(gZ.BASE_SCALARS.has(Ae))return;let Me=a.get(Ae);if(!Me)return U=!1,ti.BREAK;if(Me.kind===ti.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(Me);return}if((0,_Z.isKindAbstract)(Me.kind))return U=!1,ti.BREAK}},InlineFragment:{enter(){return U=!1,ti.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ti.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ti.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push($(k({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function bZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function AZ(e){if(e)return{block:!0,kind:ti.Kind.STRING,value:e}}});var $l=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=FZ;mt.isNodeExternalOrShareable=wZ;mt.isTypeRequired=LZ;mt.areDefaultValuesCompatible=BB;mt.compareAndValidateInputValueDefaultValues=CZ;mt.setMutualExecutableLocations=BZ;mt.isTypeNameRootType=UZ;mt.getRenamedRootTypeName=kZ;mt.childMapToValueArray=xZ;mt.setLongestDescription=qZ;mt.isParentDataRootType=UB;mt.isInterfaceDefinitionData=VZ;mt.setParentDataExtensionType=jZ;mt.upsertDeprecatedDirective=KZ;mt.upsertTagDirectives=$Z;mt.propagateAuthDirectives=GZ;mt.propagateFieldAuthDirectives=QZ;mt.generateDeprecatedDirective=Yv;mt.getClientPersistedDirectiveNodes=Gv;mt.getClientSchemaFieldNodeByFieldData=HZ;mt.getNodeWithPersistedDirectivesByInputValueData=kB;mt.addValidPersistedDirectiveDefinitionNodeByData=WZ;mt.newInvalidFieldNames=XZ;mt.validateExternalAndShareable=ZZ;mt.isTypeValidImplementation=IT;mt.isNodeDataInaccessible=MB;mt.isLeafKind=eee;mt.getSubscriptionFilterValue=tee;mt.getParentTypeName=nee;mt.newConditionalFieldData=ree;mt.getDefinitionDataCoords=iee;mt.isParentDataCompositeOutputType=aee;mt.newExternalFieldData=see;mt.getInitialFederatedDescription=oee;mt.areKindsEqual=uee;mt.isFieldData=Jv;mt.isInputObjectDefinitionData=cee;mt.isInputNodeKind=lee;mt.isOutputNodeKind=dee;var rt=Ie(),$v=Gf(),Kl=Fr(),Qv=Ki(),jt=zn(),Oc=wr(),RZ=yT(),PZ=Ie();function FZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function wZ(e,t,n){var i;let r={isExternal:n.has(jt.EXTERNAL),isShareable:t||n.has(jt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===jt.EXTERNAL){r.isExternal=!0;continue}o===jt.SHAREABLE&&(r.isShareable=!0)}return r}function LZ(e){return e.kind===rt.Kind.NON_NULL_TYPE}function BB(e,t){switch(e.kind){case rt.Kind.LIST_TYPE:return t.kind===rt.Kind.LIST||t.kind===rt.Kind.NULL;case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NULL)return!0;switch(e.name.value){case jt.BOOLEAN_SCALAR:return t.kind===rt.Kind.BOOLEAN;case jt.FLOAT_SCALAR:return t.kind===rt.Kind.INT||t.kind===rt.Kind.FLOAT;case jt.INT_SCALAR:return t.kind===rt.Kind.INT;case jt.STRING_SCALAR:return t.kind===rt.Kind.STRING;default:return!0}case rt.Kind.NON_NULL_TYPE:return t.kind===rt.Kind.NULL?!1:BB(e.type,t)}}function CZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,rt.print)(e.defaultValue),i=(0,rt.print)(t.defaultValue);if(r!==i){n.push((0,Qv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?jt.ARGUMENT:jt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function BZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function UZ(e,t){return jt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function kZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case rt.OperationTypeNode.MUTATION:return jt.MUTATION;case rt.OperationTypeNode.SUBSCRIPTION:return jt.SUBSCRIPTION;default:return jt.QUERY}}function MZ(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function xZ(e){var n;let t=[];for(let r of e.values()){Jv(r)&&MZ(r);for(let[i,a]of r.directivesByName){if(i===jt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push($(k({},o),{arguments:[{kind:rt.Kind.ARGUMENT,value:{kind:rt.Kind.STRING,value:PZ.DEFAULT_DEPRECATION_REASON},name:(0,Kl.stringToNameNode)(jt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function qZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function QZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(jt.AUTHENTICATED,[(0,Oc.generateSimpleDirective)(jt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(jt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Yv(e){return{kind:rt.Kind.DIRECTIVE,name:(0,Kl.stringToNameNode)(jt.DEPRECATED),arguments:[{kind:rt.Kind.ARGUMENT,name:(0,Kl.stringToNameNode)(jt.REASON),value:{kind:rt.Kind.STRING,value:e||jt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function YZ(e,t,n,r){let i=[];for(let[a,o]of e){let u=t.get(a);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,Qv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function JZ(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Yv(e.persistedDirectivesData.deprecatedReason)),r.push(...YZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function Gv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Yv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===jt.SEMANTIC_NON_NULL&&Jv(e)){t.push((0,Oc.generateSemanticNonNullDirective)((n=(0,Oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}jt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function HZ(e){let t=Gv(e),n=[];for(let r of e.argumentDataByName.values())MB(r)||n.push($(k({},r.node),{directives:Gv(r)}));return $(k({},e.node),{directives:t,arguments:n})}function kB(e,t,n){return e.node.name=(0,Kl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=JZ(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function zZ(e,t,n,r,i){let a=[];for(let[o,u]of t.argumentDataByName){let l=(0,Oc.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(kB(u,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,Qv.invalidRequiredInputValueError)(jt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function WZ(e,t,n,r){let i=[];zZ(i,t,n,r)&&e.push({arguments:i,kind:rt.Kind.DIRECTIVE_DEFINITION,locations:(0,Kl.setToNameNodeArray)(t.executableLocations),name:(0,Kl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function XZ(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function ZZ(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let u=e.externalFieldDataBySubgraphName.get(a);if(u&&!u.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var CB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(CB||(mt.MergeMethod=CB={}));function IT(e,t,n){if(e.kind===rt.Kind.NON_NULL_TYPE)return t.kind!==rt.Kind.NON_NULL_TYPE?!1:IT(e.type,t.type,n);if(t.kind===rt.Kind.NON_NULL_TYPE)return IT(e,t.type,n);switch(e.kind){case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===rt.Kind.LIST_TYPE?IT(e.type,t.type,n):!1}}function MB(e){return e.persistedDirectivesData.directivesByName.has(jt.INACCESSIBLE)||e.directivesByName.has(jt.INACCESSIBLE)}function eee(e){return e===rt.Kind.SCALAR_TYPE_DEFINITION||e===rt.Kind.ENUM_TYPE_DEFINITION}function tee(e){switch(e.kind){case rt.Kind.BOOLEAN:return e.value;case rt.Kind.ENUM:case rt.Kind.STRING:return e.value;case rt.Kind.FLOAT:case rt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case rt.Kind.NULL:return null}}function nee(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function ree(){return{providedBy:[],requiredBy:[]}}function iee(e,t){switch(e.kind){case rt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case rt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case rt.Kind.ARGUMENT:case rt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case rt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function aee(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION||e.kind===rt.Kind.INTERFACE_TYPE_DEFINITION}function see(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function oee(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,RZ.getDescriptionFromString)(t.description)||e.description}function uee(e,t){return e.kind===t.kind}function Jv(e){return e.kind===rt.Kind.FIELD_DEFINITION}function cee(e){return e.kind===rt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function lee(e){return jt.INPUT_NODE_KINDS.has(e)}function dee(e){return jt.OUTPUT_NODE_KINDS.has(e)}});var Wv={};$m(Wv,{__addDisposableResource:()=>aU,__assign:()=>gT,__asyncDelegator:()=>WB,__asyncGenerator:()=>zB,__asyncValues:()=>XB,__await:()=>Gl,__awaiter:()=>$B,__classPrivateFieldGet:()=>nU,__classPrivateFieldIn:()=>iU,__classPrivateFieldSet:()=>rU,__createBinding:()=>vT,__decorate:()=>VB,__disposeResources:()=>sU,__esDecorate:()=>fee,__exportStar:()=>QB,__extends:()=>xB,__generator:()=>GB,__importDefault:()=>tU,__importStar:()=>eU,__makeTemplateObject:()=>ZB,__metadata:()=>KB,__param:()=>jB,__propKey:()=>mee,__read:()=>zv,__rest:()=>qB,__runInitializers:()=>pee,__setFunctionName:()=>Nee,__spread:()=>YB,__spreadArray:()=>HB,__spreadArrays:()=>JB,__values:()=>_T,default:()=>hee});function xB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function jB(e,t){return function(n,r){t(n,r,e)}}function fee(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function pee(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function YB(){for(var e=[],t=0;t1||u(I,v)})})}function u(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof Gl?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){u("next",I)}function p(I){u("throw",I)}function E(I,v){I(v),a.shift(),a.length&&u(a[0][0],a[0][1])}}function WB(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Gl(e[i](o)),done:!1}:a?a(o):o}:a}}function XB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof _T=="function"?_T(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function ZB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function eU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vT(t,e,n);return Tee(t,e),t}function tU(e){return e&&e.__esModule?e:{default:e}}function nU(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function rU(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function iU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function aU(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function sU(e){function t(r){e.error=e.hasError?new Eee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var Hv,gT,vT,Tee,Eee,hee,Xv=Zu(()=>{"use strict";m();T();N();Hv=function(e,t){return Hv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hv(e,t)};gT=function(){return gT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rFU,__assign:()=>OT,__asyncDelegator:()=>vU,__asyncGenerator:()=>_U,__asyncValues:()=>OU,__await:()=>Ql,__awaiter:()=>TU,__classPrivateFieldGet:()=>AU,__classPrivateFieldIn:()=>PU,__classPrivateFieldSet:()=>RU,__createBinding:()=>DT,__decorate:()=>cU,__disposeResources:()=>wU,__esDecorate:()=>dU,__exportStar:()=>hU,__extends:()=>oU,__generator:()=>EU,__importDefault:()=>bU,__importStar:()=>DU,__makeTemplateObject:()=>SU,__metadata:()=>NU,__param:()=>lU,__propKey:()=>pU,__read:()=>tO,__rest:()=>uU,__rewriteRelativeImportExtension:()=>LU,__runInitializers:()=>fU,__setFunctionName:()=>mU,__spread:()=>yU,__spreadArray:()=>gU,__spreadArrays:()=>IU,__values:()=>ST,default:()=>gee});function oU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function uU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function lU(e,t){return function(n,r){t(n,r,e)}}function dU(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function fU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function yU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof Ql?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function vU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ql(e[i](o)),done:!1}:a?a(o):o}:a}}function OU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ST=="function"?ST(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function SU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function DU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=eO(e),r=0;r{"use strict";m();T();N();Zv=function(e,t){return Zv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Zv(e,t)};OT=function(){return OT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Yl=w(Gi=>{"use strict";m();T();N();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.asArray=void 0;Gi.isUrl=kU;Gi.isDocumentString=Dee;Gi.isValidPath=Aee;Gi.compareStrings=MU;Gi.nodeToString=nO;Gi.compareNodes=Ree;Gi.isSome=Pee;Gi.assertSome=Fee;var _ee=Ie(),vee=/^(https?|wss?|file):\/\//;function kU(e){if(typeof e!="string"||!vee.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var Oee=e=>Array.isArray(e)?e:e?[e]:[];Gi.asArray=Oee;var See=/\.[a-z0-9]+$/i;function Dee(e){if(typeof e!="string"||See.test(e)||kU(e))return!1;try{return(0,_ee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} -${e}`)}return!1}var bee=/[‘“!%^<>`\n]/;function Aee(e){return typeof e=="string"&&!bee.test(e)}function MU(e,t){return String(e)String(t)?1:0}function nO(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function Ree(e,t,n){let r=nO(e),i=nO(t);return typeof n=="function"?n(r,i):MU(r,i)}function Pee(e){return e!=null}function Fee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var Yf=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.inspect=void 0;var VU=3;function wee(e){return bT(e,[])}AT.inspect=wee;function bT(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Lee(e,t);default:return String(e)}}function xU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function Lee(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xU(e)+` -`+qU(e.errors,t):xU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Cee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:bT(r,n)}else if(Array.isArray(e))return qU(e,n);return Bee(e,n)}function Cee(e){return typeof e.toJSON=="function"}function Bee(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VU?"["+Uee(e)+"]":"{ "+n.map(([i,a])=>i+": "+bT(a,t)).join(", ")+" }"}function qU(e,t){if(e.length===0)return"[]";if(t.length>VU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.createGraphQLError=iO;RT.relocatedError=xee;var rO=Ie(),kee=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function Mee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>kee.includes(t))}function iO(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Mee(t.originalError)&&(t.originalError=iO(t.originalError.message,t.originalError)),rO.versionInfo.major>=17?new rO.GraphQLError(e,t):new rO.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function xee(e,t){return iO(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var Jf=w(ni=>{"use strict";m();T();N();Object.defineProperty(ni,"__esModule",{value:!0});ni.isPromise=FT;ni.isActualPromise=KU;ni.handleMaybePromise=bu;ni.fakePromise=Xa;ni.createDeferredPromise=qee;ni.iterateAsync=$U;ni.iterateAsyncVoid=$U;ni.fakeRejectPromise=Sc;ni.mapMaybePromise=Vee;ni.mapAsyncIterator=jee;ni.promiseLikeFinally=GU;ni.unfakePromise=QU;var wT=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function FT(e){return(e==null?void 0:e.then)!=null}function KU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function bu(e,t,n,r){let i=Xa().then(e).then(t,n);return r&&(i=i.finally(r)),QU(i)}function Xa(e){return e&&KU(e)?e:FT(e)?{then:(t,n)=>Xa(e.then(t,n)),catch:t=>Xa(e.then(n=>n,t)),finally:t=>Xa(t?GU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Xa(t(e))}catch(n){return Sc(n)}return this},catch(){return this},finally(t){if(t)try{return Xa(t()).then(()=>e,()=>e)}catch(n){return Sc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[wT]:"resolved"}}function qee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function $U(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:u}=r.next();if(o)return;let l=!1;function d(){l=!0}return bu(function(){return t(u,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function Sc(e){return{then(t,n){if(n)try{return Xa(n(e))}catch(r){return Sc(r)}return this},catch(t){if(t)try{return Xa(t(e))}catch(n){return Sc(n)}return this},finally(t){if(t)try{t()}catch(n){return Sc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[wT]:"rejected"}}function Vee(e,t,n){return bu(()=>e,t,n)}function jee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=bu(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:bu(()=>d.value,p=>bu(()=>t(p),jU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=bu(()=>E,I=>bu(()=>p(I),jU,a))),d)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Xa({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):a?a(d):Sc(d)},[Symbol.asyncIterator](){return this}}}function jU(e){return{value:e,done:!1}}function Kee(e){return(e==null?void 0:e[wT])==="resolved"}function $ee(e){return(e==null?void 0:e[wT])==="rejected"}function GU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return FT(r)?r.then(()=>n):n},n=>{let r=t();if(FT(r))return r.then(()=>{throw n});throw n})}function QU(e){if(Kee(e))return e.__fakePromiseValue;if($ee(e))throw e.__fakeRejectError;return e}});var LT=w(Au=>{"use strict";m();T();N();Object.defineProperty(Au,"__esModule",{value:!0});Au.isPromise=void 0;Au.isIterableObject=Gee;Au.isObjectLike=Qee;Au.promiseReduce=Yee;Au.hasOwnProperty=Jee;var YU=Jf();Object.defineProperty(Au,"isPromise",{enumerable:!0,get:function(){return YU.isPromise}});function Gee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Qee(e){return typeof e=="object"&&e!==null}function Yee(e,t,n){let r=n;for(let i of e)r=(0,YU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function Jee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var oO=w(sO=>{"use strict";m();T();N();Object.defineProperty(sO,"__esModule",{value:!0});sO.getArgumentValues=zee;var aO=Yf(),Dc=Ie(),CT=PT(),Hee=LT();function zee(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Dc.Kind.NULL;if(E.kind===Dc.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,Hee.hasOwnProperty)(n,A)){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of non-null type "${(0,aO.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,Dc.valueFromAST)(E,l,n);if(v===void 0)throw(0,CT.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Dc.print)(E)}.`,{nodes:[E]});r[u]=v}return r}});var Ru=w(Cs=>{"use strict";m();T();N();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.memoize1=Wee;Cs.memoize2=Xee;Cs.memoize3=Zee;Cs.memoize4=ete;Cs.memoize5=tte;Cs.memoize2of4=nte;Cs.memoize2of5=rte;function Wee(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function Xee(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let u=e(r,i);return a.set(i,u),u}let o=a.get(i);if(o===void 0){let u=e(r,i);return a.set(i,u),u}return o}}function Zee(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,a);return u.set(a,d),d}let l=u.get(a);if(l===void 0){let d=e(r,i,a);return u.set(a,d),d}return l}}function ete(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let E=new WeakMap;u.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function tte(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,u);return U.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,u);return A.set(u,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,u);return v.set(u,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,u);return E.set(u,v),v}let I=E.get(u);if(I===void 0){let v=e(r,i,a,o,u);return E.set(u,v),v}return I}}function nte(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,a,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,a,o);return u.set(i,d),d}return l}}function rte(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,u);return l.set(i,p),p}return d}}});var cO=w(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getDirectiveExtensions=ste;var JU=Ie(),ite=oO(),ate=Ru();function ste(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,ate.memoize1)(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,ite.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,JU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,JU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var lO=w(Jl=>{"use strict";m();T();N();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.getDirectivesInExtensions=ote;Jl.getDirectiveInExtensions=ute;Jl.getDirectives=cte;Jl.getDirective=lte;var BT=cO();function ote(e,t=["directives"]){let n=(0,BT.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function ute(e,t,n=["directives"]){return(0,BT.getDirectiveExtensions)(e,void 0,n)[t]}function cte(e,t,n=["directives"]){let r=(0,BT.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function lte(e,t,n,r=["directives"]){return(0,BT.getDirectiveExtensions)(t,e,r)[n]}});var fO=w(dO=>{"use strict";m();T();N();Object.defineProperty(dO,"__esModule",{value:!0});dO.getFieldsWithDirectives=fte;var dte=Ie();function fte(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let u of a.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>$(k({},I),{[v.name.value]:(0,dte.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var HU=w(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.getArgumentsWithDirectives=mte;var pO=Ie();function pte(e){return e.kind===pO.Kind.OBJECT_TYPE_DEFINITION||e.kind===pO.Kind.OBJECT_TYPE_EXTENSION}function mte(e){var r;let t={},n=e.definitions.filter(pte);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let u=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>$(k({},E),{[I.name.value]:(0,pO.valueFromASTUntyped)(I.value)}),{})}));u[l.name.value]=d}}return t}});var TO=w(NO=>{"use strict";m();T();N();Object.defineProperty(NO,"__esModule",{value:!0});NO.getImplementingTypes=Nte;function Nte(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(u=>u.name===e)&&r.push(a.name)}return r}});var UT=w(hO=>{"use strict";m();T();N();Object.defineProperty(hO,"__esModule",{value:!0});hO.astFromType=EO;var Tte=Yf(),bc=Ie();function EO(e){if((0,bc.isNonNullType)(e)){let t=EO(e.ofType);if(t.kind===bc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,Tte.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:bc.Kind.NON_NULL_TYPE,type:t}}else if((0,bc.isListType)(e))return{kind:bc.Kind.LIST_TYPE,type:EO(e.ofType)};return{kind:bc.Kind.NAMED_TYPE,name:{kind:bc.Kind.NAME,value:e.name}}}});var Hf=w(yO=>{"use strict";m();T();N();Object.defineProperty(yO,"__esModule",{value:!0});yO.astFromValueUntyped=kT;var Za=Ie();function kT(e){if(e===null)return{kind:Za.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=kT(n);r!=null&&t.push(r)}return{kind:Za.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return kT(e.toJSON());let t=[];for(let n in e){let r=e[n],i=kT(r);i&&t.push({kind:Za.Kind.OBJECT_FIELD,name:{kind:Za.Kind.NAME,value:n},value:i})}return{kind:Za.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:Za.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:Za.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Ete.test(t)?{kind:Za.Kind.INT,value:t}:{kind:Za.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:Za.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Ete=/^-?(?:0|[1-9][0-9]*)$/});var WU=w(IO=>{"use strict";m();T();N();Object.defineProperty(IO,"__esModule",{value:!0});IO.astFromValue=zf;var hte=Yf(),hi=Ie(),yte=Hf(),zU=LT();function zf(e,t){if((0,hi.isNonNullType)(t)){let n=zf(e,t.ofType);return(n==null?void 0:n.kind)===hi.Kind.NULL?null:n}if(e===null)return{kind:hi.Kind.NULL};if(e===void 0)return null;if((0,hi.isListType)(t)){let n=t.ofType;if((0,zU.isIterableObject)(e)){let r=[];for(let i of e){let a=zf(i,n);a!=null&&r.push(a)}return{kind:hi.Kind.LIST,values:r}}return zf(e,n)}if((0,hi.isInputObjectType)(t)){if(!(0,zU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=zf(e[r.name],r.type);i&&n.push({kind:hi.Kind.OBJECT_FIELD,name:{kind:hi.Kind.NAME,value:r.name},value:i})}return{kind:hi.Kind.OBJECT,fields:n}}if((0,hi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,hi.isEnumType)(t)?{kind:hi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Ite.test(n)?{kind:hi.Kind.INT,value:n}:(0,yte.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,hte.inspect)(t))}var Ite=/^-?(?:0|[1-9][0-9]*)$/});var XU=w(gO=>{"use strict";m();T();N();Object.defineProperty(gO,"__esModule",{value:!0});gO.getDescriptionNode=_te;var gte=Ie();function _te(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:gte.Kind.STRING,value:e.description,block:!0}}});var Wf=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.getRootTypeMap=Qi.getRootTypes=Qi.getRootTypeNames=void 0;Qi.getDefinedRootType=Ote;var vte=PT(),_O=Ru();function Ote(e,t,n){let i=(0,Qi.getRootTypeMap)(e).get(t);if(i==null)throw(0,vte.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Qi.getRootTypeNames=(0,_O.memoize1)(function(t){let n=(0,Qi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Qi.getRootTypes=(0,_O.memoize1)(function(t){let n=(0,Qi.getRootTypeMap)(t);return new Set(n.values())});Qi.getRootTypeMap=(0,_O.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var bO=w(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=ek;Xn.printSchemaWithDirectives=Ate;Xn.astFromSchema=tk;Xn.astFromDirective=nk;Xn.getDirectiveNodes=ha;Xn.astFromArg=OO;Xn.astFromObjectType=rk;Xn.astFromInterfaceType=ik;Xn.astFromUnionType=ak;Xn.astFromInputObjectType=sk;Xn.astFromEnumType=ok;Xn.astFromScalarType=uk;Xn.astFromField=SO;Xn.astFromInputField=ck;Xn.astFromEnumValue=lk;Xn.makeDeprecatedDirective=dk;Xn.makeDirectiveNode=Hl;Xn.makeDirectiveNodes=DO;var Nt=Ie(),Ac=UT(),vO=WU(),Ste=Hf(),Yi=XU(),ZU=lO(),Dte=Yl(),bte=Wf();function ek(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=tk(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Nt.isSpecifiedDirective)(u)||a.push(nk(u,e,n));for(let u in r){let l=r[u],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(rk(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(ik(l,e,n));else if((0,Nt.isUnionType)(l))a.push(ak(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(sk(l,e,n));else if((0,Nt.isEnumType)(l))a.push(ok(l,e,n));else if((0,Nt.isScalarType)(l))a.push(uk(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function Ate(e,t={}){let n=ek(e,t);return(0,Nt.print)(n)}function tk(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,bte.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,Ac.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(Dte.isSome),o=ha(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Yi.getDescriptionNode)(e);return l&&(u.description=l),u}function nk(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>OO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function ha(e,t,n){let r=[],i=(0,ZU.getDirectivesInExtensions)(e,n),a;i!=null&&(a=DO(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=dk(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=Hl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=Hl("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function OO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:ha(e,t,n)}}function rk(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>SO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,Ac.astFromType)(r)),directives:ha(e,t,n)}}function ik(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>SO(i,t,n)),directives:ha(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,Ac.astFromType)(i))),r}function ak(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ha(e,t,n),types:e.getTypes().map(r=>(0,Ac.astFromType)(r))}}function sk(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>ck(r,t,n)),directives:ha(e,t,n)}}function ok(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>lk(r,t,n)),directives:ha(e,t,n)}}function uk(e,t,n){let r=(0,ZU.getDirectivesInExtensions)(e,n),i=DO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(Hl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function SO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>OO(r,t,n)),type:(0,Ac.astFromType)(e.type),directives:ha(e,t,n)}}function ck(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),directives:ha(e,t,n),defaultValue:(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function lk(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Yi.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ha(e,t,n)}}function dk(e){return Hl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function Hl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=(0,vO.astFromValue)(a,u.type))}o==null&&(o=(0,Ste.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function DO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(Hl(r,i,a))}return n}});var pk=w(MT=>{"use strict";m();T();N();Object.defineProperty(MT,"__esModule",{value:!0});MT.validateGraphQlDocuments=Rte;MT.createDefaultRules=fk;var Xf=Ie();function Rte(e,t,n=fk()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Xf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Xf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Xf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` - at ${(u=l.source)==null?void 0:u.name}:${d.line}:${d.column}`;return o}function fk(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Xf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Xf.specifiedRules.filter(t=>!e.includes(t.name))}});var mk=w(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.parseGraphQLJSON=Lte;var Pte=Ie();function Fte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function wte(e){return JSON.parse(Fte(e))}function Lte(e,t,n){let r=wte(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Pte.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var PO=w(Ji=>{"use strict";m();T();N();Object.defineProperty(Ji,"__esModule",{value:!0});Ji.resetComments=Bte;Ji.collectComment=Ute;Ji.pushComment=Zf;Ji.printComment=yk;Ji.printWithComments=qte;Ji.getDescription=jte;Ji.getComment=RO;Ji.getLeadingCommentBlock=Ik;Ji.dedentBlockStringValue=gk;Ji.getBlockStringIndentation=_k;var hk=Ie(),Cte=80,zl={};function Bte(){zl={}}function Ute(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Zf(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Zf(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Zf(r,t,r.name.value),Vte(r)&&r.arguments)for(let i of r.arguments)Zf(i,t,r.name.value,i.name.value)}break}}function Zf(e,t,n,r){let i=RO(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");zl[o]||(zl[o]=[]),zl[o].push(i)}function yk(e){return` +`))}return $(k({},e),{value:t,block:!0})}function gB(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function mT(e){let t=e.selections;return $(k({},e),{selections:t.sort((n,r)=>{var a,o,u,l;return Rn.NAME in n?Rn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Rn.NAME in r?1:((o=(a=n.typeCondition)==null?void 0:a.name.value)!=null?o:"").localeCompare((l=(u=r.typeCondition)==null?void 0:u.name.value)!=null?l:"")}).map(n=>{switch(n.kind){case Mt.Kind.FIELD:return $(k({},n),{arguments:gB(n),selectionSet:n.selectionSet?mT(n.selectionSet):n.selectionSet});case Mt.Kind.FRAGMENT_SPREAD:return n;case Mt.Kind.INLINE_FRAGMENT:return $(k({},n),{selectionSet:mT(n.selectionSet)})}})})}function x7(e){return $(k({},e),{definitions:e.definitions.map(t=>t.kind!==Mt.Kind.OPERATION_DEFINITION?t:$(k({},t),{selectionSet:mT(t.selectionSet)}))})}function _B(e,t=!0){return(0,Mt.parse)(e,{noLocation:t})}function q7(e,t=!0){try{return{documentNode:_B(e,t)}}catch(n){return{error:n}}}});var SB=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.AccumulatorMap=void 0;xl.mapValue=Ml;xl.extendSchemaImpl=V7;var Be=Ie(),Ls=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};xl.AccumulatorMap=Ls;function Ml(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function V7(e,t,n){var De,ge,Le,St;let r=[],i=new Ls,a=new Ls,o=new Ls,u=new Ls,l=new Ls,d=new Ls,p=[],E,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Be.Kind.SCHEMA_DEFINITION:E=Y;break;case Be.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Be.Kind.DIRECTIVE_DEFINITION:p.push(Y);break;case Be.Kind.SCALAR_TYPE_DEFINITION:case Be.Kind.OBJECT_TYPE_DEFINITION:case Be.Kind.INTERFACE_TYPE_DEFINITION:case Be.Kind.UNION_TYPE_DEFINITION:case Be.Kind.ENUM_TYPE_DEFINITION:case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:r.push(Y);break;case Be.Kind.SCALAR_TYPE_EXTENSION:i.add(Y.name.value,Y);break;case Be.Kind.OBJECT_TYPE_EXTENSION:a.add(Y.name.value,Y);break;case Be.Kind.INTERFACE_TYPE_EXTENSION:o.add(Y.name.value,Y);break;case Be.Kind.UNION_TYPE_EXTENSION:u.add(Y.name.value,Y);break;case Be.Kind.ENUM_TYPE_EXTENSION:l.add(Y.name.value,Y);break;case Be.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(Y.name.value,Y);break;default:continue}v=!0}if(!v)return e;let A=new Map;for(let Y of e.types){let ie=ne(Y);ie&&A.set(Y.name,ie)}for(let Y of r){let ie=Y.name.value;A.set(ie,(De=vB.get(ie))!=null?De:ae(Y))}for(let[Y,ie]of a)A.set(Y,new Be.GraphQLObjectType({name:Y,interfaces:()=>Ht(ie),fields:()=>an(ie),extensionASTNodes:ie}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,ie]of o)A.set(Y,new Be.GraphQLInterfaceType({name:Y,interfaces:()=>Ht(ie),fields:()=>an(ie),extensionASTNodes:ie}));for(let[Y,ie]of l)A.set(Y,new Be.GraphQLEnumType({name:Y,values:En(ie),extensionASTNodes:ie}));for(let[Y,ie]of u)A.set(Y,new Be.GraphQLUnionType({name:Y,types:()=>Ln(ie),extensionASTNodes:ie}));for(let[Y,ie]of i)A.set(Y,new Be.GraphQLScalarType({name:Y,extensionASTNodes:ie}));for(let[Y,ie]of d)A.set(Y,new Be.GraphQLInputObjectType({name:Y,fields:()=>nr(ie),extensionASTNodes:ie}))}let U=k(k({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},E&&rn([E])),rn(I));return $(k({description:(Le=(ge=E==null?void 0:E.description)==null?void 0:ge.value)!=null?Le:e.description},U),{types:Array.from(A.values()),directives:[...e.directives.map(ee),...p.map(xt)],extensions:e.extensions,astNode:E!=null?E:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(St=n==null?void 0:n.assumeValid)!=null?St:!1});function j(Y){return(0,Be.isListType)(Y)?new Be.GraphQLList(j(Y.ofType)):(0,Be.isNonNullType)(Y)?new Be.GraphQLNonNull(j(Y.ofType)):Q(Y)}function Q(Y){return A.get(Y.name)}function ee(Y){if((0,Be.isSpecifiedDirective)(Y))return Y;let ie=Y.toConfig();return new Be.GraphQLDirective($(k({},ie),{args:Ml(ie.args,gt)}))}function ne(Y){if((0,Be.isIntrospectionType)(Y)||(0,Be.isSpecifiedScalarType)(Y))return Y;if((0,Be.isScalarType)(Y))return Ae(Y);if((0,Be.isObjectType)(Y))return Me(Y);if((0,Be.isInterfaceType)(Y))return Ze(Y);if((0,Be.isUnionType)(Y))return Z(Y);if((0,Be.isEnumType)(Y))return le(Y);if((0,Be.isInputObjectType)(Y))return pe(Y)}function pe(Y){var He;let ie=Y.toConfig(),xe=(He=d.get(ie.name))!=null?He:[];return new Be.GraphQLInputObjectType($(k({},ie),{fields:()=>k(k({},Ml(ie.fields,Bt=>$(k({},Bt),{type:j(Bt.type)}))),nr(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function le(Y){var He;let ie=Y.toConfig(),xe=(He=l.get(Y.name))!=null?He:[];return new Be.GraphQLEnumType($(k({},ie),{values:k(k({},ie.values),En(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ae(Y){var Bt,it;let ie=Y.toConfig(),xe=(Bt=i.get(ie.name))!=null?Bt:[],He=ie.specifiedByURL;for(let Pt of xe)He=(it=OB(Pt))!=null?it:He;return new Be.GraphQLScalarType($(k({},ie),{specifiedByURL:He,extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Me(Y){var He;let ie=Y.toConfig(),xe=(He=a.get(ie.name))!=null?He:[];return new Be.GraphQLObjectType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),an(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Ze(Y){var He;let ie=Y.toConfig(),xe=(He=o.get(ie.name))!=null?He:[];return new Be.GraphQLInterfaceType($(k({},ie),{interfaces:()=>[...Y.getInterfaces().map(Q),...Ht(xe)],fields:()=>k(k({},Ml(ie.fields,ve)),an(xe)),extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function Z(Y){var He;let ie=Y.toConfig(),xe=(He=u.get(ie.name))!=null?He:[];return new Be.GraphQLUnionType($(k({},ie),{types:()=>[...Y.getTypes().map(Q),...Ln(xe)],extensionASTNodes:ie.extensionASTNodes.concat(xe)}))}function ve(Y){return $(k({},Y),{type:j(Y.type),args:Y.args&&Ml(Y.args,gt)})}function gt(Y){return $(k({},Y),{type:j(Y.type)})}function rn(Y){var xe;let ie={};for(let He of Y){let Bt=(xe=He.operationTypes)!=null?xe:[];for(let it of Bt)ie[it.operation]=un(it.type)}return ie}function un(Y){var He;let ie=Y.name.value,xe=(He=vB.get(ie))!=null?He:A.get(ie);if(xe===void 0)throw new Error(`Unknown type: "${ie}".`);return xe}function In(Y){return Y.kind===Be.Kind.LIST_TYPE?new Be.GraphQLList(In(Y.type)):Y.kind===Be.Kind.NON_NULL_TYPE?new Be.GraphQLNonNull(In(Y.type)):un(Y)}function xt(Y){var ie;return new Be.GraphQLDirective({name:Y.name.value,description:(ie=Y.description)==null?void 0:ie.value,locations:Y.locations.map(({value:xe})=>xe),isRepeatable:Y.repeatable,args:kr(Y.arguments),astNode:Y})}function an(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={type:In(Pt.type),description:(He=Pt.description)==null?void 0:He.value,args:kr(Pt.arguments),deprecationReason:TT(Pt),astNode:Pt}}return ie}function kr(Y){var He;let ie=Y!=null?Y:[],xe=Object.create(null);for(let Bt of ie){let it=In(Bt.type);xe[Bt.name.value]={type:it,description:(He=Bt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Bt.defaultValue,it),deprecationReason:TT(Bt),astNode:Bt}}return xe}function nr(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.fields)!=null?xe:[];for(let Pt of it){let ps=In(Pt.type);ie[Pt.name.value]={type:ps,description:(He=Pt.description)==null?void 0:He.value,defaultValue:(0,Be.valueFromAST)(Pt.defaultValue,ps),deprecationReason:TT(Pt),astNode:Pt}}}return ie}function En(Y){var xe,He;let ie=Object.create(null);for(let Bt of Y){let it=(xe=Bt.values)!=null?xe:[];for(let Pt of it)ie[Pt.name.value]={description:(He=Pt.description)==null?void 0:He.value,deprecationReason:TT(Pt),astNode:Pt}}return ie}function Ht(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.interfaces)==null?void 0:xe.map(un))!=null?He:[]})}function Ln(Y){return Y.flatMap(ie=>{var xe,He;return(He=(xe=ie.types)==null?void 0:xe.map(un))!=null?He:[]})}function ae(Y){var xe,He,Bt,it,Pt,ps,Yr,ms,rl,Ua,Ir,ui;let ie=Y.name.value;switch(Y.kind){case Be.Kind.OBJECT_TYPE_DEFINITION:{let qt=(xe=a.get(ie))!=null?xe:[],gr=[Y,...qt];return a.delete(ie),new Be.GraphQLObjectType({name:ie,description:(He=Y.description)==null?void 0:He.value,interfaces:()=>Ht(gr),fields:()=>an(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.INTERFACE_TYPE_DEFINITION:{let qt=(Bt=o.get(ie))!=null?Bt:[],gr=[Y,...qt];return o.delete(ie),new Be.GraphQLInterfaceType({name:ie,description:(it=Y.description)==null?void 0:it.value,interfaces:()=>Ht(gr),fields:()=>an(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.ENUM_TYPE_DEFINITION:{let qt=(Pt=l.get(ie))!=null?Pt:[],gr=[Y,...qt];return l.delete(ie),new Be.GraphQLEnumType({name:ie,description:(ps=Y.description)==null?void 0:ps.value,values:En(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.UNION_TYPE_DEFINITION:{let qt=(Yr=u.get(ie))!=null?Yr:[],gr=[Y,...qt];return u.delete(ie),new Be.GraphQLUnionType({name:ie,description:(ms=Y.description)==null?void 0:ms.value,types:()=>Ln(gr),astNode:Y,extensionASTNodes:qt})}case Be.Kind.SCALAR_TYPE_DEFINITION:{let qt=(rl=i.get(ie))!=null?rl:[];return i.delete(ie),new Be.GraphQLScalarType({name:ie,description:(Ua=Y.description)==null?void 0:Ua.value,specifiedByURL:OB(Y),astNode:Y,extensionASTNodes:qt})}case Be.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let qt=(Ir=d.get(ie))!=null?Ir:[],gr=[Y,...qt];return d.delete(ie),new Be.GraphQLInputObjectType({name:ie,description:(ui=Y.description)==null?void 0:ui.value,fields:()=>nr(gr),astNode:Y,extensionASTNodes:qt})}}}}var vB=new Map([...Be.specifiedScalarTypes,...Be.introspectionTypes].map(e=>[e.name,e]));function TT(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function OB(e){let t=(0,Be.getDirectiveValues)(Be.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Vv=w(qv=>{"use strict";m();T();N();Object.defineProperty(qv,"__esModule",{value:!0});qv.buildASTSchema=$7;var DB=Ie(),j7=Bl(),K7=SB();function $7(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,j7.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,K7.extendSchemaImpl)(n,e,t);if(r.astNode==null)for(let a of r.types)switch(a.name){case"Query":r.query=a;break;case"Mutation":r.mutation=a;break;case"Subscription":r.subscription=a;break}let i=[...r.directives,...DB.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new DB.GraphQLSchema($(k({},r),{directives:i}))}});var ql=w(Ou=>{"use strict";m();T();N();Object.defineProperty(Ou,"__esModule",{value:!0});Ou.MAX_INT32=Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=Ou.MAXIMUM_TYPE_NESTING=void 0;Ou.MAXIMUM_TYPE_NESTING=30;Ou.MAX_SUBSCRIPTION_FILTER_DEPTH=5;Ou.MAX_INT32=ln(2,31)-1});var wr=w(cr=>{"use strict";m();T();N();Object.defineProperty(cr,"__esModule",{value:!0});cr.getOrThrowError=Q7;cr.getEntriesNotInHashSet=Y7;cr.numberToOrdinal=J7;cr.addIterableToSet=H7;cr.addOptionalIterableToSet=z7;cr.addSets=W7;cr.kindToNodeType=X7;cr.getValueOrDefault=Z7;cr.add=eZ;cr.generateSimpleDirective=tZ;cr.generateRequiresScopesDirective=nZ;cr.generateSemanticNonNullDirective=rZ;cr.copyObjectValueMap=iZ;cr.addNewObjectValueMapEntries=aZ;cr.copyArrayValueMap=sZ;cr.addMapEntries=oZ;cr.getFirstEntry=uZ;var jt=Ie(),Tr=zn(),G7=$i(),$f=Fr();function Q7(e,t,n){let r=e.get(t);if(r===void 0)throw(0,G7.invalidKeyFatalError)(t,n);return r}function Y7(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function J7(e){let t=e.toString();switch(t[t.length-1]){case"1":return`${t}st`;case"2":return`${t}nd`;case"3":return`${t}rd`;default:return`${t}th`}}function H7({source:e,target:t}){for(let n of e)t.add(n)}function z7({source:e,target:t}){if(e)for(let n of e)t.add(n)}function W7(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function X7(e){switch(e){case jt.Kind.BOOLEAN:return Tr.BOOLEAN_SCALAR;case jt.Kind.ENUM:case jt.Kind.ENUM_TYPE_DEFINITION:return Tr.ENUM;case jt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case jt.Kind.ENUM_VALUE_DEFINITION:return Tr.ENUM_VALUE;case jt.Kind.FIELD_DEFINITION:return Tr.FIELD;case jt.Kind.FLOAT:return Tr.FLOAT_SCALAR;case jt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Tr.INPUT_OBJECT;case jt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case jt.Kind.INPUT_VALUE_DEFINITION:return Tr.INPUT_VALUE;case jt.Kind.INT:return Tr.INT_SCALAR;case jt.Kind.INTERFACE_TYPE_DEFINITION:return Tr.INTERFACE;case jt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case jt.Kind.NULL:return Tr.NULL;case jt.Kind.OBJECT:case jt.Kind.OBJECT_TYPE_DEFINITION:return Tr.OBJECT;case jt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case jt.Kind.STRING:return Tr.STRING_SCALAR;case jt.Kind.SCALAR_TYPE_DEFINITION:return Tr.SCALAR;case jt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case jt.Kind.UNION_TYPE_DEFINITION:return Tr.UNION;case jt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function Z7(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function eZ(e,t){return e.has(t)?!1:(e.add(t),!0)}function tZ(e){return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(e)}}function nZ(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:jt.Kind.STRING,value:i});t.push({kind:jt.Kind.LIST,values:r})}return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.REQUIRES_SCOPES),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.SCOPES),value:{kind:jt.Kind.LIST,values:t}}]}}function rZ(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:jt.Kind.INT,value:r.toString()});return{kind:jt.Kind.DIRECTIVE,name:(0,$f.stringToNameNode)(Tr.SEMANTIC_NON_NULL),arguments:[{kind:jt.Kind.ARGUMENT,name:(0,$f.stringToNameNode)(Tr.LEVELS),value:{kind:jt.Kind.LIST,values:n}}]}}function iZ(e){let t=new Map;for(let[n,r]of e)t.set(n,k({},r));return t}function aZ(e,t){for(let[n,r]of e)t.set(n,k({},r))}function sZ(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function oZ({source:e,target:t}){for(let[n,r]of e)t.set(n,r)}function uZ(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Gf=w(ET=>{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.ExtensionType=void 0;var bB;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(bB||(ET.ExtensionType=bB={}))});var Su=w(Cr=>{"use strict";m();T();N();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.getMutableDirectiveDefinitionNode=lZ;Cr.getMutableEnumNode=dZ;Cr.getMutableEnumValueNode=fZ;Cr.getMutableFieldNode=pZ;Cr.getMutableInputObjectNode=mZ;Cr.getMutableInputValueNode=NZ;Cr.getMutableInterfaceNode=TZ;Cr.getMutableObjectNode=EZ;Cr.getMutableObjectExtensionNode=hZ;Cr.getMutableScalarNode=yZ;Cr.getMutableTypeNode=jv;Cr.getMutableUnionNode=IZ;Cr.getTypeNodeNamedTypeName=Kv;Cr.getNamedTypeNode=RB;var Lr=Ie(),Vl=Fr(),AB=$i(),cZ=ql();function lZ(e){return{arguments:[],kind:e.kind,locations:[],name:k({},e.name),repeatable:e.repeatable,description:(0,Vl.formatDescription)(e.description)}}function dZ(e){return{kind:Lr.Kind.ENUM_TYPE_DEFINITION,name:k({},e)}}function fZ(e){return{directives:[],kind:e.kind,name:k({},e.name),description:(0,Vl.formatDescription)(e.description)}}function pZ(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),description:(0,Vl.formatDescription)(e.description)}}function mZ(e){return{kind:Lr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:k({},e)}}function NZ(e,t,n){return{directives:[],kind:e.kind,name:k({},e.name),type:jv(e.type,t,n),defaultValue:e.defaultValue,description:(0,Vl.formatDescription)(e.description)}}function TZ(e){return{kind:Lr.Kind.INTERFACE_TYPE_DEFINITION,name:k({},e)}}function EZ(e){return{kind:Lr.Kind.OBJECT_TYPE_DEFINITION,name:k({},e)}}function hZ(e){let t=e.kind===Lr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Lr.Kind.OBJECT_TYPE_EXTENSION,name:k({},e.name),description:(0,Vl.formatDescription)(t)}}function yZ(e){return{kind:Lr.Kind.SCALAR_TYPE_DEFINITION,name:k({},e)}}function jv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(jl,"__esModule",{value:!0});jl.REQUIRED_FIELDSET_TYPE_NODE=jl.REQUIRED_STRING_TYPE_NODE=void 0;var PB=Ie(),FB=Fr(),wB=zn();jl.REQUIRED_STRING_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.STRING_SCALAR)};jl.REQUIRED_FIELDSET_TYPE_NODE={kind:PB.Kind.NON_NULL_TYPE,type:(0,FB.stringToNamedTypeNode)(wB.FIELD_SET_SCALAR)}});var Qf=w(je=>{"use strict";m();T();N();Object.defineProperty(je,"__esModule",{value:!0});je.TAG_DEFINITION=je.SUBSCRIPTION_FILTER_DEFINITION=je.SPECIFIED_BY_DEFINITION=je.SHAREABLE_DEFINITION=je.SEMANTIC_NON_NULL_DEFINITION=je.REQUIRES_SCOPES_DEFINITION=je.REQUIRES_DEFINITION=je.REQUIRE_FETCH_REASONS_DEFINITION=je.PROVIDES_DEFINITION=je.OVERRIDE_DEFINITION=je.ONE_OF_DEFINITION=je.LINK_DEFINITION=je.KEY_DEFINITION=je.INTERFACE_OBJECT_DEFINITION=je.INACCESSIBLE_DEFINITION=je.EDFS_REDIS_SUBSCRIBE_DEFINITION=je.EDFS_REDIS_PUBLISH_DEFINITION=je.EDFS_NATS_SUBSCRIBE_DEFINITION=je.EDFS_NATS_REQUEST_DEFINITION=je.EDFS_NATS_PUBLISH_DEFINITION=je.EDFS_KAFKA_SUBSCRIBE_DEFINITION=je.EDFS_KAFKA_PUBLISH_DEFINITION=je.EXTERNAL_DEFINITION=je.EXTENDS_DEFINITION=je.DEPRECATED_DEFINITION=je.CONNECT_FIELD_RESOLVER_DEFINITION=je.CONFIGURE_DESCRIPTION_DEFINITION=je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=je.COMPOSE_DIRECTIVE_DEFINITION=je.AUTHENTICATED_DEFINITION=void 0;var Ee=Ie(),me=Fr(),H=zn(),vr=hT();je.AUTHENTICATED_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.AUTHENTICATED),repeatable:!1};je.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.NAME),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,me.stringToNameNode)(H.COMPOSE_DIRECTIVE),repeatable:!0};je.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};je.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROPAGATE),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR)},defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}},{directives:[],kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.DESCRIPTION_OVERRIDE),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.INPUT_OBJECT_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.SCHEMA_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.CONFIGURE_DESCRIPTION),repeatable:!1};je.CONNECT_FIELD_RESOLVER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CONTEXT),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.CONNECT_FIELD_RESOLVER),repeatable:!1};je.DEPRECATED_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.REASON),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR),defaultValue:{kind:Ee.Kind.STRING,value:Ee.DEFAULT_DEPRECATION_REASON}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.DEPRECATED),repeatable:!1};je.EXTENDS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.EXTENDS),repeatable:!1};je.EXTERNAL_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.EXTERNAL),repeatable:!1};je.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.TOPIC),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_KAFKA_PUBLISH),repeatable:!1};je.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.TOPICS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};je.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECT),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_PUBLISH),repeatable:!1};je.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECT),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_REQUEST),repeatable:!1};je.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SUBJECTS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.STREAM_CONFIGURATION),type:(0,me.stringToNamedTypeNode)(H.EDFS_NATS_STREAM_CONFIGURATION)}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_NATS_SUBSCRIBE),repeatable:!1};je.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CHANNEL),type:vr.REQUIRED_STRING_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_REDIS_PUBLISH),repeatable:!1};je.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CHANNELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:vr.REQUIRED_STRING_TYPE_NODE}}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.PROVIDER_ID),type:vr.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Ee.Kind.STRING,value:H.DEFAULT_EDFS_PROVIDER_ID}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.EDFS_REDIS_SUBSCRIBE),repeatable:!1};je.INACCESSIBLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.INACCESSIBLE),repeatable:!1};je.INTERFACE_OBJECT_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.INTERFACE_OBJECT),repeatable:!1};je.KEY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.RESOLVABLE),type:(0,me.stringToNamedTypeNode)(H.BOOLEAN_SCALAR),defaultValue:{kind:Ee.Kind.BOOLEAN,value:!0}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.KEY),repeatable:!0};je.LINK_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.URL_LOWER),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.AS),type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FOR),type:(0,me.stringToNamedTypeNode)(H.LINK_PURPOSE)},{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.IMPORT),type:{kind:Ee.Kind.LIST_TYPE,type:(0,me.stringToNamedTypeNode)(H.LINK_IMPORT)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCHEMA_UPPER]),name:(0,me.stringToNameNode)(H.LINK),repeatable:!0};je.ONE_OF_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.INPUT_OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.ONE_OF),repeatable:!1};je.OVERRIDE_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FROM),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.OVERRIDE),repeatable:!1};je.PROVIDES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.PROVIDES),repeatable:!1};je.REQUIRE_FETCH_REASONS_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.REQUIRE_FETCH_REASONS),repeatable:!0};je.REQUIRES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.FIELDS),type:vr.REQUIRED_FIELDSET_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.REQUIRES),repeatable:!1};je.REQUIRES_SCOPES_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.SCOPES),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.SCOPE_SCALAR)}}}}}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ENUM_UPPER,H.FIELD_DEFINITION_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.REQUIRES_SCOPES),repeatable:!1};je.SEMANTIC_NON_NULL_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.LEVELS),type:{kind:Ee.Kind.NON_NULL_TYPE,type:{kind:Ee.Kind.LIST_TYPE,type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.INT_SCALAR)}}},defaultValue:{kind:Ee.Kind.LIST,values:[{kind:Ee.Kind.INT,value:"0"}]}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:[(0,me.stringToNameNode)(H.FIELD_DEFINITION_UPPER)],name:(0,me.stringToNameNode)(H.SEMANTIC_NON_NULL),repeatable:!1};je.SHAREABLE_DEFINITION={kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER,H.OBJECT_UPPER]),name:(0,me.stringToNameNode)(H.SHAREABLE),repeatable:!0};je.SPECIFIED_BY_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.URL_LOWER),type:vr.REQUIRED_STRING_TYPE_NODE}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.SCALAR_UPPER]),name:(0,me.stringToNameNode)(H.SPECIFIED_BY),repeatable:!1};je.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.CONDITION),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.SUBSCRIPTION_FILTER_CONDITION)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.FIELD_DEFINITION_UPPER]),name:(0,me.stringToNameNode)(H.SUBSCRIPTION_FILTER),repeatable:!1};je.TAG_DEFINITION={arguments:[{kind:Ee.Kind.INPUT_VALUE_DEFINITION,name:(0,me.stringToNameNode)(H.NAME),type:{kind:Ee.Kind.NON_NULL_TYPE,type:(0,me.stringToNamedTypeNode)(H.STRING_SCALAR)}}],kind:Ee.Kind.DIRECTIVE_DEFINITION,locations:(0,me.stringArrayToNameNodeArray)([H.ARGUMENT_DEFINITION_UPPER,H.ENUM_UPPER,H.ENUM_VALUE_UPPER,H.FIELD_DEFINITION_UPPER,H.INPUT_FIELD_DEFINITION_UPPER,H.INPUT_OBJECT_UPPER,H.INTERFACE_UPPER,H.OBJECT_UPPER,H.SCALAR_UPPER,H.UNION_UPPER]),name:(0,me.stringToNameNode)(H.TAG),repeatable:!0}});var Du=w(Gi=>{"use strict";m();T();N();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.MAX_OR_SCOPES=Gi.EDFS_ARGS_REGEXP=Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=Gi.BASE_SCALARS=Gi.DIRECTIVE_DEFINITION_BY_NAME=void 0;var ut=zn(),Ot=Qf();Gi.DIRECTIVE_DEFINITION_BY_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.CONFIGURE_DESCRIPTION,Ot.CONFIGURE_DESCRIPTION_DEFINITION],[ut.CONFIGURE_CHILD_DESCRIPTIONS,Ot.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION],[ut.CONNECT_FIELD_RESOLVER,Ot.CONNECT_FIELD_RESOLVER_DEFINITION],[ut.DEPRECATED,Ot.DEPRECATED_DEFINITION],[ut.EDFS_KAFKA_PUBLISH,Ot.EDFS_KAFKA_PUBLISH_DEFINITION],[ut.EDFS_KAFKA_SUBSCRIBE,Ot.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[ut.EDFS_NATS_PUBLISH,Ot.EDFS_NATS_PUBLISH_DEFINITION],[ut.EDFS_NATS_REQUEST,Ot.EDFS_NATS_REQUEST_DEFINITION],[ut.EDFS_NATS_SUBSCRIBE,Ot.EDFS_NATS_SUBSCRIBE_DEFINITION],[ut.EDFS_REDIS_PUBLISH,Ot.EDFS_REDIS_PUBLISH_DEFINITION],[ut.EDFS_REDIS_SUBSCRIBE,Ot.EDFS_REDIS_SUBSCRIBE_DEFINITION],[ut.EXTENDS,Ot.EXTENDS_DEFINITION],[ut.EXTERNAL,Ot.EXTERNAL_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.KEY,Ot.KEY_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.ONE_OF,Ot.ONE_OF_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.PROVIDES,Ot.PROVIDES_DEFINITION],[ut.REQUIRE_FETCH_REASONS,Ot.REQUIRE_FETCH_REASONS_DEFINITION],[ut.REQUIRES,Ot.REQUIRES_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SEMANTIC_NON_NULL,Ot.SEMANTIC_NON_NULL_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION],[ut.SPECIFIED_BY,Ot.SPECIFIED_BY_DEFINITION],[ut.SUBSCRIPTION_FILTER,Ot.SUBSCRIPTION_FILTER_DEFINITION],[ut.TAG,Ot.TAG_DEFINITION]]);Gi.BASE_SCALARS=new Set(["_Any","_Entities",ut.BOOLEAN_SCALAR,ut.FLOAT_SCALAR,ut.ID_SCALAR,ut.INT_SCALAR,ut.FIELD_SET_SCALAR,ut.SCOPE_SCALAR,ut.STRING_SCALAR]);Gi.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[ut.AUTHENTICATED,Ot.AUTHENTICATED_DEFINITION],[ut.COMPOSE_DIRECTIVE,Ot.COMPOSE_DIRECTIVE_DEFINITION],[ut.INACCESSIBLE,Ot.INACCESSIBLE_DEFINITION],[ut.INTERFACE_OBJECT,Ot.INTERFACE_OBJECT_DEFINITION],[ut.LINK,Ot.LINK_DEFINITION],[ut.OVERRIDE,Ot.OVERRIDE_DEFINITION],[ut.REQUIRES_SCOPES,Ot.REQUIRES_SCOPES_DEFINITION],[ut.SHAREABLE,Ot.SHAREABLE_DEFINITION]]);Gi.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;Gi.MAX_OR_SCOPES=16});var yT=w(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.newParentTagData=SZ;vc.newChildTagData=DZ;vc.validateImplicitFieldSets=bZ;vc.newContractTagOptionsFromArrays=AZ;vc.getDescriptionFromString=RZ;var ti=Ie(),gZ=Su(),_Z=Du(),vZ=Fr(),LB=wr(),OZ=zn();function SZ(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function DZ(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function bZ({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let u=(0,LB.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(u.has(l))continue;let p=[i],E=[],I=[],v=-1,A=!0,U=!0;(0,ti.visit)(d,{Argument:{enter(){return U=!1,ti.BREAK}},Field:{enter(j){let Q=p[v];if(A)return U=!1,ti.BREAK;let ee=j.name.value;if(ee===OZ.TYPENAME)return;let ne=Q.fieldDataByName.get(ee);if(!ne||ne.argumentDataByName.size||E[v].has(ee))return U=!1,ti.BREAK;let{isUnconditionallyProvided:pe}=(0,LB.getOrThrowError)(ne.externalFieldDataBySubgraphName,t,`${ne.originalParentTypeName}.${ee}.externalFieldDataBySubgraphName`),le=e.get(`${ne.renamedParentTypeName}.${ee}`);if(le){if(le.providedBy.length>0)I.push(...le.providedBy);else if(le.requiredBy.length>0)return U=!1,ti.BREAK}else if(!pe)return U=!1,ti.BREAK;E[v].add(ee);let Ae=(0,gZ.getTypeNodeNamedTypeName)(ne.node.type);if(_Z.BASE_SCALARS.has(Ae))return;let Me=a.get(Ae);if(!Me)return U=!1,ti.BREAK;if(Me.kind===ti.Kind.OBJECT_TYPE_DEFINITION){A=!0,p.push(Me);return}if((0,vZ.isKindAbstract)(Me.kind))return U=!1,ti.BREAK}},InlineFragment:{enter(){return U=!1,ti.BREAK}},SelectionSet:{enter(){if(!A||(v+=1,A=!1,v<0||v>=p.length))return U=!1,ti.BREAK;E.push(new Set)},leave(){if(A)return U=!1,ti.BREAK;v-=1,p.pop(),E.pop()}}}),U&&(r.push($(k({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function AZ(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function RZ(e){if(e)return{block:!0,kind:ti.Kind.STRING,value:e}}});var $l=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=wZ;mt.isNodeExternalOrShareable=LZ;mt.isTypeRequired=CZ;mt.areDefaultValuesCompatible=BB;mt.compareAndValidateInputValueDefaultValues=BZ;mt.setMutualExecutableLocations=UZ;mt.isTypeNameRootType=kZ;mt.getRenamedRootTypeName=MZ;mt.childMapToValueArray=qZ;mt.setLongestDescription=VZ;mt.isParentDataRootType=UB;mt.isInterfaceDefinitionData=jZ;mt.setParentDataExtensionType=KZ;mt.upsertDeprecatedDirective=$Z;mt.upsertTagDirectives=GZ;mt.propagateAuthDirectives=QZ;mt.propagateFieldAuthDirectives=YZ;mt.generateDeprecatedDirective=Yv;mt.getClientPersistedDirectiveNodes=Gv;mt.getClientSchemaFieldNodeByFieldData=zZ;mt.getNodeWithPersistedDirectivesByInputValueData=kB;mt.addValidPersistedDirectiveDefinitionNodeByData=XZ;mt.newInvalidFieldNames=ZZ;mt.validateExternalAndShareable=eee;mt.isTypeValidImplementation=IT;mt.isNodeDataInaccessible=MB;mt.isLeafKind=tee;mt.getSubscriptionFilterValue=nee;mt.getParentTypeName=ree;mt.newConditionalFieldData=iee;mt.getDefinitionDataCoords=aee;mt.isParentDataCompositeOutputType=see;mt.newExternalFieldData=oee;mt.getInitialFederatedDescription=uee;mt.areKindsEqual=cee;mt.isFieldData=Jv;mt.isInputObjectDefinitionData=lee;mt.isInputNodeKind=dee;mt.isOutputNodeKind=fee;var rt=Ie(),$v=Gf(),Kl=Fr(),Qv=$i(),Kt=zn(),Oc=wr(),PZ=yT(),FZ=Ie();function wZ(){return{deprecatedReason:"",directivesByName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function LZ(e,t,n){var i;let r={isExternal:n.has(Kt.EXTERNAL),isShareable:t||n.has(Kt.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Kt.EXTERNAL){r.isExternal=!0;continue}o===Kt.SHAREABLE&&(r.isShareable=!0)}return r}function CZ(e){return e.kind===rt.Kind.NON_NULL_TYPE}function BB(e,t){switch(e.kind){case rt.Kind.LIST_TYPE:return t.kind===rt.Kind.LIST||t.kind===rt.Kind.NULL;case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NULL)return!0;switch(e.name.value){case Kt.BOOLEAN_SCALAR:return t.kind===rt.Kind.BOOLEAN;case Kt.FLOAT_SCALAR:return t.kind===rt.Kind.INT||t.kind===rt.Kind.FLOAT;case Kt.INT_SCALAR:return t.kind===rt.Kind.INT;case Kt.STRING_SCALAR:return t.kind===rt.Kind.STRING;default:return!0}case rt.Kind.NON_NULL_TYPE:return t.kind===rt.Kind.NULL?!1:BB(e.type,t)}}function BZ(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,rt.print)(e.defaultValue),i=(0,rt.print)(t.defaultValue);if(r!==i){n.push((0,Qv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Kt.ARGUMENT:Kt.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function UZ(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function kZ(e,t){return Kt.ROOT_TYPE_NAMES.has(e)||t.has(e)}function MZ(e,t){let n=t.get(e);if(!n)return e;switch(n){case rt.OperationTypeNode.MUTATION:return Kt.MUTATION;case rt.OperationTypeNode.SUBSCRIPTION:return Kt.SUBSCRIPTION;default:return Kt.QUERY}}function xZ(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function qZ(e){var n;let t=[];for(let r of e.values()){Jv(r)&&xZ(r);for(let[i,a]of r.directivesByName){if(i===Kt.DEPRECATED){let o=a[0];if(!o)continue;if((n=o.arguments)!=null&&n.length){r.node.directives.push(o);continue}r.node.directives.push($(k({},o),{arguments:[{kind:rt.Kind.ARGUMENT,value:{kind:rt.Kind.STRING,value:FZ.DEFAULT_DEPRECATION_REASON},name:(0,Kl.stringToNameNode)(Kt.REASON)}]}));continue}r.node.directives.push(...a)}t.push(r.node)}return t}function VZ(e,t){if(t.description){if("configureDescriptionDataBySubgraphName"in t){for(let{propagate:n}of t.configureDescriptionDataBySubgraphName.values())if(!n)return}(!e.description||e.description.value.length0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function YZ(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByName.set(Kt.AUTHENTICATED,[(0,Oc.generateSimpleDirective)(Kt.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByName.set(Kt.REQUIRES_SCOPES,[(0,Oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Yv(e){return{kind:rt.Kind.DIRECTIVE,name:(0,Kl.stringToNameNode)(Kt.DEPRECATED),arguments:[{kind:rt.Kind.ARGUMENT,name:(0,Kl.stringToNameNode)(Kt.REASON),value:{kind:rt.Kind.STRING,value:e||Kt.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function JZ(e,t,n,r){let i=[];for(let[a,o]of e){let u=t.get(a);if(u){if(o.length<2){i.push(...o);continue}if(!u.repeatable){r.push((0,Qv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function HZ(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Yv(e.persistedDirectivesData.deprecatedReason)),r.push(...JZ(e.persistedDirectivesData.directivesByName,t,e.name,n)),r}function Gv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Yv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByName){if(r===Kt.SEMANTIC_NON_NULL&&Jv(e)){t.push((0,Oc.generateSemanticNonNullDirective)((n=(0,Oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Kt.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function zZ(e){let t=Gv(e),n=[];for(let r of e.argumentDataByName.values())MB(r)||n.push($(k({},r.node),{directives:Gv(r)}));return $(k({},e.node),{directives:t,arguments:n})}function kB(e,t,n){return e.node.name=(0,Kl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=HZ(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function WZ(e,t,n,r,i){let a=[];for(let[o,u]of t.argumentDataByName){let l=(0,Oc.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames);if(l.length>0){u.requiredSubgraphNames.size>0&&a.push({inputValueName:o,missingSubgraphs:l,requiredSubgraphs:[...u.requiredSubgraphNames]});continue}e.push(kB(u,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,Qv.invalidRequiredInputValueError)(Kt.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function XZ(e,t,n,r){let i=[];WZ(i,t,n,r)&&e.push({arguments:i,kind:rt.Kind.DIRECTIVE_DEFINITION,locations:(0,Kl.setToNameNodeArray)(t.executableLocations),name:(0,Kl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function ZZ(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function eee(e,t){let n=e.isShareableBySubgraphName.size,r=new Array,i=0;for(let[a,o]of e.isShareableBySubgraphName){let u=e.externalFieldDataBySubgraphName.get(a);if(u&&!u.isUnconditionallyProvided){r.push(a);continue}o||(i+=1)}switch(i){case 0:n===r.length&&t.subgraphNamesByExternalFieldName.set(e.name,r);return;case 1:if(n===1)return;n-r.length!==1&&t.byShareable.add(e.name);return;default:t.byShareable.add(e.name)}}var CB;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(CB||(mt.MergeMethod=CB={}));function IT(e,t,n){if(e.kind===rt.Kind.NON_NULL_TYPE)return t.kind!==rt.Kind.NON_NULL_TYPE?!1:IT(e.type,t.type,n);if(t.kind===rt.Kind.NON_NULL_TYPE)return IT(e,t.type,n);switch(e.kind){case rt.Kind.NAMED_TYPE:if(t.kind===rt.Kind.NAMED_TYPE){let r=e.name.value,i=t.name.value;if(r===i)return!0;let a=n.get(r);return a?a.has(i):!1}return!1;default:return t.kind===rt.Kind.LIST_TYPE?IT(e.type,t.type,n):!1}}function MB(e){return e.persistedDirectivesData.directivesByName.has(Kt.INACCESSIBLE)||e.directivesByName.has(Kt.INACCESSIBLE)}function tee(e){return e===rt.Kind.SCALAR_TYPE_DEFINITION||e===rt.Kind.ENUM_TYPE_DEFINITION}function nee(e){switch(e.kind){case rt.Kind.BOOLEAN:return e.value;case rt.Kind.ENUM:case rt.Kind.STRING:return e.value;case rt.Kind.FLOAT:case rt.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case rt.Kind.NULL:return null}}function ree(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function iee(){return{providedBy:[],requiredBy:[]}}function aee(e,t){switch(e.kind){case rt.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case rt.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case rt.Kind.ARGUMENT:case rt.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case rt.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function see(e){return e.kind===rt.Kind.OBJECT_TYPE_DEFINITION||e.kind===rt.Kind.INTERFACE_TYPE_DEFINITION}function oee(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function uee(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,PZ.getDescriptionFromString)(t.description)||e.description}function cee(e,t){return e.kind===t.kind}function Jv(e){return e.kind===rt.Kind.FIELD_DEFINITION}function lee(e){return e.kind===rt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function dee(e){return Kt.INPUT_NODE_KINDS.has(e)}function fee(e){return Kt.OUTPUT_NODE_KINDS.has(e)}});var Wv={};$m(Wv,{__addDisposableResource:()=>aU,__assign:()=>gT,__asyncDelegator:()=>WB,__asyncGenerator:()=>zB,__asyncValues:()=>XB,__await:()=>Gl,__awaiter:()=>$B,__classPrivateFieldGet:()=>nU,__classPrivateFieldIn:()=>iU,__classPrivateFieldSet:()=>rU,__createBinding:()=>vT,__decorate:()=>VB,__disposeResources:()=>sU,__esDecorate:()=>pee,__exportStar:()=>QB,__extends:()=>xB,__generator:()=>GB,__importDefault:()=>tU,__importStar:()=>eU,__makeTemplateObject:()=>ZB,__metadata:()=>KB,__param:()=>jB,__propKey:()=>Nee,__read:()=>zv,__rest:()=>qB,__runInitializers:()=>mee,__setFunctionName:()=>Tee,__spread:()=>YB,__spreadArray:()=>HB,__spreadArrays:()=>JB,__values:()=>_T,default:()=>yee});function xB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function jB(e,t){return function(n,r){t(n,r,e)}}function pee(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function mee(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zv(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function YB(){for(var e=[],t=0;t1||u(I,v)})})}function u(I,v){try{l(r[I](v))}catch(A){E(a[0][3],A)}}function l(I){I.value instanceof Gl?Promise.resolve(I.value.v).then(d,p):E(a[0][2],I)}function d(I){u("next",I)}function p(I){u("throw",I)}function E(I,v){I(v),a.shift(),a.length&&u(a[0][0],a[0][1])}}function WB(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Gl(e[i](o)),done:!1}:a?a(o):o}:a}}function XB(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof _T=="function"?_T(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function ZB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function eU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vT(t,e,n);return Eee(t,e),t}function tU(e){return e&&e.__esModule?e:{default:e}}function nU(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function rU(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function iU(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function aU(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function sU(e){function t(r){e.error=e.hasError?new hee(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return t(a),n()})}catch(a){t(a)}}if(e.hasError)throw e.error}return n()}var Hv,gT,vT,Eee,hee,yee,Xv=Zu(()=>{"use strict";m();T();N();Hv=function(e,t){return Hv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hv(e,t)};gT=function(){return gT=Object.assign||function(t){for(var n,r=1,i=arguments.length;rFU,__assign:()=>OT,__asyncDelegator:()=>vU,__asyncGenerator:()=>_U,__asyncValues:()=>OU,__await:()=>Ql,__awaiter:()=>TU,__classPrivateFieldGet:()=>AU,__classPrivateFieldIn:()=>PU,__classPrivateFieldSet:()=>RU,__createBinding:()=>DT,__decorate:()=>cU,__disposeResources:()=>wU,__esDecorate:()=>dU,__exportStar:()=>hU,__extends:()=>oU,__generator:()=>EU,__importDefault:()=>bU,__importStar:()=>DU,__makeTemplateObject:()=>SU,__metadata:()=>NU,__param:()=>lU,__propKey:()=>pU,__read:()=>tO,__rest:()=>uU,__rewriteRelativeImportExtension:()=>LU,__runInitializers:()=>fU,__setFunctionName:()=>mU,__spread:()=>yU,__spreadArray:()=>gU,__spreadArrays:()=>IU,__values:()=>ST,default:()=>_ee});function oU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function uU(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function lU(e,t){return function(n,r){t(n,r,e)}}function dU(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var u=r.kind,l=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),E,I=!1,v=n.length-1;v>=0;v--){var A={};for(var U in r)A[U]=U==="access"?{}:r[U];for(var U in r.access)A.access[U]=r.access[U];A.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var j=(0,n[v])(u==="accessor"?{get:p.get,set:p.set}:p[l],A);if(u==="accessor"){if(j===void 0)continue;if(j===null||typeof j!="object")throw new TypeError("Object expected");(E=o(j.get))&&(p.get=E),(E=o(j.set))&&(p.set=E),(E=o(j.init))&&i.unshift(E)}else(E=o(j))&&(u==="field"?i.unshift(E):p[l]=E)}d&&Object.defineProperty(d,r.name,p),I=!0}function fU(e,t,n){for(var r=arguments.length>2,i=0;i0&&a[a.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tO(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function yU(){for(var e=[],t=0;t1||l(v,U)})},A&&(i[v]=A(i[v])))}function l(v,A){try{d(r[v](A))}catch(U){I(a[0][3],U)}}function d(v){v.value instanceof Ql?Promise.resolve(v.value.v).then(p,E):I(a[0][2],v)}function p(v){l("next",v)}function E(v){l("throw",v)}function I(v,A){v(A),a.shift(),a.length&&l(a[0][0],a[0][1])}}function vU(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(o){return(n=!n)?{value:Ql(e[i](o)),done:!1}:a?a(o):o}:a}}function OU(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ST=="function"?ST(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(u,l){o=e[a](o),i(u,l,o.done,o.value)})}}function i(a,o,u,l){Promise.resolve(l).then(function(d){a({value:d,done:u})},o)}}function SU(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function DU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=eO(e),r=0;r{"use strict";m();T();N();Zv=function(e,t){return Zv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Zv(e,t)};OT=function(){return OT=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Yl=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.asArray=void 0;Qi.isUrl=kU;Qi.isDocumentString=bee;Qi.isValidPath=Ree;Qi.compareStrings=MU;Qi.nodeToString=nO;Qi.compareNodes=Pee;Qi.isSome=Fee;Qi.assertSome=wee;var vee=Ie(),Oee=/^(https?|wss?|file):\/\//;function kU(e){if(typeof e!="string"||!Oee.test(e))return!1;if(URL.canParse)return URL.canParse(e);try{return!!new URL(e)}catch(t){return!1}}var See=e=>Array.isArray(e)?e:e?[e]:[];Qi.asArray=See;var Dee=/\.[a-z0-9]+$/i;function bee(e){if(typeof e!="string"||Dee.test(e)||kU(e))return!1;try{return(0,vee.parse)(e),!0}catch(t){if(!t.message.includes("EOF")&&e.replace(/(\#[^*]*)/g,"").trim()!==""&&e.includes(" "))throw new Error(`Failed to parse the GraphQL document. ${t.message} +${e}`)}return!1}var Aee=/[‘“!%^<>`\n]/;function Ree(e){return typeof e=="string"&&!Aee.test(e)}function MU(e,t){return String(e)String(t)?1:0}function nO(e){var n,r;let t;return"alias"in e&&(t=(n=e.alias)==null?void 0:n.value),t==null&&"name"in e&&(t=(r=e.name)==null?void 0:r.value),t==null&&(t=e.kind),t}function Pee(e,t,n){let r=nO(e),i=nO(t);return typeof n=="function"?n(r,i):MU(r,i)}function Fee(e){return e!=null}function wee(e,t="Value should be something"){if(e==null)throw new Error(t)}});var Yf=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.inspect=void 0;var VU=3;function Lee(e){return bT(e,[])}AT.inspect=Lee;function bT(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Cee(e,t);default:return String(e)}}function xU(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function Cee(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xU(e)+` +`+qU(e.errors,t):xU(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Bee(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:bT(r,n)}else if(Array.isArray(e))return qU(e,n);return Uee(e,n)}function Bee(e){return typeof e.toJSON=="function"}function Uee(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VU?"["+kee(e)+"]":"{ "+n.map(([i,a])=>i+": "+bT(a,t)).join(", ")+" }"}function qU(e,t){if(e.length===0)return"[]";if(t.length>VU)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.createGraphQLError=iO;RT.relocatedError=qee;var rO=Ie(),Mee=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function xee(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Mee.includes(t))}function iO(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&xee(t.originalError)&&(t.originalError=iO(t.originalError.message,t.originalError)),rO.versionInfo.major>=17?new rO.GraphQLError(e,t):new rO.GraphQLError(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function qee(e,t){return iO(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}});var Jf=w(ni=>{"use strict";m();T();N();Object.defineProperty(ni,"__esModule",{value:!0});ni.isPromise=FT;ni.isActualPromise=KU;ni.handleMaybePromise=bu;ni.fakePromise=Za;ni.createDeferredPromise=Vee;ni.iterateAsync=$U;ni.iterateAsyncVoid=$U;ni.fakeRejectPromise=Sc;ni.mapMaybePromise=jee;ni.mapAsyncIterator=Kee;ni.promiseLikeFinally=GU;ni.unfakePromise=QU;var wT=Symbol.for("@whatwg-node/promise-helpers/FakePromise");function FT(e){return(e==null?void 0:e.then)!=null}function KU(e){let t=e;return t&&t.then&&t.catch&&t.finally}function bu(e,t,n,r){let i=Za().then(e).then(t,n);return r&&(i=i.finally(r)),QU(i)}function Za(e){return e&&KU(e)?e:FT(e)?{then:(t,n)=>Za(e.then(t,n)),catch:t=>Za(e.then(n=>n,t)),finally:t=>Za(t?GU(e,t):e),[Symbol.toStringTag]:"Promise"}:{then(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},catch(){return this},finally(t){if(t)try{return Za(t()).then(()=>e,()=>e)}catch(n){return Sc(n)}return this},[Symbol.toStringTag]:"Promise",__fakePromiseValue:e,[wT]:"resolved"}}function Vee(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;return{promise:new Promise(function(i,a){e=i,t=a}),get resolve(){return e},get reject(){return t}}}function $U(e,t,n){if((e==null?void 0:e.length)===0)return;let r=e[Symbol.iterator](),i=0;function a(){let{done:o,value:u}=r.next();if(o)return;let l=!1;function d(){l=!0}return bu(function(){return t(u,d,i++)},function(E){if(E&&(n==null||n.push(E)),!l)return a()})}return a()}function Sc(e){return{then(t,n){if(n)try{return Za(n(e))}catch(r){return Sc(r)}return this},catch(t){if(t)try{return Za(t(e))}catch(n){return Sc(n)}return this},finally(t){if(t)try{t()}catch(n){return Sc(n)}return this},__fakeRejectError:e,[Symbol.toStringTag]:"Promise",[wT]:"rejected"}}function jee(e,t,n){return bu(()=>e,t,n)}function Kee(e,t,n,r){Symbol.asyncIterator in e&&(e=e[Symbol.asyncIterator]());let i,a,o;if(r){let d;o=p=>(d||(d=bu(r,()=>p,()=>p)),d)}typeof e.return=="function"&&(i=e.return,a=d=>{let p=()=>{throw d};return i.call(e).then(p,p)});function u(d){return d.done?o?o(d):d:bu(()=>d.value,p=>bu(()=>t(p),jU,a))}let l;if(n){let d,p=n;l=E=>(d||(d=bu(()=>E,I=>bu(()=>p(I),jU,a))),d)}return{next(){return e.next().then(u,l)},return(){let d=i?i.call(e).then(u,l):Za({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(u,l):a?a(d):Sc(d)},[Symbol.asyncIterator](){return this}}}function jU(e){return{value:e,done:!1}}function $ee(e){return(e==null?void 0:e[wT])==="resolved"}function Gee(e){return(e==null?void 0:e[wT])==="rejected"}function GU(e,t){return"finally"in e?e.finally(t):e.then(n=>{let r=t();return FT(r)?r.then(()=>n):n},n=>{let r=t();if(FT(r))return r.then(()=>{throw n});throw n})}function QU(e){if($ee(e))return e.__fakePromiseValue;if(Gee(e))throw e.__fakeRejectError;return e}});var LT=w(Au=>{"use strict";m();T();N();Object.defineProperty(Au,"__esModule",{value:!0});Au.isPromise=void 0;Au.isIterableObject=Qee;Au.isObjectLike=Yee;Au.promiseReduce=Jee;Au.hasOwnProperty=Hee;var YU=Jf();Object.defineProperty(Au,"isPromise",{enumerable:!0,get:function(){return YU.isPromise}});function Qee(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Yee(e){return typeof e=="object"&&e!==null}function Jee(e,t,n){let r=n;for(let i of e)r=(0,YU.handleMaybePromise)(()=>r,a=>t(a,i));return r}function Hee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var oO=w(sO=>{"use strict";m();T();N();Object.defineProperty(sO,"__esModule",{value:!0});sO.getArgumentValues=Wee;var aO=Yf(),Dc=Ie(),CT=PT(),zee=LT();function Wee(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Dc.Kind.NULL;if(E.kind===Dc.Kind.VARIABLE){let A=E.name.value;if(n==null||!(0,zee.hasOwnProperty)(n,A)){if(d!==void 0)r[u]=d;else if((0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of required type "${(0,aO.inspect)(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Dc.isNonNullType)(l))throw(0,CT.createGraphQLError)(`Argument "${u}" of non-null type "${(0,aO.inspect)(l)}" must not be null.`,{nodes:[E]});let v=(0,Dc.valueFromAST)(E,l,n);if(v===void 0)throw(0,CT.createGraphQLError)(`Argument "${u}" has invalid value ${(0,Dc.print)(E)}.`,{nodes:[E]});r[u]=v}return r}});var Ru=w(Cs=>{"use strict";m();T();N();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.memoize1=Xee;Cs.memoize2=Zee;Cs.memoize3=ete;Cs.memoize4=tte;Cs.memoize5=nte;Cs.memoize2of4=rte;Cs.memoize2of5=ite;function Xee(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function Zee(e){let t=new WeakMap;return function(r,i){let a=t.get(r);if(!a){a=new WeakMap,t.set(r,a);let u=e(r,i);return a.set(i,u),u}let o=a.get(i);if(o===void 0){let u=e(r,i);return a.set(i,u),u}return o}}function ete(e){let t=new WeakMap;return function(r,i,a){let o=t.get(r);if(!o){o=new WeakMap,t.set(r,o);let d=new WeakMap;o.set(i,d);let p=e(r,i,a);return d.set(a,p),p}let u=o.get(i);if(!u){u=new WeakMap,o.set(i,u);let d=e(r,i,a);return u.set(a,d),d}let l=u.get(a);if(l===void 0){let d=e(r,i,a);return u.set(a,d),d}return l}}function tte(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let E=new WeakMap;u.set(i,E);let I=new WeakMap;E.set(a,I);let v=e(r,i,a,o);return I.set(o,v),v}let l=u.get(i);if(!l){l=new WeakMap,u.set(i,l);let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let d=l.get(a);if(!d){let E=new WeakMap;l.set(a,E);let I=e(r,i,a,o);return E.set(o,I),I}let p=d.get(o);if(p===void 0){let E=e(r,i,a,o);return d.set(o,E),E}return p}}function nte(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let v=new WeakMap;l.set(i,v);let A=new WeakMap;v.set(a,A);let U=new WeakMap;A.set(o,U);let j=e(r,i,a,o,u);return U.set(u,j),j}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let A=new WeakMap;v.set(o,A);let U=e(r,i,a,o,u);return A.set(u,U),U}let p=d.get(a);if(!p){p=new WeakMap,d.set(a,p);let v=new WeakMap;p.set(o,v);let A=e(r,i,a,o,u);return v.set(u,A),A}let E=p.get(o);if(!E){E=new WeakMap,p.set(o,E);let v=e(r,i,a,o,u);return E.set(u,v),v}let I=E.get(u);if(I===void 0){let v=e(r,i,a,o,u);return E.set(u,v),v}return I}}function rte(e){let t=new WeakMap;return function(r,i,a,o){let u=t.get(r);if(!u){u=new WeakMap,t.set(r,u);let d=e(r,i,a,o);return u.set(i,d),d}let l=u.get(i);if(l===void 0){let d=e(r,i,a,o);return u.set(i,d),d}return l}}function ite(e){let t=new WeakMap;return function(r,i,a,o,u){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);let p=e(r,i,a,o,u);return l.set(i,p),p}let d=l.get(i);if(d===void 0){let p=e(r,i,a,o,u);return l.set(i,p),p}return d}}});var cO=w(uO=>{"use strict";m();T();N();Object.defineProperty(uO,"__esModule",{value:!0});uO.getDirectiveExtensions=ote;var JU=Ie(),ate=oO(),ste=Ru();function ote(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=(0,ste.memoize1)(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=(0,ate.getArgumentValues)(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,JU.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,JU.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}});var lO=w(Jl=>{"use strict";m();T();N();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.getDirectivesInExtensions=ute;Jl.getDirectiveInExtensions=cte;Jl.getDirectives=lte;Jl.getDirective=dte;var BT=cO();function ute(e,t=["directives"]){let n=(0,BT.getDirectiveExtensions)(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}function cte(e,t,n=["directives"]){return(0,BT.getDirectiveExtensions)(e,void 0,n)[t]}function lte(e,t,n=["directives"]){let r=(0,BT.getDirectiveExtensions)(t,e,n);return Object.entries(r).map(([i,a])=>a==null?void 0:a.map(o=>({name:i,args:o}))).flat(1/0).filter(Boolean)}function dte(e,t,n,r=["directives"]){return(0,BT.getDirectiveExtensions)(t,e,r)[n]}});var fO=w(dO=>{"use strict";m();T();N();Object.defineProperty(dO,"__esModule",{value:!0});dO.getFieldsWithDirectives=pte;var fte=Ie();function pte(e,t={}){let n={},r=["ObjectTypeDefinition","ObjectTypeExtension"];t.includeInputTypes&&(r=[...r,"InputObjectTypeDefinition","InputObjectTypeExtension"]);let i=e.definitions.filter(a=>r.includes(a.kind));for(let a of i){let o=a.name.value;if(a.fields!=null){for(let u of a.fields)if(u.directives&&u.directives.length>0){let l=u.name.value,d=`${o}.${l}`,p=u.directives.map(E=>({name:E.name.value,args:(E.arguments||[]).reduce((I,v)=>$(k({},I),{[v.name.value]:(0,fte.valueFromASTUntyped)(v.value)}),{})}));n[d]=p}}}return n}});var HU=w(mO=>{"use strict";m();T();N();Object.defineProperty(mO,"__esModule",{value:!0});mO.getArgumentsWithDirectives=Nte;var pO=Ie();function mte(e){return e.kind===pO.Kind.OBJECT_TYPE_DEFINITION||e.kind===pO.Kind.OBJECT_TYPE_EXTENSION}function Nte(e){var r;let t={},n=e.definitions.filter(mte);for(let i of n)if(i.fields!=null)for(let a of i.fields){let o=(r=a.arguments)==null?void 0:r.filter(l=>{var d;return(d=l.directives)==null?void 0:d.length});if(!(o!=null&&o.length))continue;let u=t[`${i.name.value}.${a.name.value}`]={};for(let l of o){let d=l.directives.map(p=>({name:p.name.value,args:(p.arguments||[]).reduce((E,I)=>$(k({},E),{[I.name.value]:(0,pO.valueFromASTUntyped)(I.value)}),{})}));u[l.name.value]=d}}return t}});var TO=w(NO=>{"use strict";m();T();N();Object.defineProperty(NO,"__esModule",{value:!0});NO.getImplementingTypes=Tte;function Tte(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];"getInterfaces"in a&&a.getInterfaces().find(u=>u.name===e)&&r.push(a.name)}return r}});var UT=w(hO=>{"use strict";m();T();N();Object.defineProperty(hO,"__esModule",{value:!0});hO.astFromType=EO;var Ete=Yf(),bc=Ie();function EO(e){if((0,bc.isNonNullType)(e)){let t=EO(e.ofType);if(t.kind===bc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,Ete.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:bc.Kind.NON_NULL_TYPE,type:t}}else if((0,bc.isListType)(e))return{kind:bc.Kind.LIST_TYPE,type:EO(e.ofType)};return{kind:bc.Kind.NAMED_TYPE,name:{kind:bc.Kind.NAME,value:e.name}}}});var Hf=w(yO=>{"use strict";m();T();N();Object.defineProperty(yO,"__esModule",{value:!0});yO.astFromValueUntyped=kT;var es=Ie();function kT(e){if(e===null)return{kind:es.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=kT(n);r!=null&&t.push(r)}return{kind:es.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return kT(e.toJSON());let t=[];for(let n in e){let r=e[n],i=kT(r);i&&t.push({kind:es.Kind.OBJECT_FIELD,name:{kind:es.Kind.NAME,value:n},value:i})}return{kind:es.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:es.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:es.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return hte.test(t)?{kind:es.Kind.INT,value:t}:{kind:es.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:es.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var hte=/^-?(?:0|[1-9][0-9]*)$/});var WU=w(IO=>{"use strict";m();T();N();Object.defineProperty(IO,"__esModule",{value:!0});IO.astFromValue=zf;var yte=Yf(),yi=Ie(),Ite=Hf(),zU=LT();function zf(e,t){if((0,yi.isNonNullType)(t)){let n=zf(e,t.ofType);return(n==null?void 0:n.kind)===yi.Kind.NULL?null:n}if(e===null)return{kind:yi.Kind.NULL};if(e===void 0)return null;if((0,yi.isListType)(t)){let n=t.ofType;if((0,zU.isIterableObject)(e)){let r=[];for(let i of e){let a=zf(i,n);a!=null&&r.push(a)}return{kind:yi.Kind.LIST,values:r}}return zf(e,n)}if((0,yi.isInputObjectType)(t)){if(!(0,zU.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=zf(e[r.name],r.type);i&&n.push({kind:yi.Kind.OBJECT_FIELD,name:{kind:yi.Kind.NAME,value:r.name},value:i})}return{kind:yi.Kind.OBJECT,fields:n}}if((0,yi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,yi.isEnumType)(t)?{kind:yi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&>e.test(n)?{kind:yi.Kind.INT,value:n}:(0,Ite.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,yte.inspect)(t))}var gte=/^-?(?:0|[1-9][0-9]*)$/});var XU=w(gO=>{"use strict";m();T();N();Object.defineProperty(gO,"__esModule",{value:!0});gO.getDescriptionNode=vte;var _te=Ie();function vte(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:_te.Kind.STRING,value:e.description,block:!0}}});var Wf=w(Yi=>{"use strict";m();T();N();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.getRootTypeMap=Yi.getRootTypes=Yi.getRootTypeNames=void 0;Yi.getDefinedRootType=Ste;var Ote=PT(),_O=Ru();function Ste(e,t,n){let i=(0,Yi.getRootTypeMap)(e).get(t);if(i==null)throw(0,Ote.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}Yi.getRootTypeNames=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});Yi.getRootTypes=(0,_O.memoize1)(function(t){let n=(0,Yi.getRootTypeMap)(t);return new Set(n.values())});Yi.getRootTypeMap=(0,_O.memoize1)(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n})});var bO=w(Xn=>{"use strict";m();T();N();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.getDocumentNodeFromSchema=ek;Xn.printSchemaWithDirectives=Rte;Xn.astFromSchema=tk;Xn.astFromDirective=nk;Xn.getDirectiveNodes=ya;Xn.astFromArg=OO;Xn.astFromObjectType=rk;Xn.astFromInterfaceType=ik;Xn.astFromUnionType=ak;Xn.astFromInputObjectType=sk;Xn.astFromEnumType=ok;Xn.astFromScalarType=uk;Xn.astFromField=SO;Xn.astFromInputField=ck;Xn.astFromEnumValue=lk;Xn.makeDeprecatedDirective=dk;Xn.makeDirectiveNode=Hl;Xn.makeDirectiveNodes=DO;var Nt=Ie(),Ac=UT(),vO=WU(),Dte=Hf(),Ji=XU(),ZU=lO(),bte=Yl(),Ate=Wf();function ek(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=tk(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Nt.isSpecifiedDirective)(u)||a.push(nk(u,e,n));for(let u in r){let l=r[u],d=(0,Nt.isSpecifiedScalarType)(l),p=(0,Nt.isIntrospectionType)(l);if(!(d||p))if((0,Nt.isObjectType)(l))a.push(rk(l,e,n));else if((0,Nt.isInterfaceType)(l))a.push(ik(l,e,n));else if((0,Nt.isUnionType)(l))a.push(ak(l,e,n));else if((0,Nt.isInputObjectType)(l))a.push(sk(l,e,n));else if((0,Nt.isEnumType)(l))a.push(ok(l,e,n));else if((0,Nt.isScalarType)(l))a.push(uk(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Nt.Kind.DOCUMENT,definitions:a}}function Rte(e,t={}){let n=ek(e,t);return(0,Nt.print)(n)}function tk(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=(0,Ate.getRootTypeMap)(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=(0,Ac.astFromType)(E);p!=null?p.type=I:n.set(d,{kind:Nt.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(bte.isSome),o=ya(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Nt.Kind.SCHEMA_DEFINITION:Nt.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Ji.getDescriptionNode)(e);return l&&(u.description=l),u}function nk(e,t,n){var r,i;return{kind:Nt.Kind.DIRECTIVE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>OO(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Nt.Kind.NAME,value:a})))||[]}}function ya(e,t,n){let r=[],i=(0,ZU.getDirectivesInExtensions)(e,n),a;i!=null&&(a=DO(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Nt.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=dk(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=Hl("specifiedBy",p)}return e.isOneOf&&l==null&&(l=Hl("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function OO(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:ya(e,t,n)}}function rk(e,t,n){return{kind:Nt.Kind.OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>SO(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,Ac.astFromType)(r)),directives:ya(e,t,n)}}function ik(e,t,n){let r={kind:Nt.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>SO(i,t,n)),directives:ya(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,Ac.astFromType)(i))),r}function ak(e,t,n){return{kind:Nt.Kind.UNION_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n),types:e.getTypes().map(r=>(0,Ac.astFromType)(r))}}function sk(e,t,n){return{kind:Nt.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>ck(r,t,n)),directives:ya(e,t,n)}}function ok(e,t,n){return{kind:Nt.Kind.ENUM_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>lk(r,t,n)),directives:ya(e,t,n)}}function uk(e,t,n){let r=(0,ZU.getDirectivesInExtensions)(e,n),i=DO(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(Hl("specifiedBy",o))}return{kind:Nt.Kind.SCALAR_TYPE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:i}}function SO(e,t,n){return{kind:Nt.Kind.FIELD_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},arguments:e.args.map(r=>OO(r,t,n)),type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n)}}function ck(e,t,n){var r;return{kind:Nt.Kind.INPUT_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},type:(0,Ac.astFromType)(e.type),directives:ya(e,t,n),defaultValue:(r=(0,vO.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}function lk(e,t,n){return{kind:Nt.Kind.ENUM_VALUE_DEFINITION,description:(0,Ji.getDescriptionNode)(e),name:{kind:Nt.Kind.NAME,value:e.name},directives:ya(e,t,n)}}function dk(e){return Hl("deprecated",{reason:e},Nt.GraphQLDeprecatedDirective)}function Hl(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=(0,vO.astFromValue)(a,u.type))}o==null&&(o=(0,Dte.astFromValueUntyped)(a)),o!=null&&r.push({kind:Nt.Kind.ARGUMENT,name:{kind:Nt.Kind.NAME,value:i},value:o})}return{kind:Nt.Kind.DIRECTIVE,name:{kind:Nt.Kind.NAME,value:e},arguments:r}}function DO(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(Hl(r,i,a))}return n}});var pk=w(MT=>{"use strict";m();T();N();Object.defineProperty(MT,"__esModule",{value:!0});MT.validateGraphQlDocuments=Pte;MT.createDefaultRules=fk;var Xf=Ie();function Pte(e,t,n=fk()){var u;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Xf.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Xf.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Xf.validate)(e,a,n);for(let l of o)if(l.stack=l.message,l.locations)for(let d of l.locations)l.stack+=` + at ${(u=l.source)==null?void 0:u.name}:${d.line}:${d.column}`;return o}function fk(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Xf.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Xf.specifiedRules.filter(t=>!e.includes(t.name))}});var mk=w(AO=>{"use strict";m();T();N();Object.defineProperty(AO,"__esModule",{value:!0});AO.parseGraphQLJSON=Cte;var Fte=Ie();function wte(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Lte(e){return JSON.parse(wte(e))}function Cte(e,t,n){let r=Lte(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Fte.buildClientSchema)(r,n);return{location:e,schema:i}}else if(typeof r=="string")return{location:e,rawSDL:r};throw new Error("Not valid JSON content")}});var PO=w(Hi=>{"use strict";m();T();N();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.resetComments=Ute;Hi.collectComment=kte;Hi.pushComment=Zf;Hi.printComment=yk;Hi.printWithComments=Vte;Hi.getDescription=Kte;Hi.getComment=RO;Hi.getLeadingCommentBlock=Ik;Hi.dedentBlockStringValue=gk;Hi.getBlockStringIndentation=_k;var hk=Ie(),Bte=80,zl={};function Ute(){zl={}}function kte(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Zf(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Zf(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Zf(r,t,r.name.value),jte(r)&&r.arguments)for(let i of r.arguments)Zf(i,t,r.name.value,i.name.value)}break}}function Zf(e,t,n,r){let i=RO(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");zl[o]||(zl[o]=[]),zl[o].push(i)}function yk(e){return` # `+e.replace(/\n/g,` # `)}function ke(e,t){return e?e.filter(n=>n).join(t||""):""}function Nk(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!=null?t:!1}function kte(e){return(t,n,r,i,a)=>{var p;let o=[],u=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=u==null?void 0:u.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&zl[l]&&d.push(...zl[l]),ke([...d.map(yk),t.description,e(t,n,r,i,a)],` +`)))!=null?t:!1}function Mte(e){return(t,n,r,i,a)=>{var p;let o=[],u=i.reduce((E,I)=>(["fields","arguments","values"].includes(I)&&E.name&&o.push(E.name.value),E[I]),a[0]),l=[...o,(p=u==null?void 0:u.name)==null?void 0:p.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&zl[l]&&d.push(...zl[l]),ke([...d.map(yk),t.description,e(t,n,r,i,a)],` `)}}function ep(e){return e&&` ${e.replace(/\n/g,` - `)}`}function ya(e){return e&&e.length!==0?`{ + `)}`}function Ia(e){return e&&e.length!==0?`{ ${ep(ke(e,` `))} -}`:""}function Rn(e,t,n){return t?e+t+(n||""):""}function Mte(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` +}`:""}function Pn(e,t,n){return t?e+t+(n||""):""}function xte(e,t=!1){let n=e.replace(/\\/g,"\\\\").replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` `)===-1?`"""${n.replace(/"$/,`" `)}"""`:`""" ${t?n:ep(n)} """`}var Tk={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ke(e.definitions,` -`)},OperationDefinition:{leave:e=>{let t=Rn("(",ke(e.variableDefinitions,", "),")");return ke([e.operation,ke([e.name,t]),ke(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Rn(" = ",n)+Rn(" ",ke(r," "))},SelectionSet:{leave:({selections:e})=>ya(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Rn("",e,": ")+t,o=a+Rn("(",ke(n,", "),")");return o.length>Cte&&(o=a+Rn(`( +`)},OperationDefinition:{leave:e=>{let t=Pn("(",ke(e.variableDefinitions,", "),")");return ke([e.operation,ke([e.name,t]),ke(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Pn(" = ",n)+Pn(" ",ke(r," "))},SelectionSet:{leave:({selections:e})=>Ia(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Pn("",e,": ")+t,o=a+Pn("(",ke(n,", "),")");return o.length>Bte&&(o=a+Pn(`( `,ep(ke(n,` `)),` -)`)),ke([o,ke(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Rn(" ",ke(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ke(["...",Rn("on ",e),ke(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Rn("(",ke(n,", "),")")} on ${t} ${Rn("",ke(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Mte(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ke(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ke(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Rn("(",ke(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>ke(["schema",ke(e," "),ya(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>ke(["scalar",e,ke(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["type",e,Rn("implements ",ke(t," & ")),ke(n," "),ya(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(Nk(t)?Rn(`( +)`)),ke([o,ke(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Pn(" ",ke(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>ke(["...",Pn("on ",e),ke(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Pn("(",ke(n,", "),")")} on ${t} ${Pn("",ke(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?xte(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ke(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ke(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Pn("(",ke(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>ke(["schema",ke(e," "),Ia(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>ke(["scalar",e,ke(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["type",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(Nk(t)?Pn(`( `,ep(ke(t,` `)),` -)`):Rn("(",ke(t,", "),")"))+": "+n+Rn(" ",ke(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>ke([e+": "+t,Rn("= ",n),ke(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["interface",e,Rn("implements ",ke(t," & ")),ke(n," "),ya(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>ke(["union",e,ke(t," "),Rn("= ",ke(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>ke(["enum",e,ke(t," "),ya(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>ke([e,ke(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>ke(["input",e,ke(t," "),ya(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(Nk(t)?Rn(`( +)`):Pn("(",ke(t,", "),")"))+": "+n+Pn(" ",ke(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>ke([e+": "+t,Pn("= ",n),ke(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["interface",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>ke(["union",e,ke(t," "),Pn("= ",ke(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>ke(["enum",e,ke(t," "),Ia(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>ke([e,ke(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>ke(["input",e,ke(t," "),Ia(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(Nk(t)?Pn(`( `,ep(ke(t,` `)),` -)`):Rn("(",ke(t,", "),")"))+(n?" repeatable":"")+" on "+ke(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ke(["extend schema",ke(e," "),ya(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ke(["extend scalar",e,ke(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend type",e,Rn("implements ",ke(t," & ")),ke(n," "),ya(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend interface",e,Rn("implements ",ke(t," & ")),ke(n," "),ya(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ke(["extend union",e,ke(t," "),Rn("= ",ke(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ke(["extend enum",e,ke(t," "),ya(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ke(["extend input",e,ke(t," "),ya(n)]," ")}},xte=Object.keys(Tk).reduce((e,t)=>$(k({},e),{[t]:{leave:kte(Tk[t].leave)}}),{});function qte(e){return(0,hk.visit)(e,xte)}function Vte(e){return e.kind==="FieldDefinition"}function jte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return RO(e)}function RO(e){let t=Ik(e);if(t!==void 0)return gk(` +)`):Pn("(",ke(t,", "),")"))+(n?" repeatable":"")+" on "+ke(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ke(["extend schema",ke(e," "),Ia(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ke(["extend scalar",e,ke(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend type",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>ke(["extend interface",e,Pn("implements ",ke(t," & ")),ke(n," "),Ia(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>ke(["extend union",e,ke(t," "),Pn("= ",ke(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>ke(["extend enum",e,ke(t," "),Ia(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>ke(["extend input",e,ke(t," "),Ia(n)]," ")}},qte=Object.keys(Tk).reduce((e,t)=>$(k({},e),{[t]:{leave:Mte(Tk[t].leave)}}),{});function Vte(e){return(0,hk.visit)(e,qte)}function jte(e){return e.kind==="FieldDefinition"}function Kte(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return RO(e)}function RO(e){let t=Ik(e);if(t!==void 0)return gk(` ${t}`)}function Ik(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===hk.TokenKind.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){let i=String(r.value);n.push(i),r=r.prev}return n.length>0?n.reverse().join(` `):void 0}function gk(e){let t=e.split(/\r\n|[\n\r]/g),n=_k(t);if(n!==0)for(let r=1;r0&&Ek(t[0]);)t.shift();for(;t.length>0&&Ek(t[t.length-1]);)t.pop();return t.join(` -`)}function _k(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(tp,"__esModule",{value:!0});tp.parseGraphQLSDL=Kte;tp.transformCommentsToDescriptions=Sk;tp.isDescribable=Dk;var Hi=Ie(),Ok=PO();function Kte(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Sk(t,n),n.noLocation&&(r=(0,Hi.parse)((0,Hi.print)(r),n))):r=(0,Hi.parse)(new Hi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Hi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function Sk(e,t={}){let n=(0,Hi.parse)(e,$(k({},t),{noLocation:!1}));return(0,Hi.visit)(n,{leave:i=>{if(Dk(i)){let a=(0,Ok.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,Ok.dedentBlockStringValue)(` +`)}function _k(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(tp,"__esModule",{value:!0});tp.parseGraphQLSDL=$te;tp.transformCommentsToDescriptions=Sk;tp.isDescribable=Dk;var zi=Ie(),Ok=PO();function $te(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Sk(t,n),n.noLocation&&(r=(0,zi.parse)((0,zi.print)(r),n))):r=(0,zi.parse)(new zi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:zi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}function Sk(e,t={}){let n=(0,zi.parse)(e,$(k({},t),{noLocation:!1}));return(0,zi.visit)(n,{leave:i=>{if(Dk(i)){let a=(0,Ok.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,Ok.dedentBlockStringValue)(` `+a),u=o.includes(` `);return i.description?$(k({},i),{description:$(k({},i.description),{value:i.description.value+` -`+o,block:!0})}):$(k({},i),{description:{kind:Hi.Kind.STRING,value:o,block:u}})}}}})}function Dk(e){return(0,Hi.isTypeSystemDefinitionNode)(e)||e.kind===Hi.Kind.FIELD_DEFINITION||e.kind===Hi.Kind.INPUT_VALUE_DEFINITION||e.kind===Hi.Kind.ENUM_VALUE_DEFINITION}});var Bk=w(CO=>{"use strict";m();T();N();Object.defineProperty(CO,"__esModule",{value:!0});CO.buildOperationNodeForField=Gte;var ct=Ie(),$te=Hf(),Fk=Wf(),LO=[],xT=new Map;function wk(e){LO.push(e)}function Ak(){LO=[]}function Rk(){xT=new Map}function Gte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){Ak(),Rk();let d=(0,Fk.getRootTypeNames)(e),p=Qte({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...LO],Ak(),Rk(),p}function Qte({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,Fk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!u||u.includes(A))&&wk(Lk(v,A))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[Ck({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function wO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>u)){if((0,ct.isUnionType)(t)){let A=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,ct.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(j).filter(Q=>!FO([...a,(0,ct.getNamedType)(j[Q].type)],{depth:l})).map(Q=>{let re=typeof I=="object"?I[Q]:!0;return re?Ck({type:t,field:j[Q],models:n,path:[...i,Q],ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:re,rootTypeNames:v}):null}).filter(Q=>{var re,ee;return Q==null?!1:"selectionSet"in Q?!!((ee=(re=Q.selectionSet)==null?void 0:re.selections)!=null&&ee.length):!0})}}}}function Lk(e,t){function n(i){return(0,ct.isListType)(i)?{kind:ct.Kind.LIST_TYPE,type:n(i.ofType)}:(0,ct.isNonNullType)(i)?{kind:ct.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:i.name}}}let r;try{let i=(0,ct.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,$te.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function Pk(e,t){return[...t,e].join("_")}function Ck({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,ct.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(me=>{let ue=Pk(me.name,i);return E&&!E.includes(ue)?((0,ct.isNonNullType)(me.type)&&(j=!0),null):(r||wk(Lk(me,ue)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:me.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:Pk(me.name,i)}}})}).filter(Boolean)),j)return null;let Q=[...i,t.name],re=Q.join("."),ee=t.name;return xT.has(re)&&xT.get(re)!==t.type.toString()&&(ee+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),xT.set(re,t.type.toString()),!(0,ct.isScalarType)(A)&&!(0,ct.isEnumType)(A)?$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{selectionSet:wO({parent:e,type:A,models:n,firstCall:r,path:Q,ancestors:[...a,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ee!==t.name&&{alias:{kind:ct.Kind.NAME,value:ee}}),{arguments:U})}function FO(e,t={depth:1}){let n=e[e.length-1];return(0,ct.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var kk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.DirectiveLocation=void 0;var Uk;(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"})(Uk||(qT.DirectiveLocation=Uk={}))});var Rc=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.MapperKind=void 0;var Mk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(Mk||(VT.MapperKind=Mk={}))});var UO=w(BO=>{"use strict";m();T();N();Object.defineProperty(BO,"__esModule",{value:!0});BO.getObjectTypeFromTypeMap=Jte;var Yte=Ie();function Jte(e,t){if(t){let n=e[t.name];if((0,Yte.isObjectType)(n))return n}}});var xO=w(Wl=>{"use strict";m();T();N();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.createNamedStub=kO;Wl.createStub=MO;Wl.isNamedStub=Hte;Wl.getBuiltInForStub=zte;var Er=Ie();function kO(e,t){let n;return t==="object"?n=Er.GraphQLObjectType:t==="interface"?n=Er.GraphQLInterfaceType:n=Er.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Er.GraphQLString}}})}function MO(e,t){switch(e.kind){case Er.Kind.LIST_TYPE:return new Er.GraphQLList(MO(e.type,t));case Er.Kind.NON_NULL_TYPE:return new Er.GraphQLNonNull(MO(e.type,t));default:return t==="output"?kO(e.name.value,"object"):kO(e.name.value,"input")}}function Hte(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function zte(e){switch(e.name){case Er.GraphQLInt.name:return Er.GraphQLInt;case Er.GraphQLFloat.name:return Er.GraphQLFloat;case Er.GraphQLString.name:return Er.GraphQLString;case Er.GraphQLBoolean.name:return Er.GraphQLBoolean;case Er.GraphQLID.name:return Er.GraphQLID;default:return e}}});var jT=w(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.rewireTypes=Wte;var Zn=Ie(),xk=xO();function Wte(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=u(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function u(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=$(k({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,xk.isNamedStub)(I)?(0,xk.getBuiltInForStub)(I):u(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var VO=w(Zl=>{"use strict";m();T();N();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.transformInputValue=Xl;Zl.serializeInputValue=Zte;Zl.parseInputValue=ene;Zl.parseInputValueLiteral=tne;var KT=Ie(),Xte=Yl();function Xl(e,t,n=null,r=null){if(t==null)return t;let i=(0,KT.getNullableType)(e);if((0,KT.isLeafType)(i))return n!=null?n(i,t):t;if((0,KT.isListType)(i))return(0,Xte.asArray)(t).map(a=>Xl(i.ofType,a,n,r));if((0,KT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let u in t){let l=a[u];l!=null&&(o[u]=Xl(l.type,t[u],n,r))}return r!=null?r(i,o):o}}function Zte(e,t){return Xl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function ene(e,t){return Xl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function tne(e,t){return Xl(e,t,(n,r)=>n.parseLiteral(r,{}))}});var td=w(GT=>{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.mapSchema=rne;GT.correctASTNodes=np;var st=Ie(),ed=UO(),Rt=Rc(),nne=jT(),qk=VO();function rne(e,t={}){let n=Kk(jk(jO(Vk(ane(jO(Vk(e.getTypeMap(),e,qk.serializeInputValue),e,t,u=>(0,st.isLeafType)(u)),e,t),e,qk.parseInputValue),e,t,u=>!(0,st.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=sne(r,e,t),{typeMap:a,directives:o}=(0,nne.rewireTypes)(n,i);return new st.GraphQLSchema($(k({},e.toConfig()),{query:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var ine=["String","ID","Int","Float","Boolean"];function jO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!ine.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let u=une(t,n,a);if(u==null){i[a]=o;continue}let l=u(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function ane(e,t,n){let r=pne(n);return r?jO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,u={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)u[l]=d;else if(Array.isArray(p)){let[E,I]=p;u[E]=I===void 0?d:I}else p!==null&&(u[l]=p)}return np(new st.GraphQLEnumType($(k({},a),{values:u})))}},i=>(0,st.isEnumType)(i)):e}function Vk(e,t,n){let r=Kk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=$T(e,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}});return jk(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=$T(r,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}})}function $T(e,t){if((0,st.isListType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function jk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=lne(t,n,i);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=$(k({},A.astNode),{name:$(k({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=np(new st.GraphQLObjectType($(k({},u),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=np(new st.GraphQLInterfaceType($(k({},u),{fields:d}))):r[i]=np(new st.GraphQLInputObjectType($(k({},u),{fields:d})))}return r}function Kk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=dne(n);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],Q=o(j,p,i,t);if(Q===void 0)A[U]=j;else if(Array.isArray(Q)){let[re,ee]=Q;A[re]=ee}else Q!==null&&(A[U]=Q)}d[p]=$(k({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType($(k({},u),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType($(k({},u),{fields:d})):r[i]=new st.GraphQLInputObjectType($(k({},u),{fields:d}))}return r}function sne(e,t,n){let r=fne(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function one(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function une(e,t,n){let r=one(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function cne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function lne(e,t,n){let r=cne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function dne(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function fne(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function pne(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function np(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var $k=w(GO=>{"use strict";m();T();N();Object.defineProperty(GO,"__esModule",{value:!0});GO.filterSchema=Nne;var QT=Ie(),Ia=Rc(),mne=td();function Nne({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,mne.mapSchema)(e,{[Ia.MapperKind.QUERY]:E=>KO(E,"Query",r,u),[Ia.MapperKind.MUTATION]:E=>KO(E,"Mutation",r,u),[Ia.MapperKind.SUBSCRIPTION]:E=>KO(E,"Subscription",r,u),[Ia.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLObjectType,E,i||n,u):null,[Ia.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInterfaceType,E,a||n,u):null,[Ia.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInputObjectType,E,o||n):null,[Ia.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[Ia.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[Ia.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[Ia.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[Ia.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function KO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let u in o.args)r(e.name,a,u,o.args[u])||delete o.args[u]}return new QT.GraphQLObjectType(i)}return e}function $O(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let u in o.args)r(t.name,a,u,o.args[u])||delete o.args[u]}return new e(i)}}});var Qk=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.healSchema=Tne;YT.healTypes=Gk;var es=Ie();function Tne(e){return Gk(e.getTypeMap(),e.getDirectives()),e}function Gk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,es.isObjectType)(d)){i(d),a(d);return}else if((0,es.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,es.isUnionType)(d)){u(d);return}else if((0,es.isInputObjectType)(d)){o(d);return}else if((0,es.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,es.isListType)(d)){let p=l(d.ofType);return p!=null?new es.GraphQLList(p):null}else if((0,es.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new es.GraphQLNonNull(p):null}else if((0,es.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var Yk=w(QO=>{"use strict";m();T();N();Object.defineProperty(QO,"__esModule",{value:!0});QO.getResolversFromSchema=Ene;var Pc=Ie();function Ene(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Pc.isScalarType)(u)){if(!(0,Pc.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Pc.GraphQLScalarType(l)}}else if((0,Pc.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Pc.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isObjectType)(u)){n[o]={},u.isTypeOf!=null&&(n[o].__isTypeOf=u.isTypeOf);let l=u.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Hk=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.forEachField=hne;var Jk=Ie();function hne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,Jk.getNamedType)(i).name.startsWith("__")&&(0,Jk.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];t(u,r,o)}}}}});var zk=w(HO=>{"use strict";m();T();N();Object.defineProperty(HO,"__esModule",{value:!0});HO.forEachDefaultValue=yne;var JO=Ie();function yne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,JO.getNamedType)(i).name.startsWith("__")){if((0,JO.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,JO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}});var ZO=w(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.addTypes=gne;var zO=Ie(),WO=UO(),Ine=jT();function gne(e,t){let n=e.toConfig(),r={};for(let u of n.types)r[u.name]=u;let i={};for(let u of n.directives)i[u.name]=u;for(let u of t)(0,zO.isNamedType)(u)?r[u.name]=u:(0,zO.isDirective)(u)&&(i[u.name]=u);let{typeMap:a,directives:o}=(0,Ine.rewireTypes)(r,Object.values(i));return new zO.GraphQLSchema($(k({},n),{query:(0,WO.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,WO.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,WO.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Xk=w(eS=>{"use strict";m();T();N();Object.defineProperty(eS,"__esModule",{value:!0});eS.pruneSchema=Dne;var er=Ie(),_ne=TO(),vne=Rc(),One=td(),Sne=Wf();function Dne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=bne(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=Wk(p,l,d)}u=[],l=(0,One.mapSchema)(l,{[vne.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}function bne(e){let t=[];for(let n of(0,Sne.getRootTypes)(e))t.push(n.name);return Wk(t,e)}function Wk(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,_ne.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>JT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...JT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...JT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...JT(t,a)),n.add(i)}}return n}function JT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}return[...n]}});var nS=w(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.mergeDeep=HT;var Ane=Yl();function HT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>HT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let u,l;t&&(l=e.find(d=>Zk(d)),l&&(u==null&&(u={}),Object.setPrototypeOf(u,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if(Zk(d)){if(l){let p=Object.getPrototypeOf(u),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,Ane.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)u==null&&(u={}),p in u?u[p]=HT([u[p],d[p]],t,n,r):u[p]=d[p]}else Array.isArray(d)&&Array.isArray(u)?u=HT([u,d],t,n,r):u=d;return u}function Zk(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var eM=w(rS=>{"use strict";m();T();N();Object.defineProperty(rS,"__esModule",{value:!0});rS.parseSelectionSet=Pne;var Rne=Ie();function Pne(e,t){return(0,Rne.parse)(e,t).definitions[0].selectionSet}});var tM=w(iS=>{"use strict";m();T();N();Object.defineProperty(iS,"__esModule",{value:!0});iS.getResponseKeyFromInfo=Fne;function Fne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var nM=w(nd=>{"use strict";m();T();N();Object.defineProperty(nd,"__esModule",{value:!0});nd.appendObjectFields=Lne;nd.removeObjectFields=Cne;nd.selectObjectFields=Bne;nd.modifyObjectFields=Une;var zT=Ie(),wne=ZO(),WT=Rc(),Fc=td();function Lne(e,t,n){return e.getType(t)==null?(0,wne.addTypes)(e,[new zT.GraphQLObjectType({name:t,fields:n})]):(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let u in a)o[u]=a[u];for(let u in n)o[u]=n[u];return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},i),{fields:o})))}}})}function Cne(e,t,n){let r={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),u=o.fields,l={};for(let d in u){let p=u[d];n(d,p)?r[d]=p:l[d]=p}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},o),{fields:l})))}}}),r]}function Bne(e,t,n){let r={};return(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let u in o){let l=o[u];n(u,l)&&(r[u]=l)}}}}),r}function Une(e,t,n,r){let i={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},u),{fields:d})))}}}),i]}});var rM=w(aS=>{"use strict";m();T();N();Object.defineProperty(aS,"__esModule",{value:!0});aS.renameType=kne;var zi=Ie();function kne(e,t){if((0,zi.isObjectType)(e))return new zi.GraphQLObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,zi.isInterfaceType)(e))return new zi.GraphQLInterfaceType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,zi.isUnionType)(e))return new zi.GraphQLUnionType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,zi.isInputObjectType)(e))return new zi.GraphQLInputObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,zi.isEnumType)(e))return new zi.GraphQLEnumType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,zi.isScalarType)(e))return new zi.GraphQLScalarType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var iM=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.updateArgument=xne;XT.createVariableNameGenerator=qne;var wc=Ie(),Mne=UT();function xne(e,t,n,r,i,a,o){if(e[r]={kind:wc.Kind.ARGUMENT,name:{kind:wc.Kind.NAME,value:r},value:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}}},t[i]={kind:wc.Kind.VARIABLE_DEFINITION,variable:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}},type:(0,Mne.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function qne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var aM=w(oS=>{"use strict";m();T();N();Object.defineProperty(oS,"__esModule",{value:!0});oS.implementsAbstractType=Vne;var sS=Ie();function Vne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,sS.isCompositeType)(t)&&(0,sS.isCompositeType)(n)?(0,sS.doTypesOverlap)(e,t,n):!1}});var oM=w(uS=>{"use strict";m();T();N();Object.defineProperty(uS,"__esModule",{value:!0});uS.observableToAsyncIterable=jne;var sM=Jf();function jne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},u=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?u():this.return()},return(){return d(),(0,sM.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,sM.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var uM=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.AccumulatorMap=void 0;var cS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};ZT.AccumulatorMap=cS});var lS=w(rd=>{"use strict";m();T();N();Object.defineProperty(rd,"__esModule",{value:!0});rd.GraphQLStreamDirective=rd.GraphQLDeferDirective=void 0;var Wi=Ie();rd.GraphQLDeferDirective=new Wi.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Wi.DirectiveLocation.FRAGMENT_SPREAD,Wi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Wi.GraphQLNonNull(Wi.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Wi.GraphQLString,description:"Unique name"}}});rd.GraphQLStreamDirective=new Wi.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Wi.DirectiveLocation.FIELD],args:{if:{type:new Wi.GraphQLNonNull(Wi.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Wi.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Wi.GraphQLInt,description:"Number of items to return immediately"}}})});var pS=w(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.collectSubFields=void 0;Bs.collectFields=Gne;Bs.shouldIncludeNode=eE;Bs.doesFragmentConditionMatch=dS;Bs.getFieldEntryKey=cM;Bs.getDeferValues=fS;var ts=Ie(),tE=uM(),Kne=lS(),$ne=Ru();function id(e,t,n,r,i,a,o,u){for(let l of i.selections)switch(l.kind){case ts.Kind.FIELD:{if(!eE(n,l))continue;a.add(cM(l),l);break}case ts.Kind.INLINE_FRAGMENT:{if(!eE(n,l)||!dS(e,l,r))continue;let d=fS(n,l);if(d){let p=new tE.AccumulatorMap;id(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else id(e,t,n,r,l.selectionSet,a,o,u);break}case ts.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!eE(n,l))continue;let p=fS(n,l);if(u.has(d)&&!p)continue;let E=t[d];if(!E||!dS(e,E,r))continue;if(p||u.add(d),p){let I=new tE.AccumulatorMap;id(e,t,n,r,E.selectionSet,I,o,u),o.push({label:p.label,fields:I})}else id(e,t,n,r,E.selectionSet,a,o,u);break}}}function Gne(e,t,n,r,i){let a=new tE.AccumulatorMap,o=[];return id(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function eE(e,t){let n=(0,ts.getDirectiveValues)(ts.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,ts.getDirectiveValues)(ts.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function dS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,ts.typeFromAST)(e,r);return i===n?!0:(0,ts.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function cM(e){return e.alias?e.alias.value:e.name.value}function fS(e,t){let n=(0,ts.getDirectiveValues)(Kne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Bs.collectSubFields=(0,$ne.memoize5)(function(t,n,r,i,a){let o=new tE.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&id(t,n,r,i,p.selectionSet,o,l,u);return d})});var mS=w(rp=>{"use strict";m();T();N();Object.defineProperty(rp,"__esModule",{value:!0});rp.getOperationASTFromRequest=void 0;rp.getOperationASTFromDocument=lM;var Qne=Ie(),Yne=Ru();function lM(e,t){let n=(0,Qne.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}rp.getOperationASTFromRequest=(0,Yne.memoize1)(function(t){return lM(t.document,t.operationName)})});var pM=w(ip=>{"use strict";m();T();N();Object.defineProperty(ip,"__esModule",{value:!0});ip.visitData=TS;ip.visitErrors=Hne;ip.visitResult=zne;var Pu=Ie(),NS=pS(),Jne=mS();function TS(e,t,n){if(Array.isArray(e))return e.map(r=>TS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:TS(a,t,n)})}return n!=null?n(r):r}return e}function Hne(e,t){return e.map(n=>t(n))}function zne(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Pu.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,Jne.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=Zne(l,E,n,a,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=Wne(d,i,u)),e}function Wne(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function Xne(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function Zne(e,t,n,r,i,a,o,u){let l=Xne(n,t),{fields:d}=(0,NS.collectFields)(n,r,i,l,t.selectionSet);return ES(e,l,d,n,r,i,a,0,o,u)}function ES(e,t,n,r,i,a,o,u,l,d){var re;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=tre(l,u),U=A.errorMap;for(let ee of A.unpathedErrors)d.unpathedErrors.add(ee)}for(let[ee,me]of n){let ue=me[0].name.value,Ae=(re=p[ue])==null?void 0:re.type;if(Ae==null)switch(ue){case"__typename":Ae=Pu.TypeNameMetaFieldDef.type;break;case"__schema":Ae=Pu.SchemaMetaFieldDef.type;break;case"__type":Ae=Pu.TypeMetaFieldDef.type;break}let Me=u+1,Ze;U&&(Ze=U[ee],Ze!=null&&delete U[ee],nre(t,ue,Me,Ze,d));let Z=fM(e[ee],Ae,me,r,i,a,o,Me,Ze,d);dM(v,ee,Z,E,ue)}let j=v.__typename;if(j!=null&&dM(v,"__typename",j,E,"__typename"),U)for(let ee in U){let me=U[ee];for(let ue of me)d.unpathedErrors.add(ue)}let Q=E==null?void 0:E.__leave;return Q!=null?Q(v):v}function dM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function ere(e,t,n,r,i,a,o,u,l,d){return e.map(p=>fM(p,t,n,r,i,a,o,u+1,l,d))}function fM(e,t,n,r,i,a,o,u,l=[],d){if(e==null)return e;let p=(0,Pu.getNullableType)(t);if((0,Pu.isListType)(p))return ere(e,p.ofType,n,r,i,a,o,u,l,d);if((0,Pu.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,NS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[Q,re]of j.fields){let ee=A.get(Q);ee?ee.push(...re):A.set(Q,re)}}return ES(e,v,A,r,i,a,o,u,l,d)}else if((0,Pu.isObjectType)(p)){let{fields:v,patches:A}=(0,NS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,Q]of U.fields){let re=v.get(j);re?re.push(...Q):v.set(j,Q)}}return ES(e,p,v,r,i,a,o,u,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function tre(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function nre(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(a);u==null?i.segmentInfoMap.set(a,[o]):u.push(o)}}});var mM=w(yS=>{"use strict";m();T();N();Object.defineProperty(yS,"__esModule",{value:!0});yS.valueMatchesCriteria=hS;function hS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>hS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>hS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var NM=w(IS=>{"use strict";m();T();N();Object.defineProperty(IS,"__esModule",{value:!0});IS.isAsyncIterable=rre;function rre(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var TM=w(gS=>{"use strict";m();T();N();Object.defineProperty(gS,"__esModule",{value:!0});gS.isDocumentNode=are;var ire=Ie();function are(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===ire.Kind.DOCUMENT}});var EM=w(()=>{"use strict";m();T();N()});var gM=w(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});ap.getAsyncIteratorWithCancel=yM;ap.getAsyncIterableWithCancel=IM;ap.withCancel=IM;var sre=Ru();function ore(e){return Fi(this,null,function*(){return{value:e,done:!0}})}var hM=(0,sre.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||ore;return function(l){return Fi(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hM(n,a);return a}})}function IM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(a,n,[]);return yM(u,t)}:typeof a=="function"?hM(n,a):a}})}});var _M=w(_S=>{"use strict";m();T();N();Object.defineProperty(_S,"__esModule",{value:!0});_S.fixSchemaAst=dre;var ure=Ie(),cre=bO();function lre(e,t){let n=(0,cre.getDocumentNodeFromSchema)(e);return(0,ure.buildASTSchema)(n,k({},t||{}))}function dre(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=lre(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var vM=w(vS=>{"use strict";m();T();N();Object.defineProperty(vS,"__esModule",{value:!0});vS.extractExtensionsFromSchema=mre;var fre=Yl(),Us=Rc(),pre=td();function ga(e,t){e=e||{};let a=e,{directives:n}=a,r=GR(a,["directives"]),i=k({},r);if(!t&&n!=null){let o={};for(let u in n)o[u]=[...(0,fre.asArray)(n[u])];i.directives=o}return i}function mre(e,t=!1){let n={schemaExtensions:ga(e.extensions,t),types:{}};return(0,pre.mapSchema)(e,{[Us.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:ga(r.extensions,t)},r),[Us.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:ga(r.extensions,t)},r),[Us.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:ga(r.extensions,t)};let o=r.args;if(o!=null)for(let u in o)n.types[a].fields[i].arguments[u]=ga(o[u].extensions,t);return r},[Us.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:ga(r.extensions,t)},r),[Us.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=ga(r.extensions,t),r),[Us.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:ga(r.extensions,t)},r),[Us.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:ga(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:ga(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:ga(r.extensions,t)},r)}),n}});var OM=w(sp=>{"use strict";m();T();N();Object.defineProperty(sp,"__esModule",{value:!0});sp.addPath=Nre;sp.pathToArray=Tre;sp.printPathArray=Ere;function Nre(e,t,n){return{prev:e,key:t,typename:n}}function Tre(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ere(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var DM=w(SS=>{"use strict";m();T();N();Object.defineProperty(SS,"__esModule",{value:!0});SS.mergeIncrementalResult=SM;var hre=nS();function SM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)OS(t,n,i),n[n.length-1]++;e.data&&OS(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&OS(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{SM({incrementalResult:i,executionResult:t})})}function OS(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.debugTimerStart=yre;nE.debugTimerEnd=Ire;var bM=new Set;function yre(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(bM.add(e),console.time(e))}function Ire(e){bM.has(e)&&console.timeEnd(e)}});var FM=w(op=>{"use strict";m();T();N();Object.defineProperty(op,"__esModule",{value:!0});op.getAbortPromise=void 0;op.registerAbortSignalListener=PM;var gre=Jf(),RM=Ru(),_re=(0,RM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function PM(e,t){if(e.aborted){t();return}_re(e).add(t)}op.getAbortPromise=(0,RM.memoize1)(function(t){return t.aborted?(0,gre.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}PM(t,()=>{r(t.reason)})})})});var _a=w(we=>{"use strict";m();T();N();Object.defineProperty(we,"__esModule",{value:!0});we.createDeferred=we.fakePromise=we.mapMaybePromise=we.mapAsyncIterator=we.inspect=void 0;var Qe=(BU(),Gm(CU));Qe.__exportStar(UU(),we);Qe.__exportStar(Yl(),we);Qe.__exportStar(lO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(HU(),we);Qe.__exportStar(TO(),we);Qe.__exportStar(bO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(pk(),we);Qe.__exportStar(mk(),we);Qe.__exportStar(bk(),we);Qe.__exportStar(Bk(),we);Qe.__exportStar(kk(),we);Qe.__exportStar($k(),we);Qe.__exportStar(Qk(),we);Qe.__exportStar(Yk(),we);Qe.__exportStar(Hk(),we);Qe.__exportStar(zk(),we);Qe.__exportStar(td(),we);Qe.__exportStar(ZO(),we);Qe.__exportStar(jT(),we);Qe.__exportStar(Xk(),we);Qe.__exportStar(nS(),we);Qe.__exportStar(Rc(),we);Qe.__exportStar(xO(),we);Qe.__exportStar(eM(),we);Qe.__exportStar(tM(),we);Qe.__exportStar(nM(),we);Qe.__exportStar(rM(),we);Qe.__exportStar(VO(),we);Qe.__exportStar(iM(),we);Qe.__exportStar(UT(),we);Qe.__exportStar(aM(),we);Qe.__exportStar(PT(),we);Qe.__exportStar(oM(),we);Qe.__exportStar(pM(),we);Qe.__exportStar(oO(),we);Qe.__exportStar(mM(),we);Qe.__exportStar(NM(),we);Qe.__exportStar(TM(),we);Qe.__exportStar(Hf(),we);Qe.__exportStar(EM(),we);Qe.__exportStar(gM(),we);Qe.__exportStar(Wf(),we);Qe.__exportStar(PO(),we);Qe.__exportStar(pS(),we);var vre=Yf();Object.defineProperty(we,"inspect",{enumerable:!0,get:function(){return vre.inspect}});Qe.__exportStar(Ru(),we);Qe.__exportStar(_M(),we);Qe.__exportStar(mS(),we);Qe.__exportStar(vM(),we);Qe.__exportStar(OM(),we);Qe.__exportStar(LT(),we);Qe.__exportStar(lS(),we);Qe.__exportStar(DM(),we);Qe.__exportStar(AM(),we);Qe.__exportStar(cO(),we);var rE=Jf();Object.defineProperty(we,"mapAsyncIterator",{enumerable:!0,get:function(){return rE.mapAsyncIterator}});Object.defineProperty(we,"mapMaybePromise",{enumerable:!0,get:function(){return rE.mapMaybePromise}});Object.defineProperty(we,"fakePromise",{enumerable:!0,get:function(){return rE.fakePromise}});Object.defineProperty(we,"createDeferred",{enumerable:!0,get:function(){return rE.createDeferredPromise}});Qe.__exportStar(FM(),we)});var LM=w(iE=>{"use strict";m();T();N();Object.defineProperty(iE,"__esModule",{value:!0});iE.mergeResolvers=void 0;var Ore=_a();function wM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=wM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Ore.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}iE.mergeResolvers=wM});var DS=w(aE=>{"use strict";m();T();N();Object.defineProperty(aE,"__esModule",{value:!0});aE.mergeArguments=void 0;var CM=_a();function Sre(e,t,n){let r=Dre([...t,...e].filter(CM.isSome),n);return n&&n.sort&&r.sort(CM.compareNodes),r}aE.mergeArguments=Sre;function Dre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Xi=w(ad=>{"use strict";m();T();N();Object.defineProperty(ad,"__esModule",{value:!0});ad.mergeDirective=ad.mergeDirectives=void 0;var BM=Ie(),bre=_a();function Are(e,t){return!!e.find(n=>n.name.value===t.name.value)}function UM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function Rre(e,t){return t.some(({value:n})=>n===e.value)}function kM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,u=r.value.values;a.value.values=Cre(o,u,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function Pre(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!UM(n,t)){let o=i[a];return n.arguments=kM(n.arguments,o.arguments),null}return n}).filter(bre.isSome)}function Fre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,u=Pre([...a],r);for(let l of o)if(Are(u,l)&&!UM(l,r)){let d=u.findIndex(E=>E.name.value===l.name.value),p=u[d];u[d].arguments=kM(l.arguments||[],p.arguments||[])}else u.push(l);return u}ad.mergeDirectives=Fre;function wre(e,t){let n=(0,BM.print)($(k({},e),{description:void 0})),r=(0,BM.print)($(k({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". +`+o,block:!0})}):$(k({},i),{description:{kind:zi.Kind.STRING,value:o,block:u}})}}}})}function Dk(e){return(0,zi.isTypeSystemDefinitionNode)(e)||e.kind===zi.Kind.FIELD_DEFINITION||e.kind===zi.Kind.INPUT_VALUE_DEFINITION||e.kind===zi.Kind.ENUM_VALUE_DEFINITION}});var Bk=w(CO=>{"use strict";m();T();N();Object.defineProperty(CO,"__esModule",{value:!0});CO.buildOperationNodeForField=Qte;var ct=Ie(),Gte=Hf(),Fk=Wf(),LO=[],xT=new Map;function wk(e){LO.push(e)}function Ak(){LO=[]}function Rk(){xT=new Map}function Qte({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l=!0}){Ak(),Rk();let d=(0,Fk.getRootTypeNames)(e),p=Yte({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:u,selectedFields:l,rootTypeNames:d});return p.variableDefinitions=[...LO],Ak(),Rk(),p}function Yte({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:u,selectedFields:l,rootTypeNames:d}){let p=(0,Fk.getDefinedRootType)(e,n),E=p.getFields()[t],I=`${t}_${n}`;if(E.args)for(let v of E.args){let A=v.name;(!u||u.includes(A))&&wk(Lk(v,A))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[Ck({type:p,field:E,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:u,selectedFields:l,rootTypeNames:d})]}}}function wO({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&p>u)){if((0,ct.isUnionType)(t)){let A=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isInterfaceType)(t)){let A=Object.values(d.getTypeMap()).filter(U=>(0,ct.isObjectType)(U)&&U.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:A.filter(U=>!FO([...a,U],{depth:l})).map(U=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:U.name}},selectionSet:wO({parent:t,type:U,models:n,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v})})).filter(U=>{var j,Q;return((Q=(j=U==null?void 0:U.selectionSet)==null?void 0:j.selections)==null?void 0:Q.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let A=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),U=n.includes(t.name);if(!r&&U&&!A)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let j=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(j).filter(Q=>!FO([...a,(0,ct.getNamedType)(j[Q].type)],{depth:l})).map(Q=>{let ee=typeof I=="object"?I[Q]:!0;return ee?Ck({type:t,field:j[Q],models:n,path:[...i,Q],ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:ee,rootTypeNames:v}):null}).filter(Q=>{var ee,ne;return Q==null?!1:"selectionSet"in Q?!!((ne=(ee=Q.selectionSet)==null?void 0:ee.selections)!=null&&ne.length):!0})}}}}function Lk(e,t){function n(i){return(0,ct.isListType)(i)?{kind:ct.Kind.LIST_TYPE,type:n(i.ofType)}:(0,ct.isNonNullType)(i)?{kind:ct.Kind.NON_NULL_TYPE,type:n(i.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:i.name}}}let r;try{let i=(0,ct.astFromValue)(e.defaultValue,e.type);i==null?r=void 0:r=i}catch(i){let a=(0,Gte.astFromValueUntyped)(e.defaultValue);a==null?r=void 0:r=a}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type),defaultValue:r}}function Pk(e,t){return[...t,e].join("_")}function Ck({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p,argNames:E,selectedFields:I,rootTypeNames:v}){let A=(0,ct.getNamedType)(t.type),U=[],j=!1;if(t.args&&t.args.length&&(U=t.args.map(pe=>{let le=Pk(pe.name,i);return E&&!E.includes(le)?((0,ct.isNonNullType)(pe.type)&&(j=!0),null):(r||wk(Lk(pe,le)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:pe.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:Pk(pe.name,i)}}})}).filter(Boolean)),j)return null;let Q=[...i,t.name],ee=Q.join("."),ne=t.name;return xT.has(ee)&&xT.get(ee)!==t.type.toString()&&(ne+=t.type.toString().replace(/!/g,"NonNull").replace(/\[/g,"List").replace(/\]/g,"")),xT.set(ee,t.type.toString()),!(0,ct.isScalarType)(A)&&!(0,ct.isEnumType)(A)?$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ne!==t.name&&{alias:{kind:ct.Kind.NAME,value:ne}}),{selectionSet:wO({parent:e,type:A,models:n,firstCall:r,path:Q,ancestors:[...a,e],ignore:o,depthLimit:u,circularReferenceDepth:l,schema:d,depth:p+1,argNames:E,selectedFields:I,rootTypeNames:v})||void 0,arguments:U}):$(k({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ne!==t.name&&{alias:{kind:ct.Kind.NAME,value:ne}}),{arguments:U})}function FO(e,t={depth:1}){let n=e[e.length-1];return(0,ct.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var kk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.DirectiveLocation=void 0;var Uk;(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"})(Uk||(qT.DirectiveLocation=Uk={}))});var Rc=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.MapperKind=void 0;var Mk;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(Mk||(VT.MapperKind=Mk={}))});var UO=w(BO=>{"use strict";m();T();N();Object.defineProperty(BO,"__esModule",{value:!0});BO.getObjectTypeFromTypeMap=Hte;var Jte=Ie();function Hte(e,t){if(t){let n=e[t.name];if((0,Jte.isObjectType)(n))return n}}});var xO=w(Wl=>{"use strict";m();T();N();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.createNamedStub=kO;Wl.createStub=MO;Wl.isNamedStub=zte;Wl.getBuiltInForStub=Wte;var Er=Ie();function kO(e,t){let n;return t==="object"?n=Er.GraphQLObjectType:t==="interface"?n=Er.GraphQLInterfaceType:n=Er.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:Er.GraphQLString}}})}function MO(e,t){switch(e.kind){case Er.Kind.LIST_TYPE:return new Er.GraphQLList(MO(e.type,t));case Er.Kind.NON_NULL_TYPE:return new Er.GraphQLNonNull(MO(e.type,t));default:return t==="output"?kO(e.name.value,"object"):kO(e.name.value,"input")}}function zte(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}function Wte(e){switch(e.name){case Er.GraphQLInt.name:return Er.GraphQLInt;case Er.GraphQLFloat.name:return Er.GraphQLFloat;case Er.GraphQLString.name:return Er.GraphQLString;case Er.GraphQLBoolean.name:return Er.GraphQLBoolean;case Er.GraphQLID.name:return Er.GraphQLID;default:return e}}});var jT=w(qO=>{"use strict";m();T();N();Object.defineProperty(qO,"__esModule",{value:!0});qO.rewireTypes=Xte;var Zn=Ie(),xk=xO();function Xte(e,t){let n=Object.create(null);for(let I in e)n[I]=e[I];let r=Object.create(null);for(let I in n){let v=n[I];if(v==null||I.startsWith("__"))continue;let A=v.name;if(!A.startsWith("__")){if(r[A]!=null){console.warn(`Duplicate schema type name ${A} found; keeping the existing one found in the schema`);continue}r[A]=v}}for(let I in r)r[I]=u(r[I]);let i=t.map(I=>a(I));return{typeMap:r,directives:i};function a(I){if((0,Zn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Zn.GraphQLDirective(v)}function o(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function u(I){if((0,Zn.isObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields),interfaces:()=>p(v.interfaces)});return new Zn.GraphQLObjectType(A)}else if((0,Zn.isInterfaceType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>l(v.fields)});return"interfaces"in A&&(A.interfaces=()=>p(v.interfaces)),new Zn.GraphQLInterfaceType(A)}else if((0,Zn.isUnionType)(I)){let v=I.toConfig(),A=$(k({},v),{types:()=>p(v.types)});return new Zn.GraphQLUnionType(A)}else if((0,Zn.isInputObjectType)(I)){let v=I.toConfig(),A=$(k({},v),{fields:()=>d(v.fields)});return new Zn.GraphQLInputObjectType(A)}else if((0,Zn.isEnumType)(I)){let v=I.toConfig();return new Zn.GraphQLEnumType(v)}else if((0,Zn.isScalarType)(I)){if((0,Zn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Zn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&U.args&&(U.type=j,U.args=o(U.args),v[A]=U)}return v}function d(I){let v={};for(let A in I){let U=I[A],j=E(U.type);j!=null&&(U.type=j,v[A]=U)}return v}function p(I){let v=[];for(let A of I){let U=E(A);U!=null&&v.push(U)}return v}function E(I){if((0,Zn.isListType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLList(v):null}else if((0,Zn.isNonNullType)(I)){let v=E(I.ofType);return v!=null?new Zn.GraphQLNonNull(v):null}else if((0,Zn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,xk.isNamedStub)(I)?(0,xk.getBuiltInForStub)(I):u(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}});var VO=w(Zl=>{"use strict";m();T();N();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.transformInputValue=Xl;Zl.serializeInputValue=ene;Zl.parseInputValue=tne;Zl.parseInputValueLiteral=nne;var KT=Ie(),Zte=Yl();function Xl(e,t,n=null,r=null){if(t==null)return t;let i=(0,KT.getNullableType)(e);if((0,KT.isLeafType)(i))return n!=null?n(i,t):t;if((0,KT.isListType)(i))return(0,Zte.asArray)(t).map(a=>Xl(i.ofType,a,n,r));if((0,KT.isInputObjectType)(i)){let a=i.getFields(),o={};for(let u in t){let l=a[u];l!=null&&(o[u]=Xl(l.type,t[u],n,r))}return r!=null?r(i,o):o}}function ene(e,t){return Xl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}function tne(e,t){return Xl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}function nne(e,t){return Xl(e,t,(n,r)=>n.parseLiteral(r,{}))}});var td=w(GT=>{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.mapSchema=ine;GT.correctASTNodes=np;var st=Ie(),ed=UO(),Rt=Rc(),rne=jT(),qk=VO();function ine(e,t={}){let n=Kk(jk(jO(Vk(sne(jO(Vk(e.getTypeMap(),e,qk.serializeInputValue),e,t,u=>(0,st.isLeafType)(u)),e,t),e,qk.parseInputValue),e,t,u=>!(0,st.isLeafType)(u)),e,t),e,t),r=e.getDirectives(),i=one(r,e,t),{typeMap:a,directives:o}=(0,rne.rewireTypes)(n,i);return new st.GraphQLSchema($(k({},e.toConfig()),{query:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,ed.getObjectTypeFromTypeMap)(a,(0,ed.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}var ane=["String","ID","Int","Float","Boolean"];function jO(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")&&!ane.includes(a)){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let u=cne(t,n,a);if(u==null){i[a]=o;continue}let l=u(o,t);if(l===void 0){i[a]=o;continue}i[a]=l}return i}function sne(e,t,n){let r=mne(n);return r?jO(e,t,{[Rt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,u={};for(let l in o){let d=o[l],p=r(d,i.name,t,l);if(p===void 0)u[l]=d;else if(Array.isArray(p)){let[E,I]=p;u[E]=I===void 0?d:I}else p!==null&&(u[l]=p)}return np(new st.GraphQLEnumType($(k({},a),{values:u})))}},i=>(0,st.isEnumType)(i)):e}function Vk(e,t,n){let r=Kk(e,t,{[Rt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=$T(e,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}});return jk(r,t,{[Rt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=$T(r,i.type);if(a!=null)return $(k({},i),{defaultValue:n(a,i.defaultValue)})}})}function $T(e,t){if((0,st.isListType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLList(n):null}else if((0,st.isNonNullType)(t)){let n=$T(e,t.ofType);return n!=null?new st.GraphQLNonNull(n):null}else if((0,st.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function jk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)&&!(0,st.isInputObjectType)(a)){r[i]=a;continue}let o=dne(t,n,i);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=o(E,p,i,t);if(I===void 0)d[p]=E;else if(Array.isArray(I)){let[v,A]=I;A.astNode!=null&&(A.astNode=$(k({},A.astNode),{name:$(k({},A.astNode.name),{value:v})})),d[v]=A===void 0?E:A}else I!==null&&(d[p]=I)}(0,st.isObjectType)(a)?r[i]=np(new st.GraphQLObjectType($(k({},u),{fields:d}))):(0,st.isInterfaceType)(a)?r[i]=np(new st.GraphQLInterfaceType($(k({},u),{fields:d}))):r[i]=np(new st.GraphQLInputObjectType($(k({},u),{fields:d})))}return r}function Kk(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,st.isObjectType)(a)&&!(0,st.isInterfaceType)(a)){r[i]=a;continue}let o=fne(n);if(o==null){r[i]=a;continue}let u=a.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p],I=E.args;if(I==null){d[p]=E;continue}let v=Object.keys(I);if(!v.length){d[p]=E;continue}let A={};for(let U of v){let j=I[U],Q=o(j,p,i,t);if(Q===void 0)A[U]=j;else if(Array.isArray(Q)){let[ee,ne]=Q;A[ee]=ne}else Q!==null&&(A[U]=Q)}d[p]=$(k({},E),{args:A})}(0,st.isObjectType)(a)?r[i]=new st.GraphQLObjectType($(k({},u),{fields:d})):(0,st.isInterfaceType)(a)?r[i]=new st.GraphQLInterfaceType($(k({},u),{fields:d})):r[i]=new st.GraphQLInputObjectType($(k({},u),{fields:d}))}return r}function one(e,t,n){let r=pne(n);if(r==null)return e.slice();let i=[];for(let a of e){let o=r(a,t);o===void 0?i.push(a):o!==null&&i.push(o)}return i}function une(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.TYPE];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_OBJECT,Rt.MapperKind.SUBSCRIPTION)):(0,st.isInputObjectType)(n)?r.push(Rt.MapperKind.INPUT_OBJECT_TYPE):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.INTERFACE_TYPE):(0,st.isUnionType)(n)?r.push(Rt.MapperKind.COMPOSITE_TYPE,Rt.MapperKind.ABSTRACT_TYPE,Rt.MapperKind.UNION_TYPE):(0,st.isEnumType)(n)?r.push(Rt.MapperKind.ENUM_TYPE):(0,st.isScalarType)(n)&&r.push(Rt.MapperKind.SCALAR_TYPE),r}function cne(e,t,n){let r=une(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function lne(e,t){var i,a,o;let n=e.getType(t),r=[Rt.MapperKind.FIELD];return(0,st.isObjectType)(n)?(r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(Rt.MapperKind.ROOT_FIELD,Rt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,st.isInterfaceType)(n)?r.push(Rt.MapperKind.COMPOSITE_FIELD,Rt.MapperKind.INTERFACE_FIELD):(0,st.isInputObjectType)(n)&&r.push(Rt.MapperKind.INPUT_OBJECT_FIELD),r}function dne(e,t,n){let r=lne(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function fne(e){let t=e[Rt.MapperKind.ARGUMENT];return t!=null?t:null}function pne(e){let t=e[Rt.MapperKind.DIRECTIVE];return t!=null?t:null}function mne(e){let t=e[Rt.MapperKind.ENUM_VALUE];return t!=null?t:null}function np(e){if((0,st.isObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLObjectType(t)}else if((0,st.isInterfaceType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInterfaceType(t)}else if((0,st.isInputObjectType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.fields){let i=t.fields[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{kind:st.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{kind:st.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new st.GraphQLInputObjectType(t)}else if((0,st.isEnumType)(e)){let t=e.toConfig();if(t.astNode!=null){let n=[];for(let r in t.values){let i=t.values[r];i.astNode!=null&&n.push(i.astNode)}t.astNode=$(k({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>$(k({},n),{values:void 0}))),new st.GraphQLEnumType(t)}else return e}});var $k=w(GO=>{"use strict";m();T();N();Object.defineProperty(GO,"__esModule",{value:!0});GO.filterSchema=Tne;var QT=Ie(),ga=Rc(),Nne=td();function Tne({schema:e,typeFilter:t=()=>!0,fieldFilter:n=void 0,rootFieldFilter:r=void 0,objectFieldFilter:i=void 0,interfaceFieldFilter:a=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:u=void 0,directiveFilter:l=void 0,enumValueFilter:d=void 0}){return(0,Nne.mapSchema)(e,{[ga.MapperKind.QUERY]:E=>KO(E,"Query",r,u),[ga.MapperKind.MUTATION]:E=>KO(E,"Mutation",r,u),[ga.MapperKind.SUBSCRIPTION]:E=>KO(E,"Subscription",r,u),[ga.MapperKind.OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLObjectType,E,i||n,u):null,[ga.MapperKind.INTERFACE_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInterfaceType,E,a||n,u):null,[ga.MapperKind.INPUT_OBJECT_TYPE]:E=>t(E.name,E)?$O(QT.GraphQLInputObjectType,E,o||n):null,[ga.MapperKind.UNION_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.ENUM_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.SCALAR_TYPE]:E=>t(E.name,E)?void 0:null,[ga.MapperKind.DIRECTIVE]:E=>l&&!l(E.name,E)?null:void 0,[ga.MapperKind.ENUM_VALUE]:(E,I,v,A)=>d&&!d(I,A,E)?null:void 0})}function KO(e,t,n,r){if(n||r){let i=e.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t,a,i.fields[a]))delete i.fields[a];else if(r&&o.args)for(let u in o.args)r(e.name,a,u,o.args[u])||delete o.args[u]}return new QT.GraphQLObjectType(i)}return e}function $O(e,t,n,r){if(n||r){let i=t.toConfig();for(let a in i.fields){let o=i.fields[a];if(n&&!n(t.name,a,i.fields[a]))delete i.fields[a];else if(r&&"args"in o)for(let u in o.args)r(t.name,a,u,o.args[u])||delete o.args[u]}return new e(i)}}});var Qk=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.healSchema=Ene;YT.healTypes=Gk;var ts=Ie();function Ene(e){return Gk(e.getTypeMap(),e.getDirectives()),e}function Gk(e,t){let n=Object.create(null);for(let d in e){let p=e[d];if(p==null||d.startsWith("__"))continue;let E=p.name;if(!E.startsWith("__")){if(n[E]!=null){console.warn(`Duplicate schema type name ${E} found; keeping the existing one found in the schema`);continue}n[E]=p}}for(let d in n){let p=n[d];e[d]=p}for(let d of t)d.args=d.args.filter(p=>(p.type=l(p.type),p.type!==null));for(let d in e){let p=e[d];!d.startsWith("__")&&d in n&&p!=null&&r(p)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ts.isObjectType)(d)){i(d),a(d);return}else if((0,ts.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ts.isUnionType)(d)){u(d);return}else if((0,ts.isInputObjectType)(d)){o(d);return}else if((0,ts.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.args.map(v=>(v.type=l(v.type),v.type===null?null:v)).filter(Boolean),I.type=l(I.type),I.type===null&&delete p[E]}function a(d){if("getInterfaces"in d){let p=d.getInterfaces();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}}function o(d){let p=d.getFields();for(let[E,I]of Object.entries(p))I.type=l(I.type),I.type===null&&delete p[E]}function u(d){let p=d.getTypes();p.push(...p.splice(0).map(E=>l(E)).filter(Boolean))}function l(d){if((0,ts.isListType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLList(p):null}else if((0,ts.isNonNullType)(d)){let p=l(d.ofType);return p!=null?new ts.GraphQLNonNull(p):null}else if((0,ts.isNamedType)(d)){let p=e[d.name];if(p&&d!==p)return p}return d}}});var Yk=w(QO=>{"use strict";m();T();N();Object.defineProperty(QO,"__esModule",{value:!0});QO.getResolversFromSchema=hne;var Pc=Ie();function hne(e,t){var i,a;let n=Object.create(null),r=e.getTypeMap();for(let o in r)if(!o.startsWith("__")){let u=r[o];if((0,Pc.isScalarType)(u)){if(!(0,Pc.isSpecifiedScalarType)(u)){let l=u.toConfig();delete l.astNode,n[o]=new Pc.GraphQLScalarType(l)}}else if((0,Pc.isEnumType)(u)){n[o]={};let l=u.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,Pc.isInterfaceType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isUnionType)(u))u.resolveType!=null&&(n[o]={__resolveType:u.resolveType});else if((0,Pc.isObjectType)(u)){n[o]={},u.isTypeOf!=null&&(n[o].__isTypeOf=u.isTypeOf);let l=u.getFields();for(let d in l){let p=l[d];if(p.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=p.subscribe),p.resolve!=null&&((i=p.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=p.resolve)==null?void 0:a.name){case"defaultMergedResolver":if(!t)continue;break;case"defaultFieldResolver":continue}n[o][d]=n[o][d]||{},n[o][d].resolve=p.resolve}}}}return n}});var Hk=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.forEachField=yne;var Jk=Ie();function yne(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,Jk.getNamedType)(i).name.startsWith("__")&&(0,Jk.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];t(u,r,o)}}}}});var zk=w(HO=>{"use strict";m();T();N();Object.defineProperty(HO,"__esModule",{value:!0});HO.forEachDefaultValue=Ine;var JO=Ie();function Ine(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,JO.getNamedType)(i).name.startsWith("__")){if((0,JO.isObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];for(let l of u.args)l.defaultValue=t(l.type,l.defaultValue)}}else if((0,JO.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let u=a[o];u.defaultValue=t(u.type,u.defaultValue)}}}}}});var ZO=w(XO=>{"use strict";m();T();N();Object.defineProperty(XO,"__esModule",{value:!0});XO.addTypes=_ne;var zO=Ie(),WO=UO(),gne=jT();function _ne(e,t){let n=e.toConfig(),r={};for(let u of n.types)r[u.name]=u;let i={};for(let u of n.directives)i[u.name]=u;for(let u of t)(0,zO.isNamedType)(u)?r[u.name]=u:(0,zO.isDirective)(u)&&(i[u.name]=u);let{typeMap:a,directives:o}=(0,gne.rewireTypes)(r,Object.values(i));return new zO.GraphQLSchema($(k({},n),{query:(0,WO.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,WO.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,WO.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}});var Xk=w(eS=>{"use strict";m();T();N();Object.defineProperty(eS,"__esModule",{value:!0});eS.pruneSchema=bne;var er=Ie(),vne=TO(),One=Rc(),Sne=td(),Dne=Wf();function bne(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,u=[],l=e;do{let d=Ane(l);if(i){let p=[];for(let E in l.getTypeMap()){if(E.startsWith("__"))continue;let I=l.getType(E);I&&i(I)&&p.push(E)}d=Wk(p,l,d)}u=[],l=(0,Sne.mapSchema)(l,{[One.MapperKind.TYPE]:p=>!d.has(p.name)&&!(0,er.isSpecifiedScalarType)(p)?((0,er.isUnionType)(p)||(0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p)||(0,er.isScalarType)(p))&&(o||(0,er.isUnionType)(p)&&r&&!Object.keys(p.getTypes()).length||((0,er.isInputObjectType)(p)||(0,er.isInterfaceType)(p)||(0,er.isObjectType)(p))&&n&&!Object.keys(p.getFields()).length||(0,er.isInterfaceType)(p)&&a)?p:(u.push(p.name),d.delete(p.name),null):p})}while(u.length);return l}function Ane(e){let t=[];for(let n of(0,Dne.getRootTypes)(e))t.push(n.name);return Wk(t,e)}function Wk(e,t,n=new Set){let r=new Map;for(;e.length;){let i=e.pop();if(n.has(i)&&r[i]!==!0)continue;let a=t.getType(i);if(a){if((0,er.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,er.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,vne.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>JT(t,o))),"getInterfaces"in a&&e.push(...a.getInterfaces().map(o=>o.name)),"getFields"in a){let o=a.getFields(),u=Object.entries(o);if(!u.length)continue;for(let[,l]of u){(0,er.isObjectType)(a)&&e.push(...l.args.flatMap(p=>{let E=[(0,er.getNamedType)(p.type).name];return E.push(...JT(t,p)),E}));let d=(0,er.getNamedType)(l.type);e.push(d.name),e.push(...JT(t,l)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}e.push(...JT(t,a)),n.add(i)}}return n}function JT(e,t){var r,i;let n=new Set;if((r=t.astNode)!=null&&r.directives)for(let a of t.astNode.directives){let o=e.getDirective(a.name.value);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}if((i=t.extensions)!=null&&i.directives)for(let a in t.extensions.directives){let o=e.getDirective(a);if(o!=null&&o.args)for(let u of o.args){let l=(0,er.getNamedType)(u.type);n.add(l.name)}}return[...n]}});var nS=w(tS=>{"use strict";m();T();N();Object.defineProperty(tS,"__esModule",{value:!0});tS.mergeDeep=HT;var Rne=Yl();function HT(e,t=!1,n=!1,r=!1){if(e.length===0)return;if(e.length===1)return e[0];let i,a=!0,o=e.every(d=>{if(Array.isArray(d)){if(i===void 0)return i=d.length,!0;if(i===d.length)return!0}else a=!1;return!1});if(r&&o)return new Array(i).fill(null).map((d,p)=>HT(e.map(E=>E[p]),t,n,r));if(a)return e.flat(1);let u,l;t&&(l=e.find(d=>Zk(d)),l&&(u==null&&(u={}),Object.setPrototypeOf(u,Object.create(Object.getPrototypeOf(l)))));for(let d of e)if(d!=null)if(Zk(d)){if(l){let p=Object.getPrototypeOf(u),E=Object.getPrototypeOf(d);if(E)for(let I of Object.getOwnPropertyNames(E)){let v=Object.getOwnPropertyDescriptor(E,I);(0,Rne.isSome)(v)&&Object.defineProperty(p,I,v)}}for(let p in d)u==null&&(u={}),p in u?u[p]=HT([u[p],d[p]],t,n,r):u[p]=d[p]}else Array.isArray(d)&&Array.isArray(u)?u=HT([u,d],t,n,r):u=d;return u}function Zk(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var eM=w(rS=>{"use strict";m();T();N();Object.defineProperty(rS,"__esModule",{value:!0});rS.parseSelectionSet=Fne;var Pne=Ie();function Fne(e,t){return(0,Pne.parse)(e,t).definitions[0].selectionSet}});var tM=w(iS=>{"use strict";m();T();N();Object.defineProperty(iS,"__esModule",{value:!0});iS.getResponseKeyFromInfo=wne;function wne(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}});var nM=w(nd=>{"use strict";m();T();N();Object.defineProperty(nd,"__esModule",{value:!0});nd.appendObjectFields=Cne;nd.removeObjectFields=Bne;nd.selectObjectFields=Une;nd.modifyObjectFields=kne;var zT=Ie(),Lne=ZO(),WT=Rc(),Fc=td();function Cne(e,t,n){return e.getType(t)==null?(0,Lne.addTypes)(e,[new zT.GraphQLObjectType({name:t,fields:n})]):(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:r=>{if(r.name===t){let i=r.toConfig(),a=i.fields,o={};for(let u in a)o[u]=a[u];for(let u in n)o[u]=n[u];return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},i),{fields:o})))}}})}function Bne(e,t,n){let r={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),u=o.fields,l={};for(let d in u){let p=u[d];n(d,p)?r[d]=p:l[d]=p}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},o),{fields:l})))}}}),r]}function Une(e,t,n){let r={};return(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:i=>{if(i.name===t){let o=i.toConfig().fields;for(let u in o){let l=o[u];n(u,l)&&(r[u]=l)}}}}),r}function kne(e,t,n,r){let i={};return[(0,Fc.mapSchema)(e,{[WT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let u=o.toConfig(),l=u.fields,d={};for(let p in l){let E=l[p];n(p,E)?i[p]=E:d[p]=E}for(let p in r){let E=r[p];d[p]=E}return(0,Fc.correctASTNodes)(new zT.GraphQLObjectType($(k({},u),{fields:d})))}}}),i]}});var rM=w(aS=>{"use strict";m();T();N();Object.defineProperty(aS,"__esModule",{value:!0});aS.renameType=Mne;var Wi=Ie();function Mne(e,t){if((0,Wi.isObjectType)(e))return new Wi.GraphQLObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInterfaceType)(e))return new Wi.GraphQLInterfaceType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isUnionType)(e))return new Wi.GraphQLUnionType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isInputObjectType)(e))return new Wi.GraphQLInputObjectType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isEnumType)(e))return new Wi.GraphQLEnumType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));if((0,Wi.isScalarType)(e))return new Wi.GraphQLScalarType($(k({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:$(k({},e.astNode),{name:$(k({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>$(k({},n),{name:$(k({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}});var iM=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.updateArgument=qne;XT.createVariableNameGenerator=Vne;var wc=Ie(),xne=UT();function qne(e,t,n,r,i,a,o){if(e[r]={kind:wc.Kind.ARGUMENT,name:{kind:wc.Kind.NAME,value:r},value:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}}},t[i]={kind:wc.Kind.VARIABLE_DEFINITION,variable:{kind:wc.Kind.VARIABLE,name:{kind:wc.Kind.NAME,value:i}},type:(0,xne.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}function Vne(e){let t=0;return n=>{let r;do r=t===0?n:`_v${t.toString()}_${n}`,t++;while(r in e);return r}}});var aM=w(oS=>{"use strict";m();T();N();Object.defineProperty(oS,"__esModule",{value:!0});oS.implementsAbstractType=jne;var sS=Ie();function jne(e,t,n){return n==null||t==null?!1:t===n?!0:(0,sS.isCompositeType)(t)&&(0,sS.isCompositeType)(n)?(0,sS.doTypesOverlap)(e,t,n):!1}});var oM=w(uS=>{"use strict";m();T();N();Object.defineProperty(uS,"__esModule",{value:!0});uS.observableToAsyncIterable=Kne;var sM=Jf();function Kne(e){let t=[],n=[],r=!0,i=p=>{t.length!==0?t.shift()({value:p,done:!1}):n.push({value:p,done:!1})},a=p=>{t.length!==0?t.shift()({value:{errors:[p]},done:!1}):n.push({value:{errors:[p]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},u=()=>new Promise(p=>{if(n.length!==0){let E=n.shift();p(E)}else t.push(p)}),l=e.subscribe({next(p){return i(p)},error(p){return a(p)},complete(){return o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let p of t)p({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?u():this.return()},return(){return d(),(0,sM.fakePromise)({value:void 0,done:!0})},throw(p){return d(),(0,sM.fakeRejectPromise)(p)},[Symbol.asyncIterator](){return this}}}});var uM=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.AccumulatorMap=void 0;var cS=class extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){let r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}};ZT.AccumulatorMap=cS});var lS=w(rd=>{"use strict";m();T();N();Object.defineProperty(rd,"__esModule",{value:!0});rd.GraphQLStreamDirective=rd.GraphQLDeferDirective=void 0;var Xi=Ie();rd.GraphQLDeferDirective=new Xi.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FRAGMENT_SPREAD,Xi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"}}});rd.GraphQLStreamDirective=new Xi.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Xi.DirectiveLocation.FIELD],args:{if:{type:new Xi.GraphQLNonNull(Xi.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Xi.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Xi.GraphQLInt,description:"Number of items to return immediately"}}})});var pS=w(Bs=>{"use strict";m();T();N();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.collectSubFields=void 0;Bs.collectFields=Qne;Bs.shouldIncludeNode=eE;Bs.doesFragmentConditionMatch=dS;Bs.getFieldEntryKey=cM;Bs.getDeferValues=fS;var ns=Ie(),tE=uM(),$ne=lS(),Gne=Ru();function id(e,t,n,r,i,a,o,u){for(let l of i.selections)switch(l.kind){case ns.Kind.FIELD:{if(!eE(n,l))continue;a.add(cM(l),l);break}case ns.Kind.INLINE_FRAGMENT:{if(!eE(n,l)||!dS(e,l,r))continue;let d=fS(n,l);if(d){let p=new tE.AccumulatorMap;id(e,t,n,r,l.selectionSet,p,o,u),o.push({label:d.label,fields:p})}else id(e,t,n,r,l.selectionSet,a,o,u);break}case ns.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!eE(n,l))continue;let p=fS(n,l);if(u.has(d)&&!p)continue;let E=t[d];if(!E||!dS(e,E,r))continue;if(p||u.add(d),p){let I=new tE.AccumulatorMap;id(e,t,n,r,E.selectionSet,I,o,u),o.push({label:p.label,fields:I})}else id(e,t,n,r,E.selectionSet,a,o,u);break}}}function Qne(e,t,n,r,i){let a=new tE.AccumulatorMap,o=[];return id(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}function eE(e,t){let n=(0,ns.getDirectiveValues)(ns.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,ns.getDirectiveValues)(ns.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function dS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,ns.typeFromAST)(e,r);return i===n?!0:(0,ns.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}function cM(e){return e.alias?e.alias.value:e.name.value}function fS(e,t){let n=(0,ns.getDirectiveValues)($ne.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Bs.collectSubFields=(0,Gne.memoize5)(function(t,n,r,i,a){let o=new tE.AccumulatorMap,u=new Set,l=[],d={fields:o,patches:l};for(let p of a)p.selectionSet&&id(t,n,r,i,p.selectionSet,o,l,u);return d})});var mS=w(rp=>{"use strict";m();T();N();Object.defineProperty(rp,"__esModule",{value:!0});rp.getOperationASTFromRequest=void 0;rp.getOperationASTFromDocument=lM;var Yne=Ie(),Jne=Ru();function lM(e,t){let n=(0,Yne.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}rp.getOperationASTFromRequest=(0,Jne.memoize1)(function(t){return lM(t.document,t.operationName)})});var pM=w(ip=>{"use strict";m();T();N();Object.defineProperty(ip,"__esModule",{value:!0});ip.visitData=TS;ip.visitErrors=zne;ip.visitResult=Wne;var Pu=Ie(),NS=pS(),Hne=mS();function TS(e,t,n){if(Array.isArray(e))return e.map(r=>TS(r,t,n));if(typeof e=="object"){let r=t!=null?t(e):e;if(r!=null)for(let i in r){let a=r[i];Object.defineProperty(r,i,{value:TS(a,t,n)})}return n!=null?n(r):r}return e}function zne(e,t){return e.map(n=>t(n))}function Wne(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===Pu.Kind.FRAGMENT_DEFINITION&&(I[v.name.value]=v),I),{}),o=t.variables||{},u={segmentInfoMap:new Map,unpathedErrors:new Set},l=e.data,d=e.errors,p=d!=null&&i!=null,E=(0,Hne.getOperationASTFromRequest)(t);return l!=null&&E!=null&&(e.data=ere(l,E,n,a,o,r,p?d:void 0,u)),d!=null&&i&&(e.errors=Xne(d,i,u)),e}function Xne(e,t,n){let r=n.segmentInfoMap,i=n.unpathedErrors,a=t.__unpathed;return e.map(o=>{let u=r.get(o),l=u==null?o:u.reduceRight((d,p)=>{let E=p.type.name,I=t[E];if(I==null)return d;let v=I[p.fieldName];return v==null?d:v(d,p.pathIndex)},o);return a&&i.has(o)?a(l):l})}function Zne(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function ere(e,t,n,r,i,a,o,u){let l=Zne(n,t),{fields:d}=(0,NS.collectFields)(n,r,i,l,t.selectionSet);return ES(e,l,d,n,r,i,a,0,o,u)}function ES(e,t,n,r,i,a,o,u,l,d){var ee;let p=t.getFields(),E=o==null?void 0:o[t.name],I=E==null?void 0:E.__enter,v=I!=null?I(e):e,A,U=null;if(l!=null){A=nre(l,u),U=A.errorMap;for(let ne of A.unpathedErrors)d.unpathedErrors.add(ne)}for(let[ne,pe]of n){let le=pe[0].name.value,Ae=(ee=p[le])==null?void 0:ee.type;if(Ae==null)switch(le){case"__typename":Ae=Pu.TypeNameMetaFieldDef.type;break;case"__schema":Ae=Pu.SchemaMetaFieldDef.type;break;case"__type":Ae=Pu.TypeMetaFieldDef.type;break}let Me=u+1,Ze;U&&(Ze=U[ne],Ze!=null&&delete U[ne],rre(t,le,Me,Ze,d));let Z=fM(e[ne],Ae,pe,r,i,a,o,Me,Ze,d);dM(v,ne,Z,E,le)}let j=v.__typename;if(j!=null&&dM(v,"__typename",j,E,"__typename"),U)for(let ne in U){let pe=U[ne];for(let le of pe)d.unpathedErrors.add(le)}let Q=E==null?void 0:E.__leave;return Q!=null?Q(v):v}function dM(e,t,n,r,i){if(r==null){e[t]=n;return}let a=r[i];if(a==null){e[t]=n;return}let o=a(n);if(o===void 0){delete e[t];return}e[t]=o}function tre(e,t,n,r,i,a,o,u,l,d){return e.map(p=>fM(p,t,n,r,i,a,o,u+1,l,d))}function fM(e,t,n,r,i,a,o,u,l=[],d){if(e==null)return e;let p=(0,Pu.getNullableType)(t);if((0,Pu.isListType)(p))return tre(e,p.ofType,n,r,i,a,o,u,l,d);if((0,Pu.isAbstractType)(p)){let v=r.getType(e.__typename),{fields:A,patches:U}=(0,NS.collectSubFields)(r,i,a,v,n);if(U.length){A=new Map(A);for(let j of U)for(let[Q,ee]of j.fields){let ne=A.get(Q);ne?ne.push(...ee):A.set(Q,ee)}}return ES(e,v,A,r,i,a,o,u,l,d)}else if((0,Pu.isObjectType)(p)){let{fields:v,patches:A}=(0,NS.collectSubFields)(r,i,a,p,n);if(A.length){v=new Map(v);for(let U of A)for(let[j,Q]of U.fields){let ee=v.get(j);ee?ee.push(...Q):v.set(j,Q)}}return ES(e,p,v,r,i,a,o,u,l,d)}let E=o==null?void 0:o[p.name];if(E==null)return e;let I=E(e);return I===void 0?e:I}function nre(e,t){var i;let n=Object.create(null),r=new Set;for(let a of e){let o=(i=a.path)==null?void 0:i[t];if(o==null){r.add(a);continue}o in n?n[o].push(a):n[o]=[a]}return{errorMap:n,unpathedErrors:r}}function rre(e,t,n,r=[],i){for(let a of r){let o={type:e,fieldName:t,pathIndex:n},u=i.segmentInfoMap.get(a);u==null?i.segmentInfoMap.set(a,[o]):u.push(o)}}});var mM=w(yS=>{"use strict";m();T();N();Object.defineProperty(yS,"__esModule",{value:!0});yS.valueMatchesCriteria=hS;function hS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>hS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>hS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}});var NM=w(IS=>{"use strict";m();T();N();Object.defineProperty(IS,"__esModule",{value:!0});IS.isAsyncIterable=ire;function ire(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}});var TM=w(gS=>{"use strict";m();T();N();Object.defineProperty(gS,"__esModule",{value:!0});gS.isDocumentNode=sre;var are=Ie();function sre(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===are.Kind.DOCUMENT}});var EM=w(()=>{"use strict";m();T();N()});var gM=w(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});ap.getAsyncIteratorWithCancel=yM;ap.getAsyncIterableWithCancel=IM;ap.withCancel=IM;var ore=Ru();function ure(e){return wi(this,null,function*(){return{value:e,done:!0}})}var hM=(0,ore.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yM(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,i){let a=Reflect.get(n,r,i);if(r==="return"){let o=a||ure;return function(l){return wi(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hM(n,a);return a}})}function IM(e,t){return new Proxy(e,{get(n,r,i){let a=Reflect.get(n,r,i);return Symbol.asyncIterator===r?function(){let u=Reflect.apply(a,n,[]);return yM(u,t)}:typeof a=="function"?hM(n,a):a}})}});var _M=w(_S=>{"use strict";m();T();N();Object.defineProperty(_S,"__esModule",{value:!0});_S.fixSchemaAst=fre;var cre=Ie(),lre=bO();function dre(e,t){let n=(0,lre.getDocumentNodeFromSchema)(e);return(0,cre.buildASTSchema)(n,k({},t||{}))}function fre(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=dre(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}});var vM=w(vS=>{"use strict";m();T();N();Object.defineProperty(vS,"__esModule",{value:!0});vS.extractExtensionsFromSchema=Nre;var pre=Yl(),Us=Rc(),mre=td();function _a(e,t){e=e||{};let a=e,{directives:n}=a,r=GR(a,["directives"]),i=k({},r);if(!t&&n!=null){let o={};for(let u in n)o[u]=[...(0,pre.asArray)(n[u])];i.directives=o}return i}function Nre(e,t=!1){let n={schemaExtensions:_a(e.extensions,t),types:{}};return(0,mre.mapSchema)(e,{[Us.MapperKind.OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"object",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INTERFACE_TYPE]:r=>(n.types[r.name]={fields:{},type:"interface",extensions:_a(r.extensions,t)},r),[Us.MapperKind.FIELD]:(r,i,a)=>{n.types[a].fields[i]={arguments:{},extensions:_a(r.extensions,t)};let o=r.args;if(o!=null)for(let u in o)n.types[a].fields[i].arguments[u]=_a(o[u].extensions,t);return r},[Us.MapperKind.ENUM_TYPE]:r=>(n.types[r.name]={values:{},type:"enum",extensions:_a(r.extensions,t)},r),[Us.MapperKind.ENUM_VALUE]:(r,i,a,o)=>(n.types[i].values[o]=_a(r.extensions,t),r),[Us.MapperKind.SCALAR_TYPE]:r=>(n.types[r.name]={type:"scalar",extensions:_a(r.extensions,t)},r),[Us.MapperKind.UNION_TYPE]:r=>(n.types[r.name]={type:"union",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_TYPE]:r=>(n.types[r.name]={fields:{},type:"input",extensions:_a(r.extensions,t)},r),[Us.MapperKind.INPUT_OBJECT_FIELD]:(r,i,a)=>(n.types[a].fields[i]={extensions:_a(r.extensions,t)},r)}),n}});var OM=w(sp=>{"use strict";m();T();N();Object.defineProperty(sp,"__esModule",{value:!0});sp.addPath=Tre;sp.pathToArray=Ere;sp.printPathArray=hre;function Tre(e,t,n){return{prev:e,key:t,typename:n}}function Ere(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function hre(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var DM=w(SS=>{"use strict";m();T();N();Object.defineProperty(SS,"__esModule",{value:!0});SS.mergeIncrementalResult=SM;var yre=nS();function SM({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)OS(t,n,i),n[n.length-1]++;e.data&&OS(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&OS(t,["extensions"],e.extensions),e.incremental&&e.incremental.forEach(i=>{SM({incrementalResult:i,executionResult:t})})}function OS(e,t,n){let r=e,i;for(i=0;i{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.debugTimerStart=Ire;nE.debugTimerEnd=gre;var bM=new Set;function Ire(e){var n,r;let t=((r=(n=globalThis.process)==null?void 0:n.env)==null?void 0:r.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(bM.add(e),console.time(e))}function gre(e){bM.has(e)&&console.timeEnd(e)}});var FM=w(op=>{"use strict";m();T();N();Object.defineProperty(op,"__esModule",{value:!0});op.getAbortPromise=void 0;op.registerAbortSignalListener=PM;var _re=Jf(),RM=Ru(),vre=(0,RM.memoize1)(function(t){let n=new Set;return t.addEventListener("abort",r=>{for(let i of n)i(r)},{once:!0}),n});function PM(e,t){if(e.aborted){t();return}vre(e).add(t)}op.getAbortPromise=(0,RM.memoize1)(function(t){return t.aborted?(0,_re.fakeRejectPromise)(t.reason):new Promise((n,r)=>{if(t.aborted){r(t.reason);return}PM(t,()=>{r(t.reason)})})})});var va=w(we=>{"use strict";m();T();N();Object.defineProperty(we,"__esModule",{value:!0});we.createDeferred=we.fakePromise=we.mapMaybePromise=we.mapAsyncIterator=we.inspect=void 0;var Qe=(BU(),Gm(CU));Qe.__exportStar(UU(),we);Qe.__exportStar(Yl(),we);Qe.__exportStar(lO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(HU(),we);Qe.__exportStar(TO(),we);Qe.__exportStar(bO(),we);Qe.__exportStar(fO(),we);Qe.__exportStar(pk(),we);Qe.__exportStar(mk(),we);Qe.__exportStar(bk(),we);Qe.__exportStar(Bk(),we);Qe.__exportStar(kk(),we);Qe.__exportStar($k(),we);Qe.__exportStar(Qk(),we);Qe.__exportStar(Yk(),we);Qe.__exportStar(Hk(),we);Qe.__exportStar(zk(),we);Qe.__exportStar(td(),we);Qe.__exportStar(ZO(),we);Qe.__exportStar(jT(),we);Qe.__exportStar(Xk(),we);Qe.__exportStar(nS(),we);Qe.__exportStar(Rc(),we);Qe.__exportStar(xO(),we);Qe.__exportStar(eM(),we);Qe.__exportStar(tM(),we);Qe.__exportStar(nM(),we);Qe.__exportStar(rM(),we);Qe.__exportStar(VO(),we);Qe.__exportStar(iM(),we);Qe.__exportStar(UT(),we);Qe.__exportStar(aM(),we);Qe.__exportStar(PT(),we);Qe.__exportStar(oM(),we);Qe.__exportStar(pM(),we);Qe.__exportStar(oO(),we);Qe.__exportStar(mM(),we);Qe.__exportStar(NM(),we);Qe.__exportStar(TM(),we);Qe.__exportStar(Hf(),we);Qe.__exportStar(EM(),we);Qe.__exportStar(gM(),we);Qe.__exportStar(Wf(),we);Qe.__exportStar(PO(),we);Qe.__exportStar(pS(),we);var Ore=Yf();Object.defineProperty(we,"inspect",{enumerable:!0,get:function(){return Ore.inspect}});Qe.__exportStar(Ru(),we);Qe.__exportStar(_M(),we);Qe.__exportStar(mS(),we);Qe.__exportStar(vM(),we);Qe.__exportStar(OM(),we);Qe.__exportStar(LT(),we);Qe.__exportStar(lS(),we);Qe.__exportStar(DM(),we);Qe.__exportStar(AM(),we);Qe.__exportStar(cO(),we);var rE=Jf();Object.defineProperty(we,"mapAsyncIterator",{enumerable:!0,get:function(){return rE.mapAsyncIterator}});Object.defineProperty(we,"mapMaybePromise",{enumerable:!0,get:function(){return rE.mapMaybePromise}});Object.defineProperty(we,"fakePromise",{enumerable:!0,get:function(){return rE.fakePromise}});Object.defineProperty(we,"createDeferred",{enumerable:!0,get:function(){return rE.createDeferredPromise}});Qe.__exportStar(FM(),we)});var LM=w(iE=>{"use strict";m();T();N();Object.defineProperty(iE,"__esModule",{value:!0});iE.mergeResolvers=void 0;var Sre=va();function wM(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};let n=new Array;for(let i of e)Array.isArray(i)&&(i=wM(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Sre.mergeDeep)(n,!0);if(t!=null&&t.exclusions)for(let i of t.exclusions){let[a,o]=i.split(".");!o||o==="*"?delete r[a]:r[a]&&delete r[a][o]}return r}iE.mergeResolvers=wM});var DS=w(aE=>{"use strict";m();T();N();Object.defineProperty(aE,"__esModule",{value:!0});aE.mergeArguments=void 0;var CM=va();function Dre(e,t,n){let r=bre([...t,...e].filter(CM.isSome),n);return n&&n.sort&&r.sort(CM.compareNodes),r}aE.mergeArguments=Dre;function bre(e,t){return e.reduce((n,r)=>{let i=n.findIndex(a=>a.name.value===r.name.value);return i===-1?n.concat([r]):(t!=null&&t.reverseArguments||(n[i]=r),n)},[])}});var Zi=w(ad=>{"use strict";m();T();N();Object.defineProperty(ad,"__esModule",{value:!0});ad.mergeDirective=ad.mergeDirectives=void 0;var BM=Ie(),Are=va();function Rre(e,t){return!!e.find(n=>n.name.value===t.name.value)}function UM(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function Pre(e,t){return t.some(({value:n})=>n===e.value)}function kM(e,t){let n=[...t];for(let r of e){let i=n.findIndex(a=>a.name.value===r.name.value);if(i>-1){let a=n[i];if(a.value.kind==="ListValue"){let o=a.value.values,u=r.value.values;a.value.values=Bre(o,u,(l,d)=>{let p=l.value;return!p||!d.some(E=>E.value===p)})}else a.value=r.value}else n.push(r)}return n}function Fre(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!UM(n,t)){let o=i[a];return n.arguments=kM(n.arguments,o.arguments),null}return n}).filter(Are.isSome)}function wre(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,u=Fre([...a],r);for(let l of o)if(Rre(u,l)&&!UM(l,r)){let d=u.findIndex(E=>E.name.value===l.name.value),p=u[d];u[d].arguments=kM(l.arguments||[],p.arguments||[])}else u.push(l);return u}ad.mergeDirectives=wre;function Lre(e,t){let n=(0,BM.print)($(k({},e),{description:void 0})),r=(0,BM.print)($(k({},t),{description:void 0})),i=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(n.replace(i,"")===r.replace(i,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". Existing directive: ${r} Received directive: - ${n}`)}function Lre(e,t){return t?(wre(e,t),$(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!Rre(n,t.locations))]})):e}ad.mergeDirective=Lre;function Cre(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var bS=w(sE=>{"use strict";m();T();N();Object.defineProperty(sE,"__esModule",{value:!0});sE.mergeEnumValues=void 0;var Bre=Xi(),Ure=_a();function kre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let u=o.name.value;if(i.has(u)){let l=i.get(u);l.description=o.description||l.description,l.directives=(0,Bre.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let a=[...i.values()];return n&&n.sort&&a.sort(Ure.compareNodes),a}sE.mergeEnumValues=kre});var AS=w(oE=>{"use strict";m();T();N();Object.defineProperty(oE,"__esModule",{value:!0});oE.mergeEnum=void 0;var Mre=Ie(),xre=Xi(),qre=bS();function Vre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,xre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,qre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:Mre.Kind.ENUM_TYPE_DEFINITION}):e}oE.mergeEnum=Vre});var uE=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var up=Ie();function jre(e){return typeof e=="string"}Kn.isStringTypes=jre;function Kre(e){return e instanceof up.Source}Kn.isSourceTypes=Kre;function $re(e){let t=e;for(;t.kind===up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=$re;function Gre(e){return e.kind!==up.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=Gre;function MM(e){return e.kind===up.Kind.LIST_TYPE}Kn.isListTypeNode=MM;function xM(e){return e.kind===up.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=xM;function RS(e){return MM(e)?`[${RS(e.type)}]`:xM(e)?`${RS(e.type)}!`:e.name.value}Kn.printTypeNode=RS;var Lc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Lc=Kn.CompareVal||(Kn.CompareVal={}));function Qre(e,t){return e==null&&t==null?Lc.A_EQUALS_B:e==null?Lc.A_SMALLER_THAN_B:t==null?Lc.A_GREATER_THAN_B:et?Lc.A_GREATER_THAN_B:Lc.A_EQUALS_B}Kn.defaultStringComparator=Qre});var lp=w(cE=>{"use strict";m();T();N();Object.defineProperty(cE,"__esModule",{value:!0});cE.mergeFields=void 0;var ri=uE(),Yre=Xi(),Jre=_a(),Hre=DS();function zre(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Wre(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[u,l]=zre(a,o);if(u&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(u,o,e,r==null?void 0:r.throwOnConflict)||Xre(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Hre.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,Yre.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(Jre.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return a}cE.mergeFields=Wre;function Xre(e,t,n,r=!1){let i=(0,ri.printTypeNode)(t.type),a=(0,ri.printTypeNode)(n.type);if(i!==a){let o=(0,ri.extractType)(t.type),u=(0,ri.extractType)(n.type);if(o.name.value!==u.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${u.name.value}"`);if(!cp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ri.isNonNullTypeNode)(n.type)&&!(0,ri.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function cp(e,t,n=!1){if(!(0,ri.isWrappingTypeNode)(e)&&!(0,ri.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ri.isNonNullTypeNode)(t)){let r=(0,ri.isNonNullTypeNode)(e)?e.type:e;return cp(r,t.type)}return(0,ri.isNonNullTypeNode)(e)?cp(t,e,n):(0,ri.isListTypeNode)(e)?(0,ri.isListTypeNode)(t)&&cp(e.type,t.type)||(0,ri.isNonNullTypeNode)(t)&&cp(e,t.type):!1}});var PS=w(lE=>{"use strict";m();T();N();Object.defineProperty(lE,"__esModule",{value:!0});lE.mergeInputType=void 0;var Zre=Ie(),eie=lp(),tie=Xi();function nie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,eie.mergeFields)(e,e.fields,t.fields,n),directives:(0,tie.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:Zre.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}lE.mergeInputType=nie});var dp=w(dE=>{"use strict";m();T();N();Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeNamedTypeArray=void 0;var rie=_a();function iie(e,t){return!!e.find(n=>n.name.value===t.name.value)}function aie(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!iie(t,i))];return n&&n.sort&&r.sort(rie.compareNodes),r}dE.mergeNamedTypeArray=aie});var FS=w(fE=>{"use strict";m();T();N();Object.defineProperty(fE,"__esModule",{value:!0});fE.mergeInterface=void 0;var sie=Ie(),oie=lp(),uie=Xi(),cie=dp();function lie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,oie.mergeFields)(e,e.fields,t.fields,n),directives:(0,uie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,cie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:sie.Kind.INTERFACE_TYPE_DEFINITION}):e}fE.mergeInterface=lie});var wS=w(pE=>{"use strict";m();T();N();Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeType=void 0;var die=Ie(),fie=lp(),pie=Xi(),mie=dp();function Nie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,fie.mergeFields)(e,e.fields,t.fields,n),directives:(0,pie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,mie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:die.Kind.OBJECT_TYPE_DEFINITION}):e}pE.mergeType=Nie});var LS=w(mE=>{"use strict";m();T();N();Object.defineProperty(mE,"__esModule",{value:!0});mE.mergeScalar=void 0;var Tie=Ie(),Eie=Xi();function hie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,Eie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?$(k({},e),{kind:Tie.Kind.SCALAR_TYPE_DEFINITION}):e}mE.mergeScalar=hie});var BS=w(NE=>{"use strict";m();T();N();Object.defineProperty(NE,"__esModule",{value:!0});NE.mergeUnion=void 0;var CS=Ie(),yie=Xi(),Iie=dp();function gie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,yie.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?CS.Kind.UNION_TYPE_DEFINITION:CS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,Iie.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:CS.Kind.UNION_TYPE_DEFINITION}):e}NE.mergeUnion=gie});var US=w(Cc=>{"use strict";m();T();N();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.mergeSchemaDefs=Cc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var fp=Ie(),_ie=Xi();Cc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function vie(e=[],t=[]){let n=[];for(let r in Cc.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function Oie(e,t,n,r){return t?{kind:e.kind===fp.Kind.SCHEMA_DEFINITION||t.kind===fp.Kind.SCHEMA_DEFINITION?fp.Kind.SCHEMA_DEFINITION:fp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,_ie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:vie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?$(k({},e),{kind:fp.Kind.SCHEMA_DEFINITION}):e}Cc.mergeSchemaDefs=Oie});var kS=w(ns=>{"use strict";m();T();N();Object.defineProperty(ns,"__esModule",{value:!0});ns.mergeGraphQLNodes=ns.isNamedDefinitionNode=ns.schemaDefSymbol=void 0;var Kr=Ie(),Sie=wS(),Die=AS(),bie=LS(),Aie=BS(),Rie=PS(),Pie=FS(),Fie=Xi(),wie=US(),Lie=_a();ns.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function qM(e){return"name"in e}ns.isNamedDefinitionNode=qM;function Cie(e,t,n={}){var i,a,o;let r=n;for(let u of e)if(qM(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Lie.collectComment)(u),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Kr.Kind.OBJECT_TYPE_DEFINITION:case Kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Sie.mergeType)(u,r[l],t,n);break;case Kr.Kind.ENUM_TYPE_DEFINITION:case Kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,Die.mergeEnum)(u,r[l],t,n);break;case Kr.Kind.UNION_TYPE_DEFINITION:case Kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Aie.mergeUnion)(u,r[l],t,n);break;case Kr.Kind.SCALAR_TYPE_DEFINITION:case Kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,bie.mergeScalar)(u,r[l],t,n);break;case Kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,Rie.mergeInputType)(u,r[l],t,n);break;case Kr.Kind.INTERFACE_TYPE_DEFINITION:case Kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Pie.mergeInterface)(u,r[l],t,n);break;case Kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,Fie.mergeDirective)(u,r[l]);break}}else(u.kind===Kr.Kind.SCHEMA_DEFINITION||u.kind===Kr.Kind.SCHEMA_EXTENSION)&&(r[ns.schemaDefSymbol]=(0,wie.mergeSchemaDefs)(u,r[ns.schemaDefSymbol],t));return r}ns.mergeGraphQLNodes=Cie});var KM=w(cd=>{"use strict";m();T();N();Object.defineProperty(cd,"__esModule",{value:!0});cd.mergeGraphQLTypes=cd.mergeTypeDefs=void 0;var Zi=Ie(),MS=uE(),sd=kS(),ud=_a(),VM=US();function Bie(e,t){(0,ud.resetComments)();let n={kind:Zi.Kind.DOCUMENT,definitions:jM(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,ud.printWithComments)(n):r=n,(0,ud.resetComments)(),r}cd.mergeTypeDefs=Bie;function od(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")od(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)od(a,t,n,r,i);else if((0,Zi.isSchema)(e)){let a=(0,ud.getDocumentNodeFromSchema)(e,t);od(a.definitions,t,n,r,i)}else if((0,MS.isStringTypes)(e)||(0,MS.isSourceTypes)(e)){let a=(0,Zi.parse)(e,t);od(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,Zi.isDefinitionNode)(e))e.kind===Zi.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,ud.isDocumentNode)(e))od(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function jM(e,t){var u,l,d;(0,ud.resetComments)();let{allDirectives:n,allNodes:r}=od(e,t),i=(0,sd.mergeGraphQLNodes)(n,t),a=(0,sd.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[sd.schemaDefSymbol]||{kind:Zi.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in VM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=VM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:Zi.Kind.OPERATION_TYPE_DEFINITION,type:{kind:Zi.Kind.NAMED_TYPE,name:U.name},operation:I})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(a[sd.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[sd.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[sd.schemaDefSymbol]={kind:Zi.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:Zi.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:Zi.Kind.NAMED_TYPE,name:{kind:Zi.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:MS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}cd.mergeGraphQLTypes=jM});var $M=w(Br=>{"use strict";m();T();N();Object.defineProperty(Br,"__esModule",{value:!0});var ii=(Xv(),Gm(Wv));ii.__exportStar(DS(),Br);ii.__exportStar(Xi(),Br);ii.__exportStar(bS(),Br);ii.__exportStar(AS(),Br);ii.__exportStar(lp(),Br);ii.__exportStar(PS(),Br);ii.__exportStar(FS(),Br);ii.__exportStar(dp(),Br);ii.__exportStar(kS(),Br);ii.__exportStar(KM(),Br);ii.__exportStar(LS(),Br);ii.__exportStar(wS(),Br);ii.__exportStar(BS(),Br);ii.__exportStar(uE(),Br)});var QM=w(Fu=>{"use strict";m();T();N();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.applyExtensions=Fu.mergeExtensions=Fu.extractExtensionsFromSchema=void 0;var GM=_a(),Uie=_a();Object.defineProperty(Fu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Uie.extractExtensionsFromSchema}});function kie(e){return(0,GM.mergeDeep)(e)}Fu.mergeExtensions=kie;function ld(e,t){e&&(e.extensions=(0,GM.mergeDeep)([e.extensions||{},t||{}]))}function Mie(e,t){ld(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(ld(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];if(u){ld(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))ld(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];ld(u,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let u=i.getValue(a);ld(u,o)}}}return e}Fu.applyExtensions=Mie});var TE=w(pp=>{"use strict";m();T();N();Object.defineProperty(pp,"__esModule",{value:!0});var xS=(Xv(),Gm(Wv));xS.__exportStar(LM(),pp);xS.__exportStar($M(),pp);xS.__exportStar(QM(),pp)});var Ki=w(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=Vie;z.incompatibleInputValueDefaultValueTypeError=jie;z.incompatibleMergedTypesError=Kie;z.incompatibleInputValueDefaultValuesError=$ie;z.incompatibleSharedEnumError=Gie;z.invalidSubgraphNamesError=Qie;z.duplicateDirectiveDefinitionError=Yie;z.duplicateEnumValueDefinitionError=Jie;z.duplicateFieldDefinitionError=Hie;z.duplicateInputFieldDefinitionError=zie;z.duplicateImplementedInterfaceError=Wie;z.duplicateUnionMemberDefinitionError=Xie;z.duplicateTypeDefinitionError=Zie;z.duplicateOperationTypeDefinitionError=eae;z.noBaseDefinitionForExtensionError=tae;z.noBaseScalarDefinitionError=nae;z.noDefinedUnionMembersError=rae;z.noDefinedEnumValuesError=iae;z.operationDefinitionError=aae;z.invalidFieldShareabilityError=sae;z.undefinedDirectiveError=oae;z.undefinedTypeError=uae;z.invalidRepeatedDirectiveErrorMessage=cae;z.invalidDirectiveError=lae;z.invalidRepeatedFederatedDirectiveErrorMessage=dae;z.invalidDirectiveLocationErrorMessage=fae;z.undefinedRequiredArgumentsErrorMessage=pae;z.unexpectedDirectiveArgumentErrorMessage=mae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Nae;z.invalidArgumentValueErrorMessage=Tae;z.maximumTypeNestingExceededError=Eae;z.unexpectedKindFatalError=hae;z.incompatibleParentKindFatalError=yae;z.unexpectedEdgeFatalError=Iae;z.incompatibleParentTypeMergeError=_ae;z.unexpectedTypeNodeKindFatalError=vae;z.invalidKeyFatalError=Oae;z.unexpectedParentKindForChildError=Sae;z.subgraphValidationError=Dae;z.invalidSubgraphNameErrorMessage=bae;z.invalidOperationTypeDefinitionError=Aae;z.invalidRootTypeDefinitionError=Rae;z.subgraphInvalidSyntaxError=Pae;z.invalidInterfaceImplementationError=Fae;z.invalidRequiredInputValueError=wae;z.duplicateArgumentsError=Lae;z.noQueryRootTypeError=Cae;z.expectedEntityError=Bae;z.abstractTypeInKeyFieldSetErrorMessage=Uae;z.unknownTypeInFieldSetErrorMessage=kae;z.invalidSelectionSetErrorMessage=Mae;z.invalidSelectionSetDefinitionErrorMessage=xae;z.undefinedFieldInFieldSetErrorMessage=qae;z.unparsableFieldSetErrorMessage=Vae;z.unparsableFieldSetSelectionErrorMessage=jae;z.undefinedCompositeOutputTypeError=Kae;z.unexpectedArgumentErrorMessage=$ae;z.argumentsInKeyFieldSetErrorMessage=Gae;z.invalidProvidesOrRequiresDirectivesError=Qae;z.duplicateFieldInFieldSetErrorMessage=Yae;z.invalidConfigurationDataErrorMessage=Jae;z.incompatibleTypeWithProvidesErrorMessage=Hae;z.invalidInlineFragmentTypeErrorMessage=zae;z.inlineFragmentWithoutTypeConditionErrorMessage=Wae;z.unknownInlineFragmentTypeConditionErrorMessage=Xae;z.invalidInlineFragmentTypeConditionTypeErrorMessage=Zae;z.invalidInlineFragmentTypeConditionErrorMessage=ese;z.invalidSelectionOnUnionErrorMessage=tse;z.duplicateOverriddenFieldErrorMessage=nse;z.duplicateOverriddenFieldsError=rse;z.noFieldDefinitionsError=ise;z.noInputValueDefinitionsError=ase;z.allChildDefinitionsAreInaccessibleError=sse;z.equivalentSourceAndTargetOverrideErrorMessage=ose;z.undefinedEntityInterfaceImplementationsError=use;z.orScopesLimitError=cse;z.invalidEventDrivenGraphError=lse;z.invalidRootTypeFieldEventsDirectivesErrorMessage=dse;z.invalidEventDrivenMutationResponseTypeErrorMessage=fse;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=pse;z.invalidNatsStreamInputFieldsErrorMessage=mse;z.invalidKeyFieldSetsEventDrivenErrorMessage=Nse;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Tse;z.nonKeyFieldNamesEventDrivenErrorMessage=Ese;z.nonEntityObjectExtensionsEventDrivenErrorMessage=hse;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=yse;z.invalidEdfsDirectiveName=Ise;z.invalidImplementedTypeError=gse;z.selfImplementationError=_se;z.invalidEventSubjectErrorMessage=vse;z.invalidEventSubjectsErrorMessage=Ose;z.invalidEventSubjectsItemErrorMessage=Sse;z.invalidEventSubjectsArgumentErrorMessage=Dse;z.undefinedEventSubjectsArgumentErrorMessage=bse;z.invalidEventDirectiveError=Ase;z.invalidReferencesOfInaccessibleTypeError=Rse;z.inaccessibleRequiredInputValueError=Pse;z.invalidUnionMemberTypeError=Fse;z.invalidRootTypeError=wse;z.invalidSubscriptionFilterLocationError=Lse;z.invalidSubscriptionFilterDirectiveError=Cse;z.subscriptionFilterNamedTypeErrorMessage=Bse;z.subscriptionFilterConditionDepthExceededErrorMessage=Use;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=kse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Mse;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=xse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=qse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Vse;z.invalidInputFieldTypeErrorMessage=jse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Kse;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=$se;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Gse;z.unknownFieldSubgraphNameError=Qse;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Yse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Jse;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=Hse;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=zse;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Wse;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Xse;z.unresolvablePathError=Zse;z.allExternalFieldInstancesError=eoe;z.externalInterfaceFieldsError=toe;z.nonExternalConditionalFieldError=noe;z.incompatibleFederatedFieldNamedTypeError=roe;z.unknownNamedTypeErrorMessage=XM;z.unknownNamedTypeError=ioe;z.unknownFieldDataError=aoe;z.unexpectedNonCompositeOutputTypeError=soe;z.invalidExternalDirectiveError=ooe;z.configureDescriptionNoDescriptionError=uoe;z.configureDescriptionPropagationError=coe;z.duplicateDirectiveDefinitionArgumentErrorMessage=loe;z.duplicateDirectiveDefinitionLocationErrorMessage=doe;z.invalidDirectiveDefinitionLocationErrorMessage=foe;z.invalidDirectiveDefinitionError=poe;z.typeNameAlreadyProvidedErrorMessage=moe;z.fieldAlreadyProvidedErrorMessage=Noe;z.invalidInterfaceObjectImplementationDefinitionsError=Toe;z.invalidNamedTypeError=Eoe;z.semanticNonNullLevelsNaNIndexErrorMessage=hoe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=yoe;z.semanticNonNullLevelsNonNullErrorMessage=Ioe;z.semanticNonNullInconsistentLevelsError=goe;z.oneOfRequiredFieldsError=_oe;var YM=Ie(),Ye=zn(),JM=ql(),Bc=wr(),xie=$l(),qie=TE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function Vie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". -However, there must be only one type named "${e}".`)}function jie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function Kie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Ye.FIELD} "${t}": - Expected type "${n}" but received "${e}".`)}function $ie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". + ${n}`)}function Cre(e,t){return t?(Lre(e,t),$(k({},e),{locations:[...t.locations,...e.locations.filter(n=>!Pre(n,t.locations))]})):e}ad.mergeDirective=Cre;function Bre(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var bS=w(sE=>{"use strict";m();T();N();Object.defineProperty(sE,"__esModule",{value:!0});sE.mergeEnumValues=void 0;var Ure=Zi(),kre=va();function Mre(e,t,n,r){if(n!=null&&n.consistentEnumMerge){let o=[];e&&o.push(...e),e=t,t=o}let i=new Map;if(e)for(let o of e)i.set(o.name.value,o);if(t)for(let o of t){let u=o.name.value;if(i.has(u)){let l=i.get(u);l.description=o.description||l.description,l.directives=(0,Ure.mergeDirectives)(o.directives,l.directives,r)}else i.set(u,o)}let a=[...i.values()];return n&&n.sort&&a.sort(kre.compareNodes),a}sE.mergeEnumValues=Mre});var AS=w(oE=>{"use strict";m();T();N();Object.defineProperty(oE,"__esModule",{value:!0});oE.mergeEnum=void 0;var xre=Ie(),qre=Zi(),Vre=bS();function jre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:(0,qre.mergeDirectives)(e.directives,t.directives,n,r),values:(0,Vre.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:xre.Kind.ENUM_TYPE_DEFINITION}):e}oE.mergeEnum=jre});var uE=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.defaultStringComparator=Kn.CompareVal=Kn.printTypeNode=Kn.isNonNullTypeNode=Kn.isListTypeNode=Kn.isWrappingTypeNode=Kn.extractType=Kn.isSourceTypes=Kn.isStringTypes=void 0;var up=Ie();function Kre(e){return typeof e=="string"}Kn.isStringTypes=Kre;function $re(e){return e instanceof up.Source}Kn.isSourceTypes=$re;function Gre(e){let t=e;for(;t.kind===up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Kn.extractType=Gre;function Qre(e){return e.kind!==up.Kind.NAMED_TYPE}Kn.isWrappingTypeNode=Qre;function MM(e){return e.kind===up.Kind.LIST_TYPE}Kn.isListTypeNode=MM;function xM(e){return e.kind===up.Kind.NON_NULL_TYPE}Kn.isNonNullTypeNode=xM;function RS(e){return MM(e)?`[${RS(e.type)}]`:xM(e)?`${RS(e.type)}!`:e.name.value}Kn.printTypeNode=RS;var Lc;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Lc=Kn.CompareVal||(Kn.CompareVal={}));function Yre(e,t){return e==null&&t==null?Lc.A_EQUALS_B:e==null?Lc.A_SMALLER_THAN_B:t==null?Lc.A_GREATER_THAN_B:et?Lc.A_GREATER_THAN_B:Lc.A_EQUALS_B}Kn.defaultStringComparator=Yre});var lp=w(cE=>{"use strict";m();T();N();Object.defineProperty(cE,"__esModule",{value:!0});cE.mergeFields=void 0;var ri=uE(),Jre=Zi(),Hre=va(),zre=DS();function Wre(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Xre(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[u,l]=Wre(a,o);if(u&&!(r!=null&&r.ignoreFieldConflicts)){let d=(r==null?void 0:r.onFieldTypeConflict)&&r.onFieldTypeConflict(u,o,e,r==null?void 0:r.throwOnConflict)||Zre(e,u,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,zre.mergeArguments)(o.arguments||[],u.arguments||[],r),d.directives=(0,Jre.mergeDirectives)(o.directives,u.directives,r,i),d.description=o.description||u.description,a[l]=d}else a.push(o)}if(r&&r.sort&&a.sort(Hre.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(u=>!o.includes(`${e.name.value}.${u.name.value}`))}return a}cE.mergeFields=Xre;function Zre(e,t,n,r=!1){let i=(0,ri.printTypeNode)(t.type),a=(0,ri.printTypeNode)(n.type);if(i!==a){let o=(0,ri.extractType)(t.type),u=(0,ri.extractType)(n.type);if(o.name.value!==u.name.value)throw new Error(`Field "${n.name.value}" already defined with a different type. Declared as "${o.name.value}", but you tried to override with "${u.name.value}"`);if(!cp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,ri.isNonNullTypeNode)(n.type)&&!(0,ri.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function cp(e,t,n=!1){if(!(0,ri.isWrappingTypeNode)(e)&&!(0,ri.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,ri.isNonNullTypeNode)(t)){let r=(0,ri.isNonNullTypeNode)(e)?e.type:e;return cp(r,t.type)}return(0,ri.isNonNullTypeNode)(e)?cp(t,e,n):(0,ri.isListTypeNode)(e)?(0,ri.isListTypeNode)(t)&&cp(e.type,t.type)||(0,ri.isNonNullTypeNode)(t)&&cp(e,t.type):!1}});var PS=w(lE=>{"use strict";m();T();N();Object.defineProperty(lE,"__esModule",{value:!0});lE.mergeInputType=void 0;var eie=Ie(),tie=lp(),nie=Zi();function rie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:(0,tie.mergeFields)(e,e.fields,t.fields,n),directives:(0,nie.mergeDirectives)(e.directives,t.directives,n,r)}}catch(i){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:eie.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}lE.mergeInputType=rie});var dp=w(dE=>{"use strict";m();T();N();Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeNamedTypeArray=void 0;var iie=va();function aie(e,t){return!!e.find(n=>n.name.value===t.name.value)}function sie(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!aie(t,i))];return n&&n.sort&&r.sort(iie.compareNodes),r}dE.mergeNamedTypeArray=sie});var FS=w(fE=>{"use strict";m();T();N();Object.defineProperty(fE,"__esModule",{value:!0});fE.mergeInterface=void 0;var oie=Ie(),uie=lp(),cie=Zi(),lie=dp();function die(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:(0,uie.mergeFields)(e,e.fields,t.fields,n),directives:(0,cie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,lie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n):void 0}}catch(i){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:oie.Kind.INTERFACE_TYPE_DEFINITION}):e}fE.mergeInterface=die});var wS=w(pE=>{"use strict";m();T();N();Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeType=void 0;var fie=Ie(),pie=lp(),mie=Zi(),Nie=dp();function Tie(e,t,n,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:(0,pie.mergeFields)(e,e.fields,t.fields,n),directives:(0,mie.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Nie.mergeNamedTypeArray)(e.interfaces,t.interfaces,n)}}catch(i){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${i.message}`)}return n!=null&&n.convertExtensions?$(k({},e),{kind:fie.Kind.OBJECT_TYPE_DEFINITION}):e}pE.mergeType=Tie});var LS=w(mE=>{"use strict";m();T();N();Object.defineProperty(mE,"__esModule",{value:!0});mE.mergeScalar=void 0;var Eie=Ie(),hie=Zi();function yie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,kind:n!=null&&n.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:(0,hie.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?$(k({},e),{kind:Eie.Kind.SCALAR_TYPE_DEFINITION}):e}mE.mergeScalar=yie});var BS=w(NE=>{"use strict";m();T();N();Object.defineProperty(NE,"__esModule",{value:!0});NE.mergeUnion=void 0;var CS=Ie(),Iie=Zi(),gie=dp();function _ie(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Iie.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?CS.Kind.UNION_TYPE_DEFINITION:CS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,gie.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?$(k({},e),{kind:CS.Kind.UNION_TYPE_DEFINITION}):e}NE.mergeUnion=_ie});var US=w(Cc=>{"use strict";m();T();N();Object.defineProperty(Cc,"__esModule",{value:!0});Cc.mergeSchemaDefs=Cc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var fp=Ie(),vie=Zi();Cc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Oie(e=[],t=[]){let n=[];for(let r in Cc.DEFAULT_OPERATION_TYPE_NAME_MAP){let i=e.find(a=>a.operation===r)||t.find(a=>a.operation===r);i&&n.push(i)}return n}function Sie(e,t,n,r){return t?{kind:e.kind===fp.Kind.SCHEMA_DEFINITION||t.kind===fp.Kind.SCHEMA_DEFINITION?fp.Kind.SCHEMA_DEFINITION:fp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,vie.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Oie(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?$(k({},e),{kind:fp.Kind.SCHEMA_DEFINITION}):e}Cc.mergeSchemaDefs=Sie});var kS=w(rs=>{"use strict";m();T();N();Object.defineProperty(rs,"__esModule",{value:!0});rs.mergeGraphQLNodes=rs.isNamedDefinitionNode=rs.schemaDefSymbol=void 0;var Kr=Ie(),Die=wS(),bie=AS(),Aie=LS(),Rie=BS(),Pie=PS(),Fie=FS(),wie=Zi(),Lie=US(),Cie=va();rs.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function qM(e){return"name"in e}rs.isNamedDefinitionNode=qM;function Bie(e,t,n={}){var i,a,o;let r=n;for(let u of e)if(qM(u)){let l=(i=u.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Cie.collectComment)(u),l==null)continue;if((a=t==null?void 0:t.exclusions)!=null&&a.includes(l+".*")||(o=t==null?void 0:t.exclusions)!=null&&o.includes(l))delete r[l];else switch(u.kind){case Kr.Kind.OBJECT_TYPE_DEFINITION:case Kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,Die.mergeType)(u,r[l],t,n);break;case Kr.Kind.ENUM_TYPE_DEFINITION:case Kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,bie.mergeEnum)(u,r[l],t,n);break;case Kr.Kind.UNION_TYPE_DEFINITION:case Kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,Rie.mergeUnion)(u,r[l],t,n);break;case Kr.Kind.SCALAR_TYPE_DEFINITION:case Kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,Aie.mergeScalar)(u,r[l],t,n);break;case Kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,Pie.mergeInputType)(u,r[l],t,n);break;case Kr.Kind.INTERFACE_TYPE_DEFINITION:case Kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,Fie.mergeInterface)(u,r[l],t,n);break;case Kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,wie.mergeDirective)(u,r[l]);break}}else(u.kind===Kr.Kind.SCHEMA_DEFINITION||u.kind===Kr.Kind.SCHEMA_EXTENSION)&&(r[rs.schemaDefSymbol]=(0,Lie.mergeSchemaDefs)(u,r[rs.schemaDefSymbol],t));return r}rs.mergeGraphQLNodes=Bie});var KM=w(cd=>{"use strict";m();T();N();Object.defineProperty(cd,"__esModule",{value:!0});cd.mergeGraphQLTypes=cd.mergeTypeDefs=void 0;var ea=Ie(),MS=uE(),sd=kS(),ud=va(),VM=US();function Uie(e,t){(0,ud.resetComments)();let n={kind:ea.Kind.DOCUMENT,definitions:jM(e,k({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,ud.printWithComments)(n):r=n,(0,ud.resetComments)(),r}cd.mergeTypeDefs=Uie;function od(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")od(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)od(a,t,n,r,i);else if((0,ea.isSchema)(e)){let a=(0,ud.getDocumentNodeFromSchema)(e,t);od(a.definitions,t,n,r,i)}else if((0,MS.isStringTypes)(e)||(0,MS.isSourceTypes)(e)){let a=(0,ea.parse)(e,t);od(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,ea.isDefinitionNode)(e))e.kind===ea.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,ud.isDocumentNode)(e))od(e.definitions,t,n,r,i);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return{allDirectives:n,allNodes:r}}function jM(e,t){var u,l,d;(0,ud.resetComments)();let{allDirectives:n,allNodes:r}=od(e,t),i=(0,sd.mergeGraphQLNodes)(n,t),a=(0,sd.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let p=a[sd.schemaDefSymbol]||{kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[]},E=p.operationTypes;for(let I in VM.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!E.find(A=>A.operation===I)){let A=VM.DEFAULT_OPERATION_TYPE_NAME_MAP[I],U=a[A];U!=null&&U.name!=null&&E.push({kind:ea.Kind.OPERATION_TYPE_DEFINITION,type:{kind:ea.Kind.NAMED_TYPE,name:U.name},operation:I})}((u=p==null?void 0:p.operationTypes)==null?void 0:u.length)!=null&&p.operationTypes.length>0&&(a[sd.schemaDefSymbol]=p)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[sd.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[sd.schemaDefSymbol]={kind:ea.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:ea.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:ea.Kind.NAMED_TYPE,name:{kind:ea.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let p=typeof t.sort=="function"?t.sort:MS.defaultStringComparator;o.sort((E,I)=>{var v,A;return p((v=E.name)==null?void 0:v.value,(A=I.name)==null?void 0:A.value)})}return o}cd.mergeGraphQLTypes=jM});var $M=w(Br=>{"use strict";m();T();N();Object.defineProperty(Br,"__esModule",{value:!0});var ii=(Xv(),Gm(Wv));ii.__exportStar(DS(),Br);ii.__exportStar(Zi(),Br);ii.__exportStar(bS(),Br);ii.__exportStar(AS(),Br);ii.__exportStar(lp(),Br);ii.__exportStar(PS(),Br);ii.__exportStar(FS(),Br);ii.__exportStar(dp(),Br);ii.__exportStar(kS(),Br);ii.__exportStar(KM(),Br);ii.__exportStar(LS(),Br);ii.__exportStar(wS(),Br);ii.__exportStar(BS(),Br);ii.__exportStar(uE(),Br)});var QM=w(Fu=>{"use strict";m();T();N();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.applyExtensions=Fu.mergeExtensions=Fu.extractExtensionsFromSchema=void 0;var GM=va(),kie=va();Object.defineProperty(Fu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return kie.extractExtensionsFromSchema}});function Mie(e){return(0,GM.mergeDeep)(e)}Fu.mergeExtensions=Mie;function ld(e,t){e&&(e.extensions=(0,GM.mergeDeep)([e.extensions||{},t||{}]))}function xie(e,t){ld(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(ld(i,r.extensions),r.type==="object"||r.type==="interface")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];if(u){ld(u,o.extensions);for(let[l,d]of Object.entries(o.arguments))ld(u.args.find(p=>p.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let u=i.getFields()[a];ld(u,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let u=i.getValue(a);ld(u,o)}}}return e}Fu.applyExtensions=xie});var TE=w(pp=>{"use strict";m();T();N();Object.defineProperty(pp,"__esModule",{value:!0});var xS=(Xv(),Gm(Wv));xS.__exportStar(LM(),pp);xS.__exportStar($M(),pp);xS.__exportStar(QM(),pp)});var $i=w(z=>{"use strict";m();T();N();Object.defineProperty(z,"__esModule",{value:!0});z.semanticNonNullArgumentErrorMessage=z.invalidEventProviderIdErrorMessage=z.invalidNatsStreamConfigurationDefinitionErrorMessage=z.invalidEdfsPublishResultObjectErrorMessage=z.invalidNatsStreamInputErrorMessage=z.inlineFragmentInFieldSetErrorMessage=z.inaccessibleQueryRootTypeError=z.subgraphValidationFailureError=z.minimumSubgraphRequirementError=void 0;z.multipleNamedTypeDefinitionError=jie;z.incompatibleInputValueDefaultValueTypeError=Kie;z.incompatibleMergedTypesError=$ie;z.incompatibleInputValueDefaultValuesError=Gie;z.incompatibleSharedEnumError=Qie;z.invalidSubgraphNamesError=Yie;z.duplicateDirectiveDefinitionError=Jie;z.duplicateEnumValueDefinitionError=Hie;z.duplicateFieldDefinitionError=zie;z.duplicateInputFieldDefinitionError=Wie;z.duplicateImplementedInterfaceError=Xie;z.duplicateUnionMemberDefinitionError=Zie;z.duplicateTypeDefinitionError=eae;z.duplicateOperationTypeDefinitionError=tae;z.noBaseDefinitionForExtensionError=nae;z.noBaseScalarDefinitionError=rae;z.noDefinedUnionMembersError=iae;z.noDefinedEnumValuesError=aae;z.operationDefinitionError=sae;z.invalidFieldShareabilityError=oae;z.undefinedDirectiveError=uae;z.undefinedTypeError=cae;z.invalidRepeatedDirectiveErrorMessage=lae;z.invalidDirectiveError=dae;z.invalidRepeatedFederatedDirectiveErrorMessage=fae;z.invalidDirectiveLocationErrorMessage=pae;z.undefinedRequiredArgumentsErrorMessage=mae;z.unexpectedDirectiveArgumentErrorMessage=Nae;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Tae;z.invalidArgumentValueErrorMessage=Eae;z.maximumTypeNestingExceededError=hae;z.unexpectedKindFatalError=yae;z.incompatibleParentKindFatalError=Iae;z.unexpectedEdgeFatalError=gae;z.incompatibleParentTypeMergeError=vae;z.unexpectedTypeNodeKindFatalError=Oae;z.invalidKeyFatalError=Sae;z.unexpectedParentKindForChildError=Dae;z.subgraphValidationError=bae;z.invalidSubgraphNameErrorMessage=Aae;z.invalidOperationTypeDefinitionError=Rae;z.invalidRootTypeDefinitionError=Pae;z.subgraphInvalidSyntaxError=Fae;z.invalidInterfaceImplementationError=wae;z.invalidRequiredInputValueError=Lae;z.duplicateArgumentsError=Cae;z.noQueryRootTypeError=Bae;z.expectedEntityError=Uae;z.abstractTypeInKeyFieldSetErrorMessage=kae;z.unknownTypeInFieldSetErrorMessage=Mae;z.invalidSelectionSetErrorMessage=xae;z.invalidSelectionSetDefinitionErrorMessage=qae;z.undefinedFieldInFieldSetErrorMessage=Vae;z.unparsableFieldSetErrorMessage=jae;z.unparsableFieldSetSelectionErrorMessage=Kae;z.undefinedCompositeOutputTypeError=$ae;z.unexpectedArgumentErrorMessage=Gae;z.argumentsInKeyFieldSetErrorMessage=Qae;z.invalidProvidesOrRequiresDirectivesError=Yae;z.duplicateFieldInFieldSetErrorMessage=Jae;z.invalidConfigurationDataErrorMessage=Hae;z.incompatibleTypeWithProvidesErrorMessage=zae;z.invalidInlineFragmentTypeErrorMessage=Wae;z.inlineFragmentWithoutTypeConditionErrorMessage=Xae;z.unknownInlineFragmentTypeConditionErrorMessage=Zae;z.invalidInlineFragmentTypeConditionTypeErrorMessage=ese;z.invalidInlineFragmentTypeConditionErrorMessage=tse;z.invalidSelectionOnUnionErrorMessage=nse;z.duplicateOverriddenFieldErrorMessage=rse;z.duplicateOverriddenFieldsError=ise;z.noFieldDefinitionsError=ase;z.noInputValueDefinitionsError=sse;z.allChildDefinitionsAreInaccessibleError=ose;z.equivalentSourceAndTargetOverrideErrorMessage=use;z.undefinedEntityInterfaceImplementationsError=cse;z.orScopesLimitError=lse;z.invalidEventDrivenGraphError=dse;z.invalidRootTypeFieldEventsDirectivesErrorMessage=fse;z.invalidEventDrivenMutationResponseTypeErrorMessage=pse;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=mse;z.invalidNatsStreamInputFieldsErrorMessage=Nse;z.invalidKeyFieldSetsEventDrivenErrorMessage=Tse;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Ese;z.nonKeyFieldNamesEventDrivenErrorMessage=hse;z.nonEntityObjectExtensionsEventDrivenErrorMessage=yse;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=Ise;z.invalidEdfsDirectiveName=gse;z.invalidImplementedTypeError=_se;z.selfImplementationError=vse;z.invalidEventSubjectErrorMessage=Ose;z.invalidEventSubjectsErrorMessage=Sse;z.invalidEventSubjectsItemErrorMessage=Dse;z.invalidEventSubjectsArgumentErrorMessage=bse;z.undefinedEventSubjectsArgumentErrorMessage=Ase;z.invalidEventDirectiveError=Rse;z.invalidReferencesOfInaccessibleTypeError=Pse;z.inaccessibleRequiredInputValueError=Fse;z.invalidUnionMemberTypeError=wse;z.invalidRootTypeError=Lse;z.invalidSubscriptionFilterLocationError=Cse;z.invalidSubscriptionFilterDirectiveError=Bse;z.subscriptionFilterNamedTypeErrorMessage=Use;z.subscriptionFilterConditionDepthExceededErrorMessage=kse;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=Mse;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=xse;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=qse;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Vse;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=jse;z.invalidInputFieldTypeErrorMessage=Kse;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=$se;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Gse;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=Qse;z.unknownFieldSubgraphNameError=Yse;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Jse;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Hse;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=zse;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=Wse;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Xse;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Zse;z.unresolvablePathError=eoe;z.allExternalFieldInstancesError=toe;z.externalInterfaceFieldsError=noe;z.nonExternalConditionalFieldError=roe;z.incompatibleFederatedFieldNamedTypeError=ioe;z.unknownNamedTypeErrorMessage=XM;z.unknownNamedTypeError=aoe;z.unknownFieldDataError=soe;z.unexpectedNonCompositeOutputTypeError=ooe;z.invalidExternalDirectiveError=uoe;z.configureDescriptionNoDescriptionError=coe;z.configureDescriptionPropagationError=loe;z.duplicateDirectiveDefinitionArgumentErrorMessage=doe;z.duplicateDirectiveDefinitionLocationErrorMessage=foe;z.invalidDirectiveDefinitionLocationErrorMessage=poe;z.invalidDirectiveDefinitionError=moe;z.typeNameAlreadyProvidedErrorMessage=Noe;z.fieldAlreadyProvidedErrorMessage=Toe;z.invalidInterfaceObjectImplementationDefinitionsError=Eoe;z.invalidNamedTypeError=hoe;z.semanticNonNullLevelsNaNIndexErrorMessage=yoe;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=Ioe;z.semanticNonNullLevelsNonNullErrorMessage=goe;z.semanticNonNullInconsistentLevelsError=_oe;z.oneOfRequiredFieldsError=voe;var YM=Ie(),Ye=zn(),JM=ql(),Bc=wr(),qie=$l(),Vie=TE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function jie(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". +However, there must be only one type named "${e}".`)}function Kie(e,t,n,r){return new Error(`The ${e} of type "${n}" defined on path "${t}" is incompatible with the default value of "${r}".`)}function $ie({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":Ye.FIELD} "${t}": + Expected type "${n}" but received "${e}".`)}function Gie(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". "However, the default value "${i}" is defined in the following subgraph`+(n.length>1?"s":"")+`: "`+n.join(Ye.QUOTATION_JOIN)+`" -If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function Gie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Qie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` +If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function Qie(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs. To update an Enum used as both an input and output, add any new Enum values with the @inaccessible directive in the origin subgraph. Next, add those new Enum values to all other subgraphs that define the Enum\u2014this time without the @inaccessible directive. Finally, once all subgraphs have been updated, remove @inaccessible from the Enum values in the origin subgraph.`)}function Yie(e,t){let n="Subgraphs to be federated must each have a unique, non-empty name.";e.length>0&&(n+=` The following subgraph names are not unique: "`+e.join('", "')+'"');for(let r of t)n+=` - ${r}`;return new Error(n)}function Yie(e){return new Error(`The directive "${e}" must only be defined once.`)}function Jie(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function Hie(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function zie(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Wie(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function Xie(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function Zie(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function eae(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function tae(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function nae(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function rae(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function iae(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function aae(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function sae(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],u=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):u.push(l);o.length<1?r.push(` + ${r}`;return new Error(n)}function Jie(e){return new Error(`The directive "${e}" must only be defined once.`)}function Hie(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function zie(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function Wie(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Xie(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function Zie(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function eae(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function tae(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function nae(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function rae(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function iae(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function aae(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function sae(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function oae(e,t){let n=e.name,r=[];for(let[i,a]of e.fieldDataByName){if(!t.has(i))continue;let o=[],u=[];for(let[l,d]of a.isShareableBySubgraphName)d?o.push(l):u.push(l);o.length<1?r.push(` The field "${i}" is defined in the following subgraphs: "${[...a.subgraphNames].join('", "')}". However, it is not declared "@shareable" in any of them.`):r.push(` The field "${i}" is defined and declared "@shareable" in the following subgraph`+(o.length>1?"s":"")+': "'+o.join(Ye.QUOTATION_JOIN)+`". However, it is not declared "@shareable" in the following subgraph`+(u.length>1?"s":"")+`: "${u.join(Ye.QUOTATION_JOIN)}".`)}return new Error(`The Object "${n}" defines the same fields in multiple subgraphs without the "@shareable" directive:${r.join(` -`)}`)}function oae(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function uae(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function cae(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function lae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: +`)}`)}function uae(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function cae(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function lae(e){return`The definition for the directive "@${e}" does not define it as repeatable, but it is declared more than once on these coordinates.`}function dae(e,t,n,r){return new Error(`The ${n} instance of the directive "@${e}" declared on coordinates "${t}" is invalid for the following reason`+(r.length>1?`s: `:`: `)+r.join(` -`))}function dae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function fae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function pae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". - However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Ye.QUOTATION_JOIN)+'".'}function mae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Ye.QUOTATION_JOIN)+'".'}function Nae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Ye.QUOTATION_JOIN)+'"'}function Tae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function Eae(e){return new Error(` The type defined at path "${e}" has more than ${JM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function hae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function yae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Bc.kindToNodeType)(t)} but received "${(0,Bc.kindToNodeType)(n)}".`)}function Iae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: - "${t.join(Ye.QUOTATION_JOIN)}".`)}var gae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function _ae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:gae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Bc.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Ye.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function vae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function Oae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Sae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function Dae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: +`))}function fae(e,t){return new Error(`The definition for the directive "@${e}" does not define it as repeatable, but the directive has been declared on more than one instance of the type "${t}".`)}function pae(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function mae(e,t,n){let r=` The definition for "@${e}" defines the following `+t.length+" required argument"+(t.length>1?"s: ":": ")+'"'+t.join('", "')+`". + However,`;return n.length<1?r+" no arguments are defined on this instance.":r+" the following required argument"+(n.length>1?"s are":" is")+' not defined on this instance: "'+n.join(Ye.QUOTATION_JOIN)+'".'}function Nae(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(Ye.QUOTATION_JOIN)+'".'}function Tae(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(Ye.QUOTATION_JOIN)+'"'}function Eae(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function hae(e){return new Error(` The type defined at path "${e}" has more than ${JM.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function yae(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function Iae(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Bc.kindToNodeType)(t)} but received "${(0,Bc.kindToNodeType)(n)}".`)}function gae(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: + "${t.join(Ye.QUOTATION_JOIN)}".`)}var _ae='"Interface Object" (an "Object" type that also defines the "@interfaceObject" directive)';function vae({existingData:e,incomingNodeType:t,incomingSubgraphName:n}){let r=[...e.subgraphNames],i=t?`"${t}"`:_ae;return new Error(` "${e.name}" is defined using incompatible types across subgraphs. It is defined as type "${(0,Bc.kindToNodeType)(e.kind)}" in subgraph`+(r.length>1?"s":"")+` "${r.join(Ye.QUOTATION_JOIN)}" but type ${i} in subgraph "${n}".`)}function Oae(e){return new Error(`Fatal: Expected all constituent types at path "${e}" to be one of the following: "LIST_TYPE", "NAMED_TYPE", or "NON_NULL_TYPE".`)}function Sae(e,t){return new Error(`Fatal: Expected key "${e}" to exist in the map "${t}".`)}z.subgraphValidationFailureError=new Error(" Fatal: Subgraph validation did not return a valid AST.");function Dae(e,t,n,r,i){return new Error(` Expected "${e}" to be type "${t}" but received "${n}" when handling child "${r}" of type "${i}".`)}function bae(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: `+t.map(n=>n.message).join(` -`))}function bae(e,t){return`The ${(0,Bc.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function Aae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. - If explicitly defined, each operation type must be a unique and valid Object type.`)}function Rae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. -For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function Pae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` - The reason provided was: `+e.message),new Error(t)}function Fae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: +`))}function Aae(e,t){return`The ${(0,Bc.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function Rae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, "${t}" was also used for the "${n}" operation. + If explicitly defined, each operation type must be a unique and valid Object type.`)}function Pae(e,t,n){return new Error(`The schema definition defines the "${e}" operation as type "${t}". However, the schema also defines another type named "${n}", which is the default (root) type name for the "${e}" operation. +For federation, it is only possible to use the default root types names ("Mutation", "Query", "Subscription") as operation definitions. No other definitions with these default root type names are valid.`)}function Fae(e){let t="The subgraph has syntax errors and could not be parsed.";return e&&(t+=` + The reason provided was: `+e.message),new Error(t)}function wae(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: `,u=a.unimplementedFields.length;u&&(o+=` The following field${u>1?"s are":" is"} not implemented: "`+a.unimplementedFields.join('", "')+`" `);for(let[l,d]of a.invalidFieldImplementations){let p=d.unimplementedArguments.size,E=d.invalidImplementedArguments.length,I=d.invalidAdditionalArguments.size;if(o+=` The field "${l}" is invalid because: `,p&&(o+=` The following argument${p>1?"s are":" is"} not implemented: "`+[...d.unimplementedArguments].join('", "')+`" @@ -268,87 +268,87 @@ For federation, it is only possible to use the default root types names ("Mutati Consequently, the Interface implementation cannot be satisfied. `)}r.push(o)}return new Error(`The ${t} "${e}" has the following Interface implementation errors: `+r.join(` -`))}function wae(e,t,n,r=!0){let i=r?Ye.ARGUMENT:Ye.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: +`))}function Lae(e,t,n,r=!0){let i=r?Ye.ARGUMENT:Ye.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: `;for(let o of n)a+=` The ${i} "${o.inputValueName}" is required in the following subgraph`+(o.requiredSubgraphs.length>1?"s":"")+': "'+o.requiredSubgraphs.join('", "')+`" However, the ${i} "${o.inputValueName}" is not defined in the following subgraph`+(o.missingSubgraphs.length>1?"s":"")+': "'+o.missingSubgraphs.join('", "')+`" If an ${i} is required on a ${e} in any one subgraph, it must be at least defined as optional on all other definitions of that ${e} in all other subgraphs. -`;return new Error(a)}function Lae(e,t){return new Error(`The field "${e}" is invalid because: +`;return new Error(a)}function Cae(e,t){return new Error(`The field "${e}" is invalid because: The following argument`+(t.length>1?"s are":" is")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+`" -`)}function Cae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. +`)}function Bae(e=!0){return new Error(`The ${e?"router":"client"} schema does not define at least one accessible query root type field after federation was completed, which is necessary for a federated graph to be valid. For example: type Query { dummy: String - }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function Bae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function Uae(e,t,n,r){return` The following field set is invalid: + }`)}z.inaccessibleQueryRootTypeError=new Error('The root query type "Query" must be present in the client schema; consequently, it must not be declared "@inaccessible".');function Uae(e){return new Error(`Expected object "${e}" to define a "key" directive, but it defines no directives.`)}z.inlineFragmentInFieldSetErrorMessage=" Inline fragments are not currently supported within a field set argument.";function kae(e,t,n,r){return` The following field set is invalid: "${e}" This is because "${t}" returns "${n}", which is type "${r}". - Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function kae(e,t,n){return` The following field set is invalid: + Fields that return abstract types (Interfaces and Unions) cannot be included in the field set of "@key" directives.`}function Mae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" returns the unknown type "${n}".`}function Mae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" returns the unknown type "${n}".`}function xae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function xae(e,t,n,r){return` The following field set is invalid: + This is because of the selection set corresponding to the `+EE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function qae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function qae(e,t,n){return` The following field set is invalid: + This is because of the selection set corresponding to the `+EE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function Vae(e,t,n){return` The following field set is invalid: "${e}" This is because of the selection set corresponding to the field coordinates "${t}.${n}". - The type "${t}" does not define a field named "${n}".`}function Vae(e,t){let n=` The following field set is invalid: + The type "${t}" does not define a field named "${n}".`}function jae(e,t){let n=` The following field set is invalid: "${e}" The field set could not be parsed.`;return t&&(n+=` - The reason provided was: `+t.message),n}function jae(e,t){return` The following field set is invalid: + The reason provided was: `+t.message),n}function Kae(e,t){return` The following field set is invalid: "${e}" - This is because the selection set defined on "${t}" could not be parsed.`}function Kae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function $ae(e,t,n){return` The following field set is invalid: + This is because the selection set defined on "${t}" could not be parsed.`}function $ae(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function Gae(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" does not define an argument named "${n}".`}function Gae(e,t){return` The following field set is invalid: + This is because "${t}" does not define an argument named "${n}".`}function Qae(e,t){return` The following field set is invalid: "${e}" This is because "${t}" defines arguments. - Fields that define arguments cannot be included in the field set of @key directives.`}function Qae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: + Fields that define arguments cannot be included in the field set of @key directives.`}function Yae(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: `+t.join(` -`))}function Yae(e,t){return` The following field set is invalid: +`))}function Jae(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" was included in the field set more than once.`}function Jae(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function Hae({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". + This is because "${t}" was included in the field set more than once.`}function Hae(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function zae({fieldCoords:e,responseType:t,subgraphName:n}){return` A "@provides" directive is declared on field "${e}" in subgraph "${n}". However, the response type "${t}" is not an Object nor Interface.`}function qS(e,t,n=!1){return e.length<1?`enclosing type name "${t}". `:`field coordinates "${e[e.length-1]}"`+(n?` that returns "${t}"`:"")+`. `}function EE(e,t,n){return e.length<1?`enclosing type name "${t}", which is type "${n}". `:`field coordinates "${e[e.length-1]}" that returns "${t}", which is type "${n}". -`}function zae(e,t,n,r){return` The following field set is invalid: +`}function Wae(e,t,n,r){return` The following field set is invalid: "${e}" This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+qS(t,r,!0)+` However, "${r}" is not an abstract (Interface or Union) type. - Consequently, the only valid type condition at this selection set would be "${r}".`}function Wae(e,t){return` The following field set is invalid: + Consequently, the only valid type condition at this selection set would be "${r}".`}function Xae(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" defines an inline fragment without a type condition.`}function Xae(e,t,n,r){return` The following field set is invalid: + This is because "${t}" defines an inline fragment without a type condition.`}function Zae(e,t,n,r){return` The following field set is invalid: "${e}" - This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)}function Zae(e,t,n,r,i){return` The following field set is invalid: + This is because an inline fragment with the unknown type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)}function ese(e,t,n,r,i){return` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function ese(e,t,n,r,i){let a=` The following field set is invalid: + This is because an inline fragment with the type condition "${r}" is defined on the selection set corresponding to the `+qS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function tse(e,t,n,r,i){let a=` The following field set is invalid: "${e}" - This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+EE(t,i,r);return r===Ye.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function tse(e,t,n){return` The following field set is invalid: + This is because an inline fragment with the type condition "${n}" is defined on the selection set corresponding to the `+EE(t,i,r);return r===Ye.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function nse(e,t,n){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+EE(t,n,Ye.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function nse(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+'".'}function rse(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Ye.QUOTATION_JOIN)+`". -`)}function ise(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function ase(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function sse(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function ose(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function use(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. + This is because of the selection set corresponding to the `+EE(t,n,Ye.UNION)+` Union types such as "${n}" must define field selections (besides "__typename") on an inline fragment whose type condition corresponds to a constituent union member.`}function rse(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+'".'}function ise(e){return new Error('The "@override" directive must only be declared on one single instance of a field. However, an "@override" directive was declared on more than one instance of the following field'+(e.length>1?"s":"")+': "'+e.join(Ye.QUOTATION_JOIN)+`". +`)}function ase(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function sse(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function ose(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function use(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function cse(e,t){let n=`Federation was unsuccessful because any one subgraph that defines a specific entity Interface must also define each and every entity Object that implements that entity Interface. Each entity Object must also explicitly define its implementation of the entity Interface. `;for(let[r,i]of e){let o=(0,Bc.getOrThrowError)(t,r,"entityInterfaceFederationDataByTypeName").concreteTypeNames;n+=` Across all subgraphs, the entity interface "${r}" is implemented by the following entit`+(o.size>1?"ies":"y")+`: "`+Array.from(o).join(Ye.QUOTATION_JOIN)+`" However, the definition of at least one of these implementations is missing in a subgraph that defines the entity interface "${r}": `;for(let{subgraphName:u,definedConcreteTypeNames:l}of i){let d=(0,Bc.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${u}" does not define the following implementations: "`+d.join(Ye.QUOTATION_JOIN)+`" -`}}return new Error(n)}function cse(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: +`}}return new Error(n)}function lse(e,t){return new Error(`The maximum number of OR scopes that can be defined by @requiresScopes on a single field is ${e}. However, the following coordinates attempt to define more: "`+t.join(Ye.QUOTATION_JOIN)+`" -If you require more, please contact support.`)}function lse(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. +If you require more, please contact support.`)}function dse(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. Consequently, any "@key" definitions must also include the "resolvable: false" argument. Moreover, only fields that compose part of an entity's (composite) key and are declared "@external" are permitted. `+e.join(` -`))}function dse(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: +`))}function fse(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: Mutation type fields must define either a edfs publish or request directive." Query type fields must define "@edfs__natsRequest" Subscription type fields must define an edfs subscribe directive The following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)r.definesDirectives?t+=` The root field path "${n}" defines the following invalid events directive`+(r.invalidDirectiveNames.length>1?"s":"")+': "@'+r.invalidDirectiveNames.join('", "@')+`" `:t+=` The root field path "${n}" does not define any valid events directives. -`;return t}function fse(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: +`;return t}function pse(e){let t=` Mutation type fields defined in an Event Driven graph must return the non-nullable type "edfs__PublishResult!", which has the following definition: type edfs__PublishResult { success: Boolean! } However, the following mutation field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The mutation field path "${n}" returns "${r}". -`;return t}function pse(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. +`;return t}function mse(e){let t=` The named response type of root type fields defined in an Event Driven graph must be a non-nullable, non-list named type that is either an entity, an interface implemented by an entity, or a union of which an entity is a member. Consequently, the following root field path`+(e.size>1?"s are":" is")+` invalid: `;for(let[n,r]of e)t+=` The root field path "${n}", which returns the invalid type "${r}" `;return t}z.invalidNatsStreamInputErrorMessage=`The "streamConfiguration" argument must be a valid input object with the following form: @@ -356,19 +356,19 @@ Moreover, only fields that compose part of an entity's (composite) key and are d consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function mse(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Ye.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Ye.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Ye.QUOTATION_JOIN)+'".'),i+=` + }`;function Nse(e,t,n,r){let i=z.invalidNatsStreamInputErrorMessage,a=[];return e.length>0&&a.push("The following required field"+(e.length>1?"s were":" was")+' not defined: "'+e.join(Ye.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(Ye.QUOTATION_JOIN)+'".'),n.length>0&&a.push("The following required field"+(n.length>1?"s were":" was")+' not type "String!" with a minimum length of 1: "'+n.join(Ye.QUOTATION_JOIN)+'".'),r.length>0&&a.push("The following field"+(r.length>1?"s are":" is")+' not part of a valid "edfs__NatsStreamConfiguration" input definition: "'+r.join(Ye.QUOTATION_JOIN)+'".'),i+=` However, the provided input was invalid for the following reason`+(a.length>1?"s":"")+`: `+a.join(` - `),i}function Nse(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: + `),i}function Tse(e=new Map){let t="";for(let[n,r]of e)t+=' The following "@key" field set'+(r.length>1?"s are":" is")+` defined on the entity "${n}" without a "resolvable: false" argument: "`+r.join(Ye.QUOTATION_JOIN)+`" -`;return t}function Tse(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: +`;return t}function Ese(e){let t=" The following field"+(e.size>1?"s are referenced":" is referenced")+` within an entity "@key" field without an "@external" declaration: `;for(let[n,r]of e)t+=` field "${r}" defined on path "${n}" -`;return t}function Ese(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: +`;return t}function hse(e){let t=" The following field"+(e.size>1?"s are":" is")+` defined despite not composing part of a "@key" directive field set: `;for(let[n,r]of e)t+=` Field "${r}" defined on path "${n}" -`;return t}function hse(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. +`;return t}function yse(e){return`Only root types and entities (objects that define one or more primary keys with the "@key" directive) may be defined as object extensions in an Event Driven graph. Consequently, the following object extension definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Ye.QUOTATION_JOIN)+`" -`}function yse(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: +`}function Ise(e){return` Only object definitions whose fields compose part of a "@key" directive's field set may be defined in an Event Driven graph. Consequently, the following object type definition`+(e.length>1?"s are":" is")+` invalid: "`+e.join(Ye.QUOTATION_JOIN)+`" `}z.invalidEdfsPublishResultObjectErrorMessage=` The object "edfs__PublishResult" that was defined in the Event Driven graph is invalid and must instead have the following definition: type edfs__PublishResult { @@ -378,20 +378,20 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function Ise(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function gse(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: + }`;function gse(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function _se(e,t){let n=` Only interfaces can be implemented. However, the type "${e}" attempts to implement the following invalid type`+(t.size>1?"s":"")+`: `;for(let[r,i]of t)n+=` "${r}", which is type "${i}" -`;return new Error(n)}function _se(e){return new Error(` The interface "${e}" must not implement itself.`)}function vse(e){return`The "${e}" argument must be string with a minimum length of one.`}function Ose(e){return`The "${e}" argument must be a list of strings.`}function Sse(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function Dse(e){return`An argument template references the invalid argument "${e}".`}function bse(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function Ase(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: +`;return new Error(n)}function vse(e){return new Error(` The interface "${e}" must not implement itself.`)}function Ose(e){return`The "${e}" argument must be string with a minimum length of one.`}function Sse(e){return`The "${e}" argument must be a list of strings.`}function Dse(e){return`Each item in the "${e}" argument list must be a string with a minimum length of one. However, at least one value provided in the list was invalid.`}function bse(e){return`An argument template references the invalid argument "${e}".`}function Ase(e){return`An argument template references the undefined argument "${e}".`}z.invalidEventProviderIdErrorMessage='If explicitly defined, the "providerId" argument must be a string with a minimum length of one.';function Rse(e,t,n){return new Error(`The event directive "${e}" declared on "${t}" is invalid for the following reason`+(n.length>1?"s":"")+`: `+n.join(` - `))}function Rse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: + `))}function Pse(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: "`+n.join(Ye.QUOTATION_JOIN)+`" -`)}function Pse(e,t){return new Error(`The ${e.kind===YM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===YM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function Fse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: +`)}function Fse(e,t){return new Error(`The ${e.kind===YM.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===YM.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function wse(e,t){return new Error(` The union "${e}" defines the following member`+(t.length>1?"s that are not object types":" that is not an object type")+`: `+t.join(` - `))}function wse(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function Lse(e){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Cse(e,t){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: + `))}function Lse(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function Cse(e){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Bse(e,t){return new Error(`The "@${Ye.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: `+t.join(` -`))}function Bse(e){return` Unknown type "${e}".`}function Use(e){return` The input path "${e}" exceeds the maximum depth of ${JM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. +`))}function Use(e){return` Unknown type "${e}".`}function kse(e){return` The input path "${e}" exceeds the maximum depth of ${JM.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. If you require a larger maximum depth, please contact support.`}var HM=` Each "${Ye.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${Ye.AND_UPPER}", "${Ye.IN_UPPER}", "${Ye.NOT_UPPER}", or "${Ye.OR_UPPER}". -`;function kse(e,t){return HM+` However, input path "${e}" defines ${t} fields.`}function Mse(e,t){return HM+` However, input path "${e}" defines the invalid input value field "${t}".`}function xse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var zM=` An AND or OR input field defined on a "${Ye.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. -`;function qse(e,t){let n=t.length>1;return zM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function Vse(e,t){return zM+` However, the list defined on input path "${e}" has a length of ${t}.`}function jse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function Kse(e,t,n,r,i){let a=` Each "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Ye.FIELD_PATH}" and "${Ye.VALUES}". +`;function Mse(e,t){return HM+` However, input path "${e}" defines ${t} fields.`}function xse(e,t){return HM+` However, input path "${e}" defines the invalid input value field "${t}".`}function qse(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var zM=` An AND or OR input field defined on a "${Ye.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. +`;function Vse(e,t){let n=t.length>1;return zM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function jse(e,t){return zM+` However, the list defined on input path "${e}" has a length of ${t}.`}function Kse(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function $se(e,t,n,r,i){let a=` Each "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${Ye.FIELD_PATH}" and "${Ye.VALUES}". However, input path "${e}" is invalid because:`;return t.length>0&&(a+=` The following required field`+(t.length>1?"s are":" is")+` not defined: "`+t.join(Ye.QUOTATION_JOIN)+'"'),n.length>0&&(a+=` @@ -401,82 +401,82 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i "`+r.join(Ye.QUOTATION_JOIN)+'"'),i.length>0&&(a+=` `+i.join(` `)),a}var WM=` A "${Ye.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${Ye.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). -`;function $se(e,t){let n=t.length>1;return WM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Ye.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function Gse(e){return WM+` However, the list defined on input path "${e}" is empty.`}function Qse(e){return new Error(` Field "${e}" defined no subgraph names.`)}function Yse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function Jse(e,t,n){return` Input path "${e}" defines the value "${t}". - However, "${n}" is not type "object"`}function Hse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function zse(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". +`;function Gse(e,t){let n=t.length>1;return WM+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${Ye.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function Qse(e){return WM+` However, the list defined on input path "${e}" is empty.`}function Yse(e){return new Error(` Field "${e}" defined no subgraph names.`)}function Jse(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function Hse(e,t,n){return` Input path "${e}" defines the value "${t}". + However, "${n}" is not type "object"`}function zse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the path "${n}" is invalid because no field named "${r}" exists on type "${i}".`}function Wse(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". However, only fields that are defined in the same graph as the "@${Ye.SUBSCRIPTION_FILTER}" directive can compose part of an "IN" condition's "fieldPath" input value field. - Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function Wse(e,t,n,r){return` Input path "${e}" defines the value "${t}". - The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function Xse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". - However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function Zse({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: + Consequently, the path "${n}" is invalid because field "${r}" is not defined in subgraph "${i}".`}function Xse(e,t,n,r){return` Input path "${e}" defines the value "${t}". + The path segment "${n}" is invalid because it refers to "${r}", which is declared "@inaccessible".`}function Zse(e,t,n,r,i){return` Input path "${e}" defines the value "${t}". + However, the final field "${n}" is ${r} "${i}", which is not a leaf type; therefore, it requires further selections.`}function eoe({fieldName:e,selectionSet:t},n){let r=`The field "${e}" is unresolvable at the following path: ${t} This is because: - `+n.join(` - - `);return new Error(r)}function eoe(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: + - `);return new Error(r)}function toe(e,t){let n=`The Object "${e}" is invalid because the following field definition`+(t.size>1?"s are":" is")+` declared "@external" on all instances of that field: `;for(let[r,i]of t)n+=` "${r}" in subgraph`+(i.length>1?"s":"")+' "'+i.join(Ye.QUOTATION_JOIN)+`" -`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function toe(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": +`;return n+='At least one instance of a field definition must always be resolvable (and therefore not declared "@external").',new Error(n)}function noe(e,t){return new Error(`The interface "${e}" is invalid because the following field definition`+(t.length>1?"s are":" is")+` declared "@external": "`+t.join(Ye.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function noe({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Ye.LITERAL_PERIOD),o=a[a.length-1]===Ye.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: +Interface fields should not be declared "@external". This is because interface fields do not resolve directly, but the "@external" directive relates to whether a field instance can be resolved by the subgraph in which it is defined.`)}function roe({directiveCoords:e,fieldSet:t,directiveName:n,subgraphName:r,targetCoords:i}){let a=i.split(Ye.LITERAL_PERIOD),o=a[a.length-1]===Ye.TYPENAME;return new Error(`The field "${e}" in subgraph "${r}" defines a "@${n}" directive with the following field set: "${t}".`+(o?` However, none of the field set ancestors of "__typename" is declared "@external".`:` However, neither the field "${i}" nor any of its field set ancestors are declared "@external".`)+` -Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function roe(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Ye.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. +Consequently, "${i}" is already provided by subgraph "${r}" and should not form part of a "@${n}" directive field set.`)}function ioe(e,t){let n=[];for(let[r,i]of t){let a=[...i];n.push(` The named type "${r}" is returned by the following subgraph`+(a.length>1?"s":"")+': "'+a.join(Ye.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. The field "${e}" could not be federated due to incompatible types across subgraphs. The discrepancies are as follows: `+n.join(` -`))}function XM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function ioe(e,t){return new Error(XM(e,t))}function aoe(e){return new Error(`Could not find FieldData for field "${e}" -.This should never happen. Please report this issue on GitHub.`)}function soe(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". -This should never happen. Please report this issue on GitHub.`)}function ooe(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function uoe(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function coe(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: +`))}function XM(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function aoe(e,t){return new Error(XM(e,t))}function soe(e){return new Error(`Could not find FieldData for field "${e}" +.This should never happen. Please report this issue on GitHub.`)}function ooe(e,t){return new Error(`Expected named type "${e}" to be a composite output type (Object or Interface) but received "${t}". +This should never happen. Please report this issue on GitHub.`)}function uoe(e){return new Error(`The Object field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`)}function coe(e,t){return new Error(`The "@openfed__configureDescription" directive defined on ${e} "${t}" is invalid because neither a description nor the "descriptionOverride" argument is defined.`)}function loe(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: "`+t.join(Ye.QUOTATION_JOIN)+`" -A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function loe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: - "`+e.join(Ye.QUOTATION_JOIN)+'"'}function doe(e){return`- The location "${e}" is defined multiple times.`}function foe(e){return`- "${e}" is not a valid directive location.`}function poe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: -`+t.join(Ye.LITERAL_NEW_LINE)+'"')}function moe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function Noe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function Toe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": - "`+n.join(Ye.QUOTATION_JOIN)+'"')}function Eoe({data:e,namedTypeData:t,nodeType:n}){let r=(0,xie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,qie.printTypeNode)(e.type)+`; however, ${(0,Bc.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function hoe(e){return`Index "${e}" is not a valid integer.`}function yoe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function Ioe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Ye.LEVELS}" validation error.`;function goe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: +A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function doe(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: + "`+e.join(Ye.QUOTATION_JOIN)+'"'}function foe(e){return`- The location "${e}" is defined multiple times.`}function poe(e){return`- "${e}" is not a valid directive location.`}function moe(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: +`+t.join(Ye.LITERAL_NEW_LINE)+'"')}function Noe(e,t){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@provides" field set.`}function Toe(e,t,n){return` The field "${e}" is unconditionally provided by subgraph "${t}" and should not form part of any "@${n}" field set. Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`}function Eoe(e,t,n){return new Error(`The subgraph that defines an entity Interface Object (using "@interfaceObject") must not define any implementation types of that interface. However, the subgraph "${t}" defines the entity Interface "${e}" as an Interface Object alongside the following implementation type`+(n.length>1?"s":"")+` of "${e}": + "`+n.join(Ye.QUOTATION_JOIN)+'"')}function hoe({data:e,namedTypeData:t,nodeType:n}){let r=(0,qie.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,Vie.printTypeNode)(e.type)+`; however, ${(0,Bc.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function yoe(e){return`Index "${e}" is not a valid integer.`}function Ioe({maxIndex:e,typeString:t,value:n}){return`Index "${n}" is out of bounds for type ${t}; `+(e>0?`valid indices are 0-${e} inclusive.`:"the only valid index is 0.")}function goe({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${Ye.LEVELS}" validation error.`;function _oe(e){let t=`${e.renamedParentTypeName}.${e.name}`,n=`The "@semanticNonNull" directive defined on field "${t}" is invalid due to inconsistent values provided to the "levels" argument across the following subgraphs: `;for(let[r,i]of e.nullLevelsBySubgraphName)n+=` Subgraph "${r}" defines levels ${Array.from(i).sort((a,o)=>a-o)}. -`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function _oe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Ye.QUOTATION_JOIN)+'".')}});var ex=w(ZM=>{"use strict";m();T();N();Object.defineProperty(ZM,"__esModule",{value:!0})});var yE=w(hE=>{"use strict";m();T();N();Object.defineProperty(hE,"__esModule",{value:!0});hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var IE=w(hr=>{"use strict";m();T();N();Object.defineProperty(hr,"__esModule",{value:!0});hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION=hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=hr.SCOPE_SCALAR_DEFINITION=hr.LINK_PURPOSE_DEFINITION=hr.LINK_IMPORT_DEFINITION=hr.FIELD_SET_SCALAR_DEFINITION=hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=Ie(),dn=Fr(),fn=zn(),voe=yE();hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:voe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}}]};hr.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_SET_SCALAR)};hr.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_IMPORT)};hr.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SECURITY)}]};hr.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SCOPE_SCALAR)};hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FIELD_CONDITION)};hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.IN_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,dn.stringToNameNode)(fn.NOT_UPPER),type:(0,dn.stringToNamedTypeNode)(fn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_CONDITION)};hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,dn.stringToNameNode)(fn.SUBSCRIPTION_FILTER_VALUE)}});var dd=w(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var nt=zn(),gE=Ie(),va=IE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([nt.ARGUMENT_DEFINITION_UPPER,nt.ENUM_UPPER,nt.ENUM_VALUE_UPPER,nt.FIELD_DEFINITION_UPPER,nt.INPUT_FIELD_DEFINITION_UPPER,nt.INPUT_OBJECT_UPPER,nt.INTERFACE_UPPER,nt.OBJECT_UPPER,nt.SCALAR_UPPER,nt.SCHEMA_UPPER,nt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([nt.EDFS_KAFKA_PUBLISH,nt.EDFS_KAFKA_SUBSCRIBE,nt.EDFS_NATS_PUBLISH,nt.EDFS_NATS_REQUEST,nt.EDFS_NATS_SUBSCRIBE,nt.EDFS_REDIS_PUBLISH,nt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([nt.CONSUMER_INACTIVE_THRESHOLD,nt.CONSUMER_NAME,nt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([nt.AND_UPPER,nt.IN_UPPER,nt.NOT_UPPER,nt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([nt.AND_UPPER,nt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([gE.Kind.INTERFACE_TYPE_DEFINITION,gE.Kind.INTERFACE_TYPE_EXTENSION,gE.Kind.OBJECT_TYPE_DEFINITION,gE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[nt.CONNECT_FIELD_RESOLVER,[va.FIELD_SET_SCALAR_DEFINITION]],[nt.EDFS_NATS_SUBSCRIBE,[va.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[nt.KEY,[va.FIELD_SET_SCALAR_DEFINITION]],[nt.LINK,[va.LINK_IMPORT_DEFINITION,va.LINK_PURPOSE_DEFINITION]],[nt.PROVIDES,[va.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES,[va.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES_SCOPES,[va.SCOPE_SCALAR_DEFINITION]],[nt.SUBSCRIPTION_FILTER,[va.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,va.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,va.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([nt.BOOLEAN_SCALAR,nt.EDFS_NATS_STREAM_CONFIGURATION,nt.FIELD_SET_SCALAR,nt.ID_SCALAR,nt.INT_SCALAR,nt.FLOAT_SCALAR,nt.LINK_IMPORT,nt.LINK_PURPOSE,nt.STRING_SCALAR,nt.SUBSCRIPTION_FIELD_CONDITION,nt.SUBSCRIPTION_FILTER_CONDITION,nt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([nt.DEPRECATED,nt.ONE_OF,nt.SEMANTIC_NON_NULL])});var ea=w((VS,tx)=>{"use strict";m();T();N();var mp=function(e){return e&&e.Math===Math&&e};tx.exports=mp(typeof globalThis=="object"&&globalThis)||mp(typeof window=="object"&&window)||mp(typeof self=="object"&&self)||mp(typeof global=="object"&&global)||mp(typeof VS=="object"&&VS)||function(){return this}()||Function("return this")()});var ks=w((APe,nx)=>{"use strict";m();T();N();nx.exports=function(e){try{return!!e()}catch(t){return!0}}});var wu=w((wPe,rx)=>{"use strict";m();T();N();var Ooe=ks();rx.exports=!Ooe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var jS=w((UPe,ix)=>{"use strict";m();T();N();var Soe=ks();ix.exports=!Soe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Uc=w((qPe,ax)=>{"use strict";m();T();N();var Doe=jS(),_E=Function.prototype.call;ax.exports=Doe?_E.bind(_E):function(){return _E.apply(_E,arguments)}});var cx=w(ux=>{"use strict";m();T();N();var sx={}.propertyIsEnumerable,ox=Object.getOwnPropertyDescriptor,boe=ox&&!sx.call({1:2},1);ux.f=boe?function(t){var n=ox(this,t);return!!n&&n.enumerable}:sx});var KS=w((JPe,lx)=>{"use strict";m();T();N();lx.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var yi=w((XPe,px)=>{"use strict";m();T();N();var dx=jS(),fx=Function.prototype,$S=fx.call,Aoe=dx&&fx.bind.bind($S,$S);px.exports=dx?Aoe:function(e){return function(){return $S.apply(e,arguments)}}});var Tx=w((nFe,Nx)=>{"use strict";m();T();N();var mx=yi(),Roe=mx({}.toString),Poe=mx("".slice);Nx.exports=function(e){return Poe(Roe(e),8,-1)}});var hx=w((sFe,Ex)=>{"use strict";m();T();N();var Foe=yi(),woe=ks(),Loe=Tx(),GS=Object,Coe=Foe("".split);Ex.exports=woe(function(){return!GS("z").propertyIsEnumerable(0)})?function(e){return Loe(e)==="String"?Coe(e,""):GS(e)}:GS});var QS=w((lFe,yx)=>{"use strict";m();T();N();yx.exports=function(e){return e==null}});var YS=w((mFe,Ix)=>{"use strict";m();T();N();var Boe=QS(),Uoe=TypeError;Ix.exports=function(e){if(Boe(e))throw new Uoe("Can't call method on "+e);return e}});var vE=w((hFe,gx)=>{"use strict";m();T();N();var koe=hx(),Moe=YS();gx.exports=function(e){return koe(Moe(e))}});var Oa=w((_Fe,_x)=>{"use strict";m();T();N();var JS=typeof document=="object"&&document.all;_x.exports=typeof JS=="undefined"&&JS!==void 0?function(e){return typeof e=="function"||e===JS}:function(e){return typeof e=="function"}});var fd=w((DFe,vx)=>{"use strict";m();T();N();var xoe=Oa();vx.exports=function(e){return typeof e=="object"?e!==null:xoe(e)}});var OE=w((PFe,Ox)=>{"use strict";m();T();N();var HS=ea(),qoe=Oa(),Voe=function(e){return qoe(e)?e:void 0};Ox.exports=function(e,t){return arguments.length<2?Voe(HS[e]):HS[e]&&HS[e][t]}});var Dx=w((CFe,Sx)=>{"use strict";m();T();N();var joe=yi();Sx.exports=joe({}.isPrototypeOf)});var Px=w((MFe,Rx)=>{"use strict";m();T();N();var Koe=ea(),bx=Koe.navigator,Ax=bx&&bx.userAgent;Rx.exports=Ax?String(Ax):""});var kx=w((jFe,Ux)=>{"use strict";m();T();N();var Bx=ea(),zS=Px(),Fx=Bx.process,wx=Bx.Deno,Lx=Fx&&Fx.versions||wx&&wx.version,Cx=Lx&&Lx.v8,Sa,SE;Cx&&(Sa=Cx.split("."),SE=Sa[0]>0&&Sa[0]<4?1:+(Sa[0]+Sa[1]));!SE&&zS&&(Sa=zS.match(/Edge\/(\d+)/),(!Sa||Sa[1]>=74)&&(Sa=zS.match(/Chrome\/(\d+)/),Sa&&(SE=+Sa[1])));Ux.exports=SE});var WS=w((QFe,xx)=>{"use strict";m();T();N();var Mx=kx(),$oe=ks(),Goe=ea(),Qoe=Goe.String;xx.exports=!!Object.getOwnPropertySymbols&&!$oe(function(){var e=Symbol("symbol detection");return!Qoe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mx&&Mx<41})});var XS=w((zFe,qx)=>{"use strict";m();T();N();var Yoe=WS();qx.exports=Yoe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ZS=w((ewe,Vx)=>{"use strict";m();T();N();var Joe=OE(),Hoe=Oa(),zoe=Dx(),Woe=XS(),Xoe=Object;Vx.exports=Woe?function(e){return typeof e=="symbol"}:function(e){var t=Joe("Symbol");return Hoe(t)&&zoe(t.prototype,Xoe(e))}});var Kx=w((iwe,jx)=>{"use strict";m();T();N();var Zoe=String;jx.exports=function(e){try{return Zoe(e)}catch(t){return"Object"}}});var DE=w((uwe,$x)=>{"use strict";m();T();N();var eue=Oa(),tue=Kx(),nue=TypeError;$x.exports=function(e){if(eue(e))return e;throw new nue(tue(e)+" is not a function")}});var eD=w((fwe,Gx)=>{"use strict";m();T();N();var rue=DE(),iue=QS();Gx.exports=function(e,t){var n=e[t];return iue(n)?void 0:rue(n)}});var Yx=w((Twe,Qx)=>{"use strict";m();T();N();var tD=Uc(),nD=Oa(),rD=fd(),aue=TypeError;Qx.exports=function(e,t){var n,r;if(t==="string"&&nD(n=e.toString)&&!rD(r=tD(n,e))||nD(n=e.valueOf)&&!rD(r=tD(n,e))||t!=="string"&&nD(n=e.toString)&&!rD(r=tD(n,e)))return r;throw new aue("Can't convert object to primitive value")}});var Hx=w((Iwe,Jx)=>{"use strict";m();T();N();Jx.exports=!1});var bE=w((Owe,Wx)=>{"use strict";m();T();N();var zx=ea(),sue=Object.defineProperty;Wx.exports=function(e,t){try{sue(zx,e,{value:t,configurable:!0,writable:!0})}catch(n){zx[e]=t}return t}});var AE=w((Awe,eq)=>{"use strict";m();T();N();var oue=Hx(),uue=ea(),cue=bE(),Xx="__core-js_shared__",Zx=eq.exports=uue[Xx]||cue(Xx,{});(Zx.versions||(Zx.versions=[])).push({version:"3.41.0",mode:oue?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var iD=w((wwe,nq)=>{"use strict";m();T();N();var tq=AE();nq.exports=function(e,t){return tq[e]||(tq[e]=t||{})}});var iq=w((Uwe,rq)=>{"use strict";m();T();N();var lue=YS(),due=Object;rq.exports=function(e){return due(lue(e))}});var Lu=w((qwe,aq)=>{"use strict";m();T();N();var fue=yi(),pue=iq(),mue=fue({}.hasOwnProperty);aq.exports=Object.hasOwn||function(t,n){return mue(pue(t),n)}});var aD=w(($we,sq)=>{"use strict";m();T();N();var Nue=yi(),Tue=0,Eue=Math.random(),hue=Nue(1 .toString);sq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+hue(++Tue+Eue,36)}});var cq=w((Jwe,uq)=>{"use strict";m();T();N();var yue=ea(),Iue=iD(),oq=Lu(),gue=aD(),_ue=WS(),vue=XS(),pd=yue.Symbol,sD=Iue("wks"),Oue=vue?pd.for||pd:pd&&pd.withoutSetter||gue;uq.exports=function(e){return oq(sD,e)||(sD[e]=_ue&&oq(pd,e)?pd[e]:Oue("Symbol."+e)),sD[e]}});var pq=w((Xwe,fq)=>{"use strict";m();T();N();var Sue=Uc(),lq=fd(),dq=ZS(),Due=eD(),bue=Yx(),Aue=cq(),Rue=TypeError,Pue=Aue("toPrimitive");fq.exports=function(e,t){if(!lq(e)||dq(e))return e;var n=Due(e,Pue),r;if(n){if(t===void 0&&(t="default"),r=Sue(n,e,t),!lq(r)||dq(r))return r;throw new Rue("Can't convert object to primitive value")}return t===void 0&&(t="number"),bue(e,t)}});var oD=w((nLe,mq)=>{"use strict";m();T();N();var Fue=pq(),wue=ZS();mq.exports=function(e){var t=Fue(e,"string");return wue(t)?t:t+""}});var Eq=w((sLe,Tq)=>{"use strict";m();T();N();var Lue=ea(),Nq=fd(),uD=Lue.document,Cue=Nq(uD)&&Nq(uD.createElement);Tq.exports=function(e){return Cue?uD.createElement(e):{}}});var cD=w((lLe,hq)=>{"use strict";m();T();N();var Bue=wu(),Uue=ks(),kue=Eq();hq.exports=!Bue&&!Uue(function(){return Object.defineProperty(kue("div"),"a",{get:function(){return 7}}).a!==7})});var lD=w(Iq=>{"use strict";m();T();N();var Mue=wu(),xue=Uc(),que=cx(),Vue=KS(),jue=vE(),Kue=oD(),$ue=Lu(),Gue=cD(),yq=Object.getOwnPropertyDescriptor;Iq.f=Mue?yq:function(t,n){if(t=jue(t),n=Kue(n),Gue)try{return yq(t,n)}catch(r){}if($ue(t,n))return Vue(!xue(que.f,t,n),t[n])}});var _q=w((hLe,gq)=>{"use strict";m();T();N();var Que=wu(),Yue=ks();gq.exports=Que&&Yue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Np=w((_Le,vq)=>{"use strict";m();T();N();var Jue=fd(),Hue=String,zue=TypeError;vq.exports=function(e){if(Jue(e))return e;throw new zue(Hue(e)+" is not an object")}});var PE=w(Sq=>{"use strict";m();T();N();var Wue=wu(),Xue=cD(),Zue=_q(),RE=Np(),Oq=oD(),ece=TypeError,dD=Object.defineProperty,tce=Object.getOwnPropertyDescriptor,fD="enumerable",pD="configurable",mD="writable";Sq.f=Wue?Zue?function(t,n,r){if(RE(t),n=Oq(n),RE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&mD in r&&!r[mD]){var i=tce(t,n);i&&i[mD]&&(t[n]=r.value,r={configurable:pD in r?r[pD]:i[pD],enumerable:fD in r?r[fD]:i[fD],writable:!1})}return dD(t,n,r)}:dD:function(t,n,r){if(RE(t),n=Oq(n),RE(r),Xue)try{return dD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new ece("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var ND=w((PLe,Dq)=>{"use strict";m();T();N();var nce=wu(),rce=PE(),ice=KS();Dq.exports=nce?function(e,t,n){return rce.f(e,t,ice(1,n))}:function(e,t,n){return e[t]=n,e}});var Rq=w((CLe,Aq)=>{"use strict";m();T();N();var TD=wu(),ace=Lu(),bq=Function.prototype,sce=TD&&Object.getOwnPropertyDescriptor,ED=ace(bq,"name"),oce=ED&&function(){}.name==="something",uce=ED&&(!TD||TD&&sce(bq,"name").configurable);Aq.exports={EXISTS:ED,PROPER:oce,CONFIGURABLE:uce}});var Fq=w((MLe,Pq)=>{"use strict";m();T();N();var cce=yi(),lce=Oa(),hD=AE(),dce=cce(Function.toString);lce(hD.inspectSource)||(hD.inspectSource=function(e){return dce(e)});Pq.exports=hD.inspectSource});var Cq=w((jLe,Lq)=>{"use strict";m();T();N();var fce=ea(),pce=Oa(),wq=fce.WeakMap;Lq.exports=pce(wq)&&/native code/.test(String(wq))});var kq=w((QLe,Uq)=>{"use strict";m();T();N();var mce=iD(),Nce=aD(),Bq=mce("keys");Uq.exports=function(e){return Bq[e]||(Bq[e]=Nce(e))}});var yD=w((zLe,Mq)=>{"use strict";m();T();N();Mq.exports={}});var jq=w((eCe,Vq)=>{"use strict";m();T();N();var Tce=Cq(),qq=ea(),Ece=fd(),hce=ND(),ID=Lu(),gD=AE(),yce=kq(),Ice=yD(),xq="Object already initialized",_D=qq.TypeError,gce=qq.WeakMap,FE,Tp,wE,_ce=function(e){return wE(e)?Tp(e):FE(e,{})},vce=function(e){return function(t){var n;if(!Ece(t)||(n=Tp(t)).type!==e)throw new _D("Incompatible receiver, "+e+" required");return n}};Tce||gD.state?(Da=gD.state||(gD.state=new gce),Da.get=Da.get,Da.has=Da.has,Da.set=Da.set,FE=function(e,t){if(Da.has(e))throw new _D(xq);return t.facade=e,Da.set(e,t),t},Tp=function(e){return Da.get(e)||{}},wE=function(e){return Da.has(e)}):(kc=yce("state"),Ice[kc]=!0,FE=function(e,t){if(ID(e,kc))throw new _D(xq);return t.facade=e,hce(e,kc,t),t},Tp=function(e){return ID(e,kc)?e[kc]:{}},wE=function(e){return ID(e,kc)});var Da,kc;Vq.exports={set:FE,get:Tp,has:wE,enforce:_ce,getterFor:vce}});var Qq=w((iCe,Gq)=>{"use strict";m();T();N();var OD=yi(),Oce=ks(),Sce=Oa(),LE=Lu(),vD=wu(),Dce=Rq().CONFIGURABLE,bce=Fq(),$q=jq(),Ace=$q.enforce,Rce=$q.get,Kq=String,CE=Object.defineProperty,Pce=OD("".slice),Fce=OD("".replace),wce=OD([].join),Lce=vD&&!Oce(function(){return CE(function(){},"length",{value:8}).length!==8}),Cce=String(String).split("String"),Bce=Gq.exports=function(e,t,n){Pce(Kq(t),0,7)==="Symbol("&&(t="["+Fce(Kq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!LE(e,"name")||Dce&&e.name!==t)&&(vD?CE(e,"name",{value:t,configurable:!0}):e.name=t),Lce&&n&&LE(n,"arity")&&e.length!==n.arity&&CE(e,"length",{value:n.arity});try{n&&LE(n,"constructor")&&n.constructor?vD&&CE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Ace(e);return LE(r,"source")||(r.source=wce(Cce,typeof t=="string"?t:"")),e};Function.prototype.toString=Bce(function(){return Sce(this)&&Rce(this).source||bce(this)},"toString")});var Jq=w((uCe,Yq)=>{"use strict";m();T();N();var Uce=Oa(),kce=PE(),Mce=Qq(),xce=bE();Yq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Uce(n)&&Mce(n,a,r),r.global)i?e[t]=n:xce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:kce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var zq=w((fCe,Hq)=>{"use strict";m();T();N();var qce=Math.ceil,Vce=Math.floor;Hq.exports=Math.trunc||function(t){var n=+t;return(n>0?Vce:qce)(n)}});var BE=w((TCe,Wq)=>{"use strict";m();T();N();var jce=zq();Wq.exports=function(e){var t=+e;return t!==t||t===0?0:jce(t)}});var Zq=w((ICe,Xq)=>{"use strict";m();T();N();var Kce=BE(),$ce=Math.max,Gce=Math.min;Xq.exports=function(e,t){var n=Kce(e);return n<0?$ce(n+t,0):Gce(n,t)}});var t1=w((OCe,e1)=>{"use strict";m();T();N();var Qce=BE(),Yce=Math.min;e1.exports=function(e){var t=Qce(e);return t>0?Yce(t,9007199254740991):0}});var r1=w((ACe,n1)=>{"use strict";m();T();N();var Jce=t1();n1.exports=function(e){return Jce(e.length)}});var s1=w((wCe,a1)=>{"use strict";m();T();N();var Hce=vE(),zce=Zq(),Wce=r1(),i1=function(e){return function(t,n,r){var i=Hce(t),a=Wce(i);if(a===0)return!e&&-1;var o=zce(r,a),u;if(e&&n!==n){for(;a>o;)if(u=i[o++],u!==u)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};a1.exports={includes:i1(!0),indexOf:i1(!1)}});var c1=w((UCe,u1)=>{"use strict";m();T();N();var Xce=yi(),SD=Lu(),Zce=vE(),ele=s1().indexOf,tle=yD(),o1=Xce([].push);u1.exports=function(e,t){var n=Zce(e),r=0,i=[],a;for(a in n)!SD(tle,a)&&SD(n,a)&&o1(i,a);for(;t.length>r;)SD(n,a=t[r++])&&(~ele(i,a)||o1(i,a));return i}});var d1=w((qCe,l1)=>{"use strict";m();T();N();l1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var p1=w(f1=>{"use strict";m();T();N();var nle=c1(),rle=d1(),ile=rle.concat("length","prototype");f1.f=Object.getOwnPropertyNames||function(t){return nle(t,ile)}});var N1=w(m1=>{"use strict";m();T();N();m1.f=Object.getOwnPropertySymbols});var E1=w((XCe,T1)=>{"use strict";m();T();N();var ale=OE(),sle=yi(),ole=p1(),ule=N1(),cle=Np(),lle=sle([].concat);T1.exports=ale("Reflect","ownKeys")||function(t){var n=ole.f(cle(t)),r=ule.f;return r?lle(n,r(t)):n}});var I1=w((nBe,y1)=>{"use strict";m();T();N();var h1=Lu(),dle=E1(),fle=lD(),ple=PE();y1.exports=function(e,t,n){for(var r=dle(t),i=ple.f,a=fle.f,o=0;o{"use strict";m();T();N();var mle=ks(),Nle=Oa(),Tle=/#|\.prototype\./,Ep=function(e,t){var n=hle[Ele(e)];return n===Ile?!0:n===yle?!1:Nle(t)?mle(t):!!t},Ele=Ep.normalize=function(e){return String(e).replace(Tle,".").toLowerCase()},hle=Ep.data={},yle=Ep.NATIVE="N",Ile=Ep.POLYFILL="P";g1.exports=Ep});var DD=w((lBe,v1)=>{"use strict";m();T();N();var UE=ea(),gle=lD().f,_le=ND(),vle=Jq(),Ole=bE(),Sle=I1(),Dle=_1();v1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,u,l,d,p;if(r?o=UE:i?o=UE[n]||Ole(n,{}):o=UE[n]&&UE[n].prototype,o)for(u in t){if(d=t[u],e.dontCallGetSet?(p=gle(o,u),l=p&&p.value):l=o[u],a=Dle(r?u:n+(i?".":"#")+u,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Sle(d,l)}(e.sham||l&&l.sham)&&_le(d,"sham",!0),vle(o,u,d,e)}}});var hp=w((mBe,O1)=>{"use strict";m();T();N();var bD=yi(),kE=Set.prototype;O1.exports={Set,add:bD(kE.add),has:bD(kE.has),remove:bD(kE.delete),proto:kE}});var AD=w((hBe,S1)=>{"use strict";m();T();N();var ble=hp().has;S1.exports=function(e){return ble(e),e}});var b1=w((_Be,D1)=>{"use strict";m();T();N();var Ale=yi(),Rle=DE();D1.exports=function(e,t,n){try{return Ale(Rle(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var RD=w((DBe,A1)=>{"use strict";m();T();N();var Ple=b1(),Fle=hp();A1.exports=Ple(Fle.proto,"size","get")||function(e){return e.size}});var PD=w((PBe,R1)=>{"use strict";m();T();N();var wle=Uc();R1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=wle(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var B1=w((CBe,C1)=>{"use strict";m();T();N();var P1=yi(),Lle=PD(),F1=hp(),Cle=F1.Set,w1=F1.proto,Ble=P1(w1.forEach),L1=P1(w1.keys),Ule=L1(new Cle).next;C1.exports=function(e,t,n){return n?Lle({iterator:L1(e),next:Ule},t):Ble(e,t)}});var k1=w((MBe,U1)=>{"use strict";m();T();N();U1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var FD=w((jBe,K1)=>{"use strict";m();T();N();var M1=DE(),V1=Np(),x1=Uc(),kle=BE(),Mle=k1(),q1="Invalid size",xle=RangeError,qle=TypeError,Vle=Math.max,j1=function(e,t){this.set=e,this.size=Vle(t,0),this.has=M1(e.has),this.keys=M1(e.keys)};j1.prototype={getIterator:function(){return Mle(V1(x1(this.keys,this.set)))},includes:function(e){return x1(this.has,this.set,e)}};K1.exports=function(e){V1(e);var t=+e.size;if(t!==t)throw new qle(q1);var n=kle(t);if(n<0)throw new xle(q1);return new j1(e,n)}});var G1=w((QBe,$1)=>{"use strict";m();T();N();var jle=AD(),Kle=RD(),$le=B1(),Gle=FD();$1.exports=function(t){var n=jle(this),r=Gle(t);return Kle(n)>r.size?!1:$le(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var wD=w((zBe,J1)=>{"use strict";m();T();N();var Qle=OE(),Q1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Y1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};J1.exports=function(e,t){var n=Qle("Set");try{new n()[e](Q1(0));try{return new n()[e](Q1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](Y1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](Y1(1/0)))}}}catch(i){return!1}}});var H1=w(()=>{"use strict";m();T();N();var Yle=DD(),Jle=G1(),Hle=wD(),zle=!Hle("isSubsetOf",function(e){return e});Yle({target:"Set",proto:!0,real:!0,forced:zle},{isSubsetOf:Jle})});var z1=w(()=>{"use strict";m();T();N();H1()});var Z1=w((lUe,X1)=>{"use strict";m();T();N();var Wle=Uc(),W1=Np(),Xle=eD();X1.exports=function(e,t,n){var r,i;W1(e);try{if(r=Xle(e,"return"),!r){if(t==="throw")throw n;return n}r=Wle(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return W1(r),n}});var tV=w((mUe,eV)=>{"use strict";m();T();N();var Zle=AD(),ede=hp().has,tde=RD(),nde=FD(),rde=PD(),ide=Z1();eV.exports=function(t){var n=Zle(this),r=nde(t);if(tde(n){"use strict";m();T();N();var ade=DD(),sde=tV(),ode=wD(),ude=!ode("isSupersetOf",function(e){return!e});ade({target:"Set",proto:!0,real:!0,forced:ude},{isSupersetOf:sde})});var rV=w(()=>{"use strict";m();T();N();nV()});var yp=w(Pn=>{"use strict";m();T();N();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.subtractSet=lde;Pn.mapToArrayOfValues=dde;Pn.kindToConvertedTypeString=fde;Pn.fieldDatasToSimpleFieldDatas=pde;Pn.isNodeLeaf=mde;Pn.newEntityInterfaceFederationData=Nde;Pn.upsertEntityInterfaceFederationData=Tde;Pn.upsertEntityData=hde;Pn.updateEntityData=iV;Pn.newFieldAuthorizationData=yde;Pn.newAuthorizationData=Ide;Pn.addScopes=LD;Pn.mergeRequiredScopesByAND=qE;Pn.mergeRequiredScopesByOR=CD;Pn.upsertFieldAuthorizationData=aV;Pn.upsertAuthorizationData=vde;Pn.upsertAuthorizationConfiguration=Ode;Pn.isObjectNodeKind=Sde;Pn.isCompositeOutputNodeKind=Dde;Pn.isObjectDefinitionData=bde;Pn.getNodeCoords=Ade;var Kt=Ie(),ai=zn(),ME=wr(),xE=Du();z1();rV();var cde=dd();function lde(e,t){for(let n of e)t.delete(n)}function dde(e){let t=[];for(let n of e.values())t.push(n);return t}function fde(e){switch(e){case Kt.Kind.BOOLEAN:return ai.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:case Kt.Kind.ENUM_TYPE_EXTENSION:return ai.ENUM;case Kt.Kind.ENUM_VALUE_DEFINITION:return ai.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return ai.FIELD;case Kt.Kind.FLOAT:return ai.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ai.INPUT_OBJECT;case Kt.Kind.INPUT_VALUE_DEFINITION:return ai.INPUT_VALUE;case Kt.Kind.INT:return ai.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_EXTENSION:return ai.INTERFACE;case Kt.Kind.NULL:return ai.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.OBJECT_TYPE_EXTENSION:return ai.OBJECT;case Kt.Kind.STRING:return ai.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:case Kt.Kind.SCALAR_TYPE_EXTENSION:return ai.SCALAR;case Kt.Kind.UNION_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_EXTENSION:return ai.UNION;default:return e}}function pde(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function mde(e){if(!e)return!0;switch(e){case Kt.Kind.OBJECT_TYPE_DEFINITION:case Kt.Kind.INTERFACE_TYPE_DEFINITION:case Kt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Nde(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Tde(e,t,n){(0,ME.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,ME.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,ME.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function Ede({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:u}]of e)u||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function hde({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?iV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,Ede({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function iV({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function yde(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Ide(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function LD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function qE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,ME.addSets)(r,i);LD(n,a)}return n}function CD(e,t){for(let n of t)LD(e,n);return e.length<=xE.MAX_OR_SCOPES}function aV(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!CD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>xE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>xE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=qE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=qE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,sV(t)),!0)}function gde(e){let t=new Map;for(let[n,r]of e)t.set(n,sV(r));return t}function sV(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function _de(e){return{fieldAuthDataByFieldName:gde(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function vde(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,_de(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!CD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>xE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=qE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)aV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Ode(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(u=>[...u]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(u=>[...u])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(u=>[...u]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(u=>[...u])})}}function Sde(e){return e===Kt.Kind.OBJECT_TYPE_DEFINITION||e===Kt.Kind.OBJECT_TYPE_EXTENSION}function Dde(e){return cde.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function bde(e){return e?e.kind===Kt.Kind.OBJECT_TYPE_DEFINITION:!1}function Ade(e){switch(e.kind){case Kt.Kind.ARGUMENT:case Kt.Kind.FIELD_DEFINITION:case Kt.Kind.INPUT_VALUE_DEFINITION:case Kt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var BD=w(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION_DATA=Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ke.SHAREABLE_DEFINITION_DATA=Ke.SPECIFIED_BY_DEFINITION_DATA=Ke.SEMANTIC_NON_NULL_DATA=Ke.REQUIRES_SCOPES_DEFINITION_DATA=Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ke.REDIS_SUBSCRIBE_DEFINITION_DATA=Ke.REDIS_PUBLISH_DEFINITION_DATA=Ke.REQUIRES_DEFINITION_DATA=Ke.PROVIDES_DEFINITION_DATA=Ke.LINK_DEFINITION_DATA=Ke.KEY_DEFINITION_DATA=Ke.OVERRIDE_DEFINITION_DATA=Ke.ONE_OF_DEFINITION_DATA=Ke.NATS_SUBSCRIBE_DEFINITION_DATA=Ke.NATS_REQUEST_DEFINITION_DATA=Ke.NATS_PUBLISH_DEFINITION_DATA=Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ke.KAFKA_PUBLISH_DEFINITION_DATA=Ke.INTERFACE_OBJECT_DEFINITION_DATA=Ke.INACCESSIBLE_DEFINITION_DATA=Ke.EXTERNAL_DEFINITION_DATA=Ke.EXTENDS_DEFINITION_DATA=Ke.DEPRECATED_DEFINITION_DATA=Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ke.AUTHENTICATED_DEFINITION_DATA=void 0;var ta=Fr(),$t=Ie(),x=zn(),en=Qf(),Fn=hT();Ke.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,ta.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,ta.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,ta.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ke.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,ta.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:$t.Kind.STRING,value:$t.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ke.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ke.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,ta.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ke.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ke.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,ta.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ke.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,ta.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,ta.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:$t.Kind.LIST_TYPE,type:(0,ta.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ke.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:Fn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ke.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Fn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:Fn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,ta.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ke.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,ta.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:$t.Kind.LIST,values:[{kind:$t.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ke.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ke.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,ta.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ke.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:Fn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var Ip=w(ba=>{"use strict";m();T();N();Object.defineProperty(ba,"__esModule",{value:!0});ba.newFieldSetData=Rde;ba.extractFieldSetValue=Pde;ba.getNormalizedFieldSet=Fde;ba.getInitialFieldCoordsPath=wde;ba.validateKeyFieldSets=Lde;ba.getConditionalFieldSetDirectiveName=Cde;ba.isNodeQuery=Bde;ba.validateArgumentTemplateReferences=Ude;ba.initializeDirectiveDefinitionDatas=kde;var $n=Ie(),oV=Fr(),Or=Ki(),uV=Du(),UD=Su(),tn=BD(),It=zn(),Ms=wr();function Rde(){return{provides:new Map,requires:new Map}}function Pde(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==It.FIELDS||i.value.kind!==$n.Kind.STRING||t.set(e,i.value.value)}function Fde(e){return(0,$n.print)((0,oV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function wde(e,t){return e?[t]:[]}function Lde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=[],u=r?void 0:e.internalGraph.addEntityDataNode(t.name),l=e.internalGraph.addOrUpdateNode(t.name),d=0;for(let[p,{documentNode:E,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let A=[],U=[t],j=[],Q=[],re=new Set,ee=-1,me=!0,ue="";if((0,$n.visit)(E,{Argument:{enter(Ae){return A.push((0,Or.unexpectedArgumentErrorMessage)(v,`${U[ee].name}.${ue}`,Ae.name.value)),$n.BREAK}},Field:{enter(Ae){let Me=U[ee],Ze=Me.name;if(me){let wn=`${Ze}.${ue}`,Gt=Me.fieldDataByName.get(ue);if(!Gt)return A.push((0,Or.undefinedFieldInFieldSetErrorMessage)(v,wn,ue)),$n.BREAK;let Tn=(0,UD.getTypeNodeNamedTypeName)(Gt.node.type),kr=e.parentDefinitionDataByTypeName.get(Tn),dr=kr?kr.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,Or.invalidSelectionSetErrorMessage)(v,[wn],Tn,(0,Ms.kindToNodeType)(dr))),$n.BREAK}let Z=Ae.name.value,ve=`${Ze}.${Z}`;if(ue=Z,Z===It.TYPENAME)return;let vt=Me.fieldDataByName.get(Z);if(!vt)return A.push((0,Or.undefinedFieldInFieldSetErrorMessage)(v,Ze,Z)),$n.BREAK;if(vt.argumentDataByName.size)return A.push((0,Or.argumentsInKeyFieldSetErrorMessage)(v,ve)),$n.BREAK;if(j[ee].has(Z))return A.push((0,Or.duplicateFieldInFieldSetErrorMessage)(v,ve)),$n.BREAK;(0,Ms.getValueOrDefault)((0,Ms.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,ve,()=>new Map),i,()=>new Set).add(p),Q.push(Z),vt.isShareableBySubgraphName.set(e.subgraphName,!0),j[ee].add(Z),(0,Ms.getValueOrDefault)(e.keyFieldNamesByParentTypeName,Ze,()=>new Set).add(Z);let rn=(0,UD.getTypeNodeNamedTypeName)(vt.node.type);if(uV.BASE_SCALARS.has(rn)){re.add(Q.join(It.LITERAL_PERIOD)),Q.pop();return}let an=e.parentDefinitionDataByTypeName.get(rn);if(!an)return A.push((0,Or.unknownTypeInFieldSetErrorMessage)(v,ve,rn)),$n.BREAK;if(an.kind===$n.Kind.OBJECT_TYPE_DEFINITION){me=!0,U.push(an);return}if((0,oV.isKindAbstract)(an.kind))return A.push((0,Or.abstractTypeInKeyFieldSetErrorMessage)(v,ve,rn,(0,Ms.kindToNodeType)(an.kind))),$n.BREAK;re.add(Q.join(It.LITERAL_PERIOD)),Q.pop()}},InlineFragment:{enter(){return A.push(Or.inlineFragmentInFieldSetErrorMessage),$n.BREAK}},SelectionSet:{enter(){if(!me){let Ae=U[ee],Ze=`${Ae.name}.${ue}`;if(ue===It.TYPENAME)return A.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],It.STRING_SCALAR,(0,Ms.kindToNodeType)($n.Kind.SCALAR_TYPE_DEFINITION))),$n.BREAK;let Z=Ae.fieldDataByName.get(ue);if(!Z)return A.push((0,Or.undefinedFieldInFieldSetErrorMessage)(v,Ze,ue)),$n.BREAK;let ve=(0,UD.getTypeNodeNamedTypeName)(Z.node.type),vt=e.parentDefinitionDataByTypeName.get(ve),rn=vt?vt.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return A.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(v,[Ze],ve,(0,Ms.kindToNodeType)(rn))),$n.BREAK}if(ee+=1,me=!1,ee<0||ee>=U.length)return A.push((0,Or.unparsableFieldSetSelectionErrorMessage)(v,ue)),$n.BREAK;j.push(new Set)},leave(){if(me){let Me=U[ee].name,Ze=U[ee+1],Z=`${Me}.${ue}`;A.push((0,Or.invalidSelectionSetErrorMessage)(v,[Z],Ze.name,(0,Ms.kindToNodeType)(Ze.kind))),me=!1}ee-=1,U.pop(),j.pop()}}}),A.length>0){e.errors.push((0,Or.invalidDirectiveError)(It.KEY,i,(0,Ms.numberToOrdinal)(d),A));continue}a.push(k({fieldName:"",selectionSet:p},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(p),!I&&(u==null||u.addTargetSubgraphByFieldSet(p,e.subgraphName),o.push(re))}if(a.length>0)return a}function Cde(e){return e?It.PROVIDES:It.REQUIRES}function Bde(e,t){return e===It.QUERY||t===$n.OperationTypeNode.QUERY}function Ude(e,t,n){let r=e.matchAll(uV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,Or.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Or.invalidEventSubjectsArgumentErrorMessage)(o))}function kde(){return new Map([[It.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[It.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[It.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[It.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[It.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[It.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[It.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[It.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[It.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[It.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[It.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[It.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[It.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[It.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[It.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[It.KEY,tn.KEY_DEFINITION_DATA],[It.LINK,tn.LINK_DEFINITION_DATA],[It.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[It.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[It.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[It.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[It.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[It.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[It.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[It.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[It.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[It.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[It.TAG,tn.TAG_DEFINITION_DATA]])}});var MD=w(kD=>{"use strict";m();T();N();Object.defineProperty(kD,"__esModule",{value:!0});kD.recordSubgraphName=Mde;function Mde(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var qD=w(VE=>{"use strict";m();T();N();Object.defineProperty(VE,"__esModule",{value:!0});VE.Warning=void 0;var xD=class extends Error{constructor(n){super(n.message);g(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};VE.Warning=xD});var gp=w(Ii=>{"use strict";m();T();N();Object.defineProperty(Ii,"__esModule",{value:!0});Ii.invalidOverrideTargetSubgraphNameWarning=xde;Ii.externalInterfaceFieldsWarning=qde;Ii.nonExternalConditionalFieldWarning=Vde;Ii.unimplementedInterfaceOutputTypeWarning=jde;Ii.invalidExternalFieldWarning=Kde;Ii.requiresDefinedOnNonEntityFieldWarning=$de;Ii.consumerInactiveThresholdInvalidValueWarning=Gde;Ii.externalEntityExtensionKeyFieldWarning=Qde;Ii.fieldAlreadyProvidedWarning=Yde;Ii.singleSubgraphInputFieldOneOfWarning=Jde;Ii.singleFederatedInputFieldOneOfWarning=Hde;var Aa=qD(),VD=zn();function xde(e,t,n,r){return new Aa.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(VD.QUOTATION_JOIN)+`". +`;return n+=`The list value provided to the "levels" argument must be consistently defined across all subgraphs that define "@semanticNonNull" on field "${t}".`,new Error(n)}function voe({requiredFieldNames:e,typeName:t}){return new Error(`The "@oneOf" directive defined on Input Object "${t}" is invalid because all Input fields must be optional (nullable); however, the following Input field`+(e.length>1?"s are":" is")+' required (non-nullable): "'+e.join(Ye.QUOTATION_JOIN)+'".')}});var ex=w(ZM=>{"use strict";m();T();N();Object.defineProperty(ZM,"__esModule",{value:!0})});var yE=w(hE=>{"use strict";m();T();N();Object.defineProperty(hE,"__esModule",{value:!0});hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;hE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var IE=w(hr=>{"use strict";m();T();N();Object.defineProperty(hr,"__esModule",{value:!0});hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION=hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=hr.SCOPE_SCALAR_DEFINITION=hr.LINK_PURPOSE_DEFINITION=hr.LINK_IMPORT_DEFINITION=hr.FIELD_SET_SCALAR_DEFINITION=hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=void 0;var Zt=Ie(),fn=Fr(),pn=zn(),Ooe=yE();hr.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_INACTIVE_THRESHOLD),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.INT_SCALAR)},defaultValue:{kind:Zt.Kind.INT,value:Ooe.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.CONSUMER_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.STREAM_NAME),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}}]};hr.FIELD_SET_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_SET_SCALAR)};hr.LINK_IMPORT_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_IMPORT)};hr.LINK_PURPOSE_DEFINITION={kind:Zt.Kind.ENUM_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.LINK_PURPOSE),values:[{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.EXECUTION)},{directives:[],kind:Zt.Kind.ENUM_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SECURITY)}]};hr.SCOPE_SCALAR_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SCOPE_SCALAR)};hr.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.FIELD_PATH),type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.STRING_SCALAR)}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.VALUES),type:{kind:Zt.Kind.NON_NULL_TYPE,type:{kind:Zt.Kind.LIST_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_VALUE)}}}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FIELD_CONDITION)};hr.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.AND_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.IN_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FIELD_CONDITION)},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.OR_UPPER),type:{kind:Zt.Kind.LIST_TYPE,type:{kind:Zt.Kind.NON_NULL_TYPE,type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:Zt.Kind.INPUT_VALUE_DEFINITION,name:(0,fn.stringToNameNode)(pn.NOT_UPPER),type:(0,fn.stringToNamedTypeNode)(pn.SUBSCRIPTION_FILTER_CONDITION)}],kind:Zt.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_CONDITION)};hr.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:Zt.Kind.SCALAR_TYPE_DEFINITION,name:(0,fn.stringToNameNode)(pn.SUBSCRIPTION_FILTER_VALUE)}});var dd=w(tr=>{"use strict";m();T();N();Object.defineProperty(tr,"__esModule",{value:!0});tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=tr.IGNORED_FEDERATED_TYPE_NAMES=tr.DEPENDENCIES_BY_DIRECTIVE_NAME=tr.COMPOSITE_OUTPUT_NODE_KINDS=tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=tr.SUBSCRIPTION_FILTER_INPUT_NAMES=tr.STREAM_CONFIGURATION_FIELD_NAMES=tr.EVENT_DIRECTIVE_NAMES=tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var nt=zn(),gE=Ie(),Oa=IE();tr.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([nt.ARGUMENT_DEFINITION_UPPER,nt.ENUM_UPPER,nt.ENUM_VALUE_UPPER,nt.FIELD_DEFINITION_UPPER,nt.INPUT_FIELD_DEFINITION_UPPER,nt.INPUT_OBJECT_UPPER,nt.INTERFACE_UPPER,nt.OBJECT_UPPER,nt.SCALAR_UPPER,nt.SCHEMA_UPPER,nt.UNION_UPPER]);tr.EVENT_DIRECTIVE_NAMES=new Set([nt.EDFS_KAFKA_PUBLISH,nt.EDFS_KAFKA_SUBSCRIBE,nt.EDFS_NATS_PUBLISH,nt.EDFS_NATS_REQUEST,nt.EDFS_NATS_SUBSCRIBE,nt.EDFS_REDIS_PUBLISH,nt.EDFS_REDIS_SUBSCRIBE]);tr.STREAM_CONFIGURATION_FIELD_NAMES=new Set([nt.CONSUMER_INACTIVE_THRESHOLD,nt.CONSUMER_NAME,nt.STREAM_NAME]);tr.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([nt.AND_UPPER,nt.IN_UPPER,nt.NOT_UPPER,nt.OR_UPPER]);tr.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([nt.AND_UPPER,nt.OR_UPPER]);tr.COMPOSITE_OUTPUT_NODE_KINDS=new Set([gE.Kind.INTERFACE_TYPE_DEFINITION,gE.Kind.INTERFACE_TYPE_EXTENSION,gE.Kind.OBJECT_TYPE_DEFINITION,gE.Kind.OBJECT_TYPE_EXTENSION]);tr.DEPENDENCIES_BY_DIRECTIVE_NAME=new Map([[nt.CONNECT_FIELD_RESOLVER,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.EDFS_NATS_SUBSCRIBE,[Oa.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION]],[nt.KEY,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.LINK,[Oa.LINK_IMPORT_DEFINITION,Oa.LINK_PURPOSE_DEFINITION]],[nt.PROVIDES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES,[Oa.FIELD_SET_SCALAR_DEFINITION]],[nt.REQUIRES_SCOPES,[Oa.SCOPE_SCALAR_DEFINITION]],[nt.SUBSCRIPTION_FILTER,[Oa.SUBSCRIPTION_FIELD_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_CONDITION_DEFINITION,Oa.SUBSCRIPTION_FILTER_VALUE_DEFINITION]]]);tr.IGNORED_FEDERATED_TYPE_NAMES=new Set([nt.BOOLEAN_SCALAR,nt.EDFS_NATS_STREAM_CONFIGURATION,nt.FIELD_SET_SCALAR,nt.ID_SCALAR,nt.INT_SCALAR,nt.FLOAT_SCALAR,nt.LINK_IMPORT,nt.LINK_PURPOSE,nt.STRING_SCALAR,nt.SUBSCRIPTION_FIELD_CONDITION,nt.SUBSCRIPTION_FILTER_CONDITION,nt.SUBSCRIPTION_FILTER_VALUE]);tr.CLIENT_PERSISTED_DIRECTIVE_NAMES=new Set([nt.DEPRECATED,nt.ONE_OF,nt.SEMANTIC_NON_NULL])});var ta=w((VS,tx)=>{"use strict";m();T();N();var mp=function(e){return e&&e.Math===Math&&e};tx.exports=mp(typeof globalThis=="object"&&globalThis)||mp(typeof window=="object"&&window)||mp(typeof self=="object"&&self)||mp(typeof global=="object"&&global)||mp(typeof VS=="object"&&VS)||function(){return this}()||Function("return this")()});var ks=w((APe,nx)=>{"use strict";m();T();N();nx.exports=function(e){try{return!!e()}catch(t){return!0}}});var wu=w((wPe,rx)=>{"use strict";m();T();N();var Soe=ks();rx.exports=!Soe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var jS=w((UPe,ix)=>{"use strict";m();T();N();var Doe=ks();ix.exports=!Doe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Uc=w((qPe,ax)=>{"use strict";m();T();N();var boe=jS(),_E=Function.prototype.call;ax.exports=boe?_E.bind(_E):function(){return _E.apply(_E,arguments)}});var cx=w(ux=>{"use strict";m();T();N();var sx={}.propertyIsEnumerable,ox=Object.getOwnPropertyDescriptor,Aoe=ox&&!sx.call({1:2},1);ux.f=Aoe?function(t){var n=ox(this,t);return!!n&&n.enumerable}:sx});var KS=w((JPe,lx)=>{"use strict";m();T();N();lx.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ii=w((XPe,px)=>{"use strict";m();T();N();var dx=jS(),fx=Function.prototype,$S=fx.call,Roe=dx&&fx.bind.bind($S,$S);px.exports=dx?Roe:function(e){return function(){return $S.apply(e,arguments)}}});var Tx=w((nFe,Nx)=>{"use strict";m();T();N();var mx=Ii(),Poe=mx({}.toString),Foe=mx("".slice);Nx.exports=function(e){return Foe(Poe(e),8,-1)}});var hx=w((sFe,Ex)=>{"use strict";m();T();N();var woe=Ii(),Loe=ks(),Coe=Tx(),GS=Object,Boe=woe("".split);Ex.exports=Loe(function(){return!GS("z").propertyIsEnumerable(0)})?function(e){return Coe(e)==="String"?Boe(e,""):GS(e)}:GS});var QS=w((lFe,yx)=>{"use strict";m();T();N();yx.exports=function(e){return e==null}});var YS=w((mFe,Ix)=>{"use strict";m();T();N();var Uoe=QS(),koe=TypeError;Ix.exports=function(e){if(Uoe(e))throw new koe("Can't call method on "+e);return e}});var vE=w((hFe,gx)=>{"use strict";m();T();N();var Moe=hx(),xoe=YS();gx.exports=function(e){return Moe(xoe(e))}});var Sa=w((_Fe,_x)=>{"use strict";m();T();N();var JS=typeof document=="object"&&document.all;_x.exports=typeof JS=="undefined"&&JS!==void 0?function(e){return typeof e=="function"||e===JS}:function(e){return typeof e=="function"}});var fd=w((DFe,vx)=>{"use strict";m();T();N();var qoe=Sa();vx.exports=function(e){return typeof e=="object"?e!==null:qoe(e)}});var OE=w((PFe,Ox)=>{"use strict";m();T();N();var HS=ta(),Voe=Sa(),joe=function(e){return Voe(e)?e:void 0};Ox.exports=function(e,t){return arguments.length<2?joe(HS[e]):HS[e]&&HS[e][t]}});var Dx=w((CFe,Sx)=>{"use strict";m();T();N();var Koe=Ii();Sx.exports=Koe({}.isPrototypeOf)});var Px=w((MFe,Rx)=>{"use strict";m();T();N();var $oe=ta(),bx=$oe.navigator,Ax=bx&&bx.userAgent;Rx.exports=Ax?String(Ax):""});var kx=w((jFe,Ux)=>{"use strict";m();T();N();var Bx=ta(),zS=Px(),Fx=Bx.process,wx=Bx.Deno,Lx=Fx&&Fx.versions||wx&&wx.version,Cx=Lx&&Lx.v8,Da,SE;Cx&&(Da=Cx.split("."),SE=Da[0]>0&&Da[0]<4?1:+(Da[0]+Da[1]));!SE&&zS&&(Da=zS.match(/Edge\/(\d+)/),(!Da||Da[1]>=74)&&(Da=zS.match(/Chrome\/(\d+)/),Da&&(SE=+Da[1])));Ux.exports=SE});var WS=w((QFe,xx)=>{"use strict";m();T();N();var Mx=kx(),Goe=ks(),Qoe=ta(),Yoe=Qoe.String;xx.exports=!!Object.getOwnPropertySymbols&&!Goe(function(){var e=Symbol("symbol detection");return!Yoe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mx&&Mx<41})});var XS=w((zFe,qx)=>{"use strict";m();T();N();var Joe=WS();qx.exports=Joe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ZS=w((ewe,Vx)=>{"use strict";m();T();N();var Hoe=OE(),zoe=Sa(),Woe=Dx(),Xoe=XS(),Zoe=Object;Vx.exports=Xoe?function(e){return typeof e=="symbol"}:function(e){var t=Hoe("Symbol");return zoe(t)&&Woe(t.prototype,Zoe(e))}});var Kx=w((iwe,jx)=>{"use strict";m();T();N();var eue=String;jx.exports=function(e){try{return eue(e)}catch(t){return"Object"}}});var DE=w((uwe,$x)=>{"use strict";m();T();N();var tue=Sa(),nue=Kx(),rue=TypeError;$x.exports=function(e){if(tue(e))return e;throw new rue(nue(e)+" is not a function")}});var eD=w((fwe,Gx)=>{"use strict";m();T();N();var iue=DE(),aue=QS();Gx.exports=function(e,t){var n=e[t];return aue(n)?void 0:iue(n)}});var Yx=w((Twe,Qx)=>{"use strict";m();T();N();var tD=Uc(),nD=Sa(),rD=fd(),sue=TypeError;Qx.exports=function(e,t){var n,r;if(t==="string"&&nD(n=e.toString)&&!rD(r=tD(n,e))||nD(n=e.valueOf)&&!rD(r=tD(n,e))||t!=="string"&&nD(n=e.toString)&&!rD(r=tD(n,e)))return r;throw new sue("Can't convert object to primitive value")}});var Hx=w((Iwe,Jx)=>{"use strict";m();T();N();Jx.exports=!1});var bE=w((Owe,Wx)=>{"use strict";m();T();N();var zx=ta(),oue=Object.defineProperty;Wx.exports=function(e,t){try{oue(zx,e,{value:t,configurable:!0,writable:!0})}catch(n){zx[e]=t}return t}});var AE=w((Awe,eq)=>{"use strict";m();T();N();var uue=Hx(),cue=ta(),lue=bE(),Xx="__core-js_shared__",Zx=eq.exports=cue[Xx]||lue(Xx,{});(Zx.versions||(Zx.versions=[])).push({version:"3.41.0",mode:uue?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var iD=w((wwe,nq)=>{"use strict";m();T();N();var tq=AE();nq.exports=function(e,t){return tq[e]||(tq[e]=t||{})}});var iq=w((Uwe,rq)=>{"use strict";m();T();N();var due=YS(),fue=Object;rq.exports=function(e){return fue(due(e))}});var Lu=w((qwe,aq)=>{"use strict";m();T();N();var pue=Ii(),mue=iq(),Nue=pue({}.hasOwnProperty);aq.exports=Object.hasOwn||function(t,n){return Nue(mue(t),n)}});var aD=w(($we,sq)=>{"use strict";m();T();N();var Tue=Ii(),Eue=0,hue=Math.random(),yue=Tue(1 .toString);sq.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+yue(++Eue+hue,36)}});var cq=w((Jwe,uq)=>{"use strict";m();T();N();var Iue=ta(),gue=iD(),oq=Lu(),_ue=aD(),vue=WS(),Oue=XS(),pd=Iue.Symbol,sD=gue("wks"),Sue=Oue?pd.for||pd:pd&&pd.withoutSetter||_ue;uq.exports=function(e){return oq(sD,e)||(sD[e]=vue&&oq(pd,e)?pd[e]:Sue("Symbol."+e)),sD[e]}});var pq=w((Xwe,fq)=>{"use strict";m();T();N();var Due=Uc(),lq=fd(),dq=ZS(),bue=eD(),Aue=Yx(),Rue=cq(),Pue=TypeError,Fue=Rue("toPrimitive");fq.exports=function(e,t){if(!lq(e)||dq(e))return e;var n=bue(e,Fue),r;if(n){if(t===void 0&&(t="default"),r=Due(n,e,t),!lq(r)||dq(r))return r;throw new Pue("Can't convert object to primitive value")}return t===void 0&&(t="number"),Aue(e,t)}});var oD=w((nLe,mq)=>{"use strict";m();T();N();var wue=pq(),Lue=ZS();mq.exports=function(e){var t=wue(e,"string");return Lue(t)?t:t+""}});var Eq=w((sLe,Tq)=>{"use strict";m();T();N();var Cue=ta(),Nq=fd(),uD=Cue.document,Bue=Nq(uD)&&Nq(uD.createElement);Tq.exports=function(e){return Bue?uD.createElement(e):{}}});var cD=w((lLe,hq)=>{"use strict";m();T();N();var Uue=wu(),kue=ks(),Mue=Eq();hq.exports=!Uue&&!kue(function(){return Object.defineProperty(Mue("div"),"a",{get:function(){return 7}}).a!==7})});var lD=w(Iq=>{"use strict";m();T();N();var xue=wu(),que=Uc(),Vue=cx(),jue=KS(),Kue=vE(),$ue=oD(),Gue=Lu(),Que=cD(),yq=Object.getOwnPropertyDescriptor;Iq.f=xue?yq:function(t,n){if(t=Kue(t),n=$ue(n),Que)try{return yq(t,n)}catch(r){}if(Gue(t,n))return jue(!que(Vue.f,t,n),t[n])}});var _q=w((hLe,gq)=>{"use strict";m();T();N();var Yue=wu(),Jue=ks();gq.exports=Yue&&Jue(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Np=w((_Le,vq)=>{"use strict";m();T();N();var Hue=fd(),zue=String,Wue=TypeError;vq.exports=function(e){if(Hue(e))return e;throw new Wue(zue(e)+" is not an object")}});var PE=w(Sq=>{"use strict";m();T();N();var Xue=wu(),Zue=cD(),ece=_q(),RE=Np(),Oq=oD(),tce=TypeError,dD=Object.defineProperty,nce=Object.getOwnPropertyDescriptor,fD="enumerable",pD="configurable",mD="writable";Sq.f=Xue?ece?function(t,n,r){if(RE(t),n=Oq(n),RE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&mD in r&&!r[mD]){var i=nce(t,n);i&&i[mD]&&(t[n]=r.value,r={configurable:pD in r?r[pD]:i[pD],enumerable:fD in r?r[fD]:i[fD],writable:!1})}return dD(t,n,r)}:dD:function(t,n,r){if(RE(t),n=Oq(n),RE(r),Zue)try{return dD(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new tce("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var ND=w((PLe,Dq)=>{"use strict";m();T();N();var rce=wu(),ice=PE(),ace=KS();Dq.exports=rce?function(e,t,n){return ice.f(e,t,ace(1,n))}:function(e,t,n){return e[t]=n,e}});var Rq=w((CLe,Aq)=>{"use strict";m();T();N();var TD=wu(),sce=Lu(),bq=Function.prototype,oce=TD&&Object.getOwnPropertyDescriptor,ED=sce(bq,"name"),uce=ED&&function(){}.name==="something",cce=ED&&(!TD||TD&&oce(bq,"name").configurable);Aq.exports={EXISTS:ED,PROPER:uce,CONFIGURABLE:cce}});var Fq=w((MLe,Pq)=>{"use strict";m();T();N();var lce=Ii(),dce=Sa(),hD=AE(),fce=lce(Function.toString);dce(hD.inspectSource)||(hD.inspectSource=function(e){return fce(e)});Pq.exports=hD.inspectSource});var Cq=w((jLe,Lq)=>{"use strict";m();T();N();var pce=ta(),mce=Sa(),wq=pce.WeakMap;Lq.exports=mce(wq)&&/native code/.test(String(wq))});var kq=w((QLe,Uq)=>{"use strict";m();T();N();var Nce=iD(),Tce=aD(),Bq=Nce("keys");Uq.exports=function(e){return Bq[e]||(Bq[e]=Tce(e))}});var yD=w((zLe,Mq)=>{"use strict";m();T();N();Mq.exports={}});var jq=w((eCe,Vq)=>{"use strict";m();T();N();var Ece=Cq(),qq=ta(),hce=fd(),yce=ND(),ID=Lu(),gD=AE(),Ice=kq(),gce=yD(),xq="Object already initialized",_D=qq.TypeError,_ce=qq.WeakMap,FE,Tp,wE,vce=function(e){return wE(e)?Tp(e):FE(e,{})},Oce=function(e){return function(t){var n;if(!hce(t)||(n=Tp(t)).type!==e)throw new _D("Incompatible receiver, "+e+" required");return n}};Ece||gD.state?(ba=gD.state||(gD.state=new _ce),ba.get=ba.get,ba.has=ba.has,ba.set=ba.set,FE=function(e,t){if(ba.has(e))throw new _D(xq);return t.facade=e,ba.set(e,t),t},Tp=function(e){return ba.get(e)||{}},wE=function(e){return ba.has(e)}):(kc=Ice("state"),gce[kc]=!0,FE=function(e,t){if(ID(e,kc))throw new _D(xq);return t.facade=e,yce(e,kc,t),t},Tp=function(e){return ID(e,kc)?e[kc]:{}},wE=function(e){return ID(e,kc)});var ba,kc;Vq.exports={set:FE,get:Tp,has:wE,enforce:vce,getterFor:Oce}});var Qq=w((iCe,Gq)=>{"use strict";m();T();N();var OD=Ii(),Sce=ks(),Dce=Sa(),LE=Lu(),vD=wu(),bce=Rq().CONFIGURABLE,Ace=Fq(),$q=jq(),Rce=$q.enforce,Pce=$q.get,Kq=String,CE=Object.defineProperty,Fce=OD("".slice),wce=OD("".replace),Lce=OD([].join),Cce=vD&&!Sce(function(){return CE(function(){},"length",{value:8}).length!==8}),Bce=String(String).split("String"),Uce=Gq.exports=function(e,t,n){Fce(Kq(t),0,7)==="Symbol("&&(t="["+wce(Kq(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!LE(e,"name")||bce&&e.name!==t)&&(vD?CE(e,"name",{value:t,configurable:!0}):e.name=t),Cce&&n&&LE(n,"arity")&&e.length!==n.arity&&CE(e,"length",{value:n.arity});try{n&&LE(n,"constructor")&&n.constructor?vD&&CE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Rce(e);return LE(r,"source")||(r.source=Lce(Bce,typeof t=="string"?t:"")),e};Function.prototype.toString=Uce(function(){return Dce(this)&&Pce(this).source||Ace(this)},"toString")});var Jq=w((uCe,Yq)=>{"use strict";m();T();N();var kce=Sa(),Mce=PE(),xce=Qq(),qce=bE();Yq.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(kce(n)&&xce(n,a,r),r.global)i?e[t]=n:qce(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Mce.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var zq=w((fCe,Hq)=>{"use strict";m();T();N();var Vce=Math.ceil,jce=Math.floor;Hq.exports=Math.trunc||function(t){var n=+t;return(n>0?jce:Vce)(n)}});var BE=w((TCe,Wq)=>{"use strict";m();T();N();var Kce=zq();Wq.exports=function(e){var t=+e;return t!==t||t===0?0:Kce(t)}});var Zq=w((ICe,Xq)=>{"use strict";m();T();N();var $ce=BE(),Gce=Math.max,Qce=Math.min;Xq.exports=function(e,t){var n=$ce(e);return n<0?Gce(n+t,0):Qce(n,t)}});var t1=w((OCe,e1)=>{"use strict";m();T();N();var Yce=BE(),Jce=Math.min;e1.exports=function(e){var t=Yce(e);return t>0?Jce(t,9007199254740991):0}});var r1=w((ACe,n1)=>{"use strict";m();T();N();var Hce=t1();n1.exports=function(e){return Hce(e.length)}});var s1=w((wCe,a1)=>{"use strict";m();T();N();var zce=vE(),Wce=Zq(),Xce=r1(),i1=function(e){return function(t,n,r){var i=zce(t),a=Xce(i);if(a===0)return!e&&-1;var o=Wce(r,a),u;if(e&&n!==n){for(;a>o;)if(u=i[o++],u!==u)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}};a1.exports={includes:i1(!0),indexOf:i1(!1)}});var c1=w((UCe,u1)=>{"use strict";m();T();N();var Zce=Ii(),SD=Lu(),ele=vE(),tle=s1().indexOf,nle=yD(),o1=Zce([].push);u1.exports=function(e,t){var n=ele(e),r=0,i=[],a;for(a in n)!SD(nle,a)&&SD(n,a)&&o1(i,a);for(;t.length>r;)SD(n,a=t[r++])&&(~tle(i,a)||o1(i,a));return i}});var d1=w((qCe,l1)=>{"use strict";m();T();N();l1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var p1=w(f1=>{"use strict";m();T();N();var rle=c1(),ile=d1(),ale=ile.concat("length","prototype");f1.f=Object.getOwnPropertyNames||function(t){return rle(t,ale)}});var N1=w(m1=>{"use strict";m();T();N();m1.f=Object.getOwnPropertySymbols});var E1=w((XCe,T1)=>{"use strict";m();T();N();var sle=OE(),ole=Ii(),ule=p1(),cle=N1(),lle=Np(),dle=ole([].concat);T1.exports=sle("Reflect","ownKeys")||function(t){var n=ule.f(lle(t)),r=cle.f;return r?dle(n,r(t)):n}});var I1=w((nBe,y1)=>{"use strict";m();T();N();var h1=Lu(),fle=E1(),ple=lD(),mle=PE();y1.exports=function(e,t,n){for(var r=fle(t),i=mle.f,a=ple.f,o=0;o{"use strict";m();T();N();var Nle=ks(),Tle=Sa(),Ele=/#|\.prototype\./,Ep=function(e,t){var n=yle[hle(e)];return n===gle?!0:n===Ile?!1:Tle(t)?Nle(t):!!t},hle=Ep.normalize=function(e){return String(e).replace(Ele,".").toLowerCase()},yle=Ep.data={},Ile=Ep.NATIVE="N",gle=Ep.POLYFILL="P";g1.exports=Ep});var DD=w((lBe,v1)=>{"use strict";m();T();N();var UE=ta(),_le=lD().f,vle=ND(),Ole=Jq(),Sle=bE(),Dle=I1(),ble=_1();v1.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,u,l,d,p;if(r?o=UE:i?o=UE[n]||Sle(n,{}):o=UE[n]&&UE[n].prototype,o)for(u in t){if(d=t[u],e.dontCallGetSet?(p=_le(o,u),l=p&&p.value):l=o[u],a=ble(r?u:n+(i?".":"#")+u,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Dle(d,l)}(e.sham||l&&l.sham)&&vle(d,"sham",!0),Ole(o,u,d,e)}}});var hp=w((mBe,O1)=>{"use strict";m();T();N();var bD=Ii(),kE=Set.prototype;O1.exports={Set,add:bD(kE.add),has:bD(kE.has),remove:bD(kE.delete),proto:kE}});var AD=w((hBe,S1)=>{"use strict";m();T();N();var Ale=hp().has;S1.exports=function(e){return Ale(e),e}});var b1=w((_Be,D1)=>{"use strict";m();T();N();var Rle=Ii(),Ple=DE();D1.exports=function(e,t,n){try{return Rle(Ple(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var RD=w((DBe,A1)=>{"use strict";m();T();N();var Fle=b1(),wle=hp();A1.exports=Fle(wle.proto,"size","get")||function(e){return e.size}});var PD=w((PBe,R1)=>{"use strict";m();T();N();var Lle=Uc();R1.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=Lle(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var B1=w((CBe,C1)=>{"use strict";m();T();N();var P1=Ii(),Cle=PD(),F1=hp(),Ble=F1.Set,w1=F1.proto,Ule=P1(w1.forEach),L1=P1(w1.keys),kle=L1(new Ble).next;C1.exports=function(e,t,n){return n?Cle({iterator:L1(e),next:kle},t):Ule(e,t)}});var k1=w((MBe,U1)=>{"use strict";m();T();N();U1.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var FD=w((jBe,K1)=>{"use strict";m();T();N();var M1=DE(),V1=Np(),x1=Uc(),Mle=BE(),xle=k1(),q1="Invalid size",qle=RangeError,Vle=TypeError,jle=Math.max,j1=function(e,t){this.set=e,this.size=jle(t,0),this.has=M1(e.has),this.keys=M1(e.keys)};j1.prototype={getIterator:function(){return xle(V1(x1(this.keys,this.set)))},includes:function(e){return x1(this.has,this.set,e)}};K1.exports=function(e){V1(e);var t=+e.size;if(t!==t)throw new Vle(q1);var n=Mle(t);if(n<0)throw new qle(q1);return new j1(e,n)}});var G1=w((QBe,$1)=>{"use strict";m();T();N();var Kle=AD(),$le=RD(),Gle=B1(),Qle=FD();$1.exports=function(t){var n=Kle(this),r=Qle(t);return $le(n)>r.size?!1:Gle(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var wD=w((zBe,J1)=>{"use strict";m();T();N();var Yle=OE(),Q1=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Y1=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};J1.exports=function(e,t){var n=Yle("Set");try{new n()[e](Q1(0));try{return new n()[e](Q1(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](Y1(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](Y1(1/0)))}}}catch(i){return!1}}});var H1=w(()=>{"use strict";m();T();N();var Jle=DD(),Hle=G1(),zle=wD(),Wle=!zle("isSubsetOf",function(e){return e});Jle({target:"Set",proto:!0,real:!0,forced:Wle},{isSubsetOf:Hle})});var z1=w(()=>{"use strict";m();T();N();H1()});var Z1=w((lUe,X1)=>{"use strict";m();T();N();var Xle=Uc(),W1=Np(),Zle=eD();X1.exports=function(e,t,n){var r,i;W1(e);try{if(r=Zle(e,"return"),!r){if(t==="throw")throw n;return n}r=Xle(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return W1(r),n}});var tV=w((mUe,eV)=>{"use strict";m();T();N();var ede=AD(),tde=hp().has,nde=RD(),rde=FD(),ide=PD(),ade=Z1();eV.exports=function(t){var n=ede(this),r=rde(t);if(nde(n){"use strict";m();T();N();var sde=DD(),ode=tV(),ude=wD(),cde=!ude("isSupersetOf",function(e){return!e});sde({target:"Set",proto:!0,real:!0,forced:cde},{isSupersetOf:ode})});var rV=w(()=>{"use strict";m();T();N();nV()});var yp=w(Fn=>{"use strict";m();T();N();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.subtractSet=dde;Fn.mapToArrayOfValues=fde;Fn.kindToConvertedTypeString=pde;Fn.fieldDatasToSimpleFieldDatas=mde;Fn.isNodeLeaf=Nde;Fn.newEntityInterfaceFederationData=Tde;Fn.upsertEntityInterfaceFederationData=Ede;Fn.upsertEntityData=yde;Fn.updateEntityData=iV;Fn.newFieldAuthorizationData=Ide;Fn.newAuthorizationData=gde;Fn.addScopes=LD;Fn.mergeRequiredScopesByAND=qE;Fn.mergeRequiredScopesByOR=CD;Fn.upsertFieldAuthorizationData=aV;Fn.upsertAuthorizationData=Ode;Fn.upsertAuthorizationConfiguration=Sde;Fn.isObjectNodeKind=Dde;Fn.isCompositeOutputNodeKind=bde;Fn.isObjectDefinitionData=Ade;Fn.getNodeCoords=Rde;var $t=Ie(),ai=zn(),ME=wr(),xE=Du();z1();rV();var lde=dd();function dde(e,t){for(let n of e)t.delete(n)}function fde(e){let t=[];for(let n of e.values())t.push(n);return t}function pde(e){switch(e){case $t.Kind.BOOLEAN:return ai.BOOLEAN_SCALAR;case $t.Kind.ENUM:case $t.Kind.ENUM_TYPE_DEFINITION:case $t.Kind.ENUM_TYPE_EXTENSION:return ai.ENUM;case $t.Kind.ENUM_VALUE_DEFINITION:return ai.ENUM_VALUE;case $t.Kind.FIELD_DEFINITION:return ai.FIELD;case $t.Kind.FLOAT:return ai.FLOAT_SCALAR;case $t.Kind.INPUT_OBJECT_TYPE_DEFINITION:case $t.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ai.INPUT_OBJECT;case $t.Kind.INPUT_VALUE_DEFINITION:return ai.INPUT_VALUE;case $t.Kind.INT:return ai.INT_SCALAR;case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_EXTENSION:return ai.INTERFACE;case $t.Kind.NULL:return ai.NULL;case $t.Kind.OBJECT:case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.OBJECT_TYPE_EXTENSION:return ai.OBJECT;case $t.Kind.STRING:return ai.STRING_SCALAR;case $t.Kind.SCALAR_TYPE_DEFINITION:case $t.Kind.SCALAR_TYPE_EXTENSION:return ai.SCALAR;case $t.Kind.UNION_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_EXTENSION:return ai.UNION;default:return e}}function mde(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Nde(e){if(!e)return!0;switch(e){case $t.Kind.OBJECT_TYPE_DEFINITION:case $t.Kind.INTERFACE_TYPE_DEFINITION:case $t.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Tde(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphNames:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Ede(e,t,n){(0,ME.addIterableToSet)({source:t.concreteTypeNames,target:e.concreteTypeNames}),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,ME.addIterableToSet)({source:t.interfaceFieldNames,target:e.interfaceFieldNames}),(0,ME.addIterableToSet)({source:t.interfaceObjectFieldNames,target:e.interfaceObjectFieldNames}),t.isInterfaceObject&&e.interfaceObjectSubgraphNames.add(n)}function hde({keyFieldSetDataByFieldSet:e,subgraphName:t,typeName:n}){let r=new Map([[t,e]]),i=new Map;for(let[a,{documentNode:o,isUnresolvable:u}]of e)u||i.set(a,o);return{keyFieldSetDatasBySubgraphName:r,documentNodeByKeyFieldSet:i,keyFieldSets:new Set,subgraphNames:new Set([t]),typeName:n}}function yde({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?iV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,hde({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function iV({entityData:e,keyFieldSetDataByFieldSet:t,subgraphName:n}){e.subgraphNames.add(n);let r=e.keyFieldSetDatasBySubgraphName.get(n);if(!r){e.keyFieldSetDatasBySubgraphName.set(n,t);for(let[i,{documentNode:a,isUnresolvable:o}]of t)o||e.documentNodeByKeyFieldSet.set(i,a);return}for(let[i,a]of t){a.isUnresolvable||e.documentNodeByKeyFieldSet.set(i,a.documentNode);let o=r.get(i);if(o){o.isUnresolvable||(o.isUnresolvable=a.isUnresolvable);continue}r.set(i,a)}}function Ide(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function gde(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function LD(e,t){for(let n=e.length-1;n>-1;n--){if(e[n].isSubsetOf(t))return;e[n].isSupersetOf(t)&&e.splice(n,1)}e.push(t)}function qE(e,t){if(e.length<1||t.length<1){for(let r of t)e.push(new Set(r));return e}let n=[];for(let r of t)for(let i of e){let a=(0,ME.addSets)(r,i);LD(n,a)}return n}function CD(e,t){for(let n of t)LD(e,n);return e.length<=xE.MAX_OR_SCOPES}function aV(e,t){var i,a;let n=t.fieldName,r=e.get(n);return r?((i=r.inheritedData).requiresAuthentication||(i.requiresAuthentication=t.inheritedData.requiresAuthentication),(a=r.originalData).requiresAuthentication||(a.requiresAuthentication=t.originalData.requiresAuthentication),!CD(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>xE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>xE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=qE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=qE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,sV(t)),!0)}function _de(e){let t=new Map;for(let[n,r]of e)t.set(n,sV(r));return t}function sV(e){return{fieldName:e.fieldName,inheritedData:{requiredScopes:[...e.inheritedData.requiredScopes],requiredScopesByOR:[...e.inheritedData.requiredScopes],requiresAuthentication:e.inheritedData.requiresAuthentication},originalData:{requiredScopes:[...e.originalData.requiredScopes],requiresAuthentication:e.originalData.requiresAuthentication}}}function vde(e){return{fieldAuthDataByFieldName:_de(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function Ode(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,vde(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!CD(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>xE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=qE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)aV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Sde(e,t){let n=t.typeName;for(let[r,i]of t.fieldAuthDataByFieldName){let a=`${n}.${r}`,o=e.get(a);o?(o.requiresAuthentication=i.inheritedData.requiresAuthentication,o.requiredScopes=i.inheritedData.requiredScopes.map(u=>[...u]),o.requiredScopesByOR=i.inheritedData.requiredScopesByOR.map(u=>[...u])):e.set(a,{argumentNames:[],typeName:n,fieldName:r,requiresAuthentication:i.inheritedData.requiresAuthentication,requiredScopes:i.inheritedData.requiredScopes.map(u=>[...u]),requiredScopesByOR:i.inheritedData.requiredScopesByOR.map(u=>[...u])})}}function Dde(e){return e===$t.Kind.OBJECT_TYPE_DEFINITION||e===$t.Kind.OBJECT_TYPE_EXTENSION}function bde(e){return lde.COMPOSITE_OUTPUT_NODE_KINDS.has(e)}function Ade(e){return e?e.kind===$t.Kind.OBJECT_TYPE_DEFINITION:!1}function Rde(e){switch(e.kind){case $t.Kind.ARGUMENT:case $t.Kind.FIELD_DEFINITION:case $t.Kind.INPUT_VALUE_DEFINITION:case $t.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var BD=w(Ke=>{"use strict";m();T();N();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.TAG_DEFINITION_DATA=Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA=Ke.SHAREABLE_DEFINITION_DATA=Ke.SPECIFIED_BY_DEFINITION_DATA=Ke.SEMANTIC_NON_NULL_DATA=Ke.REQUIRES_SCOPES_DEFINITION_DATA=Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA=Ke.REDIS_SUBSCRIBE_DEFINITION_DATA=Ke.REDIS_PUBLISH_DEFINITION_DATA=Ke.REQUIRES_DEFINITION_DATA=Ke.PROVIDES_DEFINITION_DATA=Ke.LINK_DEFINITION_DATA=Ke.KEY_DEFINITION_DATA=Ke.OVERRIDE_DEFINITION_DATA=Ke.ONE_OF_DEFINITION_DATA=Ke.NATS_SUBSCRIBE_DEFINITION_DATA=Ke.NATS_REQUEST_DEFINITION_DATA=Ke.NATS_PUBLISH_DEFINITION_DATA=Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA=Ke.KAFKA_PUBLISH_DEFINITION_DATA=Ke.INTERFACE_OBJECT_DEFINITION_DATA=Ke.INACCESSIBLE_DEFINITION_DATA=Ke.EXTERNAL_DEFINITION_DATA=Ke.EXTENDS_DEFINITION_DATA=Ke.DEPRECATED_DEFINITION_DATA=Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA=Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA=Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA=Ke.AUTHENTICATED_DEFINITION_DATA=void 0;var na=Fr(),Gt=Ie(),x=zn(),en=Qf(),wn=hT();Ke.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.AUTHENTICATED,node:en.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.COMPOSE_DIRECTIVE,node:en.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])};Ke.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}],[x.DESCRIPTION_OVERRIDE,{name:x.DESCRIPTION_OVERRIDE,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.INPUT_OBJECT_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.SCHEMA_UPPER,x.UNION_UPPER]),name:x.CONFIGURE_DESCRIPTION,node:en.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE,x.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};Ke.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.PROPAGATE,{name:x.PROPAGATE,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR)},defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.CONFIGURE_CHILD_DESCRIPTIONS,node:en.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([x.PROPAGATE]),requiredArgumentNames:new Set};Ke.CONNECT_FIELD_RESOLVER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONTEXT,{name:x.CONTEXT,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.CONNECT_FIELD_RESOLVER,node:en.CONNECT_FIELD_RESOLVER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONTEXT])};Ke.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.REASON,{name:x.REASON,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR),defaultValue:{kind:Gt.Kind.STRING,value:Gt.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER]),name:x.DEPRECATED,node:en.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([x.REASON]),requiredArgumentNames:new Set};Ke.EXTENDS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.EXTENDS,node:en.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.EXTERNAL,node:en.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.INACCESSIBLE,node:en.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!1,locations:new Set([x.OBJECT_UPPER]),name:x.INTERFACE_OBJECT,node:en.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPIC,{name:x.TOPIC,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_PUBLISH,node:en.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPIC])};Ke.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.TOPICS,{name:x.TOPICS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_KAFKA_SUBSCRIBE,node:en.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.TOPICS])};Ke.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_PUBLISH,node:en.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECT,{name:x.SUBJECT,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_REQUEST,node:en.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.SUBJECT])};Ke.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SUBJECTS,{name:x.SUBJECTS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}],[x.STREAM_CONFIGURATION,{name:x.STREAM_CONFIGURATION,typeNode:(0,na.stringToNamedTypeNode)(x.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_NATS_SUBSCRIBE,node:en.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID,x.STREAM_CONFIGURATION]),requiredArgumentNames:new Set([x.SUBJECTS])};Ke.ONE_OF_DEFINITION_DATA={argumentTypeNodeByName:new Map([]),isRepeatable:!1,locations:new Set([x.INPUT_OBJECT_UPPER]),name:x.ONE_OF,node:en.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FROM,{name:x.FROM,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.OVERRIDE,node:en.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FROM])};Ke.KEY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}],[x.RESOLVABLE,{name:x.RESOLVABLE,typeNode:(0,na.stringToNamedTypeNode)(x.BOOLEAN_SCALAR),defaultValue:{kind:Gt.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.KEY,node:en.KEY_DEFINITION,optionalArgumentNames:new Set([x.RESOLVABLE]),requiredArgumentNames:new Set([x.FIELDS])};Ke.LINK_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.AS,{name:x.AS,typeNode:(0,na.stringToNamedTypeNode)(x.STRING_SCALAR)}],[x.FOR,{name:x.FOR,typeNode:(0,na.stringToNamedTypeNode)(x.LINK_PURPOSE)}],[x.IMPORT,{name:x.IMPORT,typeNode:{kind:Gt.Kind.LIST_TYPE,type:(0,na.stringToNamedTypeNode)(x.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([x.SCHEMA_UPPER]),name:x.LINK,node:en.LINK_DEFINITION,optionalArgumentNames:new Set([x.AS,x.FOR,x.IMPORT]),requiredArgumentNames:new Set([x.URL_LOWER])};Ke.PROVIDES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.PROVIDES,node:en.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REQUIRES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.FIELDS,{name:x.FIELDS,typeNode:wn.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.REQUIRES,node:en.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.FIELDS])};Ke.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNEL,{name:x.CHANNEL,typeNode:wn.REQUIRED_STRING_TYPE_NODE}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_PUBLISH,node:en.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNEL])};Ke.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CHANNELS,{name:x.CHANNELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:wn.REQUIRED_STRING_TYPE_NODE}}}],[x.PROVIDER_ID,{name:x.PROVIDER_ID,typeNode:wn.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:Gt.Kind.STRING,value:x.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.EDFS_REDIS_SUBSCRIBE,node:en.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([x.PROVIDER_ID]),requiredArgumentNames:new Set([x.CHANNELS])};Ke.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER]),name:x.REQUIRE_FETCH_REASONS,node:en.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.SCOPES,{name:x.SCOPES,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([x.ENUM_UPPER,x.FIELD_DEFINITION_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER]),name:x.REQUIRES_SCOPES,node:en.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.SCOPES])};Ke.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByName:new Map([[x.LEVELS,{name:x.LEVELS,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:{kind:Gt.Kind.LIST_TYPE,type:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.INT_SCALAR)}}},defaultValue:{kind:Gt.Kind.LIST,values:[{kind:Gt.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SEMANTIC_NON_NULL,node:en.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([x.LEVELS]),requiredArgumentNames:new Set};Ke.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.URL_LOWER,{name:x.URL_LOWER,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([x.SCALAR_UPPER]),name:x.SPECIFIED_BY,node:en.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.URL_LOWER])};Ke.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByName:new Map,isRepeatable:!0,locations:new Set([x.FIELD_DEFINITION_UPPER,x.OBJECT_UPPER]),name:x.SHAREABLE,node:en.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};Ke.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.CONDITION,{name:x.CONDITION,typeNode:{kind:Gt.Kind.NON_NULL_TYPE,type:(0,na.stringToNamedTypeNode)(x.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([x.FIELD_DEFINITION_UPPER]),name:x.SUBSCRIPTION_FILTER,node:en.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.CONDITION])};Ke.TAG_DEFINITION_DATA={argumentTypeNodeByName:new Map([[x.NAME,{name:x.NAME,typeNode:wn.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([x.ARGUMENT_DEFINITION_UPPER,x.ENUM_UPPER,x.ENUM_VALUE_UPPER,x.FIELD_DEFINITION_UPPER,x.INPUT_FIELD_DEFINITION_UPPER,x.INPUT_OBJECT_UPPER,x.INTERFACE_UPPER,x.OBJECT_UPPER,x.SCALAR_UPPER,x.UNION_UPPER]),name:x.TAG,node:en.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([x.NAME])}});var Ip=w(Aa=>{"use strict";m();T();N();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.newFieldSetData=Pde;Aa.extractFieldSetValue=Fde;Aa.getNormalizedFieldSet=wde;Aa.getInitialFieldCoordsPath=Lde;Aa.validateKeyFieldSets=Cde;Aa.getConditionalFieldSetDirectiveName=Bde;Aa.isNodeQuery=Ude;Aa.validateArgumentTemplateReferences=kde;Aa.initializeDirectiveDefinitionDatas=Mde;var $n=Ie(),oV=Fr(),Or=$i(),uV=Du(),UD=Su(),tn=BD(),It=zn(),Ms=wr();function Pde(){return{provides:new Map,requires:new Map}}function Fde(e,t,n){if(!n||n.length>1)return;let r=n[0].arguments;if(!r||r.length!==1)return;let i=r[0];i.name.value!==It.FIELDS||i.value.kind!==$n.Kind.STRING||t.set(e,i.value.value)}function wde(e){return(0,$n.print)((0,oV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function Lde(e,t){return e?[t]:[]}function Cde(e,t,n){let r=e.entityInterfaceDataByTypeName.get(t.name),i=t.name,a=[],o=r?void 0:e.internalGraph.addEntityDataNode(t.name),u=e.internalGraph.addOrUpdateNode(t.name),l=0;for(let[d,{documentNode:p,isUnresolvable:E,rawFieldSet:I}]of n){r&&(r.resolvable||(r.resolvable=!E)),l+=1;let v=[],A=[t],U=[],j=[],Q=new Set,ee=-1,ne=!0,pe="",le=!1;if((0,$n.visit)(p,{Argument:{enter(Ae){return v.push((0,Or.unexpectedArgumentErrorMessage)(I,`${A[ee].name}.${pe}`,Ae.name.value)),$n.BREAK}},Field:{enter(Ae){let Me=A[ee],Ze=Me.name;if(ne){let xt=`${Ze}.${pe}`,an=Me.fieldDataByName.get(pe);if(!an)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,xt,pe)),$n.BREAK;let kr=(0,UD.getTypeNodeNamedTypeName)(an.node.type),nr=e.parentDefinitionDataByTypeName.get(kr),En=nr?nr.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetErrorMessage)(I,[xt],kr,(0,Ms.kindToNodeType)(En))),$n.BREAK}let Z=Ae.name.value,ve=`${Ze}.${Z}`;if(pe=Z,Z===It.TYPENAME)return;let gt=Me.fieldDataByName.get(Z);if(!gt)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,Ze,Z)),$n.BREAK;if(gt.argumentDataByName.size)return v.push((0,Or.argumentsInKeyFieldSetErrorMessage)(I,ve)),$n.BREAK;if(U[ee].has(Z))return v.push((0,Or.duplicateFieldInFieldSetErrorMessage)(I,ve)),$n.BREAK;let rn=gt.externalFieldDataBySubgraphName.get(e.subgraphName);if(!e.isSubgraphEventDrivenGraph&&(rn!=null&&rn.isDefinedExternal)&&!rn.isUnconditionallyProvided&&!e.conditionalFieldDataByCoords.get(ve)){le=!0;let an=u.headToTailEdges.get(Z);an&&(an.isExternal=!0)}(0,Ms.getValueOrDefault)((0,Ms.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,ve,()=>new Map),i,()=>new Set).add(d),j.push(Z),gt.isShareableBySubgraphName.set(e.subgraphName,!0),U[ee].add(Z),(0,Ms.getValueOrDefault)(e.keyFieldNamesByParentTypeName,Ze,()=>new Set).add(Z);let un=(0,UD.getTypeNodeNamedTypeName)(gt.node.type);if(uV.BASE_SCALARS.has(un)){Q.add(j.join(It.LITERAL_PERIOD)),j.pop();return}let In=e.parentDefinitionDataByTypeName.get(un);if(!In)return v.push((0,Or.unknownTypeInFieldSetErrorMessage)(I,ve,un)),$n.BREAK;if(In.kind===$n.Kind.OBJECT_TYPE_DEFINITION){ne=!0,A.push(In);return}if((0,oV.isKindAbstract)(In.kind))return v.push((0,Or.abstractTypeInKeyFieldSetErrorMessage)(I,ve,un,(0,Ms.kindToNodeType)(In.kind))),$n.BREAK;Q.add(j.join(It.LITERAL_PERIOD)),j.pop()}},InlineFragment:{enter(){return v.push(Or.inlineFragmentInFieldSetErrorMessage),$n.BREAK}},SelectionSet:{enter(){if(!ne){let Ae=A[ee],Ze=`${Ae.name}.${pe}`;if(pe===It.TYPENAME)return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[Ze],It.STRING_SCALAR,(0,Ms.kindToNodeType)($n.Kind.SCALAR_TYPE_DEFINITION))),$n.BREAK;let Z=Ae.fieldDataByName.get(pe);if(!Z)return v.push((0,Or.undefinedFieldInFieldSetErrorMessage)(I,Ze,pe)),$n.BREAK;let ve=(0,UD.getTypeNodeNamedTypeName)(Z.node.type),gt=e.parentDefinitionDataByTypeName.get(ve),rn=gt?gt.kind:$n.Kind.SCALAR_TYPE_DEFINITION;return v.push((0,Or.invalidSelectionSetDefinitionErrorMessage)(I,[Ze],ve,(0,Ms.kindToNodeType)(rn))),$n.BREAK}if(ee+=1,ne=!1,ee<0||ee>=A.length)return v.push((0,Or.unparsableFieldSetSelectionErrorMessage)(I,pe)),$n.BREAK;U.push(new Set)},leave(){if(ne){let Me=A[ee].name,Ze=A[ee+1],Z=`${Me}.${pe}`;v.push((0,Or.invalidSelectionSetErrorMessage)(I,[Z],Ze.name,(0,Ms.kindToNodeType)(Ze.kind))),ne=!1}ee-=1,A.pop(),U.pop()}}}),v.length>0){e.errors.push((0,Or.invalidDirectiveError)(It.KEY,i,(0,Ms.numberToOrdinal)(l),v));continue}a.push(k({fieldName:"",selectionSet:d},E?{disableEntityResolver:!0}:{})),u.satisfiedFieldSets.add(d),le&&u.externalFieldSets.add(d),!E&&(o==null||o.addTargetSubgraphByFieldSet(d,e.subgraphName))}if(a.length>0)return a}function Bde(e){return e?It.PROVIDES:It.REQUIRES}function Ude(e,t){return e===It.QUERY||t===$n.OperationTypeNode.QUERY}function kde(e,t,n){let r=e.matchAll(uV.EDFS_ARGS_REGEXP),i=new Set,a=new Set;for(let o of r){if(o.length<2){a.add(o[0]);continue}t.has(o[1])||i.add(o[1])}for(let o of i)n.push((0,Or.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Or.invalidEventSubjectsArgumentErrorMessage)(o))}function Mde(){return new Map([[It.AUTHENTICATED,tn.AUTHENTICATED_DEFINITION_DATA],[It.COMPOSE_DIRECTIVE,tn.COMPOSE_DIRECTIVE_DEFINITION_DATA],[It.CONFIGURE_DESCRIPTION,tn.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[It.CONFIGURE_CHILD_DESCRIPTIONS,tn.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[It.CONNECT_FIELD_RESOLVER,tn.CONNECT_FIELD_RESOLVER_DEFINITION_DATA],[It.DEPRECATED,tn.DEPRECATED_DEFINITION_DATA],[It.EDFS_KAFKA_PUBLISH,tn.KAFKA_PUBLISH_DEFINITION_DATA],[It.EDFS_KAFKA_SUBSCRIBE,tn.KAFKA_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_NATS_PUBLISH,tn.NATS_PUBLISH_DEFINITION_DATA],[It.EDFS_NATS_REQUEST,tn.NATS_REQUEST_DEFINITION_DATA],[It.EDFS_NATS_SUBSCRIBE,tn.NATS_SUBSCRIBE_DEFINITION_DATA],[It.EDFS_REDIS_PUBLISH,tn.REDIS_PUBLISH_DEFINITION_DATA],[It.EDFS_REDIS_SUBSCRIBE,tn.REDIS_SUBSCRIBE_DEFINITION_DATA],[It.EXTENDS,tn.EXTENDS_DEFINITION_DATA],[It.EXTERNAL,tn.EXTERNAL_DEFINITION_DATA],[It.INACCESSIBLE,tn.INACCESSIBLE_DEFINITION_DATA],[It.INTERFACE_OBJECT,tn.INTERFACE_OBJECT_DEFINITION_DATA],[It.KEY,tn.KEY_DEFINITION_DATA],[It.LINK,tn.LINK_DEFINITION_DATA],[It.ONE_OF,tn.ONE_OF_DEFINITION_DATA],[It.OVERRIDE,tn.OVERRIDE_DEFINITION_DATA],[It.PROVIDES,tn.PROVIDES_DEFINITION_DATA],[It.REQUIRE_FETCH_REASONS,tn.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[It.REQUIRES,tn.REQUIRES_DEFINITION_DATA],[It.REQUIRES_SCOPES,tn.REQUIRES_SCOPES_DEFINITION_DATA],[It.SEMANTIC_NON_NULL,tn.SEMANTIC_NON_NULL_DATA],[It.SHAREABLE,tn.SHAREABLE_DEFINITION_DATA],[It.SPECIFIED_BY,tn.SPECIFIED_BY_DEFINITION_DATA],[It.SUBSCRIPTION_FILTER,tn.SUBSCRIPTION_FILTER_DEFINITION_DATA],[It.TAG,tn.TAG_DEFINITION_DATA]])}});var MD=w(kD=>{"use strict";m();T();N();Object.defineProperty(kD,"__esModule",{value:!0});kD.recordSubgraphName=xde;function xde(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var qD=w(VE=>{"use strict";m();T();N();Object.defineProperty(VE,"__esModule",{value:!0});VE.Warning=void 0;var xD=class extends Error{constructor(n){super(n.message);g(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};VE.Warning=xD});var gp=w(gi=>{"use strict";m();T();N();Object.defineProperty(gi,"__esModule",{value:!0});gi.invalidOverrideTargetSubgraphNameWarning=qde;gi.externalInterfaceFieldsWarning=Vde;gi.nonExternalConditionalFieldWarning=jde;gi.unimplementedInterfaceOutputTypeWarning=Kde;gi.invalidExternalFieldWarning=$de;gi.requiresDefinedOnNonEntityFieldWarning=Gde;gi.consumerInactiveThresholdInvalidValueWarning=Qde;gi.externalEntityExtensionKeyFieldWarning=Yde;gi.fieldAlreadyProvidedWarning=Jde;gi.singleSubgraphInputFieldOneOfWarning=Hde;gi.singleFederatedInputFieldOneOfWarning=zde;var Ra=qD(),VD=zn();function qde(e,t,n,r){return new Ra.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(VD.QUOTATION_JOIN)+`". The required "from" argument of type "String!" should be provided with an existing subgraph name. However, a subgraph by the name of "${e}" does not exist. If this subgraph has been recently deleted, remember to clean up unused "@override" directives that reference this subgraph.`,subgraph:{name:r}})}function jE(e){return`The subgraph "${e}" is currently a "version one" subgraph, but if it were updated to "version two" in its current state, composition would be unsuccessful due to the following warning that would instead propagate as an error: -`}function qde(e,t,n){return new Aa.Warning({message:jE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": +`}function Vde(e,t,n){return new Ra.Warning({message:jE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": "`+n.join(VD.QUOTATION_JOIN)+`" -Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function Vde(e,t,n,r,i){return new Aa.Warning({message:jE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: +Interface fields should not be declared "@external". This is because Interface fields do not resolve directly, but the "@external" directive relates to whether a Field instance can be resolved by the subgraph in which it is defined.`,subgraph:{name:e}})}function jde(e,t,n,r,i){return new Ra.Warning({message:jE(t)+`The Field "${e}" in subgraph "${t}" defines a "@${i}" directive with the following field set: "${r}". However, neither the field "${n}" nor any of its field set ancestors are declared @external. -Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function jde(e,t){return new Aa.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function Kde(e,t){return new Aa.Warning({message:jE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function $de(e,t){return new Aa.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function Gde(e,t=""){return new Aa.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` -${t}`:"",subgraph:{name:e}})}function Qde(e,t,n,r){return new Aa.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". +Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`,subgraph:{name:t}})}function Kde(e,t){return new Ra.Warning({message:`Subgraph "${e}": The Interface "${t}" is used as an output type without at least one Object type implementation defined in the schema.`,subgraph:{name:e}})}function $de(e,t){return new Ra.Warning({message:jE(t)+` The Object Field "${e}" is invalidly declared "@external". An Object field should only be declared "@external" if it is part of a "@key", "@provides", or "@requires" field set, or the field is necessary to satisfy an Interface implementation. In the case that none of these conditions is true, the "@external" directive should be removed.`,subgraph:{name:t}})}function Gde(e,t){return new Ra.Warning({message:` The Object Field "${e}" defines a "@requires" directive, but the Object is not an entity. Consequently, the "@requires" FieldSet cannot be satisfied because there is no entity resolver with which to provide the required Fields.`,subgraph:{name:t}})}function Qde(e,t=""){return new Ra.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` +${t}`:"",subgraph:{name:e}})}function Yde(e,t,n,r){return new Ra.Warning({message:`The entity extension "${e}" defined in subgraph "${r}" defines a "@key" directive with the field set "${t}". The following field coordinates that form part of that field set are declared "@external": "`+n.join(VD.QUOTATION_JOIN)+`" -Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function Yde(e,t,n,r){return new Aa.Warning({message:jE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. +Please note fields that form part of entity extension "@key" field sets are always provided in that subgraph. Any such "@external" declarations are unnecessary relics of Federation Version 1 syntax and are effectively ignored.`,subgraph:{name:r}})}function Jde(e,t,n,r){return new Ra.Warning({message:jE(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. However, "${e}" forms part of the "@${t}" field set defined "${n}". -Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function Jde({fieldName:e,subgraphName:t,typeName:n}){return new Aa.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function Hde({fieldName:e,typeName:t}){return new Aa.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var $D=w($E=>{"use strict";m();T();N();Object.defineProperty($E,"__esModule",{value:!0});$E.upsertDirectiveSchemaAndEntityDefinitions=Xde;$E.upsertParentsAndChildren=Zde;var Gn=Ie(),Cu=Ki(),KD=Du(),KE=yp(),Nd=Fr(),jD=Ip(),zde=dd(),md=$l(),_p=Su(),Wde=gp(),na=zn(),yr=wr();function Xde(e,t){(0,Gn.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),zde.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),KD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Nd.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,_p.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Cu.duplicateOperationTypeDefinitionError)(r,a,(0,_p.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Cu.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function Zde(e,t){let n=!1,r;(0,Gn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,na.PARENT_DEFINITION_DATA);if(o.kind!==Gn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,yr.kindToNodeType)(o.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Cu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:Gn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,_p.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,md.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Nd.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&na.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);(0,yr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,na.PARENT_DEFINITION_DATA);if(!(0,md.isParentDataCompositeOutputType)(u)){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(u.fieldDataByName.has(a)){e.errors.push((0,Cu.duplicateFieldDefinitionError)((0,yr.kindToNodeType)(u.kind),u.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:u});let E=e.addFieldDataByNode(u.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(na.PROVIDES),v=E.directivesByName.get(na.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,yr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,jD.newFieldSetData);I&&(0,jD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,Wde.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,jD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=Gn.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,na.PARENT_DEFINITION_DATA);if(u.kind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind))),!1;if(u.inputValueDataByName.has(a)){e.errors.push((0,Cu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:u.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===Gn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=Gn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===na.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===na.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===na.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===na.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===na.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===na.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var HD=w(rs=>{"use strict";m();T();N();Object.defineProperty(rs,"__esModule",{value:!0});rs.EntityDataNode=rs.RootNode=rs.GraphNode=rs.Edge=void 0;var GE=wr(),GD=class{constructor(t,n,r,i=!1){g(this,"edgeName");g(this,"id");g(this,"isAbstractEdge");g(this,"isInaccessible",!1);g(this,"node");g(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}};rs.Edge=GD;var QD=class{constructor(t,n,r){g(this,"fieldDataByName",new Map);g(this,"headToTailEdges",new Map);g(this,"entityEdges",new Array);g(this,"nodeName");g(this,"hasEntitySiblings",!1);g(this,"isAbstract");g(this,"isInaccessible",!1);g(this,"isLeaf",!1);g(this,"isRootNode",!1);g(this,"satisfiedFieldSets",new Set);g(this,"subgraphName");g(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,GE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,GE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};rs.GraphNode=QD;var YD=class{constructor(t){g(this,"fieldDataByName",new Map);g(this,"headToSharedTailEdges",new Map);g(this,"isAbstract",!1);g(this,"isRootNode",!0);g(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};rs.RootNode=YD;var JD=class{constructor(t){g(this,"fieldSetsByTargetSubgraphName",new Map);g(this,"targetSubgraphNamesByFieldSet",new Map);g(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,GE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,GE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};rs.EntityDataNode=JD});var zD=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var eb=w(Ra=>{"use strict";m();T();N();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.newRootFieldData=efe;Ra.generateResolvabilityErrorReasons=ZD;Ra.generateSharedResolvabilityErrorReasons=cV;Ra.generateSelectionSetSegments=QE;Ra.renderSelectionSet=YE;Ra.generateRootResolvabilityErrors=nfe;Ra.generateEntityResolvabilityErrors=rfe;Ra.generateSharedEntityResolvabilityErrors=ife;Ra.getMultipliedRelativeOriginPaths=afe;var WD=Ki(),XD=wr(),is=zD();function efe(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(is.QUOTATION_JOIN)}".`,subgraphNames:n}}function tfe(e,t){return e.isLeaf?e.name+` <-- +Although "${e}" is declared "@external", it is part of a "@key" directive on an extension type. Such fields are only declared "@external" for legacy syntactical reasons and are not internally considered "@external".`,subgraph:{name:r}})}function Hde({fieldName:e,subgraphName:t,typeName:n}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${n}", but only one optional Input field, "${e}", is defined. Consider removing "@oneOf" and changing "${e}" to a required type instead.`,subgraph:{name:t}})}function zde({fieldName:e,typeName:t}){return new Ra.Warning({message:`The directive "@oneOf" is defined on Input Object "${t}", but only one optional Input field, "${e}", is propagated to the federated graph. Consider removing "@oneOf", changing "${e}" to a required type, and removing any other remaining optional Input fields instead.`,subgraph:{name:""}})}});var $D=w($E=>{"use strict";m();T();N();Object.defineProperty($E,"__esModule",{value:!0});$E.upsertDirectiveSchemaAndEntityDefinitions=Zde;$E.upsertParentsAndChildren=efe;var Gn=Ie(),Cu=$i(),KD=Du(),KE=yp(),Nd=Fr(),jD=Ip(),Wde=dd(),md=$l(),_p=Su(),Xde=gp(),ra=zn(),yr=wr();function Zde(e,t){(0,Gn.visit)(t,{Directive:{enter(n){let r=n.name.value;return e.referencedDirectiveNames.add(r),Wde.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),KD.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r)&&(e.isSubgraphVersionTwo=!0),!1}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitionByName.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},InterfaceTypeExtension:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Nd.isObjectLikeNodeEntity)(n))return;let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,yr.getValueOrDefault)(e.entityInterfaceDataByTypeName,r,()=>({concreteTypeNames:new Set,fieldDatas:[],interfaceFieldNames:new Set,interfaceObjectFieldNames:new Set,isInterfaceObject:!1,resolvable:!1,typeName:r}))}},ObjectTypeDefinition:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Nd.isNodeInterfaceObject)(n)&&(e.entityInterfaceDataByTypeName.set(r,{concreteTypeNames:new Set,fieldDatas:[],interfaceObjectFieldNames:new Set,interfaceFieldNames:new Set,isInterfaceObject:!0,resolvable:!1,typeName:r}),e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}));let i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Nd.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,yr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,KE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},OperationTypeDefinition:{enter(n){let r=n.operation,i=e.schemaData.operationTypes.get(r),a=(0,_p.getTypeNodeNamedTypeName)(n.type);if(i)return e.errors.push((0,Cu.duplicateOperationTypeDefinitionError)(r,a,(0,_p.getTypeNodeNamedTypeName)(i.type))),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Cu.invalidOperationTypeDefinitionError)(o,a,r)),!1):(e.operationTypeNodeByTypeName.set(a,r),e.schemaData.operationTypes.set(r,n),!1)}},SchemaDefinition:{enter(n){e.schemaData.description=n.description,e.extractDirectives(n,e.schemaData.directivesByName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByName)}}})}function efe(e,t){let n=!1,r;(0,Gn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(o.kind!==Gn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,yr.kindToNodeType)(o.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByName.has(a)){e.errors.push((0,Cu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:Gn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,_p.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,md.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Nd.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&ra.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);(0,yr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(!(0,md.isParentDataCompositeOutputType)(u)){e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind)));return}if(u.fieldDataByName.has(a)){e.errors.push((0,Cu.duplicateFieldDefinitionError)((0,yr.kindToNodeType)(u.kind),u.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),p=new Set;e.handleFieldInheritableDirectives({directivesByName:d,fieldName:a,inheritedDirectiveNames:p,parentData:u});let E=e.addFieldDataByNode(u.fieldDataByName,i,l,d,p);n&&e.extractEventDirectivesToConfiguration(i,l);let I=E.directivesByName.get(ra.PROVIDES),v=E.directivesByName.get(ra.REQUIRES);if(!v&&!I)return;let A=e.entityDataByTypeName.get(e.originalParentTypeName),U=(0,yr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,jD.newFieldSetData);I&&(0,jD.extractFieldSetValue)(a,U.provides,I),v&&(A||e.warnings.push((0,Xde.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,jD.extractFieldSetValue)(a,U.requires,v))},leave(){e.lastChildNodeKind=Gn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=Gn.Kind.NULL,e.originalParentTypeName=""}},InputObjectTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==Gn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,_p.getTypeNodeNamedTypeName)(i.type);KD.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let u=(0,yr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,ra.PARENT_DEFINITION_DATA);if(u.kind!==Gn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Cu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,yr.kindToNodeType)(u.kind),a,(0,yr.kindToNodeType)(i.kind))),!1;if(u.inputValueDataByName.has(a)){e.errors.push((0,Cu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:u.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===Gn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=Gn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.doesParentRequireFetchReasons=!1,e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===ra.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,md.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,md.getRenamedRootTypeName)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.originalTypeNameByRenamedTypeName.set(e.renamedParentTypeName,e.originalParentTypeName),r=n?e.internalGraph.getRootNode(e.renamedParentTypeName):e.internalGraph.addOrUpdateNode(e.renamedParentTypeName),e.lastParentNodeKind=i.kind,e.upsertObjectDataByNode(i,!0)},leave(){r=void 0,n=!1,e.originalParentTypeName="",e.renamedParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===ra.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=Gn.Kind.NULL}},UnionTypeDefinition:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===ra.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var HD=w(is=>{"use strict";m();T();N();Object.defineProperty(is,"__esModule",{value:!0});is.EntityDataNode=is.RootNode=is.GraphNode=is.Edge=void 0;var GE=wr(),GD=class{constructor(t,n,r,i=!1){g(this,"edgeName");g(this,"id");g(this,"isAbstractEdge");g(this,"isExternal",!1);g(this,"isInaccessible",!1);g(this,"node");g(this,"visitedIndices",new Set);this.edgeName=i?`... on ${r}`:r,this.id=t,this.isAbstractEdge=i,this.node=n}isEdgeInaccessible(){return this.isInaccessible||this.node.isInaccessible}};is.Edge=GD;var QD=class{constructor(t,n,r){g(this,"externalFieldSets",new Set);g(this,"fieldDataByName",new Map);g(this,"headToTailEdges",new Map);g(this,"entityEdges",new Array);g(this,"nodeName");g(this,"hasEntitySiblings",!1);g(this,"isAbstract");g(this,"isInaccessible",!1);g(this,"isLeaf",!1);g(this,"isRootNode",!1);g(this,"satisfiedFieldSets",new Set);g(this,"subgraphName");g(this,"typeName");this.isAbstract=!!(r!=null&&r.isAbstract),this.isLeaf=!!(r!=null&&r.isLeaf),this.nodeName=`${t}.${n}`,this.subgraphName=t,this.typeName=n}handleInaccessibleEdges(){if(this.isAbstract)return;let t=(0,GE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByName);for(let n of t){let r=this.headToTailEdges.get(n);r&&(r.isInaccessible=!0)}}getAllAccessibleEntityNodeNames(){let t=new Set([this.nodeName]);return this.getAccessibleEntityNodeNames(this,t),t.delete(this.nodeName),t}getAccessibleEntityNodeNames(t,n){for(let r of t.entityEdges)(0,GE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};is.GraphNode=QD;var YD=class{constructor(t){g(this,"fieldDataByName",new Map);g(this,"headToSharedTailEdges",new Map);g(this,"isAbstract",!1);g(this,"isRootNode",!0);g(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToSharedTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};is.RootNode=YD;var JD=class{constructor(t){g(this,"fieldSetsByTargetSubgraphName",new Map);g(this,"targetSubgraphNamesByFieldSet",new Map);g(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,GE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,GE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};is.EntityDataNode=JD});var zD=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ROOT_TYPE_NAMES=Qn.QUOTATION_JOIN=Qn.NOT_APPLICABLE=Qn.LITERAL_SPACE=Qn.LITERAL_PERIOD=Qn.SUBSCRIPTION=Qn.QUERY=Qn.MUTATION=void 0;Qn.MUTATION="Mutation";Qn.QUERY="Query";Qn.SUBSCRIPTION="Subscription";Qn.LITERAL_PERIOD=".";Qn.LITERAL_SPACE=" ";Qn.NOT_APPLICABLE="N/A";Qn.QUOTATION_JOIN='", "';Qn.ROOT_TYPE_NAMES=new Set([Qn.MUTATION,Qn.QUERY,Qn.SUBSCRIPTION])});var eb=w(Pa=>{"use strict";m();T();N();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.newRootFieldData=tfe;Pa.generateResolvabilityErrorReasons=ZD;Pa.generateSharedResolvabilityErrorReasons=cV;Pa.generateSelectionSetSegments=QE;Pa.renderSelectionSet=YE;Pa.generateRootResolvabilityErrors=rfe;Pa.generateEntityResolvabilityErrors=ife;Pa.generateSharedEntityResolvabilityErrors=afe;Pa.getMultipliedRelativeOriginPaths=sfe;var WD=$i(),XD=wr(),si=zD();function tfe(e,t,n){return{coords:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(si.QUOTATION_JOIN)}".`,subgraphNames:n}}function nfe(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- -`+is.LITERAL_SPACE.repeat(t+3)+`... -`+is.LITERAL_SPACE.repeat(t+2)+`} -`}function ZD({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:a}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(a.size>1?"s":"")+`: "${[...a].join(is.QUOTATION_JOIN)}".`];if(e){let u=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){u=!0;for(let p of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${p}" to access subgraph "${l}".`)}u||o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`),o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`)}else t.subgraphNames.size>1&&o.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${r}".`),o.push(`The type "${i}" is not a descendant of an entity ancestor that can provide a shared route to access "${r}".`);return i!==(e==null?void 0:e.typeName)&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function cV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{fieldName:r,typeName:i,subgraphNames:a}=n,o=[t.message,`The field "${i}.${r}" is defined in the following subgraph`+(a.size>1?"s":"")+`: "${[...a].join(is.QUOTATION_JOIN)}".`],u=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let p=e.subgraphNames.filter(I=>I!==l),E=p.length>1;u=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${E?"s":""} "${p.join(is.QUOTATION_JOIN)}" do${E?"":"es"} not satisfy the key field set "${I}" to access subgraph "${l}".`)}if(!u){let l=e.subgraphNames.length>1;o.push(`The entity ancestor "${e.typeName}" in subgraph${l?"s":""} "${e.subgraphNames.join(is.QUOTATION_JOIN)}" ha${l?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${i}.${r}" is defined.`)}return o.push(`The type "${i}" is not a descendant of any other entity ancestors that can provide a shared route to access "${r}".`),i!==e.typeName&&o.push(`The type "${i}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),o}function QE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var sfe=Ki(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData(t){for(let n of t.resolvedFieldNames)this.addResolvedFieldName(n);for(let n of t.resolvedDescendantNames)this.resolvedDescendantNames.add(n)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,sfe.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var dV=w(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ofe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.visitedEntities=u,this.subgraphNameByUnresolvablePath=o}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ofe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isInaccessible||t.node.isInaccessible)return{visited:!1,areDescendantsResolved:!1};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{visited:u,areDescendantsResolved:l,isRevisitedNode:d}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:r,nodeName:t.nodeName,selectionPath:n,visited:u})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,nodeName:i,selectionPath:a,visited:o}){if(!o)return;let u=(0,as.getValueOrDefault)(this.resDataByNodeName,i,()=>n.copy());if(n.addResolvedFieldName(r),u.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let d of this.relativeOriginPaths){let p=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());p.addResolvedFieldName(r),t&&(p.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,`${r}${t}`,()=>n)}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&this.subgraphNameByUnresolvablePath.delete(r);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&this.subgraphNameByUnresolvablePath.delete(a)}}};zE.EntityWalker=rb});var fV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{visited:u,areDescendantsResolved:l}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:i,node:t,selectionPath:n,visited:u})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isInaccessible||t.node.isInaccessible?{visited:!1,areDescendantsResolved:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,selectionPath:a,visited:o}){if(!o)return;n.addResolvedFieldName(r);let u=(0,ss.getValueOrDefault)(this.resDataByPath,a,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));u.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),u.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ra=wr(),ZE=zD(),ufe=dV(),cfe=fV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ra.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ra.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ra.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}){let u=this.nodeByNodeName.get(n);if(!u)throw new Error(`Fatal: Could not find entity node for "${n}".`);o.add(n);let l=this.nodesByTypeName.get(u.typeName);if(!(l!=null&&l.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let d=new ufe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),p=u.getAllAccessibleEntityNodeNames();for(let E of l){if(E.nodeName!==u.nodeName&&!p.has(E.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:E,selectionPath:""});if(I)return}for(let[E,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:E,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:I}),resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new cfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ra.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ra.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ra.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){for(let[r,i]of n.entityNodeNamesByPath){let a=new Map,o=new Map;for(let l of i)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:l,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n}),a.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n});let u=new Array;if(a.size>0&&u.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:i,resDataByPath:o,pathFromRoot:r,rootFieldData:t,subgraphNameByUnresolvablePath:a})),n.unresolvablePaths.size>0&&u.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(u.length<1))return{errors:u,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var r;for(let[i,a]of n.pathsByEntityNodeName){let o=new Map;if(this.resDataByNodeName.has(i))continue;let u=(0,ra.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,visitedEntities:(0,ra.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,ra.getFirstEntry)(a))!=null?r:"",rootFieldData:t,subgraphNameByUnresolvablePath:o}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ra.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ra.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ra.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=w(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=lfe;th.newConfigurationData=dfe;function lfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function dfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Nfe;qc.normalizeSubgraph=NV;qc.batchNormalize=Tfe;var W=Ie(),Dn=Fr(),si=Ip(),Ur=Du(),Yn=yp(),se=Ki(),vp=dd(),ffe=Vv(),gi=TE(),pfe=MD(),us=gp(),pV=$D(),os=Gf(),nn=$l(),cr=Su(),cb=sb(),nh=yE(),X=zn(),mfe=ql(),Ve=wr(),Op=ob(),mV=IE();function Nfe(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Sp(new cb.Graph).normalize(r)}function NV(e,t,n){return new Sp(n||new cb.Graph,t).normalize(e)}var Dp,ub,rh,TV,Sp=class{constructor(t,n){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,si.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,cr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,cr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,Ve.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,Ve.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===X.OVERRIDE,I=u===X.REQUIRES_SCOPES,v=u===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,gi.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,Q=[];for(let me of i.arguments){let ue=me.name.value;if(A.has(ue)){U.add(ue);continue}A.add(ue);let Ae=n.argumentTypeNodeByName.get(ue);if(!Ae){j.add(ue);continue}if(!this.isArgumentValueValid(Ae.typeNode,me.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(me.value),`@${u}`,ue,(0,gi.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:me.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||ue!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:me.value.values,requiredScopes:Q})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let re=(0,Ve.getEntriesNotInHashSet)(o,A);if(re.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,re)),a.length>0||!I)return a;let ee=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ee.requiredScopes.push(...Q);else{let me=(0,Ve.getValueOrDefault)(ee.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));me.inheritedData.requiredScopes.push(...Q),me.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(X.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,cr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,Dn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,gi.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,cr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,cr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,cr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,Dn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,cr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,cr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,cr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,Dn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,cr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,Dn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){u=void 0;break}if(v.value.kind!==W.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,Dn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,si.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,cr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,Dn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,si.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,si.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],Q=-1,re=!0,ee=r,me=!1;return(0,W.visit)(u,{Argument:{enter(){return!1}},Field:{enter(ue){var Tn,kr;let Ae=d[Q],Me=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Me)),W.BREAK;let Ze=ue.name.value,Z=`${Me}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),re)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ee=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&El(Tn=l,Dp,ub).call(Tn,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let ve=Ae.fieldDataByName.get(Ze);if(!ve)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Me,Ze)),W.BREAK;if(E[Q].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[Q].add(Ze);let{isDefinedExternal:vt,isUnconditionallyProvided:rn}=(0,Ve.getOrThrowError)(ve.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),an=vt&&!rn;rn||(me=!0);let wn=(0,cr.getTypeNodeNamedTypeName)(ve.node.type),Gt=l.parentDefinitionDataByTypeName.get(wn);if(Ur.BASE_SCALARS.has(wn)||(Gt==null?void 0:Gt.kind)===W.Kind.SCALAR_TYPE_DEFINITION||(Gt==null?void 0:Gt.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!vt){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!an&&!i)return;let dr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),gn=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?dr.providedBy.push(gn):dr.requiredBy.push(gn);return}if(!Gt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,wn)),W.BREAK;if(vt&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),Gt.kind===W.Kind.OBJECT_TYPE_DEFINITION||Gt.kind===W.Kind.INTERFACE_TYPE_DEFINITION||Gt.kind===W.Kind.UNION_TYPE_DEFINITION){re=!0,d.push(Gt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(ue){let Ae=d[Q],Me=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!ue.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=ue.typeCondition.name.value;if(Z===Me){d.push(Ae),re=!0;return}if(!(0,Dn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,Me)),W.BREAK;let ve=l.parentDefinitionDataByTypeName.get(Z);if(!ve)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Me,Z)),W.BREAK;switch(re=!0,ve.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!ve.implementedInterfaceTypeNames.has(Me))break;d.push(ve);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let vt=l.concreteTypeNamesByAbstractTypeName.get(Me);if(!vt||!vt.has(Z))break;d.push(ve);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(ve);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Me,Z,(0,Ve.kindToNodeType)(ve.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,Ve.kindToNodeType)(Ae.kind),Me)),W.BREAK}},SelectionSet:{enter(){if(!re){let ue=d[Q];if(ue.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;if(ee===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,Ve.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=ue.fieldDataByName.get(ee);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,ue.name,ee)),W.BREAK;let Me=(0,cr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(Me),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Z))),W.BREAK}if(Q+=1,re=!1,Q<0||Q>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ee)),W.BREAK;E.push(new Set)},leave(){if(re){let ue=d[Q+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,ue.name,(0,Ve.kindToNodeType)(ue.kind))),re=!1}Q-=1,d.pop(),E.pop()}}}),j.length>0||!me?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,si.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": - -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,si.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(Ur.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!u)continue;if(u.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,Ve.kindToNodeType)(u.kind));continue}if(t.name===u.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of u.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,gi.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,gi.printTypeNode)(v.node.type));let U=new Set;for(let[j,Q]of E.argumentDataByName){U.add(j);let re=v.argumentDataByName.get(j);if(!re){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ee=(0,gi.printTypeNode)(re.type),me=(0,gi.printTypeNode)(Q.type);me!==ee&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ee,argumentName:j,expectedType:me}))}for(let[j,Q]of v.argumentDataByName)U.has(j)||Q.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,Ve.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,Ve.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,Ve.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,Ve.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let u=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!u||u.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=u.value.values,d=(0,gi.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Ur.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPIC:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,si.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPICS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,si.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],u=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,si.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}u=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:u,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,si.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(vp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let Q of p.value.fields){let re=Q.name.value;if(!vp.STREAM_CONFIGURATION_FIELD_NAMES.has(re)){I.add(re),E=!1;continue}if(v.has(re))v.delete(re);else{U.add(re),E=!1;continue}switch(A.has(re)&&A.delete(re),re){case X.CONSUMER_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(re),E=!1;continue}l=Q.value.value;break;case X.STREAM_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(re),E=!1;continue}d=Q.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if(Q.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{u=parseInt(Q.value.value,10)}catch(ee){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return u<0?(u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):u>mfe.MAX_INT32&&(u=0,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),k({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:u,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNEL:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,si.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNELS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,si.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],u;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:u=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:u=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{u=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{u=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{u=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{u=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{u=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}u&&(0,Ve.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(u)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[u,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of vp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,gi.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,gi.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,Ve.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,u]of t){let l=`${u.originalParentTypeName}.${o}`;if(n.has(o)){(a=u.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,gi.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,gi.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,gi.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,u)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(mV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of mV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,Ve.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!0,i)),o=(0,si.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let u=this.directiveDefinitionDataByName.get(a);if(!u)continue;if(!u.isRepeatable&&o.length>1){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return $(k({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let u=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=u[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let Q=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&Q&&Q.isDefinedExternal&&!Q.isUnconditionallyProvided&&i.extensionType!==os.ExtensionType.NONE&&(Q.isUnconditionallyProvided=!0,(0,Ve.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,Ve.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let re=(0,cr.getTypeNodeNamedTypeName)(j.node.type);if(Ur.BASE_SCALARS.has(re))return;let ee=a.parentDefinitionDataByTypeName.get(re);if(!ee)return W.BREAK;if(ee.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,u.push(ee);return}if((0,Dn.isKindAbstract)(ee.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=u.length))return W.BREAK},leave(){p&&(p=!1),d-=1,u.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,us.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let u=this.validateProvidesOrRequires(r,n.requires,!1);u&&(a.requires=u)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,us.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,Ve.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,pV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,pV.upsertParentsAndChildren)(this,t);let n=[];El(this,rh,TV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[u,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,u);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let u of this.invalidConfigureDescriptionNodeDatas)u.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,Ve.kindToNodeType)(u.kind),u.name));this.evaluateExternalKeyFields();for(let[u,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(u));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(u));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;u!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(u),p=this.operationTypeNodeByTypeName.get(u),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===os.ExtensionType.EXTENDS&&(l.extensionType=os.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[Q,re]of l.fieldDataByName){if(!E&&((o=re.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push(Q),this.validateArguments(re,l.kind),re.namedTypeKind!==W.Kind.NULL)continue;let ee=this.parentDefinitionDataByTypeName.get(re.namedTypeName);if(ee){if(!(0,nn.isOutputNodeKind)(ee.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:re,namedTypeData:ee,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}re.namedTypeKind=this.entityInterfaceDataByTypeName.get(ee.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ee.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(u,I)):this.warnings.push((0,us.externalInterfaceFieldsWarning)(this.subgraphName,u,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Op.newConfigurationData)(d,u)),U=this.entityInterfaceDataByTypeName.get(u);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let Q=this.concreteTypeNamesByAbstractTypeName.get(u);Q&&(0,Ve.addIterableToSet)({source:Q,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,si.isNodeQuery)(u,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,Ve.kindToNodeType)(l.kind),u)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===os.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(u));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(u)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let u of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(u),d=(0,Ve.getOrThrowError)(Dn.operationTypeNodeToDefaultType,u,X.OPERATION_TO_DEFAULT),p=l?(0,cr.getTypeNodeNamedTypeName)(l.type):d;if(Ur.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(u,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,u)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,u,E.kind))}for(let u of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(u);if(!l){this.errors.push((0,se.undefinedTypeError)(u));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(u);(!d||d.size<1)&&this.warnings.push((0,us.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,u))}let i=new Map;for(let u of this.directiveDefinitionByName.values()){let l=(0,Dn.extractExecutableDirectiveLocations)(u.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,u,l)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let u of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(u)):this.warnings.push((0,us.invalidExternalFieldWarning)(u,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,ffe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Dp=new WeakSet,ub=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,us.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},rh=new WeakSet,TV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Ur.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,Ve.addOptionalIterableToSet)({source:vp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};qc.NormalizationFactory=Sp;function Tfe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let re of e)re.name&&(0,pfe.recordSubgraphName)(re.name,d,p);let j=new cb.Graph;for(let re=0;re0&&A.push(...ue.warnings),!ue.success){U.push((0,se.subgraphValidationError)(me,ue.errors));continue}if(!ue){U.push((0,se.subgraphValidationError)(me,[se.subgraphValidationFailureError]));continue}l.set(me,ue.parentDefinitionDataByTypeName);for(let Ae of ue.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,Me]of ue.fieldCoordsByNamedTypeName)(0,Ve.addIterableToSet)({source:Me,target:(0,Ve.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,Me]of ue.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(Me));continue}(0,Ve.addIterableToSet)({source:Me,target:Ze})}for(let[Ae,Me]of ue.entityDataByTypeName){let Ze=Me.keyFieldSetDatasBySubgraphName.get(me);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:me})}if(ee.name&&i.set(me,{conditionalFieldDataByCoordinates:ue.conditionalFieldDataByCoordinates,configurationDataByTypeName:ue.configurationDataByTypeName,definitions:ue.subgraphAST,directiveDefinitionByName:ue.directiveDefinitionByName,entityInterfaces:ue.entityInterfaces,isVersionTwo:ue.isVersionTwo,keyFieldNamesByParentTypeName:ue.keyFieldNamesByParentTypeName,name:me,operationTypes:ue.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:ue.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:ue.persistedDirectiveDefinitionDataByDirectiveName,schema:ue.schema,schemaNode:ue.schemaNode,url:ee.url}),!(ue.overridesByTargetSubgraphName.size<1))for(let[Ae,Me]of ue.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,ve]of Me){let vt=ue.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,us.invalidOverrideTargetSubgraphNameWarning)(Ae,vt,[...ve],ee.name));else{let rn=(0,Ve.getValueOrDefault)(a,Ae,()=>new Map),an=(0,Ve.getValueOrDefault)(rn,Z,()=>new Set(ve));(0,Ve.addIterableToSet)({source:ve,target:an})}for(let rn of ve){let an=`${vt}.${rn}`,wn=o.get(an);if(!wn){o.set(an,[me]);continue}wn.push(me),u.add(an)}}}}let Q=[];if(I.size>0&&Q.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&Q.push((0,se.invalidSubgraphNamesError)([...p],E)),u.size>0){let re=[];for(let ee of u){let me=(0,Ve.getOrThrowError)(o,ee,"overrideSourceSubgraphNamesByFieldPath");re.push((0,se.duplicateOverriddenFieldErrorMessage)(ee,me))}Q.push((0,se.duplicateOverriddenFieldsError)(re))}if(Q.push(...U),Q.length>0)return{errors:Q,success:!1,warnings:A};for(let[re,ee]of a){let me=(0,Ve.getOrThrowError)(i,re,"internalSubgraphBySubgraphName");me.overriddenFieldNamesByParentTypeName=ee;for(let[ue,Ae]of ee){let Me=me.configurationDataByTypeName.get(ue);Me&&((0,Yn.subtractSet)(Ae,Me.fieldNames),Me.fieldNames.size<1&&me.configurationDataByTypeName.delete(ue))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var ih=w(Kc=>{"use strict";m();T();N();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.DivergentType=void 0;Kc.getLeastRestrictiveMergedTypeNode=hfe;Kc.getMostRestrictiveMergedTypeNode=yfe;Kc.renameNamedTypeName=Ife;var Vc=Ie(),hV=Ki(),Efe=Su(),EV=Fr(),yV=ql(),jc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(jc||(Kc.DivergentType=jc={}));function IV(e,t,n,r,i){t=(0,Efe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=jc.NONE,u=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(fb,"__esModule",{value:!0});fb.renameRootTypes=vfe;var gfe=Ie(),db=Fr(),_fe=ih(),Bu=zn(),$c=wr();function vfe(e,t){let n,r=!1,i;(0,gfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Bu.SERVICE_FIELD||o===Bu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let u=n.name,l=(0,$c.getOrThrowError)(n.fieldDataByName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,d,Bu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,_fe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var gV=w((Ed,bp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,Q=8,re=16,ee=32,me=64,ue=128,Ae=256,Me=512,Ze=30,Z="...",ve=800,vt=16,rn=1,an=2,wn=3,Gt=1/0,Tn=9007199254740991,kr=17976931348623157e292,dr=NaN,gn=4294967295,Ht=gn-1,Ln=gn>>>1,ae=[["ary",ue],["bind",A],["bindKey",U],["curry",Q],["curryRight",re],["flip",Me],["partial",ee],["partialRight",me],["rearg",Ae]],De="[object Arguments]",ge="[object Array]",Le="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",xe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",ps="[object Null]",Yr="[object Object]",ms="[object Promise]",rl="[object Proxy]",Ba="[object RegExp]",Ir="[object Set]",oi="[object String]",xt="[object Symbol]",gr="[object Undefined]",ju="[object WeakMap]",Ua="[object WeakSet]",Ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ce="[object Uint8Array]",Tt="[object Uint8ClampedArray]",En="[object Uint16Array]",un="[object Uint32Array]",_n=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,iK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N0=/&(?:amp|lt|gt|quot|#39);/g,T0=/[&<>"']/g,aK=RegExp(N0.source),sK=RegExp(T0.source),oK=/<%-([\s\S]+?)%>/g,uK=/<%([\s\S]+?)%>/g,E0=/<%=([\s\S]+?)%>/g,cK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lK=/^\w*$/,dK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,fK=RegExp(Ch.source),Bh=/^\s+/,pK=/\s/,mK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,NK=/\{\n\/\* \[wrapped with (.+)\] \*/,TK=/,? & /,EK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hK=/[()=,{}\[\]\/\s]/,yK=/\\(\\)?/g,IK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h0=/\w*$/,gK=/^[-+]0x[0-9a-f]+$/i,_K=/^0b[01]+$/i,vK=/^\[object .+?Constructor\]$/,OK=/^0o[0-7]+$/i,SK=/^(?:0|[1-9]\d*)$/,DK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tm=/($^)/,bK=/['\n\r\u2028\u2029\\]/g,nm="\\ud800-\\udfff",AK="\\u0300-\\u036f",RK="\\ufe20-\\ufe2f",PK="\\u20d0-\\u20ff",y0=AK+RK+PK,I0="\\u2700-\\u27bf",g0="a-z\\xdf-\\xf6\\xf8-\\xff",FK="\\xac\\xb1\\xd7\\xf7",wK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",LK="\\u2000-\\u206f",CK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",O0=FK+wK+LK+CK,Uh="['\u2019]",BK="["+nm+"]",S0="["+O0+"]",rm="["+y0+"]",D0="\\d+",UK="["+I0+"]",b0="["+g0+"]",A0="[^"+nm+O0+D0+I0+g0+_0+"]",kh="\\ud83c[\\udffb-\\udfff]",kK="(?:"+rm+"|"+kh+")",R0="[^"+nm+"]",Mh="(?:\\ud83c[\\udde6-\\uddff]){2}",xh="[\\ud800-\\udbff][\\udc00-\\udfff]",il="["+_0+"]",P0="\\u200d",F0="(?:"+b0+"|"+A0+")",MK="(?:"+il+"|"+A0+")",w0="(?:"+Uh+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+Uh+"(?:D|LL|M|RE|S|T|VE))?",C0=kK+"?",B0="["+v0+"]?",xK="(?:"+P0+"(?:"+[R0,Mh,xh].join("|")+")"+B0+C0+")*",qK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",VK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U0=B0+C0+xK,jK="(?:"+[UK,Mh,xh].join("|")+")"+U0,KK="(?:"+[R0+rm+"?",rm,Mh,xh,BK].join("|")+")",$K=RegExp(Uh,"g"),GK=RegExp(rm,"g"),qh=RegExp(kh+"(?="+kh+")|"+KK+U0,"g"),QK=RegExp([il+"?"+b0+"+"+w0+"(?="+[S0,il,"$"].join("|")+")",MK+"+"+L0+"(?="+[S0,il+F0,"$"].join("|")+")",il+"?"+F0+"+"+w0,il+"+"+L0,VK,qK,D0,jK].join("|"),"g"),YK=RegExp("["+P0+nm+y0+v0+"]"),JK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,HK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zK=-1,yn={};yn[y]=yn[_]=yn[B]=yn[K]=yn[te]=yn[ce]=yn[Tt]=yn[En]=yn[un]=!0,yn[De]=yn[ge]=yn[Ku]=yn[St]=yn[P]=yn[Y]=yn[xe]=yn[He]=yn[it]=yn[Pt]=yn[Yr]=yn[Ba]=yn[Ir]=yn[oi]=yn[ju]=!1;var hn={};hn[De]=hn[ge]=hn[Ku]=hn[P]=hn[St]=hn[Y]=hn[y]=hn[_]=hn[B]=hn[K]=hn[te]=hn[it]=hn[Pt]=hn[Yr]=hn[Ba]=hn[Ir]=hn[oi]=hn[xt]=hn[ce]=hn[Tt]=hn[En]=hn[un]=!0,hn[xe]=hn[He]=hn[ju]=!1;var WK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},XK={"&":"&","<":"<",">":">",'"':""","'":"'"},ZK={"&":"&","<":"<",">":">",""":'"',"'":"'"},e$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},t$=parseFloat,n$=parseInt,k0=typeof global=="object"&&global&&global.Object===Object&&global,r$=typeof self=="object"&&self&&self.Object===Object&&self,fr=k0||r$||Function("return this")(),Vh=typeof Ed=="object"&&Ed&&!Ed.nodeType&&Ed,$u=Vh&&typeof bp=="object"&&bp&&!bp.nodeType&&bp,M0=$u&&$u.exports===Vh,jh=M0&&k0.process,vi=function(){try{var G=$u&&$u.require&&$u.require("util").types;return G||jh&&jh.binding&&jh.binding("util")}catch(oe){}}(),x0=vi&&vi.isArrayBuffer,q0=vi&&vi.isDate,V0=vi&&vi.isMap,j0=vi&&vi.isRegExp,K0=vi&&vi.isSet,$0=vi&&vi.isTypedArray;function ui(G,oe,ne){switch(ne.length){case 0:return G.call(oe);case 1:return G.call(oe,ne[0]);case 2:return G.call(oe,ne[0],ne[1]);case 3:return G.call(oe,ne[0],ne[1],ne[2])}return G.apply(oe,ne)}function i$(G,oe,ne,Ce){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Kh(G,oe,ne){for(var Ce=-1,dt=G==null?0:G.length;++Ce-1;);return ne}function X0(G,oe){for(var ne=G.length;ne--&&al(oe,G[ne],0)>-1;);return ne}function p$(G,oe){for(var ne=G.length,Ce=0;ne--;)G[ne]===oe&&++Ce;return Ce}var m$=Yh(WK),N$=Yh(XK);function T$(G){return"\\"+e$[G]}function E$(G,oe){return G==null?e:G[oe]}function sl(G){return YK.test(G)}function h$(G){return JK.test(G)}function y$(G){for(var oe,ne=[];!(oe=G.next()).done;)ne.push(oe.value);return ne}function Wh(G){var oe=-1,ne=Array(G.size);return G.forEach(function(Ce,dt){ne[++oe]=[dt,Ce]}),ne}function Z0(G,oe){return function(ne){return G(oe(ne))}}function iu(G,oe){for(var ne=-1,Ce=G.length,dt=0,Qt=[];++ne-1}function sG(s,c){var f=this.__data__,h=gm(f,s);return h<0?(++this.size,f.push([s,c])):f[h][1]=c,this}Ns.prototype.clear=nG,Ns.prototype.delete=rG,Ns.prototype.get=iG,Ns.prototype.has=aG,Ns.prototype.set=sG;function Ts(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function bi(s,c,f,h,O,L){var M,V=c&d,J=c&p,le=c&E;if(f&&(M=O?f(s,h,O,L):f(s)),M!==e)return M;if(!bn(s))return s;var de=ft(s);if(de){if(M=lQ(s),!V)return Jr(s,M)}else{var Te=Dr(s),be=Te==He||Te==Bt;if(du(s))return BA(s,V);if(Te==Yr||Te==De||be&&!O){if(M=J||be?{}:eR(s),!V)return J?ZG(s,_G(M,s)):XG(s,dA(M,s))}else{if(!hn[Te])return O?s:{};M=dQ(s,Te,V)}}L||(L=new sa);var $e=L.get(s);if($e)return $e;L.set(s,M),RR(s)?s.forEach(function(tt){M.add(bi(tt,c,f,tt,s,L))}):bR(s)&&s.forEach(function(tt,Dt){M.set(Dt,bi(tt,c,f,Dt,s,L))});var et=le?J?vy:_y:J?zr:pr,yt=de?e:et(s);return Oi(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),Ud(M,Dt,bi(tt,c,f,Dt,s,L))}),M}function vG(s){var c=pr(s);return function(f){return fA(f,s,c)}}function fA(s,c,f){var h=f.length;if(s==null)return!h;for(s=mn(s);h--;){var O=f[h],L=c[O],M=s[O];if(M===e&&!(O in s)||!L(M))return!1}return!0}function pA(s,c,f){if(typeof s!="function")throw new Si(i);return Kd(function(){s.apply(e,f)},c)}function kd(s,c,f,h){var O=-1,L=im,M=!0,V=s.length,J=[],le=c.length;if(!V)return J;f&&(c=vn(c,ci(f))),h?(L=Kh,M=!1):c.length>=n&&(L=Pd,M=!1,c=new Yu(c));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:FR(h);f0&&f(V)?c>1?_r(V,c-1,f,h,O):ru(O,V):h||(O[O.length]=V)}return O}var iy=VA(),TA=VA(!0);function ka(s,c){return s&&iy(s,c,pr)}function ay(s,c){return s&&TA(s,c,pr)}function vm(s,c){return nu(c,function(f){return gs(s[f])})}function Hu(s,c){c=cu(c,s);for(var f=0,h=c.length;s!=null&&fc}function DG(s,c){return s!=null&&on.call(s,c)}function bG(s,c){return s!=null&&c in mn(s)}function AG(s,c,f){return s>=Sr(c,f)&&s=120&&de.length>=120)?new Yu(M&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&mm.call(V,J,1),mm.call(s,J,1);return s}function bA(s,c){for(var f=s?c.length:0,h=f-1;f--;){var O=c[f];if(f==h||O!==L){var L=O;Is(O)?mm.call(s,O,1):Ny(s,O)}}return s}function fy(s,c){return s+Em(oA()*(c-s+1))}function VG(s,c,f,h){for(var O=-1,L=rr(Tm((c-s)/(f||1)),0),M=ne(L);L--;)M[h?L:++O]=s,s+=f;return M}function py(s,c){var f="";if(!s||c<1||c>Tn)return f;do c%2&&(f+=s),c=Em(c/2),c&&(s+=s);while(c);return f}function gt(s,c){return Py(rR(s,c,Wr),s+"")}function jG(s){return lA(Tl(s))}function KG(s,c){var f=Tl(s);return Cm(f,Ju(c,0,f.length))}function qd(s,c,f,h){if(!bn(s))return s;c=cu(c,s);for(var O=-1,L=c.length,M=L-1,V=s;V!=null&&++OO?0:O+c),f=f>O?O:f,f<0&&(f+=O),O=c>f?0:f-c>>>0,c>>>=0;for(var L=ne(O);++h>>1,M=s[L];M!==null&&!di(M)&&(f?M<=c:M=n){var le=c?null:rQ(s);if(le)return sm(le);M=!1,O=Pd,J=new Yu}else J=c?[]:V;e:for(;++h=h?s:Ai(s,c,f)}var CA=C$||function(s){return fr.clearTimeout(s)};function BA(s,c){if(c)return s.slice();var f=s.length,h=nA?nA(f):new s.constructor(f);return s.copy(h),h}function yy(s){var c=new s.constructor(s.byteLength);return new fm(c).set(new fm(s)),c}function JG(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function HG(s){var c=new s.constructor(s.source,h0.exec(s));return c.lastIndex=s.lastIndex,c}function zG(s){return Bd?mn(Bd.call(s)):{}}function UA(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function kA(s,c){if(s!==c){var f=s!==e,h=s===null,O=s===s,L=di(s),M=c!==e,V=c===null,J=c===c,le=di(c);if(!V&&!le&&!L&&s>c||L&&M&&J&&!V&&!le||h&&M&&J||!f&&J||!O)return 1;if(!h&&!L&&!le&&s=V)return J;var le=f[h];return J*(le=="desc"?-1:1)}}return s.index-c.index}function MA(s,c,f,h){for(var O=-1,L=s.length,M=f.length,V=-1,J=c.length,le=rr(L-M,0),de=ne(J+le),Te=!h;++V1?f[O-1]:e,M=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,M&&xr(f[0],f[1],M)&&(L=O<3?e:L,O=1),c=mn(c);++h-1?O[L?c[M]:M]:e}}function $A(s){return ys(function(c){var f=c.length,h=f,O=Di.prototype.thru;for(s&&c.reverse();h--;){var L=c[h];if(typeof L!="function")throw new Si(i);if(O&&!M&&wm(L)=="wrapper")var M=new Di([],!0)}for(h=M?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var le=L.get(s),de=L.get(c);if(le&&de)return le==c&&de==s;var Te=-1,be=!0,$e=f&v?new Yu:e;for(L.set(s,c),L.set(c,s);++Te1?"& ":"")+c[h],c=c.join(f>2?", ":" "),s.replace(mK,`{ +`+si.LITERAL_SPACE.repeat(t+3)+`... +`+si.LITERAL_SPACE.repeat(t+2)+`} +`}function ZD({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let l=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(l.size>1?"s":"")+`: "${[...l].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);if(e){let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName)if(o.has(d)){l=!0;for(let E of p)e.subgraphName!==d&&u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${E}" to access subgraph "${d}".`)}l||u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`),u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`)}else t.subgraphNames.size>1&&u.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${i}".`),u.push(`The type "${a}" is not a descendant of an entity ancestor that can provide a shared route to access "${i}".`);return a!==(e==null?void 0:e.typeName)&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function cV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let d=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(d.size>1?"s":"")+`: "${[...d].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName){if(!o.has(d))continue;let E=e.subgraphNames.filter(v=>v!==d),I=E.length>1;l=!0;for(let v of p)u.push(`The entity ancestor "${e.typeName}" in subgraph${I?"s":""} "${E.join(si.QUOTATION_JOIN)}" do${I?"":"es"} not satisfy the key field set "${v}" to access subgraph "${d}".`)}if(!l){let d=e.subgraphNames.length>1;u.push(`The entity ancestor "${e.typeName}" in subgraph${d?"s":""} "${e.subgraphNames.join(si.QUOTATION_JOIN)}" ha${d?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`)}return u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`),a!==e.typeName&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function QE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var dV=$i(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData({resolvedDescendantNames:t,resolvedFieldNames:n}){for(let r of n)this.addResolvedFieldName(r);for(let r of t)this.resolvedDescendantNames.add(r)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}addExternalSubgraphName({fieldName:t,subgraphName:n}){let r=this.fieldDataByName.get(t);if(!r)throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);r.externalSubgraphNames.add(n)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var fV=w(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ofe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,resolvedPaths:o,subgraphNameByUnresolvablePath:u,visitedEntities:l}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"resolvedPaths");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.resolvedPaths=o,this.subgraphNameByUnresolvablePath=u,this.visitedEntities=l}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ofe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isEdgeInaccessible())return{visited:!1,areDescendantsResolved:!1};if(t.isExternal)return{visited:!1,areDescendantsResolved:!1,isExternal:!0};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,isRevisitedNode:d,visited:p}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:u,data:r,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:p})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;let l=(0,as.getValueOrDefault)(this.resDataByNodeName,a.nodeName,()=>n.copy());if(n.addResolvedFieldName(r),l.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let p of this.relativeOriginPaths){let E=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${p}${o}`,()=>n.copy());E.addResolvedFieldName(r),t&&(E.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let d=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,o,()=>n.copy());d.addResolvedFieldName(r),t&&d.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){if(this.resolvedPaths.has(t))return;(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;this.resolvedPaths.has(i)||(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,i,()=>n)}}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&(this.subgraphNameByUnresolvablePath.delete(r),this.resolvedPaths.add(r));return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),this.resolvedPaths.add(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&(this.subgraphNameByUnresolvablePath.delete(a),this.resolvedPaths.add(a))}}};zE.EntityWalker=rb});var pV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,visited:d}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:u,data:i,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:d})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;n.addResolvedFieldName(r);let l=(0,ss.getValueOrDefault)(this.resDataByPath,o,()=>new WE.NodeResolutionData({fieldDataByName:a.fieldDataByName,typeName:a.typeName}));l.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),l.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ia=wr(),ZE=zD(),ufe=fV(),cfe=pV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ia.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ia.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ia.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){if(a.externalFieldSets.has(o))continue;let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){let l=this.nodeByNodeName.get(n);if(!l)throw new Error(`Fatal: Could not find entity node for "${n}".`);u.add(n);let d=this.nodesByTypeName.get(l.typeName);if(!(d!=null&&d.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let p=new ufe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}),E=l.getAllAccessibleEntityNodeNames();for(let I of d){if(I.nodeName!==l.nodeName&&!E.has(I.nodeName))continue;let{areDescendantsResolved:v}=p.visitEntityDescendantConcreteNode({node:I,selectionPath:""});if(v)return}for(let[I,v]of p.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:I,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:v}),resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new cfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ia.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ia.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ia.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){let r=new Set;for(let[i,a]of n.entityNodeNamesByPath){let o=new Map,u=new Map;for(let d of a)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:d,resDataByRelativeOriginPath:u,resolvedPaths:r,subgraphNameByUnresolvablePath:o,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n}),o.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n});let l=new Array;if(o.size>0&&l.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:a,resDataByPath:u,pathFromRoot:i,rootFieldData:t,subgraphNameByUnresolvablePath:o})),n.unresolvablePaths.size>0&&l.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(l.length<1))return{errors:l,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var i;let r=new Set;for(let[a,o]of n.pathsByEntityNodeName){let u=new Map;if(this.resDataByNodeName.has(a))continue;let l=(0,ia.getValueOrDefault)(this.resDataByRelativePathByEntity,a,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:a,resDataByRelativeOriginPath:l,resolvedPaths:r,subgraphNameByUnresolvablePath:u,visitedEntities:(0,ia.getValueOrDefault)(this.visitedEntitiesByOriginEntity,a,()=>new Set)}),!(u.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:a,pathFromRoot:(i=(0,ia.getFirstEntry)(o))!=null?i:"",rootFieldData:t,subgraphNameByUnresolvablePath:u}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ia.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=w(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=lfe;th.newConfigurationData=dfe;function lfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function dfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Nfe;qc.normalizeSubgraph=TV;qc.batchNormalize=Tfe;var W=Ie(),bn=Fr(),oi=Ip(),Ur=Du(),Yn=yp(),se=$i(),vp=dd(),ffe=Vv(),_i=TE(),pfe=MD(),us=gp(),mV=$D(),os=Gf(),nn=$l(),lr=Su(),cb=sb(),nh=yE(),X=zn(),mfe=ql(),Ve=wr(),Op=ob(),NV=IE();function Nfe(e,t=!0){let{error:n,documentNode:r}=(0,bn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Sp(new cb.Graph).normalize(r)}function TV(e,t,n){return new Sp(n||new cb.Graph,t).normalize(e)}var Dp,ub,rh,EV,Sp=class{constructor(t,n){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,oi.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,lr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,lr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,Ve.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,Ve.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===X.OVERRIDE,I=u===X.REQUIRES_SCOPES,v=u===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,_i.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,Q=[];for(let pe of i.arguments){let le=pe.name.value;if(A.has(le)){U.add(le);continue}A.add(le);let Ae=n.argumentTypeNodeByName.get(le);if(!Ae){j.add(le);continue}if(!this.isArgumentValueValid(Ae.typeNode,pe.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(pe.value),`@${u}`,le,(0,_i.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:pe.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||le!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:pe.value.values,requiredScopes:Q})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let ee=(0,Ve.getEntriesNotInHashSet)(o,A);if(ee.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,ee)),a.length>0||!I)return a;let ne=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ne.requiredScopes.push(...Q);else{let pe=(0,Ve.getValueOrDefault)(ne.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));pe.inheritedData.requiredScopes.push(...Q),pe.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,bn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(X.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,lr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,bn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,_i.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,lr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,bn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,lr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,lr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,lr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){u=void 0;break}if(v.value.kind!==W.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,bn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,oi.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,lr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,bn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,oi.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,oi.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],Q=-1,ee=!0,ne=r,pe=!1;return(0,W.visit)(u,{Argument:{enter(){return!1}},Field:{enter(le){var an,kr;let Ae=d[Q],Me=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Me)),W.BREAK;let Ze=le.name.value,Z=`${Me}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),ee)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ne=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&El(an=l,Dp,ub).call(an,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let ve=Ae.fieldDataByName.get(Ze);if(!ve)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Me,Ze)),W.BREAK;if(E[Q].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[Q].add(Ze);let{isDefinedExternal:gt,isUnconditionallyProvided:rn}=(0,Ve.getOrThrowError)(ve.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),un=gt&&!rn;rn||(pe=!0);let In=(0,lr.getTypeNodeNamedTypeName)(ve.node.type),xt=l.parentDefinitionDataByTypeName.get(In);if(Ur.BASE_SCALARS.has(In)||(xt==null?void 0:xt.kind)===W.Kind.SCALAR_TYPE_DEFINITION||(xt==null?void 0:xt.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!gt){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!un&&!i)return;let nr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),En=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?nr.providedBy.push(En):nr.requiredBy.push(En);return}if(!xt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,In)),W.BREAK;if(gt&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),xt.kind===W.Kind.OBJECT_TYPE_DEFINITION||xt.kind===W.Kind.INTERFACE_TYPE_DEFINITION||xt.kind===W.Kind.UNION_TYPE_DEFINITION){ee=!0,d.push(xt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(le){let Ae=d[Q],Me=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!le.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=le.typeCondition.name.value;if(Z===Me){d.push(Ae),ee=!0;return}if(!(0,bn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,Me)),W.BREAK;let ve=l.parentDefinitionDataByTypeName.get(Z);if(!ve)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Me,Z)),W.BREAK;switch(ee=!0,ve.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!ve.implementedInterfaceTypeNames.has(Me))break;d.push(ve);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let gt=l.concreteTypeNamesByAbstractTypeName.get(Me);if(!gt||!gt.has(Z))break;d.push(ve);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(ve);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Me,Z,(0,Ve.kindToNodeType)(ve.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,Ve.kindToNodeType)(Ae.kind),Me)),W.BREAK}},SelectionSet:{enter(){if(!ee){let le=d[Q];if(le.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;if(ne===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,Ve.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=le.fieldDataByName.get(ne);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,le.name,ne)),W.BREAK;let Me=(0,lr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(Me),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Z))),W.BREAK}if(Q+=1,ee=!1,Q<0||Q>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;E.push(new Set)},leave(){if(ee){let le=d[Q+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,le.name,(0,Ve.kindToNodeType)(le.kind))),ee=!1}Q-=1,d.pop(),E.pop()}}}),j.length>0||!pe?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,oi.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": + -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,oi.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(Ur.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!u)continue;if(u.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,Ve.kindToNodeType)(u.kind));continue}if(t.name===u.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of u.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,_i.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,_i.printTypeNode)(v.node.type));let U=new Set;for(let[j,Q]of E.argumentDataByName){U.add(j);let ee=v.argumentDataByName.get(j);if(!ee){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ne=(0,_i.printTypeNode)(ee.type),pe=(0,_i.printTypeNode)(Q.type);pe!==ne&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ne,argumentName:j,expectedType:pe}))}for(let[j,Q]of v.argumentDataByName)U.has(j)||Q.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,Ve.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,Ve.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,Ve.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,Ve.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let u=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!u||u.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=u.value.values,d=(0,_i.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Ur.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPIC:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPICS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],u=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,oi.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}u=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:u,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,oi.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(vp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let Q of p.value.fields){let ee=Q.name.value;if(!vp.STREAM_CONFIGURATION_FIELD_NAMES.has(ee)){I.add(ee),E=!1;continue}if(v.has(ee))v.delete(ee);else{U.add(ee),E=!1;continue}switch(A.has(ee)&&A.delete(ee),ee){case X.CONSUMER_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}l=Q.value.value;break;case X.STREAM_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}d=Q.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if(Q.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{u=parseInt(Q.value.value,10)}catch(ne){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return u<0?(u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):u>mfe.MAX_INT32&&(u=0,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),k({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:u,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNEL:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNELS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],u;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:u=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:u=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{u=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{u=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{u=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{u=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{u=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}u&&(0,Ve.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(u)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[u,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of vp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,_i.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,_i.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,Ve.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,u]of t){let l=`${u.originalParentTypeName}.${o}`;if(n.has(o)){(a=u.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,u)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,Ve.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!0,i)),o=(0,oi.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let u=this.directiveDefinitionDataByName.get(a);if(!u)continue;if(!u.isRepeatable&&o.length>1){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return $(k({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let u=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=u[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let Q=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&Q&&Q.isDefinedExternal&&!Q.isUnconditionallyProvided&&i.extensionType!==os.ExtensionType.NONE&&(Q.isUnconditionallyProvided=!0,(0,Ve.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,Ve.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let ee=(0,lr.getTypeNodeNamedTypeName)(j.node.type);if(Ur.BASE_SCALARS.has(ee))return;let ne=a.parentDefinitionDataByTypeName.get(ee);if(!ne)return W.BREAK;if(ne.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,u.push(ne);return}if((0,bn.isKindAbstract)(ne.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=u.length))return W.BREAK},leave(){p&&(p=!1),d-=1,u.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,us.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let u=this.validateProvidesOrRequires(r,n.requires,!1);u&&(a.requires=u)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,us.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,Ve.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,mV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,mV.upsertParentsAndChildren)(this,t);let n=[];El(this,rh,EV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[u,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,u);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let u of this.invalidConfigureDescriptionNodeDatas)u.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,Ve.kindToNodeType)(u.kind),u.name));this.evaluateExternalKeyFields();for(let[u,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(u));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(u));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;u!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(u),p=this.operationTypeNodeByTypeName.get(u),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===os.ExtensionType.EXTENDS&&(l.extensionType=os.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[Q,ee]of l.fieldDataByName){if(!E&&((o=ee.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push(Q),this.validateArguments(ee,l.kind),ee.namedTypeKind!==W.Kind.NULL)continue;let ne=this.parentDefinitionDataByTypeName.get(ee.namedTypeName);if(ne){if(!(0,nn.isOutputNodeKind)(ne.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:ee,namedTypeData:ne,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}ee.namedTypeKind=this.entityInterfaceDataByTypeName.get(ne.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ne.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(u,I)):this.warnings.push((0,us.externalInterfaceFieldsWarning)(this.subgraphName,u,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Op.newConfigurationData)(d,u)),U=this.entityInterfaceDataByTypeName.get(u);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let Q=this.concreteTypeNamesByAbstractTypeName.get(u);Q&&(0,Ve.addIterableToSet)({source:Q,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,oi.isNodeQuery)(u,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,Ve.kindToNodeType)(l.kind),u)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===os.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(u));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(u)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let u of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(u),d=(0,Ve.getOrThrowError)(bn.operationTypeNodeToDefaultType,u,X.OPERATION_TO_DEFAULT),p=l?(0,lr.getTypeNodeNamedTypeName)(l.type):d;if(Ur.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(u,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,u)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,u,E.kind))}for(let u of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(u);if(!l){this.errors.push((0,se.undefinedTypeError)(u));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(u);(!d||d.size<1)&&this.warnings.push((0,us.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,u))}let i=new Map;for(let u of this.directiveDefinitionByName.values()){let l=(0,bn.extractExecutableDirectiveLocations)(u.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,u,l)}this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let u of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(u)):this.warnings.push((0,us.invalidExternalFieldWarning)(u,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,ffe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Dp=new WeakSet,ub=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,us.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},rh=new WeakSet,EV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Ur.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,Ve.addOptionalIterableToSet)({source:vp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};qc.NormalizationFactory=Sp;function Tfe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let ee of e)ee.name&&(0,pfe.recordSubgraphName)(ee.name,d,p);let j=new cb.Graph;for(let ee=0;ee0&&A.push(...le.warnings),!le.success){U.push((0,se.subgraphValidationError)(pe,le.errors));continue}if(!le){U.push((0,se.subgraphValidationError)(pe,[se.subgraphValidationFailureError]));continue}l.set(pe,le.parentDefinitionDataByTypeName);for(let Ae of le.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,Me]of le.fieldCoordsByNamedTypeName)(0,Ve.addIterableToSet)({source:Me,target:(0,Ve.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,Me]of le.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(Me));continue}(0,Ve.addIterableToSet)({source:Me,target:Ze})}for(let[Ae,Me]of le.entityDataByTypeName){let Ze=Me.keyFieldSetDatasBySubgraphName.get(pe);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:pe})}if(ne.name&&i.set(pe,{conditionalFieldDataByCoordinates:le.conditionalFieldDataByCoordinates,configurationDataByTypeName:le.configurationDataByTypeName,definitions:le.subgraphAST,directiveDefinitionByName:le.directiveDefinitionByName,entityInterfaces:le.entityInterfaces,isVersionTwo:le.isVersionTwo,keyFieldNamesByParentTypeName:le.keyFieldNamesByParentTypeName,name:pe,operationTypes:le.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:le.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:le.persistedDirectiveDefinitionDataByDirectiveName,schema:le.schema,schemaNode:le.schemaNode,url:ne.url}),!(le.overridesByTargetSubgraphName.size<1))for(let[Ae,Me]of le.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,ve]of Me){let gt=le.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,us.invalidOverrideTargetSubgraphNameWarning)(Ae,gt,[...ve],ne.name));else{let rn=(0,Ve.getValueOrDefault)(a,Ae,()=>new Map),un=(0,Ve.getValueOrDefault)(rn,Z,()=>new Set(ve));(0,Ve.addIterableToSet)({source:ve,target:un})}for(let rn of ve){let un=`${gt}.${rn}`,In=o.get(un);if(!In){o.set(un,[pe]);continue}In.push(pe),u.add(un)}}}}let Q=[];if(I.size>0&&Q.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&Q.push((0,se.invalidSubgraphNamesError)([...p],E)),u.size>0){let ee=[];for(let ne of u){let pe=(0,Ve.getOrThrowError)(o,ne,"overrideSourceSubgraphNamesByFieldPath");ee.push((0,se.duplicateOverriddenFieldErrorMessage)(ne,pe))}Q.push((0,se.duplicateOverriddenFieldsError)(ee))}if(Q.push(...U),Q.length>0)return{errors:Q,success:!1,warnings:A};for(let[ee,ne]of a){let pe=(0,Ve.getOrThrowError)(i,ee,"internalSubgraphBySubgraphName");pe.overriddenFieldNamesByParentTypeName=ne;for(let[le,Ae]of ne){let Me=pe.configurationDataByTypeName.get(le);Me&&((0,Yn.subtractSet)(Ae,Me.fieldNames),Me.fieldNames.size<1&&pe.configurationDataByTypeName.delete(le))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var ih=w(Kc=>{"use strict";m();T();N();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.DivergentType=void 0;Kc.getLeastRestrictiveMergedTypeNode=hfe;Kc.getMostRestrictiveMergedTypeNode=yfe;Kc.renameNamedTypeName=Ife;var Vc=Ie(),yV=$i(),Efe=Su(),hV=Fr(),IV=ql(),jc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(jc||(Kc.DivergentType=jc={}));function gV(e,t,n,r,i){t=(0,Efe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=jc.NONE,u=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(fb,"__esModule",{value:!0});fb.renameRootTypes=vfe;var gfe=Ie(),db=Fr(),_fe=ih(),Bu=zn(),$c=wr();function vfe(e,t){let n,r=!1,i;(0,gfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Bu.SERVICE_FIELD||o===Bu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let u=n.name,l=(0,$c.getOrThrowError)(n.fieldDataByName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,d,Bu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,_fe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var _V=w((Ed,bp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,Q=8,ee=16,ne=32,pe=64,le=128,Ae=256,Me=512,Ze=30,Z="...",ve=800,gt=16,rn=1,un=2,In=3,xt=1/0,an=9007199254740991,kr=17976931348623157e292,nr=NaN,En=4294967295,Ht=En-1,Ln=En>>>1,ae=[["ary",le],["bind",A],["bindKey",U],["curry",Q],["curryRight",ee],["flip",Me],["partial",ne],["partialRight",pe],["rearg",Ae]],De="[object Arguments]",ge="[object Array]",Le="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",xe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",ps="[object Null]",Yr="[object Object]",ms="[object Promise]",rl="[object Proxy]",Ua="[object RegExp]",Ir="[object Set]",ui="[object String]",qt="[object Symbol]",gr="[object Undefined]",ju="[object WeakMap]",ka="[object WeakSet]",Ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ue="[object Uint8Array]",Tt="[object Uint8ClampedArray]",hn="[object Uint16Array]",cn="[object Uint32Array]",vn=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,aK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N0=/&(?:amp|lt|gt|quot|#39);/g,T0=/[&<>"']/g,sK=RegExp(N0.source),oK=RegExp(T0.source),uK=/<%-([\s\S]+?)%>/g,cK=/<%([\s\S]+?)%>/g,E0=/<%=([\s\S]+?)%>/g,lK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dK=/^\w*$/,fK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,pK=RegExp(Ch.source),Bh=/^\s+/,mK=/\s/,NK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,TK=/\{\n\/\* \[wrapped with (.+)\] \*/,EK=/,? & /,hK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yK=/[()=,{}\[\]\/\s]/,IK=/\\(\\)?/g,gK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h0=/\w*$/,_K=/^[-+]0x[0-9a-f]+$/i,vK=/^0b[01]+$/i,OK=/^\[object .+?Constructor\]$/,SK=/^0o[0-7]+$/i,DK=/^(?:0|[1-9]\d*)$/,bK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tm=/($^)/,AK=/['\n\r\u2028\u2029\\]/g,nm="\\ud800-\\udfff",RK="\\u0300-\\u036f",PK="\\ufe20-\\ufe2f",FK="\\u20d0-\\u20ff",y0=RK+PK+FK,I0="\\u2700-\\u27bf",g0="a-z\\xdf-\\xf6\\xf8-\\xff",wK="\\xac\\xb1\\xd7\\xf7",LK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",CK="\\u2000-\\u206f",BK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",O0=wK+LK+CK+BK,Uh="['\u2019]",UK="["+nm+"]",S0="["+O0+"]",rm="["+y0+"]",D0="\\d+",kK="["+I0+"]",b0="["+g0+"]",A0="[^"+nm+O0+D0+I0+g0+_0+"]",kh="\\ud83c[\\udffb-\\udfff]",MK="(?:"+rm+"|"+kh+")",R0="[^"+nm+"]",Mh="(?:\\ud83c[\\udde6-\\uddff]){2}",xh="[\\ud800-\\udbff][\\udc00-\\udfff]",il="["+_0+"]",P0="\\u200d",F0="(?:"+b0+"|"+A0+")",xK="(?:"+il+"|"+A0+")",w0="(?:"+Uh+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+Uh+"(?:D|LL|M|RE|S|T|VE))?",C0=MK+"?",B0="["+v0+"]?",qK="(?:"+P0+"(?:"+[R0,Mh,xh].join("|")+")"+B0+C0+")*",VK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U0=B0+C0+qK,KK="(?:"+[kK,Mh,xh].join("|")+")"+U0,$K="(?:"+[R0+rm+"?",rm,Mh,xh,UK].join("|")+")",GK=RegExp(Uh,"g"),QK=RegExp(rm,"g"),qh=RegExp(kh+"(?="+kh+")|"+$K+U0,"g"),YK=RegExp([il+"?"+b0+"+"+w0+"(?="+[S0,il,"$"].join("|")+")",xK+"+"+L0+"(?="+[S0,il+F0,"$"].join("|")+")",il+"?"+F0+"+"+w0,il+"+"+L0,jK,VK,D0,KK].join("|"),"g"),JK=RegExp("["+P0+nm+y0+v0+"]"),HK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],WK=-1,gn={};gn[y]=gn[_]=gn[B]=gn[K]=gn[te]=gn[ue]=gn[Tt]=gn[hn]=gn[cn]=!0,gn[De]=gn[ge]=gn[Ku]=gn[St]=gn[P]=gn[Y]=gn[xe]=gn[He]=gn[it]=gn[Pt]=gn[Yr]=gn[Ua]=gn[Ir]=gn[ui]=gn[ju]=!1;var yn={};yn[De]=yn[ge]=yn[Ku]=yn[P]=yn[St]=yn[Y]=yn[y]=yn[_]=yn[B]=yn[K]=yn[te]=yn[it]=yn[Pt]=yn[Yr]=yn[Ua]=yn[Ir]=yn[ui]=yn[qt]=yn[ue]=yn[Tt]=yn[hn]=yn[cn]=!0,yn[xe]=yn[He]=yn[ju]=!1;var XK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ZK={"&":"&","<":"<",">":">",'"':""","'":"'"},e$={"&":"&","<":"<",">":">",""":'"',"'":"'"},t$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},n$=parseFloat,r$=parseInt,k0=typeof global=="object"&&global&&global.Object===Object&&global,i$=typeof self=="object"&&self&&self.Object===Object&&self,fr=k0||i$||Function("return this")(),Vh=typeof Ed=="object"&&Ed&&!Ed.nodeType&&Ed,$u=Vh&&typeof bp=="object"&&bp&&!bp.nodeType&&bp,M0=$u&&$u.exports===Vh,jh=M0&&k0.process,Oi=function(){try{var G=$u&&$u.require&&$u.require("util").types;return G||jh&&jh.binding&&jh.binding("util")}catch(oe){}}(),x0=Oi&&Oi.isArrayBuffer,q0=Oi&&Oi.isDate,V0=Oi&&Oi.isMap,j0=Oi&&Oi.isRegExp,K0=Oi&&Oi.isSet,$0=Oi&&Oi.isTypedArray;function ci(G,oe,re){switch(re.length){case 0:return G.call(oe);case 1:return G.call(oe,re[0]);case 2:return G.call(oe,re[0],re[1]);case 3:return G.call(oe,re[0],re[1],re[2])}return G.apply(oe,re)}function a$(G,oe,re,Ce){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Kh(G,oe,re){for(var Ce=-1,dt=G==null?0:G.length;++Ce-1;);return re}function X0(G,oe){for(var re=G.length;re--&&al(oe,G[re],0)>-1;);return re}function m$(G,oe){for(var re=G.length,Ce=0;re--;)G[re]===oe&&++Ce;return Ce}var N$=Yh(XK),T$=Yh(ZK);function E$(G){return"\\"+t$[G]}function h$(G,oe){return G==null?e:G[oe]}function sl(G){return JK.test(G)}function y$(G){return HK.test(G)}function I$(G){for(var oe,re=[];!(oe=G.next()).done;)re.push(oe.value);return re}function Wh(G){var oe=-1,re=Array(G.size);return G.forEach(function(Ce,dt){re[++oe]=[dt,Ce]}),re}function Z0(G,oe){return function(re){return G(oe(re))}}function iu(G,oe){for(var re=-1,Ce=G.length,dt=0,Qt=[];++re-1}function oG(s,c){var f=this.__data__,h=gm(f,s);return h<0?(++this.size,f.push([s,c])):f[h][1]=c,this}Ns.prototype.clear=rG,Ns.prototype.delete=iG,Ns.prototype.get=aG,Ns.prototype.has=sG,Ns.prototype.set=oG;function Ts(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function Ai(s,c,f,h,O,L){var M,V=c&d,J=c&p,ce=c&E;if(f&&(M=O?f(s,h,O,L):f(s)),M!==e)return M;if(!An(s))return s;var de=ft(s);if(de){if(M=dQ(s),!V)return Jr(s,M)}else{var Te=Dr(s),be=Te==He||Te==Bt;if(du(s))return BA(s,V);if(Te==Yr||Te==De||be&&!O){if(M=J||be?{}:eR(s),!V)return J?eQ(s,vG(M,s)):ZG(s,dA(M,s))}else{if(!yn[Te])return O?s:{};M=fQ(s,Te,V)}}L||(L=new oa);var $e=L.get(s);if($e)return $e;L.set(s,M),RR(s)?s.forEach(function(tt){M.add(Ai(tt,c,f,tt,s,L))}):bR(s)&&s.forEach(function(tt,Dt){M.set(Dt,Ai(tt,c,f,Dt,s,L))});var et=ce?J?vy:_y:J?zr:pr,yt=de?e:et(s);return Si(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),Ud(M,Dt,Ai(tt,c,f,Dt,s,L))}),M}function OG(s){var c=pr(s);return function(f){return fA(f,s,c)}}function fA(s,c,f){var h=f.length;if(s==null)return!h;for(s=Nn(s);h--;){var O=f[h],L=c[O],M=s[O];if(M===e&&!(O in s)||!L(M))return!1}return!0}function pA(s,c,f){if(typeof s!="function")throw new Di(i);return Kd(function(){s.apply(e,f)},c)}function kd(s,c,f,h){var O=-1,L=im,M=!0,V=s.length,J=[],ce=c.length;if(!V)return J;f&&(c=On(c,li(f))),h?(L=Kh,M=!1):c.length>=n&&(L=Pd,M=!1,c=new Yu(c));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:FR(h);f0&&f(V)?c>1?_r(V,c-1,f,h,O):ru(O,V):h||(O[O.length]=V)}return O}var iy=VA(),TA=VA(!0);function Ma(s,c){return s&&iy(s,c,pr)}function ay(s,c){return s&&TA(s,c,pr)}function vm(s,c){return nu(c,function(f){return gs(s[f])})}function Hu(s,c){c=cu(c,s);for(var f=0,h=c.length;s!=null&&fc}function bG(s,c){return s!=null&&on.call(s,c)}function AG(s,c){return s!=null&&c in Nn(s)}function RG(s,c,f){return s>=Sr(c,f)&&s=120&&de.length>=120)?new Yu(M&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&mm.call(V,J,1),mm.call(s,J,1);return s}function bA(s,c){for(var f=s?c.length:0,h=f-1;f--;){var O=c[f];if(f==h||O!==L){var L=O;Is(O)?mm.call(s,O,1):Ny(s,O)}}return s}function fy(s,c){return s+Em(oA()*(c-s+1))}function jG(s,c,f,h){for(var O=-1,L=ir(Tm((c-s)/(f||1)),0),M=re(L);L--;)M[h?L:++O]=s,s+=f;return M}function py(s,c){var f="";if(!s||c<1||c>an)return f;do c%2&&(f+=s),c=Em(c/2),c&&(s+=s);while(c);return f}function _t(s,c){return Py(rR(s,c,Wr),s+"")}function KG(s){return lA(Tl(s))}function $G(s,c){var f=Tl(s);return Cm(f,Ju(c,0,f.length))}function qd(s,c,f,h){if(!An(s))return s;c=cu(c,s);for(var O=-1,L=c.length,M=L-1,V=s;V!=null&&++OO?0:O+c),f=f>O?O:f,f<0&&(f+=O),O=c>f?0:f-c>>>0,c>>>=0;for(var L=re(O);++h>>1,M=s[L];M!==null&&!fi(M)&&(f?M<=c:M=n){var ce=c?null:iQ(s);if(ce)return sm(ce);M=!1,O=Pd,J=new Yu}else J=c?[]:V;e:for(;++h=h?s:Ri(s,c,f)}var CA=B$||function(s){return fr.clearTimeout(s)};function BA(s,c){if(c)return s.slice();var f=s.length,h=nA?nA(f):new s.constructor(f);return s.copy(h),h}function yy(s){var c=new s.constructor(s.byteLength);return new fm(c).set(new fm(s)),c}function HG(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function zG(s){var c=new s.constructor(s.source,h0.exec(s));return c.lastIndex=s.lastIndex,c}function WG(s){return Bd?Nn(Bd.call(s)):{}}function UA(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function kA(s,c){if(s!==c){var f=s!==e,h=s===null,O=s===s,L=fi(s),M=c!==e,V=c===null,J=c===c,ce=fi(c);if(!V&&!ce&&!L&&s>c||L&&M&&J&&!V&&!ce||h&&M&&J||!f&&J||!O)return 1;if(!h&&!L&&!ce&&s=V)return J;var ce=f[h];return J*(ce=="desc"?-1:1)}}return s.index-c.index}function MA(s,c,f,h){for(var O=-1,L=s.length,M=f.length,V=-1,J=c.length,ce=ir(L-M,0),de=re(J+ce),Te=!h;++V1?f[O-1]:e,M=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,M&&xr(f[0],f[1],M)&&(L=O<3?e:L,O=1),c=Nn(c);++h-1?O[L?c[M]:M]:e}}function $A(s){return ys(function(c){var f=c.length,h=f,O=bi.prototype.thru;for(s&&c.reverse();h--;){var L=c[h];if(typeof L!="function")throw new Di(i);if(O&&!M&&wm(L)=="wrapper")var M=new bi([],!0)}for(h=M?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var ce=L.get(s),de=L.get(c);if(ce&&de)return ce==c&&de==s;var Te=-1,be=!0,$e=f&v?new Yu:e;for(L.set(s,c),L.set(c,s);++Te1?"& ":"")+c[h],c=c.join(f>2?", ":" "),s.replace(NK,`{ /* [wrapped with `+c+`] */ -`)}function pQ(s){return ft(s)||Xu(s)||!!(aA&&s&&s[aA])}function Is(s,c){var f=typeof s;return c=c==null?Tn:c,!!c&&(f=="number"||f!="symbol"&&SK.test(s))&&s>-1&&s%1==0&&s0){if(++c>=ve)return arguments[0]}else c=0;return s.apply(e,arguments)}}function Cm(s,c){var f=-1,h=s.length,O=h-1;for(c=c===e?h:c;++f1?s[c-1]:e;return f=typeof f=="function"?(s.pop(),f):e,NR(s,f)});function TR(s){var c=F(s);return c.__chain__=!0,c}function OY(s,c){return c(s),s}function Bm(s,c){return c(s)}var SY=ys(function(s){var c=s.length,f=c?s[0]:0,h=this.__wrapped__,O=function(L){return ry(L,s)};return c>1||this.__actions__.length||!(h instanceof bt)||!Is(f)?this.thru(O):(h=h.slice(f,+f+(c?1:0)),h.__actions__.push({func:Bm,args:[O],thisArg:e}),new Di(h,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function DY(){return TR(this)}function bY(){return new Di(this.value(),this.__chain__)}function AY(){this.__values__===e&&(this.__values__=PR(this.value()));var s=this.__index__>=this.__values__.length,c=s?e:this.__values__[this.__index__++];return{done:s,value:c}}function RY(){return this}function PY(s){for(var c,f=this;f instanceof Im;){var h=cR(f);h.__index__=0,h.__values__=e,c?O.__wrapped__=h:c=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,c}function FY(){var s=this.__wrapped__;if(s instanceof bt){var c=s;return this.__actions__.length&&(c=new bt(this)),c=c.reverse(),c.__actions__.push({func:Bm,args:[Fy],thisArg:e}),new Di(c,this.__chain__)}return this.thru(Fy)}function wY(){return wA(this.__wrapped__,this.__actions__)}var LY=bm(function(s,c,f){on.call(s,f)?++s[f]:Es(s,f,1)});function CY(s,c,f){var h=ft(s)?G0:OG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}function BY(s,c){var f=ft(s)?nu:NA;return f(s,We(c,3))}var UY=KA(lR),kY=KA(dR);function MY(s,c){return _r(Um(s,c),1)}function xY(s,c){return _r(Um(s,c),Gt)}function qY(s,c,f){return f=f===e?1:Et(f),_r(Um(s,c),f)}function ER(s,c){var f=ft(s)?Oi:ou;return f(s,We(c,3))}function hR(s,c){var f=ft(s)?a$:mA;return f(s,We(c,3))}var VY=bm(function(s,c,f){on.call(s,f)?s[f].push(c):Es(s,f,[c])});function jY(s,c,f,h){s=Hr(s)?s:Tl(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=rr(O+f,0)),Vm(s)?f<=O&&s.indexOf(c,f)>-1:!!O&&al(s,c,f)>-1}var KY=gt(function(s,c,f){var h=-1,O=typeof c=="function",L=Hr(s)?ne(s.length):[];return ou(s,function(M){L[++h]=O?ui(c,M,f):Md(M,c,f)}),L}),$Y=bm(function(s,c,f){Es(s,f,c)});function Um(s,c){var f=ft(s)?vn:gA;return f(s,We(c,3))}function GY(s,c,f,h){return s==null?[]:(ft(c)||(c=c==null?[]:[c]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),SA(s,c,f))}var QY=bm(function(s,c,f){s[f?0:1].push(c)},function(){return[[],[]]});function YY(s,c,f){var h=ft(s)?$h:H0,O=arguments.length<3;return h(s,We(c,4),f,O,ou)}function JY(s,c,f){var h=ft(s)?s$:H0,O=arguments.length<3;return h(s,We(c,4),f,O,mA)}function HY(s,c){var f=ft(s)?nu:NA;return f(s,xm(We(c,3)))}function zY(s){var c=ft(s)?lA:jG;return c(s)}function WY(s,c,f){(f?xr(s,c,f):c===e)?c=1:c=Et(c);var h=ft(s)?yG:KG;return h(s,c)}function XY(s){var c=ft(s)?IG:GG;return c(s)}function ZY(s){if(s==null)return 0;if(Hr(s))return Vm(s)?ol(s):s.length;var c=Dr(s);return c==it||c==Ir?s.size:cy(s).length}function e2(s,c,f){var h=ft(s)?Gh:QG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}var t2=gt(function(s,c){if(s==null)return[];var f=c.length;return f>1&&xr(s,c[0],c[1])?c=[]:f>2&&xr(c[0],c[1],c[2])&&(c=[c[0]]),SA(s,_r(c,1),[])}),km=B$||function(){return fr.Date.now()};function n2(s,c){if(typeof c!="function")throw new Si(i);return s=Et(s),function(){if(--s<1)return c.apply(this,arguments)}}function yR(s,c,f){return c=f?e:c,c=s&&c==null?s.length:c,hs(s,ue,e,e,e,e,c)}function IR(s,c){var f;if(typeof c!="function")throw new Si(i);return s=Et(s),function(){return--s>0&&(f=c.apply(this,arguments)),s<=1&&(c=e),f}}var Ly=gt(function(s,c,f){var h=A;if(f.length){var O=iu(f,ml(Ly));h|=ee}return hs(s,h,c,f,O)}),gR=gt(function(s,c,f){var h=A|U;if(f.length){var O=iu(f,ml(gR));h|=ee}return hs(c,h,s,f,O)});function _R(s,c,f){c=f?e:c;var h=hs(s,Q,e,e,e,e,e,c);return h.placeholder=_R.placeholder,h}function vR(s,c,f){c=f?e:c;var h=hs(s,re,e,e,e,e,e,c);return h.placeholder=vR.placeholder,h}function OR(s,c,f){var h,O,L,M,V,J,le=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new Si(i);c=Pi(c)||0,bn(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?rr(Pi(f.maxWait)||0,c):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var ua=h,vs=O;return h=O=e,le=Vn,M=s.apply(vs,ua),M}function et(Vn){return le=Vn,V=Kd(Dt,c),de?$e(Vn):M}function yt(Vn){var ua=Vn-J,vs=Vn-le,KR=c-ua;return Te?Sr(KR,L-vs):KR}function tt(Vn){var ua=Vn-J,vs=Vn-le;return J===e||ua>=c||ua<0||Te&&vs>=L}function Dt(){var Vn=km();if(tt(Vn))return Ft(Vn);V=Kd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,M)}function fi(){V!==e&&CA(V),le=0,h=J=O=V=e}function qr(){return V===e?M:Ft(km())}function pi(){var Vn=km(),ua=tt(Vn);if(h=arguments,O=this,J=Vn,ua){if(V===e)return et(J);if(Te)return CA(V),V=Kd(Dt,c),$e(J)}return V===e&&(V=Kd(Dt,c)),M}return pi.cancel=fi,pi.flush=qr,pi}var r2=gt(function(s,c){return pA(s,1,c)}),i2=gt(function(s,c,f){return pA(s,Pi(c)||0,f)});function a2(s){return hs(s,Me)}function Mm(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Si(i);var f=function(){var h=arguments,O=c?c.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var M=s.apply(this,h);return f.cache=L.set(O,M)||L,M};return f.cache=new(Mm.Cache||Ts),f}Mm.Cache=Ts;function xm(s){if(typeof s!="function")throw new Si(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function s2(s){return IR(2,s)}var o2=YG(function(s,c){c=c.length==1&&ft(c[0])?vn(c[0],ci(We())):vn(_r(c,1),ci(We()));var f=c.length;return gt(function(h){for(var O=-1,L=Sr(h.length,f);++O=c}),Xu=hA(function(){return arguments}())?hA:function(s){return Cn(s)&&on.call(s,"callee")&&!iA.call(s,"callee")},ft=ne.isArray,_2=x0?ci(x0):PG;function Hr(s){return s!=null&&qm(s.length)&&!gs(s)}function qn(s){return Cn(s)&&Hr(s)}function v2(s){return s===!0||s===!1||Cn(s)&&Mr(s)==St}var du=k$||Gy,O2=q0?ci(q0):FG;function S2(s){return Cn(s)&&s.nodeType===1&&!$d(s)}function D2(s){if(s==null)return!0;if(Hr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||du(s)||Nl(s)||Xu(s)))return!s.length;var c=Dr(s);if(c==it||c==Ir)return!s.size;if(jd(s))return!cy(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function b2(s,c){return xd(s,c)}function A2(s,c,f){f=typeof f=="function"?f:e;var h=f?f(s,c):e;return h===e?xd(s,c,e,f):!!h}function By(s){if(!Cn(s))return!1;var c=Mr(s);return c==xe||c==ie||typeof s.message=="string"&&typeof s.name=="string"&&!$d(s)}function R2(s){return typeof s=="number"&&sA(s)}function gs(s){if(!bn(s))return!1;var c=Mr(s);return c==He||c==Bt||c==Le||c==rl}function DR(s){return typeof s=="number"&&s==Et(s)}function qm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Tn}function bn(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function Cn(s){return s!=null&&typeof s=="object"}var bR=V0?ci(V0):LG;function P2(s,c){return s===c||uy(s,c,Sy(c))}function F2(s,c,f){return f=typeof f=="function"?f:e,uy(s,c,Sy(c),f)}function w2(s){return AR(s)&&s!=+s}function L2(s){if(TQ(s))throw new dt(r);return yA(s)}function C2(s){return s===null}function B2(s){return s==null}function AR(s){return typeof s=="number"||Cn(s)&&Mr(s)==Pt}function $d(s){if(!Cn(s)||Mr(s)!=Yr)return!1;var c=pm(s);if(c===null)return!0;var f=on.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&cm.call(f)==F$}var Uy=j0?ci(j0):CG;function U2(s){return DR(s)&&s>=-Tn&&s<=Tn}var RR=K0?ci(K0):BG;function Vm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&Mr(s)==oi}function di(s){return typeof s=="symbol"||Cn(s)&&Mr(s)==xt}var Nl=$0?ci($0):UG;function k2(s){return s===e}function M2(s){return Cn(s)&&Dr(s)==ju}function x2(s){return Cn(s)&&Mr(s)==Ua}var q2=Fm(ly),V2=Fm(function(s,c){return s<=c});function PR(s){if(!s)return[];if(Hr(s))return Vm(s)?aa(s):Jr(s);if(Fd&&s[Fd])return y$(s[Fd]());var c=Dr(s),f=c==it?Wh:c==Ir?sm:Tl;return f(s)}function _s(s){if(!s)return s===0?s:0;if(s=Pi(s),s===Gt||s===-Gt){var c=s<0?-1:1;return c*kr}return s===s?s:0}function Et(s){var c=_s(s),f=c%1;return c===c?f?c-f:c:0}function FR(s){return s?Ju(Et(s),0,gn):0}function Pi(s){if(typeof s=="number")return s;if(di(s))return dr;if(bn(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=bn(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=z0(s);var f=_K.test(s);return f||OK.test(s)?n$(s.slice(2),f?2:8):gK.test(s)?dr:+s}function wR(s){return Ma(s,zr(s))}function j2(s){return s?Ju(Et(s),-Tn,Tn):s===0?s:0}function zt(s){return s==null?"":li(s)}var K2=fl(function(s,c){if(jd(c)||Hr(c)){Ma(c,pr(c),s);return}for(var f in c)on.call(c,f)&&Ud(s,f,c[f])}),LR=fl(function(s,c){Ma(c,zr(c),s)}),jm=fl(function(s,c,f,h){Ma(c,zr(c),s,h)}),$2=fl(function(s,c,f,h){Ma(c,pr(c),s,h)}),G2=ys(ry);function Q2(s,c){var f=dl(s);return c==null?f:dA(f,c)}var Y2=gt(function(s,c){s=mn(s);var f=-1,h=c.length,O=h>2?c[2]:e;for(O&&xr(c[0],c[1],O)&&(h=1);++f1),L}),Ma(s,vy(s),f),h&&(f=bi(f,d|p|E,iQ));for(var O=c.length;O--;)Ny(f,c[O]);return f});function dJ(s,c){return BR(s,xm(We(c)))}var fJ=ys(function(s,c){return s==null?{}:xG(s,c)});function BR(s,c){if(s==null)return{};var f=vn(vy(s),function(h){return[h]});return c=We(c),DA(s,f,function(h,O){return c(h,O[0])})}function pJ(s,c,f){c=cu(c,s);var h=-1,O=c.length;for(O||(O=1,s=e);++hc){var h=s;s=c,c=h}if(f||s%1||c%1){var O=oA();return Sr(s+O*(c-s+t$("1e-"+((O+"").length-1))),c)}return fy(s,c)}var OJ=pl(function(s,c,f){return c=c.toLowerCase(),s+(f?MR(c):c)});function MR(s){return xy(zt(s).toLowerCase())}function xR(s){return s=zt(s),s&&s.replace(DK,m$).replace(GK,"")}function SJ(s,c,f){s=zt(s),c=li(c);var h=s.length;f=f===e?h:Ju(Et(f),0,h);var O=f;return f-=c.length,f>=0&&s.slice(f,O)==c}function DJ(s){return s=zt(s),s&&sK.test(s)?s.replace(T0,N$):s}function bJ(s){return s=zt(s),s&&fK.test(s)?s.replace(Ch,"\\$&"):s}var AJ=pl(function(s,c,f){return s+(f?"-":"")+c.toLowerCase()}),RJ=pl(function(s,c,f){return s+(f?" ":"")+c.toLowerCase()}),PJ=jA("toLowerCase");function FJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;if(!c||h>=c)return s;var O=(c-h)/2;return Pm(Em(O),f)+s+Pm(Tm(O),f)}function wJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;return c&&h>>0,f?(s=zt(s),s&&(typeof c=="string"||c!=null&&!Uy(c))&&(c=li(c),!c&&sl(s))?lu(aa(s),0,f):s.split(c,f)):[]}var xJ=pl(function(s,c,f){return s+(f?" ":"")+xy(c)});function qJ(s,c,f){return s=zt(s),f=f==null?0:Ju(Et(f),0,s.length),c=li(c),s.slice(f,f+c.length)==c}function VJ(s,c,f){var h=F.templateSettings;f&&xr(s,c,f)&&(c=e),s=zt(s),c=jm({},c,h,HA);var O=jm({},c.imports,h.imports,HA),L=pr(O),M=zh(O,L),V,J,le=0,de=c.interpolate||tm,Te="__p += '",be=Xh((c.escape||tm).source+"|"+de.source+"|"+(de===E0?IK:tm).source+"|"+(c.evaluate||tm).source+"|$","g"),$e="//# sourceURL="+(on.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zK+"]")+` -`;s.replace(be,function(tt,Dt,Ft,fi,qr,pi){return Ft||(Ft=fi),Te+=s.slice(le,pi).replace(bK,T$),Dt&&(V=!0,Te+=`' + +`)}function mQ(s){return ft(s)||Xu(s)||!!(aA&&s&&s[aA])}function Is(s,c){var f=typeof s;return c=c==null?an:c,!!c&&(f=="number"||f!="symbol"&&DK.test(s))&&s>-1&&s%1==0&&s0){if(++c>=ve)return arguments[0]}else c=0;return s.apply(e,arguments)}}function Cm(s,c){var f=-1,h=s.length,O=h-1;for(c=c===e?h:c;++f1?s[c-1]:e;return f=typeof f=="function"?(s.pop(),f):e,NR(s,f)});function TR(s){var c=F(s);return c.__chain__=!0,c}function SY(s,c){return c(s),s}function Bm(s,c){return c(s)}var DY=ys(function(s){var c=s.length,f=c?s[0]:0,h=this.__wrapped__,O=function(L){return ry(L,s)};return c>1||this.__actions__.length||!(h instanceof bt)||!Is(f)?this.thru(O):(h=h.slice(f,+f+(c?1:0)),h.__actions__.push({func:Bm,args:[O],thisArg:e}),new bi(h,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function bY(){return TR(this)}function AY(){return new bi(this.value(),this.__chain__)}function RY(){this.__values__===e&&(this.__values__=PR(this.value()));var s=this.__index__>=this.__values__.length,c=s?e:this.__values__[this.__index__++];return{done:s,value:c}}function PY(){return this}function FY(s){for(var c,f=this;f instanceof Im;){var h=cR(f);h.__index__=0,h.__values__=e,c?O.__wrapped__=h:c=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,c}function wY(){var s=this.__wrapped__;if(s instanceof bt){var c=s;return this.__actions__.length&&(c=new bt(this)),c=c.reverse(),c.__actions__.push({func:Bm,args:[Fy],thisArg:e}),new bi(c,this.__chain__)}return this.thru(Fy)}function LY(){return wA(this.__wrapped__,this.__actions__)}var CY=bm(function(s,c,f){on.call(s,f)?++s[f]:Es(s,f,1)});function BY(s,c,f){var h=ft(s)?G0:SG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}function UY(s,c){var f=ft(s)?nu:NA;return f(s,We(c,3))}var kY=KA(lR),MY=KA(dR);function xY(s,c){return _r(Um(s,c),1)}function qY(s,c){return _r(Um(s,c),xt)}function VY(s,c,f){return f=f===e?1:Et(f),_r(Um(s,c),f)}function ER(s,c){var f=ft(s)?Si:ou;return f(s,We(c,3))}function hR(s,c){var f=ft(s)?s$:mA;return f(s,We(c,3))}var jY=bm(function(s,c,f){on.call(s,f)?s[f].push(c):Es(s,f,[c])});function KY(s,c,f,h){s=Hr(s)?s:Tl(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=ir(O+f,0)),Vm(s)?f<=O&&s.indexOf(c,f)>-1:!!O&&al(s,c,f)>-1}var $Y=_t(function(s,c,f){var h=-1,O=typeof c=="function",L=Hr(s)?re(s.length):[];return ou(s,function(M){L[++h]=O?ci(c,M,f):Md(M,c,f)}),L}),GY=bm(function(s,c,f){Es(s,f,c)});function Um(s,c){var f=ft(s)?On:gA;return f(s,We(c,3))}function QY(s,c,f,h){return s==null?[]:(ft(c)||(c=c==null?[]:[c]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),SA(s,c,f))}var YY=bm(function(s,c,f){s[f?0:1].push(c)},function(){return[[],[]]});function JY(s,c,f){var h=ft(s)?$h:H0,O=arguments.length<3;return h(s,We(c,4),f,O,ou)}function HY(s,c,f){var h=ft(s)?o$:H0,O=arguments.length<3;return h(s,We(c,4),f,O,mA)}function zY(s,c){var f=ft(s)?nu:NA;return f(s,xm(We(c,3)))}function WY(s){var c=ft(s)?lA:KG;return c(s)}function XY(s,c,f){(f?xr(s,c,f):c===e)?c=1:c=Et(c);var h=ft(s)?IG:$G;return h(s,c)}function ZY(s){var c=ft(s)?gG:QG;return c(s)}function e2(s){if(s==null)return 0;if(Hr(s))return Vm(s)?ol(s):s.length;var c=Dr(s);return c==it||c==Ir?s.size:cy(s).length}function t2(s,c,f){var h=ft(s)?Gh:YG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}var n2=_t(function(s,c){if(s==null)return[];var f=c.length;return f>1&&xr(s,c[0],c[1])?c=[]:f>2&&xr(c[0],c[1],c[2])&&(c=[c[0]]),SA(s,_r(c,1),[])}),km=U$||function(){return fr.Date.now()};function r2(s,c){if(typeof c!="function")throw new Di(i);return s=Et(s),function(){if(--s<1)return c.apply(this,arguments)}}function yR(s,c,f){return c=f?e:c,c=s&&c==null?s.length:c,hs(s,le,e,e,e,e,c)}function IR(s,c){var f;if(typeof c!="function")throw new Di(i);return s=Et(s),function(){return--s>0&&(f=c.apply(this,arguments)),s<=1&&(c=e),f}}var Ly=_t(function(s,c,f){var h=A;if(f.length){var O=iu(f,ml(Ly));h|=ne}return hs(s,h,c,f,O)}),gR=_t(function(s,c,f){var h=A|U;if(f.length){var O=iu(f,ml(gR));h|=ne}return hs(c,h,s,f,O)});function _R(s,c,f){c=f?e:c;var h=hs(s,Q,e,e,e,e,e,c);return h.placeholder=_R.placeholder,h}function vR(s,c,f){c=f?e:c;var h=hs(s,ee,e,e,e,e,e,c);return h.placeholder=vR.placeholder,h}function OR(s,c,f){var h,O,L,M,V,J,ce=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new Di(i);c=Fi(c)||0,An(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?ir(Fi(f.maxWait)||0,c):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var ca=h,vs=O;return h=O=e,ce=Vn,M=s.apply(vs,ca),M}function et(Vn){return ce=Vn,V=Kd(Dt,c),de?$e(Vn):M}function yt(Vn){var ca=Vn-J,vs=Vn-ce,KR=c-ca;return Te?Sr(KR,L-vs):KR}function tt(Vn){var ca=Vn-J,vs=Vn-ce;return J===e||ca>=c||ca<0||Te&&vs>=L}function Dt(){var Vn=km();if(tt(Vn))return Ft(Vn);V=Kd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,M)}function pi(){V!==e&&CA(V),ce=0,h=J=O=V=e}function qr(){return V===e?M:Ft(km())}function mi(){var Vn=km(),ca=tt(Vn);if(h=arguments,O=this,J=Vn,ca){if(V===e)return et(J);if(Te)return CA(V),V=Kd(Dt,c),$e(J)}return V===e&&(V=Kd(Dt,c)),M}return mi.cancel=pi,mi.flush=qr,mi}var i2=_t(function(s,c){return pA(s,1,c)}),a2=_t(function(s,c,f){return pA(s,Fi(c)||0,f)});function s2(s){return hs(s,Me)}function Mm(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Di(i);var f=function(){var h=arguments,O=c?c.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var M=s.apply(this,h);return f.cache=L.set(O,M)||L,M};return f.cache=new(Mm.Cache||Ts),f}Mm.Cache=Ts;function xm(s){if(typeof s!="function")throw new Di(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function o2(s){return IR(2,s)}var u2=JG(function(s,c){c=c.length==1&&ft(c[0])?On(c[0],li(We())):On(_r(c,1),li(We()));var f=c.length;return _t(function(h){for(var O=-1,L=Sr(h.length,f);++O=c}),Xu=hA(function(){return arguments}())?hA:function(s){return Cn(s)&&on.call(s,"callee")&&!iA.call(s,"callee")},ft=re.isArray,v2=x0?li(x0):FG;function Hr(s){return s!=null&&qm(s.length)&&!gs(s)}function qn(s){return Cn(s)&&Hr(s)}function O2(s){return s===!0||s===!1||Cn(s)&&Mr(s)==St}var du=M$||Gy,S2=q0?li(q0):wG;function D2(s){return Cn(s)&&s.nodeType===1&&!$d(s)}function b2(s){if(s==null)return!0;if(Hr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||du(s)||Nl(s)||Xu(s)))return!s.length;var c=Dr(s);if(c==it||c==Ir)return!s.size;if(jd(s))return!cy(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function A2(s,c){return xd(s,c)}function R2(s,c,f){f=typeof f=="function"?f:e;var h=f?f(s,c):e;return h===e?xd(s,c,e,f):!!h}function By(s){if(!Cn(s))return!1;var c=Mr(s);return c==xe||c==ie||typeof s.message=="string"&&typeof s.name=="string"&&!$d(s)}function P2(s){return typeof s=="number"&&sA(s)}function gs(s){if(!An(s))return!1;var c=Mr(s);return c==He||c==Bt||c==Le||c==rl}function DR(s){return typeof s=="number"&&s==Et(s)}function qm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=an}function An(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function Cn(s){return s!=null&&typeof s=="object"}var bR=V0?li(V0):CG;function F2(s,c){return s===c||uy(s,c,Sy(c))}function w2(s,c,f){return f=typeof f=="function"?f:e,uy(s,c,Sy(c),f)}function L2(s){return AR(s)&&s!=+s}function C2(s){if(EQ(s))throw new dt(r);return yA(s)}function B2(s){return s===null}function U2(s){return s==null}function AR(s){return typeof s=="number"||Cn(s)&&Mr(s)==Pt}function $d(s){if(!Cn(s)||Mr(s)!=Yr)return!1;var c=pm(s);if(c===null)return!0;var f=on.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&cm.call(f)==w$}var Uy=j0?li(j0):BG;function k2(s){return DR(s)&&s>=-an&&s<=an}var RR=K0?li(K0):UG;function Vm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&Mr(s)==ui}function fi(s){return typeof s=="symbol"||Cn(s)&&Mr(s)==qt}var Nl=$0?li($0):kG;function M2(s){return s===e}function x2(s){return Cn(s)&&Dr(s)==ju}function q2(s){return Cn(s)&&Mr(s)==ka}var V2=Fm(ly),j2=Fm(function(s,c){return s<=c});function PR(s){if(!s)return[];if(Hr(s))return Vm(s)?sa(s):Jr(s);if(Fd&&s[Fd])return I$(s[Fd]());var c=Dr(s),f=c==it?Wh:c==Ir?sm:Tl;return f(s)}function _s(s){if(!s)return s===0?s:0;if(s=Fi(s),s===xt||s===-xt){var c=s<0?-1:1;return c*kr}return s===s?s:0}function Et(s){var c=_s(s),f=c%1;return c===c?f?c-f:c:0}function FR(s){return s?Ju(Et(s),0,En):0}function Fi(s){if(typeof s=="number")return s;if(fi(s))return nr;if(An(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=An(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=z0(s);var f=vK.test(s);return f||SK.test(s)?r$(s.slice(2),f?2:8):_K.test(s)?nr:+s}function wR(s){return xa(s,zr(s))}function K2(s){return s?Ju(Et(s),-an,an):s===0?s:0}function zt(s){return s==null?"":di(s)}var $2=fl(function(s,c){if(jd(c)||Hr(c)){xa(c,pr(c),s);return}for(var f in c)on.call(c,f)&&Ud(s,f,c[f])}),LR=fl(function(s,c){xa(c,zr(c),s)}),jm=fl(function(s,c,f,h){xa(c,zr(c),s,h)}),G2=fl(function(s,c,f,h){xa(c,pr(c),s,h)}),Q2=ys(ry);function Y2(s,c){var f=dl(s);return c==null?f:dA(f,c)}var J2=_t(function(s,c){s=Nn(s);var f=-1,h=c.length,O=h>2?c[2]:e;for(O&&xr(c[0],c[1],O)&&(h=1);++f1),L}),xa(s,vy(s),f),h&&(f=Ai(f,d|p|E,aQ));for(var O=c.length;O--;)Ny(f,c[O]);return f});function fJ(s,c){return BR(s,xm(We(c)))}var pJ=ys(function(s,c){return s==null?{}:qG(s,c)});function BR(s,c){if(s==null)return{};var f=On(vy(s),function(h){return[h]});return c=We(c),DA(s,f,function(h,O){return c(h,O[0])})}function mJ(s,c,f){c=cu(c,s);var h=-1,O=c.length;for(O||(O=1,s=e);++hc){var h=s;s=c,c=h}if(f||s%1||c%1){var O=oA();return Sr(s+O*(c-s+n$("1e-"+((O+"").length-1))),c)}return fy(s,c)}var SJ=pl(function(s,c,f){return c=c.toLowerCase(),s+(f?MR(c):c)});function MR(s){return xy(zt(s).toLowerCase())}function xR(s){return s=zt(s),s&&s.replace(bK,N$).replace(QK,"")}function DJ(s,c,f){s=zt(s),c=di(c);var h=s.length;f=f===e?h:Ju(Et(f),0,h);var O=f;return f-=c.length,f>=0&&s.slice(f,O)==c}function bJ(s){return s=zt(s),s&&oK.test(s)?s.replace(T0,T$):s}function AJ(s){return s=zt(s),s&&pK.test(s)?s.replace(Ch,"\\$&"):s}var RJ=pl(function(s,c,f){return s+(f?"-":"")+c.toLowerCase()}),PJ=pl(function(s,c,f){return s+(f?" ":"")+c.toLowerCase()}),FJ=jA("toLowerCase");function wJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;if(!c||h>=c)return s;var O=(c-h)/2;return Pm(Em(O),f)+s+Pm(Tm(O),f)}function LJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;return c&&h>>0,f?(s=zt(s),s&&(typeof c=="string"||c!=null&&!Uy(c))&&(c=di(c),!c&&sl(s))?lu(sa(s),0,f):s.split(c,f)):[]}var qJ=pl(function(s,c,f){return s+(f?" ":"")+xy(c)});function VJ(s,c,f){return s=zt(s),f=f==null?0:Ju(Et(f),0,s.length),c=di(c),s.slice(f,f+c.length)==c}function jJ(s,c,f){var h=F.templateSettings;f&&xr(s,c,f)&&(c=e),s=zt(s),c=jm({},c,h,HA);var O=jm({},c.imports,h.imports,HA),L=pr(O),M=zh(O,L),V,J,ce=0,de=c.interpolate||tm,Te="__p += '",be=Xh((c.escape||tm).source+"|"+de.source+"|"+(de===E0?gK:tm).source+"|"+(c.evaluate||tm).source+"|$","g"),$e="//# sourceURL="+(on.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WK+"]")+` +`;s.replace(be,function(tt,Dt,Ft,pi,qr,mi){return Ft||(Ft=pi),Te+=s.slice(ce,mi).replace(AK,E$),Dt&&(V=!0,Te+=`' + __e(`+Dt+`) + '`),qr&&(J=!0,Te+=`'; `+qr+`; __p += '`),Ft&&(Te+=`' + ((__t = (`+Ft+`)) == null ? '' : __t) + -'`),le=pi+tt.length,tt}),Te+=`'; +'`),ce=mi+tt.length,tt}),Te+=`'; `;var et=on.call(c,"variable")&&c.variable;if(!et)Te=`with (obj) { `+Te+` } -`;else if(hK.test(et))throw new dt(a);Te=(J?Te.replace(_n,""):Te).replace(sn,"$1").replace(iK,"$1;"),Te="function("+(et||"obj")+`) { +`;else if(yK.test(et))throw new dt(a);Te=(J?Te.replace(vn,""):Te).replace(sn,"$1").replace(aK,"$1;"),Te="function("+(et||"obj")+`) { `+(et?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(J?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Te+`return __p -}`;var yt=VR(function(){return Qt(L,$e+"return "+Te).apply(e,M)});if(yt.source=Te,By(yt))throw yt;return yt}function jJ(s){return zt(s).toLowerCase()}function KJ(s){return zt(s).toUpperCase()}function $J(s,c,f){if(s=zt(s),s&&(f||c===e))return z0(s);if(!s||!(c=li(c)))return s;var h=aa(s),O=aa(c),L=W0(h,O),M=X0(h,O)+1;return lu(h,L,M).join("")}function GJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.slice(0,eA(s)+1);if(!s||!(c=li(c)))return s;var h=aa(s),O=X0(h,aa(c))+1;return lu(h,0,O).join("")}function QJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.replace(Bh,"");if(!s||!(c=li(c)))return s;var h=aa(s),O=W0(h,aa(c));return lu(h,O).join("")}function YJ(s,c){var f=Ze,h=Z;if(bn(c)){var O="separator"in c?c.separator:O;f="length"in c?Et(c.length):f,h="omission"in c?li(c.omission):h}s=zt(s);var L=s.length;if(sl(s)){var M=aa(s);L=M.length}if(f>=L)return s;var V=f-ol(h);if(V<1)return h;var J=M?lu(M,0,V).join(""):s.slice(0,V);if(O===e)return J+h;if(M&&(V+=J.length-V),Uy(O)){if(s.slice(V).search(O)){var le,de=J;for(O.global||(O=Xh(O.source,zt(h0.exec(O))+"g")),O.lastIndex=0;le=O.exec(de);)var Te=le.index;J=J.slice(0,Te===e?V:Te)}}else if(s.indexOf(li(O),V)!=V){var be=J.lastIndexOf(O);be>-1&&(J=J.slice(0,be))}return J+h}function JJ(s){return s=zt(s),s&&aK.test(s)?s.replace(N0,v$):s}var HJ=pl(function(s,c,f){return s+(f?" ":"")+c.toUpperCase()}),xy=jA("toUpperCase");function qR(s,c,f){return s=zt(s),c=f?e:c,c===e?h$(s)?D$(s):c$(s):s.match(c)||[]}var VR=gt(function(s,c){try{return ui(s,e,c)}catch(f){return By(f)?f:new dt(f)}}),zJ=ys(function(s,c){return Oi(c,function(f){f=xa(f),Es(s,f,Ly(s[f],s))}),s});function WJ(s){var c=s==null?0:s.length,f=We();return s=c?vn(s,function(h){if(typeof h[1]!="function")throw new Si(i);return[f(h[0]),h[1]]}):[],gt(function(h){for(var O=-1;++OTn)return[];var f=gn,h=Sr(s,gn);c=We(c),s-=gn;for(var O=Hh(h,c);++f0||c<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),c!==e&&(c=Et(c),f=c<0?f.dropRight(-c):f.take(c-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(gn)},ka(bt.prototype,function(s,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),h=/^(?:head|last)$/.test(c),O=F[h?"take"+(c=="last"?"Right":""):c],L=h||/^find/.test(c);O&&(F.prototype[c]=function(){var M=this.__wrapped__,V=h?[1]:arguments,J=M instanceof bt,le=V[0],de=J||ft(M),Te=function(Dt){var Ft=O.apply(F,ru([Dt],V));return h&&be?Ft[0]:Ft};de&&f&&typeof le=="function"&&le.length!=1&&(J=de=!1);var be=this.__chain__,$e=!!this.__actions__.length,et=L&&!be,yt=J&&!$e;if(!L&&de){M=yt?M:new bt(this);var tt=s.apply(M,V);return tt.__actions__.push({func:Bm,args:[Te],thisArg:e}),new Di(tt,be)}return et&&yt?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),Oi(["pop","push","shift","sort","splice","unshift"],function(s){var c=om[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return c.apply(ft(L)?L:[],O)}return this[f](function(M){return c.apply(ft(M)?M:[],O)})}}),ka(bt.prototype,function(s,c){var f=F[c];if(f){var h=f.name+"";on.call(ll,h)||(ll[h]=[]),ll[h].push({name:c,func:f})}}),ll[Am(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=J$,bt.prototype.reverse=H$,bt.prototype.value=z$,F.prototype.at=SY,F.prototype.chain=DY,F.prototype.commit=bY,F.prototype.next=AY,F.prototype.plant=PY,F.prototype.reverse=FY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=wY,F.prototype.first=F.prototype.head,Fd&&(F.prototype[Fd]=RY),F},au=b$();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=au,define(function(){return au})):$u?(($u.exports=au)._=au,Vh._=au):fr._=au}).call(Ed)});var DV=w(Yc=>{"use strict";m();T();N();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.FederationFactory=void 0;Yc.federateSubgraphs=Afe;Yc.federateSubgraphsWithContracts=Rfe;Yc.federateSubgraphsContract=Pfe;var Re=Ie(),_V=Su(),$r=Fr(),Pe=Ki(),Gc=yT(),Qc=dd(),Gr=yp(),ah=TE(),Ap=Du(),Ofe=lb(),Sfe=Ip(),vV=Gf(),_e=$l(),Dfe=pb(),OV=gV(),hd=ih(),Oe=zn(),sh=ql(),Ne=wr(),bfe=gp(),Uu=Qf(),uh,SV,oh=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:u,internalSubgraphBySubgraphName:l,warnings:d}){ec(this,uh);g(this,"authorizationDataByParentTypeName");g(this,"coordsByNamedTypeName",new Map);g(this,"disableResolvabilityValidation",!1);g(this,"directiveDefinitionByName",new Map);g(this,"clientDefinitions",[]);g(this,"currentSubgraphName","");g(this,"concreteTypeNamesByAbstractTypeName");g(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);g(this,"entityDataByTypeName");g(this,"entityInterfaceFederationDataByTypeName");g(this,"errors",[]);g(this,"fieldConfigurationByFieldCoords",new Map);g(this,"fieldCoordsByNamedTypeName");g(this,"inaccessibleCoords",new Set);g(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);g(this,"internalGraph");g(this,"internalSubgraphBySubgraphName");g(this,"invalidORScopesCoords",new Set);g(this,"isMaxDepth",!1);g(this,"isVersionTwo",!1);g(this,"namedInputValueTypeNames",new Set);g(this,"namedOutputTypeNames",new Set);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"parentTagDataByTypeName",new Map);g(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Oe.AUTHENTICATED,Uu.AUTHENTICATED_DEFINITION],[Oe.DEPRECATED,Uu.DEPRECATED_DEFINITION],[Oe.INACCESSIBLE,Uu.INACCESSIBLE_DEFINITION],[Oe.ONE_OF,Uu.ONE_OF_DEFINITION],[Oe.REQUIRES_SCOPES,Uu.REQUIRES_SCOPES_DEFINITION],[Oe.SEMANTIC_NON_NULL,Uu.SEMANTIC_NON_NULL_DEFINITION],[Oe.TAG,Uu.TAG_DEFINITION]]));g(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);g(this,"referencedPersistedDirectiveNames",new Set);g(this,"routerDefinitions",[]);g(this,"subscriptionFilterDataByFieldPath",new Map);g(this,"tagNamesByCoords",new Map);g(this,"warnings");this.authorizationDataByParentTypeName=t,this.concreteTypeNamesByAbstractTypeName=n,this.disableResolvabilityValidation=r!=null?r:!1,this.entityDataByTypeName=i,this.entityInterfaceFederationDataByTypeName=a,this.fieldCoordsByNamedTypeName=o,this.internalGraph=u,this.internalSubgraphBySubgraphName=l,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(Oe.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case Oe.DEPRECATED:{t.isDeprecated=!0,(0,_e.upsertDeprecatedDirective)(t,i[0]);break}case Oe.TAG:{(0,_e.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(Oe.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,_e.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,$r.stringToNamedTypeNode)(u));let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Oe.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ne.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,ah.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,_e.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,ah.printTypeNode)(A.node.type));let j=new Set;for(let[Q,re]of I.argumentDataByName){let ee=re.node;j.add(Q);let me=(o=A.argumentDataByName.get(Q))==null?void 0:o.node;if(!me){p=!0,v=!0,U.unimplementedArguments.add(Q);continue}let ue=(0,ah.printTypeNode)(me.type),Ae=(0,ah.printTypeNode)(ee.type);Ae!==ue&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:ue,argumentName:Q,expectedType:Ae}))}for(let[Q,re]of A.argumentDataByName){let ee=re.node;j.has(Q)||ee.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add(Q))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(u,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ne.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(u.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=u;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of u)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,_e.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let u=(0,Ne.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!u.keys||u.keys.length<1){u.isRootNode=!0,u.keys=l;return}let d=new Set(u.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(u.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?_e.MergeMethod.CONSISTENT:_e.MergeMethod.INTERSECTION:_e.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(Oe.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,Ne.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Gc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1])),u=(0,Ne.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)u.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,_e.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(o,n),(0,Ne.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let u=(0,hd.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);u.success?o.type=u.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:u.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:u.expectedType})),(0,_e.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,_e.isNodeDataInaccessible)(n)){if((0,_e.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(Oe.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ne.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,_V.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=hd.DivergentType.NONE,u=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,_e.isNodeDataInaccessible)(n));(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let u=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(u.success)if(a.type=u.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,Ne.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ne.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,Ne.addIterableToSet)({source:n.subgraphNames,target:(0,Ne.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ne.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ne.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,Ne.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,Ne.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,$r.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let u=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,u,r),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedInputValueTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,`${r}.${o.name}`),i.set(a,u)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,_e.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,_e.isNodeDataInaccessible)(a),u=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(u),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedOutputTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,u.federatedCoords),o&&this.inaccessibleCoords.add(u.federatedCoords),r.set(i,u)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return $(k({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return $(k({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,_e.isParentDataRootType)(r)&&(r.extensionType=vV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,Ne.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,Ne.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,t),(0,_e.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let u=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:u.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,Ne.addIterableToSet)({source:u.subgraphNames,target:a.subgraphNames});for(let l of u.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;(0,Ne.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,_e.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,_V.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,_e.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,Dfe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let u=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)u.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,n,Oe.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),u=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ne.getOrThrowError)(u,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Oe.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,Ne.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=u.get(I);if(U)if((0,Ne.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let ee of p){for(let{selectionSet:me}of U.keys)if(ee.selectionSet===me)continue e;U.keys.push(ee)}else u.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let ee of p.filter(me=>!me.disableEntityResolver))j.add(ee.selectionSet);let Q=this.authorizationDataByParentTypeName.get(n),re=(0,Ne.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(re)){for(let[ee,me]of re.fieldDataByName){let ue=`${I}.${ee}`;(0,Ne.getValueOrDefault)(this.fieldCoordsByNamedTypeName,me.namedTypeName,()=>new Set).add(ue);let Ae=Q==null?void 0:Q.fieldAuthDataByFieldName.get(ee);if(Ae){let Z=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(Z.fieldAuthDataByFieldName,Ae)||this.invalidORScopesCoords.add(ue)}let Me=v.fieldDataByName.get(ee);if(Me){let Z=(t=me.isShareableBySubgraphName.get(a))!=null?t:!1;Me.isShareableBySubgraphName.set(a,Z),Me.subgraphNames.add(a);let ve=me.externalFieldDataBySubgraphName.get(a);if(!ve)continue;Me.externalFieldDataBySubgraphName.set(a,k({},ve));continue}let Ze=i.isInaccessible||v.isInaccessible||me.isInaccessible;v.fieldDataByName.set(ee,this.copyFieldData(me,Ze))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===Oe.SEMANTIC_NON_NULL&&(0,_e.isFieldData)(t)){r.push((0,Ne.generateSemanticNonNullDirective)((i=(0,Ne.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let u=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(u){if(o.length<2){r.push(...o);continue}if(!u.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,_e.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,Gc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,_e.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,u]of t.argumentDataByName)t.subgraphNames.size===u.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(u))):(0,_e.isTypeRequired)(u.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames),requiredSubgraphs:[...u.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.FIELD,a,i)):r.length>0&&((0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(Oe.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,bfe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==vV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,Ne.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let u of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(u),d=(0,_e.isNodeDataInaccessible)(u),p=$(k({},u.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(u)});switch(o){case _e.MergeMethod.CONSISTENT:!d&&r.appearances>u.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case _e.MergeMethod.INTERSECTION:r.appearances===u.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.ENUM_VALUE));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,u=new Set;for(let[l,d]of r.inputValueDataByName)if((0,_e.isTypeRequired)(d.type)&&u.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,_e.isNodeDataInaccessible)(d))continue;o.push($(k({},d.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(d)}))}else(0,_e.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:u}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,u=(0,_e.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,_e.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,_e.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,_e.validateExternalAndShareable)(I,u),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,_e.isNodeDataInaccessible)(I)&&(a.push((0,_e.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(u.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,u.byShareable)),u.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,u.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Sfe.isNodeQuery)(n);if((0,_e.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.FIELD);this.errors.push(E);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(Oe.UNION,n,"union member type"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(Oe.LITERAL_PERIOD);switch(o.length){case 2:{let u=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,Ne.getValueOrDefault)(u.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Ap.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),El(this,uh,SV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,_e.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,$r.stringToNamedTypeNode)(a));this.clientDefinitions.push($(k({},n.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Oe.LEFT_PARENTHESIS)[0].split(Oe.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ne.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Oe.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,_e.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(Oe.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessibleCoords.has(u.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=u.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let I=`${u.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Ap.BASE_SCALARS.has(E.namedTypeName)){u={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}u=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,Oe.PARENT_DEFINITION_DATA)}return(0,_e.isLeafKind)(u.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ne.kindToNodeType)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Oe.FIELD_PATH,Oe.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case Oe.FIELD_PATH:{if(d.has(Oe.FIELD_PATH))d.delete(Oe.FIELD_PATH);else{l=!0,p.add(Oe.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.STRING,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Oe.VALUES:{if(d.has(Oe.VALUES))d.delete(Oe.VALUES);else{l=!0,p.add(Oe.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.LIST,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,_e.getSubscriptionFilterValue)(v.value)];break}let Q=new Set,re=[];for(let ee=0;ee0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,re));continue}if(Q.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...Q];break}default:l=!0,E.add(A)}}return l?(u.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Qc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case Oe.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,u);case Oe.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,u);default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.LIST,Oe.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case Oe.AND_UPPER:{n.and=E;break}case Oe.OR_UPPER:{n.or=E;break}default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.OBJECT,Oe.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return u.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(u.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=Qc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Oe.LIST:Oe.OBJECT;return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,Ne.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Oe.CONDITION,Oe.OBJECT,(0,Ne.kindToNodeType)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Oe.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,_e.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(Ap.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,u]of r){let l=(0,Ne.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,_e.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(u.tagNames)||((0,Ne.getValueOrDefault)(l.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,u]of n){if((0,_e.isNodeDataInaccessible)(u)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ne.getValueOrDefault)(u.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Uu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,u]of this.parentTagDataByTypeName){let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,o,Oe.PARENT_DEFINITION_DATA);if(!(0,_e.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(u.tagNames)){l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(u.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of u.childTagDataByChildName){let I=(0,Ne.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,_e.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,Ne.getValueOrDefault)(I.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,Ne.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,_e.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,Ne.getValueOrDefault)(U.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,u]of this.parentDefinitionDataByTypeName){if((0,_e.isNodeDataInaccessible)(u))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(u.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=u.fieldDataByName.size;for(let[p,E]of u.fieldDataByName){if((0,_e.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ne.getValueOrDefault)(E.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};uh=new WeakSet,SV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=Ap.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=Qc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),Qc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};Yc.FederationFactory=oh;function mb({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Ofe.batchNormalize)(t);if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[u,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,u));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,u)}let a=new Array,o=new Map;for(let[u,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,Ne.getValueOrDefault)(o,p,()=>new Set);if((0,Ne.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,Ne.getValueOrDefault)(i,u,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ne.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,Ne.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(u,p,A))}}for(let[u,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(u,d);continue}i.delete(u)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new oh({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,disableResolvabilityValidation:e,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,warnings:n.warnings}),success:!0,warnings:n.warnings}}function Afe({disableResolvabilityValidation:e,subgraphs:t}){let n=mb({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function Rfe({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=mb({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,OV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=t.size-1,u=new Map,l=0;for(let[d,p]of t){l!==o&&i.push((0,OV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);u.set(d,E),l++}return $(k({},a),{federationResultByContractName:u})}function Pfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=mb({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var ch=w(xs=>{"use strict";m();T();N();Object.defineProperty(xs,"__esModule",{value:!0});xs.LATEST_ROUTER_COMPATIBILITY_VERSION=xs.ROUTER_COMPATIBILITY_VERSIONS=xs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;xs.ROUTER_COMPATIBILITY_VERSION_ONE="1";xs.ROUTER_COMPATIBILITY_VERSIONS=new Set([xs.ROUTER_COMPATIBILITY_VERSION_ONE]);xs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var bV=w(Rp=>{"use strict";m();T();N();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.federateSubgraphs=Ffe;Rp.federateSubgraphsWithContracts=wfe;Rp.federateSubgraphsContract=Lfe;var Nb=DV(),Tb=ch();function Ffe({disableResolvabilityValidation:e,subgraphs:t,version:n=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,Nb.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function wfe({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function Lfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var RV=w(AV=>{"use strict";m();T();N();Object.defineProperty(AV,"__esModule",{value:!0})});var PV=w(Pp=>{"use strict";m();T();N();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.normalizeSubgraphFromString=Cfe;Pp.normalizeSubgraph=Bfe;Pp.batchNormalize=Ufe;var Eb=lb(),hb=ch();function Cfe(e,t=!0,n=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,Eb.normalizeSubgraphFromString)(e,t)}}function Bfe(e,t,n,r=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,Eb.normalizeSubgraph)(e,t,n)}}function Ufe(e,t=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,Eb.batchNormalize)(e)}}});var wV=w(FV=>{"use strict";m();T();N();Object.defineProperty(FV,"__esModule",{value:!0})});var CV=w(LV=>{"use strict";m();T();N();Object.defineProperty(LV,"__esModule",{value:!0})});var UV=w(BV=>{"use strict";m();T();N();Object.defineProperty(BV,"__esModule",{value:!0})});var MV=w(kV=>{"use strict";m();T();N();Object.defineProperty(kV,"__esModule",{value:!0})});var qV=w(xV=>{"use strict";m();T();N();Object.defineProperty(xV,"__esModule",{value:!0})});var jV=w(VV=>{"use strict";m();T();N();Object.defineProperty(VV,"__esModule",{value:!0})});var KV=w(lh=>{"use strict";m();T();N();Object.defineProperty(lh,"__esModule",{value:!0});lh.COMPOSITION_VERSION=void 0;lh.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var GV=w($V=>{"use strict";m();T();N();Object.defineProperty($V,"__esModule",{value:!0})});var YV=w(QV=>{"use strict";m();T();N();Object.defineProperty(QV,"__esModule",{value:!0})});var HV=w(JV=>{"use strict";m();T();N();Object.defineProperty(JV,"__esModule",{value:!0})});var WV=w(zV=>{"use strict";m();T();N();Object.defineProperty(zV,"__esModule",{value:!0})});var dh=w(Xe=>{"use strict";m();T();N();var kfe=Xe&&Xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),lt=Xe&&Xe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&kfe(t,e,n)};Object.defineProperty(Xe,"__esModule",{value:!0});lt(Fr(),Xe);lt(Vv(),Xe);lt(Ki(),Xe);lt(ex(),Xe);lt(bV(),Xe);lt(RV(),Xe);lt(PV(),Xe);lt(wV(),Xe);lt(sb(),Xe);lt(HD(),Xe);lt(HE(),Xe);lt(CV(),Xe);lt(UV(),Xe);lt(eb(),Xe);lt(ch(),Xe);lt(MV(),Xe);lt(ob(),Xe);lt(Su(),Xe);lt(Gf(),Xe);lt($l(),Xe);lt(qV(),Xe);lt(jV(),Xe);lt(KV(),Xe);lt(GV(),Xe);lt(zn(),Xe);lt(YV(),Xe);lt(wr(),Xe);lt(qD(),Xe);lt(Du(),Xe);lt(Qf(),Xe);lt(yE(),Xe);lt(IE(),Xe);lt(dd(),Xe);lt(hT(),Xe);lt(yT(),Xe);lt(pb(),Xe);lt(HV(),Xe);lt(BD(),Xe);lt(Ip(),Xe);lt(WV(),Xe);lt($D(),Xe);lt(ih(),Xe);lt(MD(),Xe);lt(yp(),Xe);lt(gp(),Xe)});var Lpe={};$m(Lpe,{buildRouterConfiguration:()=>wpe,federateSubgraphs:()=>Fpe});m();T();N();var tl=mi(dh());m();T();N();m();T();N();function yb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var XV={};m();T();N();function ZV(e){return e!=null}m();T();N();m();T();N();var ph=mi(Ie(),1);m();T();N();m();T();N();function ku(e){return fh(e,[])}function fh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Mfe(e,t);default:return String(e)}}function ej(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function Mfe(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?ej(e)+` -`+tj(e.errors,t):ej(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(xfe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:fh(r,n)}else if(Array.isArray(e))return tj(e,n);return qfe(e,n)}function xfe(e){return typeof e.toJSON=="function"}function qfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>3?"["+Vfe(e)+"]":"{ "+n.map(([i,a])=>i+": "+fh(a,t)).join(", ")+" }"}function tj(e,t){if(e.length===0)return"[]";if(t.length>3)return"[Array]";let n=e.length,r=[];for(let i=0;ijfe.includes(t))}function yd(e,t){t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Kfe(t.originalError)&&(t.originalError=yd(t.originalError.message,t.originalError));let n=Fp.GraphQLError,r=Fp.versionInfo.major>=16?new n(e,t):new n(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions);return t!=null&&t.coordinate&&r.coordinate==null&&Object.defineProperties(r,{coordinate:{value:t.coordinate,enumerable:!0,configurable:!0}}),r}m();T();N();function nj(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function rj(e){return typeof e=="object"&&e!==null}function ij(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function aj(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Pa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Pa.Kind.NULL;if(E.kind===Pa.Kind.VARIABLE){let A=E.name.value;if(n==null||!ij(n,A)){if(d!==void 0)r[u]=d;else if((0,Pa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Pa.isNonNullType)(l))throw yd(`Argument "${u}" of non-null type "${ku(l)}" must not be null.`,{nodes:[E]});let v=(0,Pa.valueFromAST)(E,l,n);if(v===void 0)throw yd(`Argument "${u}" has invalid value ${(0,Pa.print)(E)}.`,{nodes:[E]});r[u]=v}return r}m();T();N();function Id(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function sj(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=Id(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=aj(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,ph.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,ph.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}function Ib(e,t=["directives"]){let n=sj(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}m();T();N();var Je=mi(Ie(),1);m();T();N();var cs=mi(Ie(),1);function ls(e){if((0,cs.isNonNullType)(e)){let t=ls(e.ofType);if(t.kind===cs.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${ku(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cs.Kind.NON_NULL_TYPE,type:t}}else if((0,cs.isListType)(e))return{kind:cs.Kind.LIST_TYPE,type:ls(e.ofType)};return{kind:cs.Kind.NAMED_TYPE,name:{kind:cs.Kind.NAME,value:e.name}}}m();T();N();var lr=mi(Ie(),1);m();T();N();var Fa=mi(Ie(),1);function Jc(e){if(e===null)return{kind:Fa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Jc(n);r!=null&&t.push(r)}return{kind:Fa.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return Jc(e.toJSON());let t=[];for(let n in e){let r=e[n],i=Jc(r);i&&t.push({kind:Fa.Kind.OBJECT_FIELD,name:{kind:Fa.Kind.NAME,value:n},value:i})}return{kind:Fa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:Fa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:Fa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return $fe.test(t)?{kind:Fa.Kind.INT,value:t}:{kind:Fa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:Fa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var $fe=/^-?(?:0|[1-9][0-9]*)$/;function Mu(e,t){if((0,lr.isNonNullType)(t)){let n=Mu(e,t.ofType);return(n==null?void 0:n.kind)===lr.Kind.NULL?null:n}if(e===null)return{kind:lr.Kind.NULL};if(e===void 0)return null;if((0,lr.isListType)(t)){let n=t.ofType;if(nj(e)){let r=[];for(let i of e){let a=Mu(i,n);a!=null&&r.push(a)}return{kind:lr.Kind.LIST,values:r}}return Mu(e,n)}if((0,lr.isInputObjectType)(t)){if(!rj(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Mu(e[r.name],r.type);i&&n.push({kind:lr.Kind.OBJECT_FIELD,name:{kind:lr.Kind.NAME,value:r.name},value:i})}return{kind:lr.Kind.OBJECT,fields:n}}if((0,lr.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,lr.isEnumType)(t)?{kind:lr.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Gfe.test(n)?{kind:lr.Kind.INT,value:n}:Jc(n)}console.assert(!1,"Unexpected input type: "+ku(t))}var Gfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();var oj=mi(Ie(),1);function _i(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:oj.Kind.STRING,value:e.description,block:!0}}m();T();N();var Lqe=Id(function(t){let n=Qfe(t);return new Set([...n].map(r=>r.name))}),Qfe=Id(function(t){let n=gb(t);return new Set(n.values())}),gb=Id(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Yfe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Jfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Je.isSpecifiedDirective)(u)||a.push(Hfe(u,e,n));for(let u in r){let l=r[u],d=(0,Je.isSpecifiedScalarType)(l),p=(0,Je.isIntrospectionType)(l);if(!(d||p))if((0,Je.isObjectType)(l))a.push(zfe(l,e,n));else if((0,Je.isInterfaceType)(l))a.push(Wfe(l,e,n));else if((0,Je.isUnionType)(l))a.push(Xfe(l,e,n));else if((0,Je.isInputObjectType)(l))a.push(Zfe(l,e,n));else if((0,Je.isEnumType)(l))a.push(epe(l,e,n));else if((0,Je.isScalarType)(l))a.push(tpe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Je.Kind.DOCUMENT,definitions:a}}function uj(e,t={}){let n=Yfe(e,t);return(0,Je.print)(n)}function Jfe(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=gb(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=ls(E);p!=null?p.type=I:n.set(d,{kind:Je.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(ZV),o=ds(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Je.Kind.SCHEMA_DEFINITION:Je.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=_i(e);return l&&(u.description=l),u}function Hfe(e,t,n){var r,i;return{kind:Je.Kind.DIRECTIVE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>cj(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Je.Kind.NAME,value:a})))||[]}}function ds(e,t,n){let r=[],i=Ib(e,n),a;i!=null&&(a=dj(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Je.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=ipe(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=wp("specifiedBy",p)}return e.isOneOf&&l==null&&(l=wp("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function cj(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),defaultValue:e.defaultValue!==void 0&&(r=Mu(e.defaultValue,e.type))!=null?r:void 0,directives:ds(e,t,n)}}function zfe(e,t,n){return{kind:Je.Kind.OBJECT_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>lj(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>ls(r)),directives:ds(e,t,n)}}function Wfe(e,t,n){let r={kind:Je.Kind.INTERFACE_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>lj(i,t,n)),directives:ds(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>ls(i))),r}function Xfe(e,t,n){return{kind:Je.Kind.UNION_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n),types:e.getTypes().map(r=>ls(r))}}function Zfe(e,t,n){return{kind:Je.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>npe(r,t,n)),directives:ds(e,t,n)}}function epe(e,t,n){return{kind:Je.Kind.ENUM_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>rpe(r,t,n)),directives:ds(e,t,n)}}function tpe(e,t,n){let r=Ib(e,n),i=dj(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(wp("specifiedBy",o))}return{kind:Je.Kind.SCALAR_TYPE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},directives:i}}function lj(e,t,n){return{kind:Je.Kind.FIELD_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:e.args.map(r=>cj(r,t,n)),type:ls(e.type),directives:ds(e,t,n)}}function npe(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),directives:ds(e,t,n),defaultValue:(r=Mu(e.defaultValue,e.type))!=null?r:void 0}}function rpe(e,t,n){return{kind:Je.Kind.ENUM_VALUE_DEFINITION,description:_i(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n)}}function ipe(e){return wp("deprecated",{reason:e},Je.GraphQLDeprecatedDirective)}function wp(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=Mu(a,u.type))}o==null&&(o=Jc(a)),o!=null&&r.push({kind:Je.Kind.ARGUMENT,name:{kind:Je.Kind.NAME,value:i},value:o})}return{kind:Je.Kind.DIRECTIVE,name:{kind:Je.Kind.NAME,value:e},arguments:r}}function dj(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(wp(r,i,a))}return n}var Rd=mi(dh(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function pn(e,t){if(!e)throw new Error(t)}var ape=34028234663852886e22,spe=-34028234663852886e22,ope=4294967295,upe=2147483647,cpe=-2147483648;function gd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>upe||eope||e<0)throw new Error("invalid uint 32: "+e)}function mh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>ape||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function vb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let u=Nj(o);a.push(u),r[o.name]=u,i[o.no]=u}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function mj(e,t,n){let r={};for(let i of t){let a=Nj(i);r[a.localName]=a.no,r[a.no]=a.localName}return _b(r,e,t,n),r}function Nj(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Fe=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function Tj(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(u){e.util.initFields(this),e.util.initPartial(u,this)}}[a];return Object.setPrototypeOf(o.prototype,new Fe),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(u,l){return new o().fromBinary(u,l)},fromJson(u,l){return new o().fromJson(u,l)},fromJsonString(u,l){return new o().fromJsonString(u,l)},equals(u,l){return e.util.equals(o,u,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function hj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,u=!(!(o>>>7)&&t==0),l=(u?o|128:o)&255;if(n.push(l),!u)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,u=!!(o>>>7),l=(u?o|128:o)&255;if(n.push(l),!u)return}n.push(t>>>31&1)}}var Nh=4294967296;function Ob(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,u){let l=Number(e.slice(o,u));i*=n,r=r*n+l,r>=Nh&&(i=i+(r/Nh|0),r=r%Nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Ij(r,i):Db(r,i)}function yj(e,t){let n=Db(e,t),r=n.hi&2147483648;r&&(n=Ij(n.lo,n.hi));let i=Sb(n.lo,n.hi);return r?"-"+i:i}function Sb(e,t){if({lo:e,hi:t}=lpe(e,t),t<=2097151)return String(Nh*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,u=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(u+=Math.floor(o/l),o%=l),u.toString()+Ej(o)+Ej(a)}function lpe(e,t){return{lo:e>>>0,hi:t>>>0}}function Db(e,t){return{lo:e|0,hi:t|0}}function Ij(e,t){return t=~t,e?e=~e+1:t+=1,Db(e,t)}var Ej=e=>{let t=String(e);return"0000000".slice(t.length)+t};function bb(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function gj(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function dpe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),u=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||du||dpn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>pn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),Ob(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),Ob(i)},dec(i,a){return yj(i,a)},uDec(i,a){return Sb(i,a)}}}var Jn=dpe();m();T();N();var fe;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(fe||(fe={}));var wa;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(wa||(wa={}));function qs(e,t,n){if(t===n)return!0;if(e==fe.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Lp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return gd(t),bb(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){mh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Lp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){gd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return gd(t),t=(t<<1^t>>31)>>>0,bb(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return Th(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return Th(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return Th(n.lo,n.hi,this.buf),this}},yh=class{constructor(t,n){this.varint64=hj,this.uint32=gj,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function _j(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function Ih(e){let t=e.field.localName,n=Object.create(null);return n[t]=fpe(e),[n,()=>n[t]]}function fpe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return La(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function vj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),gh=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=Vs[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Vs[i|r>>6],t+=Vs[r&63],n=0;break}return n&&(t+=Vs[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function Oj(e,t,n){Dj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=vj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=Ih(t);for(let u of i)t.runtime.bin.readField(a,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function Sj(e,t,n,r){Dj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(Rb(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),u=t.field;!u.opt&&!u.repeated&&(u.kind=="enum"||u.kind=="scalar")&&(u=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(u,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function Dj(e,t){pn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function _h(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!Eh(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function Pb(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?La(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ca(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Fe.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function vh(e,t){return Ca(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var mVe={"google.protobuf.DoubleValue":fe.DOUBLE,"google.protobuf.FloatValue":fe.FLOAT,"google.protobuf.Int64Value":fe.INT64,"google.protobuf.UInt64Value":fe.UINT64,"google.protobuf.Int32Value":fe.INT32,"google.protobuf.UInt32Value":fe.UINT32,"google.protobuf.BoolValue":fe.BOOL,"google.protobuf.StringValue":fe.STRING,"google.protobuf.BytesValue":fe.BYTES};var bj={ignoreUnknownFields:!1},Aj={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ppe(e){return e?Object.assign(Object.assign({},bj),e):bj}function mpe(e){return e?Object.assign(Object.assign({},Aj),e):Aj}var Dh=Symbol(),Oh=Symbol();function Fj(){return{makeReadOptions:ppe,makeWriteOptions:mpe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${fs(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,u]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(u===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}Rj(r,u,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=Ih(p);Rj(E,u,p.field,n,p),Sj(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!_h(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!Tpe(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=Pj(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=a.findExtensionFor(n.typeName,o.no);if(u&&Rb(e,u)){let l=Oj(e,u,t),d=Pj(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=a instanceof Error?a.message:String(a);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return Cp(e,t,n!=null?n:wa.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||Eh(e,t)))return Sh(e,t)},debug:fs}}function fs(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function Rj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(pn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=Fb(n.T,u,r.ignoreUnknownFields,!0);l!==Oh&&o.push(l);break;case"scalar":try{o.push(Cp(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let[u,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=Npe(n.K,u)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Fb(n.V.T,l,r.ignoreUnknownFields,!0);p!==Oh&&(o[d]=p);break;case"scalar":try{o[d]=Cp(n.V.T,l,wa.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[a];Ca(u)?u.fromJson(t,r):(e[a]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=Fb(n.T,t,r.ignoreUnknownFields,!1);switch(l){case Dh:Pb(n,e);break;case Oh:break;default:e[a]=l;break}break;case"scalar":try{let d=Cp(n.T,t,n.L,!1);switch(d){case Dh:Pb(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Npe(e,t){if(e===fe.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return Cp(e,t,wa.BIGINT,!0).toString()}function Cp(e,t,n,r){if(t===null)return r?La(e,n):Dh;switch(e){case fe.DOUBLE:case fe.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==fe.FLOAT&&mh(i),i;case fe.INT32:case fe.FIXED32:case fe.SFIXED32:case fe.SINT32:case fe.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==fe.UINT32||e==fe.FIXED32?Lp(a):gd(a),a;case fe.INT64:case fe.SFIXED64:case fe.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case fe.FIXED64:case fe.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Jn.uParse(t);return n?u.toString():u;case fe.BOOL:if(typeof t!="boolean")break;return t;case fe.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case fe.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return Ab.dec(t)}throw new Error}function Fb(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:Dh;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return Oh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${fs(t)}`)}function Tpe(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function Pj(e,t,n){if(e.kind=="map"){pn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,u]of i)r[o.toString()]=Sh(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let a=e.V.T;for(let[o,u]of i)r[o.toString()]=wb(a,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){pn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return Sh(e.T,t);case"enum":return wb(e.T,t,n.enumAsInteger);case"message":return vh(e.T,t).toJson(n)}}function wb(e,t,n){var r;if(pn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function Sh(e,t){switch(e){case fe.INT32:case fe.SFIXED32:case fe.SINT32:case fe.FIXED32:case fe.UINT32:return pn(typeof t=="number"),t;case fe.FLOAT:case fe.DOUBLE:return pn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case fe.STRING:return pn(typeof t=="string"),t;case fe.BOOL:return pn(typeof t=="boolean"),t;case fe.UINT64:case fe.FIXED64:case fe.INT64:case fe.SFIXED64:case fe.SINT64:return pn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case fe.BYTES:return pn(t instanceof Uint8Array),Ab.enc(t)}}m();T();N();var _d=Symbol("@bufbuild/protobuf/unknown-fields"),wj={readUnknownFields:!0,readerFactory:e=>new yh(e)},Lj={writeUnknownFields:!0,writerFactory:()=>new hh};function Epe(e){return e?Object.assign(Object.assign({},wj),e):wj}function hpe(e){return e?Object.assign(Object.assign({},Lj),e):Lj}function kj(){return{makeReadOptions:Epe,makeWriteOptions:hpe,listUnknownFields(e){var t;return(t=e[_d])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[_d]},writeUnknownFields(e,t){let r=e[_d];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[_d])||(i[_d]=[]),i[_d].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Ipe),a){let I=e[o];if(r==xn.LengthDelimited&&u!=fe.STRING&&u!=fe.BYTES){let A=t.uint32()+t.pos;for(;t.posCa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Up(I):a[i]=I:a[i]=Ca(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,a[u]));case"scalar":return i.every((o,u)=>qs(r.T,o,a[u]));case"enum":return i.every((o,u)=>qs(fe.INT32,o,a[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return qs(fe.INT32,i,a);case"scalar":return qs(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return qs(fe.INT32,i.value,a.value);case"scalar":return qs(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],a[p]));case"enum":return u.every(p=>qs(fe.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return u.every(p=>qs(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(Rh);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(a))o[u]=Rh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Rh(a.value)}:{case:void 0}:o=Rh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function Rh(e){if(e===void 0)return e;if(Ca(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Up(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function qj(e,t,n){return{syntax:e,json:Fj(),bin:kj(),util:Object.assign(Object.assign({},xj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return Tj(this,r,i,a)},makeEnum:mj,makeEnumType:vb,getEnumType:pj,makeExtension(r,i,a){return _j(this,r,i,a)}}}m();T();N();var Ph=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function Lb(e,t){let n=Kj(e);return t?n:Dpe(Spe(n))}function Vj(e){return Lb(e,!1)}var jj=Kj;function Kj(e){let t=!1,n=[];for(let r=0;r`${e}$`,Spe=e=>Ope.has(e)?$j(e):e,Dpe=e=>vpe.has(e)?$j(e):e;var Fh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=Vj(t)}addField(t){pn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew Ph(e,t=>Gj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=La(t.T,t.L);break;case"message":break}}});var vd;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(vd||(vd={}));C.util.setEnumType(vd,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var js;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(js||(js={}));C.util.setEnumType(js,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var Ks;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(Ks||(Ks={}));C.util.setEnumType(Ks,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var tK=mi(Ie(),1);m();T();N();var Cb;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(Cb||(Cb={}));C.util.setEnumType(Cb,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var zc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(zc||(zc={}));C.util.setEnumType(zc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var xu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(xu||(xu={}));C.util.setEnumType(xu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var kp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(kp||(kp={}));C.util.setEnumType(kp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var Mp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(Mp||(Mp={}));C.util.setEnumType(Mp,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var eu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(eu||(eu={}));C.util.setEnumType(eu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var qu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(qu||(qu={}));C.util.setEnumType(qu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Wc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Wc||(Wc={}));C.util.setEnumType(Wc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var $s=class $s extends Fe{constructor(n){super();g(this,"id","");g(this,"name","");g(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};g($s,"runtime",C),g($s,"typeName","wg.cosmo.node.v1.Subgraph"),g($s,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var wh=$s,Gs=class Gs extends Fe{constructor(n){super();g(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};g(Gs,"runtime",C),g(Gs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),g(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Ub}}]));var Bb=Gs,Qs=class Qs extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};g(Qs,"runtime",C),g(Qs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),g(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0}]));var Ub=Qs,Ys=class Ys extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);g(this,"featureFlagConfigs");g(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};g(Ys,"runtime",C),g(Ys,"typeName","wg.cosmo.node.v1.RouterConfig"),g(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Bb,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var xp=Ys,Js=class Js extends Fe{constructor(n){super();g(this,"code",vd.OK);g(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Js().fromBinary(n,r)}static fromJson(n,r){return new Js().fromJson(n,r)}static fromJsonString(n,r){return new Js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Js,n,r)}};g(Js,"runtime",C),g(Js,"typeName","wg.cosmo.node.v1.Response"),g(Js,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(vd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var kb=Js,Hs=class Hs extends Fe{constructor(n){super();g(this,"code",0);g(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};g(Hs,"runtime",C),g(Hs,"typeName","wg.cosmo.node.v1.ResponseStatus"),g(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Qj=Hs,zs=class zs extends Fe{constructor(n){super();g(this,"accountLimits");g(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};g(zs,"runtime",C),g(zs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),g(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:xb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var Mb=zs,Ws=class Ws extends Fe{constructor(n){super();g(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};g(Ws,"runtime",C),g(Ws,"typeName","wg.cosmo.node.v1.AccountLimits"),g(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var xb=Ws,Xs=class Xs extends Fe{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Xs().fromBinary(t,n)}static fromJson(t,n){return new Xs().fromJson(t,n)}static fromJsonString(t,n){return new Xs().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Xs,t,n)}};g(Xs,"runtime",C),g(Xs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),g(Xs,"fields",C.util.newFieldList(()=>[]));var Yj=Xs,Zs=class Zs extends Fe{constructor(n){super();g(this,"response");g(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};g(Zs,"runtime",C),g(Zs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),g(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:kb},{no:2,name:"registrationInfo",kind:"message",T:Mb,opt:!0}]));var Jj=Zs,eo=class eo extends Fe{constructor(n){super();g(this,"defaultFlushInterval",Jn.zero);g(this,"datasourceConfigurations",[]);g(this,"fieldConfigurations",[]);g(this,"graphqlSchema","");g(this,"typeConfigurations",[]);g(this,"stringStorage",{});g(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};g(eo,"runtime",C),g(eo,"typeName","wg.cosmo.node.v1.EngineConfiguration"),g(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:qp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:Kp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:qb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Od=eo,to=class to extends Fe{constructor(n){super();g(this,"kind",xu.STATIC);g(this,"rootNodes",[]);g(this,"childNodes",[]);g(this,"overrideFieldPathFromAlias",!1);g(this,"customGraphql");g(this,"customStatic");g(this,"directives",[]);g(this,"requestTimeoutSeconds",Jn.zero);g(this,"id","");g(this,"keys",[]);g(this,"provides",[]);g(this,"requires",[]);g(this,"customEvents");g(this,"entityInterfaces",[]);g(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};g(to,"runtime",C),g(to,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),g(to,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(xu)},{no:2,name:"root_nodes",kind:"message",T:Sd,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Sd,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Qp},{no:6,name:"custom_static",kind:"message",T:Zb},{no:7,name:"directives",kind:"message",T:e0,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:Hc,repeated:!0},{no:11,name:"provides",kind:"message",T:Hc,repeated:!0},{no:12,name:"requires",kind:"message",T:Hc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Zc},{no:14,name:"entity_interfaces",kind:"message",T:Dd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:Dd,repeated:!0}]));var qp=to,no=class no extends Fe{constructor(n){super();g(this,"name","");g(this,"sourceType",zc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};g(no,"runtime",C),g(no,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),g(no,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(zc)}]));var Vp=no,ro=class ro extends Fe{constructor(n){super();g(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};g(ro,"runtime",C),g(ro,"typeName","wg.cosmo.node.v1.Scopes"),g(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Xc=ro,io=class io extends Fe{constructor(n){super();g(this,"requiresAuthentication",!1);g(this,"requiredOrScopes",[]);g(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};g(io,"runtime",C),g(io,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),g(io,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Xc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Xc,repeated:!0}]));var jp=io,ao=class ao extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"argumentsConfiguration",[]);g(this,"authorizationConfiguration");g(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};g(ao,"runtime",C),g(ao,"typeName","wg.cosmo.node.v1.FieldConfiguration"),g(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Vp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:jp},{no:5,name:"subscription_filter_condition",kind:"message",T:Vu,opt:!0}]));var Kp=ao,so=class so extends Fe{constructor(n){super();g(this,"typeName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};g(so,"runtime",C),g(so,"typeName","wg.cosmo.node.v1.TypeConfiguration"),g(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var qb=so,oo=class oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldNames",[]);g(this,"externalFieldNames",[]);g(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};g(oo,"runtime",C),g(oo,"typeName","wg.cosmo.node.v1.TypeField"),g(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Sd=oo,uo=class uo extends Fe{constructor(n){super();g(this,"fieldName","");g(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};g(uo,"runtime",C),g(uo,"typeName","wg.cosmo.node.v1.FieldCoordinates"),g(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var $p=uo,co=class co extends Fe{constructor(n){super();g(this,"fieldCoordinatesPath",[]);g(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};g(co,"runtime",C),g(co,"typeName","wg.cosmo.node.v1.FieldSetCondition"),g(co,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:$p,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Gp=co,lo=class lo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"selectionSet","");g(this,"disableEntityResolver",!1);g(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};g(lo,"runtime",C),g(lo,"typeName","wg.cosmo.node.v1.RequiredField"),g(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Gp,repeated:!0}]));var Hc=lo,fo=class fo extends Fe{constructor(n){super();g(this,"interfaceTypeName","");g(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};g(fo,"runtime",C),g(fo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),g(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var Dd=fo,po=class po extends Fe{constructor(n){super();g(this,"url");g(this,"method",Wc.GET);g(this,"header",{});g(this,"body");g(this,"query",[]);g(this,"urlEncodeBody",!1);g(this,"mtls");g(this,"baseUrl");g(this,"path");g(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};g(po,"runtime",C),g(po,"typeName","wg.cosmo.node.v1.FetchConfiguration"),g(po,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:Qr},{no:2,name:"method",kind:"enum",T:C.getEnumType(Wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:n0}},{no:4,name:"body",kind:"message",T:Qr},{no:5,name:"query",kind:"message",T:t0,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:r0},{no:9,name:"base_url",kind:"message",T:Qr},{no:10,name:"path",kind:"message",T:Qr},{no:11,name:"http_proxy_url",kind:"message",T:Qr,opt:!0}]));var Vb=po,mo=class mo extends Fe{constructor(n){super();g(this,"statusCode",Jn.zero);g(this,"typeName","");g(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};g(mo,"runtime",C),g(mo,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),g(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var Hj=mo,No=class No extends Fe{constructor(n){super();g(this,"fetch");g(this,"subscription");g(this,"federation");g(this,"upstreamSchema");g(this,"customScalarTypeFields",[]);g(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};g(No,"runtime",C),g(No,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),g(No,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Vb},{no:2,name:"subscription",kind:"message",T:i0},{no:3,name:"federation",kind:"message",T:a0},{no:4,name:"upstream_schema",kind:"message",T:Zp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:s0,repeated:!0},{no:7,name:"grpc",kind:"message",T:bd}]));var Qp=No,To=class To extends Fe{constructor(n){super();g(this,"mapping");g(this,"protoSchema","");g(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};g(To,"runtime",C),g(To,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),g(To,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:Kb},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Yp}]));var bd=To,Eo=class Eo extends Fe{constructor(n){super();g(this,"repository","");g(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};g(Eo,"runtime",C),g(Eo,"typeName","wg.cosmo.node.v1.ImageReference"),g(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var jb=Eo,ho=class ho extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");g(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};g(ho,"runtime",C),g(ho,"typeName","wg.cosmo.node.v1.PluginConfiguration"),g(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:jb,opt:!0}]));var Yp=ho,yo=class yo extends Fe{constructor(n){super();g(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};g(yo,"runtime",C),g(yo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),g(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var zj=yo,Io=class Io extends Fe{constructor(n){super();g(this,"version",0);g(this,"service","");g(this,"operationMappings",[]);g(this,"entityMappings",[]);g(this,"typeFieldMappings",[]);g(this,"enumMappings",[]);g(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};g(Io,"runtime",C),g(Io,"typeName","wg.cosmo.node.v1.GRPCMapping"),g(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:Qb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:Yb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Hb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:Wb,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:$b,repeated:!0}]));var Kb=Io,go=class go extends Fe{constructor(n){super();g(this,"type",kp.UNSPECIFIED);g(this,"lookupMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};g(go,"runtime",C),g(go,"typeName","wg.cosmo.node.v1.LookupMapping"),g(go,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(kp)},{no:2,name:"lookup_mapping",kind:"message",T:Gb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var $b=go,_o=class _o extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};g(_o,"runtime",C),g(_o,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),g(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Jp}]));var Gb=_o,vo=class vo extends Fe{constructor(n){super();g(this,"type",Mp.UNSPECIFIED);g(this,"original","");g(this,"mapped","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};g(vo,"runtime",C),g(vo,"typeName","wg.cosmo.node.v1.OperationMapping"),g(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Mp)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var Qb=vo,Oo=class Oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"kind","");g(this,"key","");g(this,"rpc","");g(this,"request","");g(this,"response","");g(this,"requiredFieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};g(Oo,"runtime",C),g(Oo,"typeName","wg.cosmo.node.v1.EntityMapping"),g(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9},{no:7,name:"required_field_mappings",kind:"message",T:Jb,repeated:!0}]));var Yb=Oo,So=class So extends Fe{constructor(n){super();g(this,"fieldMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};g(So,"runtime",C),g(So,"typeName","wg.cosmo.node.v1.RequiredFieldMapping"),g(So,"fields",C.util.newFieldList(()=>[{no:1,name:"field_mapping",kind:"message",T:Jp},{no:2,name:"rpc",kind:"scalar",T:9},{no:3,name:"request",kind:"scalar",T:9},{no:4,name:"response",kind:"scalar",T:9}]));var Jb=So,Do=class Do extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};g(Do,"runtime",C),g(Do,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),g(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Jp,repeated:!0}]));var Hb=Do,bo=class bo extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");g(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};g(bo,"runtime",C),g(bo,"typeName","wg.cosmo.node.v1.FieldMapping"),g(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:zb,repeated:!0}]));var Jp=bo,Ao=class Ao extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};g(Ao,"runtime",C),g(Ao,"typeName","wg.cosmo.node.v1.ArgumentMapping"),g(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var zb=Ao,Ro=class Ro extends Fe{constructor(n){super();g(this,"type","");g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};g(Ro,"runtime",C),g(Ro,"typeName","wg.cosmo.node.v1.EnumMapping"),g(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Xb,repeated:!0}]));var Wb=Ro,Po=class Po extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};g(Po,"runtime",C),g(Po,"typeName","wg.cosmo.node.v1.EnumValueMapping"),g(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Xb=Po,Fo=class Fo extends Fe{constructor(n){super();g(this,"consumerName","");g(this,"streamName","");g(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};g(Fo,"runtime",C),g(Fo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),g(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var Hp=Fo,wo=class wo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"subjects",[]);g(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};g(wo,"runtime",C),g(wo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),g(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:Hp}]));var zp=wo,Lo=class Lo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};g(Lo,"runtime",C),g(Lo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),g(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Wp=Lo,Co=class Co extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};g(Co,"runtime",C),g(Co,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),g(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var Xp=Co,Bo=class Bo extends Fe{constructor(n){super();g(this,"providerId","");g(this,"type",eu.PUBLISH);g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};g(Bo,"runtime",C),g(Bo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),g(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(eu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var tu=Bo,Uo=class Uo extends Fe{constructor(n){super();g(this,"nats",[]);g(this,"kafka",[]);g(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};g(Uo,"runtime",C),g(Uo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),g(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:zp,repeated:!0},{no:2,name:"kafka",kind:"message",T:Wp,repeated:!0},{no:3,name:"redis",kind:"message",T:Xp,repeated:!0}]));var Zc=Uo,ko=class ko extends Fe{constructor(n){super();g(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};g(ko,"runtime",C),g(ko,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),g(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:Qr}]));var Zb=ko,Mo=class Mo extends Fe{constructor(n){super();g(this,"kind",qu.STATIC_CONFIGURATION_VARIABLE);g(this,"staticVariableContent","");g(this,"environmentVariableName","");g(this,"environmentVariableDefaultValue","");g(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};g(Mo,"runtime",C),g(Mo,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),g(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(qu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var Qr=Mo,xo=class xo extends Fe{constructor(n){super();g(this,"directiveName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};g(xo,"runtime",C),g(xo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),g(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var e0=xo,qo=class qo extends Fe{constructor(n){super();g(this,"name","");g(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};g(qo,"runtime",C),g(qo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),g(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var t0=qo,Vo=class Vo extends Fe{constructor(n){super();g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};g(Vo,"runtime",C),g(Vo,"typeName","wg.cosmo.node.v1.HTTPHeader"),g(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:Qr,repeated:!0}]));var n0=Vo,jo=class jo extends Fe{constructor(n){super();g(this,"key");g(this,"cert");g(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};g(jo,"runtime",C),g(jo,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),g(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:Qr},{no:2,name:"cert",kind:"message",T:Qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var r0=jo,Ko=class Ko extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"url");g(this,"useSSE");g(this,"protocol");g(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};g(Ko,"runtime",C),g(Ko,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),g(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:Qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(js),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(Ks),opt:!0}]));var i0=Ko,$o=class $o extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};g($o,"runtime",C),g($o,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),g($o,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var a0=$o,Go=class Go extends Fe{constructor(n){super();g(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};g(Go,"runtime",C),g(Go,"typeName","wg.cosmo.node.v1.InternedString"),g(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Zp=Go,Qo=class Qo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};g(Qo,"runtime",C),g(Qo,"typeName","wg.cosmo.node.v1.SingleTypeField"),g(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var s0=Qo,Yo=class Yo extends Fe{constructor(n){super();g(this,"fieldPath",[]);g(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};g(Yo,"runtime",C),g(Yo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),g(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var em=Yo,ia=class ia extends Fe{constructor(n){super();g(this,"and",[]);g(this,"in");g(this,"not");g(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ia().fromBinary(n,r)}static fromJson(n,r){return new ia().fromJson(n,r)}static fromJsonString(n,r){return new ia().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ia,n,r)}};g(ia,"runtime",C),g(ia,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),g(ia,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:ia,repeated:!0},{no:2,name:"in",kind:"message",T:em,opt:!0},{no:3,name:"not",kind:"message",T:ia,opt:!0},{no:4,name:"or",kind:"message",T:ia,repeated:!0}]));var Vu=ia,Jo=class Jo extends Fe{constructor(n){super();g(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};g(Jo,"runtime",C),g(Jo,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),g(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:o0,repeated:!0}]));var Wj=Jo,Ho=class Ho extends Fe{constructor(n){super();g(this,"request");g(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ho().fromBinary(n,r)}static fromJson(n,r){return new Ho().fromJson(n,r)}static fromJsonString(n,r){return new Ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ho,n,r)}};g(Ho,"runtime",C),g(Ho,"typeName","wg.cosmo.node.v1.Operation"),g(Ho,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:u0},{no:2,name:"client",kind:"message",T:d0}]));var o0=Ho,zo=class zo extends Fe{constructor(n){super();g(this,"operationName","");g(this,"query","");g(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new zo().fromBinary(n,r)}static fromJson(n,r){return new zo().fromJson(n,r)}static fromJsonString(n,r){return new zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zo,n,r)}};g(zo,"runtime",C),g(zo,"typeName","wg.cosmo.node.v1.OperationRequest"),g(zo,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:c0}]));var u0=zo,Wo=class Wo extends Fe{constructor(n){super();g(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Wo().fromBinary(n,r)}static fromJson(n,r){return new Wo().fromJson(n,r)}static fromJsonString(n,r){return new Wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Wo,n,r)}};g(Wo,"runtime",C),g(Wo,"typeName","wg.cosmo.node.v1.Extension"),g(Wo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:l0}]));var c0=Wo,Xo=class Xo extends Fe{constructor(n){super();g(this,"sha256Hash","");g(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xo().fromBinary(n,r)}static fromJson(n,r){return new Xo().fromJson(n,r)}static fromJsonString(n,r){return new Xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xo,n,r)}};g(Xo,"runtime",C),g(Xo,"typeName","wg.cosmo.node.v1.PersistedQuery"),g(Xo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var l0=Xo,Zo=class Zo extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zo().fromBinary(n,r)}static fromJson(n,r){return new Zo().fromJson(n,r)}static fromJsonString(n,r){return new Zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zo,n,r)}};g(Zo,"runtime",C),g(Zo,"typeName","wg.cosmo.node.v1.ClientInfo"),g(Zo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var d0=Zo;m();T();N();function f0(e){return new Error(`Normalization failed to return a ${e}.`)}function Xj(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var Ad=mi(dh(),1);function bpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new $p({fieldName:a[1],typeName:a[0]}))}t.push(new Gp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function p0(e,t,n){if(e)for(let r of e){let i=bpe(r);t.push(new Hc(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function m0(e){switch(e){case"publish":return eu.PUBLISH;case"request":return eu.REQUEST;case"subscribe":return eu.SUBSCRIBE}}function Zj(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Zc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Sd({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new Dd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}p0(r.keys,t.keys,i),p0(r.provides,t.provides,i),p0(r.requires,t.requires,i);let u=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case Ad.PROVIDER_TYPE_KAFKA:{l.push(new Wp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),topics:p.topics}));break}case Ad.PROVIDER_TYPE_NATS:{u.push(new zp(k({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new Hp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case Ad.PROVIDER_TYPE_REDIS:{d.push(new Xp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function eK(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Vp({name:p,sourceType:zc.FIELD_ARGUMENT})),o=new Kp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),u=((n=i.requiredScopes)==null?void 0:n.map(p=>new Xc({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new Xc({requiredAndScopes:p})))||[],d=u.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new jp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:u,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Vu;Lh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function Lh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Vu;Lh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new em({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Vu,Lh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Vu;Lh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var el;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(el||(el={}));var Ape=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Zp({key:n})},Rpe=e=>{switch(e){case"ws":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Ppe=e=>{switch(e){case"auto":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},nK=function(e){if(!Rd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw Xj(e.routerCompatibilityVersion);let t=new Od({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw f0("ConfigurationDataByTypeName");if(!n.schema)throw f0("GraphQLSchema");let r={enabled:!0},i=Ape(t,uj((0,tK.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:u,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=Zj(n.configurationDataByTypeName),v;switch(n.kind){case el.Standard:{r.enabled=!0,r.protocol=Rpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Ppe(n.websocketSubprotocol||"auto"),r.url=new Qr({kind:qu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case el.Plugin:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Yp({name:n.name,version:n.version,imageReference:n.imageReference})});break}case el.GRPC:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(u.kafka.length>0||u.nats.length>0||u.redis.length>0){A=xu.PUBSUB,j=new Zc({kafka:u.kafka,nats:u.nats,redis:u.redis});let re=ue=>Rd.ROOT_TYPE_NAMES.has(ue.typeName),ee=0,me=0;for(;ee({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${Rd.COMPOSITION_VERSION}`})};m();T();N();var nl=mi(Ie());function rK(e){let t;try{t=(0,nl.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function Fpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(rK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,nl.print)(t.federatedGraphAST)}}function wpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(rK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return nK({federatedClientSDL:(0,nl.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,nl.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:tl.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,u=a==null?void 0:a.configurationDataByTypeName;return{kind:el.Standard,id:`${i}`,name:r.name,url:yb(r.url),sdl:r.schema,subscriptionUrl:yb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:u}})}).toJsonString()}return Gm(Lpe);})(); +}`;var yt=VR(function(){return Qt(L,$e+"return "+Te).apply(e,M)});if(yt.source=Te,By(yt))throw yt;return yt}function KJ(s){return zt(s).toLowerCase()}function $J(s){return zt(s).toUpperCase()}function GJ(s,c,f){if(s=zt(s),s&&(f||c===e))return z0(s);if(!s||!(c=di(c)))return s;var h=sa(s),O=sa(c),L=W0(h,O),M=X0(h,O)+1;return lu(h,L,M).join("")}function QJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.slice(0,eA(s)+1);if(!s||!(c=di(c)))return s;var h=sa(s),O=X0(h,sa(c))+1;return lu(h,0,O).join("")}function YJ(s,c,f){if(s=zt(s),s&&(f||c===e))return s.replace(Bh,"");if(!s||!(c=di(c)))return s;var h=sa(s),O=W0(h,sa(c));return lu(h,O).join("")}function JJ(s,c){var f=Ze,h=Z;if(An(c)){var O="separator"in c?c.separator:O;f="length"in c?Et(c.length):f,h="omission"in c?di(c.omission):h}s=zt(s);var L=s.length;if(sl(s)){var M=sa(s);L=M.length}if(f>=L)return s;var V=f-ol(h);if(V<1)return h;var J=M?lu(M,0,V).join(""):s.slice(0,V);if(O===e)return J+h;if(M&&(V+=J.length-V),Uy(O)){if(s.slice(V).search(O)){var ce,de=J;for(O.global||(O=Xh(O.source,zt(h0.exec(O))+"g")),O.lastIndex=0;ce=O.exec(de);)var Te=ce.index;J=J.slice(0,Te===e?V:Te)}}else if(s.indexOf(di(O),V)!=V){var be=J.lastIndexOf(O);be>-1&&(J=J.slice(0,be))}return J+h}function HJ(s){return s=zt(s),s&&sK.test(s)?s.replace(N0,O$):s}var zJ=pl(function(s,c,f){return s+(f?" ":"")+c.toUpperCase()}),xy=jA("toUpperCase");function qR(s,c,f){return s=zt(s),c=f?e:c,c===e?y$(s)?b$(s):l$(s):s.match(c)||[]}var VR=_t(function(s,c){try{return ci(s,e,c)}catch(f){return By(f)?f:new dt(f)}}),WJ=ys(function(s,c){return Si(c,function(f){f=qa(f),Es(s,f,Ly(s[f],s))}),s});function XJ(s){var c=s==null?0:s.length,f=We();return s=c?On(s,function(h){if(typeof h[1]!="function")throw new Di(i);return[f(h[0]),h[1]]}):[],_t(function(h){for(var O=-1;++Oan)return[];var f=En,h=Sr(s,En);c=We(c),s-=En;for(var O=Hh(h,c);++f0||c<0)?new bt(f):(s<0?f=f.takeRight(-s):s&&(f=f.drop(s)),c!==e&&(c=Et(c),f=c<0?f.dropRight(-c):f.take(c-s)),f)},bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},bt.prototype.toArray=function(){return this.take(En)},Ma(bt.prototype,function(s,c){var f=/^(?:filter|find|map|reject)|While$/.test(c),h=/^(?:head|last)$/.test(c),O=F[h?"take"+(c=="last"?"Right":""):c],L=h||/^find/.test(c);O&&(F.prototype[c]=function(){var M=this.__wrapped__,V=h?[1]:arguments,J=M instanceof bt,ce=V[0],de=J||ft(M),Te=function(Dt){var Ft=O.apply(F,ru([Dt],V));return h&&be?Ft[0]:Ft};de&&f&&typeof ce=="function"&&ce.length!=1&&(J=de=!1);var be=this.__chain__,$e=!!this.__actions__.length,et=L&&!be,yt=J&&!$e;if(!L&&de){M=yt?M:new bt(this);var tt=s.apply(M,V);return tt.__actions__.push({func:Bm,args:[Te],thisArg:e}),new bi(tt,be)}return et&&yt?s.apply(this,V):(tt=this.thru(Te),et?h?tt.value()[0]:tt.value():tt)})}),Si(["pop","push","shift","sort","splice","unshift"],function(s){var c=om[s],f=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",h=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var O=arguments;if(h&&!this.__chain__){var L=this.value();return c.apply(ft(L)?L:[],O)}return this[f](function(M){return c.apply(ft(M)?M:[],O)})}}),Ma(bt.prototype,function(s,c){var f=F[c];if(f){var h=f.name+"";on.call(ll,h)||(ll[h]=[]),ll[h].push({name:c,func:f})}}),ll[Am(e,U).name]=[{name:"wrapper",func:e}],bt.prototype.clone=H$,bt.prototype.reverse=z$,bt.prototype.value=W$,F.prototype.at=DY,F.prototype.chain=bY,F.prototype.commit=AY,F.prototype.next=RY,F.prototype.plant=FY,F.prototype.reverse=wY,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=LY,F.prototype.first=F.prototype.head,Fd&&(F.prototype[Fd]=PY),F},au=A$();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=au,define(function(){return au})):$u?(($u.exports=au)._=au,Vh._=au):fr._=au}).call(Ed)});var bV=w(Yc=>{"use strict";m();T();N();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.FederationFactory=void 0;Yc.federateSubgraphs=Afe;Yc.federateSubgraphsWithContracts=Rfe;Yc.federateSubgraphsContract=Pfe;var Re=Ie(),vV=Su(),$r=Fr(),Pe=$i(),Gc=yT(),Qc=dd(),Gr=yp(),ah=TE(),Ap=Du(),Ofe=lb(),Sfe=Ip(),OV=Gf(),_e=$l(),Dfe=pb(),SV=_V(),hd=ih(),Oe=zn(),sh=ql(),Ne=wr(),bfe=gp(),Uu=Qf(),uh,DV,oh=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:u,internalSubgraphBySubgraphName:l,warnings:d}){ec(this,uh);g(this,"authorizationDataByParentTypeName");g(this,"coordsByNamedTypeName",new Map);g(this,"disableResolvabilityValidation",!1);g(this,"directiveDefinitionByName",new Map);g(this,"clientDefinitions",[]);g(this,"currentSubgraphName","");g(this,"concreteTypeNamesByAbstractTypeName");g(this,"subgraphNamesByNamedTypeNameByFieldCoords",new Map);g(this,"entityDataByTypeName");g(this,"entityInterfaceFederationDataByTypeName");g(this,"errors",[]);g(this,"fieldConfigurationByFieldCoords",new Map);g(this,"fieldCoordsByNamedTypeName");g(this,"inaccessibleCoords",new Set);g(this,"inaccessibleRequiredInputValueErrorByCoords",new Map);g(this,"internalGraph");g(this,"internalSubgraphBySubgraphName");g(this,"invalidORScopesCoords",new Set);g(this,"isMaxDepth",!1);g(this,"isVersionTwo",!1);g(this,"namedInputValueTypeNames",new Set);g(this,"namedOutputTypeNames",new Set);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"parentTagDataByTypeName",new Map);g(this,"persistedDirectiveDefinitionByDirectiveName",new Map([[Oe.AUTHENTICATED,Uu.AUTHENTICATED_DEFINITION],[Oe.DEPRECATED,Uu.DEPRECATED_DEFINITION],[Oe.INACCESSIBLE,Uu.INACCESSIBLE_DEFINITION],[Oe.ONE_OF,Uu.ONE_OF_DEFINITION],[Oe.REQUIRES_SCOPES,Uu.REQUIRES_SCOPES_DEFINITION],[Oe.SEMANTIC_NON_NULL,Uu.SEMANTIC_NON_NULL_DEFINITION],[Oe.TAG,Uu.TAG_DEFINITION]]));g(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);g(this,"referencedPersistedDirectiveNames",new Set);g(this,"routerDefinitions",[]);g(this,"subscriptionFilterDataByFieldPath",new Map);g(this,"tagNamesByCoords",new Map);g(this,"warnings");this.authorizationDataByParentTypeName=t,this.concreteTypeNamesByAbstractTypeName=n,this.disableResolvabilityValidation=r!=null?r:!1,this.entityDataByTypeName=i,this.entityInterfaceFederationDataByTypeName=a,this.fieldCoordsByNamedTypeName=o,this.internalGraph=u,this.internalSubgraphBySubgraphName=l,this.warnings=d}extractPersistedDirectives({data:t,directivesByName:n}){for(let[r,i]of n)if(this.persistedDirectiveDefinitionByDirectiveName.get(r)&&(this.referencedPersistedDirectiveNames.add(r),!(Oe.AUTHORIZATION_DIRECTIVES.has(r)||i.length<1)))switch(r){case Oe.DEPRECATED:{t.isDeprecated=!0,(0,_e.upsertDeprecatedDirective)(t,i[0]);break}case Oe.TAG:{(0,_e.upsertTagDirectives)(t,i);break}default:{let o=t.directivesByName.get(r);if(!o){t.directivesByName.set(r,[...i]);break}if(Oe.NON_REPEATABLE_PERSISTED_DIRECTIVES.has(r))break;o.push(...i)}}return t}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,_e.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let u of t.implementedInterfaceTypeNames){n.push((0,$r.stringToNamedTypeNode)(u));let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,u,Oe.PARENT_DEFINITION_DATA);if(l.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ne.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},p=!1;for(let[E,I]of l.fieldDataByName){let v=!1,A=t.fieldDataByName.get(E);if(!A){p=!0,d.unimplementedFields.push(E);continue}let U={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,ah.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,_e.isTypeValidImplementation)(I.node.type,A.node.type,this.concreteTypeNamesByAbstractTypeName)||(p=!0,v=!0,U.implementedResponseType=(0,ah.printTypeNode)(A.node.type));let j=new Set;for(let[Q,ee]of I.argumentDataByName){let ne=ee.node;j.add(Q);let pe=(o=A.argumentDataByName.get(Q))==null?void 0:o.node;if(!pe){p=!0,v=!0,U.unimplementedArguments.add(Q);continue}let le=(0,ah.printTypeNode)(pe.type),Ae=(0,ah.printTypeNode)(ne.type);Ae!==le&&(p=!0,v=!0,U.invalidImplementedArguments.push({actualType:le,argumentName:Q,expectedType:Ae}))}for(let[Q,ee]of A.argumentDataByName){let ne=ee.node;j.has(Q)||ne.type.kind===Re.Kind.NON_NULL_TYPE&&(p=!0,v=!0,U.invalidAdditionalArguments.add(Q))}!r&&A.isInaccessible&&!I.isInaccessible&&(p=!0,v=!0,U.isInaccessible=!0),v&&d.invalidFieldImplementations.set(E,U)}p&&i.set(u,d)}return a.size>0&&this.errors.push((0,Pe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Pe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ne.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var p;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Re.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Re.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let u=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[E,I]of this.entityInterfaceFederationDataByTypeName){if(!((p=I.concreteTypeNames)!=null&&p.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(E);v&&(0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:v,implicitKeys:u,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l})}if(u.length<1)return;if(!o.keys||o.keys.length<1){o.isRootNode=!0,o.keys=u;return}let d=new Set(o.keys.map(E=>E.selectionSet));for(let E of u)d.has(E.selectionSet)||(o.keys.push(E),d.add(E.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,_e.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Re.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Re.Kind.NULL);let u=(0,Ne.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Gc.validateImplicitFieldSets)({conditionalFieldDataByCoords:t.conditionalFieldDataByCoordinates,currentSubgraphName:t.name,entityData:r,implicitKeys:l,objectData:o,parentDefinitionDataByTypeName:a,graphNode:i}),l.length<1)return;if(!u.keys||u.keys.length<1){u.isRootNode=!0,u.keys=l;return}let d=new Set(u.keys.map(p=>p.selectionSet));for(let p of l)d.has(p.selectionSet)||(u.keys.push(p),d.add(p.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?_e.MergeMethod.CONSISTENT:_e.MergeMethod.INTERSECTION:_e.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(Oe.LITERAL_PERIOD);if(r.length<1)continue;let i=(0,Ne.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Gc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ne.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Gc.newChildTagData)(r[1])),u=(0,Ne.getValueOrDefault)(o.tagNamesByArgumentName,r[2],()=>new Set);for(let l of n)u.add(l);break;default:break}}}upsertEnumValueData(t,n,r){let i=t.get(n.name),a=i||this.copyEnumValueData(n);this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=(0,_e.isNodeDataInaccessible)(n);if((r||o)&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}a.appearances+=1,(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if(this.extractPersistedDirectives({data:o.persistedDirectivesData,directivesByName:n.directivesByName}),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(o,n),(0,Ne.addIterableToSet)({source:n.requiredSubgraphNames,target:o.requiredSubgraphNames}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:o.subgraphNames}),this.handleInputValueInaccessibility(i,o,r);let u=(0,hd.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);u.success?o.type=u.typeNode:this.errors.push((0,Pe.incompatibleMergedTypesError)({actualType:u.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:u.expectedType})),(0,_e.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,_e.isNodeDataInaccessible)(n)){if((0,_e.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Pe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByName.get(Oe.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ne.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Pe.unknownFieldSubgraphNameError)(t.federatedCoords));return}this.subscriptionFilterDataByFieldPath.set(t.federatedCoords,{directive:r[0],fieldData:n||t,directiveSubgraphName:i})}federateOutputType({current:t,other:n,coords:r,mostRestrictive:i}){n=(0,vV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=hd.DivergentType.NONE,u=a;for(let l=0;lnew Set)})}upsertFieldData(t,n,r){let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,_e.isNodeDataInaccessible)(n));(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),this.extractPersistedDirectives({data:a.persistedDirectivesData,directivesByName:n.directivesByName});let o=r||(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.federatedCoords),this.recordTagNamesByCoords(a,a.federatedCoords),!i){t.set(a.name,a);return}let u=this.federateOutputType({current:a.type,other:n.type,coords:a.federatedCoords,mostRestrictive:!1});if(u.success)if(a.type=u.typeNode,a.namedTypeName!==n.namedTypeName){let l=(0,Ne.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ne.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let p of a.subgraphNames)n.subgraphNames.has(p)||d.add(p);(0,Ne.addIterableToSet)({source:n.subgraphNames,target:(0,Ne.getValueOrDefault)(l,n.namedTypeName,()=>new Set)})}else this.addSubgraphNameToExistingFieldNamedTypeDisparity(n);for(let l of n.argumentDataByName.values())this.upsertInputValueData(a.argumentDataByName,l,a.federatedCoords,o);(0,Ne.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ne.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ne.addMapEntries)({source:n.isShareableBySubgraphName,target:a.isShareableBySubgraphName}),(0,Ne.addMapEntries)({source:n.nullLevelsBySubgraphName,target:a.nullLevelsBySubgraphName}),(0,Ne.addIterableToSet)({source:n.subgraphNames,target:a.subgraphNames})}getClientSchemaUnionMembers(t){let n=[];for(let[r,i]of t.memberByMemberTypeName)this.inaccessibleCoords.has(r)||n.push(i);return n}recordTagNamesByCoords(t,n){let r=n||t.name;if(t.persistedDirectivesData.tagDirectiveByName.size<1)return;let i=(0,Ne.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),subgraphNames:new Set(t.subgraphNames),description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),federatedCoords:t.federatedCoords,fieldName:t.fieldName,includeDefaultValue:t.includeDefaultValue,isArgument:t.isArgument,kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{directives:[],kind:Re.Kind.INPUT_VALUE_DEFINITION,name:(0,$r.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,_e.getInitialFederatedDescription)(t)}}copyInputValueDataByValueName(t,n,r){let i=new Map;for(let[a,o]of t){let u=this.copyInputValueData(o);this.handleInputValueInaccessibility(n,u,r),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedInputValueTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,`${r}.${o.name}`),i.set(a,u)}return i}copyFieldData(t,n){return{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByName:(0,Ne.copyArrayValueMap)(t.directivesByName),externalFieldDataBySubgraphName:(0,Ne.copyObjectValueMap)(t.externalFieldDataBySubgraphName),federatedCoords:t.federatedCoords,inheritedDirectiveNames:new Set,isInaccessible:t.isInaccessible,isShareableBySubgraphName:new Map(t.isShareableBySubgraphName),kind:t.kind,name:t.name,namedTypeKind:t.namedTypeKind,namedTypeName:t.namedTypeName,node:{arguments:[],directives:[],kind:t.kind,name:(0,$r.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:this.extractPersistedDirectives({data:(0,_e.newPersistedDirectivesData)(),directivesByName:t.directivesByName}),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,_e.getInitialFederatedDescription)(t)}}copyEnumValueDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,_e.isNodeDataInaccessible)(o))&&this.inaccessibleCoords.add(o.federatedCoords),r.set(i,o)}return r}copyFieldDataByName(t,n){let r=new Map;for(let[i,a]of t){let o=n||(0,_e.isNodeDataInaccessible)(a),u=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(u),(0,Ne.getValueOrDefault)(this.coordsByNamedTypeName,u.namedTypeName,()=>new Set).add(u.federatedCoords),this.namedOutputTypeNames.add(u.namedTypeName),this.recordTagNamesByCoords(u,u.federatedCoords),o&&this.inaccessibleCoords.add(u.federatedCoords),r.set(i,u)}return r}copyParentDefinitionData(t){let n=this.copyMutualParentDefinitionData(t);switch(t.kind){case Re.Kind.ENUM_TYPE_DEFINITION:return $(k({},n),{appearances:t.appearances,enumValueDataByName:this.copyEnumValueDataByName(t.enumValueDataByName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:return $(k({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.INTERFACE_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},requireFetchReasonsFieldNames:new Set,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.OBJECT_TYPE_DEFINITION:return $(k({},n),{fieldDataByName:this.copyFieldDataByName(t.fieldDataByName,t.isInaccessible),implementedInterfaceTypeNames:new Set(t.implementedInterfaceTypeNames),isEntity:t.isEntity,isInaccessible:t.isInaccessible,isRootType:t.isRootType,kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Re.Kind.SCALAR_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Re.Kind.UNION_TYPE_DEFINITION:return $(k({},n),{kind:t.kind,node:{kind:t.kind,name:(0,$r.stringToNameNode)(t.name)},memberByMemberTypeName:new Map(t.memberByMemberTypeName),subgraphNames:new Set(t.subgraphNames)})}}getParentTargetData({existingData:t,incomingData:n}){if(!t){let r=this.copyParentDefinitionData(n);return(0,_e.isParentDataRootType)(r)&&(r.extensionType=OV.ExtensionType.NONE),r}return this.extractPersistedDirectives({data:t.persistedDirectivesData,directivesByName:n.directivesByName}),t}upsertParentDefinitionData(t,n){let r=this.entityInterfaceFederationDataByTypeName.get(t.name),i=this.parentDefinitionDataByTypeName.get(t.name),a=this.getParentTargetData({existingData:i,incomingData:t});this.recordTagNamesByCoords(a);let o=(0,_e.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphNames.has(n)){if(i&&i.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:i,incomingSubgraphName:n}));return}a.kind=Re.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Re.Kind.INTERFACE_TYPE_DEFINITION}if(!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphNames.has(n)||a.kind!==Re.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentTypeMergeError)({existingData:a,incomingNodeType:(0,Ne.kindToNodeType)(t.kind),incomingSubgraphName:n}));return}switch((0,Ne.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,_e.setLongestDescription)(a,t),(0,_e.setParentDataExtensionType)(a,t),a.kind){case Re.Kind.ENUM_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.enumValueDataByName.values())this.upsertEnumValueData(a.enumValueDataByName,l,o);return;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:let u=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ne.addIterableToSet)({source:u.implementedInterfaceTypeNames,target:a.implementedInterfaceTypeNames}),(0,Ne.addIterableToSet)({source:u.subgraphNames,target:a.subgraphNames});for(let l of u.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Re.Kind.UNION_TYPE_DEFINITION:if(!(0,_e.areKindsEqual)(a,t))return;(0,Ne.addMapEntries)({source:t.memberByMemberTypeName,target:a.memberByMemberTypeName}),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return;default:(0,Ne.addIterableToSet)({source:t.subgraphNames,target:a.subgraphNames});return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:for(let n of t.inputValueDataByName.values())this.inaccessibleCoords.add(n.federatedCoords);break;default:for(let n of t.fieldDataByName.values()){this.inaccessibleCoords.add(n.federatedCoords);for(let r of n.argumentDataByName.values())this.inaccessibleCoords.add(r.federatedCoords)}}}upsertPersistedDirectiveDefinitionData(t,n){let r=t.name,i=this.potentialPersistedDirectiveDefinitionDataByDirectiveName.get(r);if(!i){if(n>1)return;let a=new Map;for(let o of t.argumentDataByName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByName:a,executableLocations:new Set(t.executableLocations),name:r,repeatable:t.repeatable,subgraphNames:new Set(t.subgraphNames),description:t.description});return}if(i.subgraphNames.size+1!==n){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}if((0,_e.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByName.values())this.namedInputValueTypeNames.add((0,vV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByName,a,`@${i.name}`,!1);(0,_e.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ne.addIterableToSet)({source:t.subgraphNames,target:i.subgraphNames})}shouldUpdateFederatedFieldAbstractNamedType(t,n){if(!t)return!1;let r=this.concreteTypeNamesByAbstractTypeName.get(t);if(!r||r.size<1)return!1;for(let i of n)if(!r.has(i))return!1;return!0}updateTypeNodeNamedType(t,n){let r=t;for(let i=0;i1){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Re.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=p;break}default:{this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let p of o.keys()){d=p;for(let[E,I]of o)if(p!==E&&!I.implementedInterfaceTypeNames.has(p)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,u)){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}a.namedTypeName=d,this.updateTypeNodeNamedType(a.type,d)}}federateInternalSubgraphData(){let t=0,n=!1;for(let r of this.internalSubgraphBySubgraphName.values()){t+=1,this.currentSubgraphName=r.name,this.isVersionTwo||(this.isVersionTwo=r.isVersionTwo),(0,Dfe.renameRootTypes)(this,r);for(let i of r.parentDefinitionDataByTypeName.values())this.upsertParentDefinitionData(i,r.name);if(!n){if(!r.persistedDirectiveDefinitionDataByDirectiveName.size){n=!0;continue}for(let i of r.persistedDirectiveDefinitionDataByDirectiveName.values())this.upsertPersistedDirectiveDefinitionData(i,t);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.size<1&&(n=!0)}}this.handleDisparateFieldNamedTypes()}handleInterfaceObjectForInternalGraph({entityData:t,internalSubgraph:n,interfaceObjectData:r,interfaceObjectNode:i,resolvableKeyFieldSets:a,subgraphName:o}){let u=this.internalGraph.addOrUpdateNode(t.typeName),l=this.internalGraph.addEntityDataNode(t.typeName);for(let p of i.satisfiedFieldSets)u.satisfiedFieldSets.add(p),a.has(p)&&l.addTargetSubgraphByFieldSet(p,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:p,namedTypeName:E}of d||[])this.internalGraph.addEdge(u,this.internalGraph.addOrUpdateNode(E),p);this.internalGraph.addEdge(i,u,t.typeName,!0),this.addValidPrimaryKeyTargetsFromInterfaceObject(n,i.typeName,t,u)}handleEntityInterfaces(){var t;for(let[n,r]of this.entityInterfaceFederationDataByTypeName){let i=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,n,Oe.PARENT_DEFINITION_DATA);if(i.kind===Re.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphNames){let o=(0,Ne.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),u=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ne.getOrThrowError)(u,n,"configurationDataByTypeName"),p=d.keys;if(!p)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let E=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,I,Oe.PARENT_DEFINITION_DATA);if(!(0,Gr.isObjectDefinitionData)(v))continue;let A=(0,Ne.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");A.subgraphNames.add(a);let U=u.get(I);if(U)if((0,Ne.addIterableToSet)({source:d.fieldNames,target:U.fieldNames}),!U.keys)U.keys=[...p];else e:for(let ne of p){for(let{selectionSet:pe}of U.keys)if(ne.selectionSet===pe)continue e;U.keys.push(ne)}else u.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...p],typeName:I});let j=new Set;for(let ne of p.filter(pe=>!pe.disableEntityResolver))j.add(ne.selectionSet);let Q=this.authorizationDataByParentTypeName.get(n),ee=(0,Ne.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Gr.isObjectDefinitionData)(ee)){for(let[ne,pe]of ee.fieldDataByName){let le=`${I}.${ne}`;(0,Ne.getValueOrDefault)(this.fieldCoordsByNamedTypeName,pe.namedTypeName,()=>new Set).add(le);let Ae=Q==null?void 0:Q.fieldAuthDataByFieldName.get(ne);if(Ae){let Z=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Gr.newAuthorizationData)(I));(0,Gr.upsertFieldAuthorizationData)(Z.fieldAuthDataByFieldName,Ae)||this.invalidORScopesCoords.add(le)}let Me=v.fieldDataByName.get(ne);if(Me){let Z=(t=pe.isShareableBySubgraphName.get(a))!=null?t:!1;Me.isShareableBySubgraphName.set(a,Z),Me.subgraphNames.add(a);let ve=pe.externalFieldDataBySubgraphName.get(a);if(!ve)continue;Me.externalFieldDataBySubgraphName.set(a,k({},ve));continue}let Ze=i.isInaccessible||v.isInaccessible||pe.isInaccessible;v.fieldDataByName.set(ne,this.copyFieldData(pe,Ze))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:E,resolvableKeyFieldSets:j,entityData:A})}}}}}fieldDataToGraphFieldData(t){var n;return{externalSubgraphNames:new Set,name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Gr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Gr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByName){if(a===Oe.SEMANTIC_NON_NULL&&(0,_e.isFieldData)(t)){r.push((0,Ne.generateSemanticNonNullDirective)((i=(0,Ne.getFirstEntry)(t.nullLevelsBySubgraphName))!=null?i:new Set([0])));continue}let u=this.persistedDirectiveDefinitionByDirectiveName.get(a);if(u){if(o.length<2){r.push(...o);continue}if(!u.repeatable){this.errors.push((0,Pe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,_e.generateDeprecatedDirective)(t.persistedDirectivesData.deprecatedReason)),n.push(...this.getValidFlattenedPersistedDirectiveNodeArray(t)),n}getFederatedGraphNodeDescription(t){if(t.configureDescriptionDataBySubgraphName.size<1)return t.description;let n=[],r="";for(let[i,{propagate:a,description:o}]of t.configureDescriptionDataBySubgraphName)a&&(n.push(i),r=o);if(n.length===1)return(0,Gc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,_e.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.includeDefaultValue&&(t.node.defaultValue=t.defaultValue),t.node}getValidFieldArgumentNodes(t){let n=[],r=[],i=[],a=`${t.renamedParentTypeName}.${t.name}`;for(let[o,u]of t.argumentDataByName)t.subgraphNames.size===u.subgraphNames.size?(r.push(o),n.push(this.getNodeWithPersistedDirectivesByInputValueData(u))):(0,_e.isTypeRequired)(u.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(t.subgraphNames,u.subgraphNames),requiredSubgraphs:[...u.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.FIELD,a,i)):r.length>0&&((0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,a,()=>({argumentNames:r,fieldName:t.name,typeName:t.renamedParentTypeName})).argumentNames=r),n}getNodeWithPersistedDirectivesByFieldData(t,n){return t.node.arguments=n,t.node.name=(0,$r.stringToNameNode)(t.name),t.node.type=t.type,t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}validateSemanticNonNull(t){let n;for(let r of t.nullLevelsBySubgraphName.values()){if(!n){n=r;continue}if(n.size!==r.size){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Pe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByName.has(Oe.ONE_OF)?r.size>0?(this.errors.push((0,Pe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,bfe.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==OV.ExtensionType.NONE&&this.errors.push((0,Pe.noBaseDefinitionForExtensionError)((0,Ne.kindToNodeType)(r.kind),n)),r.kind){case Re.Kind.ENUM_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let u of r.enumValueDataByName.values()){let l=this.getNodeForRouterSchemaByData(u),d=(0,_e.isNodeDataInaccessible)(u),p=$(k({},u.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(u)});switch(o){case _e.MergeMethod.CONSISTENT:!d&&r.appearances>u.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(p);break;case _e.MergeMethod.INTERSECTION:r.appearances===u.appearances&&(i.push(l),d||a.push(p));break;default:i.push(l),d||a.push(p);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.ENUM_VALUE));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),values:a}));break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;let i=new Array,a=new Array,o=new Array,u=new Set;for(let[l,d]of r.inputValueDataByName)if((0,_e.isTypeRequired)(d.type)&&u.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,_e.isNodeDataInaccessible)(d))continue;o.push($(k({},d.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(d)}))}else(0,_e.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ne.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(Oe.INPUT_OBJECT,n,i,!1));break}if(!this.validateOneOfDirective({data:r,inputValueNodes:a,requiredFieldNames:u}))break;if(r.node.fields=a,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Re.Kind.INTERFACE_TYPE_DEFINITION:case Re.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,u=(0,_e.newInvalidFieldNames)(),l=r.kind===Re.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,_e.propagateAuthDirectives)(r,d);for(let[E,I]of r.fieldDataByName){(0,_e.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,_e.validateExternalAndShareable)(I,u),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,_e.isNodeDataInaccessible)(I)&&(a.push((0,_e.getClientSchemaFieldNodeByFieldData)(I)),o.set(E,this.fieldDataToGraphFieldData(I)))}if(l&&(u.byShareable.size>0&&this.errors.push((0,Pe.invalidFieldShareabilityError)(r,u.byShareable)),u.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Pe.allExternalFieldInstancesError)(n,u.subgraphNamesByExternalFieldName))),r.node.fields=i,this.internalGraph.initializeNode(n,o),r.implementedInterfaceTypeNames.size>0){t.push({data:r,clientSchemaFieldNodes:a});break}this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r));let p=(0,Sfe.isNodeQuery)(n);if((0,_e.isNodeDataInaccessible)(r)){if(p){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let E=p?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ne.kindToNodeType)(r.kind),n,Oe.FIELD);this.errors.push(E);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Re.Kind.SCALAR_TYPE_DEFINITION:{if(Qc.IGNORED_FEDERATED_TYPE_NAMES.has(n))break;if((0,_e.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r)}));break}case Re.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Gr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,_e.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)(Oe.UNION,n,"union member type"));break}this.clientDefinitions.push($(k({},r.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(r),types:i}));break}}}pushNamedTypeAuthDataToFields(){var t;for(let[n,r]of this.authorizationDataByParentTypeName){if(!r.requiresAuthentication&&r.requiredScopes.length<1)continue;let i=this.fieldCoordsByNamedTypeName.get(n);if(i)for(let a of i){let o=a.split(Oe.LITERAL_PERIOD);switch(o.length){case 2:{let u=(0,Ne.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Gr.newAuthorizationData)(o[0])),l=(0,Ne.getValueOrDefault)(u.fieldAuthDataByFieldName,o[1],()=>(0,Gr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Ap.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Gr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),El(this,uh,DV).call(this),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(n)),(0,_e.isNodeDataInaccessible)(n)){this.validateReferencesOfInaccessibleType(n),this.internalGraph.setNodeInaccessible(n.name);continue}let i=[];for(let a of n.implementedInterfaceTypeNames)this.inaccessibleCoords.has(a)||i.push((0,$r.stringToNamedTypeNode)(a));this.clientDefinitions.push($(k({},n.node),{directives:(0,_e.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(Oe.LEFT_PARENTHESIS)[0].split(Oe.LITERAL_PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ne.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(Oe.QUERY);if(!t||t.kind!==Re.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,_e.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(Oe.LITERAL_PERIOD);if(o.length<1)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let u=n;if(this.inaccessibleCoords.has(u.renamedTypeName))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],u.renamedTypeName)),[];let l="";for(let d=0;d0?`.${p}`:p,u.kind!==Re.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let E=u.fieldDataByName.get(p);if(!E)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,p,u.renamedTypeName)),[];let I=`${u.renamedTypeName}.${p}`;if(!E.subgraphNames.has(i))return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Pe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Ap.BASE_SCALARS.has(E.namedTypeName)){u={kind:Re.Kind.SCALAR_TYPE_DEFINITION,name:E.namedTypeName};continue}u=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,E.namedTypeName,Oe.PARENT_DEFINITION_DATA)}return(0,_e.isLeafKind)(u.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ne.kindToNodeType)(u.kind),u.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([Oe.FIELD_PATH,Oe.VALUES]),p=new Set,E=new Set,I=[];for(let v of t.fields){let A=v.name.value,U=a+`.${A}`;switch(A){case Oe.FIELD_PATH:{if(d.has(Oe.FIELD_PATH))d.delete(Oe.FIELD_PATH);else{l=!0,p.add(Oe.FIELD_PATH);break}if(v.value.kind!==Re.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.STRING,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}let j=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,U,o,I);if(j.length<1){l=!0;break}n.fieldPath=j;break}case Oe.VALUES:{if(d.has(Oe.VALUES))d.delete(Oe.VALUES);else{l=!0,p.add(Oe.VALUES);break}let j=v.value.kind;if(j==Re.Kind.NULL||j==Re.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(U,Oe.LIST,(0,Ne.kindToNodeType)(v.value.kind))),l=!0;break}if(j!==Re.Kind.LIST){n.values=[(0,_e.getSubscriptionFilterValue)(v.value)];break}let Q=new Set,ee=[];for(let ne=0;ne0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(U,ee));continue}if(Q.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(U));continue}n.values=[...Q];break}default:l=!0,E.add(A)}}return l?(u.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...p],[...E],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,u){if(i>sh.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return u.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!Qc.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let p=a+`.${d}`;switch(l.value.kind){case Re.Kind.OBJECT:switch(d){case Oe.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,u);case Oe.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,u);default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.LIST,Oe.OBJECT)),!1}case Re.Kind.LIST:{let E=[];switch(d){case Oe.AND_UPPER:{n.and=E;break}case Oe.OR_UPPER:{n.or=E;break}default:return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,Oe.OBJECT,Oe.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return u.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(p,I)),!1;let v=!0,A=[];for(let U=0;U0?(u.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(p,A)),!1):v}default:{let E=Qc.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?Oe.LIST:Oe.OBJECT;return u.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(p,E,(0,Ne.kindToNodeType)(l.value.kind))),!1}}}validateSubscriptionFilterAndGenerateConfiguration(t,n,r,i,a,o){if(!t.arguments||t.arguments.length!==1)return;let u=t.arguments[0];if(u.value.kind!==Re.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(Oe.CONDITION,Oe.OBJECT,(0,Ne.kindToNodeType)(u.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(u.value,l,n,0,Oe.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ne.getValueOrDefault)(this.fieldConfigurationByFieldCoords,r,()=>({argumentNames:[],fieldName:i,typeName:a})).subscriptionFilterCondition=l}validateSubscriptionFiltersAndGenerateConfiguration(){for(let[t,n]of this.subscriptionFilterDataByFieldPath){if(this.inaccessibleCoords.has(t))continue;let r=this.parentDefinitionDataByTypeName.get(n.fieldData.namedTypeName);if(!r){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(t,[(0,Pe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,_e.isNodeDataInaccessible)(r)||r.kind===Re.Kind.OBJECT_TYPE_DEFINITION&&this.validateSubscriptionFilterAndGenerateConfiguration(n.directive,r,t,n.fieldData.name,n.fieldData.renamedParentTypeName,n.directiveSubgraphName)}}buildFederationResult(){this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration(),this.invalidORScopesCoords.size>0&&this.errors.push((0,Pe.orScopesLimitError)(Ap.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,a,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let t=[];this.pushParentDefinitionDataToDocumentDefinitions(t),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(t),this.validateQueryRootType();for(let a of this.inaccessibleRequiredInputValueErrorByCoords.values())this.errors.push(a);if(this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};if(!this.disableResolvabilityValidation&&this.internalSubgraphBySubgraphName.size>1){let a=this.internalGraph.validate();if(!a.success)return{errors:a.errors,success:!1,warnings:this.warnings}}let n={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,name:l,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E}of this.internalSubgraphBySubgraphName.values())i.set(l,{configurationDataByTypeName:a,directiveDefinitionByName:o,isVersionTwo:u,parentDefinitionDataByTypeName:d,schema:p,schemaNode:E});for(let a of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:n,federatedGraphSchema:(0,Re.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:i,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}getClientSchemaObjectBoolean(){return this.inaccessibleCoords.size<1&&this.tagNamesByCoords.size<1?{}:{shouldIncludeClientSchema:!0}}handleChildTagExclusions(t,n,r,i){let a=n.size;for(let[o,u]of r){let l=(0,Ne.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,_e.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(u.tagNames)||((0,Ne.getValueOrDefault)(l.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,u]of n){if((0,_e.isNodeDataInaccessible)(u)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ne.getValueOrDefault)(u.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Uu.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,u]of this.parentTagDataByTypeName){let l=(0,Ne.getOrThrowError)(this.parentDefinitionDataByTypeName,o,Oe.PARENT_DEFINITION_DATA);if(!(0,_e.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(u.tagNames)){l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(u.childTagDataByChildName.size<1))switch(l.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:break;case Re.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,u.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[p,E]of u.childTagDataByChildName){let I=(0,Ne.getOrThrowError)(l.fieldDataByName,p,`${o}.fieldDataByFieldName`);if((0,_e.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(E.tagNames)){(0,Ne.getValueOrDefault)(I.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,A]of E.tagNamesByArgumentName){let U=(0,Ne.getOrThrowError)(I.argumentDataByName,v,`${p}.argumentDataByArgumentName`);(0,_e.isNodeDataInaccessible)(U)||t.tagNamesToExclude.isDisjointFrom(A)||((0,Ne.getValueOrDefault)(U.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(U.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,u]of this.parentDefinitionDataByTypeName){if((0,_e.isNodeDataInaccessible)(u))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(u.kind){case Re.Kind.SCALAR_TYPE_DEFINITION:case Re.Kind.UNION_TYPE_DEFINITION:continue;case Re.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.enumValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Re.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(u,u.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=u.fieldDataByName.size;for(let[p,E]of u.fieldDataByName){if((0,_e.isNodeDataInaccessible)(E)){d-=1;continue}let I=l.childTagDataByChildName.get(p);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ne.getValueOrDefault)(E.persistedDirectivesData.directivesByName,Oe.INACCESSIBLE,()=>[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(E.federatedCoords),d-=1)}d<1&&(u.persistedDirectivesData.directivesByName.set(Oe.INACCESSIBLE,[(0,Ne.generateSimpleDirective)(Oe.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,_e.addValidPersistedDirectiveDefinitionNodeByData)(this.routerDefinitions,o,this.persistedDirectiveDefinitionByDirectiveName,this.errors);let n=[];if(this.pushParentDefinitionDataToDocumentDefinitions(n),this.validateInterfaceImplementationsAndPushToDocumentDefinitions(n),this.validateQueryRootType(),this.errors.length>0)return{errors:this.errors,success:!1,warnings:this.warnings};let r={kind:Re.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Re.buildASTSchema)({kind:Re.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,name:d,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I}of this.internalSubgraphBySubgraphName.values())a.set(d,{configurationDataByTypeName:o,directiveDefinitionByName:u,isVersionTwo:l,parentDefinitionDataByTypeName:p,schema:E,schemaNode:I});for(let o of this.authorizationDataByParentTypeName.values())(0,Gr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return k({directiveDefinitionByName:this.directiveDefinitionByName,fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),federatedGraphAST:r,federatedGraphSchema:(0,Re.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,subgraphConfigBySubgraphName:a,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};uh=new WeakSet,DV=function(){var r;let t=new Set,n=new Set;for(let i of this.referencedPersistedDirectiveNames){let a=Ap.DIRECTIVE_DEFINITION_BY_NAME.get(i);if(!a)continue;let o=(r=Qc.DEPENDENCIES_BY_DIRECTIVE_NAME.get(i))!=null?r:[];this.directiveDefinitionByName.set(i,a),Qc.CLIENT_PERSISTED_DIRECTIVE_NAMES.has(i)&&(this.clientDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:t})),this.routerDefinitions.push(a),(0,Ne.addIterableToSet)({source:o,target:n})}this.clientDefinitions.push(...t),this.routerDefinitions.push(...n)};Yc.FederationFactory=oh;function mb({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Ofe.batchNormalize)(t);if(!n.success)return{errors:n.errors,success:!1,warnings:n.warnings};let r=new Map,i=new Map;for(let[u,l]of n.internalSubgraphBySubgraphName)for(let[d,p]of l.entityInterfaces){let E=r.get(d);if(!E){r.set(d,(0,Gr.newEntityInterfaceFederationData)(p,u));continue}(0,Gr.upsertEntityInterfaceFederationData)(E,p,u)}let a=new Array,o=new Map;for(let[u,l]of r){let d=l.concreteTypeNames.size;for(let[p,E]of l.subgraphDataByTypeName){let I=(0,Ne.getValueOrDefault)(o,p,()=>new Set);if((0,Ne.addIterableToSet)({source:E.concreteTypeNames,target:I}),!E.isInterfaceObject){E.resolvable&&E.concreteTypeNames.size!==d&&(0,Ne.getValueOrDefault)(i,u,()=>new Array).push({subgraphName:p,definedConcreteTypeNames:new Set(E.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ne.addIterableToSet)({source:l.concreteTypeNames,target:I});let{parentDefinitionDataByTypeName:v}=(0,Ne.getOrThrowError)(n.internalSubgraphBySubgraphName,p,"internalSubgraphBySubgraphName"),A=[];for(let U of l.concreteTypeNames)v.has(U)&&A.push(U);A.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(u,p,A))}}for(let[u,l]of i){let d=new Array;for(let p of l){let E=o.get(p.subgraphName);if(!E){d.push(p);continue}let I=p.requiredConcreteTypeNames.intersection(E);p.requiredConcreteTypeNames.size!==I.size&&(p.definedConcreteTypeNames=I,d.push(p))}if(d.length>0){i.set(u,d);continue}i.delete(u)}return i.size>0&&a.push((0,Pe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new oh({authorizationDataByParentTypeName:n.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:n.concreteTypeNamesByAbstractTypeName,disableResolvabilityValidation:e,entityDataByTypeName:n.entityDataByTypeName,entityInterfaceFederationDataByTypeName:r,fieldCoordsByNamedTypeName:n.fieldCoordsByNamedTypeName,internalSubgraphBySubgraphName:n.internalSubgraphBySubgraphName,internalGraph:n.internalGraph,warnings:n.warnings}),success:!0,warnings:n.warnings}}function Afe({disableResolvabilityValidation:e,subgraphs:t}){let n=mb({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function Rfe({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=mb({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,SV.cloneDeep)(r.federationFactory)],a=r.federationFactory.buildFederationResult();if(!a.success)return{errors:a.errors,success:!1,warnings:a.warnings};let o=t.size-1,u=new Map,l=0;for(let[d,p]of t){l!==o&&i.push((0,SV.cloneDeep)(i[l]));let E=i[l].buildFederationContractResult(p);u.set(d,E),l++}return $(k({},a),{federationResultByContractName:u})}function Pfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=mb({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var ch=w(xs=>{"use strict";m();T();N();Object.defineProperty(xs,"__esModule",{value:!0});xs.LATEST_ROUTER_COMPATIBILITY_VERSION=xs.ROUTER_COMPATIBILITY_VERSIONS=xs.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;xs.ROUTER_COMPATIBILITY_VERSION_ONE="1";xs.ROUTER_COMPATIBILITY_VERSIONS=new Set([xs.ROUTER_COMPATIBILITY_VERSION_ONE]);xs.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var AV=w(Rp=>{"use strict";m();T();N();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.federateSubgraphs=Ffe;Rp.federateSubgraphsWithContracts=wfe;Rp.federateSubgraphsContract=Lfe;var Nb=bV(),Tb=ch();function Ffe({disableResolvabilityValidation:e,subgraphs:t,version:n=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,Nb.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function wfe({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function Lfe({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=Tb.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,Nb.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var PV=w(RV=>{"use strict";m();T();N();Object.defineProperty(RV,"__esModule",{value:!0})});var FV=w(Pp=>{"use strict";m();T();N();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.normalizeSubgraphFromString=Cfe;Pp.normalizeSubgraph=Bfe;Pp.batchNormalize=Ufe;var Eb=lb(),hb=ch();function Cfe(e,t=!0,n=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,Eb.normalizeSubgraphFromString)(e,t)}}function Bfe(e,t,n,r=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,Eb.normalizeSubgraph)(e,t,n)}}function Ufe(e,t=hb.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,Eb.batchNormalize)(e)}}});var LV=w(wV=>{"use strict";m();T();N();Object.defineProperty(wV,"__esModule",{value:!0})});var BV=w(CV=>{"use strict";m();T();N();Object.defineProperty(CV,"__esModule",{value:!0})});var kV=w(UV=>{"use strict";m();T();N();Object.defineProperty(UV,"__esModule",{value:!0})});var xV=w(MV=>{"use strict";m();T();N();Object.defineProperty(MV,"__esModule",{value:!0})});var VV=w(qV=>{"use strict";m();T();N();Object.defineProperty(qV,"__esModule",{value:!0})});var KV=w(jV=>{"use strict";m();T();N();Object.defineProperty(jV,"__esModule",{value:!0})});var $V=w(lh=>{"use strict";m();T();N();Object.defineProperty(lh,"__esModule",{value:!0});lh.COMPOSITION_VERSION=void 0;lh.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var QV=w(GV=>{"use strict";m();T();N();Object.defineProperty(GV,"__esModule",{value:!0})});var JV=w(YV=>{"use strict";m();T();N();Object.defineProperty(YV,"__esModule",{value:!0})});var zV=w(HV=>{"use strict";m();T();N();Object.defineProperty(HV,"__esModule",{value:!0})});var XV=w(WV=>{"use strict";m();T();N();Object.defineProperty(WV,"__esModule",{value:!0})});var dh=w(Xe=>{"use strict";m();T();N();var kfe=Xe&&Xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(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){r===void 0&&(r=n),e[r]=t[n]}),lt=Xe&&Xe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&kfe(t,e,n)};Object.defineProperty(Xe,"__esModule",{value:!0});lt(Fr(),Xe);lt(Vv(),Xe);lt($i(),Xe);lt(ex(),Xe);lt(AV(),Xe);lt(PV(),Xe);lt(FV(),Xe);lt(LV(),Xe);lt(sb(),Xe);lt(HD(),Xe);lt(HE(),Xe);lt(BV(),Xe);lt(kV(),Xe);lt(eb(),Xe);lt(ch(),Xe);lt(xV(),Xe);lt(ob(),Xe);lt(Su(),Xe);lt(Gf(),Xe);lt($l(),Xe);lt(VV(),Xe);lt(KV(),Xe);lt($V(),Xe);lt(QV(),Xe);lt(zn(),Xe);lt(JV(),Xe);lt(wr(),Xe);lt(qD(),Xe);lt(Du(),Xe);lt(Qf(),Xe);lt(yE(),Xe);lt(IE(),Xe);lt(dd(),Xe);lt(hT(),Xe);lt(yT(),Xe);lt(pb(),Xe);lt(zV(),Xe);lt(BD(),Xe);lt(Ip(),Xe);lt(XV(),Xe);lt($D(),Xe);lt(ih(),Xe);lt(MD(),Xe);lt(yp(),Xe);lt(gp(),Xe)});var Lpe={};$m(Lpe,{buildRouterConfiguration:()=>wpe,federateSubgraphs:()=>Fpe});m();T();N();var tl=Ni(dh());m();T();N();m();T();N();function yb(e){if(!e)return e;if(!URL.canParse(e))throw new Error("Invalid URL");let t=e.indexOf("?"),n=e.indexOf("#"),r=e;return t>0?r=r.slice(0,n>0?Math.min(t,n):t):n>0&&(r=r.slice(0,n)),r}m();T();N();m();T();N();var ZV={};m();T();N();function ej(e){return e!=null}m();T();N();m();T();N();var ph=Ni(Ie(),1);m();T();N();m();T();N();function ku(e){return fh(e,[])}function fh(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Mfe(e,t);default:return String(e)}}function tj(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function Mfe(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?tj(e)+` +`+nj(e.errors,t):tj(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(xfe(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:fh(r,n)}else if(Array.isArray(e))return nj(e,n);return qfe(e,n)}function xfe(e){return typeof e.toJSON=="function"}function qfe(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>3?"["+Vfe(e)+"]":"{ "+n.map(([i,a])=>i+": "+fh(a,t)).join(", ")+" }"}function nj(e,t){if(e.length===0)return"[]";if(t.length>3)return"[Array]";let n=e.length,r=[];for(let i=0;ijfe.includes(t))}function yd(e,t){t!=null&&t.originalError&&!(t.originalError instanceof Error)&&Kfe(t.originalError)&&(t.originalError=yd(t.originalError.message,t.originalError));let n=Fp.GraphQLError,r=Fp.versionInfo.major>=16?new n(e,t):new n(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions);return t!=null&&t.coordinate&&r.coordinate==null&&Object.defineProperties(r,{coordinate:{value:t.coordinate,enumerable:!0,configurable:!0}}),r}m();T();N();function rj(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function ij(e){return typeof e=="object"&&e!==null}function aj(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function sj(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((u,l)=>$(k({},u),{[l.name.value]:l}),{});for(let{name:u,type:l,defaultValue:d}of e.args){let p=a[u];if(!p){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was not provided.`,{nodes:[t]});continue}let E=p.value,I=E.kind===Fa.Kind.NULL;if(E.kind===Fa.Kind.VARIABLE){let A=E.name.value;if(n==null||!aj(n,A)){if(d!==void 0)r[u]=d;else if((0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of required type "${ku(l)}" was provided the variable "$${A}" which was not provided a runtime value.`,{nodes:[E]});continue}I=n[A]==null}if(I&&(0,Fa.isNonNullType)(l))throw yd(`Argument "${u}" of non-null type "${ku(l)}" must not be null.`,{nodes:[E]});let v=(0,Fa.valueFromAST)(E,l,n);if(v===void 0)throw yd(`Argument "${u}" has invalid value ${(0,Fa.print)(E)}.`,{nodes:[E]});r[u]=v}return r}m();T();N();function Id(e){let t=new WeakMap;return function(r){let i=t.get(r);if(i===void 0){let a=e(r);return t.set(r,a),a}return i}}function oj(e,t,n=["directives"]){var o;let r={};if(e.extensions){let u=e.extensions;for(let l of n)u=u==null?void 0:u[l];if(u!=null)for(let l in u){let d=u[l],p=l;if(Array.isArray(d))for(let E of d){let I=r[p];I||(I=[],r[p]=I),I.push(E)}else{let E=r[p];E||(E=[],r[p]=E),E.push(d)}}}let i=Id(u=>JSON.stringify(u)),a=[];e.astNode&&a.push(e.astNode),e.extensionASTNodes&&a.push(...e.extensionASTNodes);for(let u of a)if((o=u.directives)!=null&&o.length)for(let l of u.directives){let d=l.name.value,p=r[d];p||(p=[],r[d]=p);let E=t==null?void 0:t.getDirective(d),I={};if(E&&(I=sj(E,l)),l.arguments)for(let v of l.arguments){let A=v.name.value;if(I[A]==null){let U=E==null?void 0:E.args.find(j=>j.name===A);U&&(I[A]=(0,ph.valueFromAST)(v.value,U.type))}I[A]==null&&(I[A]=(0,ph.valueFromASTUntyped)(v.value))}if(a.length>0&&p.length>0){let v=i(I);if(p.some(A=>i(A)===v))continue}p.push(I)}return r}function Ib(e,t=["directives"]){let n=oj(e,void 0,t);return Object.entries(n).map(([r,i])=>i==null?void 0:i.map(a=>({name:r,args:a}))).flat(1/0).filter(Boolean)}m();T();N();var Je=Ni(Ie(),1);m();T();N();var cs=Ni(Ie(),1);function ls(e){if((0,cs.isNonNullType)(e)){let t=ls(e.ofType);if(t.kind===cs.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${ku(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cs.Kind.NON_NULL_TYPE,type:t}}else if((0,cs.isListType)(e))return{kind:cs.Kind.LIST_TYPE,type:ls(e.ofType)};return{kind:cs.Kind.NAMED_TYPE,name:{kind:cs.Kind.NAME,value:e.name}}}m();T();N();var dr=Ni(Ie(),1);m();T();N();var wa=Ni(Ie(),1);function Jc(e){if(e===null)return{kind:wa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Jc(n);r!=null&&t.push(r)}return{kind:wa.Kind.LIST,values:t}}if(typeof e=="object"){if(e!=null&&e.toJSON)return Jc(e.toJSON());let t=[];for(let n in e){let r=e[n],i=Jc(r);i&&t.push({kind:wa.Kind.OBJECT_FIELD,name:{kind:wa.Kind.NAME,value:n},value:i})}return{kind:wa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:wa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:wa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return $fe.test(t)?{kind:wa.Kind.INT,value:t}:{kind:wa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:wa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var $fe=/^-?(?:0|[1-9][0-9]*)$/;function Mu(e,t){if((0,dr.isNonNullType)(t)){let n=Mu(e,t.ofType);return(n==null?void 0:n.kind)===dr.Kind.NULL?null:n}if(e===null)return{kind:dr.Kind.NULL};if(e===void 0)return null;if((0,dr.isListType)(t)){let n=t.ofType;if(rj(e)){let r=[];for(let i of e){let a=Mu(i,n);a!=null&&r.push(a)}return{kind:dr.Kind.LIST,values:r}}return Mu(e,n)}if((0,dr.isInputObjectType)(t)){if(!ij(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Mu(e[r.name],r.type);i&&n.push({kind:dr.Kind.OBJECT_FIELD,name:{kind:dr.Kind.NAME,value:r.name},value:i})}return{kind:dr.Kind.OBJECT,fields:n}}if((0,dr.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,dr.isEnumType)(t)?{kind:dr.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&Gfe.test(n)?{kind:dr.Kind.INT,value:n}:Jc(n)}console.assert(!1,"Unexpected input type: "+ku(t))}var Gfe=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();var uj=Ni(Ie(),1);function vi(e){var t;if((t=e.astNode)!=null&&t.description)return $(k({},e.astNode.description),{block:!0});if(e.description)return{kind:uj.Kind.STRING,value:e.description,block:!0}}m();T();N();var Lqe=Id(function(t){let n=Qfe(t);return new Set([...n].map(r=>r.name))}),Qfe=Id(function(t){let n=gb(t);return new Set(n.values())}),gb=Id(function(t){let n=new Map,r=t.getQueryType();r&&n.set("query",r);let i=t.getMutationType();i&&n.set("mutation",i);let a=t.getSubscriptionType();return a&&n.set("subscription",a),n});function Yfe(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Jfe(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let u of o)(0,Je.isSpecifiedDirective)(u)||a.push(Hfe(u,e,n));for(let u in r){let l=r[u],d=(0,Je.isSpecifiedScalarType)(l),p=(0,Je.isIntrospectionType)(l);if(!(d||p))if((0,Je.isObjectType)(l))a.push(zfe(l,e,n));else if((0,Je.isInterfaceType)(l))a.push(Wfe(l,e,n));else if((0,Je.isUnionType)(l))a.push(Xfe(l,e,n));else if((0,Je.isInputObjectType)(l))a.push(Zfe(l,e,n));else if((0,Je.isEnumType)(l))a.push(epe(l,e,n));else if((0,Je.isScalarType)(l))a.push(tpe(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:Je.Kind.DOCUMENT,definitions:a}}function cj(e,t={}){let n=Yfe(e,t);return(0,Je.print)(n)}function Jfe(e,t){let n=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),r=[];if(e.astNode!=null&&r.push(e.astNode),e.extensionASTNodes!=null)for(let d of e.extensionASTNodes)r.push(d);for(let d of r)if(d.operationTypes)for(let p of d.operationTypes)n.set(p.operation,p);let i=gb(e);for(let[d,p]of n){let E=i.get(d);if(E!=null){let I=ls(E);p!=null?p.type=I:n.set(d,{kind:Je.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(ej),o=ds(e,e,t);if(!a.length&&!o.length)return null;let u={kind:a.length?Je.Kind.SCHEMA_DEFINITION:Je.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=vi(e);return l&&(u.description=l),u}function Hfe(e,t,n){var r,i;return{kind:Je.Kind.DIRECTIVE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>lj(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:Je.Kind.NAME,value:a})))||[]}}function ds(e,t,n){let r=[],i=Ib(e,n),a;i!=null&&(a=fj(t,i));let o=null,u=null,l=null;if(a!=null&&(r=a.filter(d=>Je.specifiedDirectives.every(p=>p.name!==d.name.value)),o=a.find(d=>d.name.value==="deprecated"),u=a.find(d=>d.name.value==="specifiedBy"),l=a.find(d=>d.name.value==="oneOf")),e.deprecationReason!=null&&o==null&&(o=ipe(e.deprecationReason)),e.specifiedByUrl!=null||e.specifiedByURL!=null&&u==null){let p={url:e.specifiedByUrl||e.specifiedByURL};u=wp("specifiedBy",p)}return e.isOneOf&&l==null&&(l=wp("oneOf")),o!=null&&r.push(o),u!=null&&r.push(u),l!=null&&r.push(l),r}function lj(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),defaultValue:e.defaultValue!==void 0&&(r=Mu(e.defaultValue,e.type))!=null?r:void 0,directives:ds(e,t,n)}}function zfe(e,t,n){return{kind:Je.Kind.OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>dj(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>ls(r)),directives:ds(e,t,n)}}function Wfe(e,t,n){let r={kind:Je.Kind.INTERFACE_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>dj(i,t,n)),directives:ds(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>ls(i))),r}function Xfe(e,t,n){return{kind:Je.Kind.UNION_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n),types:e.getTypes().map(r=>ls(r))}}function Zfe(e,t,n){return{kind:Je.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>npe(r,t,n)),directives:ds(e,t,n)}}function epe(e,t,n){return{kind:Je.Kind.ENUM_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>rpe(r,t,n)),directives:ds(e,t,n)}}function tpe(e,t,n){let r=Ib(e,n),i=fj(t,r),a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(o=>o.name.value==="specifiedBy")){let o={url:a};i.push(wp("specifiedBy",o))}return{kind:Je.Kind.SCALAR_TYPE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:i}}function dj(e,t,n){return{kind:Je.Kind.FIELD_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},arguments:e.args.map(r=>lj(r,t,n)),type:ls(e.type),directives:ds(e,t,n)}}function npe(e,t,n){var r;return{kind:Je.Kind.INPUT_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},type:ls(e.type),directives:ds(e,t,n),defaultValue:(r=Mu(e.defaultValue,e.type))!=null?r:void 0}}function rpe(e,t,n){return{kind:Je.Kind.ENUM_VALUE_DEFINITION,description:vi(e),name:{kind:Je.Kind.NAME,value:e.name},directives:ds(e,t,n)}}function ipe(e){return wp("deprecated",{reason:e},Je.GraphQLDeprecatedDirective)}function wp(e,t,n){let r=[];for(let i in t){let a=t[i],o;if(n!=null){let u=n.args.find(l=>l.name===i);u&&(o=Mu(a,u.type))}o==null&&(o=Jc(a)),o!=null&&r.push({kind:Je.Kind.ARGUMENT,name:{kind:Je.Kind.NAME,value:i},value:o})}return{kind:Je.Kind.DIRECTIVE,name:{kind:Je.Kind.NAME,value:e},arguments:r}}function fj(e,t){let n=[];for(let{name:r,args:i}of t){let a=e==null?void 0:e.getDirective(r);n.push(wp(r,i,a))}return n}var Rd=Ni(dh(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function mn(e,t){if(!e)throw new Error(t)}var ape=34028234663852886e22,spe=-34028234663852886e22,ope=4294967295,upe=2147483647,cpe=-2147483648;function gd(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>upe||eope||e<0)throw new Error("invalid uint 32: "+e)}function mh(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>ape||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function vb(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let u=Tj(o);a.push(u),r[o.name]=u,i[o.no]=u}return{typeName:e,values:a,findName(o){return r[o]},findNumber(o){return i[o]}}}function Nj(e,t,n){let r={};for(let i of t){let a=Tj(i);r[a.localName]=a.no,r[a.no]=a.localName}return _b(r,e,t,n),r}function Tj(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Fe=class{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){let r=this.getType(),i=r.runtime.bin,a=i.makeReadOptions(n);return i.readMessage(this,a.readerFactory(t),t.byteLength,a),this}fromJson(t,n){let r=this.getType(),i=r.runtime.json,a=i.makeReadOptions(n);return i.readMessage(r,t,a,this),this}fromJsonString(t,n){let r;try{r=JSON.parse(t)}catch(i){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${i instanceof Error?i.message:String(i)}`)}return this.fromJson(r,n)}toBinary(t){let n=this.getType(),r=n.runtime.bin,i=r.makeWriteOptions(t),a=i.writerFactory();return r.writeMessage(this,a,i),a.finish()}toJson(t){let n=this.getType(),r=n.runtime.json,i=r.makeWriteOptions(t);return r.writeMessage(this,i)}toJsonString(t){var n;let r=this.toJson(t);return JSON.stringify(r,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function Ej(e,t,n,r){var i;let a=(i=r==null?void 0:r.localName)!==null&&i!==void 0?i:t.substring(t.lastIndexOf(".")+1),o={[a]:function(u){e.util.initFields(this),e.util.initPartial(u,this)}}[a];return Object.setPrototypeOf(o.prototype,new Fe),Object.assign(o,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(u,l){return new o().fromBinary(u,l)},fromJson(u,l){return new o().fromJson(u,l)},fromJsonString(u,l){return new o().fromJsonString(u,l)},equals(u,l){return e.util.equals(o,u,l)}}),o}m();T();N();m();T();N();m();T();N();m();T();N();function yj(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>a,u=!(!(o>>>7)&&t==0),l=(u?o|128:o)&255;if(n.push(l),!u)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,u=!!(o>>>7),l=(u?o|128:o)&255;if(n.push(l),!u)return}n.push(t>>>31&1)}}var Nh=4294967296;function Ob(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(o,u){let l=Number(e.slice(o,u));i*=n,r=r*n+l,r>=Nh&&(i=i+(r/Nh|0),r=r%Nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?gj(r,i):Db(r,i)}function Ij(e,t){let n=Db(e,t),r=n.hi&2147483648;r&&(n=gj(n.lo,n.hi));let i=Sb(n.lo,n.hi);return r?"-"+i:i}function Sb(e,t){if({lo:e,hi:t}=lpe(e,t),t<=2097151)return String(Nh*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,u=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(u+=Math.floor(o/l),o%=l),u.toString()+hj(o)+hj(a)}function lpe(e,t){return{lo:e>>>0,hi:t>>>0}}function Db(e,t){return{lo:e|0,hi:t|0}}function gj(e,t){return t=~t,e?e=~e+1:t+=1,Db(e,t)}var hj=e=>{let t=String(e);return"0000000".slice(t.length)+t};function bb(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function _j(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}function dpe(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof S!="object"||typeof S.env!="object"||S.env.BUF_BIGINT_DISABLE!=="1")){let i=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),o=BigInt("0"),u=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){let d=typeof l=="bigint"?l:BigInt(l);if(d>a||du||dmn(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>mn(/^[0-9]+$/.test(i),`uint64 invalid: ${i}`);return{zero:"0",supported:!1,parse(i){return typeof i!="string"&&(i=i.toString()),n(i),i},uParse(i){return typeof i!="string"&&(i=i.toString()),r(i),i},enc(i){return typeof i!="string"&&(i=i.toString()),n(i),Ob(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),Ob(i)},dec(i,a){return Ij(i,a)},uDec(i,a){return Sb(i,a)}}}var Jn=dpe();m();T();N();var fe;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(fe||(fe={}));var La;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(La||(La={}));function qs(e,t,n){if(t===n)return!0;if(e==fe.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let r=0;r>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Lp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return gd(t),bb(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){mh(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Lp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){gd(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return gd(t),t=(t<<1^t>>31)>>>0,bb(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Jn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Jn.enc(t);return Th(n.lo,n.hi,this.buf),this}sint64(t){let n=Jn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return Th(i,a,this.buf),this}uint64(t){let n=Jn.uEnc(t);return Th(n.lo,n.hi,this.buf),this}},yh=class{constructor(t,n){this.varint64=yj,this.uint32=_j,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n!=null?n:new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t){let n=this.pos;switch(t){case xn.Varint:for(;this.buf[this.pos++]&128;);break;case xn.Bit64:this.pos+=4;case xn.Bit32:this.pos+=4;break;case xn.LengthDelimited:let r=this.uint32();this.pos+=r;break;case xn.StartGroup:let i;for(;(i=this.tag()[1])!==xn.EndGroup;)this.skip(i);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Jn.dec(...this.varint64())}uint64(){return Jn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Jn.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}};function vj(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let a=typeof r=="function"?r():r;a.name=t.split(".").pop(),a.jsonName=`[${t}]`,i=e.util.newFieldList([a]).list()[0]}return i},runtime:e}}function Ih(e){let t=e.field.localName,n=Object.create(null);return n[t]=fpe(e),[n,()=>n[t]]}function fpe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return Ca(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}function Oj(e,t){if(!t.repeated&&(t.kind=="enum"||t.kind=="scalar")){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(n=>n.no===t.no)}m();T();N();m();T();N();var Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),gh=[];for(let e=0;e>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0;break}}if(i==1)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a>2],i=(r&3)<<4,n=1;break;case 1:t+=Vs[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Vs[i|r>>6],t+=Vs[r&63],n=0;break}return n&&(t+=Vs[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function Sj(e,t,n){bj(t,e);let r=t.runtime.bin.makeReadOptions(n),i=Oj(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=Ih(t);for(let u of i)t.runtime.bin.readField(a,r.readerFactory(u.data),t.field,u.wireType,r);return o()}function Dj(e,t,n,r){bj(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(Rb(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(p=>p.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let p of d)e.getType().runtime.bin.onUnknownField(e,p.no,p.wireType,p.data)}let o=a.writerFactory(),u=t.field;!u.opt&&!u.repeated&&(u.kind=="enum"||u.kind=="scalar")&&(u=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(u,n,o,a);let l=i.readerFactory(o.finish());for(;l.posr.no==t.field.no)}function bj(e,t){mn(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function _h(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?t[n]!==void 0:e.kind=="enum"?t[n]!==e.T.values[0].no:!Eh(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function Pb(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?Ca(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ba(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Fe.prototype).every(r=>r in e&&typeof e[r]=="function"))return!1;let n=e.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:t===void 0?!0:n.typeName==t.typeName}function vh(e,t){return Ba(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var mVe={"google.protobuf.DoubleValue":fe.DOUBLE,"google.protobuf.FloatValue":fe.FLOAT,"google.protobuf.Int64Value":fe.INT64,"google.protobuf.UInt64Value":fe.UINT64,"google.protobuf.Int32Value":fe.INT32,"google.protobuf.UInt32Value":fe.UINT32,"google.protobuf.BoolValue":fe.BOOL,"google.protobuf.StringValue":fe.STRING,"google.protobuf.BytesValue":fe.BYTES};var Aj={ignoreUnknownFields:!1},Rj={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ppe(e){return e?Object.assign(Object.assign({},Aj),e):Aj}function mpe(e){return e?Object.assign(Object.assign({},Rj),e):Rj}var Dh=Symbol(),Oh=Symbol();function wj(){return{makeReadOptions:ppe,makeWriteOptions:mpe,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${fs(t)}`);r=r!=null?r:new e;let i=new Map,a=n.typeRegistry;for(let[o,u]of Object.entries(t)){let l=e.fields.findJsonName(o);if(l){if(l.oneof){if(u===null&&l.kind=="scalar")continue;let d=i.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${o}"`);i.set(l.oneof,o)}Pj(r,u,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let p=a.findExtension(o.substring(1,o.length-1));if(p&&p.extendee.typeName==e.typeName){d=!0;let[E,I]=Ih(p);Pj(E,u,p.field,n,p),Dj(r,p,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!_h(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!Tpe(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],u=Fj(i,o,t);u!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=u)}let a=t.typeRegistry;if(a!=null&&a.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(e)){let u=a.findExtensionFor(n.typeName,o.no);if(u&&Rb(e,u)){let l=Sj(e,u,t),d=Fj(u.field,l,t);d!==void 0&&(r[u.field.jsonName]=d)}}}catch(a){let o=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,u=a instanceof Error?a.message:String(a);throw new Error(o+(u.length>0?`: ${u}`:""))}return r},readScalar(e,t,n){return Cp(e,t,n!=null?n:La.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||Eh(e,t)))return Sh(e,t)},debug:fs}}function fs(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function Pj(e,t,n,r,i){let a=n.localName;if(n.repeated){if(mn(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let u of t){if(u===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`);switch(n.kind){case"message":o.push(n.T.fromJson(u,r));break;case"enum":let l=Fb(n.T,u,r.ignoreUnknownFields,!0);l!==Oh&&o.push(l);break;case"scalar":try{o.push(Cp(n.T,u,n.L,!0))}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(u)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}}else if(n.kind=="map"){if(t===null)return;if(typeof t!="object"||Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`);let o=e[a];for(let[u,l]of Object.entries(t)){if(l===null)throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);let d;try{d=Npe(n.K,u)}catch(p){let E=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw p instanceof Error&&p.message.length>0&&(E+=`: ${p.message}`),new Error(E)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let p=Fb(n.V.T,l,r.ignoreUnknownFields,!0);p!==Oh&&(o[d]=p);break;case"scalar":try{o[d]=Cp(n.V.T,l,La.BIGINT,!0)}catch(E){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw E instanceof Error&&E.message.length>0&&(I+=`: ${E.message}`),new Error(I)}break}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let o=n.T;if(t===null&&o.typeName!="google.protobuf.Value")return;let u=e[a];Ba(u)?u.fromJson(t,r):(e[a]=u=o.fromJson(t,r),o.fieldWrapper&&!n.oneof&&(e[a]=o.fieldWrapper.unwrapField(u)));break;case"enum":let l=Fb(n.T,t,r.ignoreUnknownFields,!1);switch(l){case Dh:Pb(n,e);break;case Oh:break;default:e[a]=l;break}break;case"scalar":try{let d=Cp(n.T,t,n.L,!1);switch(d){case Dh:Pb(n,e);break;default:e[a]=d;break}}catch(d){let p=`cannot decode field ${i.typeName}.${n.name} from JSON: ${fs(t)}`;throw d instanceof Error&&d.message.length>0&&(p+=`: ${d.message}`),new Error(p)}break}}function Npe(e,t){if(e===fe.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return Cp(e,t,La.BIGINT,!0).toString()}function Cp(e,t,n,r){if(t===null)return r?Ca(e,n):Dh;switch(e){case fe.DOUBLE:case fe.FLOAT:if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==fe.FLOAT&&mh(i),i;case fe.INT32:case fe.FIXED32:case fe.SFIXED32:case fe.SINT32:case fe.UINT32:let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==fe.UINT32||e==fe.FIXED32?Lp(a):gd(a),a;case fe.INT64:case fe.SFIXED64:case fe.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Jn.parse(t);return n?o.toString():o;case fe.FIXED64:case fe.UINT64:if(typeof t!="number"&&typeof t!="string")break;let u=Jn.uParse(t);return n?u.toString():u;case fe.BOOL:if(typeof t!="boolean")break;return t;case fe.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case fe.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return Ab.dec(t)}throw new Error}function Fb(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:Dh;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(i!==void 0)return i.no;if(n)return Oh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${fs(t)}`)}function Tpe(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function Fj(e,t,n){if(e.kind=="map"){mn(typeof t=="object"&&t!=null);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[o,u]of i)r[o.toString()]=Sh(e.V.T,u);break;case"message":for(let[o,u]of i)r[o.toString()]=u.toJson(n);break;case"enum":let a=e.V.T;for(let[o,u]of i)r[o.toString()]=wb(a,u,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){mn(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return Sh(e.T,t);case"enum":return wb(e.T,t,n.enumAsInteger);case"message":return vh(e.T,t).toJson(n)}}function wb(e,t,n){var r;if(mn(typeof t=="number"),e.typeName=="google.protobuf.NullValue")return null;if(n)return t;let i=e.findNumber(t);return(r=i==null?void 0:i.name)!==null&&r!==void 0?r:t}function Sh(e,t){switch(e){case fe.INT32:case fe.SFIXED32:case fe.SINT32:case fe.FIXED32:case fe.UINT32:return mn(typeof t=="number"),t;case fe.FLOAT:case fe.DOUBLE:return mn(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case fe.STRING:return mn(typeof t=="string"),t;case fe.BOOL:return mn(typeof t=="boolean"),t;case fe.UINT64:case fe.FIXED64:case fe.INT64:case fe.SFIXED64:case fe.SINT64:return mn(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case fe.BYTES:return mn(t instanceof Uint8Array),Ab.enc(t)}}m();T();N();var _d=Symbol("@bufbuild/protobuf/unknown-fields"),Lj={readUnknownFields:!0,readerFactory:e=>new yh(e)},Cj={writeUnknownFields:!0,writerFactory:()=>new hh};function Epe(e){return e?Object.assign(Object.assign({},Lj),e):Lj}function hpe(e){return e?Object.assign(Object.assign({},Cj),e):Cj}function Mj(){return{makeReadOptions:Epe,makeWriteOptions:hpe,listUnknownFields(e){var t;return(t=e[_d])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[_d]},writeUnknownFields(e,t){let r=e[_d];if(r)for(let i of r)t.tag(i.no,i.wireType).raw(i.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[_d])||(i[_d]=[]),i[_d].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,u,l;for(;t.pos0&&(l=Ipe),a){let I=e[o];if(r==xn.LengthDelimited&&u!=fe.STRING&&u!=fe.BYTES){let A=t.uint32()+t.pos;for(;t.posBa(I,E)?I:new E(I));else{let I=o[i];E.fieldWrapper?E.typeName==="google.protobuf.BytesValue"?a[i]=Up(I):a[i]=I:a[i]=Ba(I,E)?I:new E(I)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(r=>{let i=t[r.localName],a=n[r.localName];if(r.repeated){if(i.length!==a.length)return!1;switch(r.kind){case"message":return i.every((o,u)=>r.T.equals(o,a[u]));case"scalar":return i.every((o,u)=>qs(r.T,o,a[u]));case"enum":return i.every((o,u)=>qs(fe.INT32,o,a[u]))}throw new Error(`repeated cannot contain ${r.kind}`)}switch(r.kind){case"message":return r.T.equals(i,a);case"enum":return qs(fe.INT32,i,a);case"scalar":return qs(r.T,i,a);case"oneof":if(i.case!==a.case)return!1;let o=r.findField(i.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(i.value,a.value);case"enum":return qs(fe.INT32,i.value,a.value);case"scalar":return qs(o.T,i.value,a.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let u=Object.keys(i).concat(Object.keys(a));switch(r.V.kind){case"message":let l=r.V.T;return u.every(p=>l.equals(i[p],a[p]));case"enum":return u.every(p=>qs(fe.INT32,i[p],a[p]));case"scalar":let d=r.V.T;return u.every(p=>qs(d,i[p],a[p]))}break}})},clone(e){let t=e.getType(),n=new t,r=n;for(let i of t.fields.byMember()){let a=e[i.localName],o;if(i.repeated)o=a.map(Rh);else if(i.kind=="map"){o=r[i.localName];for(let[u,l]of Object.entries(a))o[u]=Rh(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Rh(a.value)}:{case:void 0}:o=Rh(a);r[i.localName]=o}for(let i of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,i.no,i.wireType,i.data);return n}}}function Rh(e){if(e===void 0)return e;if(Ba(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function Up(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Vj(e,t,n){return{syntax:e,json:wj(),bin:Mj(),util:Object.assign(Object.assign({},qj()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return Ej(this,r,i,a)},makeEnum:Nj,makeEnumType:vb,getEnumType:mj,makeExtension(r,i,a){return vj(this,r,i,a)}}}m();T();N();var Ph=class{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){let n={};for(let r of this.list())n[r.jsonName]=n[r.name]=r;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){let n={};for(let r of this.list())n[r.no]=r;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];let t=this.members,n;for(let r of this.list())r.oneof?r.oneof!==n&&(n=r.oneof,t.push(n)):t.push(r)}return this.members}};m();T();N();m();T();N();m();T();N();function Lb(e,t){let n=$j(e);return t?n:Dpe(Spe(n))}function jj(e){return Lb(e,!1)}var Kj=$j;function $j(e){let t=!1,n=[];for(let r=0;r`${e}$`,Spe=e=>Ope.has(e)?Gj(e):e,Dpe=e=>vpe.has(e)?Gj(e):e;var Fh=class{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=jj(t)}addField(t){mn(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;nnew Ph(e,t=>Qj(t,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case"oneof":r[n]={case:void 0};break;case"enum":r[n]=0;break;case"map":r[n]={};break;case"scalar":r[n]=Ca(t.T,t.L);break;case"message":break}}});var vd;(function(e){e[e.OK=0]="OK",e[e.ERR=1]="ERR",e[e.ERR_NOT_FOUND=2]="ERR_NOT_FOUND",e[e.ERR_ALREADY_EXISTS=3]="ERR_ALREADY_EXISTS",e[e.ERR_INVALID_SUBGRAPH_SCHEMA=4]="ERR_INVALID_SUBGRAPH_SCHEMA",e[e.ERR_SUBGRAPH_COMPOSITION_FAILED=5]="ERR_SUBGRAPH_COMPOSITION_FAILED",e[e.ERR_SUBGRAPH_CHECK_FAILED=6]="ERR_SUBGRAPH_CHECK_FAILED",e[e.ERR_INVALID_LABELS=7]="ERR_INVALID_LABELS",e[e.ERR_ANALYTICS_DISABLED=8]="ERR_ANALYTICS_DISABLED",e[e.ERROR_NOT_AUTHENTICATED=9]="ERROR_NOT_AUTHENTICATED",e[e.ERR_OPENAI_DISABLED=10]="ERR_OPENAI_DISABLED",e[e.ERR_FREE_TRIAL_EXPIRED=11]="ERR_FREE_TRIAL_EXPIRED",e[e.ERROR_NOT_AUTHORIZED=12]="ERROR_NOT_AUTHORIZED",e[e.ERR_LIMIT_REACHED=13]="ERR_LIMIT_REACHED",e[e.ERR_DEPLOYMENT_FAILED=14]="ERR_DEPLOYMENT_FAILED",e[e.ERR_INVALID_NAME=15]="ERR_INVALID_NAME",e[e.ERR_UPGRADE_PLAN=16]="ERR_UPGRADE_PLAN",e[e.ERR_BAD_REQUEST=17]="ERR_BAD_REQUEST",e[e.ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL=18]="ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"})(vd||(vd={}));C.util.setEnumType(vd,"wg.cosmo.common.EnumStatusCode",[{no:0,name:"OK"},{no:1,name:"ERR"},{no:2,name:"ERR_NOT_FOUND"},{no:3,name:"ERR_ALREADY_EXISTS"},{no:4,name:"ERR_INVALID_SUBGRAPH_SCHEMA"},{no:5,name:"ERR_SUBGRAPH_COMPOSITION_FAILED"},{no:6,name:"ERR_SUBGRAPH_CHECK_FAILED"},{no:7,name:"ERR_INVALID_LABELS"},{no:8,name:"ERR_ANALYTICS_DISABLED"},{no:9,name:"ERROR_NOT_AUTHENTICATED"},{no:10,name:"ERR_OPENAI_DISABLED"},{no:11,name:"ERR_FREE_TRIAL_EXPIRED"},{no:12,name:"ERROR_NOT_AUTHORIZED"},{no:13,name:"ERR_LIMIT_REACHED"},{no:14,name:"ERR_DEPLOYMENT_FAILED"},{no:15,name:"ERR_INVALID_NAME"},{no:16,name:"ERR_UPGRADE_PLAN"},{no:17,name:"ERR_BAD_REQUEST"},{no:18,name:"ERR_SCHEMA_MISMATCH_WITH_APPROVED_PROPOSAL"}]);var js;(function(e){e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS=0]="GRAPHQL_SUBSCRIPTION_PROTOCOL_WS",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE=1]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE",e[e.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST=2]="GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"})(js||(js={}));C.util.setEnumType(js,"wg.cosmo.common.GraphQLSubscriptionProtocol",[{no:0,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_WS"},{no:1,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE"},{no:2,name:"GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST"}]);var Ks;(function(e){e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO=0]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS=1]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS",e[e.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS=2]="GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"})(Ks||(Ks={}));C.util.setEnumType(Ks,"wg.cosmo.common.GraphQLWebsocketSubprotocol",[{no:0,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO"},{no:1,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS"},{no:2,name:"GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS"}]);var nK=Ni(Ie(),1);m();T();N();var Cb;(function(e){e[e.RENDER_ARGUMENT_DEFAULT=0]="RENDER_ARGUMENT_DEFAULT",e[e.RENDER_ARGUMENT_AS_GRAPHQL_VALUE=1]="RENDER_ARGUMENT_AS_GRAPHQL_VALUE",e[e.RENDER_ARGUMENT_AS_ARRAY_CSV=2]="RENDER_ARGUMENT_AS_ARRAY_CSV"})(Cb||(Cb={}));C.util.setEnumType(Cb,"wg.cosmo.node.v1.ArgumentRenderConfiguration",[{no:0,name:"RENDER_ARGUMENT_DEFAULT"},{no:1,name:"RENDER_ARGUMENT_AS_GRAPHQL_VALUE"},{no:2,name:"RENDER_ARGUMENT_AS_ARRAY_CSV"}]);var zc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(zc||(zc={}));C.util.setEnumType(zc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var xu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(xu||(xu={}));C.util.setEnumType(xu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var kp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.RESOLVE=1]="RESOLVE",e[e.REQUIRES=2]="REQUIRES"})(kp||(kp={}));C.util.setEnumType(kp,"wg.cosmo.node.v1.LookupType",[{no:0,name:"LOOKUP_TYPE_UNSPECIFIED"},{no:1,name:"LOOKUP_TYPE_RESOLVE"},{no:2,name:"LOOKUP_TYPE_REQUIRES"}]);var Mp;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(Mp||(Mp={}));C.util.setEnumType(Mp,"wg.cosmo.node.v1.OperationType",[{no:0,name:"OPERATION_TYPE_UNSPECIFIED"},{no:1,name:"OPERATION_TYPE_QUERY"},{no:2,name:"OPERATION_TYPE_MUTATION"},{no:3,name:"OPERATION_TYPE_SUBSCRIPTION"}]);var eu;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(eu||(eu={}));C.util.setEnumType(eu,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var qu;(function(e){e[e.STATIC_CONFIGURATION_VARIABLE=0]="STATIC_CONFIGURATION_VARIABLE",e[e.ENV_CONFIGURATION_VARIABLE=1]="ENV_CONFIGURATION_VARIABLE",e[e.PLACEHOLDER_CONFIGURATION_VARIABLE=2]="PLACEHOLDER_CONFIGURATION_VARIABLE"})(qu||(qu={}));C.util.setEnumType(qu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Wc;(function(e){e[e.GET=0]="GET",e[e.POST=1]="POST",e[e.PUT=2]="PUT",e[e.DELETE=3]="DELETE",e[e.OPTIONS=4]="OPTIONS"})(Wc||(Wc={}));C.util.setEnumType(Wc,"wg.cosmo.node.v1.HTTPMethod",[{no:0,name:"GET"},{no:1,name:"POST"},{no:2,name:"PUT"},{no:3,name:"DELETE"},{no:4,name:"OPTIONS"}]);var $s=class $s extends Fe{constructor(n){super();g(this,"id","");g(this,"name","");g(this,"routingUrl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $s().fromBinary(n,r)}static fromJson(n,r){return new $s().fromJson(n,r)}static fromJsonString(n,r){return new $s().fromJsonString(n,r)}static equals(n,r){return C.util.equals($s,n,r)}};g($s,"runtime",C),g($s,"typeName","wg.cosmo.node.v1.Subgraph"),g($s,"fields",C.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"routing_url",kind:"scalar",T:9}]));var wh=$s,Gs=class Gs extends Fe{constructor(n){super();g(this,"configByFeatureFlagName",{});C.util.initPartial(n,this)}static fromBinary(n,r){return new Gs().fromBinary(n,r)}static fromJson(n,r){return new Gs().fromJson(n,r)}static fromJsonString(n,r){return new Gs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Gs,n,r)}};g(Gs,"runtime",C),g(Gs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),g(Gs,"fields",C.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:Ub}}]));var Bb=Gs,Qs=class Qs extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Qs().fromBinary(n,r)}static fromJson(n,r){return new Qs().fromJson(n,r)}static fromJsonString(n,r){return new Qs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qs,n,r)}};g(Qs,"runtime",C),g(Qs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),g(Qs,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0}]));var Ub=Qs,Ys=class Ys extends Fe{constructor(n){super();g(this,"engineConfig");g(this,"version","");g(this,"subgraphs",[]);g(this,"featureFlagConfigs");g(this,"compatibilityVersion","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ys().fromBinary(n,r)}static fromJson(n,r){return new Ys().fromJson(n,r)}static fromJsonString(n,r){return new Ys().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ys,n,r)}};g(Ys,"runtime",C),g(Ys,"typeName","wg.cosmo.node.v1.RouterConfig"),g(Ys,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:Od},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:wh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:Bb,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var xp=Ys,Js=class Js extends Fe{constructor(n){super();g(this,"code",vd.OK);g(this,"details");C.util.initPartial(n,this)}static fromBinary(n,r){return new Js().fromBinary(n,r)}static fromJson(n,r){return new Js().fromJson(n,r)}static fromJsonString(n,r){return new Js().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Js,n,r)}};g(Js,"runtime",C),g(Js,"typeName","wg.cosmo.node.v1.Response"),g(Js,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:C.getEnumType(vd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var kb=Js,Hs=class Hs extends Fe{constructor(n){super();g(this,"code",0);g(this,"message","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Hs().fromBinary(n,r)}static fromJson(n,r){return new Hs().fromJson(n,r)}static fromJsonString(n,r){return new Hs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Hs,n,r)}};g(Hs,"runtime",C),g(Hs,"typeName","wg.cosmo.node.v1.ResponseStatus"),g(Hs,"fields",C.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var Yj=Hs,zs=class zs extends Fe{constructor(n){super();g(this,"accountLimits");g(this,"graphPublicKey","");C.util.initPartial(n,this)}static fromBinary(n,r){return new zs().fromBinary(n,r)}static fromJson(n,r){return new zs().fromJson(n,r)}static fromJsonString(n,r){return new zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zs,n,r)}};g(zs,"runtime",C),g(zs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),g(zs,"fields",C.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:xb},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var Mb=zs,Ws=class Ws extends Fe{constructor(n){super();g(this,"traceSamplingRate",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ws().fromBinary(n,r)}static fromJson(n,r){return new Ws().fromJson(n,r)}static fromJsonString(n,r){return new Ws().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ws,n,r)}};g(Ws,"runtime",C),g(Ws,"typeName","wg.cosmo.node.v1.AccountLimits"),g(Ws,"fields",C.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var xb=Ws,Xs=class Xs extends Fe{constructor(t){super(),C.util.initPartial(t,this)}static fromBinary(t,n){return new Xs().fromBinary(t,n)}static fromJson(t,n){return new Xs().fromJson(t,n)}static fromJsonString(t,n){return new Xs().fromJsonString(t,n)}static equals(t,n){return C.util.equals(Xs,t,n)}};g(Xs,"runtime",C),g(Xs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),g(Xs,"fields",C.util.newFieldList(()=>[]));var Jj=Xs,Zs=class Zs extends Fe{constructor(n){super();g(this,"response");g(this,"registrationInfo");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zs().fromBinary(n,r)}static fromJson(n,r){return new Zs().fromJson(n,r)}static fromJsonString(n,r){return new Zs().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zs,n,r)}};g(Zs,"runtime",C),g(Zs,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),g(Zs,"fields",C.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:kb},{no:2,name:"registrationInfo",kind:"message",T:Mb,opt:!0}]));var Hj=Zs,eo=class eo extends Fe{constructor(n){super();g(this,"defaultFlushInterval",Jn.zero);g(this,"datasourceConfigurations",[]);g(this,"fieldConfigurations",[]);g(this,"graphqlSchema","");g(this,"typeConfigurations",[]);g(this,"stringStorage",{});g(this,"graphqlClientSchema");C.util.initPartial(n,this)}static fromBinary(n,r){return new eo().fromBinary(n,r)}static fromJson(n,r){return new eo().fromJson(n,r)}static fromJsonString(n,r){return new eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(eo,n,r)}};g(eo,"runtime",C),g(eo,"typeName","wg.cosmo.node.v1.EngineConfiguration"),g(eo,"fields",C.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:qp,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:Kp,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:qb,repeated:!0},{no:6,name:"string_storage",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"graphql_client_schema",kind:"scalar",T:9,opt:!0}]));var Od=eo,to=class to extends Fe{constructor(n){super();g(this,"kind",xu.STATIC);g(this,"rootNodes",[]);g(this,"childNodes",[]);g(this,"overrideFieldPathFromAlias",!1);g(this,"customGraphql");g(this,"customStatic");g(this,"directives",[]);g(this,"requestTimeoutSeconds",Jn.zero);g(this,"id","");g(this,"keys",[]);g(this,"provides",[]);g(this,"requires",[]);g(this,"customEvents");g(this,"entityInterfaces",[]);g(this,"interfaceObjects",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new to().fromBinary(n,r)}static fromJson(n,r){return new to().fromJson(n,r)}static fromJsonString(n,r){return new to().fromJsonString(n,r)}static equals(n,r){return C.util.equals(to,n,r)}};g(to,"runtime",C),g(to,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),g(to,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(xu)},{no:2,name:"root_nodes",kind:"message",T:Sd,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:Sd,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Qp},{no:6,name:"custom_static",kind:"message",T:Zb},{no:7,name:"directives",kind:"message",T:e0,repeated:!0},{no:8,name:"request_timeout_seconds",kind:"scalar",T:3},{no:9,name:"id",kind:"scalar",T:9},{no:10,name:"keys",kind:"message",T:Hc,repeated:!0},{no:11,name:"provides",kind:"message",T:Hc,repeated:!0},{no:12,name:"requires",kind:"message",T:Hc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Zc},{no:14,name:"entity_interfaces",kind:"message",T:Dd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:Dd,repeated:!0}]));var qp=to,no=class no extends Fe{constructor(n){super();g(this,"name","");g(this,"sourceType",zc.OBJECT_FIELD);C.util.initPartial(n,this)}static fromBinary(n,r){return new no().fromBinary(n,r)}static fromJson(n,r){return new no().fromJson(n,r)}static fromJsonString(n,r){return new no().fromJsonString(n,r)}static equals(n,r){return C.util.equals(no,n,r)}};g(no,"runtime",C),g(no,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),g(no,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:C.getEnumType(zc)}]));var Vp=no,ro=class ro extends Fe{constructor(n){super();g(this,"requiredAndScopes",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new ro().fromBinary(n,r)}static fromJson(n,r){return new ro().fromJson(n,r)}static fromJsonString(n,r){return new ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ro,n,r)}};g(ro,"runtime",C),g(ro,"typeName","wg.cosmo.node.v1.Scopes"),g(ro,"fields",C.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Xc=ro,io=class io extends Fe{constructor(n){super();g(this,"requiresAuthentication",!1);g(this,"requiredOrScopes",[]);g(this,"requiredOrScopesByOr",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new io().fromBinary(n,r)}static fromJson(n,r){return new io().fromJson(n,r)}static fromJsonString(n,r){return new io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(io,n,r)}};g(io,"runtime",C),g(io,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),g(io,"fields",C.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Xc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Xc,repeated:!0}]));var jp=io,ao=class ao extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"argumentsConfiguration",[]);g(this,"authorizationConfiguration");g(this,"subscriptionFilterCondition");C.util.initPartial(n,this)}static fromBinary(n,r){return new ao().fromBinary(n,r)}static fromJson(n,r){return new ao().fromJson(n,r)}static fromJsonString(n,r){return new ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ao,n,r)}};g(ao,"runtime",C),g(ao,"typeName","wg.cosmo.node.v1.FieldConfiguration"),g(ao,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"arguments_configuration",kind:"message",T:Vp,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:jp},{no:5,name:"subscription_filter_condition",kind:"message",T:Vu,opt:!0}]));var Kp=ao,so=class so extends Fe{constructor(n){super();g(this,"typeName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new so().fromBinary(n,r)}static fromJson(n,r){return new so().fromJson(n,r)}static fromJsonString(n,r){return new so().fromJsonString(n,r)}static equals(n,r){return C.util.equals(so,n,r)}};g(so,"runtime",C),g(so,"typeName","wg.cosmo.node.v1.TypeConfiguration"),g(so,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var qb=so,oo=class oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldNames",[]);g(this,"externalFieldNames",[]);g(this,"requireFetchReasonsFieldNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new oo().fromBinary(n,r)}static fromJson(n,r){return new oo().fromJson(n,r)}static fromJsonString(n,r){return new oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(oo,n,r)}};g(oo,"runtime",C),g(oo,"typeName","wg.cosmo.node.v1.TypeField"),g(oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_names",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_field_names",kind:"scalar",T:9,repeated:!0},{no:4,name:"require_fetch_reasons_field_names",kind:"scalar",T:9,repeated:!0}]));var Sd=oo,uo=class uo extends Fe{constructor(n){super();g(this,"fieldName","");g(this,"typeName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new uo().fromBinary(n,r)}static fromJson(n,r){return new uo().fromJson(n,r)}static fromJsonString(n,r){return new uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(uo,n,r)}};g(uo,"runtime",C),g(uo,"typeName","wg.cosmo.node.v1.FieldCoordinates"),g(uo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var $p=uo,co=class co extends Fe{constructor(n){super();g(this,"fieldCoordinatesPath",[]);g(this,"fieldPath",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new co().fromBinary(n,r)}static fromJson(n,r){return new co().fromJson(n,r)}static fromJsonString(n,r){return new co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(co,n,r)}};g(co,"runtime",C),g(co,"typeName","wg.cosmo.node.v1.FieldSetCondition"),g(co,"fields",C.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:$p,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Gp=co,lo=class lo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");g(this,"selectionSet","");g(this,"disableEntityResolver",!1);g(this,"conditions",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new lo().fromBinary(n,r)}static fromJson(n,r){return new lo().fromJson(n,r)}static fromJsonString(n,r){return new lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(lo,n,r)}};g(lo,"runtime",C),g(lo,"typeName","wg.cosmo.node.v1.RequiredField"),g(lo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9},{no:3,name:"selection_set",kind:"scalar",T:9},{no:4,name:"disable_entity_resolver",kind:"scalar",T:8},{no:5,name:"conditions",kind:"message",T:Gp,repeated:!0}]));var Hc=lo,fo=class fo extends Fe{constructor(n){super();g(this,"interfaceTypeName","");g(this,"concreteTypeNames",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new fo().fromBinary(n,r)}static fromJson(n,r){return new fo().fromJson(n,r)}static fromJsonString(n,r){return new fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(fo,n,r)}};g(fo,"runtime",C),g(fo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),g(fo,"fields",C.util.newFieldList(()=>[{no:1,name:"interface_type_name",kind:"scalar",T:9},{no:2,name:"concrete_type_names",kind:"scalar",T:9,repeated:!0}]));var Dd=fo,po=class po extends Fe{constructor(n){super();g(this,"url");g(this,"method",Wc.GET);g(this,"header",{});g(this,"body");g(this,"query",[]);g(this,"urlEncodeBody",!1);g(this,"mtls");g(this,"baseUrl");g(this,"path");g(this,"httpProxyUrl");C.util.initPartial(n,this)}static fromBinary(n,r){return new po().fromBinary(n,r)}static fromJson(n,r){return new po().fromJson(n,r)}static fromJsonString(n,r){return new po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(po,n,r)}};g(po,"runtime",C),g(po,"typeName","wg.cosmo.node.v1.FetchConfiguration"),g(po,"fields",C.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:Qr},{no:2,name:"method",kind:"enum",T:C.getEnumType(Wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:n0}},{no:4,name:"body",kind:"message",T:Qr},{no:5,name:"query",kind:"message",T:t0,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:r0},{no:9,name:"base_url",kind:"message",T:Qr},{no:10,name:"path",kind:"message",T:Qr},{no:11,name:"http_proxy_url",kind:"message",T:Qr,opt:!0}]));var Vb=po,mo=class mo extends Fe{constructor(n){super();g(this,"statusCode",Jn.zero);g(this,"typeName","");g(this,"injectStatusCodeIntoBody",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new mo().fromBinary(n,r)}static fromJson(n,r){return new mo().fromJson(n,r)}static fromJsonString(n,r){return new mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(mo,n,r)}};g(mo,"runtime",C),g(mo,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),g(mo,"fields",C.util.newFieldList(()=>[{no:1,name:"status_code",kind:"scalar",T:3},{no:2,name:"type_name",kind:"scalar",T:9},{no:3,name:"inject_status_code_into_body",kind:"scalar",T:8}]));var zj=mo,No=class No extends Fe{constructor(n){super();g(this,"fetch");g(this,"subscription");g(this,"federation");g(this,"upstreamSchema");g(this,"customScalarTypeFields",[]);g(this,"grpc");C.util.initPartial(n,this)}static fromBinary(n,r){return new No().fromBinary(n,r)}static fromJson(n,r){return new No().fromJson(n,r)}static fromJsonString(n,r){return new No().fromJsonString(n,r)}static equals(n,r){return C.util.equals(No,n,r)}};g(No,"runtime",C),g(No,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),g(No,"fields",C.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:Vb},{no:2,name:"subscription",kind:"message",T:i0},{no:3,name:"federation",kind:"message",T:a0},{no:4,name:"upstream_schema",kind:"message",T:Zp},{no:6,name:"custom_scalar_type_fields",kind:"message",T:s0,repeated:!0},{no:7,name:"grpc",kind:"message",T:bd}]));var Qp=No,To=class To extends Fe{constructor(n){super();g(this,"mapping");g(this,"protoSchema","");g(this,"plugin");C.util.initPartial(n,this)}static fromBinary(n,r){return new To().fromBinary(n,r)}static fromJson(n,r){return new To().fromJson(n,r)}static fromJsonString(n,r){return new To().fromJsonString(n,r)}static equals(n,r){return C.util.equals(To,n,r)}};g(To,"runtime",C),g(To,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),g(To,"fields",C.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:Kb},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Yp}]));var bd=To,Eo=class Eo extends Fe{constructor(n){super();g(this,"repository","");g(this,"reference","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Eo().fromBinary(n,r)}static fromJson(n,r){return new Eo().fromJson(n,r)}static fromJsonString(n,r){return new Eo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Eo,n,r)}};g(Eo,"runtime",C),g(Eo,"typeName","wg.cosmo.node.v1.ImageReference"),g(Eo,"fields",C.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var jb=Eo,ho=class ho extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");g(this,"imageReference");C.util.initPartial(n,this)}static fromBinary(n,r){return new ho().fromBinary(n,r)}static fromJson(n,r){return new ho().fromJson(n,r)}static fromJsonString(n,r){return new ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ho,n,r)}};g(ho,"runtime",C),g(ho,"typeName","wg.cosmo.node.v1.PluginConfiguration"),g(ho,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"image_reference",kind:"message",T:jb,opt:!0}]));var Yp=ho,yo=class yo extends Fe{constructor(n){super();g(this,"enabled",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new yo().fromBinary(n,r)}static fromJson(n,r){return new yo().fromJson(n,r)}static fromJsonString(n,r){return new yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(yo,n,r)}};g(yo,"runtime",C),g(yo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),g(yo,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var Wj=yo,Io=class Io extends Fe{constructor(n){super();g(this,"version",0);g(this,"service","");g(this,"operationMappings",[]);g(this,"entityMappings",[]);g(this,"typeFieldMappings",[]);g(this,"enumMappings",[]);g(this,"resolveMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Io().fromBinary(n,r)}static fromJson(n,r){return new Io().fromJson(n,r)}static fromJsonString(n,r){return new Io().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Io,n,r)}};g(Io,"runtime",C),g(Io,"typeName","wg.cosmo.node.v1.GRPCMapping"),g(Io,"fields",C.util.newFieldList(()=>[{no:1,name:"version",kind:"scalar",T:5},{no:2,name:"service",kind:"scalar",T:9},{no:3,name:"operation_mappings",kind:"message",T:Qb,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:Yb,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:Hb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:Wb,repeated:!0},{no:7,name:"resolve_mappings",kind:"message",T:$b,repeated:!0}]));var Kb=Io,go=class go extends Fe{constructor(n){super();g(this,"type",kp.UNSPECIFIED);g(this,"lookupMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new go().fromBinary(n,r)}static fromJson(n,r){return new go().fromJson(n,r)}static fromJsonString(n,r){return new go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(go,n,r)}};g(go,"runtime",C),g(go,"typeName","wg.cosmo.node.v1.LookupMapping"),g(go,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(kp)},{no:2,name:"lookup_mapping",kind:"message",T:Gb},{no:3,name:"rpc",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var $b=go,_o=class _o extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMapping");C.util.initPartial(n,this)}static fromBinary(n,r){return new _o().fromBinary(n,r)}static fromJson(n,r){return new _o().fromJson(n,r)}static fromJsonString(n,r){return new _o().fromJsonString(n,r)}static equals(n,r){return C.util.equals(_o,n,r)}};g(_o,"runtime",C),g(_o,"typeName","wg.cosmo.node.v1.LookupFieldMapping"),g(_o,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mapping",kind:"message",T:Jp}]));var Gb=_o,vo=class vo extends Fe{constructor(n){super();g(this,"type",Mp.UNSPECIFIED);g(this,"original","");g(this,"mapped","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new vo().fromBinary(n,r)}static fromJson(n,r){return new vo().fromJson(n,r)}static fromJsonString(n,r){return new vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(vo,n,r)}};g(vo,"runtime",C),g(vo,"typeName","wg.cosmo.node.v1.OperationMapping"),g(vo,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:C.getEnumType(Mp)},{no:2,name:"original",kind:"scalar",T:9},{no:3,name:"mapped",kind:"scalar",T:9},{no:4,name:"request",kind:"scalar",T:9},{no:5,name:"response",kind:"scalar",T:9}]));var Qb=vo,Oo=class Oo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"kind","");g(this,"key","");g(this,"rpc","");g(this,"request","");g(this,"response","");g(this,"requiredFieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Oo().fromBinary(n,r)}static fromJson(n,r){return new Oo().fromJson(n,r)}static fromJsonString(n,r){return new Oo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Oo,n,r)}};g(Oo,"runtime",C),g(Oo,"typeName","wg.cosmo.node.v1.EntityMapping"),g(Oo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"kind",kind:"scalar",T:9},{no:3,name:"key",kind:"scalar",T:9},{no:4,name:"rpc",kind:"scalar",T:9},{no:5,name:"request",kind:"scalar",T:9},{no:6,name:"response",kind:"scalar",T:9},{no:7,name:"required_field_mappings",kind:"message",T:Jb,repeated:!0}]));var Yb=Oo,So=class So extends Fe{constructor(n){super();g(this,"fieldMapping");g(this,"rpc","");g(this,"request","");g(this,"response","");C.util.initPartial(n,this)}static fromBinary(n,r){return new So().fromBinary(n,r)}static fromJson(n,r){return new So().fromJson(n,r)}static fromJsonString(n,r){return new So().fromJsonString(n,r)}static equals(n,r){return C.util.equals(So,n,r)}};g(So,"runtime",C),g(So,"typeName","wg.cosmo.node.v1.RequiredFieldMapping"),g(So,"fields",C.util.newFieldList(()=>[{no:1,name:"field_mapping",kind:"message",T:Jp},{no:2,name:"rpc",kind:"scalar",T:9},{no:3,name:"request",kind:"scalar",T:9},{no:4,name:"response",kind:"scalar",T:9}]));var Jb=So,Do=class Do extends Fe{constructor(n){super();g(this,"type","");g(this,"fieldMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Do().fromBinary(n,r)}static fromJson(n,r){return new Do().fromJson(n,r)}static fromJsonString(n,r){return new Do().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Do,n,r)}};g(Do,"runtime",C),g(Do,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),g(Do,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:Jp,repeated:!0}]));var Hb=Do,bo=class bo extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");g(this,"argumentMappings",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new bo().fromBinary(n,r)}static fromJson(n,r){return new bo().fromJson(n,r)}static fromJsonString(n,r){return new bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(bo,n,r)}};g(bo,"runtime",C),g(bo,"typeName","wg.cosmo.node.v1.FieldMapping"),g(bo,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9},{no:3,name:"argument_mappings",kind:"message",T:zb,repeated:!0}]));var Jp=bo,Ao=class Ao extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ao().fromBinary(n,r)}static fromJson(n,r){return new Ao().fromJson(n,r)}static fromJsonString(n,r){return new Ao().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ao,n,r)}};g(Ao,"runtime",C),g(Ao,"typeName","wg.cosmo.node.v1.ArgumentMapping"),g(Ao,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var zb=Ao,Ro=class Ro extends Fe{constructor(n){super();g(this,"type","");g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Ro().fromBinary(n,r)}static fromJson(n,r){return new Ro().fromJson(n,r)}static fromJsonString(n,r){return new Ro().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ro,n,r)}};g(Ro,"runtime",C),g(Ro,"typeName","wg.cosmo.node.v1.EnumMapping"),g(Ro,"fields",C.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:Xb,repeated:!0}]));var Wb=Ro,Po=class Po extends Fe{constructor(n){super();g(this,"original","");g(this,"mapped","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Po().fromBinary(n,r)}static fromJson(n,r){return new Po().fromJson(n,r)}static fromJsonString(n,r){return new Po().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Po,n,r)}};g(Po,"runtime",C),g(Po,"typeName","wg.cosmo.node.v1.EnumValueMapping"),g(Po,"fields",C.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var Xb=Po,Fo=class Fo extends Fe{constructor(n){super();g(this,"consumerName","");g(this,"streamName","");g(this,"consumerInactiveThreshold",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Fo().fromBinary(n,r)}static fromJson(n,r){return new Fo().fromJson(n,r)}static fromJsonString(n,r){return new Fo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Fo,n,r)}};g(Fo,"runtime",C),g(Fo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),g(Fo,"fields",C.util.newFieldList(()=>[{no:1,name:"consumer_name",kind:"scalar",T:9},{no:2,name:"stream_name",kind:"scalar",T:9},{no:3,name:"consumer_inactive_threshold",kind:"scalar",T:5}]));var Hp=Fo,wo=class wo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"subjects",[]);g(this,"streamConfiguration");C.util.initPartial(n,this)}static fromBinary(n,r){return new wo().fromBinary(n,r)}static fromJson(n,r){return new wo().fromJson(n,r)}static fromJsonString(n,r){return new wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(wo,n,r)}};g(wo,"runtime",C),g(wo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),g(wo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:Hp}]));var zp=wo,Lo=class Lo extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"topics",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Lo().fromBinary(n,r)}static fromJson(n,r){return new Lo().fromJson(n,r)}static fromJsonString(n,r){return new Lo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Lo,n,r)}};g(Lo,"runtime",C),g(Lo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),g(Lo,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Wp=Lo,Co=class Co extends Fe{constructor(n){super();g(this,"engineEventConfiguration");g(this,"channels",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Co().fromBinary(n,r)}static fromJson(n,r){return new Co().fromJson(n,r)}static fromJsonString(n,r){return new Co().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Co,n,r)}};g(Co,"runtime",C),g(Co,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),g(Co,"fields",C.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:tu},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var Xp=Co,Bo=class Bo extends Fe{constructor(n){super();g(this,"providerId","");g(this,"type",eu.PUBLISH);g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Bo().fromBinary(n,r)}static fromJson(n,r){return new Bo().fromJson(n,r)}static fromJsonString(n,r){return new Bo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Bo,n,r)}};g(Bo,"runtime",C),g(Bo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),g(Bo,"fields",C.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:C.getEnumType(eu)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var tu=Bo,Uo=class Uo extends Fe{constructor(n){super();g(this,"nats",[]);g(this,"kafka",[]);g(this,"redis",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Uo().fromBinary(n,r)}static fromJson(n,r){return new Uo().fromJson(n,r)}static fromJsonString(n,r){return new Uo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Uo,n,r)}};g(Uo,"runtime",C),g(Uo,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),g(Uo,"fields",C.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:zp,repeated:!0},{no:2,name:"kafka",kind:"message",T:Wp,repeated:!0},{no:3,name:"redis",kind:"message",T:Xp,repeated:!0}]));var Zc=Uo,ko=class ko extends Fe{constructor(n){super();g(this,"data");C.util.initPartial(n,this)}static fromBinary(n,r){return new ko().fromBinary(n,r)}static fromJson(n,r){return new ko().fromJson(n,r)}static fromJsonString(n,r){return new ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(ko,n,r)}};g(ko,"runtime",C),g(ko,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),g(ko,"fields",C.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:Qr}]));var Zb=ko,Mo=class Mo extends Fe{constructor(n){super();g(this,"kind",qu.STATIC_CONFIGURATION_VARIABLE);g(this,"staticVariableContent","");g(this,"environmentVariableName","");g(this,"environmentVariableDefaultValue","");g(this,"placeholderVariableName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Mo().fromBinary(n,r)}static fromJson(n,r){return new Mo().fromJson(n,r)}static fromJsonString(n,r){return new Mo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Mo,n,r)}};g(Mo,"runtime",C),g(Mo,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),g(Mo,"fields",C.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:C.getEnumType(qu)},{no:2,name:"static_variable_content",kind:"scalar",T:9},{no:3,name:"environment_variable_name",kind:"scalar",T:9},{no:4,name:"environment_variable_default_value",kind:"scalar",T:9},{no:5,name:"placeholder_variable_name",kind:"scalar",T:9}]));var Qr=Mo,xo=class xo extends Fe{constructor(n){super();g(this,"directiveName","");g(this,"renameTo","");C.util.initPartial(n,this)}static fromBinary(n,r){return new xo().fromBinary(n,r)}static fromJson(n,r){return new xo().fromJson(n,r)}static fromJsonString(n,r){return new xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(xo,n,r)}};g(xo,"runtime",C),g(xo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),g(xo,"fields",C.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var e0=xo,qo=class qo extends Fe{constructor(n){super();g(this,"name","");g(this,"value","");C.util.initPartial(n,this)}static fromBinary(n,r){return new qo().fromBinary(n,r)}static fromJson(n,r){return new qo().fromJson(n,r)}static fromJsonString(n,r){return new qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(qo,n,r)}};g(qo,"runtime",C),g(qo,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),g(qo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var t0=qo,Vo=class Vo extends Fe{constructor(n){super();g(this,"values",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Vo().fromBinary(n,r)}static fromJson(n,r){return new Vo().fromJson(n,r)}static fromJsonString(n,r){return new Vo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Vo,n,r)}};g(Vo,"runtime",C),g(Vo,"typeName","wg.cosmo.node.v1.HTTPHeader"),g(Vo,"fields",C.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:Qr,repeated:!0}]));var n0=Vo,jo=class jo extends Fe{constructor(n){super();g(this,"key");g(this,"cert");g(this,"insecureSkipVerify",!1);C.util.initPartial(n,this)}static fromBinary(n,r){return new jo().fromBinary(n,r)}static fromJson(n,r){return new jo().fromJson(n,r)}static fromJsonString(n,r){return new jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(jo,n,r)}};g(jo,"runtime",C),g(jo,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),g(jo,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:Qr},{no:2,name:"cert",kind:"message",T:Qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var r0=jo,Ko=class Ko extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"url");g(this,"useSSE");g(this,"protocol");g(this,"websocketSubprotocol");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ko().fromBinary(n,r)}static fromJson(n,r){return new Ko().fromJson(n,r)}static fromJsonString(n,r){return new Ko().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ko,n,r)}};g(Ko,"runtime",C),g(Ko,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),g(Ko,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:Qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:C.getEnumType(js),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:C.getEnumType(Ks),opt:!0}]));var i0=Ko,$o=class $o extends Fe{constructor(n){super();g(this,"enabled",!1);g(this,"serviceSdl","");C.util.initPartial(n,this)}static fromBinary(n,r){return new $o().fromBinary(n,r)}static fromJson(n,r){return new $o().fromJson(n,r)}static fromJsonString(n,r){return new $o().fromJsonString(n,r)}static equals(n,r){return C.util.equals($o,n,r)}};g($o,"runtime",C),g($o,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),g($o,"fields",C.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var a0=$o,Go=class Go extends Fe{constructor(n){super();g(this,"key","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Go().fromBinary(n,r)}static fromJson(n,r){return new Go().fromJson(n,r)}static fromJsonString(n,r){return new Go().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Go,n,r)}};g(Go,"runtime",C),g(Go,"typeName","wg.cosmo.node.v1.InternedString"),g(Go,"fields",C.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var Zp=Go,Qo=class Qo extends Fe{constructor(n){super();g(this,"typeName","");g(this,"fieldName","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Qo().fromBinary(n,r)}static fromJson(n,r){return new Qo().fromJson(n,r)}static fromJsonString(n,r){return new Qo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Qo,n,r)}};g(Qo,"runtime",C),g(Qo,"typeName","wg.cosmo.node.v1.SingleTypeField"),g(Qo,"fields",C.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var s0=Qo,Yo=class Yo extends Fe{constructor(n){super();g(this,"fieldPath",[]);g(this,"json","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Yo().fromBinary(n,r)}static fromJson(n,r){return new Yo().fromJson(n,r)}static fromJsonString(n,r){return new Yo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Yo,n,r)}};g(Yo,"runtime",C),g(Yo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),g(Yo,"fields",C.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var em=Yo,aa=class aa extends Fe{constructor(n){super();g(this,"and",[]);g(this,"in");g(this,"not");g(this,"or",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new aa().fromBinary(n,r)}static fromJson(n,r){return new aa().fromJson(n,r)}static fromJsonString(n,r){return new aa().fromJsonString(n,r)}static equals(n,r){return C.util.equals(aa,n,r)}};g(aa,"runtime",C),g(aa,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),g(aa,"fields",C.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:aa,repeated:!0},{no:2,name:"in",kind:"message",T:em,opt:!0},{no:3,name:"not",kind:"message",T:aa,opt:!0},{no:4,name:"or",kind:"message",T:aa,repeated:!0}]));var Vu=aa,Jo=class Jo extends Fe{constructor(n){super();g(this,"operations",[]);C.util.initPartial(n,this)}static fromBinary(n,r){return new Jo().fromBinary(n,r)}static fromJson(n,r){return new Jo().fromJson(n,r)}static fromJsonString(n,r){return new Jo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Jo,n,r)}};g(Jo,"runtime",C),g(Jo,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),g(Jo,"fields",C.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:o0,repeated:!0}]));var Xj=Jo,Ho=class Ho extends Fe{constructor(n){super();g(this,"request");g(this,"client");C.util.initPartial(n,this)}static fromBinary(n,r){return new Ho().fromBinary(n,r)}static fromJson(n,r){return new Ho().fromJson(n,r)}static fromJsonString(n,r){return new Ho().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Ho,n,r)}};g(Ho,"runtime",C),g(Ho,"typeName","wg.cosmo.node.v1.Operation"),g(Ho,"fields",C.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:u0},{no:2,name:"client",kind:"message",T:d0}]));var o0=Ho,zo=class zo extends Fe{constructor(n){super();g(this,"operationName","");g(this,"query","");g(this,"extensions");C.util.initPartial(n,this)}static fromBinary(n,r){return new zo().fromBinary(n,r)}static fromJson(n,r){return new zo().fromJson(n,r)}static fromJsonString(n,r){return new zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(zo,n,r)}};g(zo,"runtime",C),g(zo,"typeName","wg.cosmo.node.v1.OperationRequest"),g(zo,"fields",C.util.newFieldList(()=>[{no:1,name:"operation_name",kind:"scalar",T:9},{no:2,name:"query",kind:"scalar",T:9},{no:3,name:"extensions",kind:"message",T:c0}]));var u0=zo,Wo=class Wo extends Fe{constructor(n){super();g(this,"persistedQuery");C.util.initPartial(n,this)}static fromBinary(n,r){return new Wo().fromBinary(n,r)}static fromJson(n,r){return new Wo().fromJson(n,r)}static fromJsonString(n,r){return new Wo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Wo,n,r)}};g(Wo,"runtime",C),g(Wo,"typeName","wg.cosmo.node.v1.Extension"),g(Wo,"fields",C.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:l0}]));var c0=Wo,Xo=class Xo extends Fe{constructor(n){super();g(this,"sha256Hash","");g(this,"version",0);C.util.initPartial(n,this)}static fromBinary(n,r){return new Xo().fromBinary(n,r)}static fromJson(n,r){return new Xo().fromJson(n,r)}static fromJsonString(n,r){return new Xo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Xo,n,r)}};g(Xo,"runtime",C),g(Xo,"typeName","wg.cosmo.node.v1.PersistedQuery"),g(Xo,"fields",C.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var l0=Xo,Zo=class Zo extends Fe{constructor(n){super();g(this,"name","");g(this,"version","");C.util.initPartial(n,this)}static fromBinary(n,r){return new Zo().fromBinary(n,r)}static fromJson(n,r){return new Zo().fromJson(n,r)}static fromJsonString(n,r){return new Zo().fromJsonString(n,r)}static equals(n,r){return C.util.equals(Zo,n,r)}};g(Zo,"runtime",C),g(Zo,"typeName","wg.cosmo.node.v1.ClientInfo"),g(Zo,"fields",C.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var d0=Zo;m();T();N();function f0(e){return new Error(`Normalization failed to return a ${e}.`)}function Zj(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var Ad=Ni(dh(),1);function bpe(e){if(!e.conditions)return;let t=[];for(let n of e.conditions){let r=[];for(let i of n.fieldCoordinatesPath){let a=i.split(".");if(a.length!==2)throw new Error(`fatal: malformed conditional field coordinates "${i}" for field set "${e.selectionSet}".`);r.push(new $p({fieldName:a[1],typeName:a[0]}))}t.push(new Gp({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function p0(e,t,n){if(e)for(let r of e){let i=bpe(r);t.push(new Hc(k(k({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function m0(e){switch(e){case"publish":return eu.PUBLISH;case"request":return eu.REQUEST;case"subscribe":return eu.SUBSCRIBE}}function eK(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Zc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new Sd({fieldNames:a,typeName:i});if(r.externalFieldNames&&r.externalFieldNames.size>0&&(o.externalFieldNames=[...r.externalFieldNames]),r.requireFetchReasonsFieldNames&&r.requireFetchReasonsFieldNames.length>0&&(o.requireFetchReasonsFieldNames=[...r.requireFetchReasonsFieldNames]),r.isRootNode?t.rootNodes.push(o):t.childNodes.push(o),r.entityInterfaceConcreteTypeNames){let p=new Dd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(p):t.entityInterfaces.push(p)}p0(r.keys,t.keys,i),p0(r.provides,t.provides,i),p0(r.requires,t.requires,i);let u=[],l=[],d=[];for(let p of(n=r.events)!=null?n:[])switch(p.providerType){case Ad.PROVIDER_TYPE_KAFKA:{l.push(new Wp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),topics:p.topics}));break}case Ad.PROVIDER_TYPE_NATS:{u.push(new zp(k({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),subjects:p.subjects},p.streamConfiguration?{streamConfiguration:new Hp({consumerInactiveThreshold:p.streamConfiguration.consumerInactiveThreshold,consumerName:p.streamConfiguration.consumerName,streamName:p.streamConfiguration.streamName})}:{})));break}case Ad.PROVIDER_TYPE_REDIS:{d.push(new Xp({engineEventConfiguration:new tu({fieldName:p.fieldName,providerId:p.providerId,type:m0(p.type),typeName:i}),channels:p.channels}));break}default:throw new Error("Fatal: Unknown event provider.")}t.events.nats.push(...u),t.events.kafka.push(...l),t.events.redis.push(...d)}return t}function tK(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(p=>new Vp({name:p,sourceType:zc.FIELD_ARGUMENT})),o=new Kp({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),u=((n=i.requiredScopes)==null?void 0:n.map(p=>new Xc({requiredAndScopes:p})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(p=>new Xc({requiredAndScopes:p})))||[],d=u.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new jp({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:u,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let p=new Vu;Lh(p,i.subscriptionFilterCondition),o.subscriptionFilterCondition=p}t.push(o)}return t}function Lh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Vu;Lh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new em({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Vu,Lh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Vu;Lh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var el;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(el||(el={}));var Ape=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new Zp({key:n})},Rpe=e=>{switch(e){case"ws":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return js.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Ppe=e=>{switch(e){case"auto":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return Ks.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},rK=function(e){if(!Rd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw Zj(e.routerCompatibilityVersion);let t=new Od({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw f0("ConfigurationDataByTypeName");if(!n.schema)throw f0("GraphQLSchema");let r={enabled:!0},i=Ape(t,cj((0,nK.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:u,interfaceObjects:l,keys:d,provides:p,requires:E,rootNodes:I}=eK(n.configurationDataByTypeName),v;switch(n.kind){case el.Standard:{r.enabled=!0,r.protocol=Rpe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Ppe(n.websocketSubprotocol||"auto"),r.url=new Qr({kind:qu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case el.Plugin:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Yp({name:n.name,version:n.version,imageReference:n.imageReference})});break}case el.GRPC:{v=new bd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let A,U,j;if(u.kafka.length>0||u.nats.length>0||u.redis.length>0){A=xu.PUBSUB,j=new Zc({kafka:u.kafka,nats:u.nats,redis:u.redis});let ee=le=>Rd.ROOT_TYPE_NAMES.has(le.typeName),ne=0,pe=0;for(;ne({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${Rd.COMPOSITION_VERSION}`})};m();T();N();var nl=Ni(Ie());function iK(e){let t;try{t=(0,nl.parse)(e.schema)}catch(n){throw new Error(`could not parse schema for Graph ${e.name}: ${n}`)}return{definitions:t,name:e.name,url:e.url}}function Fpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(iK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(n=>n.message).join(", ")}`);return{fieldConfigurations:t.fieldConfigurations,sdl:(0,nl.print)(t.federatedGraphAST)}}function wpe(e){let t=(0,tl.federateSubgraphs)({subgraphs:e.map(iK),version:tl.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return rK({federatedClientSDL:(0,nl.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,nl.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:tl.LATEST_ROUTER_COMPATIBILITY_VERSION,schemaVersionId:"",subgraphs:e.map((r,i)=>{var l,d;let a=t.subgraphConfigBySubgraphName.get(r.name),o=a==null?void 0:a.schema,u=a==null?void 0:a.configurationDataByTypeName;return{kind:el.Standard,id:`${i}`,name:r.name,url:yb(r.url),sdl:r.schema,subscriptionUrl:yb((l=r.subscription_url)!=null?l:r.url),subscriptionProtocol:(d=r.subscription_protocol)!=null?d:"ws",websocketSubprotocol:r.subscription_protocol==="ws"?r.websocketSubprotocol||"auto":void 0,schema:o,configurationDataByTypeName:u}})}).toJsonString()}return Gm(Lpe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index 86c4d649ae..6530d545f7 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -6,6 +6,7 @@ export class Edge { edgeName: string; id: number; isAbstractEdge: boolean; + isExternal = false; isInaccessible = false; node: GraphNode; visitedIndices = new Set(); @@ -16,6 +17,10 @@ export class Edge { this.isAbstractEdge = isAbstractEdge; this.node = node; } + + isEdgeInaccessible(): boolean { + return this.isInaccessible || this.node.isInaccessible; + } } export type GraphNodeOptions = { @@ -24,6 +29,7 @@ export type GraphNodeOptions = { }; export class GraphNode { + externalFieldSets = new Set(); fieldDataByName = new Map(); headToTailEdges = new Map(); entityEdges = new Array(); @@ -79,7 +85,6 @@ export class GraphNode { export class RootNode { fieldDataByName = new Map(); headToSharedTailEdges = new Map>(); - // It is used isAbstract = false; isRootNode = true; typeName: TypeName; diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index 6755016c08..17ebe9d90b 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -117,6 +117,10 @@ export class Graph { } node.hasEntitySiblings = true; for (const fieldSet of node.satisfiedFieldSets) { + // If the field set is unresolvable in the entity's own subgraph, it cannot be used to jump to other subgraphs. + if (node.externalFieldSets.has(fieldSet)) { + continue; + } const subgraphNames = entityDataNode.targetSubgraphNamesByFieldSet.get(fieldSet); for (const subgraphName of subgraphNames ?? []) { // A subgraph should not jump to itself @@ -141,6 +145,7 @@ export class Graph { entityNodeName, relativeOriginPaths, resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities, }: VisitEntityParams) { @@ -159,6 +164,7 @@ export class Graph { relativeOriginPaths, resDataByNodeName: this.resDataByNodeName, resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities, }); @@ -194,6 +200,7 @@ export class Graph { selectionPath: selectionPath, }), resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities, }); @@ -248,6 +255,7 @@ export class Graph { } } } + return { success: true, }; @@ -312,6 +320,7 @@ export class Graph { } validateSharedRootFieldEntities({ rootFieldData, walker }: ValidateEntitiesParams): ValidationResult { + const resolvedPaths = new Set(); for (const [pathFromRoot, entityNodeNames] of walker.entityNodeNamesByPath) { const subgraphNameByUnresolvablePath = new Map(); // Shared fields are unique contexts, so the resolution data cannot be reused. @@ -324,6 +333,7 @@ export class Graph { encounteredEntityNodeNames: new Set(), entityNodeName, resDataByRelativeOriginPath: resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities: new Set(), }); @@ -375,6 +385,7 @@ export class Graph { success: false, }; } + if (walker.unresolvablePaths.size > 0) { return { errors: generateRootResolvabilityErrors({ @@ -385,12 +396,14 @@ export class Graph { success: false, }; } + return { success: true, }; } validateRootFieldEntities({ rootFieldData, walker }: ValidateEntitiesParams): ValidationResult { + const resolvedPaths = new Set(); for (const [entityNodeName, entityPaths] of walker.pathsByEntityNodeName) { const subgraphNameByUnresolvablePath = new Map(); if (this.resDataByNodeName.has(entityNodeName)) { @@ -405,6 +418,7 @@ export class Graph { encounteredEntityNodeNames: new Set(), entityNodeName, resDataByRelativeOriginPath: resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities: getValueOrDefault( this.visitedEntitiesByOriginEntity, @@ -416,6 +430,7 @@ export class Graph { if (subgraphNameByUnresolvablePath.size < 1) { continue; } + return { errors: this.getEntityResolvabilityErrors({ entityNodeName, diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts index d05560aa94..af1344f825 100644 --- a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -1,7 +1,7 @@ import { GraphFieldData } from '../../utils/types'; import { unexpectedEdgeFatalError } from '../../errors/errors'; import { FieldName } from '../types/types'; -import { NodeResolutionDataParams } from './types/params'; +import { AddExternalSubgraphNameParams, NodeResolutionDataParams } from './types/params'; export class NodeResolutionData { #isResolved = false; @@ -24,11 +24,11 @@ export class NodeResolutionData { this.typeName = typeName; } - addData(data: NodeResolutionData) { - for (const fieldName of data.resolvedFieldNames) { + addData({ resolvedDescendantNames, resolvedFieldNames }: NodeResolutionData) { + for (const fieldName of resolvedFieldNames) { this.addResolvedFieldName(fieldName); } - for (const fieldName of data.resolvedDescendantNames) { + for (const fieldName of resolvedDescendantNames) { this.resolvedDescendantNames.add(fieldName); } } @@ -40,6 +40,14 @@ export class NodeResolutionData { this.resolvedFieldNames.add(fieldName); } + addExternalSubgraphName({ fieldName, subgraphName }: AddExternalSubgraphNameParams) { + const fieldData = this.fieldDataByName.get(fieldName); + if (!fieldData) { + throw unexpectedEdgeFatalError(this.typeName, [fieldName]); + } + fieldData.externalSubgraphNames.add(subgraphName); + } + copy(): NodeResolutionData { return new NodeResolutionData({ // Only used for reading, so just a shallow copy. diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts index 83f144a185..7fa339ebdf 100644 --- a/composition/src/resolvability-graph/node-resolution-data/types/params.ts +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -1,4 +1,4 @@ -import { FieldName, TypeName } from '../../types/types'; +import { FieldName, SubgraphName, TypeName } from '../../types/types'; import { GraphFieldData } from '../../../utils/types'; export type NodeResolutionDataParams = { @@ -8,3 +8,8 @@ export type NodeResolutionDataParams = { resolvedDescendantNames?: Set; resolvedFieldNames?: Set; }; + +export type AddExternalSubgraphNameParams = { + fieldName: FieldName; + subgraphName: SubgraphName; +}; diff --git a/composition/src/resolvability-graph/types/params.ts b/composition/src/resolvability-graph/types/params.ts index 7b807b09b6..7f6a4b9c09 100644 --- a/composition/src/resolvability-graph/types/params.ts +++ b/composition/src/resolvability-graph/types/params.ts @@ -7,6 +7,7 @@ export type VisitEntityParams = { encounteredEntityNodeNames: Set; entityNodeName: NodeName; resDataByRelativeOriginPath: Map; + resolvedPaths: Set; subgraphNameByUnresolvablePath: Map; visitedEntities: Set; relativeOriginPaths?: Set; diff --git a/composition/src/resolvability-graph/types/types.ts b/composition/src/resolvability-graph/types/types.ts index d35afb2453..7bd5150a51 100644 --- a/composition/src/resolvability-graph/types/types.ts +++ b/composition/src/resolvability-graph/types/types.ts @@ -1,6 +1,7 @@ export type VisitNodeResult = { visited: boolean; areDescendantsResolved: boolean; + isExternal?: true; isRevisitedNode?: true; }; diff --git a/composition/src/resolvability-graph/utils/utils.ts b/composition/src/resolvability-graph/utils/utils.ts index c9dfa73385..49ef3aad97 100644 --- a/composition/src/resolvability-graph/utils/utils.ts +++ b/composition/src/resolvability-graph/utils/utils.ts @@ -15,10 +15,11 @@ import { SelectionSetSegments } from './types/types'; import { LITERAL_SPACE, QUOTATION_JOIN } from '../constants/string-constants'; export type UnresolvableFieldData = { - fieldName: string; + externalSubgraphNames: Set; + fieldName: FieldName; selectionSet: string; - subgraphNames: Set; - typeName: string; + subgraphNames: Set; + typeName: TypeName; }; export function newRootFieldData( @@ -55,13 +56,25 @@ export function generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData, }: GenerateResolvabilityErrorReasonsParams): Array { - const { fieldName, typeName, subgraphNames } = unresolvableFieldData; - const reasons: Array = [ - rootFieldData.message, - `The field "${typeName}.${fieldName}" is defined in the following subgraph` + - (subgraphNames.size > 1 ? `s` : ``) + - `: "${[...subgraphNames].join(QUOTATION_JOIN)}".`, - ]; + const { externalSubgraphNames, fieldName, typeName, subgraphNames } = unresolvableFieldData; + const reasons: Array = [rootFieldData.message]; + if (externalSubgraphNames.size > 0) { + const nonExternalSubgraphNames = subgraphNames.difference(externalSubgraphNames); + reasons.push( + `The field "${typeName}.${fieldName}" is defined (and resolvable) in the following subgraph` + + (nonExternalSubgraphNames.size > 1 ? `s` : ``) + + `: "${[...nonExternalSubgraphNames].join(QUOTATION_JOIN)}".`, + `The field "${typeName}.${fieldName}" is defined "@external" (and unresolvable) in the following subgraph` + + (externalSubgraphNames.size > 1 ? `s` : ``) + + `: "${[...externalSubgraphNames].join(QUOTATION_JOIN)}".`, + ); + } else { + reasons.push( + `The field "${typeName}.${fieldName}" is defined in the following subgraph` + + (subgraphNames.size > 1 ? `s` : ``) + + `: "${[...subgraphNames].join(QUOTATION_JOIN)}".`, + ); + } if (entityAncestorData) { let hasIntersectingTargetSubgraph = false; for (const [targetSubgraphName, fieldSets] of entityAncestorData.fieldSetsByTargetSubgraphName) { @@ -70,6 +83,9 @@ export function generateResolvabilityErrorReasons({ } hasIntersectingTargetSubgraph = true; for (const fieldSet of fieldSets) { + if (entityAncestorData.subgraphName === targetSubgraphName) { + continue; + } reasons.push( `The entity ancestor "${entityAncestorData.typeName}" in subgraph "${entityAncestorData.subgraphName}" does not satisfy the key field set "${fieldSet}" to access subgraph "${targetSubgraphName}".`, ); @@ -106,13 +122,25 @@ export function generateSharedResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData, }: GenerateSharedResolvabilityErrorReasonsParams): Array { - const { fieldName, typeName, subgraphNames } = unresolvableFieldData; - const reasons: Array = [ - rootFieldData.message, - `The field "${typeName}.${fieldName}" is defined in the following subgraph` + - (subgraphNames.size > 1 ? `s` : ``) + - `: "${[...subgraphNames].join(QUOTATION_JOIN)}".`, - ]; + const { externalSubgraphNames, fieldName, typeName, subgraphNames } = unresolvableFieldData; + const reasons: Array = [rootFieldData.message]; + if (externalSubgraphNames.size > 0) { + const nonExternalSubgraphNames = subgraphNames.difference(externalSubgraphNames); + reasons.push( + `The field "${typeName}.${fieldName}" is defined (and resolvable) in the following subgraph` + + (nonExternalSubgraphNames.size > 1 ? `s` : ``) + + `: "${[...nonExternalSubgraphNames].join(QUOTATION_JOIN)}".`, + `The field "${typeName}.${fieldName}" is defined "@external" (and unresolvable) in the following subgraph` + + (externalSubgraphNames.size > 1 ? `s` : ``) + + `: "${[...externalSubgraphNames].join(QUOTATION_JOIN)}".`, + ); + } else { + reasons.push( + `The field "${typeName}.${fieldName}" is defined in the following subgraph` + + (subgraphNames.size > 1 ? `s` : ``) + + `: "${[...subgraphNames].join(QUOTATION_JOIN)}".`, + ); + } let hasIntersectingTargetSubgraph = false; for (const [targetSubgraphName, fieldSets] of entityAncestors.fieldSetsByTargetSubgraphName) { if (!subgraphNames.has(targetSubgraphName)) { @@ -206,6 +234,7 @@ export function generateRootResolvabilityErrors({ const selectionSetSegments = generateSelectionSetSegments(path); for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ + externalSubgraphNames: fieldData.externalSubgraphNames, fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), subgraphNames: fieldData.subgraphNames, @@ -247,6 +276,7 @@ export function generateEntityResolvabilityErrors({ const selectionSetSegments = generateSelectionSetSegments(fullPath); for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ + externalSubgraphNames: fieldData.externalSubgraphNames, fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), subgraphNames: fieldData.subgraphNames, @@ -289,6 +319,7 @@ export function generateSharedEntityResolvabilityErrors({ const selectionSetSegments = generateSelectionSetSegments(fullPath); for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ + externalSubgraphNames: fieldData.externalSubgraphNames, fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), subgraphNames: fieldData.subgraphNames, diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index 89b527b300..488c5871f7 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -17,6 +17,7 @@ export class EntityWalker { index: number; resDataByNodeName: Map; resDataByRelativeOriginPath: Map; + resolvedPaths: Set; selectionPathByEntityNodeName = new Map(); // The subgraph name is so the propagated errors accurately reflect which subgraph cannot reach the node. subgraphNameByUnresolvablePath: Map; @@ -29,6 +30,7 @@ export class EntityWalker { relativeOriginPaths, resDataByNodeName, resDataByRelativeOriginPath, + resolvedPaths, subgraphNameByUnresolvablePath, visitedEntities, }: EntityWalkerParams) { @@ -37,8 +39,9 @@ export class EntityWalker { this.relativeOriginPaths = relativeOriginPaths; this.resDataByNodeName = resDataByNodeName; this.resDataByRelativeOriginPath = resDataByRelativeOriginPath; - this.visitedEntities = visitedEntities; + this.resolvedPaths = resolvedPaths; this.subgraphNameByUnresolvablePath = subgraphNameByUnresolvablePath; + this.visitedEntities = visitedEntities; } getNodeResolutionData({ @@ -64,9 +67,12 @@ export class EntityWalker { } visitEntityDescendantEdge({ edge, selectionPath }: VisitEntityDescendantEdgeParams): VisitNodeResult { - if (edge.isInaccessible || edge.node.isInaccessible) { + if (edge.isEdgeInaccessible()) { return { visited: false, areDescendantsResolved: false }; } + if (edge.isExternal) { + return { visited: false, areDescendantsResolved: false, isExternal: true }; + } if (edge.node.isLeaf) { return { visited: true, areDescendantsResolved: true }; } @@ -126,16 +132,17 @@ export class EntityWalker { } let removeDescendantPaths: true | undefined = undefined; for (const [fieldName, edge] of node.headToTailEdges) { - const { visited, areDescendantsResolved, isRevisitedNode } = this.visitEntityDescendantEdge({ + const { areDescendantsResolved, isExternal, isRevisitedNode, visited } = this.visitEntityDescendantEdge({ edge, selectionPath, }); removeDescendantPaths ??= isRevisitedNode; this.propagateVisitedField({ areDescendantsResolved, - fieldName, data, - nodeName: node.nodeName, + fieldName, + isExternal, + node, selectionPath, visited, }); @@ -169,14 +176,19 @@ export class EntityWalker { areDescendantsResolved, data, fieldName, - nodeName, + isExternal, + node, selectionPath, visited, }: PropagateVisitedFieldParams) { + if (isExternal) { + data.addExternalSubgraphName({ fieldName, subgraphName: node.subgraphName }); + return; + } if (!visited) { return; } - const dataByNodeName = getValueOrDefault(this.resDataByNodeName, nodeName, () => data.copy()); + const dataByNodeName = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => data.copy()); data.addResolvedFieldName(fieldName); dataByNodeName.addResolvedFieldName(fieldName); if (areDescendantsResolved) { @@ -205,13 +217,21 @@ export class EntityWalker { } } + // TODO use *origin* subgraph addUnresolvablePaths({ selectionPath, subgraphName }: AddUnresolvablePathsParams) { if (!this.relativeOriginPaths) { + if (this.resolvedPaths.has(selectionPath)) { + return; + } getValueOrDefault(this.subgraphNameByUnresolvablePath, selectionPath, () => subgraphName); return; } for (const path of this.relativeOriginPaths) { - getValueOrDefault(this.subgraphNameByUnresolvablePath, `${path}${selectionPath}`, () => subgraphName); + const fullPath = `${path}${selectionPath}`; + if (this.resolvedPaths.has(fullPath)) { + continue; + } + getValueOrDefault(this.subgraphNameByUnresolvablePath, fullPath, () => subgraphName); } } @@ -222,6 +242,7 @@ export class EntityWalker { for (const unresolvablePath of this.subgraphNameByUnresolvablePath.keys()) { if (unresolvablePath.startsWith(selectionPath)) { this.subgraphNameByUnresolvablePath.delete(unresolvablePath); + this.resolvedPaths.add(unresolvablePath); } } } @@ -230,10 +251,12 @@ export class EntityWalker { for (const originPath of this.relativeOriginPaths) { const fullPath = `${originPath}${selectionPath}`; this.subgraphNameByUnresolvablePath.delete(fullPath); + this.resolvedPaths.add(fullPath); if (removeDescendantPaths) { for (const unresolvablePath of this.subgraphNameByUnresolvablePath.keys()) { if (unresolvablePath.startsWith(fullPath)) { this.subgraphNameByUnresolvablePath.delete(unresolvablePath); + this.resolvedPaths.add(unresolvablePath); } } } diff --git a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts index b1b136e4dc..6fd54bbe53 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts @@ -7,9 +7,10 @@ export type EntityWalkerParams = { index: number; resDataByNodeName: Map; resDataByRelativeOriginPath: Map; - relativeOriginPaths?: Set; + resolvedPaths: Set; subgraphNameByUnresolvablePath: Map; visitedEntities: Set; + relativeOriginPaths?: Set; }; export type VisitEntityDescendantEdgeParams = { @@ -26,9 +27,10 @@ export type PropagateVisitedFieldParams = { areDescendantsResolved: boolean; data: NodeResolutionData; fieldName: FieldName; - nodeName: NodeName; + node: GraphNode; selectionPath: SelectionPath; visited: boolean; + isExternal?: true; }; export type GetNodeResolutionDataParams = { diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts index 5f2d5802ef..2019efb364 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -27,8 +27,11 @@ export class RootFieldWalker { } visitEdge({ edge, selectionPath }: VisitEdgeParams): VisitNodeResult { - if (edge.isInaccessible || edge.node.isInaccessible) { - return { visited: false, areDescendantsResolved: true }; + if (edge.isEdgeInaccessible()) { + return { visited: false, areDescendantsResolved: false }; + } + if (edge.isExternal) { + return { visited: false, areDescendantsResolved: false, isExternal: true }; } if (edge.node.isLeaf) { return { visited: true, areDescendantsResolved: true }; @@ -99,11 +102,12 @@ export class RootFieldWalker { }; } for (const [fieldName, edge] of node.headToTailEdges) { - const { visited, areDescendantsResolved } = this.visitEdge({ edge, selectionPath }); + const { areDescendantsResolved, isExternal, visited } = this.visitEdge({ edge, selectionPath }); this.propagateVisitedField({ areDescendantsResolved, - fieldName, data, + fieldName, + isExternal, node, selectionPath, visited, @@ -121,9 +125,12 @@ export class RootFieldWalker { } visitSharedEdge({ edge, selectionPath }: VisitEdgeParams): VisitNodeResult { - if (edge.isInaccessible || edge.node.isInaccessible) { - return { visited: false, areDescendantsResolved: true }; + if (edge.isEdgeInaccessible()) { + return { visited: false, areDescendantsResolved: false }; } + // if (edge.isExternal) { + // return { visited: false, areDescendantsResolved: false, isExternal: true }; + // } if (edge.node.isLeaf) { return { visited: true, areDescendantsResolved: true }; } @@ -233,10 +240,15 @@ export class RootFieldWalker { areDescendantsResolved, data, fieldName, + isExternal, node, selectionPath, visited, }: PropagateVisitedFieldParams) { + if (isExternal) { + data.addExternalSubgraphName({ fieldName, subgraphName: node.subgraphName }); + return; + } if (!visited) { return; } diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts index 2f70c3ec57..0c71d84f04 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts @@ -24,6 +24,7 @@ export type PropagateVisitedFieldParams = { node: GraphNode; selectionPath: SelectionPath; visited: boolean; + isExternal?: true; }; export type PropagateVisitedSharedFieldParams = { diff --git a/composition/src/utils/types.ts b/composition/src/utils/types.ts index 856f939ce6..255c18f53c 100644 --- a/composition/src/utils/types.ts +++ b/composition/src/utils/types.ts @@ -1,4 +1,5 @@ import { Kind } from 'graphql'; +import { SubgraphName } from '../types/types'; export type RootTypeName = 'Mutation' | 'Query' | 'Subscription'; @@ -23,17 +24,18 @@ export type ImplementationErrors = { }; export type GraphFieldData = { + externalSubgraphNames: Set; name: string; namedTypeName: string; isLeaf: boolean; - subgraphNames: Set; + subgraphNames: Set; }; // The accumulation of all EntityInterfaceSubgraphData for the type name export type InvalidRequiredInputValueData = { inputValueName: string; - missingSubgraphs: string[]; - requiredSubgraphs: string[]; + missingSubgraphs: Array; + requiredSubgraphs: Array; }; export type InvalidEntityInterface = { diff --git a/composition/src/v1/federation/federation-factory.ts b/composition/src/v1/federation/federation-factory.ts index 620d7f90ce..4db3731289 100644 --- a/composition/src/v1/federation/federation-factory.ts +++ b/composition/src/v1/federation/federation-factory.ts @@ -1807,6 +1807,7 @@ export class FederationFactory { fieldDataToGraphFieldData(fieldData: FieldData): GraphFieldData { return { + externalSubgraphNames: new Set(), name: fieldData.name, namedTypeName: fieldData.namedTypeName, isLeaf: isNodeLeaf(this.parentDefinitionDataByTypeName.get(fieldData.namedTypeName)?.kind), diff --git a/composition/src/v1/normalization/normalization-factory.ts b/composition/src/v1/normalization/normalization-factory.ts index 63d6790c8c..b864430b89 100644 --- a/composition/src/v1/normalization/normalization-factory.ts +++ b/composition/src/v1/normalization/normalization-factory.ts @@ -3740,6 +3740,7 @@ export class NormalizationFactory { } } } + this.isSubgraphEventDrivenGraph = this.edfsDirectiveReferences.size > 0; // this is where @provides and @requires configurations are added to the ConfigurationData this.addValidConditionalFieldSetConfigurations(); // this is where @key configurations are added to the ConfigurationData @@ -3813,7 +3814,6 @@ export class NormalizationFactory { executableLocations, ); } - this.isSubgraphEventDrivenGraph = this.edfsDirectiveReferences.size > 0; if (this.isSubgraphEventDrivenGraph) { this.validateEventDrivenSubgraph(); } diff --git a/composition/src/v1/normalization/utils.ts b/composition/src/v1/normalization/utils.ts index a7d474c894..838f19360e 100644 --- a/composition/src/v1/normalization/utils.ts +++ b/composition/src/v1/normalization/utils.ts @@ -143,7 +143,6 @@ export function validateKeyFieldSets( const entityInterfaceData = nf.entityInterfaceDataByTypeName.get(entityParentData.name); const entityTypeName = entityParentData.name; const configurations: Array = []; - const allKeyFieldSetPaths: Array> = []; // If the key is on an entity interface/interface object, an entity data node should not be propagated const entityDataNode = entityInterfaceData ? undefined : nf.internalGraph.addEntityDataNode(entityParentData.name); const graphNode = nf.internalGraph.addOrUpdateNode(entityParentData.name); @@ -161,6 +160,7 @@ export function validateKeyFieldSets( let currentDepth = -1; let shouldDefineSelectionSet = true; let lastFieldName = ''; + let isUnconditionallyExternalKey = false; visit(documentNode, { Argument: { enter(node) { @@ -223,6 +223,21 @@ export function validateKeyFieldSets( errorMessages.push(duplicateFieldInFieldSetErrorMessage(rawFieldSet, fieldCoords)); return BREAK; } + const externalFieldData = fieldData.externalFieldDataBySubgraphName.get(nf.subgraphName); + if ( + !nf.isSubgraphEventDrivenGraph && + externalFieldData?.isDefinedExternal && + !externalFieldData.isUnconditionallyProvided + ) { + const conditionalData = nf.conditionalFieldDataByCoords.get(fieldCoords); + if (!conditionalData) { + isUnconditionallyExternalKey = true; + const edge = graphNode.headToTailEdges.get(fieldName); + if (edge) { + edge.isExternal = true; + } + } + } // Add the field set for which the field coordinates contribute a key field getValueOrDefault( getValueOrDefault( @@ -351,20 +366,21 @@ export function validateKeyFieldSets( nf.errors.push(invalidDirectiveError(KEY, entityTypeName, numberToOrdinal(keyNumber), errorMessages)); continue; } + configurations.push({ fieldName: '', selectionSet: fieldSet, ...(isUnresolvable ? { disableEntityResolver: true } : {}), }); graphNode.satisfiedFieldSets.add(fieldSet); + if (isUnconditionallyExternalKey) { + graphNode.externalFieldSets.add(fieldSet); + } if (isUnresolvable) { continue; } entityDataNode?.addTargetSubgraphByFieldSet(fieldSet, nf.subgraphName); - allKeyFieldSetPaths.push(keyFieldSetPaths); } - // todo - // nf.internalGraph.addEntityNode(entityTypeName, allKeyFieldSetPaths); if (configurations.length > 0) { return configurations; } diff --git a/composition/tests/v1/resolvability.test.ts b/composition/tests/v1/resolvability.test.ts index 476ab3f7f4..d7e132ac9f 100644 --- a/composition/tests/v1/resolvability.test.ts +++ b/composition/tests/v1/resolvability.test.ts @@ -61,6 +61,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.query.nest.nest.nest'; const rootFieldData = newRootFieldData(QUERY, 'query', new Set(['subgraph-b'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -83,6 +84,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.friend'; const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -111,6 +113,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData('Query', 'entity', new Set(['subgraph-w'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'nestedObject', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: false, @@ -138,6 +141,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData('Query', 'entity', new Set(['subgraph-w'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'nestedObject', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: false, @@ -160,6 +164,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.friend'; const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -182,6 +187,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.friend'; const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const fieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -191,6 +197,7 @@ describe('Field resolvability tests', () => { typeName: 'Friend', }; const fieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'hobbies', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -262,6 +269,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.humans.... on Friend'; const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-i'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -284,6 +292,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.humans.... on Friend.pets.... on Cat'; const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-k'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -330,6 +339,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.humans.... on Enemy'; const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-o'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -501,6 +511,7 @@ describe('Field resolvability tests', () => { typeName: 'EntityOne', }; const fieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'entityTwo', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: false, @@ -510,6 +521,7 @@ describe('Field resolvability tests', () => { typeName: 'EntityOne', }; const fieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -541,6 +553,7 @@ describe('Field resolvability tests', () => { typeName: 'EntityOne', }; const fieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath + '.object.nestedObject'), { isLeaf: true, @@ -550,6 +563,7 @@ describe('Field resolvability tests', () => { typeName: 'NestedObject', }; const fieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'entityTwo', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: false, @@ -581,6 +595,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData('Query', 'entity', new Set(['subgraph-ae'])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1123,6 +1138,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBH.name])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'isNew', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1190,6 +1206,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBM.name])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1218,6 +1235,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBM.name])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1469,6 +1487,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaaa.name, eaac.name])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'id', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1524,6 +1543,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaac.name, eaae.name])); const unresolvableFieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.object'), { isLeaf: true, @@ -1533,6 +1553,7 @@ describe('Field resolvability tests', () => { typeName: OBJECT, }; const unresolvableFieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.objectTwo'), { isLeaf: true, @@ -1575,6 +1596,7 @@ describe('Field resolvability tests', () => { }; const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaac.name, eaae.name])); const unresolvableFieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.object'), { isLeaf: true, @@ -1584,6 +1606,7 @@ describe('Field resolvability tests', () => { typeName: OBJECT, }; const unresolvableFieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.objectTwo'), { isLeaf: true, @@ -1593,6 +1616,7 @@ describe('Field resolvability tests', () => { typeName: OBJECT, }; const unresolvableFieldDataThree: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities'), { isLeaf: true, @@ -1635,6 +1659,7 @@ describe('Field resolvability tests', () => { const fieldPath = 'query.object.nestedObjectTwo'; const rootFieldData = newRootFieldData(QUERY, 'object', new Set([faaa.name, faab.name])); const unresolvableFieldData: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'id', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { isLeaf: true, @@ -1685,6 +1710,7 @@ describe('Field resolvability tests', () => { const rootFieldData = newRootFieldData(QUERY, 'a', new Set([haaa.name, haab.name])); const unresolvableFieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'createdAt', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.a.b.edges.node.c.a'), { isLeaf: true, @@ -1694,6 +1720,7 @@ describe('Field resolvability tests', () => { typeName: 'EntityA', }; const unresolvableFieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'active', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.a.b.edges.node.c.a'), { isLeaf: true, @@ -1703,6 +1730,7 @@ describe('Field resolvability tests', () => { typeName: 'EntityA', }; const unresolvableFieldDataThree: UnresolvableFieldData = { + externalSubgraphNames: new Set(), fieldName: 'b', selectionSet: renderSelectionSet(generateSelectionSetSegments('query.a.b.edges.node.c.a'), { isLeaf: false, @@ -1739,6 +1767,60 @@ describe('Field resolvability tests', () => { ), ]); }); + + test('that an error is returned if a field is unreachable due a true @external entity key field', () => { + const entityAncestors: EntityAncestorCollection = { + fieldSetsByTargetSubgraphName: new Map>([[iaab.name, new Set(['id'])]]), + subgraphNames: [iaaa.name, iaab.name], + typeName: 'Entity', + }; + const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([iaaa.name])); + const fieldPath = 'query.entities'; + const unresolvableFieldDataOne: UnresolvableFieldData = { + externalSubgraphNames: new Set([iaaa.name]), + fieldName: 'id', + selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { + isLeaf: true, + name: 'id', + } as GraphFieldData), + subgraphNames: new Set([iaab.name]), + typeName: 'Entity', + }; + const unresolvableFieldDataTwo: UnresolvableFieldData = { + externalSubgraphNames: new Set(), + fieldName: 'name', + selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { + isLeaf: true, + name: 'name', + } as GraphFieldData), + subgraphNames: new Set([iaab.name]), + typeName: 'Entity', + }; + const { errors } = federateSubgraphsFailure([iaaa, iaab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(2); + expect(errors).toStrictEqual([ + unresolvablePathError( + unresolvableFieldDataOne, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataOne, + }), + ), + unresolvablePathError( + unresolvableFieldDataTwo, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataTwo, + }), + ), + ]); + }); + + test('that an @external key can still be a valid target', () => { + const { success } = federateSubgraphsSuccess([jaaa, jaab], ROUTER_COMPATIBILITY_VERSION_ONE); + }); }); const subgraphA: Subgraph = { @@ -3497,3 +3579,53 @@ const haac: Subgraph = { } `), }; + +const iaaa: Subgraph = { + name: 'iaaa', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! @external + } + + type Query { + entities: [Entity!]! + } + `), +}; + +const iaab: Subgraph = { + name: 'iaab', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + name: String! + } + `), +}; + +const jaaa: Subgraph = { + name: 'jaaa', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! @external + name: String! + } + `), +}; + +const jaab: Subgraph = { + name: 'jaab', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + } + + type Query { + entities: [Entity!]! + } + `), +}; From f94a176614bb279a7917e7c73f86df2e6acf81fd Mon Sep 17 00:00:00 2001 From: Aenimus Date: Fri, 27 Feb 2026 14:09:11 +0000 Subject: [PATCH 2/2] chore: clean up --- composition-go/index.global.js | 2 +- .../walker/entity-walker/entity-walker.ts | 1 - .../root-field-walkers/root-field-walker.ts | 6 +++--- composition/tests/v1/resolvability.test.ts | 17 ++++++++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 51fd8a9bfa..4e4233c5de 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -453,7 +453,7 @@ Although "${e}" is declared "@external", it is part of a "@key" directive on an `+si.LITERAL_SPACE.repeat(t+2)+`} `}function ZD({entityAncestorData:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let l=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(l.size>1?"s":"")+`: "${[...l].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);if(e){let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName)if(o.has(d)){l=!0;for(let E of p)e.subgraphName!==d&&u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${E}" to access subgraph "${d}".`)}l||u.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" has no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`),u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`)}else t.subgraphNames.size>1&&u.push(`None of the subgraphs that shares the same root type field "${t.coords}" can provide a route to access "${i}".`),u.push(`The type "${a}" is not a descendant of an entity ancestor that can provide a shared route to access "${i}".`);return a!==(e==null?void 0:e.typeName)&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function cV({entityAncestors:e,rootFieldData:t,unresolvableFieldData:n}){let{externalSubgraphNames:r,fieldName:i,typeName:a,subgraphNames:o}=n,u=[t.message];if(r.size>0){let d=o.difference(r);u.push(`The field "${a}.${i}" is defined (and resolvable) in the following subgraph`+(d.size>1?"s":"")+`: "${[...d].join(si.QUOTATION_JOIN)}".`,`The field "${a}.${i}" is defined "@external" (and unresolvable) in the following subgraph`+(r.size>1?"s":"")+`: "${[...r].join(si.QUOTATION_JOIN)}".`)}else u.push(`The field "${a}.${i}" is defined in the following subgraph`+(o.size>1?"s":"")+`: "${[...o].join(si.QUOTATION_JOIN)}".`);let l=!1;for(let[d,p]of e.fieldSetsByTargetSubgraphName){if(!o.has(d))continue;let E=e.subgraphNames.filter(v=>v!==d),I=E.length>1;l=!0;for(let v of p)u.push(`The entity ancestor "${e.typeName}" in subgraph${I?"s":""} "${E.join(si.QUOTATION_JOIN)}" do${I?"":"es"} not satisfy the key field set "${v}" to access subgraph "${d}".`)}if(!l){let d=e.subgraphNames.length>1;u.push(`The entity ancestor "${e.typeName}" in subgraph${d?"s":""} "${e.subgraphNames.join(si.QUOTATION_JOIN)}" ha${d?"ve":"s"} no accessible target entities (resolvable @key directives) in the subgraphs where "${a}.${i}" is defined.`)}return u.push(`The type "${a}" is not a descendant of any other entity ancestors that can provide a shared route to access "${i}".`),a!==e.typeName&&u.push(`The type "${a}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`),u}function QE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var dV=$i(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData({resolvedDescendantNames:t,resolvedFieldNames:n}){for(let r of n)this.addResolvedFieldName(r);for(let r of t)this.resolvedDescendantNames.add(r)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}addExternalSubgraphName({fieldName:t,subgraphName:n}){let r=this.fieldDataByName.get(t);if(!r)throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);r.externalSubgraphNames.add(n)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var fV=w(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ofe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,resolvedPaths:o,subgraphNameByUnresolvablePath:u,visitedEntities:l}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"resolvedPaths");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.resolvedPaths=o,this.subgraphNameByUnresolvablePath=u,this.visitedEntities=l}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ofe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isEdgeInaccessible())return{visited:!1,areDescendantsResolved:!1};if(t.isExternal)return{visited:!1,areDescendantsResolved:!1,isExternal:!0};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,isRevisitedNode:d,visited:p}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:u,data:r,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:p})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;let l=(0,as.getValueOrDefault)(this.resDataByNodeName,a.nodeName,()=>n.copy());if(n.addResolvedFieldName(r),l.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let p of this.relativeOriginPaths){let E=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${p}${o}`,()=>n.copy());E.addResolvedFieldName(r),t&&(E.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let d=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,o,()=>n.copy());d.addResolvedFieldName(r),t&&d.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){if(this.resolvedPaths.has(t))return;(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;this.resolvedPaths.has(i)||(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,i,()=>n)}}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&(this.subgraphNameByUnresolvablePath.delete(r),this.resolvedPaths.add(r));return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),this.resolvedPaths.add(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&(this.subgraphNameByUnresolvablePath.delete(a),this.resolvedPaths.add(a))}}};zE.EntityWalker=rb});var pV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,visited:d}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:u,data:i,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:d})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;n.addResolvedFieldName(r);let l=(0,ss.getValueOrDefault)(this.resDataByPath,o,()=>new WE.NodeResolutionData({fieldDataByName:a.fieldDataByName,typeName:a.typeName}));l.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),l.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ia=wr(),ZE=zD(),ufe=fV(),cfe=pV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ia.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ia.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ia.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){if(a.externalFieldSets.has(o))continue;let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){let l=this.nodeByNodeName.get(n);if(!l)throw new Error(`Fatal: Could not find entity node for "${n}".`);u.add(n);let d=this.nodesByTypeName.get(l.typeName);if(!(d!=null&&d.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let p=new ufe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}),E=l.getAllAccessibleEntityNodeNames();for(let I of d){if(I.nodeName!==l.nodeName&&!E.has(I.nodeName))continue;let{areDescendantsResolved:v}=p.visitEntityDescendantConcreteNode({node:I,selectionPath:""});if(v)return}for(let[I,v]of p.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:I,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:v}),resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new cfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ia.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ia.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ia.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){let r=new Set;for(let[i,a]of n.entityNodeNamesByPath){let o=new Map,u=new Map;for(let d of a)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:d,resDataByRelativeOriginPath:u,resolvedPaths:r,subgraphNameByUnresolvablePath:o,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n}),o.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n});let l=new Array;if(o.size>0&&l.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:a,resDataByPath:u,pathFromRoot:i,rootFieldData:t,subgraphNameByUnresolvablePath:o})),n.unresolvablePaths.size>0&&l.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(l.length<1))return{errors:l,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var i;let r=new Set;for(let[a,o]of n.pathsByEntityNodeName){let u=new Map;if(this.resDataByNodeName.has(a))continue;let l=(0,ia.getValueOrDefault)(this.resDataByRelativePathByEntity,a,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:a,resDataByRelativeOriginPath:l,resolvedPaths:r,subgraphNameByUnresolvablePath:u,visitedEntities:(0,ia.getValueOrDefault)(this.visitedEntitiesByOriginEntity,a,()=>new Set)}),!(u.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:a,pathFromRoot:(i=(0,ia.getFirstEntry)(o))!=null?i:"",rootFieldData:t,subgraphNameByUnresolvablePath:u}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ia.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=w(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=lfe;th.newConfigurationData=dfe;function lfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function dfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Nfe;qc.normalizeSubgraph=TV;qc.batchNormalize=Tfe;var W=Ie(),bn=Fr(),oi=Ip(),Ur=Du(),Yn=yp(),se=$i(),vp=dd(),ffe=Vv(),_i=TE(),pfe=MD(),us=gp(),mV=$D(),os=Gf(),nn=$l(),lr=Su(),cb=sb(),nh=yE(),X=zn(),mfe=ql(),Ve=wr(),Op=ob(),NV=IE();function Nfe(e,t=!0){let{error:n,documentNode:r}=(0,bn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Sp(new cb.Graph).normalize(r)}function TV(e,t,n){return new Sp(n||new cb.Graph,t).normalize(e)}var Dp,ub,rh,EV,Sp=class{constructor(t,n){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,oi.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,lr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,lr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,Ve.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,Ve.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===X.OVERRIDE,I=u===X.REQUIRES_SCOPES,v=u===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,_i.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,Q=[];for(let pe of i.arguments){let le=pe.name.value;if(A.has(le)){U.add(le);continue}A.add(le);let Ae=n.argumentTypeNodeByName.get(le);if(!Ae){j.add(le);continue}if(!this.isArgumentValueValid(Ae.typeNode,pe.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(pe.value),`@${u}`,le,(0,_i.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:pe.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||le!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:pe.value.values,requiredScopes:Q})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let ee=(0,Ve.getEntriesNotInHashSet)(o,A);if(ee.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,ee)),a.length>0||!I)return a;let ne=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ne.requiredScopes.push(...Q);else{let pe=(0,Ve.getValueOrDefault)(ne.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));pe.inheritedData.requiredScopes.push(...Q),pe.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,bn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(X.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,lr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,bn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,_i.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,lr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,bn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,lr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,lr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,lr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){u=void 0;break}if(v.value.kind!==W.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,bn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,oi.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,lr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,bn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,oi.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,oi.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],Q=-1,ee=!0,ne=r,pe=!1;return(0,W.visit)(u,{Argument:{enter(){return!1}},Field:{enter(le){var an,kr;let Ae=d[Q],Me=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Me)),W.BREAK;let Ze=le.name.value,Z=`${Me}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),ee)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ne=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&El(an=l,Dp,ub).call(an,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let ve=Ae.fieldDataByName.get(Ze);if(!ve)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Me,Ze)),W.BREAK;if(E[Q].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[Q].add(Ze);let{isDefinedExternal:gt,isUnconditionallyProvided:rn}=(0,Ve.getOrThrowError)(ve.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),un=gt&&!rn;rn||(pe=!0);let In=(0,lr.getTypeNodeNamedTypeName)(ve.node.type),xt=l.parentDefinitionDataByTypeName.get(In);if(Ur.BASE_SCALARS.has(In)||(xt==null?void 0:xt.kind)===W.Kind.SCALAR_TYPE_DEFINITION||(xt==null?void 0:xt.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!gt){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!un&&!i)return;let nr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),En=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?nr.providedBy.push(En):nr.requiredBy.push(En);return}if(!xt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,In)),W.BREAK;if(gt&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),xt.kind===W.Kind.OBJECT_TYPE_DEFINITION||xt.kind===W.Kind.INTERFACE_TYPE_DEFINITION||xt.kind===W.Kind.UNION_TYPE_DEFINITION){ee=!0,d.push(xt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(le){let Ae=d[Q],Me=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!le.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=le.typeCondition.name.value;if(Z===Me){d.push(Ae),ee=!0;return}if(!(0,bn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,Me)),W.BREAK;let ve=l.parentDefinitionDataByTypeName.get(Z);if(!ve)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Me,Z)),W.BREAK;switch(ee=!0,ve.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!ve.implementedInterfaceTypeNames.has(Me))break;d.push(ve);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let gt=l.concreteTypeNamesByAbstractTypeName.get(Me);if(!gt||!gt.has(Z))break;d.push(ve);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(ve);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Me,Z,(0,Ve.kindToNodeType)(ve.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,Ve.kindToNodeType)(Ae.kind),Me)),W.BREAK}},SelectionSet:{enter(){if(!ee){let le=d[Q];if(le.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;if(ne===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,Ve.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=le.fieldDataByName.get(ne);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,le.name,ne)),W.BREAK;let Me=(0,lr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(Me),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Z))),W.BREAK}if(Q+=1,ee=!1,Q<0||Q>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;E.push(new Set)},leave(){if(ee){let le=d[Q+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,le.name,(0,Ve.kindToNodeType)(le.kind))),ee=!1}Q-=1,d.pop(),E.pop()}}}),j.length>0||!pe?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,oi.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function YE({outputEnd:e,outputStart:t,pathNodes:n},r){return t+si.LITERAL_SPACE.repeat(n.length+1)+nfe(r,n.length)+e}function lV(e,t){return t?e?`${t}${e}`:t:e}function rfe({resDataByPath:e,rootFieldData:t,unresolvablePaths:n}){let r=new Array;for(let a of n){let o=(0,XD.getOrThrowError)(e,a,"resDataByPath"),u=new Map;for(let[d,p]of o.fieldDataByName)o.resolvedFieldNames.has(d)||u.set(d,p);let l=QE(a);for(let[d,p]of u)r.push({externalSubgraphNames:p.externalSubgraphNames,fieldName:d,selectionSet:YE(l,p),subgraphNames:p.subgraphNames,typeName:o.typeName})}let i=new Array;for(let a of r)i.push((0,WD.unresolvablePathError)(a,ZD({rootFieldData:t,unresolvableFieldData:a})));return i}function ife({entityAncestorData:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let[o,u]of i){let l=new Array,d=(0,XD.getOrThrowError)(t,o,"resDataByPath"),p=new Map;for(let[v,A]of d.fieldDataByName)d.resolvedFieldNames.has(v)||p.set(v,A);let E=lV(o,n),I=QE(E);for(let[v,A]of p)l.push({externalSubgraphNames:A.externalSubgraphNames,fieldName:v,selectionSet:YE(I,A),subgraphNames:A.subgraphNames,typeName:d.typeName});e.subgraphName=u;for(let v of l)a.push((0,WD.unresolvablePathError)(v,ZD({rootFieldData:r,unresolvableFieldData:v,entityAncestorData:e})))}return a}function afe({entityAncestors:e,resDataByPath:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=new Array;for(let o of i.keys()){let u=new Array,l=(0,XD.getOrThrowError)(t,o,"resDataByPath"),d=new Map;for(let[I,v]of l.fieldDataByName)l.resolvedFieldNames.has(I)||d.set(I,v);let p=lV(o,n),E=QE(p);for(let[I,v]of d)u.push({externalSubgraphNames:v.externalSubgraphNames,fieldName:I,selectionSet:YE(E,v),subgraphNames:v.subgraphNames,typeName:l.typeName});for(let I of u)a.push((0,WD.unresolvablePathError)(I,cV({rootFieldData:r,unresolvableFieldData:I,entityAncestors:e})))}return a}function sfe({relativeOriginPaths:e,selectionPath:t}){if(!e)return new Set([t]);let n=new Set;for(let r of e)n.add(`${r}${t}`);return n}});var HE=w(JE=>{"use strict";m();T();N();Object.defineProperty(JE,"__esModule",{value:!0});JE.NodeResolutionData=void 0;var dV=$i(),Mc,nb=class nb{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){ec(this,Mc,!1);g(this,"fieldDataByName");g(this,"resolvedDescendantNames");g(this,"resolvedFieldNames");g(this,"typeName");zy(this,Mc,n),this.fieldDataByName=t,this.resolvedDescendantNames=new Set(r),this.resolvedFieldNames=new Set(i),this.typeName=a}addData({resolvedDescendantNames:t,resolvedFieldNames:n}){for(let r of n)this.addResolvedFieldName(r);for(let r of t)this.resolvedDescendantNames.add(r)}addResolvedFieldName(t){if(!this.fieldDataByName.has(t))throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}addExternalSubgraphName({fieldName:t,subgraphName:n}){let r=this.fieldDataByName.get(t);if(!r)throw(0,dV.unexpectedEdgeFatalError)(this.typeName,[t]);r.externalSubgraphNames.add(n)}copy(){return new nb({fieldDataByName:this.fieldDataByName,isResolved:Hy(this,Mc),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Hy(this,Mc))return!0;if(this.fieldDataByName.size!==this.resolvedFieldNames.size)return!1;for(let t of this.fieldDataByName.keys())if(!this.resolvedFieldNames.has(t))return!1;return zy(this,Mc,!0),!0}};Mc=new WeakMap;var tb=nb;JE.NodeResolutionData=tb});var fV=w(zE=>{"use strict";m();T();N();Object.defineProperty(zE,"__esModule",{value:!0});zE.EntityWalker=void 0;var ofe=HE(),as=wr(),rb=class{constructor({encounteredEntityNodeNames:t,index:n,relativeOriginPaths:r,resDataByNodeName:i,resDataByRelativeOriginPath:a,resolvedPaths:o,subgraphNameByUnresolvablePath:u,visitedEntities:l}){g(this,"encounteredEntityNodeNames");g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByRelativeOriginPath");g(this,"resolvedPaths");g(this,"selectionPathByEntityNodeName",new Map);g(this,"subgraphNameByUnresolvablePath");g(this,"visitedEntities");g(this,"relativeOriginPaths");this.encounteredEntityNodeNames=t,this.index=n,this.relativeOriginPaths=r,this.resDataByNodeName=i,this.resDataByRelativeOriginPath=a,this.resolvedPaths=o,this.subgraphNameByUnresolvablePath=u,this.visitedEntities=l}getNodeResolutionData({node:{fieldDataByName:t,nodeName:n,typeName:r},selectionPath:i}){let a=(0,as.getValueOrDefault)(this.resDataByNodeName,n,()=>new ofe.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let u of this.relativeOriginPaths){let l=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${u}${i}`,()=>a.copy());o!=null||(o=l)}return o}visitEntityDescendantEdge({edge:t,selectionPath:n}){if(t.isEdgeInaccessible())return{visited:!1,areDescendantsResolved:!1};if(t.isExternal)return{visited:!1,areDescendantsResolved:!1,isExternal:!0};if(t.node.isLeaf)return{visited:!0,areDescendantsResolved:!0};let r=`${n}.${t.edgeName}`;return this.getNodeResolutionData({node:t.node,selectionPath:r}).areDescendantsResolved()?{visited:!0,areDescendantsResolved:!0}:(0,as.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.visitedEntities.has(t.node.nodeName)||this.encounteredEntityNodeNames.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:(this.encounteredEntityNodeNames.add(t.node.nodeName),(0,as.getValueOrDefault)(this.selectionPathByEntityNodeName,t.node.nodeName,()=>r),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitEntityDescendantAbstractNode({node:t.node,selectionPath:r}):this.visitEntityDescendantConcreteNode({node:t.node,selectionPath:r}):(this.removeUnresolvablePaths({selectionPath:r,removeDescendantPaths:!0}),{visited:!0,areDescendantsResolved:!0,isRevisitedNode:!0})}visitEntityDescendantConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};let i;for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,isRevisitedNode:d,visited:p}=this.visitEntityDescendantEdge({edge:o,selectionPath:n});i!=null||(i=d),this.propagateVisitedField({areDescendantsResolved:u,data:r,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:p})}return r.isResolved()?this.removeUnresolvablePaths({removeDescendantPaths:i,selectionPath:n}):this.addUnresolvablePaths({selectionPath:n,subgraphName:t.subgraphName}),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}visitEntityDescendantAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEntityDescendantEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;let l=(0,as.getValueOrDefault)(this.resDataByNodeName,a.nodeName,()=>n.copy());if(n.addResolvedFieldName(r),l.addResolvedFieldName(r),t&&n.resolvedDescendantNames.add(r),this.relativeOriginPaths){for(let p of this.relativeOriginPaths){let E=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,`${p}${o}`,()=>n.copy());E.addResolvedFieldName(r),t&&(E.resolvedDescendantNames.add(r),this.removeUnresolvablePaths({selectionPath:`.${r}`,removeDescendantPaths:!0}))}return}let d=(0,as.getValueOrDefault)(this.resDataByRelativeOriginPath,o,()=>n.copy());d.addResolvedFieldName(r),t&&d.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){if(this.resolvedPaths.has(t))return;(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;this.resolvedPaths.has(i)||(0,as.getValueOrDefault)(this.subgraphNameByUnresolvablePath,i,()=>n)}}removeUnresolvablePaths({selectionPath:t,removeDescendantPaths:n}){if(!this.relativeOriginPaths){if(this.subgraphNameByUnresolvablePath.delete(t),n)for(let r of this.subgraphNameByUnresolvablePath.keys())r.startsWith(t)&&(this.subgraphNameByUnresolvablePath.delete(r),this.resolvedPaths.add(r));return}for(let r of this.relativeOriginPaths){let i=`${r}${t}`;if(this.subgraphNameByUnresolvablePath.delete(i),this.resolvedPaths.add(i),n)for(let a of this.subgraphNameByUnresolvablePath.keys())a.startsWith(i)&&(this.subgraphNameByUnresolvablePath.delete(a),this.resolvedPaths.add(a))}}};zE.EntityWalker=rb});var pV=w(XE=>{"use strict";m();T();N();Object.defineProperty(XE,"__esModule",{value:!0});XE.RootFieldWalker=void 0;var ss=wr(),WE=HE(),ib=class{constructor({index:t,nodeResolutionDataByNodeName:n}){g(this,"index");g(this,"resDataByNodeName");g(this,"resDataByPath",new Map);g(this,"entityNodeNamesByPath",new Map);g(this,"pathsByEntityNodeName",new Map);g(this,"unresolvablePaths",new Set);this.index=t,this.resDataByNodeName=n}visitEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,ss.getValueOrDefault)(this.pathsByEntityNodeName,t.node.nodeName,()=>new Set).add(`${n}.${t.edgeName}`),{visited:!0,areDescendantsResolved:!1}):t.node.isAbstract?this.visitAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):{visited:!0,areDescendantsResolved:!0}}visitAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.resDataByNodeName.get(t.nodeName);if(r)return{visited:!0,areDescendantsResolved:r.areDescendantsResolved()};let i=this.getNodeResolutionData({node:t,selectionPath:n});if(i.isResolved()&&i.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[a,o]of t.headToTailEdges){let{areDescendantsResolved:u,isExternal:l,visited:d}=this.visitEdge({edge:o,selectionPath:n});this.propagateVisitedField({areDescendantsResolved:u,data:i,fieldName:a,isExternal:l,node:t,selectionPath:n,visited:d})}return i.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:i.areDescendantsResolved()}}visitSharedEdge({edge:t,selectionPath:n}){return t.isEdgeInaccessible()?{visited:!1,areDescendantsResolved:!1}:t.isExternal?{visited:!1,areDescendantsResolved:!1,isExternal:!0}:t.node.isLeaf?{visited:!0,areDescendantsResolved:!0}:(0,ss.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,ss.getValueOrDefault)(this.entityNodeNamesByPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),t.node.isAbstract?this.visitSharedAbstractNode({node:t.node,selectionPath:`${n}.${t.edgeName}`}):this.visitSharedConcreteNode({node:t.node,selectionPath:`${n}.${t.edgeName}`})):{visited:!0,areDescendantsResolved:!0}}visitSharedAbstractNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return{visited:!0,areDescendantsResolved:!0};let r=0;for(let i of t.headToTailEdges.values())this.visitSharedEdge({edge:i,selectionPath:n}).areDescendantsResolved&&(r+=1);return{visited:!0,areDescendantsResolved:r===t.headToTailEdges.size}}visitSharedConcreteNode({node:t,selectionPath:n}){if(t.headToTailEdges.size<1)return t.isLeaf=!0,{visited:!0,areDescendantsResolved:!0};let r=this.getSharedNodeResolutionData({node:t,selectionPath:n});if(r.isResolved()&&r.areDescendantsResolved())return{visited:!0,areDescendantsResolved:!0};for(let[i,a]of t.headToTailEdges){let{visited:o,areDescendantsResolved:u}=this.visitSharedEdge({edge:a,selectionPath:n});this.propagateSharedVisitedField({areDescendantsResolved:u,data:r,fieldName:i,node:t,visited:o})}return r.isResolved()?this.unresolvablePaths.delete(n):this.unresolvablePaths.add(n),{visited:!0,areDescendantsResolved:r.areDescendantsResolved()}}getNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,ss.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,ss.getValueOrDefault)(this.resDataByPath,n,()=>r.copy())}propagateVisitedField({areDescendantsResolved:t,data:n,fieldName:r,isExternal:i,node:a,selectionPath:o,visited:u}){if(i){n.addExternalSubgraphName({fieldName:r,subgraphName:a.subgraphName});return}if(!u)return;n.addResolvedFieldName(r);let l=(0,ss.getValueOrDefault)(this.resDataByPath,o,()=>new WE.NodeResolutionData({fieldDataByName:a.fieldDataByName,typeName:a.typeName}));l.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),l.resolvedDescendantNames.add(r))}propagateSharedVisitedField({areDescendantsResolved:t,data:n,fieldName:r,node:i,visited:a}){if(!a)return;n.addResolvedFieldName(r);let o=(0,ss.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new WE.NodeResolutionData({fieldDataByName:i.fieldDataByName,typeName:i.typeName}));o.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),o.resolvedDescendantNames.add(r))}visitRootFieldEdges({edges:t,rootTypeName:n}){let r=t.length>1;for(let i of t){if(i.isInaccessible)return{visited:!1,areDescendantsResolved:!1};let a=r?this.visitSharedEdge({edge:i,selectionPath:n}):this.visitEdge({edge:i,selectionPath:n});if(a.areDescendantsResolved)return a}return{visited:!0,areDescendantsResolved:!1}}};XE.RootFieldWalker=ib});var sb=w(eh=>{"use strict";m();T();N();Object.defineProperty(eh,"__esModule",{value:!0});eh.Graph=void 0;var Td=HD(),xc=eb(),ia=wr(),ZE=zD(),ufe=fV(),cfe=pV(),ab=class{constructor(){g(this,"edgeId",-1);g(this,"entityDataNodeByTypeName",new Map);g(this,"nodeByNodeName",new Map);g(this,"nodesByTypeName",new Map);g(this,"resolvedRootFieldNodeNames",new Set);g(this,"rootNodeByTypeName",new Map);g(this,"subgraphName",ZE.NOT_APPLICABLE);g(this,"resDataByNodeName",new Map);g(this,"resDataByRelativePathByEntity",new Map);g(this,"visitedEntitiesByOriginEntity",new Map);g(this,"walkerIndex",-1)}getRootNode(t){return(0,ia.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Td.RootNode(t))}addOrUpdateNode(t,n){let r=`${this.subgraphName}.${t}`,i=this.nodeByNodeName.get(r);if(i)return i.isAbstract||(i.isAbstract=!!(n!=null&&n.isAbstract)),!i.isLeaf&&(n!=null&&n.isLeaf)&&(i.isLeaf=!0),i;let a=new Td.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,ia.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let u=new Td.Edge(this.getNextEdgeId(),n,r);return(0,ia.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(u),u}let a=t,o=new Td.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodeByTypeName.get(t);if(n)return n;let r=new Td.EntityDataNode(t);return this.entityDataNodeByTypeName.set(t,r),r}getNextEdgeId(){return this.edgeId+=1}getNextWalkerIndex(){return this.walkerIndex+=1}setNodeInaccessible(t){let n=this.nodesByTypeName.get(t);if(n)for(let r of n)r.isInaccessible=!0}initializeNode(t,n){let r=this.entityDataNodeByTypeName.get(t);if(ZE.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByName=n,a.handleInaccessibleEdges(),a.isLeaf=!1,!!r){a.hasEntitySiblings=!0;for(let o of a.satisfiedFieldSets){if(a.externalFieldSets.has(o))continue;let u=r.targetSubgraphNamesByFieldSet.get(o);for(let l of u!=null?u:[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Td.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}visitEntity({encounteredEntityNodeNames:t,entityNodeName:n,relativeOriginPaths:r,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}){let l=this.nodeByNodeName.get(n);if(!l)throw new Error(`Fatal: Could not find entity node for "${n}".`);u.add(n);let d=this.nodesByTypeName.get(l.typeName);if(!(d!=null&&d.length))throw new Error(`Fatal: Could not find any nodes for "${n}".`);let p=new ufe.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u}),E=l.getAllAccessibleEntityNodeNames();for(let I of d){if(I.nodeName!==l.nodeName&&!E.has(I.nodeName))continue;let{areDescendantsResolved:v}=p.visitEntityDescendantConcreteNode({node:I,selectionPath:""});if(v)return}for(let[I,v]of p.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:I,relativeOriginPaths:(0,xc.getMultipliedRelativeOriginPaths)({relativeOriginPaths:r,selectionPath:v}),resDataByRelativeOriginPath:i,resolvedPaths:a,subgraphNameByUnresolvablePath:o,visitedEntities:u})}validate(){for(let t of this.rootNodeByTypeName.values())for(let[n,r]of t.headToSharedTailEdges){let i=r.length>1;if(!i){let p=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(p))continue;this.resolvedRootFieldNodeNames.add(p)}let a=new cfe.RootFieldWalker({index:this.getNextWalkerIndex(),nodeResolutionDataByNodeName:this.resDataByNodeName});if(a.visitRootFieldEdges({edges:r,rootTypeName:t.typeName.toLowerCase()}).areDescendantsResolved)continue;let o=i?a.entityNodeNamesByPath.size>0:a.pathsByEntityNodeName.size>0;if(a.unresolvablePaths.size<1&&!o)continue;let u=(0,ia.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,xc.newRootFieldData)(t.typeName,n,u.subgraphNames);if(!o)return{errors:(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:a.unresolvablePaths,resDataByPath:a.resDataByPath,rootFieldData:l}),success:!1};let d=this.validateEntities({isSharedRootField:i,rootFieldData:l,walker:a});if(!d.success)return d}return{success:!0}}consolidateUnresolvableRootWithEntityPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of i.unresolvablePaths){if(!a.startsWith(t))continue;let o=a.slice(t.length),u=(0,ia.getOrThrowError)(i.resDataByPath,a,"rootFieldWalker.unresolvablePaths"),l=n.get(o);if(l){if(u.addData(l),l.addData(u),!u.isResolved()){i.unresolvablePaths.delete(a);continue}i.unresolvablePaths.delete(a),r.delete(o)}}}consolidateUnresolvableEntityWithRootPaths({pathFromRoot:t,resDataByRelativeOriginPath:n,subgraphNameByUnresolvablePath:r,walker:i}){for(let a of r.keys()){let o=(0,ia.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),u=`${t}${a}`,l=i.resDataByPath.get(u);l&&(o.addData(l),l.addData(o)),o.isResolved()&&r.delete(a)}}validateSharedRootFieldEntities({rootFieldData:t,walker:n}){let r=new Set;for(let[i,a]of n.entityNodeNamesByPath){let o=new Map,u=new Map;for(let d of a)this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:d,resDataByRelativeOriginPath:u,resolvedPaths:r,subgraphNameByUnresolvablePath:o,visitedEntities:new Set});if(this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n}),o.size<1)continue;this.consolidateUnresolvableEntityWithRootPaths({pathFromRoot:i,resDataByRelativeOriginPath:u,subgraphNameByUnresolvablePath:o,walker:n});let l=new Array;if(o.size>0&&l.push(...this.getSharedEntityResolvabilityErrors({entityNodeNames:a,resDataByPath:u,pathFromRoot:i,rootFieldData:t,subgraphNameByUnresolvablePath:o})),n.unresolvablePaths.size>0&&l.push(...(0,xc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(l.length<1))return{errors:l,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,xc.generateRootResolvabilityErrors)({resDataByPath:n.resDataByPath,rootFieldData:t,unresolvablePaths:n.unresolvablePaths}),success:!1}:{success:!0}}validateRootFieldEntities({rootFieldData:t,walker:n}){var i;let r=new Set;for(let[a,o]of n.pathsByEntityNodeName){let u=new Map;if(this.resDataByNodeName.has(a))continue;let l=(0,ia.getValueOrDefault)(this.resDataByRelativePathByEntity,a,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:a,resDataByRelativeOriginPath:l,resolvedPaths:r,subgraphNameByUnresolvablePath:u,visitedEntities:(0,ia.getValueOrDefault)(this.visitedEntitiesByOriginEntity,a,()=>new Set)}),!(u.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:a,pathFromRoot:(i=(0,ia.getFirstEntry)(o))!=null?i:"",rootFieldData:t,subgraphNameByUnresolvablePath:u}),success:!1}}return{success:!0}}validateEntities(t){return t.isSharedRootField?this.validateSharedRootFieldEntities(t):this.validateRootFieldEntities(t)}getEntityResolvabilityErrors({entityNodeName:t,pathFromRoot:n,rootFieldData:r,subgraphNameByUnresolvablePath:i}){let a=(0,ia.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(ZE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:u}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateEntityResolvabilityErrors)({entityAncestorData:{fieldSetsByTargetSubgraphName:u,subgraphName:"",typeName:o},pathFromRoot:n,resDataByPath:a,rootFieldData:r,subgraphNameByUnresolvablePath:i})}getSharedEntityResolvabilityErrors({entityNodeNames:t,pathFromRoot:n,rootFieldData:r,resDataByPath:i,subgraphNameByUnresolvablePath:a}){let o,u=new Array;for(let d of t){let p=d.split(ZE.LITERAL_PERIOD);o!=null||(o=p[1]),u.push(p[0])}let{fieldSetsByTargetSubgraphName:l}=(0,ia.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,xc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:u,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};eh.Graph=ab});var ob=w(th=>{"use strict";m();T();N();Object.defineProperty(th,"__esModule",{value:!0});th.newFieldSetConditionData=lfe;th.newConfigurationData=dfe;function lfe({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function dfe(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var lb=w(qc=>{"use strict";m();T();N();Object.defineProperty(qc,"__esModule",{value:!0});qc.NormalizationFactory=void 0;qc.normalizeSubgraphFromString=Nfe;qc.normalizeSubgraph=TV;qc.batchNormalize=Tfe;var W=Ie(),bn=Fr(),oi=Ip(),Ur=Du(),Yn=yp(),se=$i(),vp=dd(),ffe=Vv(),_i=TE(),pfe=MD(),us=gp(),mV=$D(),os=Gf(),nn=$l(),lr=Su(),cb=sb(),nh=yE(),X=zn(),mfe=ql(),Ve=wr(),Op=ob(),NV=IE();function Nfe(e,t=!0){let{error:n,documentNode:r}=(0,bn.safeParse)(e,t);return n||!r?{errors:[(0,se.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Sp(new cb.Graph).normalize(r)}function TV(e,t,n){return new Sp(n||new cb.Graph,t).normalize(e)}var Dp,ub,rh,EV,Sp=class{constructor(t,n){ec(this,Dp);ec(this,rh);g(this,"argumentName","");g(this,"authorizationDataByParentTypeName",new Map);g(this,"concreteTypeNamesByAbstractTypeName",new Map);g(this,"conditionalFieldDataByCoords",new Map);g(this,"configurationDataByTypeName",new Map);g(this,"customDirectiveDefinitionByName",new Map);g(this,"definedDirectiveNames",new Set);g(this,"directiveDefinitionByName",new Map);g(this,"directiveDefinitionDataByName",(0,oi.initializeDirectiveDefinitionDatas)());g(this,"doesParentRequireFetchReasons",!1);g(this,"edfsDirectiveReferences",new Set);g(this,"errors",new Array);g(this,"entityDataByTypeName",new Map);g(this,"entityInterfaceDataByTypeName",new Map);g(this,"eventsConfigurations",new Map);g(this,"fieldSetDataByTypeName",new Map);g(this,"internalGraph");g(this,"invalidConfigureDescriptionNodeDatas",[]);g(this,"invalidORScopesCoords",new Set);g(this,"invalidRepeatedDirectiveNameByCoords",new Map);g(this,"isParentObjectExternal",!1);g(this,"isParentObjectShareable",!1);g(this,"isSubgraphEventDrivenGraph",!1);g(this,"isSubgraphVersionTwo",!1);g(this,"keyFieldSetDatasByTypeName",new Map);g(this,"lastParentNodeKind",W.Kind.NULL);g(this,"lastChildNodeKind",W.Kind.NULL);g(this,"parentTypeNamesWithAuthDirectives",new Set);g(this,"keyFieldSetsByEntityTypeNameByFieldCoords",new Map);g(this,"keyFieldNamesByParentTypeName",new Map);g(this,"fieldCoordsByNamedTypeName",new Map);g(this,"operationTypeNodeByTypeName",new Map);g(this,"originalParentTypeName","");g(this,"originalTypeNameByRenamedTypeName",new Map);g(this,"overridesByTargetSubgraphName",new Map);g(this,"parentDefinitionDataByTypeName",new Map);g(this,"schemaData");g(this,"referencedDirectiveNames",new Set);g(this,"referencedTypeNames",new Set);g(this,"renamedParentTypeName","");g(this,"subgraphName");g(this,"unvalidatedExternalFieldCoords",new Set);g(this,"usesEdfsNatsStreamConfiguration",!1);g(this,"warnings",[]);this.subgraphName=n||X.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByName:new Map,kind:W.Kind.SCHEMA_DEFINITION,name:X.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,lr.getTypeNodeNamedTypeName)(r.type);if(Ur.BASE_SCALARS.has(i)){r.namedTypeKind=W.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,nn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,se.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,Ve.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return X.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===W.Kind.NULL)return t.kind!==W.Kind.NON_NULL_TYPE;switch(t.kind){case W.Kind.LIST_TYPE:{if(n.kind!==W.Kind.LIST)return this.isArgumentValueValid((0,lr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case W.Kind.NAMED_TYPE:switch(t.name.value){case X.BOOLEAN_SCALAR:return n.kind===W.Kind.BOOLEAN;case X.FLOAT_SCALAR:return n.kind===W.Kind.FLOAT||n.kind===W.Kind.INT;case X.ID_SCALAR:return n.kind===W.Kind.STRING||n.kind===W.Kind.INT;case X.INT_SCALAR:return n.kind===W.Kind.INT;case X.FIELD_SET_SCALAR:case X.SCOPE_SCALAR:case X.STRING_SCALAR:return n.kind===W.Kind.STRING;case X.LINK_IMPORT:return!0;case X.LINK_PURPOSE:return n.kind!==W.Kind.ENUM?!1:n.value===X.SECURITY||n.value===X.EXECUTION;case X.SUBSCRIPTION_FIELD_CONDITION:case X.SUBSCRIPTION_FILTER_CONDITION:return n.kind===W.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===W.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===W.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==W.Kind.ENUM)return!1;let i=r.enumValueDataByName.get(n.value);return i?!i.directivesByName.has(X.INACCESSIBLE):!1}return r.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===W.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}handleFieldInheritableDirectives({directivesByName:t,fieldName:n,inheritedDirectiveNames:r,parentData:i}){this.doesParentRequireFetchReasons&&!t.has(X.REQUIRE_FETCH_REASONS)&&(t.set(X.REQUIRE_FETCH_REASONS,[(0,Ve.generateSimpleDirective)(X.REQUIRE_FETCH_REASONS)]),r.add(X.REQUIRE_FETCH_REASONS)),(this.doesParentRequireFetchReasons||t.has(X.REQUIRE_FETCH_REASONS))&&i.requireFetchReasonsFieldNames.add(n),(0,Yn.isObjectDefinitionData)(i)&&(this.isParentObjectExternal&&!t.has(X.EXTERNAL)&&(t.set(X.EXTERNAL,[(0,Ve.generateSimpleDirective)(X.EXTERNAL)]),r.add(X.EXTERNAL)),t.has(X.EXTERNAL)&&this.unvalidatedExternalFieldCoords.add(`${i.name}.${n}`),this.isParentObjectShareable&&!t.has(X.SHAREABLE)&&(t.set(X.SHAREABLE,[(0,Ve.generateSimpleDirective)(X.SHAREABLE)]),r.add(X.SHAREABLE)))}extractDirectives(t,n){if(!t.directives)return n;let r=(0,Yn.isCompositeOutputNodeKind)(t.kind),i=(0,Yn.isObjectNodeKind)(t.kind);for(let a of t.directives){let o=a.name.value;o===X.SHAREABLE?(0,Ve.getValueOrDefault)(n,o,()=>[a]):(0,Ve.getValueOrDefault)(n,o,()=>[]).push(a),r&&(this.doesParentRequireFetchReasons||(this.doesParentRequireFetchReasons=o===X.REQUIRE_FETCH_REASONS),i&&(this.isParentObjectExternal||(this.isParentObjectExternal=o===X.EXTERNAL),this.isParentObjectShareable||(this.isParentObjectShareable=o===X.SHAREABLE)))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let u=i.name.value,l=t.kind===W.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=u===X.AUTHENTICATED,p=(0,nn.isFieldData)(t),E=u===X.OVERRIDE,I=u===X.REQUIRES_SCOPES,v=u===X.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&p&&((0,nn.isTypeRequired)(t.type)?a.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,_i.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let A=new Set,U=new Set,j=new Set,Q=[];for(let pe of i.arguments){let le=pe.name.value;if(A.has(le)){U.add(le);continue}A.add(le);let Ae=n.argumentTypeNodeByName.get(le);if(!Ae){j.add(le);continue}if(!this.isArgumentValueValid(Ae.typeNode,pe.value)){a.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(pe.value),`@${u}`,le,(0,_i.printTypeNode)(Ae.typeNode)));continue}if(E&&p){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:pe.value.value});continue}if(v&&p){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||le!==X.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:pe.value.values,requiredScopes:Q})}U.size>0&&a.push((0,se.duplicateDirectiveArgumentDefinitionsErrorMessage)([...U])),j.size>0&&a.push((0,se.unexpectedDirectiveArgumentErrorMessage)(u,[...j]));let ee=(0,Ve.getEntriesNotInHashSet)(o,A);if(ee.length>0&&a.push((0,se.undefinedRequiredArgumentsErrorMessage)(u,o,ee)),a.length>0||!I)return a;let ne=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,Yn.newAuthorizationData)(l));if(t.kind!==W.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ne.requiredScopes.push(...Q);else{let pe=(0,Ve.getValueOrDefault)(ne.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));pe.inheritedData.requiredScopes.push(...Q),pe.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByName){let o=this.directiveDefinitionDataByName.get(i);if(!o){r.has(i)||(this.errors.push((0,se.undefinedDirectiveError)(i,n)),r.add(i));continue}let u=[],l=(0,bn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||u.push((0,se.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(i)||(p.add(i),u.push((0,se.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let p=0;p0&&this.errors.push((0,se.invalidDirectiveError)(i,n,(0,Ve.numberToOrdinal)(p+1),E))}}switch(t.kind){case W.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.fieldDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}default:return}}getNodeExtensionType(t,n,r=!1){return t?os.ExtensionType.REAL:r||!n.has(X.EXTENDS)?os.ExtensionType.NONE:os.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case os.ExtensionType.EXTENDS:case os.ExtensionType.NONE:{if(n===os.ExtensionType.REAL)return;this.errors.push((0,se.duplicateTypeDefinitionError)((0,Ve.kindToNodeType)(t.kind),t.name));return}default:t.extensionType=n}}extractConfigureDescriptionData(t,n){var i,a;if(!n.arguments||n.arguments.length<1){t.description||this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,{propagate:!0,description:((i=t.description)==null?void 0:i.value)||""});return}let r={propagate:!0,description:((a=t.description)==null?void 0:a.value)||""};for(let o of n.arguments)switch(o.name.value){case X.PROPAGATE:{if(o.value.kind!=W.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case X.DESCRIPTION_OVERRIDE:{if(o.value.kind!=W.Kind.STRING)return;r.description=o.value.value;break}default:return}!t.description&&!r.description&&this.invalidConfigureDescriptionNodeDatas.push(t),t.configureDescriptionDataBySubgraphName.set(this.subgraphName,r)}extractConfigureDescriptionsData(t){let n=t.directivesByName.get(X.CONFIGURE_DESCRIPTION);n&&n.length==1&&this.extractConfigureDescriptionData(t,n[0])}extractImplementedInterfaceTypeNames(t,n){if(!t.interfaces)return n;let r=t.name.value;for(let i of t.interfaces){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateImplementedInterfaceError)((0,Yn.kindToConvertedTypeString)(t.kind),r,a));continue}n.add(a)}return n}updateCompositeOutputDataByNode(t,n,r){this.setParentDataExtensionType(n,r),this.extractImplementedInterfaceTypeNames(t,n.implementedInterfaceTypeNames),n.description||(n.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(n),n.isEntity||(n.isEntity=n.directivesByName.has(X.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByName.has(X.INACCESSIBLE)),n.subgraphNames.add(this.subgraphName)}addConcreteTypeNamesForImplementedInterfaces(t,n){for(let r of t)(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(n),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(n),n,!0)}extractArguments(t,n){var o;if(!((o=n.arguments)!=null&&o.length))return t;let r=n.name.value,i=`${this.originalParentTypeName}.${r}`,a=new Set;for(let u of n.arguments){let l=u.name.value;if(t.has(l)){a.add(l);continue}this.addInputValueDataByNode({fieldName:r,inputValueDataByName:t,isArgument:!0,node:u,originalParentTypeName:this.originalParentTypeName,renamedParentTypeName:this.renamedParentTypeName})}return a.size>0&&this.errors.push((0,se.duplicateArgumentsError)(i,[...a])),t}addPersistedDirectiveDefinitionDataByNode(t,n,r){let i=n.name.value,a=`@${i}`,o=new Map;for(let u of n.arguments||[])this.addInputValueDataByNode({inputValueDataByName:o,isArgument:!0,node:u,originalParentTypeName:a});t.set(i,{argumentDataByName:o,executableLocations:r,name:i,repeatable:n.repeatable,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)(n.description)})}extractDirectiveLocations(t,n){let r=new Set,i=new Set;for(let a of t.locations){let o=a.value;if(!i.has(o)){if(!X.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!vp.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,se.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,se.duplicateDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}r.add(o)}}return r}extractArgumentData(t,n){let r=new Map,i=new Set,a=new Set,o={argumentTypeNodeByName:r,optionalArgumentNames:i,requiredArgumentNames:a};if(!t)return o;let u=new Set;for(let l of t){let d=l.name.value;if(r.has(d)){u.add(d);continue}l.defaultValue&&i.add(d),(0,nn.isTypeRequired)(l.type)&&!l.defaultValue&&a.add(d),r.set(d,{name:d,typeNode:l.type,defaultValue:l.defaultValue})}return u.size>0&&n.push((0,se.duplicateDirectiveDefinitionArgumentErrorMessage)([...u])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,se.duplicateDirectiveDefinitionError)(n)),!1;this.definedDirectiveNames.add(n);let r=Ur.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.get(n);if(r)return this.directiveDefinitionByName.set(n,r),this.isSubgraphVersionTwo=!0,!1;if(Ur.DIRECTIVE_DEFINITION_BY_NAME.has(n))return!1;this.directiveDefinitionByName.set(n,t);let i=[],{argumentTypeNodeByName:a,optionalArgumentNames:o,requiredArgumentNames:u}=this.extractArgumentData(t.arguments,i);return this.directiveDefinitionDataByName.set(n,{argumentTypeNodeByName:a,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,i),name:n,node:t,optionalArgumentNames:o,requiredArgumentNames:u}),i.length>0&&this.errors.push((0,se.invalidDirectiveDefinitionError)(n,i)),!0}addFieldDataByNode(t,n,r,i,a=new Set){let o=n.name.value,u=this.renamedParentTypeName||this.originalParentTypeName,l=`${this.originalParentTypeName}.${o}`,{isExternal:d,isShareable:p}=(0,nn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),E=(0,lr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,nn.newExternalFieldData)(d)]]),federatedCoords:`${u}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(X.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,p]]),kind:W.Kind.FIELD_DEFINITION,name:o,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(n.type,l,this.errors),directivesByName:i,description:(0,bn.formatDescription)(n.description)};return Ur.BASE_SCALARS.has(I.namedTypeName)||this.referencedTypeNames.add(I.namedTypeName),this.extractConfigureDescriptionsData(I),t.set(o,I),I}addInputValueDataByNode({fieldName:t,inputValueDataByName:n,isArgument:r,node:i,originalParentTypeName:a,renamedParentTypeName:o}){let u=o||a,l=i.name.value,d=r?`${a}${t?`.${t}`:""}(${l}: ...)`:`${a}.${l}`;i.defaultValue&&!(0,nn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,se.incompatibleInputValueDefaultValueTypeError)((r?X.ARGUMENT:X.INPUT_FIELD)+` "${l}"`,d,(0,_i.printTypeNode)(i.type),(0,W.print)(i.defaultValue)));let p=r?`${u}${t?`.${t}`:""}(${l}: ...)`:`${u}.${l}`,E=(0,lr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByName:this.extractDirectives(i,new Map),federatedCoords:p,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?W.Kind.ARGUMENT:W.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:Ur.BASE_SCALARS.has(E)?W.Kind.SCALAR_TYPE_DEFINITION:W.Kind.NULL,namedTypeName:E,node:(0,lr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),renamedParentTypeName:u,requiredSubgraphNames:new Set((0,nn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,lr.getMutableTypeNode)(i.type,a,this.errors),defaultValue:i.defaultValue,description:(0,bn.formatDescription)(i.description)};this.extractConfigureDescriptionsData(I),n.set(l,I)}upsertInterfaceDataByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a),u=this.entityInterfaceDataByTypeName.get(r);if(u&&t.fields)for(let d of t.fields)u.interfaceFieldNames.add(d.name.value);if(i){if(i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(l),this.parentDefinitionDataByTypeName.set(r,l)}getRenamedRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(!n)return t;switch(n){case W.OperationTypeNode.MUTATION:return X.MUTATION;case W.OperationTypeNode.SUBSCRIPTION:return X.SUBSCRIPTION;default:return X.QUERY}}addInterfaceObjectFieldsByNode(t){let n=t.name.value,r=this.entityInterfaceDataByTypeName.get(n);if(!(!r||!r.isInterfaceObject||!t.fields))for(let i of t.fields)r.interfaceObjectFieldNames.add(i.name.value)}upsertObjectDataByNode(t,n=!1){var p;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(p=i==null?void 0:i.directivesByName)!=null?p:new Map),o=this.isTypeNameRootType(r),u=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==W.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,u),a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(X.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:u,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(X.KEY),isInaccessible:a.has(X.INACCESSIBLE),isRootType:o,kind:W.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),requireFetchReasonsFieldNames:new Set,renamedTypeName:this.getRenamedRootTypeName(r),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(d),this.parentDefinitionDataByTypeName.set(r,d)}upsertEnumDataByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i);return}let u={appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,enumValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,lr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}upsertInputObjectByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i)return i.kind!==W.Kind.INPUT_OBJECT_TYPE_DEFINITION?(this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind))),{success:!1}):(this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(X.INACCESSIBLE)),i.subgraphNames.add(this.subgraphName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),this.extractConfigureDescriptionsData(i),{success:!0,data:i});let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(X.INACCESSIBLE),kind:W.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,lr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};return this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u),{success:!0,data:u}}upsertScalarByNode(t,n=!1){let r=t.name.value;this.internalGraph.addOrUpdateNode(r,{isLeaf:!0});let i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==W.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,lr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractUnionMembers(t,n){if(!t.types)return n;let r=t.name.value;for(let i of t.types){let a=i.name.value;if(n.has(a)){this.errors.push((0,se.duplicateUnionMemberDefinitionError)(r,a));continue}(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),Ur.BASE_SCALARS.has(a)||this.referencedTypeNames.add(a),n.set(a,i)}return n}upsertUnionByNode(t,n=!1){let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(i==null?void 0:i.directivesByName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==W.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,se.multipleNamedTypeDefinitionError)(r,(0,Ve.kindToNodeType)(i.kind),(0,Yn.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),this.extractUnionMembers(t,i.memberByMemberTypeName),i.description||(i.description=(0,bn.formatDescription)("description"in t?t.description:void 0)),i.subgraphNames.add(this.subgraphName),this.extractConfigureDescriptionsData(i);return}let u={configureDescriptionDataBySubgraphName:new Map,directivesByName:a,extensionType:o,kind:W.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,lr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,nn.newPersistedDirectivesData)(),subgraphNames:new Set([this.subgraphName]),description:(0,bn.formatDescription)("description"in t?t.description:void 0)};this.extractConfigureDescriptionsData(u),this.parentDefinitionDataByTypeName.set(r,u)}extractKeyFieldSets(t,n){var a;let r=t.name.value;if(!((a=t.directives)!=null&&a.length)){this.errors.push((0,se.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==X.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let u,l=!1;for(let v of o.arguments){if(v.name.value===X.RESOLVABLE){v.value.kind===W.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==X.FIELDS){u=void 0;break}if(v.value.kind!==W.Kind.STRING){u=void 0;break}u=v.value.value}if(u===void 0)continue;let{error:d,documentNode:p}=(0,bn.safeParse)("{"+u+"}");if(d||!p){this.errors.push((0,se.invalidDirectiveError)(X.KEY,r,(0,Ve.numberToOrdinal)(i),[(0,se.unparsableFieldSetErrorMessage)(u,d)]));continue}let E=(0,oi.getNormalizedFieldSet)(p),I=n.get(E);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(E,{documentNode:p,isUnresolvable:l,normalizedFieldSet:E,rawFieldSet:u})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,Ve.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,lr.getTypeNodeNamedTypeName)(a.node.type),u=`${i}.${r}`;if(Ur.BASE_SCALARS.has(o))return{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})};let l=this.parentDefinitionDataByTypeName.get(o);return l?l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION&&l.kind!==W.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,se.incompatibleTypeWithProvidesErrorMessage)({fieldCoords:u,responseType:o,subgraphName:this.subgraphName})}:{fieldSetParentData:l}:{errorString:(0,se.unknownNamedTypeErrorMessage)(u,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:u}=(0,bn.safeParse)("{"+n+"}");if(o||!u)return{errorMessages:[(0,se.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],p=(0,oi.getConditionalFieldSetDirectiveName)(i),E=[],I=`${a}.${r}`,v=(0,oi.getInitialFieldCoordsPath)(i,I),A=[r],U=new Set,j=[],Q=-1,ee=!0,ne=r,pe=!1;return(0,W.visit)(u,{Argument:{enter(){return!1}},Field:{enter(le){var an,kr;let Ae=d[Q],Me=Ae.name;if(Ae.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.invalidSelectionOnUnionErrorMessage)(n,v,Me)),W.BREAK;let Ze=le.name.value,Z=`${Me}.${Ze}`;if(l.unvalidatedExternalFieldCoords.delete(Z),ee)return j.push((0,se.invalidSelectionSetErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Ae.kind))),W.BREAK;if(v.push(Z),A.push(Ze),ne=Ze,Ze===X.TYPENAME){if(i)return j.push((0,se.typeNameAlreadyProvidedErrorMessage)(Z,l.subgraphName)),W.BREAK;U.size<1&&El(an=l,Dp,ub).call(an,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}let ve=Ae.fieldDataByName.get(Ze);if(!ve)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,Me,Ze)),W.BREAK;if(E[Q].has(Ze))return j.push((0,se.duplicateFieldInFieldSetErrorMessage)(n,Z)),W.BREAK;E[Q].add(Ze);let{isDefinedExternal:gt,isUnconditionallyProvided:rn}=(0,Ve.getOrThrowError)(ve.externalFieldDataBySubgraphName,l.subgraphName,`${Z}.externalFieldDataBySubgraphName`),un=gt&&!rn;rn||(pe=!0);let In=(0,lr.getTypeNodeNamedTypeName)(ve.node.type),xt=l.parentDefinitionDataByTypeName.get(In);if(Ur.BASE_SCALARS.has(In)||(xt==null?void 0:xt.kind)===W.Kind.SCALAR_TYPE_DEFINITION||(xt==null?void 0:xt.kind)===W.Kind.ENUM_TYPE_DEFINITION){if(U.size<1&&!gt){El(kr=l,Dp,ub).call(kr,{currentFieldCoords:Z,directiveCoords:I,directiveName:p,fieldSet:n});return}if(U.size<1&&rn){l.isSubgraphVersionTwo?j.push((0,se.fieldAlreadyProvidedErrorMessage)(Z,l.subgraphName,p)):l.warnings.push((0,us.fieldAlreadyProvidedWarning)(Z,p,I,l.subgraphName));return}if(!un&&!i)return;let nr=(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData),En=(0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]});i?nr.providedBy.push(En):nr.requiredBy.push(En);return}if(!xt)return j.push((0,se.unknownTypeInFieldSetErrorMessage)(n,Z,In)),W.BREAK;if(gt&&(i&&(0,Ve.getValueOrDefault)(l.conditionalFieldDataByCoords,Z,nn.newConditionalFieldData).providedBy.push((0,Op.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...A]})),U.add(Z)),xt.kind===W.Kind.OBJECT_TYPE_DEFINITION||xt.kind===W.Kind.INTERFACE_TYPE_DEFINITION||xt.kind===W.Kind.UNION_TYPE_DEFINITION){ee=!0,d.push(xt);return}},leave(){U.delete(v.pop()||""),A.pop()}},InlineFragment:{enter(le){let Ae=d[Q],Me=Ae.name,Ze=v.length<1?t.name:v[v.length-1];if(!le.typeCondition)return j.push((0,se.inlineFragmentWithoutTypeConditionErrorMessage)(n,Ze)),W.BREAK;let Z=le.typeCondition.name.value;if(Z===Me){d.push(Ae),ee=!0;return}if(!(0,bn.isKindAbstract)(Ae.kind))return j.push((0,se.invalidInlineFragmentTypeErrorMessage)(n,v,Z,Me)),W.BREAK;let ve=l.parentDefinitionDataByTypeName.get(Z);if(!ve)return j.push((0,se.unknownInlineFragmentTypeConditionErrorMessage)(n,v,Me,Z)),W.BREAK;switch(ee=!0,ve.kind){case W.Kind.INTERFACE_TYPE_DEFINITION:{if(!ve.implementedInterfaceTypeNames.has(Me))break;d.push(ve);return}case W.Kind.OBJECT_TYPE_DEFINITION:{let gt=l.concreteTypeNamesByAbstractTypeName.get(Me);if(!gt||!gt.has(Z))break;d.push(ve);return}case W.Kind.UNION_TYPE_DEFINITION:{d.push(ve);return}default:return j.push((0,se.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,Me,Z,(0,Ve.kindToNodeType)(ve.kind))),W.BREAK}return j.push((0,se.invalidInlineFragmentTypeConditionErrorMessage)(n,v,Z,(0,Ve.kindToNodeType)(Ae.kind),Me)),W.BREAK}},SelectionSet:{enter(){if(!ee){let le=d[Q];if(le.kind===W.Kind.UNION_TYPE_DEFINITION)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;if(ne===X.TYPENAME)return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,X.STRING_SCALAR,(0,Ve.kindToNodeType)(W.Kind.SCALAR_TYPE_DEFINITION))),W.BREAK;let Ae=le.fieldDataByName.get(ne);if(!Ae)return j.push((0,se.undefinedFieldInFieldSetErrorMessage)(n,le.name,ne)),W.BREAK;let Me=(0,lr.getTypeNodeNamedTypeName)(Ae.node.type),Ze=l.parentDefinitionDataByTypeName.get(Me),Z=Ze?Ze.kind:W.Kind.SCALAR_TYPE_DEFINITION;return j.push((0,se.invalidSelectionSetDefinitionErrorMessage)(n,v,Me,(0,Ve.kindToNodeType)(Z))),W.BREAK}if(Q+=1,ee=!1,Q<0||Q>=d.length)return j.push((0,se.unparsableFieldSetSelectionErrorMessage)(n,ne)),W.BREAK;E.push(new Set)},leave(){if(ee){let le=d[Q+1];j.push((0,se.invalidSelectionSetErrorMessage)(n,v,le.name,(0,Ve.kindToNodeType)(le.kind))),ee=!1}Q-=1,d.pop(),E.pop()}}}),j.length>0||!pe?{errorMessages:j}:{configuration:{fieldName:r,selectionSet:(0,oi.getNormalizedFieldSet)(u)},errorMessages:j}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,nn.getParentTypeName)(t);for(let[u,l]of n){let{fieldSetParentData:d,errorString:p}=this.getFieldSetParent(r,t,u,o),E=`${o}.${u}`;if(p){i.push(p);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,u,r,o);if(I.length>0){i.push(` On field "${E}": -`+I.join(X.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,se.invalidProvidesOrRequiresDirectivesError)((0,oi.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByName.has(X.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let u=this.parentDefinitionDataByTypeName.get(o);if(Ur.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!u)continue;if(u.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){i.set(u.name,(0,Ve.kindToNodeType)(u.kind));continue}if(t.name===u.name){a=!0;continue}let l={invalidFieldImplementations:new Map,unimplementedFields:[]},d=!1;for(let[p,E]of u.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${p}`);let I=!1,v=t.fieldDataByName.get(p);if(!v){d=!0,l.unimplementedFields.push(p);continue}let A={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,_i.printTypeNode)(E.node.type),unimplementedArguments:new Set};(0,nn.isTypeValidImplementation)(E.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,A.implementedResponseType=(0,_i.printTypeNode)(v.node.type));let U=new Set;for(let[j,Q]of E.argumentDataByName){U.add(j);let ee=v.argumentDataByName.get(j);if(!ee){d=!0,I=!0,A.unimplementedArguments.add(j);continue}let ne=(0,_i.printTypeNode)(ee.type),pe=(0,_i.printTypeNode)(Q.type);pe!==ne&&(d=!0,I=!0,A.invalidImplementedArguments.push({actualType:ne,argumentName:j,expectedType:pe}))}for(let[j,Q]of v.argumentDataByName)U.has(j)||Q.type.kind===W.Kind.NON_NULL_TYPE&&(d=!0,I=!0,A.invalidAdditionalArguments.add(j));!n&&v.isInaccessible&&!E.isInaccessible&&(d=!0,I=!0,A.isInaccessible=!0),I&&l.invalidFieldImplementations.set(p,A)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,se.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,se.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,se.invalidInterfaceImplementationError)(t.name,(0,Ve.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,Ve.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,Yn.newAuthorizationData)(n));if(t.kind===W.Kind.FIELD_DEFINITION){let i=(0,Ve.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,Yn.newFieldAuthorizationData)(t.name));i.inheritedData.requiresAuthentication=!0,i.originalData.requiresAuthentication=!0}else r.requiresAuthentication=!0,this.parentTypeNamesWithAuthDirectives.add(n)}handleOverrideDirective({data:t,directiveCoords:n,errorMessages:r,targetSubgraphName:i}){if(i===this.subgraphName){r.push((0,se.equivalentSourceAndTargetOverrideErrorMessage)(i,n));return}let a=(0,Ve.getValueOrDefault)(this.overridesByTargetSubgraphName,i,()=>new Map);(0,Ve.getValueOrDefault)(a,t.renamedParentTypeName,()=>new Set).add(t.name)}handleSemanticNonNullDirective({data:t,directiveNode:n,errorMessages:r}){var E;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case W.Kind.LIST_TYPE:{o+=1,a=a.type;break}case W.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let u=(E=n.arguments)==null?void 0:E.find(I=>I.name.value===X.LEVELS);if(!u||u.value.kind!==W.Kind.LIST){r.push(se.semanticNonNullArgumentErrorMessage);return}let l=u.value.values,d=(0,_i.printTypeNode)(t.type),p=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,se.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,se.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){p.add(v);continue}r.push((0,se.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,p)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>Ur.MAX_OR_SCOPES){this.invalidORScopesCoords.add(t);return}for(let i of n){let a=new Set;for(let o of i.values)a.add(o.value);a.size<1||(0,Yn.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPIC:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.TOPIC));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.TOPICS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.TOPICS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.TOPICS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_KAFKA,topics:a,type:X.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],u=X.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case X.SUBJECT:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push((0,se.invalidEventSubjectErrorMessage)(X.SUBJECT));continue}(0,oi.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case X.PROVIDER_ID:{if(l.value.kind!==W.Kind.STRING||l.value.value.length<1){a.push(se.invalidEventProviderIdErrorMessage);continue}u=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:u,providerType:X.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID,u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let p of t.arguments||[])switch(p.name.value){case X.SUBJECTS:{if(p.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.SUBJECTS));continue}for(let E of p.value.values){if(E.kind!==W.Kind.STRING||E.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.SUBJECTS));break}(0,oi.validateArgumentTemplateReferences)(E.value,n,i),a.push(E.value)}break}case X.PROVIDER_ID:{if(p.value.kind!==W.Kind.STRING||p.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=p.value.value;break}case X.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,p.value.kind!==W.Kind.OBJECT||p.value.fields.length<1){i.push(se.invalidNatsStreamInputErrorMessage);continue}let E=!0,I=new Set,v=new Set(vp.STREAM_CONFIGURATION_FIELD_NAMES),A=new Set([X.CONSUMER_NAME,X.STREAM_NAME]),U=new Set,j=new Set;for(let Q of p.value.fields){let ee=Q.name.value;if(!vp.STREAM_CONFIGURATION_FIELD_NAMES.has(ee)){I.add(ee),E=!1;continue}if(v.has(ee))v.delete(ee);else{U.add(ee),E=!1;continue}switch(A.has(ee)&&A.delete(ee),ee){case X.CONSUMER_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}l=Q.value.value;break;case X.STREAM_NAME:if(Q.value.kind!=W.Kind.STRING||Q.value.value.length<1){j.add(ee),E=!1;continue}d=Q.value.value;break;case X.CONSUMER_INACTIVE_THRESHOLD:if(Q.value.kind!=W.Kind.INT){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1;continue}try{u=parseInt(Q.value.value,10)}catch(ne){i.push((0,se.invalidArgumentValueErrorMessage)((0,W.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",X.INT_SCALAR)),E=!1}break}}(!E||A.size>0)&&i.push((0,se.invalidNatsStreamInputFieldsErrorMessage)([...A],[...U],[...j],[...I]))}}if(!(i.length>0))return u<0?(u=nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):u>mfe.MAX_INT32&&(u=0,this.warnings.push((0,us.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),k({fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_NATS,subjects:a,type:X.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:u,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNEL:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push((0,se.invalidEventSubjectErrorMessage)(X.CHANNEL));continue}(0,oi.validateArgumentTemplateReferences)(u.value.value,n,i),a.push(u.value.value);break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=X.DEFAULT_EDFS_PROVIDER_ID;for(let u of t.arguments||[])switch(u.name.value){case X.CHANNELS:{if(u.value.kind!==W.Kind.LIST){i.push((0,se.invalidEventSubjectsErrorMessage)(X.CHANNELS));continue}for(let l of u.value.values){if(l.kind!==W.Kind.STRING||l.value.length<1){i.push((0,se.invalidEventSubjectsItemErrorMessage)(X.CHANNELS));break}(0,oi.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case X.PROVIDER_ID:{if(u.value.kind!==W.Kind.STRING||u.value.value.length<1){i.push(se.invalidEventProviderIdErrorMessage);continue}o=u.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:X.PROVIDER_TYPE_REDIS,channels:a,type:X.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===W.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===X.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,se.invalidSubscriptionFilterLocationError)(r));return}}extractEventDirectivesToConfiguration(t,n){if(!t.directives)return;let r=t.name.value,i=`${this.renamedParentTypeName||this.originalParentTypeName}.${r}`;for(let a of t.directives){let o=[],u;switch(a.name.value){case X.EDFS_KAFKA_PUBLISH:u=this.getKafkaPublishConfiguration(a,n,r,o);break;case X.EDFS_KAFKA_SUBSCRIBE:u=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case X.EDFS_NATS_PUBLISH:{u=this.getNatsPublishAndRequestConfiguration(X.PUBLISH,a,n,r,o);break}case X.EDFS_NATS_REQUEST:{u=this.getNatsPublishAndRequestConfiguration(X.REQUEST,a,n,r,o);break}case X.EDFS_NATS_SUBSCRIBE:{u=this.getNatsSubscribeConfiguration(a,n,r,o);break}case X.EDFS_REDIS_PUBLISH:{u=this.getRedisPublishConfiguration(a,n,r,o);break}case X.EDFS_REDIS_SUBSCRIBE:{u=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,se.invalidEventDirectiveError)(a.name.value,i,o));continue}u&&(0,Ve.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(u)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case W.OperationTypeNode.MUTATION:return new Set([X.EDFS_KAFKA_PUBLISH,X.EDFS_NATS_PUBLISH,X.EDFS_NATS_REQUEST,X.EDFS_REDIS_PUBLISH]);case W.OperationTypeNode.QUERY:return new Set([X.EDFS_NATS_REQUEST]);case W.OperationTypeNode.SUBSCRIPTION:return new Set([X.EDFS_KAFKA_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case X.MUTATION:return W.OperationTypeNode.MUTATION;case X.QUERY:return W.OperationTypeNode.QUERY;case X.SUBSCRIPTION:return W.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,se.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[u,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${u}`,p=new Set;for(let j of vp.EVENT_DIRECTIVE_NAMES)l.directivesByName.has(j)&&p.add(j);let E=new Set;for(let j of p)o.has(j)||E.add(j);if((p.size<1||E.size>0)&&n.set(d,{definesDirectives:p.size>0,invalidDirectiveNames:[...E]}),a===W.OperationTypeNode.MUTATION){let j=(0,_i.printTypeNode)(l.type);j!==X.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,j);continue}let I=(0,_i.printTypeNode)(l.type),v=l.namedTypeName+"!",A=!1,U=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let j of U)if(A||(A=this.entityDataByTypeName.has(j)),A)break;(!A||I!==v)&&r.set(d,I)}}validateEventDrivenKeyDefinition(t,n){let r=this.keyFieldSetDatasByTypeName.get(t);if(r)for(let[i,{isUnresolvable:a}]of r)a||(0,Ve.getValueOrDefault)(n,t,()=>[]).push(i)}validateEventDrivenObjectFields(t,n,r,i){var a;for(let[o,u]of t){let l=`${u.originalParentTypeName}.${o}`;if(n.has(o)){(a=u.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal||r.set(l,o);continue}i.set(l,o)}}isEdfsPublishResultValid(){let t=this.parentDefinitionDataByTypeName.get(X.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==W.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==X.SUCCESS||(0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(!(0,nn.isInputObjectDefinitionData)(t)||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case X.CONSUMER_INACTIVE_THRESHOLD:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==W.Kind.INT||r.defaultValue.value!==`${nh.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case X.CONSUMER_NAME:case X.STREAM_NAME:{if((0,_i.printTypeNode)(r.type)!==X.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(){let t=[],n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Map,l=new Set,d=new Set;for(let[p,E]of this.parentDefinitionDataByTypeName){if(p===X.EDFS_PUBLISH_RESULT||p===X.EDFS_NATS_STREAM_CONFIGURATION||E.kind!==W.Kind.OBJECT_TYPE_DEFINITION)continue;if(E.isRootType){this.validateEventDrivenRootType(E,n,r,i);continue}let I=this.keyFieldNamesByParentTypeName.get(p);if(!I){d.add(p);continue}this.validateEventDrivenKeyDefinition(p,a),this.validateEventDrivenObjectFields(E.fieldDataByName,I,o,u)}if(this.isEdfsPublishResultValid()||t.push(se.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(X.EDFS_NATS_SUBSCRIBE)){let p=this.parentDefinitionDataByTypeName.get(X.EDFS_NATS_STREAM_CONFIGURATION);p&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(p)&&t.push(se.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(X.EDFS_NATS_STREAM_CONFIGURATION);let E=this.upsertInputObjectByNode(NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION);if(E.success)for(let I of NV.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION.fields)this.addInputValueDataByNode({fieldName:I.name.value,isArgument:!1,inputValueDataByName:E.data.inputValueDataByName,node:I,originalParentTypeName:X.EDFS_NATS_STREAM_CONFIGURATION});else return}n.size>0&&t.push((0,se.invalidRootTypeFieldEventsDirectivesErrorMessage)(n)),i.size>0&&t.push((0,se.invalidEventDrivenMutationResponseTypeErrorMessage)(i)),r.size>0&&t.push((0,se.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(r)),a.size>0&&t.push((0,se.invalidKeyFieldSetsEventDrivenErrorMessage)(a)),o.size>0&&t.push((0,se.nonExternalKeyFieldNamesEventDrivenErrorMessage)(o)),u.size>0&&t.push((0,se.nonKeyFieldNamesEventDrivenErrorMessage)(u)),l.size>0&&t.push((0,se.nonEntityObjectExtensionsEventDrivenErrorMessage)([...l])),d.size>0&&t.push((0,se.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...d])),t.length>0&&this.errors.push((0,se.invalidEventDrivenGraphError)(t))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,se.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,Ve.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,se.invalidUnionMemberTypeError)(t.name,n))}addConcreteTypeNamesForUnion(t){if(!t.types||t.types.length<1)return;let n=t.name.value;for(let r of t.types){let i=r.name.value;(0,Ve.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,n,()=>new Set).add(i),this.internalGraph.addEdge(this.internalGraph.addOrUpdateNode(n,{isAbstract:!0}),this.internalGraph.addOrUpdateNode(i),i,!0)}}addValidKeyFieldSetConfigurations(){for(let[t,n]of this.keyFieldSetDatasByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!0,i)),o=(0,oi.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&X.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let u=this.directiveDefinitionDataByName.get(a);if(!u)continue;if(!u.isRepeatable&&o.length>1){let p=(0,Ve.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);p.has(a)||(p.add(a),this.errors.push((0,se.invalidDirectiveError)(a,n,"1st",[(0,se.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==X.KEY){i.push(...o);continue}let l=[],d=new Set;for(let p=0;p0)return $(k({},t.description?{description:t.description}:{}),{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_DEFINITION,operationTypes:n});if(!(t.directivesByName.size<1))return{directives:this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),kind:W.Kind.SCHEMA_EXTENSION}}getUnionNodeByData(t){return t.node.description=t.description,t.node.directives=this.getValidFlattenedDirectiveArray(t.directivesByName,t.name),t.node.types=(0,Yn.mapToArrayOfValues)(t.memberByMemberTypeName),t.node}evaluateExternalKeyFields(){let t=[];for(let[n,r]of this.keyFieldSetDatasByTypeName){let i=this.parentDefinitionDataByTypeName.get(n);if(!i||i.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&i.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){t.push(n),this.errors.push((0,se.undefinedCompositeOutputTypeError)(n));continue}let a=this;for(let o of r.values()){let u=[i],l=new Map,d=-1,p=!0;if((0,W.visit)(o.documentNode,{Argument:{enter(){return W.BREAK}},Field:{enter(E){let I=u[d],v=I.name;if(p)return W.BREAK;let A=E.name.value,U=`${v}.${A}`;a.unvalidatedExternalFieldCoords.delete(U);let j=I.fieldDataByName.get(A);if(!j||j.argumentDataByName.size)return W.BREAK;j.isShareableBySubgraphName.set(a.subgraphName,!0);let Q=j.externalFieldDataBySubgraphName.get(a.subgraphName);a.edfsDirectiveReferences.size<1&&Q&&Q.isDefinedExternal&&!Q.isUnconditionallyProvided&&i.extensionType!==os.ExtensionType.NONE&&(Q.isUnconditionallyProvided=!0,(0,Ve.getValueOrDefault)(l,o.rawFieldSet,()=>new Set).add(U)),(0,Ve.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(A);let ee=(0,lr.getTypeNodeNamedTypeName)(j.node.type);if(Ur.BASE_SCALARS.has(ee))return;let ne=a.parentDefinitionDataByTypeName.get(ee);if(!ne)return W.BREAK;if(ne.kind===W.Kind.OBJECT_TYPE_DEFINITION){p=!0,u.push(ne);return}if((0,bn.isKindAbstract)(ne.kind))return W.BREAK}},InlineFragment:{enter(){return W.BREAK}},SelectionSet:{enter(){if(!p||(d+=1,p=!1,d<0||d>=u.length))return W.BREAK},leave(){p&&(p=!1),d-=1,u.pop()}}}),!(l.size<1))for(let[E,I]of l)this.warnings.push((0,us.externalEntityExtensionKeyFieldWarning)(i.name,E,[...I],this.subgraphName))}}for(let n of t)this.keyFieldSetDatasByTypeName.delete(n)}addValidConditionalFieldSetConfigurations(){for(let[t,n]of this.fieldSetDataByTypeName){let r=this.parentDefinitionDataByTypeName.get(t);if(!r||r.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==W.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,se.undefinedCompositeOutputTypeError)(t));continue}let i=(0,nn.getParentTypeName)(r),a=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Op.newConfigurationData)(!1,i)),o=this.validateProvidesOrRequires(r,n.provides,!0);o&&(a.provides=o);let u=this.validateProvidesOrRequires(r,n.requires,!1);u&&(a.requires=u)}}addFieldNamesToConfigurationData(t,n){let r=new Set;for(let[i,a]of t){let o=a.externalFieldDataBySubgraphName.get(this.subgraphName);if(!o||o.isUnconditionallyProvided){n.fieldNames.add(i);continue}r.add(i),this.edfsDirectiveReferences.size>0&&n.fieldNames.add(i)}r.size>0&&(n.externalFieldNames=r)}validateOneOfDirective({data:t,requiredFieldNames:n}){var r,i;return t.directivesByName.has(X.ONE_OF)?n.size>0?(this.errors.push((0,se.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,us.singleSubgraphInputFieldOneOfWarning)({fieldName:(i=(r=(0,Ve.getFirstEntry)(t.inputValueDataByName))==null?void 0:r.name)!=null?i:"unknown",subgraphName:this.subgraphName,typeName:t.name})),!0):!0}normalize(t){var o;(0,mV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,mV.upsertParentsAndChildren)(this,t);let n=[];El(this,rh,EV).call(this,n),this.validateDirectives(this.schemaData,X.SCHEMA);let r=this.getSchemaNodeByData(this.schemaData);(r==null?void 0:r.kind)===W.Kind.SCHEMA_DEFINITION&&n.push(r);for(let[u,l]of this.parentDefinitionDataByTypeName)this.validateDirectives(l,u);this.invalidORScopesCoords.size>0&&this.errors.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let u of this.invalidConfigureDescriptionNodeDatas)u.description||this.errors.push((0,se.configureDescriptionNoDescriptionError)((0,Ve.kindToNodeType)(u.kind),u.name));this.evaluateExternalKeyFields();for(let[u,l]of this.parentDefinitionDataByTypeName)switch(l.kind){case W.Kind.ENUM_TYPE_DEFINITION:{if(l.enumValueDataByName.size<1){this.errors.push((0,se.noDefinedEnumValuesError)(u));break}n.push(this.getEnumNodeByData(l));break}case W.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(l.inputValueDataByName.size<1){this.errors.push((0,se.noInputValueDefinitionsError)(u));break}let d=new Set;for(let p of l.inputValueDataByName.values()){if((0,nn.isTypeRequired)(p.type)&&d.add(p.name),p.namedTypeKind!==W.Kind.NULL)continue;let E=this.parentDefinitionDataByTypeName.get(p.namedTypeName);if(E){if(!(0,nn.isInputNodeKind)(E.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:p,namedTypeData:E,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}p.namedTypeKind=E.kind}}if(!this.validateOneOfDirective({data:l,requiredFieldNames:d}))break;u!==X.EDFS_NATS_STREAM_CONFIGURATION&&n.push(this.getInputObjectNodeByData(l));break}case W.Kind.INTERFACE_TYPE_DEFINITION:case W.Kind.OBJECT_TYPE_DEFINITION:{let d=this.entityDataByTypeName.has(u),p=this.operationTypeNodeByTypeName.get(u),E=l.kind===W.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&l.extensionType===os.ExtensionType.EXTENDS&&(l.extensionType=os.ExtensionType.NONE),p&&(l.fieldDataByName.delete(X.SERVICE_FIELD),l.fieldDataByName.delete(X.ENTITIES_FIELD));let I=[];for(let[Q,ee]of l.fieldDataByName){if(!E&&((o=ee.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&o.isDefinedExternal)&&I.push(Q),this.validateArguments(ee,l.kind),ee.namedTypeKind!==W.Kind.NULL)continue;let ne=this.parentDefinitionDataByTypeName.get(ee.namedTypeName);if(ne){if(!(0,nn.isOutputNodeKind)(ne.kind)){this.errors.push((0,se.invalidNamedTypeError)({data:ee,namedTypeData:ne,nodeType:`${(0,Ve.kindToNodeType)(l.kind)} field`}));continue}ee.namedTypeKind=this.entityInterfaceDataByTypeName.get(ne.name)?W.Kind.INTERFACE_TYPE_DEFINITION:ne.kind}}I.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,se.externalInterfaceFieldsError)(u,I)):this.warnings.push((0,us.externalInterfaceFieldsWarning)(this.subgraphName,u,[...I])));let v=(0,nn.getParentTypeName)(l),A=(0,Ve.getValueOrDefault)(this.configurationDataByTypeName,v,()=>(0,Op.newConfigurationData)(d,u)),U=this.entityInterfaceDataByTypeName.get(u);if(U){U.fieldDatas=(0,Yn.fieldDatasToSimpleFieldDatas)(l.fieldDataByName.values());let Q=this.concreteTypeNamesByAbstractTypeName.get(u);Q&&(0,Ve.addIterableToSet)({source:Q,target:U.concreteTypeNames}),A.isInterfaceObject=U.isInterfaceObject,A.entityInterfaceConcreteTypeNames=U.concreteTypeNames}let j=this.eventsConfigurations.get(v);j&&(A.events=j),this.addFieldNamesToConfigurationData(l.fieldDataByName,A),this.validateInterfaceImplementations(l),n.push(this.getCompositeOutputNodeByData(l)),l.fieldDataByName.size<1&&!(0,oi.isNodeQuery)(u,p)&&this.errors.push((0,se.noFieldDefinitionsError)((0,Ve.kindToNodeType)(l.kind),u)),l.requireFetchReasonsFieldNames.size>0&&(A.requireFetchReasonsFieldNames=[...l.requireFetchReasonsFieldNames]);break}case W.Kind.SCALAR_TYPE_DEFINITION:{if(l.extensionType===os.ExtensionType.REAL){this.errors.push((0,se.noBaseScalarDefinitionError)(u));break}n.push(this.getScalarNodeByData(l));break}case W.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(l)),this.validateUnionMembers(l);break}default:throw(0,se.unexpectedKindFatalError)(u)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let u of Object.values(W.OperationTypeNode)){let l=this.schemaData.operationTypes.get(u),d=(0,Ve.getOrThrowError)(bn.operationTypeNodeToDefaultType,u,X.OPERATION_TO_DEFAULT),p=l?(0,lr.getTypeNodeNamedTypeName)(l.type):d;if(Ur.BASE_SCALARS.has(p)&&this.referencedTypeNames.add(p),p!==d&&this.parentDefinitionDataByTypeName.has(d)){this.errors.push((0,se.invalidRootTypeDefinitionError)(u,p,d));continue}let E=this.parentDefinitionDataByTypeName.get(p);if(l){if(!E)continue;this.operationTypeNodeByTypeName.set(p,u)}if(!E)continue;let I=this.configurationDataByTypeName.get(d);I&&(I.isRootNode=!0,I.typeName=d),E.kind!==W.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,se.operationDefinitionError)(p,u,E.kind))}for(let u of this.referencedTypeNames){let l=this.parentDefinitionDataByTypeName.get(u);if(!l){this.errors.push((0,se.undefinedTypeError)(u));continue}if(l.kind!==W.Kind.INTERFACE_TYPE_DEFINITION)continue;let d=this.concreteTypeNamesByAbstractTypeName.get(u);(!d||d.size<1)&&this.warnings.push((0,us.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,u))}let i=new Map;for(let u of this.directiveDefinitionByName.values()){let l=(0,bn.extractExecutableDirectiveLocations)(u.locations,new Set);l.size<1||this.addPersistedDirectiveDefinitionDataByNode(i,u,l)}this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph();for(let u of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,se.invalidExternalDirectiveError)(u)):this.warnings.push((0,us.invalidExternalFieldWarning)(u,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let a={kind:W.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,directiveDefinitionByName:this.directiveDefinitionByName,entityDataByTypeName:this.entityDataByTypeName,entityInterfaces:this.entityInterfaceDataByTypeName,fieldCoordsByNamedTypeName:this.fieldCoordsByNamedTypeName,isEventDrivenGraph:this.isSubgraphEventDrivenGraph,isVersionTwo:this.isSubgraphVersionTwo,keyFieldNamesByParentTypeName:this.keyFieldNamesByParentTypeName,keyFieldSetsByEntityTypeNameByKeyFieldCoords:this.keyFieldSetsByEntityTypeNameByFieldCoords,operationTypes:this.operationTypeNodeByTypeName,originalTypeNameByRenamedTypeName:this.originalTypeNameByRenamedTypeName,overridesByTargetSubgraphName:this.overridesByTargetSubgraphName,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:i,schemaNode:r,subgraphAST:a,subgraphString:(0,W.print)(a),schema:(0,ffe.buildASTSchema)(a,{addInvalidExtensionOrphans:!0,assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Dp=new WeakSet,ub=function({currentFieldCoords:t,directiveCoords:n,directiveName:r,fieldSet:i}){if(this.isSubgraphVersionTwo){this.errors.push((0,se.nonExternalConditionalFieldError)({directiveCoords:n,directiveName:r,fieldSet:i,subgraphName:this.subgraphName,targetCoords:t}));return}this.warnings.push((0,us.nonExternalConditionalFieldWarning)(n,this.subgraphName,t,i,r))},rh=new WeakSet,EV=function(t){let n=new Set;for(let r of this.referencedDirectiveNames){let i=Ur.DIRECTIVE_DEFINITION_BY_NAME.get(r);i&&(this.directiveDefinitionByName.set(r,i),(0,Ve.addOptionalIterableToSet)({source:vp.DEPENDENCIES_BY_DIRECTIVE_NAME.get(r),target:n}),t.push(i))}for(let r of this.customDirectiveDefinitionByName.values())t.push(r);t.push(...n)};qc.NormalizationFactory=Sp;function Tfe(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,u=new Set,l=new Map,d=new Set,p=new Set,E=[],I=new Set,v=new Map,A=[],U=[];for(let ee of e)ee.name&&(0,pfe.recordSubgraphName)(ee.name,d,p);let j=new cb.Graph;for(let ee=0;ee0&&A.push(...le.warnings),!le.success){U.push((0,se.subgraphValidationError)(pe,le.errors));continue}if(!le){U.push((0,se.subgraphValidationError)(pe,[se.subgraphValidationFailureError]));continue}l.set(pe,le.parentDefinitionDataByTypeName);for(let Ae of le.authorizationDataByParentTypeName.values())(0,Yn.upsertAuthorizationData)(t,Ae,I);for(let[Ae,Me]of le.fieldCoordsByNamedTypeName)(0,Ve.addIterableToSet)({source:Me,target:(0,Ve.getValueOrDefault)(v,Ae,()=>new Set)});for(let[Ae,Me]of le.concreteTypeNamesByAbstractTypeName){let Ze=n.get(Ae);if(!Ze){n.set(Ae,new Set(Me));continue}(0,Ve.addIterableToSet)({source:Me,target:Ze})}for(let[Ae,Me]of le.entityDataByTypeName){let Ze=Me.keyFieldSetDatasBySubgraphName.get(pe);Ze&&(0,Yn.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:Ze,typeName:Ae,subgraphName:pe})}if(ne.name&&i.set(pe,{conditionalFieldDataByCoordinates:le.conditionalFieldDataByCoordinates,configurationDataByTypeName:le.configurationDataByTypeName,definitions:le.subgraphAST,directiveDefinitionByName:le.directiveDefinitionByName,entityInterfaces:le.entityInterfaces,isVersionTwo:le.isVersionTwo,keyFieldNamesByParentTypeName:le.keyFieldNamesByParentTypeName,name:pe,operationTypes:le.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:le.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:le.persistedDirectiveDefinitionDataByDirectiveName,schema:le.schema,schemaNode:le.schemaNode,url:ne.url}),!(le.overridesByTargetSubgraphName.size<1))for(let[Ae,Me]of le.overridesByTargetSubgraphName){let Ze=d.has(Ae);for(let[Z,ve]of Me){let gt=le.originalTypeNameByRenamedTypeName.get(Z)||Z;if(!Ze)A.push((0,us.invalidOverrideTargetSubgraphNameWarning)(Ae,gt,[...ve],ne.name));else{let rn=(0,Ve.getValueOrDefault)(a,Ae,()=>new Map),un=(0,Ve.getValueOrDefault)(rn,Z,()=>new Set(ve));(0,Ve.addIterableToSet)({source:ve,target:un})}for(let rn of ve){let un=`${gt}.${rn}`,In=o.get(un);if(!In){o.set(un,[pe]);continue}In.push(pe),u.add(un)}}}}let Q=[];if(I.size>0&&Q.push((0,se.orScopesLimitError)(Ur.MAX_OR_SCOPES,[...I])),(E.length>0||p.size>0)&&Q.push((0,se.invalidSubgraphNamesError)([...p],E)),u.size>0){let ee=[];for(let ne of u){let pe=(0,Ve.getOrThrowError)(o,ne,"overrideSourceSubgraphNamesByFieldPath");ee.push((0,se.duplicateOverriddenFieldErrorMessage)(ne,pe))}Q.push((0,se.duplicateOverriddenFieldsError)(ee))}if(Q.push(...U),Q.length>0)return{errors:Q,success:!1,warnings:A};for(let[ee,ne]of a){let pe=(0,Ve.getOrThrowError)(i,ee,"internalSubgraphBySubgraphName");pe.overriddenFieldNamesByParentTypeName=ne;for(let[le,Ae]of ne){let Me=pe.configurationDataByTypeName.get(le);Me&&((0,Yn.subtractSet)(Ae,Me.fieldNames),Me.fieldNames.size<1&&pe.configurationDataByTypeName.delete(le))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:j,success:!0,warnings:A}}});var ih=w(Kc=>{"use strict";m();T();N();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.DivergentType=void 0;Kc.getLeastRestrictiveMergedTypeNode=hfe;Kc.getMostRestrictiveMergedTypeNode=yfe;Kc.renameNamedTypeName=Ife;var Vc=Ie(),yV=$i(),Efe=Su(),hV=Fr(),IV=ql(),jc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(jc||(Kc.DivergentType=jc={}));function gV(e,t,n,r,i){t=(0,Efe.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=jc.NONE,u=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(fb,"__esModule",{value:!0});fb.renameRootTypes=vfe;var gfe=Ie(),db=Fr(),_fe=ih(),Bu=zn(),$c=wr();function vfe(e,t){let n,r=!1,i;(0,gfe.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===Bu.SERVICE_FIELD||o===Bu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let u=n.name,l=(0,$c.getOrThrowError)(n.fieldDataByName,o,`${u}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let p=(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,d,Bu.OPERATION_TO_DEFAULT);l.namedTypeName!==p&&(0,_fe.renameNamedTypeName)(l,p,e.errors)}return i!=null&&i.has(o)&&l.isShareableBySubgraphName.delete(t.name),!1}},InterfaceTypeDefinition:{enter(a){let o=a.name.value;if(!e.entityInterfaceFederationDataByTypeName.get(o))return!1;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,!e.entityInterfaceFederationDataByTypeName.get(o)&&(e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(l),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o)))},leave(){n=void 0,r=!1,i=void 0}},ObjectTypeExtension:{enter(a){let o=a.name.value,u=t.operationTypes.get(o),l=u?(0,$c.getOrThrowError)(db.operationTypeNodeToDefaultType,u,Bu.OPERATION_TO_DEFAULT):o;n=(0,$c.getOrThrowError)(t.parentDefinitionDataByTypeName,o,Bu.PARENT_DEFINITION_DATA),r=n.isRootType,e.addValidPrimaryKeyTargetsToEntityData(o),i=t.overriddenFieldNamesByParentTypeName.get(o),o!==l&&(n.name=l,t.parentDefinitionDataByTypeName.set(l,n),t.parentDefinitionDataByTypeName.delete(o))},leave(){n=void 0,r=!1,i=void 0}}})}});var _V=w((Ed,bp)=>{"use strict";m();T();N();(function(){var e,t="4.17.21",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",d=1,p=2,E=4,I=1,v=2,A=1,U=2,j=4,Q=8,ee=16,ne=32,pe=64,le=128,Ae=256,Me=512,Ze=30,Z="...",ve=800,gt=16,rn=1,un=2,In=3,xt=1/0,an=9007199254740991,kr=17976931348623157e292,nr=NaN,En=4294967295,Ht=En-1,Ln=En>>>1,ae=[["ary",le],["bind",A],["bindKey",U],["curry",Q],["curryRight",ee],["flip",Me],["partial",ne],["partialRight",pe],["rearg",Ae]],De="[object Arguments]",ge="[object Array]",Le="[object AsyncFunction]",St="[object Boolean]",Y="[object Date]",ie="[object DOMException]",xe="[object Error]",He="[object Function]",Bt="[object GeneratorFunction]",it="[object Map]",Pt="[object Number]",ps="[object Null]",Yr="[object Object]",ms="[object Promise]",rl="[object Proxy]",Ua="[object RegExp]",Ir="[object Set]",ui="[object String]",qt="[object Symbol]",gr="[object Undefined]",ju="[object WeakMap]",ka="[object WeakSet]",Ku="[object ArrayBuffer]",P="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",B="[object Int8Array]",K="[object Int16Array]",te="[object Int32Array]",ue="[object Uint8Array]",Tt="[object Uint8ClampedArray]",hn="[object Uint16Array]",cn="[object Uint32Array]",vn=/\b__p \+= '';/g,sn=/\b(__p \+=) '' \+/g,aK=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N0=/&(?:amp|lt|gt|quot|#39);/g,T0=/[&<>"']/g,sK=RegExp(N0.source),oK=RegExp(T0.source),uK=/<%-([\s\S]+?)%>/g,cK=/<%([\s\S]+?)%>/g,E0=/<%=([\s\S]+?)%>/g,lK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dK=/^\w*$/,fK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ch=/[\\^$.*+?()[\]{}|]/g,pK=RegExp(Ch.source),Bh=/^\s+/,mK=/\s/,NK=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,TK=/\{\n\/\* \[wrapped with (.+)\] \*/,EK=/,? & /,hK=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yK=/[()=,{}\[\]\/\s]/,IK=/\\(\\)?/g,gK=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h0=/\w*$/,_K=/^[-+]0x[0-9a-f]+$/i,vK=/^0b[01]+$/i,OK=/^\[object .+?Constructor\]$/,SK=/^0o[0-7]+$/i,DK=/^(?:0|[1-9]\d*)$/,bK=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tm=/($^)/,AK=/['\n\r\u2028\u2029\\]/g,nm="\\ud800-\\udfff",RK="\\u0300-\\u036f",PK="\\ufe20-\\ufe2f",FK="\\u20d0-\\u20ff",y0=RK+PK+FK,I0="\\u2700-\\u27bf",g0="a-z\\xdf-\\xf6\\xf8-\\xff",wK="\\xac\\xb1\\xd7\\xf7",LK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",CK="\\u2000-\\u206f",BK=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_0="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",O0=wK+LK+CK+BK,Uh="['\u2019]",UK="["+nm+"]",S0="["+O0+"]",rm="["+y0+"]",D0="\\d+",kK="["+I0+"]",b0="["+g0+"]",A0="[^"+nm+O0+D0+I0+g0+_0+"]",kh="\\ud83c[\\udffb-\\udfff]",MK="(?:"+rm+"|"+kh+")",R0="[^"+nm+"]",Mh="(?:\\ud83c[\\udde6-\\uddff]){2}",xh="[\\ud800-\\udbff][\\udc00-\\udfff]",il="["+_0+"]",P0="\\u200d",F0="(?:"+b0+"|"+A0+")",xK="(?:"+il+"|"+A0+")",w0="(?:"+Uh+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+Uh+"(?:D|LL|M|RE|S|T|VE))?",C0=MK+"?",B0="["+v0+"]?",qK="(?:"+P0+"(?:"+[R0,Mh,xh].join("|")+")"+B0+C0+")*",VK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U0=B0+C0+qK,KK="(?:"+[kK,Mh,xh].join("|")+")"+U0,$K="(?:"+[R0+rm+"?",rm,Mh,xh,UK].join("|")+")",GK=RegExp(Uh,"g"),QK=RegExp(rm,"g"),qh=RegExp(kh+"(?="+kh+")|"+$K+U0,"g"),YK=RegExp([il+"?"+b0+"+"+w0+"(?="+[S0,il,"$"].join("|")+")",xK+"+"+L0+"(?="+[S0,il+F0,"$"].join("|")+")",il+"?"+F0+"+"+w0,il+"+"+L0,jK,VK,D0,KK].join("|"),"g"),JK=RegExp("["+P0+nm+y0+v0+"]"),HK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zK=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],WK=-1,gn={};gn[y]=gn[_]=gn[B]=gn[K]=gn[te]=gn[ue]=gn[Tt]=gn[hn]=gn[cn]=!0,gn[De]=gn[ge]=gn[Ku]=gn[St]=gn[P]=gn[Y]=gn[xe]=gn[He]=gn[it]=gn[Pt]=gn[Yr]=gn[Ua]=gn[Ir]=gn[ui]=gn[ju]=!1;var yn={};yn[De]=yn[ge]=yn[Ku]=yn[P]=yn[St]=yn[Y]=yn[y]=yn[_]=yn[B]=yn[K]=yn[te]=yn[it]=yn[Pt]=yn[Yr]=yn[Ua]=yn[Ir]=yn[ui]=yn[qt]=yn[ue]=yn[Tt]=yn[hn]=yn[cn]=!0,yn[xe]=yn[He]=yn[ju]=!1;var XK={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ZK={"&":"&","<":"<",">":">",'"':""","'":"'"},e$={"&":"&","<":"<",">":">",""":'"',"'":"'"},t$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},n$=parseFloat,r$=parseInt,k0=typeof global=="object"&&global&&global.Object===Object&&global,i$=typeof self=="object"&&self&&self.Object===Object&&self,fr=k0||i$||Function("return this")(),Vh=typeof Ed=="object"&&Ed&&!Ed.nodeType&&Ed,$u=Vh&&typeof bp=="object"&&bp&&!bp.nodeType&&bp,M0=$u&&$u.exports===Vh,jh=M0&&k0.process,Oi=function(){try{var G=$u&&$u.require&&$u.require("util").types;return G||jh&&jh.binding&&jh.binding("util")}catch(oe){}}(),x0=Oi&&Oi.isArrayBuffer,q0=Oi&&Oi.isDate,V0=Oi&&Oi.isMap,j0=Oi&&Oi.isRegExp,K0=Oi&&Oi.isSet,$0=Oi&&Oi.isTypedArray;function ci(G,oe,re){switch(re.length){case 0:return G.call(oe);case 1:return G.call(oe,re[0]);case 2:return G.call(oe,re[0],re[1]);case 3:return G.call(oe,re[0],re[1],re[2])}return G.apply(oe,re)}function a$(G,oe,re,Ce){for(var dt=-1,Qt=G==null?0:G.length;++dt-1}function Kh(G,oe,re){for(var Ce=-1,dt=G==null?0:G.length;++Ce-1;);return re}function X0(G,oe){for(var re=G.length;re--&&al(oe,G[re],0)>-1;);return re}function m$(G,oe){for(var re=G.length,Ce=0;re--;)G[re]===oe&&++Ce;return Ce}var N$=Yh(XK),T$=Yh(ZK);function E$(G){return"\\"+t$[G]}function h$(G,oe){return G==null?e:G[oe]}function sl(G){return JK.test(G)}function y$(G){return HK.test(G)}function I$(G){for(var oe,re=[];!(oe=G.next()).done;)re.push(oe.value);return re}function Wh(G){var oe=-1,re=Array(G.size);return G.forEach(function(Ce,dt){re[++oe]=[dt,Ce]}),re}function Z0(G,oe){return function(re){return G(oe(re))}}function iu(G,oe){for(var re=-1,Ce=G.length,dt=0,Qt=[];++re-1}function oG(s,c){var f=this.__data__,h=gm(f,s);return h<0?(++this.size,f.push([s,c])):f[h][1]=c,this}Ns.prototype.clear=rG,Ns.prototype.delete=iG,Ns.prototype.get=aG,Ns.prototype.has=sG,Ns.prototype.set=oG;function Ts(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function Ai(s,c,f,h,O,L){var M,V=c&d,J=c&p,ce=c&E;if(f&&(M=O?f(s,h,O,L):f(s)),M!==e)return M;if(!An(s))return s;var de=ft(s);if(de){if(M=dQ(s),!V)return Jr(s,M)}else{var Te=Dr(s),be=Te==He||Te==Bt;if(du(s))return BA(s,V);if(Te==Yr||Te==De||be&&!O){if(M=J||be?{}:eR(s),!V)return J?eQ(s,vG(M,s)):ZG(s,dA(M,s))}else{if(!yn[Te])return O?s:{};M=fQ(s,Te,V)}}L||(L=new oa);var $e=L.get(s);if($e)return $e;L.set(s,M),RR(s)?s.forEach(function(tt){M.add(Ai(tt,c,f,tt,s,L))}):bR(s)&&s.forEach(function(tt,Dt){M.set(Dt,Ai(tt,c,f,Dt,s,L))});var et=ce?J?vy:_y:J?zr:pr,yt=de?e:et(s);return Si(yt||s,function(tt,Dt){yt&&(Dt=tt,tt=s[Dt]),Ud(M,Dt,Ai(tt,c,f,Dt,s,L))}),M}function OG(s){var c=pr(s);return function(f){return fA(f,s,c)}}function fA(s,c,f){var h=f.length;if(s==null)return!h;for(s=Nn(s);h--;){var O=f[h],L=c[O],M=s[O];if(M===e&&!(O in s)||!L(M))return!1}return!0}function pA(s,c,f){if(typeof s!="function")throw new Di(i);return Kd(function(){s.apply(e,f)},c)}function kd(s,c,f,h){var O=-1,L=im,M=!0,V=s.length,J=[],ce=c.length;if(!V)return J;f&&(c=On(c,li(f))),h?(L=Kh,M=!1):c.length>=n&&(L=Pd,M=!1,c=new Yu(c));e:for(;++OO?0:O+f),h=h===e||h>O?O:Et(h),h<0&&(h+=O),h=f>h?0:FR(h);f0&&f(V)?c>1?_r(V,c-1,f,h,O):ru(O,V):h||(O[O.length]=V)}return O}var iy=VA(),TA=VA(!0);function Ma(s,c){return s&&iy(s,c,pr)}function ay(s,c){return s&&TA(s,c,pr)}function vm(s,c){return nu(c,function(f){return gs(s[f])})}function Hu(s,c){c=cu(c,s);for(var f=0,h=c.length;s!=null&&fc}function bG(s,c){return s!=null&&on.call(s,c)}function AG(s,c){return s!=null&&c in Nn(s)}function RG(s,c,f){return s>=Sr(c,f)&&s=120&&de.length>=120)?new Yu(M&&de):e}de=s[0];var Te=-1,be=V[0];e:for(;++Te-1;)V!==s&&mm.call(V,J,1),mm.call(s,J,1);return s}function bA(s,c){for(var f=s?c.length:0,h=f-1;f--;){var O=c[f];if(f==h||O!==L){var L=O;Is(O)?mm.call(s,O,1):Ny(s,O)}}return s}function fy(s,c){return s+Em(oA()*(c-s+1))}function jG(s,c,f,h){for(var O=-1,L=ir(Tm((c-s)/(f||1)),0),M=re(L);L--;)M[h?L:++O]=s,s+=f;return M}function py(s,c){var f="";if(!s||c<1||c>an)return f;do c%2&&(f+=s),c=Em(c/2),c&&(s+=s);while(c);return f}function _t(s,c){return Py(rR(s,c,Wr),s+"")}function KG(s){return lA(Tl(s))}function $G(s,c){var f=Tl(s);return Cm(f,Ju(c,0,f.length))}function qd(s,c,f,h){if(!An(s))return s;c=cu(c,s);for(var O=-1,L=c.length,M=L-1,V=s;V!=null&&++OO?0:O+c),f=f>O?O:f,f<0&&(f+=O),O=c>f?0:f-c>>>0,c>>>=0;for(var L=re(O);++h>>1,M=s[L];M!==null&&!fi(M)&&(f?M<=c:M=n){var ce=c?null:iQ(s);if(ce)return sm(ce);M=!1,O=Pd,J=new Yu}else J=c?[]:V;e:for(;++h=h?s:Ri(s,c,f)}var CA=B$||function(s){return fr.clearTimeout(s)};function BA(s,c){if(c)return s.slice();var f=s.length,h=nA?nA(f):new s.constructor(f);return s.copy(h),h}function yy(s){var c=new s.constructor(s.byteLength);return new fm(c).set(new fm(s)),c}function HG(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.byteLength)}function zG(s){var c=new s.constructor(s.source,h0.exec(s));return c.lastIndex=s.lastIndex,c}function WG(s){return Bd?Nn(Bd.call(s)):{}}function UA(s,c){var f=c?yy(s.buffer):s.buffer;return new s.constructor(f,s.byteOffset,s.length)}function kA(s,c){if(s!==c){var f=s!==e,h=s===null,O=s===s,L=fi(s),M=c!==e,V=c===null,J=c===c,ce=fi(c);if(!V&&!ce&&!L&&s>c||L&&M&&J&&!V&&!ce||h&&M&&J||!f&&J||!O)return 1;if(!h&&!L&&!ce&&s=V)return J;var ce=f[h];return J*(ce=="desc"?-1:1)}}return s.index-c.index}function MA(s,c,f,h){for(var O=-1,L=s.length,M=f.length,V=-1,J=c.length,ce=ir(L-M,0),de=re(J+ce),Te=!h;++V1?f[O-1]:e,M=O>2?f[2]:e;for(L=s.length>3&&typeof L=="function"?(O--,L):e,M&&xr(f[0],f[1],M)&&(L=O<3?e:L,O=1),c=Nn(c);++h-1?O[L?c[M]:M]:e}}function $A(s){return ys(function(c){var f=c.length,h=f,O=bi.prototype.thru;for(s&&c.reverse();h--;){var L=c[h];if(typeof L!="function")throw new Di(i);if(O&&!M&&wm(L)=="wrapper")var M=new bi([],!0)}for(h=M?h:f;++h1&&Ft.reverse(),de&&JV))return!1;var ce=L.get(s),de=L.get(c);if(ce&&de)return ce==c&&de==s;var Te=-1,be=!0,$e=f&v?new Yu:e;for(L.set(s,c),L.set(c,s);++Te1?"& ":"")+c[h],c=c.join(f>2?", ":" "),s.replace(NK,`{ /* [wrapped with `+c+`] */ `)}function mQ(s){return ft(s)||Xu(s)||!!(aA&&s&&s[aA])}function Is(s,c){var f=typeof s;return c=c==null?an:c,!!c&&(f=="number"||f!="symbol"&&DK.test(s))&&s>-1&&s%1==0&&s0){if(++c>=ve)return arguments[0]}else c=0;return s.apply(e,arguments)}}function Cm(s,c){var f=-1,h=s.length,O=h-1;for(c=c===e?h:c;++f1?s[c-1]:e;return f=typeof f=="function"?(s.pop(),f):e,NR(s,f)});function TR(s){var c=F(s);return c.__chain__=!0,c}function SY(s,c){return c(s),s}function Bm(s,c){return c(s)}var DY=ys(function(s){var c=s.length,f=c?s[0]:0,h=this.__wrapped__,O=function(L){return ry(L,s)};return c>1||this.__actions__.length||!(h instanceof bt)||!Is(f)?this.thru(O):(h=h.slice(f,+f+(c?1:0)),h.__actions__.push({func:Bm,args:[O],thisArg:e}),new bi(h,this.__chain__).thru(function(L){return c&&!L.length&&L.push(e),L}))});function bY(){return TR(this)}function AY(){return new bi(this.value(),this.__chain__)}function RY(){this.__values__===e&&(this.__values__=PR(this.value()));var s=this.__index__>=this.__values__.length,c=s?e:this.__values__[this.__index__++];return{done:s,value:c}}function PY(){return this}function FY(s){for(var c,f=this;f instanceof Im;){var h=cR(f);h.__index__=0,h.__values__=e,c?O.__wrapped__=h:c=h;var O=h;f=f.__wrapped__}return O.__wrapped__=s,c}function wY(){var s=this.__wrapped__;if(s instanceof bt){var c=s;return this.__actions__.length&&(c=new bt(this)),c=c.reverse(),c.__actions__.push({func:Bm,args:[Fy],thisArg:e}),new bi(c,this.__chain__)}return this.thru(Fy)}function LY(){return wA(this.__wrapped__,this.__actions__)}var CY=bm(function(s,c,f){on.call(s,f)?++s[f]:Es(s,f,1)});function BY(s,c,f){var h=ft(s)?G0:SG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}function UY(s,c){var f=ft(s)?nu:NA;return f(s,We(c,3))}var kY=KA(lR),MY=KA(dR);function xY(s,c){return _r(Um(s,c),1)}function qY(s,c){return _r(Um(s,c),xt)}function VY(s,c,f){return f=f===e?1:Et(f),_r(Um(s,c),f)}function ER(s,c){var f=ft(s)?Si:ou;return f(s,We(c,3))}function hR(s,c){var f=ft(s)?s$:mA;return f(s,We(c,3))}var jY=bm(function(s,c,f){on.call(s,f)?s[f].push(c):Es(s,f,[c])});function KY(s,c,f,h){s=Hr(s)?s:Tl(s),f=f&&!h?Et(f):0;var O=s.length;return f<0&&(f=ir(O+f,0)),Vm(s)?f<=O&&s.indexOf(c,f)>-1:!!O&&al(s,c,f)>-1}var $Y=_t(function(s,c,f){var h=-1,O=typeof c=="function",L=Hr(s)?re(s.length):[];return ou(s,function(M){L[++h]=O?ci(c,M,f):Md(M,c,f)}),L}),GY=bm(function(s,c,f){Es(s,f,c)});function Um(s,c){var f=ft(s)?On:gA;return f(s,We(c,3))}function QY(s,c,f,h){return s==null?[]:(ft(c)||(c=c==null?[]:[c]),f=h?e:f,ft(f)||(f=f==null?[]:[f]),SA(s,c,f))}var YY=bm(function(s,c,f){s[f?0:1].push(c)},function(){return[[],[]]});function JY(s,c,f){var h=ft(s)?$h:H0,O=arguments.length<3;return h(s,We(c,4),f,O,ou)}function HY(s,c,f){var h=ft(s)?o$:H0,O=arguments.length<3;return h(s,We(c,4),f,O,mA)}function zY(s,c){var f=ft(s)?nu:NA;return f(s,xm(We(c,3)))}function WY(s){var c=ft(s)?lA:KG;return c(s)}function XY(s,c,f){(f?xr(s,c,f):c===e)?c=1:c=Et(c);var h=ft(s)?IG:$G;return h(s,c)}function ZY(s){var c=ft(s)?gG:QG;return c(s)}function e2(s){if(s==null)return 0;if(Hr(s))return Vm(s)?ol(s):s.length;var c=Dr(s);return c==it||c==Ir?s.size:cy(s).length}function t2(s,c,f){var h=ft(s)?Gh:YG;return f&&xr(s,c,f)&&(c=e),h(s,We(c,3))}var n2=_t(function(s,c){if(s==null)return[];var f=c.length;return f>1&&xr(s,c[0],c[1])?c=[]:f>2&&xr(c[0],c[1],c[2])&&(c=[c[0]]),SA(s,_r(c,1),[])}),km=U$||function(){return fr.Date.now()};function r2(s,c){if(typeof c!="function")throw new Di(i);return s=Et(s),function(){if(--s<1)return c.apply(this,arguments)}}function yR(s,c,f){return c=f?e:c,c=s&&c==null?s.length:c,hs(s,le,e,e,e,e,c)}function IR(s,c){var f;if(typeof c!="function")throw new Di(i);return s=Et(s),function(){return--s>0&&(f=c.apply(this,arguments)),s<=1&&(c=e),f}}var Ly=_t(function(s,c,f){var h=A;if(f.length){var O=iu(f,ml(Ly));h|=ne}return hs(s,h,c,f,O)}),gR=_t(function(s,c,f){var h=A|U;if(f.length){var O=iu(f,ml(gR));h|=ne}return hs(c,h,s,f,O)});function _R(s,c,f){c=f?e:c;var h=hs(s,Q,e,e,e,e,e,c);return h.placeholder=_R.placeholder,h}function vR(s,c,f){c=f?e:c;var h=hs(s,ee,e,e,e,e,e,c);return h.placeholder=vR.placeholder,h}function OR(s,c,f){var h,O,L,M,V,J,ce=0,de=!1,Te=!1,be=!0;if(typeof s!="function")throw new Di(i);c=Fi(c)||0,An(f)&&(de=!!f.leading,Te="maxWait"in f,L=Te?ir(Fi(f.maxWait)||0,c):L,be="trailing"in f?!!f.trailing:be);function $e(Vn){var ca=h,vs=O;return h=O=e,ce=Vn,M=s.apply(vs,ca),M}function et(Vn){return ce=Vn,V=Kd(Dt,c),de?$e(Vn):M}function yt(Vn){var ca=Vn-J,vs=Vn-ce,KR=c-ca;return Te?Sr(KR,L-vs):KR}function tt(Vn){var ca=Vn-J,vs=Vn-ce;return J===e||ca>=c||ca<0||Te&&vs>=L}function Dt(){var Vn=km();if(tt(Vn))return Ft(Vn);V=Kd(Dt,yt(Vn))}function Ft(Vn){return V=e,be&&h?$e(Vn):(h=O=e,M)}function pi(){V!==e&&CA(V),ce=0,h=J=O=V=e}function qr(){return V===e?M:Ft(km())}function mi(){var Vn=km(),ca=tt(Vn);if(h=arguments,O=this,J=Vn,ca){if(V===e)return et(J);if(Te)return CA(V),V=Kd(Dt,c),$e(J)}return V===e&&(V=Kd(Dt,c)),M}return mi.cancel=pi,mi.flush=qr,mi}var i2=_t(function(s,c){return pA(s,1,c)}),a2=_t(function(s,c,f){return pA(s,Fi(c)||0,f)});function s2(s){return hs(s,Me)}function Mm(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Di(i);var f=function(){var h=arguments,O=c?c.apply(this,h):h[0],L=f.cache;if(L.has(O))return L.get(O);var M=s.apply(this,h);return f.cache=L.set(O,M)||L,M};return f.cache=new(Mm.Cache||Ts),f}Mm.Cache=Ts;function xm(s){if(typeof s!="function")throw new Di(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function o2(s){return IR(2,s)}var u2=JG(function(s,c){c=c.length==1&&ft(c[0])?On(c[0],li(We())):On(_r(c,1),li(We()));var f=c.length;return _t(function(h){for(var O=-1,L=Sr(h.length,f);++O=c}),Xu=hA(function(){return arguments}())?hA:function(s){return Cn(s)&&on.call(s,"callee")&&!iA.call(s,"callee")},ft=re.isArray,v2=x0?li(x0):FG;function Hr(s){return s!=null&&qm(s.length)&&!gs(s)}function qn(s){return Cn(s)&&Hr(s)}function O2(s){return s===!0||s===!1||Cn(s)&&Mr(s)==St}var du=M$||Gy,S2=q0?li(q0):wG;function D2(s){return Cn(s)&&s.nodeType===1&&!$d(s)}function b2(s){if(s==null)return!0;if(Hr(s)&&(ft(s)||typeof s=="string"||typeof s.splice=="function"||du(s)||Nl(s)||Xu(s)))return!s.length;var c=Dr(s);if(c==it||c==Ir)return!s.size;if(jd(s))return!cy(s).length;for(var f in s)if(on.call(s,f))return!1;return!0}function A2(s,c){return xd(s,c)}function R2(s,c,f){f=typeof f=="function"?f:e;var h=f?f(s,c):e;return h===e?xd(s,c,e,f):!!h}function By(s){if(!Cn(s))return!1;var c=Mr(s);return c==xe||c==ie||typeof s.message=="string"&&typeof s.name=="string"&&!$d(s)}function P2(s){return typeof s=="number"&&sA(s)}function gs(s){if(!An(s))return!1;var c=Mr(s);return c==He||c==Bt||c==Le||c==rl}function DR(s){return typeof s=="number"&&s==Et(s)}function qm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=an}function An(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function Cn(s){return s!=null&&typeof s=="object"}var bR=V0?li(V0):CG;function F2(s,c){return s===c||uy(s,c,Sy(c))}function w2(s,c,f){return f=typeof f=="function"?f:e,uy(s,c,Sy(c),f)}function L2(s){return AR(s)&&s!=+s}function C2(s){if(EQ(s))throw new dt(r);return yA(s)}function B2(s){return s===null}function U2(s){return s==null}function AR(s){return typeof s=="number"||Cn(s)&&Mr(s)==Pt}function $d(s){if(!Cn(s)||Mr(s)!=Yr)return!1;var c=pm(s);if(c===null)return!0;var f=on.call(c,"constructor")&&c.constructor;return typeof f=="function"&&f instanceof f&&cm.call(f)==w$}var Uy=j0?li(j0):BG;function k2(s){return DR(s)&&s>=-an&&s<=an}var RR=K0?li(K0):UG;function Vm(s){return typeof s=="string"||!ft(s)&&Cn(s)&&Mr(s)==ui}function fi(s){return typeof s=="symbol"||Cn(s)&&Mr(s)==qt}var Nl=$0?li($0):kG;function M2(s){return s===e}function x2(s){return Cn(s)&&Dr(s)==ju}function q2(s){return Cn(s)&&Mr(s)==ka}var V2=Fm(ly),j2=Fm(function(s,c){return s<=c});function PR(s){if(!s)return[];if(Hr(s))return Vm(s)?sa(s):Jr(s);if(Fd&&s[Fd])return I$(s[Fd]());var c=Dr(s),f=c==it?Wh:c==Ir?sm:Tl;return f(s)}function _s(s){if(!s)return s===0?s:0;if(s=Fi(s),s===xt||s===-xt){var c=s<0?-1:1;return c*kr}return s===s?s:0}function Et(s){var c=_s(s),f=c%1;return c===c?f?c-f:c:0}function FR(s){return s?Ju(Et(s),0,En):0}function Fi(s){if(typeof s=="number")return s;if(fi(s))return nr;if(An(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=An(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=z0(s);var f=vK.test(s);return f||SK.test(s)?r$(s.slice(2),f?2:8):_K.test(s)?nr:+s}function wR(s){return xa(s,zr(s))}function K2(s){return s?Ju(Et(s),-an,an):s===0?s:0}function zt(s){return s==null?"":di(s)}var $2=fl(function(s,c){if(jd(c)||Hr(c)){xa(c,pr(c),s);return}for(var f in c)on.call(c,f)&&Ud(s,f,c[f])}),LR=fl(function(s,c){xa(c,zr(c),s)}),jm=fl(function(s,c,f,h){xa(c,zr(c),s,h)}),G2=fl(function(s,c,f,h){xa(c,pr(c),s,h)}),Q2=ys(ry);function Y2(s,c){var f=dl(s);return c==null?f:dA(f,c)}var J2=_t(function(s,c){s=Nn(s);var f=-1,h=c.length,O=h>2?c[2]:e;for(O&&xr(c[0],c[1],O)&&(h=1);++f1),L}),xa(s,vy(s),f),h&&(f=Ai(f,d|p|E,aQ));for(var O=c.length;O--;)Ny(f,c[O]);return f});function fJ(s,c){return BR(s,xm(We(c)))}var pJ=ys(function(s,c){return s==null?{}:qG(s,c)});function BR(s,c){if(s==null)return{};var f=On(vy(s),function(h){return[h]});return c=We(c),DA(s,f,function(h,O){return c(h,O[0])})}function mJ(s,c,f){c=cu(c,s);var h=-1,O=c.length;for(O||(O=1,s=e);++hc){var h=s;s=c,c=h}if(f||s%1||c%1){var O=oA();return Sr(s+O*(c-s+n$("1e-"+((O+"").length-1))),c)}return fy(s,c)}var SJ=pl(function(s,c,f){return c=c.toLowerCase(),s+(f?MR(c):c)});function MR(s){return xy(zt(s).toLowerCase())}function xR(s){return s=zt(s),s&&s.replace(bK,N$).replace(QK,"")}function DJ(s,c,f){s=zt(s),c=di(c);var h=s.length;f=f===e?h:Ju(Et(f),0,h);var O=f;return f-=c.length,f>=0&&s.slice(f,O)==c}function bJ(s){return s=zt(s),s&&oK.test(s)?s.replace(T0,T$):s}function AJ(s){return s=zt(s),s&&pK.test(s)?s.replace(Ch,"\\$&"):s}var RJ=pl(function(s,c,f){return s+(f?"-":"")+c.toLowerCase()}),PJ=pl(function(s,c,f){return s+(f?" ":"")+c.toLowerCase()}),FJ=jA("toLowerCase");function wJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;if(!c||h>=c)return s;var O=(c-h)/2;return Pm(Em(O),f)+s+Pm(Tm(O),f)}function LJ(s,c,f){s=zt(s),c=Et(c);var h=c?ol(s):0;return c&&h>>0,f?(s=zt(s),s&&(typeof c=="string"||c!=null&&!Uy(c))&&(c=di(c),!c&&sl(s))?lu(sa(s),0,f):s.split(c,f)):[]}var qJ=pl(function(s,c,f){return s+(f?" ":"")+xy(c)});function VJ(s,c,f){return s=zt(s),f=f==null?0:Ju(Et(f),0,s.length),c=di(c),s.slice(f,f+c.length)==c}function jJ(s,c,f){var h=F.templateSettings;f&&xr(s,c,f)&&(c=e),s=zt(s),c=jm({},c,h,HA);var O=jm({},c.imports,h.imports,HA),L=pr(O),M=zh(O,L),V,J,ce=0,de=c.interpolate||tm,Te="__p += '",be=Xh((c.escape||tm).source+"|"+de.source+"|"+(de===E0?gK:tm).source+"|"+(c.evaluate||tm).source+"|$","g"),$e="//# sourceURL="+(on.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WK+"]")+` diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index 488c5871f7..b859475b89 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -217,7 +217,6 @@ export class EntityWalker { } } - // TODO use *origin* subgraph addUnresolvablePaths({ selectionPath, subgraphName }: AddUnresolvablePathsParams) { if (!this.relativeOriginPaths) { if (this.resolvedPaths.has(selectionPath)) { diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts index 2019efb364..e450780cb5 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -128,9 +128,9 @@ export class RootFieldWalker { if (edge.isEdgeInaccessible()) { return { visited: false, areDescendantsResolved: false }; } - // if (edge.isExternal) { - // return { visited: false, areDescendantsResolved: false, isExternal: true }; - // } + if (edge.isExternal) { + return { visited: false, areDescendantsResolved: false, isExternal: true }; + } if (edge.node.isLeaf) { return { visited: true, areDescendantsResolved: true }; } diff --git a/composition/tests/v1/resolvability.test.ts b/composition/tests/v1/resolvability.test.ts index d7e132ac9f..a8d5d9a2af 100644 --- a/composition/tests/v1/resolvability.test.ts +++ b/composition/tests/v1/resolvability.test.ts @@ -1819,7 +1819,22 @@ describe('Field resolvability tests', () => { }); test('that an @external key can still be a valid target', () => { - const { success } = federateSubgraphsSuccess([jaaa, jaab], ROUTER_COMPATIBILITY_VERSION_ONE); + const { federatedGraphSchema } = federateSubgraphsSuccess([jaaa, jaab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + SCHEMA_QUERY_DEFINITION + + ` + type Entity { + id: ID! + name: String! + } + + type Query { + entities: [Entity!]! + } + `, + ), + ); }); });