@kyro-cms/core 0.12.60 → 0.12.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/api-handler-graphql.cjs +1 -1
  2. package/dist/api-handler-graphql.js +1 -1
  3. package/dist/api-handler-trpc.cjs +1 -1
  4. package/dist/api-handler-trpc.js +1 -1
  5. package/dist/api-handler.cjs +1 -1
  6. package/dist/api-handler.js +1 -1
  7. package/dist/{bootstrap-VUWX45QN.js → bootstrap-WB6FDH2T.js} +1 -1
  8. package/dist/bootstrap-XDT4MRML.cjs +1 -0
  9. package/dist/{chunk-33E4YN62.js → chunk-26MOA3HJ.js} +10 -10
  10. package/dist/{chunk-M56F4LQ5.cjs → chunk-3XLXKGEU.cjs} +1 -1
  11. package/dist/{chunk-WQCLLM4S.cjs → chunk-4FHWIGHO.cjs} +10 -10
  12. package/dist/chunk-4ZWLNGLS.js +2 -0
  13. package/dist/{chunk-VOQUO2EZ.cjs → chunk-5DWQGEM2.cjs} +22 -22
  14. package/dist/{chunk-OXGJOYEO.js → chunk-637PTUHF.js} +1 -1
  15. package/dist/chunk-6QWX3DEB.cjs +120 -0
  16. package/dist/{chunk-ZMG7Z3KF.js → chunk-75BFTYBS.js} +23 -23
  17. package/dist/{chunk-YZEMLLD2.js → chunk-AWQGDMOE.js} +3 -3
  18. package/dist/chunk-D6SDGHY6.js +2 -0
  19. package/dist/{chunk-MP5VC5ER.cjs → chunk-FP5UK272.cjs} +1 -1
  20. package/dist/{chunk-AK754S3T.cjs → chunk-FSL3NLRT.cjs} +2 -2
  21. package/dist/{chunk-RTHJ6SS5.js → chunk-GQGFNTDZ.js} +1 -1
  22. package/dist/chunk-HKYBQYAJ.cjs +19 -0
  23. package/dist/{chunk-TDGSIF5H.cjs → chunk-JU3UAZRY.cjs} +10 -11
  24. package/dist/chunk-KMFLHGD5.cjs +1 -0
  25. package/dist/{chunk-NTKIONEC.cjs → chunk-LOP464VR.cjs} +1 -1
  26. package/dist/{chunk-R25WLKX4.js → chunk-N6MNQIQU.js} +101 -101
  27. package/dist/{chunk-BHR7OAU4.cjs → chunk-OPTVCCQQ.cjs} +101 -101
  28. package/dist/chunk-RDFGJHEG.js +2 -0
  29. package/dist/chunk-RILJCH6H.js +121 -0
  30. package/dist/{chunk-KCHPADCH.cjs → chunk-SOCBJPYB.cjs} +1 -1
  31. package/dist/chunk-T4JJVUGT.js +20 -0
  32. package/dist/{chunk-7N6TW4JB.js → chunk-TBTQXIHP.js} +1 -1
  33. package/dist/{chunk-KNOFTUQV.js → chunk-VJODUKKM.js} +11 -12
  34. package/dist/{chunk-DUO523BH.cjs → chunk-ZHA446FA.cjs} +1 -1
  35. package/dist/cli/index.cjs +1 -1
  36. package/dist/cli/index.js +1 -1
  37. package/dist/client.cjs +1 -1
  38. package/dist/client.js +1 -1
  39. package/dist/drizzle/index.cjs +1 -1
  40. package/dist/drizzle/index.d.cts +2 -1
  41. package/dist/drizzle/index.d.ts +2 -1
  42. package/dist/drizzle/index.js +1 -1
  43. package/dist/fields/index.cjs +1 -1
  44. package/dist/fields/index.js +1 -1
  45. package/dist/graphql/index.cjs +1 -1
  46. package/dist/graphql/index.d.cts +2 -0
  47. package/dist/graphql/index.d.ts +2 -0
  48. package/dist/graphql/index.js +1 -1
  49. package/dist/index.cjs +3 -3
  50. package/dist/index.d.cts +1 -1
  51. package/dist/index.d.ts +1 -1
  52. package/dist/index.js +5 -5
  53. package/dist/{local-2IFOTHAA.js → local-4MZ7KOL3.js} +1 -1
  54. package/dist/{local-UESCNPQP.cjs → local-NDTKWJQ6.cjs} +1 -1
  55. package/dist/postgres-auth-adapter-SK3N3OSS.js +1 -1
  56. package/dist/postgres-auth-adapter-ZO6HK5AK.cjs +1 -1
  57. package/dist/postgres-js-GXZX3AGZ.cjs +1 -0
  58. package/dist/{postgres-js-4CI7FMYS.js → postgres-js-WE3NBRFO.js} +1 -1
  59. package/dist/rest/index.cjs +1 -1
  60. package/dist/rest/index.d.cts +3 -3
  61. package/dist/rest/index.d.ts +3 -3
  62. package/dist/rest/index.js +1 -1
  63. package/dist/{sqlite-adapter-4TPNROJK.js → sqlite-adapter-52PL52VU.js} +1 -1
  64. package/dist/{sqlite-adapter-ZTABLT2X.cjs → sqlite-adapter-MNNZZXGX.cjs} +1 -1
  65. package/dist/trpc/index.cjs +1 -1
  66. package/dist/trpc/index.js +1 -1
  67. package/package.json +2 -2
  68. package/dist/bootstrap-JF6Q4L6P.cjs +0 -1
  69. package/dist/chunk-5LPNEYK5.cjs +0 -1
  70. package/dist/chunk-72VOOMJI.js +0 -20
  71. package/dist/chunk-AO2IXWV4.js +0 -2
  72. package/dist/chunk-OUMUIICN.cjs +0 -264
  73. package/dist/chunk-PA4ZZREG.js +0 -2
  74. package/dist/chunk-PCVQNVSU.cjs +0 -19
  75. package/dist/chunk-SQBTIMWF.js +0 -2
  76. package/dist/chunk-T4TSELDS.js +0 -265
  77. package/dist/postgres-js-3Y54EXVQ.cjs +0 -1
@@ -1,14 +1,14 @@
1
- 'use strict';var chunkDUO523BH_cjs=require('./chunk-DUO523BH.cjs'),chunk7WMMKGEO_cjs=require('./chunk-7WMMKGEO.cjs'),chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var Vi=Object.freeze({major:16,minor:14,patch:2,preReleaseTag:null});chunkBUNLC3II_cjs.h();function k(e,t){throw new Error(t)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function oe(e){return typeof e=="object"&&e!==null}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function z(e,t){throw new Error(t??"Unexpected invariant triggered.")}var Mi=/\r\n|[\n\r]/g;function Je(e,t){let n=0,r=1;for(let i of e.body.matchAll(Mi)){if(typeof i.index=="number"||z(),i.index>=t)break;n=i.index+i[0].length,r+=1;}return {line:r,column:t+1-n}}chunkBUNLC3II_cjs.h();function Rn(e){return qt(e.source,Je(e.source,e.start))}function qt(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,p=t.column+a,c=`${e.name}:${o}:${p}
2
- `,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){let h=Math.floor(p/80),g=p%80,N=[];for(let D=0;D<d.length;D+=80)N.push(d.slice(D,D+80));return c+Kr([[`${o} |`,N[0]],...N.slice(1,h+1).map(D=>["|",D]),["|","^".padStart(g)],["|",N[h+1]]])}return c+Kr([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(p)],[`${o+1} |`,f[i+1]]])}function Kr(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(`
3
- `)}function ji(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 m=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:a,positions:p,path:c,originalError:f,extensions:d}=ji(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Jr(Array.isArray(o)?o:o?[o]:void 0);let h=Jr((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=a??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=p??h?.map(N=>N.start),this.locations=p&&a?p.map(N=>Je(a,N)):h?.map(N=>Je(N.source,N.start));let g=oe(f?.extensions)?f?.extensions:void 0;this.extensions=(s=d??g)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:true,enumerable:true},name:{enumerable:false},nodes:{enumerable:false},source:{enumerable:false},positions:{enumerable:false},originalError:{enumerable:false}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:true,configurable:true}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:true,configurable:true});}get[Symbol.toStringTag](){return "GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
1
+ 'use strict';var chunkZHA446FA_cjs=require('./chunk-ZHA446FA.cjs'),chunk7WMMKGEO_cjs=require('./chunk-7WMMKGEO.cjs'),chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs');chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var Vi=Object.freeze({major:16,minor:14,patch:2,preReleaseTag:null});chunkBUNLC3II_cjs.h();function k(e,t){throw new Error(t)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function oe(e){return typeof e=="object"&&e!==null}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function z(e,t){throw new Error(t??"Unexpected invariant triggered.")}var Mi=/\r\n|[\n\r]/g;function Je(e,t){let n=0,r=1;for(let i of e.body.matchAll(Mi)){if(typeof i.index=="number"||z(),i.index>=t)break;n=i.index+i[0].length,r+=1;}return {line:r,column:t+1-n}}chunkBUNLC3II_cjs.h();function wn(e){return qt(e.source,Je(e.source,e.start))}function qt(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
2
+ `,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){let h=Math.floor(u/80),g=u%80,N=[];for(let D=0;D<d.length;D+=80)N.push(d.slice(D,D+80));return c+Kr([[`${o} |`,N[0]],...N.slice(1,h+1).map(D=>["|",D]),["|","^".padStart(g)],["|",N[h+1]]])}return c+Kr([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Kr(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(`
3
+ `)}function ji(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 m=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:a,positions:u,path:c,originalError:f,extensions:d}=ji(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Jr(Array.isArray(o)?o:o?[o]:void 0);let h=Jr((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=a??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=u??h?.map(N=>N.start),this.locations=u&&a?u.map(N=>Je(a,N)):h?.map(N=>Je(N.source,N.start));let g=oe(f?.extensions)?f?.extensions:void 0;this.extensions=(s=d??g)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:true,enumerable:true},name:{enumerable:false},nodes:{enumerable:false},source:{enumerable:false},positions:{enumerable:false},originalError:{enumerable:false}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:true,configurable:true}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:true,configurable:true});}get[Symbol.toStringTag](){return "GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
4
4
 
5
- `+Rn(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
5
+ `+wn(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
6
6
 
7
- `+qt(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Jr(e){return e===void 0||e.length===0?void 0:e}function K(e,t,n){return new m(`Syntax Error: ${n}`,{source:e,positions:[t]})}chunkBUNLC3II_cjs.h();var mt=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}}},Xe=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,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}}},ht={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Gi=new Set(Object.keys(ht));function yt(e){let t=e?.kind;return typeof t=="string"&&Gi.has(t)}var H;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription";})(H||(H={}));chunkBUNLC3II_cjs.h();exports.c=void 0;(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",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION";})(exports.c||(exports.c={}));chunkBUNLC3II_cjs.h();exports.d=void 0;(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.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate";})(exports.d||(exports.d={}));chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Yt(e){return e===9||e===32}function ze(e){return e>=48&&e<=57}function Xr(e){return e>=97&&e<=122||e>=65&&e<=90}function Tt(e){return Xr(e)||e===95}function Kt(e){return Xr(e)||ze(e)||e===95}function zr(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;let a=e[o],p=Pi(a);p!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&p<n&&(n=p));}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Pi(e){let t=0;for(;t<e.length&&Yt(e.charCodeAt(t));)++t;return t}function Wr(e){if(e==="")return true;let t=true,n=false,r=true,i=false;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return false;case 13:return false;case 10:if(t&&!i)return false;i=true,t=true,n=false;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=false;}return !(t||r&&i)}function Hr(e,t){let n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(g=>g.length===0||Yt(g.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,p=e.endsWith("\\"),c=a||p,f=(!i||e.length>70||c||s||o),d="",h=i&&Yt(e.charCodeAt(0));return (f&&!h||s)&&(d+=`
7
+ `+qt(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Jr(e){return e===void 0||e.length===0?void 0:e}function K(e,t,n){return new m(`Syntax Error: ${n}`,{source:e,positions:[t]})}chunkBUNLC3II_cjs.h();var mt=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}}},Xe=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,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}}},ht={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Gi=new Set(Object.keys(ht));function yt(e){let t=e?.kind;return typeof t=="string"&&Gi.has(t)}var H;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription";})(H||(H={}));chunkBUNLC3II_cjs.h();exports.c=void 0;(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",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION";})(exports.c||(exports.c={}));chunkBUNLC3II_cjs.h();exports.d=void 0;(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.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate";})(exports.d||(exports.d={}));chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Yt(e){return e===9||e===32}function ze(e){return e>=48&&e<=57}function Xr(e){return e>=97&&e<=122||e>=65&&e<=90}function Tt(e){return Xr(e)||e===95}function Kt(e){return Xr(e)||ze(e)||e===95}function zr(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;let a=e[o],u=Pi(a);u!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&u<n&&(n=u));}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Pi(e){let t=0;for(;t<e.length&&Yt(e.charCodeAt(t));)++t;return t}function Wr(e){if(e==="")return true;let t=true,n=false,r=true,i=false;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return false;case 13:return false;case 10:if(t&&!i)return false;i=true,t=true,n=false;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=false;}return !(t||r&&i)}function Hr(e,t){let n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(g=>g.length===0||Yt(g.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,f=(!i||e.length>70||c||s||o),d="",h=i&&Yt(e.charCodeAt(0));return (f&&!h||s)&&(d+=`
8
8
  `),d+=n,(f||c)&&(d+=`
9
- `),'"""'+d+'"""'}chunkBUNLC3II_cjs.h();var y;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment";})(y||(y={}));var Nt=class{constructor(t){let n=new Xe(y.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!==y.EOF)do if(t.next)t=t.next;else {let n=Qi(this,t.end);t.next=n,n.prev=t,t=n;}while(t.kind===y.COMMENT);return t}};function ei(e){return e===y.BANG||e===y.DOLLAR||e===y.AMP||e===y.PAREN_L||e===y.PAREN_R||e===y.DOT||e===y.SPREAD||e===y.COLON||e===y.EQUALS||e===y.AT||e===y.BRACKET_L||e===y.BRACKET_R||e===y.BRACE_L||e===y.PIPE||e===y.BRACE_R}function We(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Jt(e,t){return ti(e.charCodeAt(t))&&ni(e.charCodeAt(t+1))}function ti(e){return e>=55296&&e<=56319}function ni(e){return e>=56320&&e<=57343}function Ve(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return y.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return "U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Z(e,t,n,r,i){let s=e.line,o=1+n-e.lineStart;return new Xe(t,n,r,s,o,i)}function Qi(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Bi(e,i);case 33:return Z(e,y.BANG,i,i+1);case 36:return Z(e,y.DOLLAR,i,i+1);case 38:return Z(e,y.AMP,i,i+1);case 40:return Z(e,y.PAREN_L,i,i+1);case 41:return Z(e,y.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Z(e,y.SPREAD,i,i+3);break;case 58:return Z(e,y.COLON,i,i+1);case 61:return Z(e,y.EQUALS,i,i+1);case 64:return Z(e,y.AT,i,i+1);case 91:return Z(e,y.BRACKET_L,i,i+1);case 93:return Z(e,y.BRACKET_R,i,i+1);case 123:return Z(e,y.BRACE_L,i,i+1);case 124:return Z(e,y.PIPE,i,i+1);case 125:return Z(e,y.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?zi(e,i):Yi(e,i)}if(ze(s)||s===45)return qi(e,i,s);if(Tt(s))return Wi(e,i);throw K(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:We(s)||Jt(n,i)?`Unexpected character: ${Ve(e,i)}.`:`Invalid character: ${Ve(e,i)}.`)}return Z(e,y.EOF,r,r)}function Bi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(We(s))++i;else if(Jt(n,i))i+=2;else break}return Z(e,y.COMMENT,t,i,n.slice(t+1,i))}function qi(e,t,n){let r=e.source.body,i=t,s=n,o=false;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),ze(s))throw K(e.source,i,`Invalid number, unexpected digit after 0: ${Ve(e,i)}.`)}else i=wn(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=true,s=r.charCodeAt(++i),i=wn(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=true,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=wn(e,i,s),s=r.charCodeAt(i)),s===46||Tt(s))throw K(e.source,i,`Invalid number, expected digit but got: ${Ve(e,i)}.`);return Z(e,o?y.FLOAT:y.INT,t,i,r.slice(t,i))}function wn(e,t,n){if(!ze(n))throw K(e.source,t,`Invalid number, expected digit but got: ${Ve(e,t)}.`);let r=e.source.body,i=t+1;for(;ze(r.charCodeAt(i));)++i;return i}function Yi(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,o="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),Z(e,y.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);let p=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Ki(e,i):Ji(e,i):Xi(e,i);o+=p.value,i+=p.size,s=i;continue}if(a===10||a===13)break;if(We(a))++i;else if(Jt(n,i))i+=2;else throw K(e.source,i,`Invalid character within String: ${Ve(e,i)}.`)}throw K(e.source,i,"Unterminated string.")}function Ki(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!We(r))break;return {value:String.fromCodePoint(r),size:i}}if(r=r<<4|Et(s),r<0)break}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ji(e,t){let n=e.source.body,r=Zr(n,t+2);if(We(r))return {value:String.fromCodePoint(r),size:6};if(ti(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=Zr(n,t+8);if(ni(i))return {value:String.fromCodePoint(r,i),size:12}}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Zr(e,t){return Et(e.charCodeAt(t))<<12|Et(e.charCodeAt(t+1))<<8|Et(e.charCodeAt(t+2))<<4|Et(e.charCodeAt(t+3))}function Et(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Xi(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:`
10
- `,size:2};case 114:return {value:"\r",size:2};case 116:return {value:" ",size:2}}throw K(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function zi(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,a="",p=[];for(;s<r;){let c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),p.push(a);let f=Z(e,y.BLOCK_STRING,t,s+3,zr(p).join(`
11
- `));return e.line+=p.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),p.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(We(c))++s;else if(Jt(n,s))s+=2;else throw K(e.source,s,`Invalid character within String: ${Ve(e,s)}.`)}throw K(e.source,s,"Unterminated string.")}function Wi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(Kt(s))++i;else break}return Z(e,y.NAME,t,i,n.slice(t,i))}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function E(e){return Xt(e,[])}function Xt(e,t){switch(typeof e){case "string":return JSON.stringify(e);case "function":return e.name?`[function ${e.name}]`:"[function]";case "object":return Hi(e,t);default:return String(e)}}function Hi(e,t){if(e===null)return "null";if(t.includes(e))return "[Circular]";let n=[...t,e];if(Zi(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Xt(r,n)}else if(Array.isArray(e))return ts(e,n);return es(e,n)}function Zi(e){return typeof e.toJSON=="function"}function es(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+ns(e)+"]":"{ "+n.map(([i,s])=>i+": "+Xt(s,t)).join(", ")+" }"}function ts(e,t){if(e.length===0)return "[]";if(t.length>2)return "[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Xt(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function ns(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}chunkBUNLC3II_cjs.h();var rs=globalThis.process&&process.env.NODE_ENV==="production",ae=rs?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return true;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let o=E(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
9
+ `),'"""'+d+'"""'}chunkBUNLC3II_cjs.h();var y;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment";})(y||(y={}));var Nt=class{constructor(t){let n=new Xe(y.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!==y.EOF)do if(t.next)t=t.next;else {let n=Qi(this,t.end);t.next=n,n.prev=t,t=n;}while(t.kind===y.COMMENT);return t}};function ei(e){return e===y.BANG||e===y.DOLLAR||e===y.AMP||e===y.PAREN_L||e===y.PAREN_R||e===y.DOT||e===y.SPREAD||e===y.COLON||e===y.EQUALS||e===y.AT||e===y.BRACKET_L||e===y.BRACKET_R||e===y.BRACE_L||e===y.PIPE||e===y.BRACE_R}function We(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Jt(e,t){return ti(e.charCodeAt(t))&&ni(e.charCodeAt(t+1))}function ti(e){return e>=55296&&e<=56319}function ni(e){return e>=56320&&e<=57343}function Ve(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return y.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return "U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Z(e,t,n,r,i){let s=e.line,o=1+n-e.lineStart;return new Xe(t,n,r,s,o,i)}function Qi(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Bi(e,i);case 33:return Z(e,y.BANG,i,i+1);case 36:return Z(e,y.DOLLAR,i,i+1);case 38:return Z(e,y.AMP,i,i+1);case 40:return Z(e,y.PAREN_L,i,i+1);case 41:return Z(e,y.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Z(e,y.SPREAD,i,i+3);break;case 58:return Z(e,y.COLON,i,i+1);case 61:return Z(e,y.EQUALS,i,i+1);case 64:return Z(e,y.AT,i,i+1);case 91:return Z(e,y.BRACKET_L,i,i+1);case 93:return Z(e,y.BRACKET_R,i,i+1);case 123:return Z(e,y.BRACE_L,i,i+1);case 124:return Z(e,y.PIPE,i,i+1);case 125:return Z(e,y.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?zi(e,i):Yi(e,i)}if(ze(s)||s===45)return qi(e,i,s);if(Tt(s))return Wi(e,i);throw K(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:We(s)||Jt(n,i)?`Unexpected character: ${Ve(e,i)}.`:`Invalid character: ${Ve(e,i)}.`)}return Z(e,y.EOF,r,r)}function Bi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(We(s))++i;else if(Jt(n,i))i+=2;else break}return Z(e,y.COMMENT,t,i,n.slice(t+1,i))}function qi(e,t,n){let r=e.source.body,i=t,s=n,o=false;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),ze(s))throw K(e.source,i,`Invalid number, unexpected digit after 0: ${Ve(e,i)}.`)}else i=kn(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=true,s=r.charCodeAt(++i),i=kn(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=true,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=kn(e,i,s),s=r.charCodeAt(i)),s===46||Tt(s))throw K(e.source,i,`Invalid number, expected digit but got: ${Ve(e,i)}.`);return Z(e,o?y.FLOAT:y.INT,t,i,r.slice(t,i))}function kn(e,t,n){if(!ze(n))throw K(e.source,t,`Invalid number, expected digit but got: ${Ve(e,t)}.`);let r=e.source.body,i=t+1;for(;ze(r.charCodeAt(i));)++i;return i}function Yi(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,o="";for(;i<r;){let a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),Z(e,y.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);let u=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Ki(e,i):Ji(e,i):Xi(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(We(a))++i;else if(Jt(n,i))i+=2;else throw K(e.source,i,`Invalid character within String: ${Ve(e,i)}.`)}throw K(e.source,i,"Unterminated string.")}function Ki(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!We(r))break;return {value:String.fromCodePoint(r),size:i}}if(r=r<<4|Et(s),r<0)break}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ji(e,t){let n=e.source.body,r=Zr(n,t+2);if(We(r))return {value:String.fromCodePoint(r),size:6};if(ti(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=Zr(n,t+8);if(ni(i))return {value:String.fromCodePoint(r,i),size:12}}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Zr(e,t){return Et(e.charCodeAt(t))<<12|Et(e.charCodeAt(t+1))<<8|Et(e.charCodeAt(t+2))<<4|Et(e.charCodeAt(t+3))}function Et(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Xi(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:`
10
+ `,size:2};case 114:return {value:"\r",size:2};case 116:return {value:" ",size:2}}throw K(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function zi(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,a="",u=[];for(;s<r;){let c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),u.push(a);let f=Z(e,y.BLOCK_STRING,t,s+3,zr(u).join(`
11
+ `));return e.line+=u.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),u.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(We(c))++s;else if(Jt(n,s))s+=2;else throw K(e.source,s,`Invalid character within String: ${Ve(e,s)}.`)}throw K(e.source,s,"Unterminated string.")}function Wi(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(Kt(s))++i;else break}return Z(e,y.NAME,t,i,n.slice(t,i))}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function E(e){return Xt(e,[])}function Xt(e,t){switch(typeof e){case "string":return JSON.stringify(e);case "function":return e.name?`[function ${e.name}]`:"[function]";case "object":return Hi(e,t);default:return String(e)}}function Hi(e,t){if(e===null)return "null";if(t.includes(e))return "[Circular]";let n=[...t,e];if(Zi(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Xt(r,n)}else if(Array.isArray(e))return ts(e,n);return es(e,n)}function Zi(e){return typeof e.toJSON=="function"}function es(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+ns(e)+"]":"{ "+n.map(([i,s])=>i+": "+Xt(s,t)).join(", ")+" }"}function ts(e,t){if(e.length===0)return "[]";if(t.length>2)return "[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Xt(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function ns(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}chunkBUNLC3II_cjs.h();var rs=globalThis.process&&process.env.NODE_ENV==="production",ae=rs?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return true;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let o=E(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
12
12
 
13
13
  Ensure that there is only one instance of "graphql" in the node_modules
14
14
  directory. If different versions of "graphql" are the dependencies of other
@@ -19,9 +19,9 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
19
19
  Duplicate "graphql" modules cannot be used at the same time since different
20
20
  versions may have different capabilities and behavior. The data from one
21
21
  version used in the function from another could produce confusing and
22
- spurious results.`)}}return false};var He=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||k(false,`Body must be a string. Received: ${E(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||k(false,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||k(false,"column in locationOffset is 1-indexed and must be positive.");}get[Symbol.toStringTag](){return "Source"}};function ri(e){return ae(e,He)}function ii(e,t){let n=new kn(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:false,value:n.tokenCount}),r}var kn=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else {let s=ri(t)?t:new He(t);this._lexer=new Nt(s);}this._options=i,this._tokenCounter=0;}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(y.NAME);return this.node(t,{kind:exports.d.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:exports.d.DOCUMENT,definitions:this.many(y.SOF,this.parseDefinition,y.EOF)})}parseDefinition(){if(this.peek(y.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===y.BRACE_L)throw K(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===y.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()}switch(n.value){case "query":case "mutation":case "subscription":return this.parseOperationDefinition();case "fragment":return this.parseFragmentDefinition()}if(t)throw K(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(y.BRACE_L))return this.node(t,{kind:exports.d.OPERATION_DEFINITION,operation:H.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(y.NAME)&&(i=this.parseName()),this.node(t,{kind:exports.d.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(y.NAME);switch(t.value){case "query":return H.QUERY;case "mutation":return H.MUTATION;case "subscription":return H.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(y.PAREN_L,this.parseVariableDefinition,y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:exports.d.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(y.DOLLAR),this.node(t,{kind:exports.d.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:exports.d.SELECTION_SET,selections:this.many(y.BRACE_L,this.parseSelection,y.BRACE_R)})}parseSelection(){return this.peek(y.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(y.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:exports.d.FIELD,alias:r,name:i,arguments:this.parseArguments(false),directives:this.parseDirectives(false),selectionSet:this.peek(y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(y.PAREN_L,n,y.PAREN_R)}parseArgument(t=false){let n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:exports.d.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(true)}parseFragment(){let t=this._lexer.token;this.expectToken(y.SPREAD);let n=this.expectOptionalKeyword("on");return !n&&this.peek(y.NAME)?this.node(t,{kind:exports.d.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(false)}):this.node(t,{kind:exports.d.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===true?this.node(t,{kind:exports.d.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:exports.d.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),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 y.BRACKET_L:return this.parseList(t);case y.BRACE_L:return this.parseObject(t);case y.INT:return this.advanceLexer(),this.node(n,{kind:exports.d.INT,value:n.value});case y.FLOAT:return this.advanceLexer(),this.node(n,{kind:exports.d.FLOAT,value:n.value});case y.STRING:case y.BLOCK_STRING:return this.parseStringLiteral();case y.NAME:switch(this.advanceLexer(),n.value){case "true":return this.node(n,{kind:exports.d.BOOLEAN,value:true});case "false":return this.node(n,{kind:exports.d.BOOLEAN,value:false});case "null":return this.node(n,{kind:exports.d.NULL});default:return this.node(n,{kind:exports.d.ENUM,value:n.value})}case y.DOLLAR:if(t)if(this.expectToken(y.DOLLAR),this._lexer.token.kind===y.NAME){let r=this._lexer.token.value;throw K(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(true)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:exports.d.STRING,value:t.value,block:t.kind===y.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:exports.d.LIST,values:this.any(y.BRACKET_L,n,y.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:exports.d.OBJECT,fields:this.any(y.BRACE_L,n,y.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:exports.d.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(y.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(true)}parseDirective(t){let n=this._lexer.token;return this.expectToken(y.AT),this.node(n,{kind:exports.d.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(y.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(y.BRACKET_R),n=this.node(t,{kind:exports.d.LIST_TYPE,type:r});}else n=this.parseNamedType();return this.expectOptionalToken(y.BANG)?this.node(t,{kind:exports.d.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:exports.d.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(y.STRING)||this.peek(y.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(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);return this.node(t,{kind:exports.d.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(y.COLON);let r=this.parseNamedType();return this.node(t,{kind:exports.d.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:exports.d.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:exports.d.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseFieldDefinition,y.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(y.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:exports.d.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(y.PAREN_L,this.parseInputValueDef,y.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(y.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(y.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:exports.d.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:exports.d.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:exports.d.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(y.EQUALS)?this.delimitedMany(y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:exports.d.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(y.BRACE_L,this.parseEnumValueDefinition,y.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:exports.d.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 K(this._lexer.source,this._lexer.token.start,`${zt(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:exports.d.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseInputValueDef,y.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===y.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();case "directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension();break}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.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:exports.d.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:exports.d.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:exports.d.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:exports.d.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinitionExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(y.AT);let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(y.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:exports.d.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:s,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(exports.c,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(y.AT),r=this.parseName(),i;!n&&this.expectOptionalToken(y.DOT)&&(i=this.parseName());let s;return (n||i)&&this.expectOptionalToken(y.PAREN_L)&&(s=this.parseName(),this.expectToken(y.COLON),this.expectToken(y.PAREN_R)),n?s?this.node(t,{kind:exports.d.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:s}):this.node(t,{kind:exports.d.DIRECTIVE_COORDINATE,name:r}):i?s?this.node(t,{kind:exports.d.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:s}):this.node(t,{kind:exports.d.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:exports.d.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==true&&(n.loc=new mt(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 K(this._lexer.source,n.start,`Expected ${si(t)}, found ${zt(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),true):false}expectKeyword(t){let n=this._lexer.token;if(n.kind===y.NAME&&n.value===t)this.advanceLexer();else throw K(this._lexer.source,n.start,`Expected "${t}", found ${zt(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===y.NAME&&n.value===t?(this.advanceLexer(),true):false}unexpected(t){let n=t??this._lexer.token;return K(this._lexer.source,n.start,`Unexpected ${zt(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(n.kind!==y.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw K(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function zt(e){let t=e.value;return si(e.kind)+(t!=null?` "${t}"`:"")}function si(e){return ei(e)?`"${e}"`:e}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function ie(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(p=>`"${p}"`);switch(s.length){case 0:return "";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,5),a=o.pop();return i+o.join(", ")+", or "+a+"?"}chunkBUNLC3II_cjs.h();function Fn(e){return e}chunkBUNLC3II_cjs.h();function ve(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}chunkBUNLC3II_cjs.h();function gt(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}chunkBUNLC3II_cjs.h();function Me(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Ze(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(Wt(i)&&Wt(s)){let o=0;do++n,o=o*10+i-Cn,i=e.charCodeAt(n);while(Wt(i)&&o>0);let a=0;do++r,a=a*10+s-Cn,s=t.charCodeAt(r);while(Wt(s)&&a>0);if(o<a)return -1;if(o>a)return 1}else {if(i<s)return -1;if(i>s)return 1;++n,++r;}}return e.length-t.length}var Cn=48,is=57;function Wt(e){return !isNaN(e)&&Cn<=e&&e<=is}function ue(e,t){let n=Object.create(null),r=new $n(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o);}return Object.keys(n).sort((s,o)=>{let a=n[s]-n[o];return a!==0?a:Ze(s,o)})}var $n=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=oi(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=oi(r),s=this._inputArray;if(i.length<s.length){let f=i;i=s,s=f;}let o=i.length,a=s.length;if(o-a>n)return;let p=this._rows;for(let f=0;f<=a;f++)p[0][f]=f;for(let f=1;f<=o;f++){let d=p[(f-1)%3],h=p[f%3],g=h[0]=f;for(let N=1;N<=a;N++){let D=i[f-1]===s[N-1]?0:1,R=Math.min(d[N]+1,h[N-1]+1,d[N-1]+D);if(f>1&&N>1&&i[f-1]===s[N-2]&&i[f-2]===s[N-1]){let A=p[(f-2)%3][N-2];R=Math.min(R,A+1);}R<g&&(g=R),h[N]=R;}if(g>n)return}let c=p[o%3][a];return c<=n?c:void 0}};function oi(e){let t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}chunkBUNLC3II_cjs.h();function pe(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}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function ai(e){return `"${e.replace(ss,os)}"`}var ss=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function os(e){return as[e.charCodeAt(0)]}var as=["\\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"];chunkBUNLC3II_cjs.h();var et=Object.freeze({});function je(e,t,n=ht){let r=new Map;for(let A of Object.values(exports.d))r.set(A,tt(t,A));let i,s=Array.isArray(e),o=[e],a=-1,p=[],c=e,f,d,h=[],g=[];do{a++;let A=a===o.length,G=A&&p.length!==0;if(A){if(f=g.length===0?void 0:h[h.length-1],c=d,d=g.pop(),G)if(s){c=c.slice();let v=0;for(let[q,X]of p){let P=q-v;X===null?(c.splice(P,1),v++):c[P]=X;}}else {c={...c};for(let[v,q]of p)c[v]=q;}a=i.index,o=i.keys,p=i.edits,s=i.inArray,i=i.prev;}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;h.push(f);}let Y;if(!Array.isArray(c)){var N,D;yt(c)||k(false,`Invalid AST Node: ${E(c)}.`);let v=A?(N=r.get(c.kind))===null||N===void 0?void 0:N.leave:(D=r.get(c.kind))===null||D===void 0?void 0:D.enter;if(Y=v?.call(t,c,f,d,h,g),Y===et)break;if(Y===false){if(!A){h.pop();continue}}else if(Y!==void 0&&(p.push([f,Y]),!A))if(yt(Y))c=Y;else {h.pop();continue}}if(Y===void 0&&G&&p.push([f,c]),A)h.pop();else {var R;i={inArray:s,index:a,keys:o,edits:p,prev:i},s=Array.isArray(c),o=s?c:(R=n[c.kind])!==null&&R!==void 0?R:[],a=-1,p=[],d&&g.push(d),d=c;}}while(i!==void 0);return p.length!==0?p[p.length-1][1]:e}function Un(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(exports.d)){let i=false,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let p=0;p<e.length;++p){let{enter:c,leave:f}=tt(e[p],r);i||(i=c!=null||f!=null),s[p]=c,o[p]=f;}if(!i)continue;let a={enter(...p){let c=p[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;let h=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],p);if(h===false)t[d]=c;else if(h===et)t[d]=et;else if(h!==void 0)return h}},leave(...p){let c=p[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;let h=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],p);if(h===et)t[d]=et;else if(h!==void 0&&h!==false)return h}else t[d]===c&&(t[d]=null);}};n[r]=a;}return n}function tt(e,t){let n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function $(e){return je(e,ps)}var us=80,ps={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>I(e.definitions,`
22
+ spurious results.`)}}return false};var He=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||k(false,`Body must be a string. Received: ${E(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||k(false,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||k(false,"column in locationOffset is 1-indexed and must be positive.");}get[Symbol.toStringTag](){return "Source"}};function ri(e){return ae(e,He)}function ii(e,t){let n=new Fn(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:false,value:n.tokenCount}),r}var Fn=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else {let s=ri(t)?t:new He(t);this._lexer=new Nt(s);}this._options=i,this._tokenCounter=0;}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(y.NAME);return this.node(t,{kind:exports.d.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:exports.d.DOCUMENT,definitions:this.many(y.SOF,this.parseDefinition,y.EOF)})}parseDefinition(){if(this.peek(y.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===y.BRACE_L)throw K(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===y.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()}switch(n.value){case "query":case "mutation":case "subscription":return this.parseOperationDefinition();case "fragment":return this.parseFragmentDefinition()}if(t)throw K(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(y.BRACE_L))return this.node(t,{kind:exports.d.OPERATION_DEFINITION,operation:H.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(y.NAME)&&(i=this.parseName()),this.node(t,{kind:exports.d.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(y.NAME);switch(t.value){case "query":return H.QUERY;case "mutation":return H.MUTATION;case "subscription":return H.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(y.PAREN_L,this.parseVariableDefinition,y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:exports.d.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(y.DOLLAR),this.node(t,{kind:exports.d.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:exports.d.SELECTION_SET,selections:this.many(y.BRACE_L,this.parseSelection,y.BRACE_R)})}parseSelection(){return this.peek(y.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(y.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:exports.d.FIELD,alias:r,name:i,arguments:this.parseArguments(false),directives:this.parseDirectives(false),selectionSet:this.peek(y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(y.PAREN_L,n,y.PAREN_R)}parseArgument(t=false){let n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:exports.d.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(true)}parseFragment(){let t=this._lexer.token;this.expectToken(y.SPREAD);let n=this.expectOptionalKeyword("on");return !n&&this.peek(y.NAME)?this.node(t,{kind:exports.d.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(false)}):this.node(t,{kind:exports.d.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===true?this.node(t,{kind:exports.d.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:exports.d.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(false),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 y.BRACKET_L:return this.parseList(t);case y.BRACE_L:return this.parseObject(t);case y.INT:return this.advanceLexer(),this.node(n,{kind:exports.d.INT,value:n.value});case y.FLOAT:return this.advanceLexer(),this.node(n,{kind:exports.d.FLOAT,value:n.value});case y.STRING:case y.BLOCK_STRING:return this.parseStringLiteral();case y.NAME:switch(this.advanceLexer(),n.value){case "true":return this.node(n,{kind:exports.d.BOOLEAN,value:true});case "false":return this.node(n,{kind:exports.d.BOOLEAN,value:false});case "null":return this.node(n,{kind:exports.d.NULL});default:return this.node(n,{kind:exports.d.ENUM,value:n.value})}case y.DOLLAR:if(t)if(this.expectToken(y.DOLLAR),this._lexer.token.kind===y.NAME){let r=this._lexer.token.value;throw K(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(true)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:exports.d.STRING,value:t.value,block:t.kind===y.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:exports.d.LIST,values:this.any(y.BRACKET_L,n,y.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:exports.d.OBJECT,fields:this.any(y.BRACE_L,n,y.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(n,{kind:exports.d.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(y.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(true)}parseDirective(t){let n=this._lexer.token;return this.expectToken(y.AT),this.node(n,{kind:exports.d.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(y.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(y.BRACKET_R),n=this.node(t,{kind:exports.d.LIST_TYPE,type:r});}else n=this.parseNamedType();return this.expectOptionalToken(y.BANG)?this.node(t,{kind:exports.d.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:exports.d.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(y.STRING)||this.peek(y.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(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);return this.node(t,{kind:exports.d.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(y.COLON);let r=this.parseNamedType();return this.node(t,{kind:exports.d.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:exports.d.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(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:exports.d.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseFieldDefinition,y.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(y.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:exports.d.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(y.PAREN_L,this.parseInputValueDef,y.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(y.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(y.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:exports.d.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:exports.d.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:exports.d.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(y.EQUALS)?this.delimitedMany(y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:exports.d.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(y.BRACE_L,this.parseEnumValueDefinition,y.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:exports.d.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 K(this._lexer.source,this._lexer.token.start,`${zt(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(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:exports.d.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseInputValueDef,y.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===y.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();case "directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension();break}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.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:exports.d.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(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}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:exports.d.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:exports.d.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:exports.d.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinitionExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(y.AT);let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:exports.d.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(y.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:exports.d.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:s,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(exports.c,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){let t=this._lexer.token,n=this.expectOptionalToken(y.AT),r=this.parseName(),i;!n&&this.expectOptionalToken(y.DOT)&&(i=this.parseName());let s;return (n||i)&&this.expectOptionalToken(y.PAREN_L)&&(s=this.parseName(),this.expectToken(y.COLON),this.expectToken(y.PAREN_R)),n?s?this.node(t,{kind:exports.d.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:s}):this.node(t,{kind:exports.d.DIRECTIVE_COORDINATE,name:r}):i?s?this.node(t,{kind:exports.d.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:s}):this.node(t,{kind:exports.d.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:exports.d.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==true&&(n.loc=new mt(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 K(this._lexer.source,n.start,`Expected ${si(t)}, found ${zt(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),true):false}expectKeyword(t){let n=this._lexer.token;if(n.kind===y.NAME&&n.value===t)this.advanceLexer();else throw K(this._lexer.source,n.start,`Expected "${t}", found ${zt(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===y.NAME&&n.value===t?(this.advanceLexer(),true):false}unexpected(t){let n=t??this._lexer.token;return K(this._lexer.source,n.start,`Unexpected ${zt(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(n.kind!==y.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw K(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function zt(e){let t=e.value;return si(e.kind)+(t!=null?` "${t}"`:"")}function si(e){return ei(e)?`"${e}"`:e}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function ie(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(u=>`"${u}"`);switch(s.length){case 0:return "";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,5),a=o.pop();return i+o.join(", ")+", or "+a+"?"}chunkBUNLC3II_cjs.h();function Cn(e){return e}chunkBUNLC3II_cjs.h();function ve(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}chunkBUNLC3II_cjs.h();function gt(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}chunkBUNLC3II_cjs.h();function Me(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Ze(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(Wt(i)&&Wt(s)){let o=0;do++n,o=o*10+i-$n,i=e.charCodeAt(n);while(Wt(i)&&o>0);let a=0;do++r,a=a*10+s-$n,s=t.charCodeAt(r);while(Wt(s)&&a>0);if(o<a)return -1;if(o>a)return 1}else {if(i<s)return -1;if(i>s)return 1;++n,++r;}}return e.length-t.length}var $n=48,is=57;function Wt(e){return !isNaN(e)&&$n<=e&&e<=is}function ue(e,t){let n=Object.create(null),r=new Un(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o);}return Object.keys(n).sort((s,o)=>{let a=n[s]-n[o];return a!==0?a:Ze(s,o)})}var Un=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=oi(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=oi(r),s=this._inputArray;if(i.length<s.length){let f=i;i=s,s=f;}let o=i.length,a=s.length;if(o-a>n)return;let u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){let d=u[(f-1)%3],h=u[f%3],g=h[0]=f;for(let N=1;N<=a;N++){let D=i[f-1]===s[N-1]?0:1,R=Math.min(d[N]+1,h[N-1]+1,d[N-1]+D);if(f>1&&N>1&&i[f-1]===s[N-2]&&i[f-2]===s[N-1]){let A=u[(f-2)%3][N-2];R=Math.min(R,A+1);}R<g&&(g=R),h[N]=R;}if(g>n)return}let c=u[o%3][a];return c<=n?c:void 0}};function oi(e){let t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}chunkBUNLC3II_cjs.h();function pe(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}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function ai(e){return `"${e.replace(ss,os)}"`}var ss=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function os(e){return as[e.charCodeAt(0)]}var as=["\\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"];chunkBUNLC3II_cjs.h();var et=Object.freeze({});function je(e,t,n=ht){let r=new Map;for(let A of Object.values(exports.d))r.set(A,tt(t,A));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d,h=[],g=[];do{a++;let A=a===o.length,G=A&&u.length!==0;if(A){if(f=g.length===0?void 0:h[h.length-1],c=d,d=g.pop(),G)if(s){c=c.slice();let v=0;for(let[q,X]of u){let P=q-v;X===null?(c.splice(P,1),v++):c[P]=X;}}else {c={...c};for(let[v,q]of u)c[v]=q;}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev;}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;h.push(f);}let Y;if(!Array.isArray(c)){var N,D;yt(c)||k(false,`Invalid AST Node: ${E(c)}.`);let v=A?(N=r.get(c.kind))===null||N===void 0?void 0:N.leave:(D=r.get(c.kind))===null||D===void 0?void 0:D.enter;if(Y=v?.call(t,c,f,d,h,g),Y===et)break;if(Y===false){if(!A){h.pop();continue}}else if(Y!==void 0&&(u.push([f,Y]),!A))if(yt(Y))c=Y;else {h.pop();continue}}if(Y===void 0&&G&&u.push([f,c]),A)h.pop();else {var R;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(R=n[c.kind])!==null&&R!==void 0?R:[],a=-1,u=[],d&&g.push(d),d=c;}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function Vn(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(exports.d)){let i=false,s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){let{enter:c,leave:f}=tt(e[u],r);i||(i=c!=null||f!=null),s[u]=c,o[u]=f;}if(!i)continue;let a={enter(...u){let c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;let h=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===false)t[d]=c;else if(h===et)t[d]=et;else if(h!==void 0)return h}},leave(...u){let c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;let h=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===et)t[d]=et;else if(h!==void 0&&h!==false)return h}else t[d]===c&&(t[d]=null);}};n[r]=a;}return n}function tt(e,t){let n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function $(e){return je(e,ps)}var us=80,ps={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>I(e.definitions,`
23
23
 
24
- `)},OperationDefinition:{leave(e){let t=Vn(e.variableDefinitions)?L(`(
24
+ `)},OperationDefinition:{leave(e){let t=Mn(e.variableDefinitions)?L(`(
25
25
  `,I(e.variableDefinitions,`
26
26
  `),`
27
27
  )`):L("(",I(e.variableDefinitions,", "),")"),n=L("",e.description,`
@@ -34,7 +34,7 @@ spurious results.`)}}return false};var He=class{constructor(t,n="GraphQL reques
34
34
  `)+I(["schema",I(t," "),Ie(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>L("",e,`
35
35
  `)+I(["scalar",t,I(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>L("",e,`
36
36
  `)+I(["type",t,L("implements ",I(n," & ")),I(r," "),Ie(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>L("",e,`
37
- `)+t+(Vn(n)?L(`(
37
+ `)+t+(Mn(n)?L(`(
38
38
  `,Ht(I(n,`
39
39
  `)),`
40
40
  )`):L("(",I(n,", "),")"))+": "+r+L(" ",I(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>L("",e,`
@@ -44,31 +44,31 @@ spurious results.`)}}return false};var He=class{constructor(t,n="GraphQL reques
44
44
  `)+I(["enum",t,I(n," "),Ie(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>L("",e,`
45
45
  `)+I([t,I(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>L("",e,`
46
46
  `)+I(["input",t,I(n," "),Ie(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,directives:r,repeatable:i,locations:s})=>L("",e,`
47
- `)+"directive @"+t+(Vn(n)?L(`(
47
+ `)+"directive @"+t+(Mn(n)?L(`(
48
48
  `,Ht(I(n,`
49
49
  `)),`
50
50
  )`):L("(",I(n,", "),")"))+L(" ",I(r," "))+(i?" repeatable":"")+" on "+I(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>I(["extend schema",I(e," "),Ie(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>I(["extend scalar",e,I(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>I(["extend type",e,L("implements ",I(t," & ")),I(n," "),Ie(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>I(["extend interface",e,L("implements ",I(t," & ")),I(n," "),Ie(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>I(["extend union",e,I(t," "),L("= ",I(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>I(["extend enum",e,I(t," "),Ie(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>I(["extend input",e,I(t," "),Ie(n)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>I(["extend directive @"+e,I(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>I([e,L(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>I([e,L(".",t),L("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>I(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>I(["@",e,L("(",t,":)")])}};function I(e,t=""){var n;return (n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Ie(e){return L(`{
51
51
  `,Ht(I(e,`
52
52
  `)),`
53
53
  }`)}function L(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Ht(e){return L(" ",e.replace(/\n/g,`
54
- `))}function Vn(e){var t;return (t=e?.some(n=>n.includes(`
55
- `)))!==null&&t!==void 0?t:false}chunkBUNLC3II_cjs.h();function nt(e,t){switch(e.kind){case exports.d.NULL:return null;case exports.d.INT:return parseInt(e.value,10);case exports.d.FLOAT:return parseFloat(e.value);case exports.d.STRING:case exports.d.ENUM:case exports.d.BOOLEAN:return e.value;case exports.d.LIST:return e.values.map(n=>nt(n,t));case exports.d.OBJECT:return gt(e.fields,n=>n.name.value,n=>nt(n.value,t));case exports.d.VARIABLE:return t?.[e.name.value]}}chunkBUNLC3II_cjs.h();function fe(e){if(e!=null||k(false,"Must provide name."),typeof e=="string"||k(false,"Expected name to be a string."),e.length===0)throw new m("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Kt(e.charCodeAt(t)))throw new m(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Tt(e.charCodeAt(0)))throw new m(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Mn(e){if(e==="true"||e==="false"||e==="null")throw new m(`Enum values cannot be named: ${e}`);return fe(e)}function it(e){return me(e)||F(e)||C(e)||te(e)||J(e)||U(e)||Q(e)||x(e)}function me(e){return ae(e,de)}function F(e){return ae(e,M)}function C(e){return ae(e,vt)}function te(e){return ae(e,we)}function J(e){return ae(e,ke)}function U(e){return ae(e,Fe)}function Q(e){return ae(e,V)}function x(e){return ae(e,S)}function se(e){return me(e)||J(e)||U(e)||It(e)&&se(e.ofType)}function Ae(e){return me(e)||F(e)||C(e)||te(e)||J(e)||It(e)&&Ae(e.ofType)}function ce(e){return me(e)||J(e)}function he(e){return F(e)||C(e)||te(e)}function ye(e){return C(e)||te(e)}var V=class{constructor(t){it(t)||k(false,`Expected ${E(t)} to be a GraphQL type.`),this.ofType=t;}get[Symbol.toStringTag](){return "GraphQLList"}toString(){return "["+String(this.ofType)+"]"}toJSON(){return this.toString()}},S=class{constructor(t){Ot(t)||k(false,`Expected ${E(t)} to be a GraphQL nullable type.`),this.ofType=t;}get[Symbol.toStringTag](){return "GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};function It(e){return Q(e)||x(e)}function Ot(e){return it(e)&&!x(e)}function st(e){if(e)return x(e)?e.ofType:e}function en(e){return me(e)||F(e)||C(e)||te(e)||J(e)||U(e)}function ne(e){if(e){let t=e;for(;It(t);)t=t.ofType;return t}}function tn(e){return typeof e=="function"?e():e}function nn(e){return typeof e=="function"?e():e}var de=class{constructor(t){var n,r,i,s;let o=(n=t.parseValue)!==null&&n!==void 0?n:Fn;this.name=fe(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Fn,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,p)=>o(nt(a,p)),this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||k(false,`${this.name} must provide "specifiedByURL" as a string, but got: ${E(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||k(false,`${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"||k(false,`${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()}},M=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>ci(t),this._interfaces=()=>pi(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||k(false,`${this.name} must provide "isTypeOf" as a function, but got: ${E(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:li(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function pi(e){var t;let n=tn((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||k(false,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function ci(e){let t=nn(e.fields);return rt(t)||k(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Me(t,(n,r)=>{var i;rt(n)||k(false,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||k(false,`${e.name}.${r} field resolver must be a function if provided, but got: ${E(n.resolve)}.`);let s=(i=n.args)!==null&&i!==void 0?i:{};return rt(s)||k(false,`${e.name}.${r} args must be an object with argument names as keys.`),{name:fe(r),description:n.description,type:n.type,args:jn(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}})}function jn(e){return Object.entries(e).map(([t,n])=>({name:fe(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}))}function rt(e){return oe(e)&&!Array.isArray(e)}function li(e){return Me(e,t=>({description:t.description,type:t.type,args:Gn(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Gn(e){return gt(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Le(e){return x(e.type)&&e.defaultValue===void 0}var vt=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=ci.bind(void 0,t),this._interfaces=pi.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||k(false,`${this.name} must provide "resolveType" as a function, but got: ${E(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:li(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},we=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=cs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||k(false,`${this.name} must provide "resolveType" as a function, but got: ${E(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()}};function cs(e){let t=tn(e.types);return Array.isArray(t)||k(false,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var ke=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:ui(this.name,t.values),this._valueLookup=null,this._nameLookup=null;}get[Symbol.toStringTag](){return "GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=ui(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=ve(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 m(`Enum "${this.name}" cannot represent value: ${E(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=E(t);throw new m(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Zt(this,r))}let n=this.getValue(t);if(n==null)throw new m(`Value "${t}" does not exist in "${this.name}" enum.`+Zt(this,t));return n.value}parseLiteral(t,n){if(t.kind!==exports.d.ENUM){let i=$(t);throw new m(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Zt(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=$(t);throw new m(`Value "${i}" does not exist in "${this.name}" enum.`+Zt(this,i),{nodes:t})}return r.value}toConfig(){let t=gt(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()}};function Zt(e,t){let n=e.getValues().map(i=>i.name),r=ue(t,n);return ie("the enum value",r)}function ui(e,t){return rt(t)||k(false,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(rt(r)||k(false,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${E(r)}.`),{name:Mn(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:pe(r.extensions),astNode:r.astNode}))}var Fe=class{constructor(t){var n,r;this.name=fe(t.name),this.description=t.description,this.extensions=pe(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:false,this._fields=ls.bind(void 0,t);}get[Symbol.toStringTag](){return "GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=Me(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()}};function ls(e){let t=nn(e.fields);return rt(t)||k(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Me(t,(n,r)=>(!("resolve"in n)||k(false,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:fe(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}))}function ot(e){return x(e.type)&&e.defaultValue===void 0}function bt(e,t){return e===t?true:x(e)&&x(t)||Q(e)&&Q(t)?bt(e.ofType,t.ofType):false}function xe(e,t,n){return t===n?true:x(n)?x(t)?xe(e,t.ofType,n.ofType):false:x(t)?xe(e,t.ofType,n):Q(n)?Q(t)?xe(e,t.ofType,n.ofType):false:Q(t)?false:ye(n)&&(C(t)||F(t))&&e.isSubType(n,t)}function rn(e,t,n){return t===n?true:ye(t)?ye(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):ye(n)?e.isSubType(n,t):false}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var _t=2147483647,St=-2147483648,Oe=new de({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=xt(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 m(`Int cannot represent non-integer value: ${E(t)}`);if(n>_t||n<St)throw new m("Int cannot represent non 32-bit signed integer value: "+E(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new m(`Int cannot represent non-integer value: ${E(e)}`);if(e>_t||e<St)throw new m(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==exports.d.INT)throw new m(`Int cannot represent non-integer value: ${$(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>_t||t<St)throw new m(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),Dt=new de({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){let t=xt(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new m(`Float cannot represent non numeric value: ${E(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new m(`Float cannot represent non numeric value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.FLOAT&&e.kind!==exports.d.INT)throw new m(`Float cannot represent non numeric value: ${$(e)}`,e);return parseFloat(e.value)}}),_=new de({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){let t=xt(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new m(`String cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e!="string")throw new m(`String cannot represent a non string value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.STRING)throw new m(`String cannot represent a non string value: ${$(e)}`,{nodes:e});return e.value}}),B=new de({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){let t=xt(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new m(`Boolean cannot represent a non boolean value: ${E(t)}`)},parseValue(e){if(typeof e!="boolean")throw new m(`Boolean cannot represent a non boolean value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.BOOLEAN)throw new m(`Boolean cannot represent a non boolean value: ${$(e)}`,{nodes:e});return e.value}}),At=new de({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){let t=xt(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new m(`ID cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new m(`ID cannot represent value: ${E(e)}`)},parseLiteral(e){if(e.kind!==exports.d.STRING&&e.kind!==exports.d.INT)throw new m("ID cannot represent a non-string and non-integer value: "+$(e),{nodes:e});return e.value}}),Lt=Object.freeze([_,Oe,Dt,B,At]);function sn(e){return Lt.some(({name:t})=>e.name===t)}function xt(e){if(oe(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!oe(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function at(e){return ae(e,De)}var De=class{constructor(t){var n,r,i;this.name=fe(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:false,this.deprecationReason=t.deprecationReason,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],Array.isArray(t.locations)||k(false,`@${t.name} locations must be an Array.`);let s=(i=t.args)!==null&&i!==void 0?i:{};oe(s)&&!Array.isArray(s)||k(false,`@${t.name} args must be an object with argument names as keys.`),this.args=jn(s);}get[Symbol.toStringTag](){return "GraphQLDirective"}toConfig(){return {name:this.name,description:this.description,locations:this.locations,args:Gn(this.args),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return "@"+this.name}toJSON(){return this.toString()}},Rt=new De({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[exports.c.FIELD,exports.c.FRAGMENT_SPREAD,exports.c.INLINE_FRAGMENT],args:{if:{type:new S(B),description:"Included when true."}}}),wt=new De({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[exports.c.FIELD,exports.c.FRAGMENT_SPREAD,exports.c.INLINE_FRAGMENT],args:{if:{type:new S(B),description:"Skipped when true."}}}),kt="No longer supported",Ft=new De({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[exports.c.FIELD_DEFINITION,exports.c.ARGUMENT_DEFINITION,exports.c.INPUT_FIELD_DEFINITION,exports.c.ENUM_VALUE,exports.c.DIRECTIVE_DEFINITION],args:{reason:{type:_,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:kt}}}),Pn=new De({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[exports.c.SCALAR],args:{url:{type:new S(_),description:"The URL that specifies the behavior of this scalar."}}}),Qn=new De({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[exports.c.INPUT_OBJECT],args:{}}),Te=Object.freeze([Rt,wt,Ft,Pn,Qn]);function on(e){return Te.some(({name:t})=>t===e.name)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function an(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function Re(e,t){if(x(t)){let n=Re(e,t.ofType);return n?.kind===exports.d.NULL?null:n}if(e===null)return {kind:exports.d.NULL};if(e===void 0)return null;if(Q(t)){let n=t.ofType;if(an(e)){let r=[];for(let i of e){let s=Re(i,n);s!=null&&r.push(s);}return {kind:exports.d.LIST,values:r}}return Re(e,n)}if(U(t)){if(!oe(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Re(e[r.name],r.type);i&&n.push({kind:exports.d.OBJECT_FIELD,name:{kind:exports.d.NAME,value:r.name},value:i});}return {kind:exports.d.OBJECT,fields:n}}if(ce(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return {kind:exports.d.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return fi.test(r)?{kind:exports.d.INT,value:r}:{kind:exports.d.FLOAT,value:r}}if(typeof n=="string")return J(t)?{kind:exports.d.ENUM,value:n}:t===At&&fi.test(n)?{kind:exports.d.INT,value:n}:{kind:exports.d.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${E(n)}.`)}z(false,"Unexpected input type: "+E(t));}var fi=/^-?(?:0|[1-9][0-9]*)$/;var ut=new M({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:_,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new S(new V(new S(Ee))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new S(Ee),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ee,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ee,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new S(new V(new S(un))),args:{includeDeprecated:{type:new S(B),defaultValue:false}},resolve:(e,{includeDeprecated:t})=>t?e.getDirectives():e.getDirectives().filter(n=>n.deprecationReason==null)}})}),un=new M({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
54
+ `))}function Mn(e){var t;return (t=e?.some(n=>n.includes(`
55
+ `)))!==null&&t!==void 0?t:false}chunkBUNLC3II_cjs.h();function nt(e,t){switch(e.kind){case exports.d.NULL:return null;case exports.d.INT:return parseInt(e.value,10);case exports.d.FLOAT:return parseFloat(e.value);case exports.d.STRING:case exports.d.ENUM:case exports.d.BOOLEAN:return e.value;case exports.d.LIST:return e.values.map(n=>nt(n,t));case exports.d.OBJECT:return gt(e.fields,n=>n.name.value,n=>nt(n.value,t));case exports.d.VARIABLE:return t?.[e.name.value]}}chunkBUNLC3II_cjs.h();function fe(e){if(e!=null||k(false,"Must provide name."),typeof e=="string"||k(false,"Expected name to be a string."),e.length===0)throw new m("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Kt(e.charCodeAt(t)))throw new m(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Tt(e.charCodeAt(0)))throw new m(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function jn(e){if(e==="true"||e==="false"||e==="null")throw new m(`Enum values cannot be named: ${e}`);return fe(e)}function it(e){return me(e)||F(e)||C(e)||te(e)||J(e)||U(e)||Q(e)||x(e)}function me(e){return ae(e,de)}function F(e){return ae(e,M)}function C(e){return ae(e,vt)}function te(e){return ae(e,we)}function J(e){return ae(e,ke)}function U(e){return ae(e,Fe)}function Q(e){return ae(e,V)}function x(e){return ae(e,S)}function se(e){return me(e)||J(e)||U(e)||It(e)&&se(e.ofType)}function Ae(e){return me(e)||F(e)||C(e)||te(e)||J(e)||It(e)&&Ae(e.ofType)}function ce(e){return me(e)||J(e)}function he(e){return F(e)||C(e)||te(e)}function ye(e){return C(e)||te(e)}var V=class{constructor(t){it(t)||k(false,`Expected ${E(t)} to be a GraphQL type.`),this.ofType=t;}get[Symbol.toStringTag](){return "GraphQLList"}toString(){return "["+String(this.ofType)+"]"}toJSON(){return this.toString()}},S=class{constructor(t){Ot(t)||k(false,`Expected ${E(t)} to be a GraphQL nullable type.`),this.ofType=t;}get[Symbol.toStringTag](){return "GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}};function It(e){return Q(e)||x(e)}function Ot(e){return it(e)&&!x(e)}function st(e){if(e)return x(e)?e.ofType:e}function en(e){return me(e)||F(e)||C(e)||te(e)||J(e)||U(e)}function ne(e){if(e){let t=e;for(;It(t);)t=t.ofType;return t}}function tn(e){return typeof e=="function"?e():e}function nn(e){return typeof e=="function"?e():e}var de=class{constructor(t){var n,r,i,s;let o=(n=t.parseValue)!==null&&n!==void 0?n:Cn;this.name=fe(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Cn,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(nt(a,u)),this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||k(false,`${this.name} must provide "specifiedByURL" as a string, but got: ${E(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||k(false,`${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"||k(false,`${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()}},M=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>ci(t),this._interfaces=()=>pi(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||k(false,`${this.name} must provide "isTypeOf" as a function, but got: ${E(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:li(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function pi(e){var t;let n=tn((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||k(false,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function ci(e){let t=nn(e.fields);return rt(t)||k(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Me(t,(n,r)=>{var i;rt(n)||k(false,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||k(false,`${e.name}.${r} field resolver must be a function if provided, but got: ${E(n.resolve)}.`);let s=(i=n.args)!==null&&i!==void 0?i:{};return rt(s)||k(false,`${e.name}.${r} args must be an object with argument names as keys.`),{name:fe(r),description:n.description,type:n.type,args:Gn(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}})}function Gn(e){return Object.entries(e).map(([t,n])=>({name:fe(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}))}function rt(e){return oe(e)&&!Array.isArray(e)}function li(e){return Me(e,t=>({description:t.description,type:t.type,args:Pn(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Pn(e){return gt(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Le(e){return x(e.type)&&e.defaultValue===void 0}var vt=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=ci.bind(void 0,t),this._interfaces=pi.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||k(false,`${this.name} must provide "resolveType" as a function, but got: ${E(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:li(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},we=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=cs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||k(false,`${this.name} must provide "resolveType" as a function, but got: ${E(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()}};function cs(e){let t=tn(e.types);return Array.isArray(t)||k(false,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var ke=class{constructor(t){var n;this.name=fe(t.name),this.description=t.description,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:ui(this.name,t.values),this._valueLookup=null,this._nameLookup=null;}get[Symbol.toStringTag](){return "GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=ui(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=ve(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 m(`Enum "${this.name}" cannot represent value: ${E(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=E(t);throw new m(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Zt(this,r))}let n=this.getValue(t);if(n==null)throw new m(`Value "${t}" does not exist in "${this.name}" enum.`+Zt(this,t));return n.value}parseLiteral(t,n){if(t.kind!==exports.d.ENUM){let i=$(t);throw new m(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Zt(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=$(t);throw new m(`Value "${i}" does not exist in "${this.name}" enum.`+Zt(this,i),{nodes:t})}return r.value}toConfig(){let t=gt(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()}};function Zt(e,t){let n=e.getValues().map(i=>i.name),r=ue(t,n);return ie("the enum value",r)}function ui(e,t){return rt(t)||k(false,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(rt(r)||k(false,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${E(r)}.`),{name:jn(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:pe(r.extensions),astNode:r.astNode}))}var Fe=class{constructor(t){var n,r;this.name=fe(t.name),this.description=t.description,this.extensions=pe(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:false,this._fields=ls.bind(void 0,t);}get[Symbol.toStringTag](){return "GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=Me(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()}};function ls(e){let t=nn(e.fields);return rt(t)||k(false,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Me(t,(n,r)=>(!("resolve"in n)||k(false,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:fe(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:pe(n.extensions),astNode:n.astNode}))}function ot(e){return x(e.type)&&e.defaultValue===void 0}function bt(e,t){return e===t?true:x(e)&&x(t)||Q(e)&&Q(t)?bt(e.ofType,t.ofType):false}function xe(e,t,n){return t===n?true:x(n)?x(t)?xe(e,t.ofType,n.ofType):false:x(t)?xe(e,t.ofType,n):Q(n)?Q(t)?xe(e,t.ofType,n.ofType):false:Q(t)?false:ye(n)&&(C(t)||F(t))&&e.isSubType(n,t)}function rn(e,t,n){return t===n?true:ye(t)?ye(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):ye(n)?e.isSubType(n,t):false}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var _t=2147483647,St=-2147483648,Oe=new de({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=xt(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 m(`Int cannot represent non-integer value: ${E(t)}`);if(n>_t||n<St)throw new m("Int cannot represent non 32-bit signed integer value: "+E(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new m(`Int cannot represent non-integer value: ${E(e)}`);if(e>_t||e<St)throw new m(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==exports.d.INT)throw new m(`Int cannot represent non-integer value: ${$(e)}`,{nodes:e});let t=parseInt(e.value,10);if(t>_t||t<St)throw new m(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),Dt=new de({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){let t=xt(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new m(`Float cannot represent non numeric value: ${E(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new m(`Float cannot represent non numeric value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.FLOAT&&e.kind!==exports.d.INT)throw new m(`Float cannot represent non numeric value: ${$(e)}`,e);return parseFloat(e.value)}}),_=new de({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){let t=xt(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new m(`String cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e!="string")throw new m(`String cannot represent a non string value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.STRING)throw new m(`String cannot represent a non string value: ${$(e)}`,{nodes:e});return e.value}}),B=new de({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){let t=xt(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new m(`Boolean cannot represent a non boolean value: ${E(t)}`)},parseValue(e){if(typeof e!="boolean")throw new m(`Boolean cannot represent a non boolean value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==exports.d.BOOLEAN)throw new m(`Boolean cannot represent a non boolean value: ${$(e)}`,{nodes:e});return e.value}}),At=new de({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){let t=xt(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new m(`ID cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new m(`ID cannot represent value: ${E(e)}`)},parseLiteral(e){if(e.kind!==exports.d.STRING&&e.kind!==exports.d.INT)throw new m("ID cannot represent a non-string and non-integer value: "+$(e),{nodes:e});return e.value}}),Lt=Object.freeze([_,Oe,Dt,B,At]);function sn(e){return Lt.some(({name:t})=>e.name===t)}function xt(e){if(oe(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!oe(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function at(e){return ae(e,De)}var De=class{constructor(t){var n,r,i;this.name=fe(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:false,this.deprecationReason=t.deprecationReason,this.extensions=pe(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],Array.isArray(t.locations)||k(false,`@${t.name} locations must be an Array.`);let s=(i=t.args)!==null&&i!==void 0?i:{};oe(s)&&!Array.isArray(s)||k(false,`@${t.name} args must be an object with argument names as keys.`),this.args=Gn(s);}get[Symbol.toStringTag](){return "GraphQLDirective"}toConfig(){return {name:this.name,description:this.description,locations:this.locations,args:Pn(this.args),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return "@"+this.name}toJSON(){return this.toString()}},Rt=new De({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[exports.c.FIELD,exports.c.FRAGMENT_SPREAD,exports.c.INLINE_FRAGMENT],args:{if:{type:new S(B),description:"Included when true."}}}),wt=new De({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[exports.c.FIELD,exports.c.FRAGMENT_SPREAD,exports.c.INLINE_FRAGMENT],args:{if:{type:new S(B),description:"Skipped when true."}}}),kt="No longer supported",Ft=new De({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[exports.c.FIELD_DEFINITION,exports.c.ARGUMENT_DEFINITION,exports.c.INPUT_FIELD_DEFINITION,exports.c.ENUM_VALUE,exports.c.DIRECTIVE_DEFINITION],args:{reason:{type:_,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:kt}}}),Qn=new De({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[exports.c.SCALAR],args:{url:{type:new S(_),description:"The URL that specifies the behavior of this scalar."}}}),Bn=new De({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[exports.c.INPUT_OBJECT],args:{}}),Te=Object.freeze([Rt,wt,Ft,Qn,Bn]);function on(e){return Te.some(({name:t})=>t===e.name)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function an(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function Re(e,t){if(x(t)){let n=Re(e,t.ofType);return n?.kind===exports.d.NULL?null:n}if(e===null)return {kind:exports.d.NULL};if(e===void 0)return null;if(Q(t)){let n=t.ofType;if(an(e)){let r=[];for(let i of e){let s=Re(i,n);s!=null&&r.push(s);}return {kind:exports.d.LIST,values:r}}return Re(e,n)}if(U(t)){if(!oe(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Re(e[r.name],r.type);i&&n.push({kind:exports.d.OBJECT_FIELD,name:{kind:exports.d.NAME,value:r.name},value:i});}return {kind:exports.d.OBJECT,fields:n}}if(ce(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return {kind:exports.d.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return fi.test(r)?{kind:exports.d.INT,value:r}:{kind:exports.d.FLOAT,value:r}}if(typeof n=="string")return J(t)?{kind:exports.d.ENUM,value:n}:t===At&&fi.test(n)?{kind:exports.d.INT,value:n}:{kind:exports.d.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${E(n)}.`)}z(false,"Unexpected input type: "+E(t));}var fi=/^-?(?:0|[1-9][0-9]*)$/;var ut=new M({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:_,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new S(new V(new S(Ee))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new S(Ee),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ee,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ee,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new S(new V(new S(un))),args:{includeDeprecated:{type:new S(B),defaultValue:false}},resolve:(e,{includeDeprecated:t})=>t?e.getDirectives():e.getDirectives().filter(n=>n.deprecationReason==null)}})}),un=new M({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
56
56
 
57
- 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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},isRepeatable:{type:new S(B),resolve:e=>e.isRepeatable},locations:{type:new S(new V(new S(pn))),resolve:e=>e.locations},args:{type:new S(new V(new S(pt))),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),pn=new ke({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:exports.c.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:exports.c.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:exports.c.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:exports.c.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:exports.c.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:exports.c.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:exports.c.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:exports.c.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:exports.c.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:exports.c.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:exports.c.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:exports.c.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:exports.c.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:exports.c.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:exports.c.UNION,description:"Location adjacent to a union definition."},ENUM:{value:exports.c.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:exports.c.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:exports.c.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:exports.c.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:exports.c.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),Ee=new M({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 S(fn),resolve(e){if(me(e))return ee.SCALAR;if(F(e))return ee.OBJECT;if(C(e))return ee.INTERFACE;if(te(e))return ee.UNION;if(J(e))return ee.ENUM;if(U(e))return ee.INPUT_OBJECT;if(Q(e))return ee.LIST;if(x(e))return ee.NON_NULL;z(false,`Unexpected type: "${E(e)}".`);}},name:{type:_,resolve:e=>"name"in e?e.name:void 0},description:{type:_,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:_,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new V(new S(cn)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(F(e)||C(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new V(new S(Ee)),resolve(e){if(F(e)||C(e))return e.getInterfaces()}},possibleTypes:{type:new V(new S(Ee)),resolve(e,t,n,{schema:r}){if(ye(e))return r.getPossibleTypes(e)}},enumValues:{type:new V(new S(ln)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(J(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new V(new S(pt)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(U(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ee,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:B,resolve:e=>{if(U(e))return e.isOneOf}}})}),cn=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},args:{type:new S(new V(new S(pt))),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new S(Ee),resolve:e=>e.type},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),pt=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},type:{type:new S(Ee),resolve:e=>e.type},defaultValue:{type:_,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=Re(n,t);return r?$(r):null}},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),ln=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),ee;(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";})(ee||(ee={}));var fn=new ke({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ee.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ee.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ee.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ee.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ee.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ee.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ee.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ee.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Ct={name:"__schema",type:new S(ut),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},$t={name:"__type",type:Ee,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new S(_),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},Ut={name:"__typename",type:new S(_),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},Vt=Object.freeze([ut,un,pn,Ee,cn,pt,ln,fn]);function ct(e){return Vt.some(({name:t})=>e.name===t)}chunkBUNLC3II_cjs.h();function Bn(e){return ae(e,Ge)}function dn(e){if(!Bn(e))throw new Error(`Expected ${E(e)} to be a GraphQL schema.`);return e}var Ge=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===true?[]:void 0,oe(t)||k(false,"Must provide configuration object."),!t.types||Array.isArray(t.types)||k(false,`"types" must be Array if provided but got: ${E(t.types)}.`),!t.directives||Array.isArray(t.directives)||k(false,`"directives" must be Array if provided but got: ${E(t.directives)}.`),this.description=t.description,this.extensions=pe(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:Te;let i=new Set(t.types);if(t.types!=null)for(let s of t.types)i.delete(s),be(s,i);this._queryType!=null&&be(this._queryType,i),this._mutationType!=null&&be(this._mutationType,i),this._subscriptionType!=null&&be(this._subscriptionType,i);for(let s of this._directives)if(at(s))for(let o of s.args)be(o.type,i);be(ut,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let s of i){if(s==null)continue;let o=s.name;if(o||k(false,"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]=s,C(s)){for(let a of s.getInterfaces())if(C(a)){let p=this._implementationsMap[a.name];p===void 0&&(p=this._implementationsMap[a.name]={objects:[],interfaces:[]}),p.interfaces.push(s);}}else if(F(s)){for(let a of s.getInterfaces())if(C(a)){let p=this._implementationsMap[a.name];p===void 0&&(p=this._implementationsMap[a.name]={objects:[],interfaces:[]}),p.objects.push(s);}}}}get[Symbol.toStringTag](){return "GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case H.QUERY:return this.getQueryType();case H.MUTATION:return this.getMutationType();case H.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return te(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),te(t))for(let i of t.getTypes())r[i.name]=true;else {let i=this.getImplementations(t);for(let s of i.objects)r[s.name]=true;for(let s of i.interfaces)r[s.name]=true;}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}}};function be(e,t){let n=ne(e);if(!t.has(n)){if(t.add(n),te(n))for(let r of n.getTypes())be(r,t);else if(F(n)||C(n)){for(let r of n.getInterfaces())be(r,t);for(let r of Object.values(n.getFields())){be(r.type,t);for(let i of r.args)be(i.type,t);}}else if(U(n))for(let r of Object.values(n.getFields()))be(r.type,t);}return t}function Kn(e){if(dn(e),e.__validationErrors)return e.__validationErrors;let t=new Yn(e);fs(t),ds(t),ms(t);let n=t.getErrors();return e.__validationErrors=n,n}function mn(e){let t=Kn(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
57
+ 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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},isRepeatable:{type:new S(B),resolve:e=>e.isRepeatable},locations:{type:new S(new V(new S(pn))),resolve:e=>e.locations},args:{type:new S(new V(new S(pt))),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),pn=new ke({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:exports.c.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:exports.c.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:exports.c.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:exports.c.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:exports.c.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:exports.c.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:exports.c.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:exports.c.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:exports.c.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:exports.c.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:exports.c.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:exports.c.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:exports.c.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:exports.c.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:exports.c.UNION,description:"Location adjacent to a union definition."},ENUM:{value:exports.c.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:exports.c.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:exports.c.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:exports.c.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:exports.c.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),Ee=new M({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 S(fn),resolve(e){if(me(e))return ee.SCALAR;if(F(e))return ee.OBJECT;if(C(e))return ee.INTERFACE;if(te(e))return ee.UNION;if(J(e))return ee.ENUM;if(U(e))return ee.INPUT_OBJECT;if(Q(e))return ee.LIST;if(x(e))return ee.NON_NULL;z(false,`Unexpected type: "${E(e)}".`);}},name:{type:_,resolve:e=>"name"in e?e.name:void 0},description:{type:_,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:_,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new V(new S(cn)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(F(e)||C(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new V(new S(Ee)),resolve(e){if(F(e)||C(e))return e.getInterfaces()}},possibleTypes:{type:new V(new S(Ee)),resolve(e,t,n,{schema:r}){if(ye(e))return r.getPossibleTypes(e)}},enumValues:{type:new V(new S(ln)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(J(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new V(new S(pt)),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){if(U(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ee,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:B,resolve:e=>{if(U(e))return e.isOneOf}}})}),cn=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},args:{type:new S(new V(new S(pt))),args:{includeDeprecated:{type:B,defaultValue:false}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new S(Ee),resolve:e=>e.type},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),pt=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},type:{type:new S(Ee),resolve:e=>e.type},defaultValue:{type:_,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=Re(n,t);return r?$(r):null}},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),ln=new M({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 S(_),resolve:e=>e.name},description:{type:_,resolve:e=>e.description},isDeprecated:{type:new S(B),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:_,resolve:e=>e.deprecationReason}})}),ee;(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";})(ee||(ee={}));var fn=new ke({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ee.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ee.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ee.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ee.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ee.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ee.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ee.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ee.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Ct={name:"__schema",type:new S(ut),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},$t={name:"__type",type:Ee,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new S(_),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},Ut={name:"__typename",type:new S(_),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},Vt=Object.freeze([ut,un,pn,Ee,cn,pt,ln,fn]);function ct(e){return Vt.some(({name:t})=>e.name===t)}chunkBUNLC3II_cjs.h();function qn(e){return ae(e,Ge)}function dn(e){if(!qn(e))throw new Error(`Expected ${E(e)} to be a GraphQL schema.`);return e}var Ge=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===true?[]:void 0,oe(t)||k(false,"Must provide configuration object."),!t.types||Array.isArray(t.types)||k(false,`"types" must be Array if provided but got: ${E(t.types)}.`),!t.directives||Array.isArray(t.directives)||k(false,`"directives" must be Array if provided but got: ${E(t.directives)}.`),this.description=t.description,this.extensions=pe(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:Te;let i=new Set(t.types);if(t.types!=null)for(let s of t.types)i.delete(s),be(s,i);this._queryType!=null&&be(this._queryType,i),this._mutationType!=null&&be(this._mutationType,i),this._subscriptionType!=null&&be(this._subscriptionType,i);for(let s of this._directives)if(at(s))for(let o of s.args)be(o.type,i);be(ut,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let s of i){if(s==null)continue;let o=s.name;if(o||k(false,"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]=s,C(s)){for(let a of s.getInterfaces())if(C(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s);}}else if(F(s)){for(let a of s.getInterfaces())if(C(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.objects.push(s);}}}}get[Symbol.toStringTag](){return "GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case H.QUERY:return this.getQueryType();case H.MUTATION:return this.getMutationType();case H.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return te(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),te(t))for(let i of t.getTypes())r[i.name]=true;else {let i=this.getImplementations(t);for(let s of i.objects)r[s.name]=true;for(let s of i.interfaces)r[s.name]=true;}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}}};function be(e,t){let n=ne(e);if(!t.has(n)){if(t.add(n),te(n))for(let r of n.getTypes())be(r,t);else if(F(n)||C(n)){for(let r of n.getInterfaces())be(r,t);for(let r of Object.values(n.getFields())){be(r.type,t);for(let i of r.args)be(i.type,t);}}else if(U(n))for(let r of Object.values(n.getFields()))be(r.type,t);}return t}function Jn(e){if(dn(e),e.__validationErrors)return e.__validationErrors;let t=new Kn(e);fs(t),ds(t),ms(t);let n=t.getErrors();return e.__validationErrors=n,n}function mn(e){let t=Jn(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
58
58
 
59
- `))}var Yn=class{constructor(t){this._errors=[],this.schema=t;}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new m(t,{nodes:r}));}getErrors(){return this._errors}};function fs(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!F(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${E(n)}.`,(r=qn(t,H.QUERY))!==null&&r!==void 0?r:n.astNode);}let i=t.getMutationType();if(i&&!F(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${E(i)}.`,(s=qn(t,H.MUTATION))!==null&&s!==void 0?s:i.astNode);}let o=t.getSubscriptionType();if(o&&!F(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${E(o)}.`,(a=qn(t,H.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode);}}function qn(e,t){var n;return (n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return (i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function ds(e){for(let n of e.schema.getDirectives()){if(!at(n)){e.reportError(`Expected directive but got: ${E(n)}.`,n?.astNode);continue}Pe(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(let r of n.args)if(Pe(e,r),se(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${E(r.type)}.`,r.astNode),Le(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[Jn(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type]);}}}function Pe(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode);}function ms(e){let t=vs(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!en(r)){e.reportError(`Expected GraphQL named type but got: ${E(r)}.`,r.astNode);continue}ct(r)||Pe(e,r),F(r)||C(r)?(di(e,r),mi(e,r)):te(r)?Ts(e,r):J(r)?Es(e,r):U(r)&&(Ns(e,r),t(r));}}function di(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(Pe(e,o),!Ae(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${E(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type);}for(let a of o.args){let p=a.name;if(Pe(e,a),!se(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${p}:) must be Input Type but got: ${E(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type);}if(Le(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${p}:) cannot be deprecated.`,[Jn(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type]);}}}}function mi(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!C(r)){e.reportError(`Type ${E(t)} must only implement Interface types, it cannot implement ${E(r)}.`,Mt(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Mt(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Mt(t,r));continue}n[r.name]=true,ys(e,t,r),hs(e,t,r);}}function hs(e,t,n){let r=t.getFields();for(let p of Object.values(n.getFields())){let c=p.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[p.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!xe(e.schema,f.type,p.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${E(p.type)} but ${t.name}.${c} is type ${E(f.type)}.`,[(i=p.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type]);}for(let d of p.args){let h=d.name,g=f.args.find(N=>N.name===h);if(!g){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!bt(d.type,g.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expects type ${E(d.type)} but ${t.name}.${c}(${h}:) is type ${E(g.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=g.astNode)===null||a===void 0?void 0:a.type]);}}for(let d of f.args){let h=d.name;!p.args.find(N=>N.name===h)&&Le(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${h} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,p.astNode]);}}}function ys(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}.`,[...Mt(n,i),...Mt(t,n)]);}function Ts(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.`,hi(t,i.name));continue}r[i.name]=true,F(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${E(i)}.`,hi(t,String(i)));}}function Es(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)Pe(e,r);}function Ns(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 s of n){if(Pe(e,s),!se(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${E(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type);}if(ot(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[Jn(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type]);}t.isOneOf&&gs(t,s,e);}}function gs(e,t,n){if(x(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 vs(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=true,r[s.name]=n.length;let o=Object.values(s.getFields());for(let a of o)if(x(a.type)&&U(a.type.ofType)){let p=a.type.ofType,c=r[p.name];if(n.push(a),c===void 0)i(p);else {let f=n.slice(c),d=f.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${p.name}" within itself through a series of non-null fields: "${d}".`,f.map(h=>h.astNode));}n.pop();}r[s.name]=void 0;}}function Mt(e,t){let{astNode:n,extensionASTNodes:r}=e;return (n!=null?[n,...r]:r).flatMap(s=>{var o;return (o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function hi(e,t){let{astNode:n,extensionASTNodes:r}=e;return (n!=null?[n,...r]:r).flatMap(s=>{var o;return (o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function Jn(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Ft.name)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function W(e,t){switch(t.kind){case exports.d.LIST_TYPE:{let n=W(e,t.type);return n&&new V(n)}case exports.d.NON_NULL_TYPE:{let n=W(e,t.type);return n&&new S(n)}case exports.d.NAMED_TYPE:return e.getType(t.name.value)}}var Qe=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??Is,n&&(se(n)&&this._inputTypeStack.push(n),he(n)&&this._parentTypeStack.push(n),Ae(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 exports.d.SELECTION_SET:{let i=ne(this.getType());this._parentTypeStack.push(he(i)?i:void 0);break}case exports.d.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(Ae(o)?o:void 0);break}case exports.d.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case exports.d.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push(F(i)?i:void 0);break}case exports.d.INLINE_FRAGMENT:case exports.d.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?W(n,i):ne(this.getType());this._typeStack.push(Ae(s)?s:void 0);break}case exports.d.VARIABLE_DEFINITION:{let i=W(n,t.type);this._inputTypeStack.push(se(i)?i:void 0);break}case exports.d.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.LIST:{let i=st(this.getInputType()),s=Q(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.OBJECT_FIELD:{let i=ne(this.getInputType()),s,o;U(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.ENUM:{let i=ne(this.getInputType()),s;J(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case exports.d.SELECTION_SET:this._parentTypeStack.pop();break;case exports.d.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case exports.d.DIRECTIVE:this._directive=null;break;case exports.d.OPERATION_DEFINITION:case exports.d.INLINE_FRAGMENT:case exports.d.FRAGMENT_DEFINITION:this._typeStack.pop();break;case exports.d.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case exports.d.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case exports.d.LIST:case exports.d.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case exports.d.ENUM:this._enumValue=null;break;}}};function Is(e,t,n){let r=n.name.value;if(r===Ct.name&&e.getQueryType()===t)return Ct;if(r===$t.name&&e.getQueryType()===t)return $t;if(r===Ut.name&&he(t))return Ut;if(F(t)||C(t))return t.getFields()[r]}function jt(e,t){return {enter(...n){let r=n[0];e.enter(r);let i=tt(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),yt(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=tt(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Xn(e){return e.kind===exports.d.OPERATION_DEFINITION||e.kind===exports.d.FRAGMENT_DEFINITION}function zn(e){return e.kind===exports.d.SCHEMA_DEFINITION||Ce(e)||e.kind===exports.d.DIRECTIVE_DEFINITION}function Ce(e){return e.kind===exports.d.SCALAR_TYPE_DEFINITION||e.kind===exports.d.OBJECT_TYPE_DEFINITION||e.kind===exports.d.INTERFACE_TYPE_DEFINITION||e.kind===exports.d.UNION_TYPE_DEFINITION||e.kind===exports.d.ENUM_TYPE_DEFINITION||e.kind===exports.d.INPUT_OBJECT_TYPE_DEFINITION}function Wn(e){return e.kind===exports.d.SCHEMA_EXTENSION||e.kind===exports.d.DIRECTIVE_EXTENSION||hn(e)}function hn(e){return e.kind===exports.d.SCALAR_TYPE_EXTENSION||e.kind===exports.d.OBJECT_TYPE_EXTENSION||e.kind===exports.d.INTERFACE_TYPE_EXTENSION||e.kind===exports.d.UNION_TYPE_EXTENSION||e.kind===exports.d.ENUM_TYPE_EXTENSION||e.kind===exports.d.INPUT_OBJECT_TYPE_EXTENSION}function Hn(e){return {Document(t){for(let n of t.definitions)if(!Xn(n)){let r=n.kind===exports.d.SCHEMA_DEFINITION||n.kind===exports.d.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new m(`The ${r} definition is not executable.`,{nodes:n}));}return false}}}chunkBUNLC3II_cjs.h();function Zn(e){return {Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=ie("to use an inline fragment on",Os(i,n,s));o===""&&(o=ie(bs(n,s))),e.reportError(new m(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}));}}}}function Os(e,t,n){if(!ye(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 a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1);}}return [...r].sort((o,a)=>{let p=i[a.name]-i[o.name];return p!==0?p:C(o)&&e.isSubType(o,a)?-1:C(a)&&e.isSubType(a,o)?1:Ze(o.name,a.name)}).map(o=>o.name)}function bs(e,t){if(F(e)||C(e)){let n=Object.keys(e.getFields());return ue(t,n)}return []}chunkBUNLC3II_cjs.h();function er(e){return {InlineFragment(t){let n=t.typeCondition;if(n){let r=W(e.getSchema(),n);if(r&&!he(r)){let i=$(n);e.reportError(new m(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}));}}},FragmentDefinition(t){let n=W(e.getSchema(),t.typeCondition);if(n&&!he(n)){let r=$(t.typeCondition);e.reportError(new m(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}));}}}}chunkBUNLC3II_cjs.h();function tr(e){return {...nr(e),Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(p=>p.name),a=ue(s,o);e.reportError(new m(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+ie(a),{nodes:t}));}}}}function nr(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let o of r)t[o.name]=o.args.map(a=>a.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===exports.d.DIRECTIVE_DEFINITION){var s;let a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(p=>p.name.value);}return {Directive(o){let a=o.name.value,p=t[a];if(o.arguments&&p)for(let c of o.arguments){let f=c.name.value;if(!p.includes(f)){let d=ue(f,p);e.reportError(new m(`Unknown argument "${f}" on directive "@${a}".`+ie(d),{nodes:c}));}}return false}}}chunkBUNLC3II_cjs.h();function yn(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===exports.d.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return {Directive(s,o,a,p,c){let f=s.name.value,d=t[f];if(!d){e.reportError(new m(`Unknown directive "@${f}".`,{nodes:s}));return}let h=_s(c);h&&!d.includes(h)&&e.reportError(new m(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}));}}}function _s(e){let t=e[e.length-1];switch("kind"in t||z(),t.kind){case exports.d.OPERATION_DEFINITION:return Ss(t.operation);case exports.d.FIELD:return exports.c.FIELD;case exports.d.FRAGMENT_SPREAD:return exports.c.FRAGMENT_SPREAD;case exports.d.INLINE_FRAGMENT:return exports.c.INLINE_FRAGMENT;case exports.d.FRAGMENT_DEFINITION:return exports.c.FRAGMENT_DEFINITION;case exports.d.VARIABLE_DEFINITION:return exports.c.VARIABLE_DEFINITION;case exports.d.SCHEMA_DEFINITION:case exports.d.SCHEMA_EXTENSION:return exports.c.SCHEMA;case exports.d.SCALAR_TYPE_DEFINITION:case exports.d.SCALAR_TYPE_EXTENSION:return exports.c.SCALAR;case exports.d.OBJECT_TYPE_DEFINITION:case exports.d.OBJECT_TYPE_EXTENSION:return exports.c.OBJECT;case exports.d.FIELD_DEFINITION:return exports.c.FIELD_DEFINITION;case exports.d.INTERFACE_TYPE_DEFINITION:case exports.d.INTERFACE_TYPE_EXTENSION:return exports.c.INTERFACE;case exports.d.UNION_TYPE_DEFINITION:case exports.d.UNION_TYPE_EXTENSION:return exports.c.UNION;case exports.d.ENUM_TYPE_DEFINITION:case exports.d.ENUM_TYPE_EXTENSION:return exports.c.ENUM;case exports.d.ENUM_VALUE_DEFINITION:return exports.c.ENUM_VALUE;case exports.d.INPUT_OBJECT_TYPE_DEFINITION:case exports.d.INPUT_OBJECT_TYPE_EXTENSION:return exports.c.INPUT_OBJECT;case exports.d.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return "kind"in n||z(),n.kind===exports.d.INPUT_OBJECT_TYPE_DEFINITION?exports.c.INPUT_FIELD_DEFINITION:exports.c.ARGUMENT_DEFINITION}case exports.d.DIRECTIVE_DEFINITION:case exports.d.DIRECTIVE_EXTENSION:return exports.c.DIRECTIVE_DEFINITION;default:z(false,"Unexpected kind: "+E(t.kind));}}function Ss(e){switch(e){case H.QUERY:return exports.c.QUERY;case H.MUTATION:return exports.c.MUTATION;case H.SUBSCRIPTION:return exports.c.SUBSCRIPTION}}chunkBUNLC3II_cjs.h();function rr(e){return {FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new m(`Unknown fragment "${n}".`,{nodes:t.name}));}}}chunkBUNLC3II_cjs.h();function Tn(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)Ce(s)&&(r[s.name.value]=true);let i=[...Object.keys(n),...Object.keys(r)];return {NamedType(s,o,a,p,c){let f=s.name.value;if(!n[f]&&!r[f]){var d;let h=(d=c[2])!==null&&d!==void 0?d:a,g=h!=null&&Ds(h);if(g&&yi.includes(f))return;let N=ue(f,g?yi.concat(i):i);e.reportError(new m(`Unknown type "${f}".`+ie(N),{nodes:s}));}}}}var yi=[...Lt,...Vt].map(e=>e.name);function Ds(e){return "kind"in e&&(zn(e)||Wn(e))}chunkBUNLC3II_cjs.h();function ir(e){let t=0;return {Document(n){t=n.definitions.filter(r=>r.kind===exports.d.OPERATION_DEFINITION).length;},OperationDefinition(n){!n.name&&t>1&&e.reportError(new m("This anonymous operation must be the only defined operation.",{nodes:n}));}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var As=3;function or(e){function t(n,r=Object.create(null),i=0){if(n.kind===exports.d.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===true)return false;let o=e.getFragment(s);if(!o)return false;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0;}}if(n.kind===exports.d.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=As))return true;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return true}return false}return {Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new m("Maximum introspection depth exceeded",{nodes:[n]})),false}}}chunkBUNLC3II_cjs.h();function ar(e){let t=Object.create(null),n=[],r=Object.create(null);return {OperationDefinition:()=>false,FragmentDefinition(s){return i(s),false}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=true;let a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(let p of a){let c=p.name.value,f=r[c];if(n.push(p),f===void 0){let d=e.getFragment(c);d&&i(d);}else {let d=n.slice(f),h=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new m(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}));}n.pop();}r[o]=void 0;}}}chunkBUNLC3II_cjs.h();function ur(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 s=i.name.value;t[s]!==true&&e.reportError(new m(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}));}}},VariableDefinition(n){t[n.variable.name.value]=true;}}}chunkBUNLC3II_cjs.h();function pr(e){let t=[],n=[];return {OperationDefinition(r){return t.push(r),false},FragmentDefinition(r){return n.push(r),false},Document:{leave(){let r=Object.create(null);for(let i of t)for(let s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=true;for(let i of n){let s=i.name.value;r[s]!==true&&e.reportError(new m(`Fragment "${s}" is never used.`,{nodes:i}));}}}}}chunkBUNLC3II_cjs.h();function cr(e){let t=[];return {OperationDefinition:{enter(){t=[];},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=true;for(let s of t){let o=s.variable.name.value;r[o]!==true&&e.reportError(new m(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}));}}},VariableDefinition(n){t.push(n);}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function En(e){switch(e.kind){case exports.d.OBJECT:return {...e,fields:Ls(e.fields)};case exports.d.LIST:return {...e,values:e.values.map(En)};case exports.d.INT:case exports.d.FLOAT:case exports.d.STRING:case exports.d.BOOLEAN:case exports.d.NULL:case exports.d.ENUM:case exports.d.VARIABLE:return e}}function Ls(e){return e.map(t=>({...t,value:En(t.value)})).sort((t,n)=>Ze(t.name.value,n.name.value))}function Ei(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Ei(n)).join(" and "):e}function mr(e){let t=new In,n=new dr,r=new Map;return {SelectionSet(i){let s=xs(e,r,t,n,e.getParentType(),i);for(let[[o,a],p,c]of s){let f=Ei(a);e.reportError(new m(`Fields "${o}" conflict because ${f}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:p.concat(c)}));}}}}function xs(e,t,n,r,i,s){let o=[],[a,p]=vn(e,t,i,s);if(ws(e,o,t,n,r,a),p.length!==0)for(let c=0;c<p.length;c++){Nn(e,o,t,n,r,false,a,p[c]);for(let f=c+1;f<p.length;f++)gn(e,o,t,n,r,false,p[c],p[f]);}return o}function Nn(e,t,n,r,i,s,o,a){if(r.has(o,a,s))return;r.add(o,a,s);let p=e.getFragment(a);if(!p)return;let[c,f]=fr(e,n,p);if(o!==c){hr(e,t,n,r,i,s,o,c);for(let d of f)Nn(e,t,n,r,i,s,o,d);}}function gn(e,t,n,r,i,s,o,a){if(o===a||i.has(o,a,s))return;i.add(o,a,s);let p=e.getFragment(o),c=e.getFragment(a);if(!p||!c)return;let[f,d]=fr(e,n,p),[h,g]=fr(e,n,c);hr(e,t,n,r,i,s,f,h);for(let N of g)gn(e,t,n,r,i,s,o,N);for(let N of d)gn(e,t,n,r,i,s,N,a);}function Rs(e,t,n,r,i,s,o,a,p){let c=[],[f,d]=vn(e,t,s,o),[h,g]=vn(e,t,a,p);hr(e,c,t,n,r,i,f,h);for(let N of g)Nn(e,c,t,n,r,i,f,N);for(let N of d)Nn(e,c,t,n,r,i,h,N);for(let N of d)for(let D of g)gn(e,c,t,n,r,i,N,D);return c}function ws(e,t,n,r,i,s){for(let[o,a]of Object.entries(s))if(a.length>1)for(let p=0;p<a.length;p++)for(let c=p+1;c<a.length;c++){let f=Ni(e,n,r,i,false,o,a[p],a[c]);f&&t.push(f);}}function hr(e,t,n,r,i,s,o,a){for(let[p,c]of Object.entries(o)){let f=a[p];if(f)for(let d of c)for(let h of f){let g=Ni(e,n,r,i,s,p,d,h);g&&t.push(g);}}}function Ni(e,t,n,r,i,s,o,a){let[p,c,f]=o,[d,h,g]=a,N=i||p!==d&&F(p)&&F(d);if(!N){let Y=c.name.value,v=h.name.value;if(Y!==v)return [[s,`"${Y}" and "${v}" are different fields`],[c],[h]];if(!ks(c,h))return [[s,"they have differing arguments"],[c],[h]]}let D=f?.type,R=g?.type;if(D&&R&&lr(D,R))return [[s,`they return conflicting types "${E(D)}" and "${E(R)}"`],[c],[h]];let A=c.selectionSet,G=h.selectionSet;if(A&&G){let Y=Rs(e,t,n,r,N,ne(D),A,ne(R),G);return Fs(Y,s,c,h)}}function ks(e,t){let n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return false;let i=new Map(r.map(({name:s,value:o})=>[s.value,o]));return n.every(s=>{let o=s.value,a=i.get(s.name.value);return a===void 0?false:Ti(o)===Ti(a)})}function Ti(e){return $(En(e))}function lr(e,t){return Q(e)?Q(t)?lr(e.ofType,t.ofType):true:Q(t)?true:x(e)?x(t)?lr(e.ofType,t.ofType):true:x(t)?true:ce(e)||ce(t)?e!==t:false}function vn(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);gi(e,n,r,s,o);let a=[s,Object.keys(o)];return t.set(r,a),a}function fr(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=W(e.getSchema(),n.typeCondition);return vn(e,t,i,n.selectionSet)}function gi(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case exports.d.FIELD:{let o=s.name.value,a;(F(t)||C(t))&&(a=t.getFields()[o]);let p=s.alias?s.alias.value:o;r[p]||(r[p]=[]),r[p].push([t,s,a]);break}case exports.d.FRAGMENT_SPREAD:i[s.name.value]=true;break;case exports.d.INLINE_FRAGMENT:{let o=s.typeCondition,a=o?W(e.getSchema(),o):t;gi(e,a,s.selectionSet,r,i);break}}}function Fs(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 In=class{constructor(){this._data=new Map;}has(t,n,r){var i;let s=(i=this._data.get(t))===null||i===void 0?void 0:i.get(n);return s===void 0?false:r?true:r===s}add(t,n,r){let i=this._data.get(t);i===void 0?this._data.set(t,new Map([[n,r]])):i.set(n,r);}},dr=class{constructor(){this._orderedPairSet=new In;}has(t,n,r){return t<n?this._orderedPairSet.has(t,n,r):this._orderedPairSet.has(n,t,r)}add(t,n,r){t<n?this._orderedPairSet.add(t,n,r):this._orderedPairSet.add(n,t,r);}};chunkBUNLC3II_cjs.h();function yr(e){return {InlineFragment(t){let n=e.getType(),r=e.getParentType();if(he(n)&&he(r)&&!rn(e.getSchema(),n,r)){let i=E(r),s=E(n);e.reportError(new m(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}));}},FragmentSpread(t){let n=t.name.value,r=Cs(e,n),i=e.getParentType();if(r&&i&&!rn(e.getSchema(),r,i)){let s=E(i),o=E(r);e.reportError(new m(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}));}}}}function Cs(e,t){let n=e.getFragment(t);if(n){let r=W(e.getSchema(),n.typeCondition);if(he(r))return r}}chunkBUNLC3II_cjs.h();({[exports.d.SCALAR_TYPE_DEFINITION]:exports.d.SCALAR_TYPE_EXTENSION,[exports.d.OBJECT_TYPE_DEFINITION]:exports.d.OBJECT_TYPE_EXTENSION,[exports.d.INTERFACE_TYPE_DEFINITION]:exports.d.INTERFACE_TYPE_EXTENSION,[exports.d.UNION_TYPE_DEFINITION]:exports.d.UNION_TYPE_EXTENSION,[exports.d.ENUM_TYPE_DEFINITION]:exports.d.ENUM_TYPE_EXTENSION,[exports.d.INPUT_OBJECT_TYPE_DEFINITION]:exports.d.INPUT_OBJECT_TYPE_EXTENSION});chunkBUNLC3II_cjs.h();function Er(e){return {...Nr(e),Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return false;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&Le(s)){let o=E(s.type);e.reportError(new m(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}));}}}}}function Nr(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:Te;for(let a of i)n[a.name]=ve(a.args.filter(Le),p=>p.name);let s=e.getDocument().definitions;for(let a of s)if(a.kind===exports.d.DIRECTIVE_DEFINITION){var o;let p=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=ve(p.filter(Ms),c=>c.name.value);}return {Directive:{leave(a){let p=a.name.value,c=n[p];if(c){var f;let d=(f=a.arguments)!==null&&f!==void 0?f:[],h=new Set(d.map(g=>g.name.value));for(let[g,N]of Object.entries(c))if(!h.has(g)){let D=it(N.type)?E(N.type):$(N.type);e.reportError(new m(`Directive "@${p}" argument "${g}" of type "${D}" is required, but it was not provided.`,{nodes:a}));}}}}}}function Ms(e){return e.type.kind===exports.d.NON_NULL_TYPE&&e.defaultValue==null}chunkBUNLC3II_cjs.h();function gr(e){return {Field(t){let n=e.getType(),r=t.selectionSet;if(n)if(ce(ne(n))){if(r){let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}));}}else if(r){if(r.selections.length===0){let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" of type "${s}" must have at least one field selected.`,{nodes:t}));}}else {let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}));}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function vi(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function vr(e,t,n){return {prev:e,key:t,typename:n}}function _e(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ii(e,t,n=js){return Gt(e,t,n,void 0)}function js(e,t,n){let r="Invalid value "+E(t);throw e.length>0&&(r+=` at "value${vi(e)}"`),n.message=r+": "+n.message,n}function Gt(e,t,n,r){if(x(t)){if(e!=null)return Gt(e,t.ofType,n,r);n(_e(r),e,new m(`Expected non-nullable type "${E(t)}" not to be null.`));return}if(e==null)return null;if(Q(t)){let i=t.ofType;return an(e)?Array.from(e,(s,o)=>{let a=vr(r,o,void 0);return Gt(s,i,n,a)}):[Gt(e,i,n,r)]}if(U(t)){if(!oe(e)||Array.isArray(e)){n(_e(r),e,new m(`Expected type "${t.name}" to be an object.`));return}let i=Object.create(null),s=t.getFields();for(let o of Object.values(s)){let a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(x(o.type)){let p=E(o.type);n(_e(r),e,new m(`Field "${o.name}" of required type "${p}" was not provided.`));}continue}i[o.name]=Gt(a,o.type,n,vr(r,o.name,t.name));}for(let o of Object.keys(e))if(!s[o]){let a=ue(o,Object.keys(t.getFields()));n(_e(r),e,new m(`Field "${o}" is not defined by type "${t.name}".`+ie(a)));}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n(_e(r),e,new m(`Exactly one key must be specified for OneOf type "${t.name}".`));let a=o[0],p=i[a];p===null&&n(_e(r).concat(a),p,new m(`Field "${a}" must be non-null.`));}return {...i}}if(ce(t)){let i;try{i=t.parseValue(e);}catch(s){s instanceof m?n(_e(r),e,s):n(_e(r),e,new m(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(_e(r),e,new m(`Expected type "${t.name}".`)),i}z(false,"Unexpected input type: "+E(t));}chunkBUNLC3II_cjs.h();function $e(e,t,n){if(e){if(e.kind===exports.d.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0||!bi(n,r))return;let i=n[r];return i===null&&x(t)?void 0:i}if(x(t))return e.kind===exports.d.NULL?void 0:$e(e,t.ofType,n);if(e.kind===exports.d.NULL)return null;if(Q(t)){let r=t.ofType;if(e.kind===exports.d.LIST){let s=[];for(let o of e.values)if(Oi(o,n)){if(x(r))return;s.push(null);}else {let a=$e(o,r,n);if(a===void 0)return;s.push(a);}return s}let i=$e(e,r,n);return i===void 0?void 0:[i]}if(U(t)){if(e.kind!==exports.d.OBJECT)return;let r=Object.create(null),i=ve(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||Oi(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(x(s.type))return;continue}let a=$e(o.value,s.type,n);if(a===void 0)return;r[s.name]=a;}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(ce(t)){let r;try{r=t.parseLiteral(e,n);}catch{return}return r===void 0?void 0:r}z(false,"Unexpected input type: "+E(t));}}function Oi(e,t){return e.kind===exports.d.VARIABLE&&(t==null||t[e.name.value]===void 0||!bi(t,e.name.value))}function bi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ir(e,t,n){var r;let i=Object.create(null),s=(r=t.arguments)!==null&&r!==void 0?r:[],o=ve(s,a=>a.name.value);for(let a of e.args){let p=a.name,c=a.type,f=o[p];if(!f){if(a.defaultValue!==void 0)i[p]=a.defaultValue;else if(x(c))throw new m(`Argument "${p}" of required type "${E(c)}" was not provided.`,{nodes:t});continue}let d=f.value,h=d.kind===exports.d.NULL;if(d.kind===exports.d.VARIABLE){let N=d.name.value;if(n==null||!Gs(n,N)){if(a.defaultValue!==void 0)i[p]=a.defaultValue;else if(x(c))throw new m(`Argument "${p}" of required type "${E(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}h=n[N]==null;}if(h&&x(c))throw new m(`Argument "${p}" of non-null type "${E(c)}" must not be null.`,{nodes:d});let g=$e(d,c,n);if(g===void 0)throw new m(`Argument "${p}" has invalid value ${$(d)}.`,{nodes:d});i[p]=g;}return {...i}}function Pt(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Ir(e,i,n)}function Gs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Si(e,t,n,r,i){let s=new Map;return br(e,t,n,r,i,s,new Set),s}function br(e,t,n,r,i,s,o){for(let a of i.selections)switch(a.kind){case exports.d.FIELD:{if(!Or(n,a))continue;let p=Ps(a),c=s.get(p);c!==void 0?c.push(a):s.set(p,[a]);break}case exports.d.INLINE_FRAGMENT:{if(!Or(n,a)||!_i(e,a,r))continue;br(e,t,n,r,a.selectionSet,s,o);break}case exports.d.FRAGMENT_SPREAD:{let p=a.name.value;if(o.has(p)||!Or(n,a))continue;o.add(p);let c=t[p];if(!c||!_i(e,c,r))continue;br(e,t,n,r,c.selectionSet,s,o);break}}}function Or(e,t){let n=Pt(wt,t,e);if(n?.if===true)return false;let r=Pt(Rt,t,e);return r?.if!==false}function _i(e,t,n){let r=t.typeCondition;if(!r)return true;let i=W(e,r);return i===n?true:ye(i)?e.isSubType(i,n):false}function Ps(e){return e.alias?e.alias.value:e.name.value}function _r(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,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(let c of o.definitions)c.kind===exports.d.FRAGMENT_DEFINITION&&(a[c.name.value]=c);let p=Si(n,a,s,r,t.selectionSet);if(p.size>1){let d=[...p.values()].slice(1).flat();e.reportError(new m(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}));}for(let c of p.values())c[0].name.value.startsWith("__")&&e.reportError(new m(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}));}}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function lt(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r);}return n}chunkBUNLC3II_cjs.h();function On(e){return {Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=lt(i,o=>o.name.value);for(let[o,a]of s)a.length>1&&e.reportError(new m(`There can be only one argument named "${o}".`,{nodes:a.map(p=>p.name)}));}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function bn(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let p of r)t[p.name]=!p.isRepeatable;let i=e.getDocument().definitions;for(let p of i)p.kind===exports.d.DIRECTIVE_DEFINITION&&(t[p.name.value]=!p.repeatable);let s=Object.create(null),o=Object.create(null),a=Object.create(null);return {enter(p){if(!("directives"in p)||!p.directives)return;let c;if(p.kind===exports.d.SCHEMA_DEFINITION||p.kind===exports.d.SCHEMA_EXTENSION)c=s;else if(Ce(p)||hn(p)){let f=p.name.value;c=o[f],c===void 0&&(o[f]=c=Object.create(null));}else if(p.kind===exports.d.DIRECTIVE_DEFINITION||p.kind===exports.d.DIRECTIVE_EXTENSION){let f=p.name.value;c=a[f],c===void 0&&(a[f]=c=Object.create(null));}else c=Object.create(null);for(let f of p.directives){let d=f.name.value;t[d]&&(c[d]?e.reportError(new m(`The directive "@${d}" can only be used once at this location.`,{nodes:[c[d],f]})):c[d]=f);}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function xr(e){let t=Object.create(null);return {OperationDefinition:()=>false,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new m(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,false}}}chunkBUNLC3II_cjs.h();function _n(e){let t=[],n=Object.create(null);return {ObjectValue:{enter(){t.push(n),n=Object.create(null);},leave(){let r=t.pop();r||z(),n=r;}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new m(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name;}}}chunkBUNLC3II_cjs.h();function Rr(e){let t=Object.create(null);return {OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new m(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),false},FragmentDefinition:()=>false}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Fr(e){return {OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=lt(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new m(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}));}}}chunkBUNLC3II_cjs.h();function Cr(e){return {ListValue(t){let n=st(e.getParentInputType());if(!Q(n))return Be(e,t),false},ObjectValue(t){let n=ne(e.getInputType());if(!U(n))return Be(e,t),false;let r=ve(t.fields,i=>i.name.value);for(let i of Object.values(n.getFields()))if(!r[i.name]&&ot(i)){let o=E(i.type);e.reportError(new m(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}));}n.isOneOf&&Bs(e,t,n,r);},ObjectField(t){let n=ne(e.getParentInputType());if(!e.getInputType()&&U(n)){let i=ue(t.name.value,Object.keys(n.getFields()));e.reportError(new m(`Field "${t.name.value}" is not defined by type "${n.name}".`+ie(i),{nodes:t}));}},NullValue(t){let n=e.getInputType();x(n)&&e.reportError(new m(`Expected value of type "${E(n)}", found ${$(t)}.`,{nodes:t}));},EnumValue:t=>Be(e,t),IntValue:t=>Be(e,t),FloatValue:t=>Be(e,t),StringValue:t=>Be(e,t),BooleanValue:t=>Be(e,t)}}function Be(e,t){let n=e.getInputType();if(!n)return;let r=ne(n);if(!ce(r)){let i=E(n);e.reportError(new m(`Expected value of type "${i}", found ${$(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=E(n);e.reportError(new m(`Expected value of type "${s}", found ${$(t)}.`,{nodes:t}));}}catch(i){let s=E(n);i instanceof m?e.reportError(i):e.reportError(new m(`Expected value of type "${s}", found ${$(t)}; `+i.message,{nodes:t,originalError:i}));}}function Bs(e,t,n,r){var i;let s=Object.keys(r);if(s.length!==1){e.reportError(new m(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let a=(i=r[s[0]])===null||i===void 0?void 0:i.value;(!a||a.kind===exports.d.NULL)&&e.reportError(new m(`Field "${n.name}.${s[0]}" must be non-null.`,{nodes:[t]}));}chunkBUNLC3II_cjs.h();function $r(e){return {VariableDefinition(t){let n=W(e.getSchema(),t.type);if(n!==void 0&&!se(n)){let r=t.variable.name.value,i=$(t.type);e.reportError(new m(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}));}}}}chunkBUNLC3II_cjs.h();function Ur(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:s,defaultValue:o,parentType:a}of r){let p=i.name.value,c=t[p];if(c&&s){let f=e.getSchema(),d=W(f,c.type);if(d&&!qs(f,d,c.defaultValue,s,o)){let h=E(d),g=E(s);e.reportError(new m(`Variable "$${p}" of type "${h}" used in position expecting type "${g}".`,{nodes:[c,i]}));}U(a)&&a.isOneOf&&Ot(d)&&e.reportError(new m(`Variable "$${p}" is of type "${d}" but must be non-nullable to be used for OneOf Input Object "${a}".`,{nodes:[c,i]}));}}}},VariableDefinition(n){t[n.variable.name.value]=n;}}}function qs(e,t,n,r,i){if(x(r)&&!x(t)){if(!(n!=null&&n.kind!==exports.d.NULL)&&!(i!==void 0))return false;let a=r.ofType;return xe(e,t,a)}return xe(e,t,r)}var Vr=Object.freeze([or]),Sn=Object.freeze([Hn,Rr,ir,_r,Tn,er,$r,gr,Zn,xr,rr,pr,yr,ar,Fr,ur,cr,yn,bn,tr,On,Cr,Er,Ur,mr,_n,...Vr]);chunkBUNLC3II_cjs.h();var Mr=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===exports.d.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 s of i.selections)s.kind===exports.d.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){let a=o.name.value;if(r[a]!==true){r[a]=true;let p=this.getFragment(a);p&&(n.push(p),i.push(p.selectionSet));}}this._recursivelyReferencedFragments.set(t,n);}return n}};var Qt=class extends Mr{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 Qe(this._schema);je(t,jt(i,{VariableDefinition:()=>false,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()});}})),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()}};var Ks=Me(ht,e=>e.filter(t=>t!=="description"));function Di(e,t,n=Sn,r,i=new Qe(e)){var s;let o=(s=r?.maxErrors)!==null&&s!==void 0?s:100;t||k(false,"Must provide document."),mn(e);let a=Object.freeze({}),p=[],c=new Qt(e,t,i,d=>{if(p.length>=o)throw p.push(new m("Too many validation errors, error limit reached. Validation aborted.")),a;p.push(d);}),f=Un(n.map(d=>d(c)));try{je(t,jt(i,f),Ks);}catch(d){if(d!==a)throw d}return p}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Ai(e){return e instanceof Error?e:new jr(e)}var jr=class extends Error{constructor(t){super("Unexpected error value: "+E(t)),this.name="NonErrorThrown",this.thrownValue=t;}};function Li(e,t,n){var r;let i=Ai(e);return Js(i)?i:new m(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function Js(e){return Array.isArray(e.path)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function xi(e,t){let n=null;for(let i of e.definitions)if(i.kind===exports.d.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}chunkBUNLC3II_cjs.h();function Pr(e){return Io(e,t=>!on(t),vo)}function vo(e){return !sn(e)&&!ct(e)}function Io(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return [Oo(e),...r.map(s=>Ro(s)),...i.map(s=>Qr(s))].filter(Boolean).join(`
59
+ `))}var Kn=class{constructor(t){this._errors=[],this.schema=t;}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new m(t,{nodes:r}));}getErrors(){return this._errors}};function fs(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!F(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${E(n)}.`,(r=Yn(t,H.QUERY))!==null&&r!==void 0?r:n.astNode);}let i=t.getMutationType();if(i&&!F(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${E(i)}.`,(s=Yn(t,H.MUTATION))!==null&&s!==void 0?s:i.astNode);}let o=t.getSubscriptionType();if(o&&!F(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${E(o)}.`,(a=Yn(t,H.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode);}}function Yn(e,t){var n;return (n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return (i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function ds(e){for(let n of e.schema.getDirectives()){if(!at(n)){e.reportError(`Expected directive but got: ${E(n)}.`,n?.astNode);continue}Pe(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(let r of n.args)if(Pe(e,r),se(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${E(r.type)}.`,r.astNode),Le(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[Xn(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type]);}}}function Pe(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode);}function ms(e){let t=vs(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!en(r)){e.reportError(`Expected GraphQL named type but got: ${E(r)}.`,r.astNode);continue}ct(r)||Pe(e,r),F(r)||C(r)?(di(e,r),mi(e,r)):te(r)?Ts(e,r):J(r)?Es(e,r):U(r)&&(Ns(e,r),t(r));}}function di(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(Pe(e,o),!Ae(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${E(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type);}for(let a of o.args){let u=a.name;if(Pe(e,a),!se(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${E(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type);}if(Le(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[Xn(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type]);}}}}function mi(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!C(r)){e.reportError(`Type ${E(t)} must only implement Interface types, it cannot implement ${E(r)}.`,Mt(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Mt(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Mt(t,r));continue}n[r.name]=true,ys(e,t,r),hs(e,t,r);}}function hs(e,t,n){let r=t.getFields();for(let u of Object.values(n.getFields())){let c=u.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!xe(e.schema,f.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${E(u.type)} but ${t.name}.${c} is type ${E(f.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type]);}for(let d of u.args){let h=d.name,g=f.args.find(N=>N.name===h);if(!g){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!bt(d.type,g.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expects type ${E(d.type)} but ${t.name}.${c}(${h}:) is type ${E(g.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=g.astNode)===null||a===void 0?void 0:a.type]);}}for(let d of f.args){let h=d.name;!u.args.find(N=>N.name===h)&&Le(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${h} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,u.astNode]);}}}function ys(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}.`,[...Mt(n,i),...Mt(t,n)]);}function Ts(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.`,hi(t,i.name));continue}r[i.name]=true,F(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${E(i)}.`,hi(t,String(i)));}}function Es(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)Pe(e,r);}function Ns(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 s of n){if(Pe(e,s),!se(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${E(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type);}if(ot(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[Xn(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type]);}t.isOneOf&&gs(t,s,e);}}function gs(e,t,n){if(x(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 vs(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=true,r[s.name]=n.length;let o=Object.values(s.getFields());for(let a of o)if(x(a.type)&&U(a.type.ofType)){let u=a.type.ofType,c=r[u.name];if(n.push(a),c===void 0)i(u);else {let f=n.slice(c),d=f.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,f.map(h=>h.astNode));}n.pop();}r[s.name]=void 0;}}function Mt(e,t){let{astNode:n,extensionASTNodes:r}=e;return (n!=null?[n,...r]:r).flatMap(s=>{var o;return (o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function hi(e,t){let{astNode:n,extensionASTNodes:r}=e;return (n!=null?[n,...r]:r).flatMap(s=>{var o;return (o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function Xn(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Ft.name)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function W(e,t){switch(t.kind){case exports.d.LIST_TYPE:{let n=W(e,t.type);return n&&new V(n)}case exports.d.NON_NULL_TYPE:{let n=W(e,t.type);return n&&new S(n)}case exports.d.NAMED_TYPE:return e.getType(t.name.value)}}var Qe=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??Is,n&&(se(n)&&this._inputTypeStack.push(n),he(n)&&this._parentTypeStack.push(n),Ae(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 exports.d.SELECTION_SET:{let i=ne(this.getType());this._parentTypeStack.push(he(i)?i:void 0);break}case exports.d.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(Ae(o)?o:void 0);break}case exports.d.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case exports.d.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push(F(i)?i:void 0);break}case exports.d.INLINE_FRAGMENT:case exports.d.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?W(n,i):ne(this.getType());this._typeStack.push(Ae(s)?s:void 0);break}case exports.d.VARIABLE_DEFINITION:{let i=W(n,t.type);this._inputTypeStack.push(se(i)?i:void 0);break}case exports.d.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.LIST:{let i=st(this.getInputType()),s=Q(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.OBJECT_FIELD:{let i=ne(this.getInputType()),s,o;U(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(se(s)?s:void 0);break}case exports.d.ENUM:{let i=ne(this.getInputType()),s;J(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case exports.d.SELECTION_SET:this._parentTypeStack.pop();break;case exports.d.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case exports.d.DIRECTIVE:this._directive=null;break;case exports.d.OPERATION_DEFINITION:case exports.d.INLINE_FRAGMENT:case exports.d.FRAGMENT_DEFINITION:this._typeStack.pop();break;case exports.d.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case exports.d.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case exports.d.LIST:case exports.d.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case exports.d.ENUM:this._enumValue=null;break;}}};function Is(e,t,n){let r=n.name.value;if(r===Ct.name&&e.getQueryType()===t)return Ct;if(r===$t.name&&e.getQueryType()===t)return $t;if(r===Ut.name&&he(t))return Ut;if(F(t)||C(t))return t.getFields()[r]}function jt(e,t){return {enter(...n){let r=n[0];e.enter(r);let i=tt(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),yt(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=tt(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function zn(e){return e.kind===exports.d.OPERATION_DEFINITION||e.kind===exports.d.FRAGMENT_DEFINITION}function Wn(e){return e.kind===exports.d.SCHEMA_DEFINITION||Ce(e)||e.kind===exports.d.DIRECTIVE_DEFINITION}function Ce(e){return e.kind===exports.d.SCALAR_TYPE_DEFINITION||e.kind===exports.d.OBJECT_TYPE_DEFINITION||e.kind===exports.d.INTERFACE_TYPE_DEFINITION||e.kind===exports.d.UNION_TYPE_DEFINITION||e.kind===exports.d.ENUM_TYPE_DEFINITION||e.kind===exports.d.INPUT_OBJECT_TYPE_DEFINITION}function Hn(e){return e.kind===exports.d.SCHEMA_EXTENSION||e.kind===exports.d.DIRECTIVE_EXTENSION||hn(e)}function hn(e){return e.kind===exports.d.SCALAR_TYPE_EXTENSION||e.kind===exports.d.OBJECT_TYPE_EXTENSION||e.kind===exports.d.INTERFACE_TYPE_EXTENSION||e.kind===exports.d.UNION_TYPE_EXTENSION||e.kind===exports.d.ENUM_TYPE_EXTENSION||e.kind===exports.d.INPUT_OBJECT_TYPE_EXTENSION}function Zn(e){return {Document(t){for(let n of t.definitions)if(!zn(n)){let r=n.kind===exports.d.SCHEMA_DEFINITION||n.kind===exports.d.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new m(`The ${r} definition is not executable.`,{nodes:n}));}return false}}}chunkBUNLC3II_cjs.h();function er(e){return {Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=ie("to use an inline fragment on",Os(i,n,s));o===""&&(o=ie(bs(n,s))),e.reportError(new m(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}));}}}}function Os(e,t,n){if(!ye(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 a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1);}}return [...r].sort((o,a)=>{let u=i[a.name]-i[o.name];return u!==0?u:C(o)&&e.isSubType(o,a)?-1:C(a)&&e.isSubType(a,o)?1:Ze(o.name,a.name)}).map(o=>o.name)}function bs(e,t){if(F(e)||C(e)){let n=Object.keys(e.getFields());return ue(t,n)}return []}chunkBUNLC3II_cjs.h();function tr(e){return {InlineFragment(t){let n=t.typeCondition;if(n){let r=W(e.getSchema(),n);if(r&&!he(r)){let i=$(n);e.reportError(new m(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}));}}},FragmentDefinition(t){let n=W(e.getSchema(),t.typeCondition);if(n&&!he(n)){let r=$(t.typeCondition);e.reportError(new m(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}));}}}}chunkBUNLC3II_cjs.h();function nr(e){return {...rr(e),Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(u=>u.name),a=ue(s,o);e.reportError(new m(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+ie(a),{nodes:t}));}}}}function rr(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let o of r)t[o.name]=o.args.map(a=>a.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===exports.d.DIRECTIVE_DEFINITION){var s;let a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value);}return {Directive(o){let a=o.name.value,u=t[a];if(o.arguments&&u)for(let c of o.arguments){let f=c.name.value;if(!u.includes(f)){let d=ue(f,u);e.reportError(new m(`Unknown argument "${f}" on directive "@${a}".`+ie(d),{nodes:c}));}}return false}}}chunkBUNLC3II_cjs.h();function yn(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===exports.d.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return {Directive(s,o,a,u,c){let f=s.name.value,d=t[f];if(!d){e.reportError(new m(`Unknown directive "@${f}".`,{nodes:s}));return}let h=_s(c);h&&!d.includes(h)&&e.reportError(new m(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}));}}}function _s(e){let t=e[e.length-1];switch("kind"in t||z(),t.kind){case exports.d.OPERATION_DEFINITION:return Ss(t.operation);case exports.d.FIELD:return exports.c.FIELD;case exports.d.FRAGMENT_SPREAD:return exports.c.FRAGMENT_SPREAD;case exports.d.INLINE_FRAGMENT:return exports.c.INLINE_FRAGMENT;case exports.d.FRAGMENT_DEFINITION:return exports.c.FRAGMENT_DEFINITION;case exports.d.VARIABLE_DEFINITION:return exports.c.VARIABLE_DEFINITION;case exports.d.SCHEMA_DEFINITION:case exports.d.SCHEMA_EXTENSION:return exports.c.SCHEMA;case exports.d.SCALAR_TYPE_DEFINITION:case exports.d.SCALAR_TYPE_EXTENSION:return exports.c.SCALAR;case exports.d.OBJECT_TYPE_DEFINITION:case exports.d.OBJECT_TYPE_EXTENSION:return exports.c.OBJECT;case exports.d.FIELD_DEFINITION:return exports.c.FIELD_DEFINITION;case exports.d.INTERFACE_TYPE_DEFINITION:case exports.d.INTERFACE_TYPE_EXTENSION:return exports.c.INTERFACE;case exports.d.UNION_TYPE_DEFINITION:case exports.d.UNION_TYPE_EXTENSION:return exports.c.UNION;case exports.d.ENUM_TYPE_DEFINITION:case exports.d.ENUM_TYPE_EXTENSION:return exports.c.ENUM;case exports.d.ENUM_VALUE_DEFINITION:return exports.c.ENUM_VALUE;case exports.d.INPUT_OBJECT_TYPE_DEFINITION:case exports.d.INPUT_OBJECT_TYPE_EXTENSION:return exports.c.INPUT_OBJECT;case exports.d.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return "kind"in n||z(),n.kind===exports.d.INPUT_OBJECT_TYPE_DEFINITION?exports.c.INPUT_FIELD_DEFINITION:exports.c.ARGUMENT_DEFINITION}case exports.d.DIRECTIVE_DEFINITION:case exports.d.DIRECTIVE_EXTENSION:return exports.c.DIRECTIVE_DEFINITION;default:z(false,"Unexpected kind: "+E(t.kind));}}function Ss(e){switch(e){case H.QUERY:return exports.c.QUERY;case H.MUTATION:return exports.c.MUTATION;case H.SUBSCRIPTION:return exports.c.SUBSCRIPTION}}chunkBUNLC3II_cjs.h();function ir(e){return {FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new m(`Unknown fragment "${n}".`,{nodes:t.name}));}}}chunkBUNLC3II_cjs.h();function Tn(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)Ce(s)&&(r[s.name.value]=true);let i=[...Object.keys(n),...Object.keys(r)];return {NamedType(s,o,a,u,c){let f=s.name.value;if(!n[f]&&!r[f]){var d;let h=(d=c[2])!==null&&d!==void 0?d:a,g=h!=null&&Ds(h);if(g&&yi.includes(f))return;let N=ue(f,g?yi.concat(i):i);e.reportError(new m(`Unknown type "${f}".`+ie(N),{nodes:s}));}}}}var yi=[...Lt,...Vt].map(e=>e.name);function Ds(e){return "kind"in e&&(Wn(e)||Hn(e))}chunkBUNLC3II_cjs.h();function sr(e){let t=0;return {Document(n){t=n.definitions.filter(r=>r.kind===exports.d.OPERATION_DEFINITION).length;},OperationDefinition(n){!n.name&&t>1&&e.reportError(new m("This anonymous operation must be the only defined operation.",{nodes:n}));}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();var As=3;function ar(e){function t(n,r=Object.create(null),i=0){if(n.kind===exports.d.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===true)return false;let o=e.getFragment(s);if(!o)return false;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0;}}if(n.kind===exports.d.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=As))return true;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return true}return false}return {Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new m("Maximum introspection depth exceeded",{nodes:[n]})),false}}}chunkBUNLC3II_cjs.h();function ur(e){let t=Object.create(null),n=[],r=Object.create(null);return {OperationDefinition:()=>false,FragmentDefinition(s){return i(s),false}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=true;let a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(let u of a){let c=u.name.value,f=r[c];if(n.push(u),f===void 0){let d=e.getFragment(c);d&&i(d);}else {let d=n.slice(f),h=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new m(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}));}n.pop();}r[o]=void 0;}}}chunkBUNLC3II_cjs.h();function pr(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 s=i.name.value;t[s]!==true&&e.reportError(new m(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}));}}},VariableDefinition(n){t[n.variable.name.value]=true;}}}chunkBUNLC3II_cjs.h();function cr(e){let t=[],n=[];return {OperationDefinition(r){return t.push(r),false},FragmentDefinition(r){return n.push(r),false},Document:{leave(){let r=Object.create(null);for(let i of t)for(let s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=true;for(let i of n){let s=i.name.value;r[s]!==true&&e.reportError(new m(`Fragment "${s}" is never used.`,{nodes:i}));}}}}}chunkBUNLC3II_cjs.h();function lr(e){let t=[];return {OperationDefinition:{enter(){t=[];},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=true;for(let s of t){let o=s.variable.name.value;r[o]!==true&&e.reportError(new m(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}));}}},VariableDefinition(n){t.push(n);}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function En(e){switch(e.kind){case exports.d.OBJECT:return {...e,fields:Ls(e.fields)};case exports.d.LIST:return {...e,values:e.values.map(En)};case exports.d.INT:case exports.d.FLOAT:case exports.d.STRING:case exports.d.BOOLEAN:case exports.d.NULL:case exports.d.ENUM:case exports.d.VARIABLE:return e}}function Ls(e){return e.map(t=>({...t,value:En(t.value)})).sort((t,n)=>Ze(t.name.value,n.name.value))}function Ei(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Ei(n)).join(" and "):e}function hr(e){let t=new In,n=new mr,r=new Map;return {SelectionSet(i){let s=xs(e,r,t,n,e.getParentType(),i);for(let[[o,a],u,c]of s){let f=Ei(a);e.reportError(new m(`Fields "${o}" conflict because ${f}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(c)}));}}}}function xs(e,t,n,r,i,s){let o=[],[a,u]=vn(e,t,i,s);if(ws(e,o,t,n,r,a),u.length!==0)for(let c=0;c<u.length;c++){Nn(e,o,t,n,r,false,a,u[c]);for(let f=c+1;f<u.length;f++)gn(e,o,t,n,r,false,u[c],u[f]);}return o}function Nn(e,t,n,r,i,s,o,a){if(r.has(o,a,s))return;r.add(o,a,s);let u=e.getFragment(a);if(!u)return;let[c,f]=dr(e,n,u);if(o!==c){yr(e,t,n,r,i,s,o,c);for(let d of f)Nn(e,t,n,r,i,s,o,d);}}function gn(e,t,n,r,i,s,o,a){if(o===a||i.has(o,a,s))return;i.add(o,a,s);let u=e.getFragment(o),c=e.getFragment(a);if(!u||!c)return;let[f,d]=dr(e,n,u),[h,g]=dr(e,n,c);yr(e,t,n,r,i,s,f,h);for(let N of g)gn(e,t,n,r,i,s,o,N);for(let N of d)gn(e,t,n,r,i,s,N,a);}function Rs(e,t,n,r,i,s,o,a,u){let c=[],[f,d]=vn(e,t,s,o),[h,g]=vn(e,t,a,u);yr(e,c,t,n,r,i,f,h);for(let N of g)Nn(e,c,t,n,r,i,f,N);for(let N of d)Nn(e,c,t,n,r,i,h,N);for(let N of d)for(let D of g)gn(e,c,t,n,r,i,N,D);return c}function ws(e,t,n,r,i,s){for(let[o,a]of Object.entries(s))if(a.length>1)for(let u=0;u<a.length;u++)for(let c=u+1;c<a.length;c++){let f=Ni(e,n,r,i,false,o,a[u],a[c]);f&&t.push(f);}}function yr(e,t,n,r,i,s,o,a){for(let[u,c]of Object.entries(o)){let f=a[u];if(f)for(let d of c)for(let h of f){let g=Ni(e,n,r,i,s,u,d,h);g&&t.push(g);}}}function Ni(e,t,n,r,i,s,o,a){let[u,c,f]=o,[d,h,g]=a,N=i||u!==d&&F(u)&&F(d);if(!N){let Y=c.name.value,v=h.name.value;if(Y!==v)return [[s,`"${Y}" and "${v}" are different fields`],[c],[h]];if(!ks(c,h))return [[s,"they have differing arguments"],[c],[h]]}let D=f?.type,R=g?.type;if(D&&R&&fr(D,R))return [[s,`they return conflicting types "${E(D)}" and "${E(R)}"`],[c],[h]];let A=c.selectionSet,G=h.selectionSet;if(A&&G){let Y=Rs(e,t,n,r,N,ne(D),A,ne(R),G);return Fs(Y,s,c,h)}}function ks(e,t){let n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return false;let i=new Map(r.map(({name:s,value:o})=>[s.value,o]));return n.every(s=>{let o=s.value,a=i.get(s.name.value);return a===void 0?false:Ti(o)===Ti(a)})}function Ti(e){return $(En(e))}function fr(e,t){return Q(e)?Q(t)?fr(e.ofType,t.ofType):true:Q(t)?true:x(e)?x(t)?fr(e.ofType,t.ofType):true:x(t)?true:ce(e)||ce(t)?e!==t:false}function vn(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);gi(e,n,r,s,o);let a=[s,Object.keys(o)];return t.set(r,a),a}function dr(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=W(e.getSchema(),n.typeCondition);return vn(e,t,i,n.selectionSet)}function gi(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case exports.d.FIELD:{let o=s.name.value,a;(F(t)||C(t))&&(a=t.getFields()[o]);let u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case exports.d.FRAGMENT_SPREAD:i[s.name.value]=true;break;case exports.d.INLINE_FRAGMENT:{let o=s.typeCondition,a=o?W(e.getSchema(),o):t;gi(e,a,s.selectionSet,r,i);break}}}function Fs(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 In=class{constructor(){this._data=new Map;}has(t,n,r){var i;let s=(i=this._data.get(t))===null||i===void 0?void 0:i.get(n);return s===void 0?false:r?true:r===s}add(t,n,r){let i=this._data.get(t);i===void 0?this._data.set(t,new Map([[n,r]])):i.set(n,r);}},mr=class{constructor(){this._orderedPairSet=new In;}has(t,n,r){return t<n?this._orderedPairSet.has(t,n,r):this._orderedPairSet.has(n,t,r)}add(t,n,r){t<n?this._orderedPairSet.add(t,n,r):this._orderedPairSet.add(n,t,r);}};chunkBUNLC3II_cjs.h();function Tr(e){return {InlineFragment(t){let n=e.getType(),r=e.getParentType();if(he(n)&&he(r)&&!rn(e.getSchema(),n,r)){let i=E(r),s=E(n);e.reportError(new m(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}));}},FragmentSpread(t){let n=t.name.value,r=Cs(e,n),i=e.getParentType();if(r&&i&&!rn(e.getSchema(),r,i)){let s=E(i),o=E(r);e.reportError(new m(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}));}}}}function Cs(e,t){let n=e.getFragment(t);if(n){let r=W(e.getSchema(),n.typeCondition);if(he(r))return r}}chunkBUNLC3II_cjs.h();({[exports.d.SCALAR_TYPE_DEFINITION]:exports.d.SCALAR_TYPE_EXTENSION,[exports.d.OBJECT_TYPE_DEFINITION]:exports.d.OBJECT_TYPE_EXTENSION,[exports.d.INTERFACE_TYPE_DEFINITION]:exports.d.INTERFACE_TYPE_EXTENSION,[exports.d.UNION_TYPE_DEFINITION]:exports.d.UNION_TYPE_EXTENSION,[exports.d.ENUM_TYPE_DEFINITION]:exports.d.ENUM_TYPE_EXTENSION,[exports.d.INPUT_OBJECT_TYPE_DEFINITION]:exports.d.INPUT_OBJECT_TYPE_EXTENSION});chunkBUNLC3II_cjs.h();function Nr(e){return {...gr(e),Field:{leave(t){var n;let r=e.getFieldDef();if(!r)return false;let i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(let s of r.args)if(!i.has(s.name)&&Le(s)){let o=E(s.type);e.reportError(new m(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}));}}}}}function gr(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:Te;for(let a of i)n[a.name]=ve(a.args.filter(Le),u=>u.name);let s=e.getDocument().definitions;for(let a of s)if(a.kind===exports.d.DIRECTIVE_DEFINITION){var o;let u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=ve(u.filter(Ms),c=>c.name.value);}return {Directive:{leave(a){let u=a.name.value,c=n[u];if(c){var f;let d=(f=a.arguments)!==null&&f!==void 0?f:[],h=new Set(d.map(g=>g.name.value));for(let[g,N]of Object.entries(c))if(!h.has(g)){let D=it(N.type)?E(N.type):$(N.type);e.reportError(new m(`Directive "@${u}" argument "${g}" of type "${D}" is required, but it was not provided.`,{nodes:a}));}}}}}}function Ms(e){return e.type.kind===exports.d.NON_NULL_TYPE&&e.defaultValue==null}chunkBUNLC3II_cjs.h();function vr(e){return {Field(t){let n=e.getType(),r=t.selectionSet;if(n)if(ce(ne(n))){if(r){let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}));}}else if(r){if(r.selections.length===0){let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" of type "${s}" must have at least one field selected.`,{nodes:t}));}}else {let i=t.name.value,s=E(n);e.reportError(new m(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}));}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function vi(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Ir(e,t,n){return {prev:e,key:t,typename:n}}function _e(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ii(e,t,n=js){return Gt(e,t,n,void 0)}function js(e,t,n){let r="Invalid value "+E(t);throw e.length>0&&(r+=` at "value${vi(e)}"`),n.message=r+": "+n.message,n}function Gt(e,t,n,r){if(x(t)){if(e!=null)return Gt(e,t.ofType,n,r);n(_e(r),e,new m(`Expected non-nullable type "${E(t)}" not to be null.`));return}if(e==null)return null;if(Q(t)){let i=t.ofType;return an(e)?Array.from(e,(s,o)=>{let a=Ir(r,o,void 0);return Gt(s,i,n,a)}):[Gt(e,i,n,r)]}if(U(t)){if(!oe(e)||Array.isArray(e)){n(_e(r),e,new m(`Expected type "${t.name}" to be an object.`));return}let i=Object.create(null),s=t.getFields();for(let o of Object.values(s)){let a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(x(o.type)){let u=E(o.type);n(_e(r),e,new m(`Field "${o.name}" of required type "${u}" was not provided.`));}continue}i[o.name]=Gt(a,o.type,n,Ir(r,o.name,t.name));}for(let o of Object.keys(e))if(!s[o]){let a=ue(o,Object.keys(t.getFields()));n(_e(r),e,new m(`Field "${o}" is not defined by type "${t.name}".`+ie(a)));}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n(_e(r),e,new m(`Exactly one key must be specified for OneOf type "${t.name}".`));let a=o[0],u=i[a];u===null&&n(_e(r).concat(a),u,new m(`Field "${a}" must be non-null.`));}return {...i}}if(ce(t)){let i;try{i=t.parseValue(e);}catch(s){s instanceof m?n(_e(r),e,s):n(_e(r),e,new m(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(_e(r),e,new m(`Expected type "${t.name}".`)),i}z(false,"Unexpected input type: "+E(t));}chunkBUNLC3II_cjs.h();function $e(e,t,n){if(e){if(e.kind===exports.d.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0||!bi(n,r))return;let i=n[r];return i===null&&x(t)?void 0:i}if(x(t))return e.kind===exports.d.NULL?void 0:$e(e,t.ofType,n);if(e.kind===exports.d.NULL)return null;if(Q(t)){let r=t.ofType;if(e.kind===exports.d.LIST){let s=[];for(let o of e.values)if(Oi(o,n)){if(x(r))return;s.push(null);}else {let a=$e(o,r,n);if(a===void 0)return;s.push(a);}return s}let i=$e(e,r,n);return i===void 0?void 0:[i]}if(U(t)){if(e.kind!==exports.d.OBJECT)return;let r=Object.create(null),i=ve(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||Oi(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(x(s.type))return;continue}let a=$e(o.value,s.type,n);if(a===void 0)return;r[s.name]=a;}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(ce(t)){let r;try{r=t.parseLiteral(e,n);}catch{return}return r===void 0?void 0:r}z(false,"Unexpected input type: "+E(t));}}function Oi(e,t){return e.kind===exports.d.VARIABLE&&(t==null||t[e.name.value]===void 0||!bi(t,e.name.value))}function bi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Or(e,t,n){var r;let i=Object.create(null),s=(r=t.arguments)!==null&&r!==void 0?r:[],o=ve(s,a=>a.name.value);for(let a of e.args){let u=a.name,c=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(x(c))throw new m(`Argument "${u}" of required type "${E(c)}" was not provided.`,{nodes:t});continue}let d=f.value,h=d.kind===exports.d.NULL;if(d.kind===exports.d.VARIABLE){let N=d.name.value;if(n==null||!Gs(n,N)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(x(c))throw new m(`Argument "${u}" of required type "${E(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}h=n[N]==null;}if(h&&x(c))throw new m(`Argument "${u}" of non-null type "${E(c)}" must not be null.`,{nodes:d});let g=$e(d,c,n);if(g===void 0)throw new m(`Argument "${u}" has invalid value ${$(d)}.`,{nodes:d});i[u]=g;}return {...i}}function Pt(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Or(e,i,n)}function Gs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Si(e,t,n,r,i){let s=new Map;return _r(e,t,n,r,i,s,new Set),s}function _r(e,t,n,r,i,s,o){for(let a of i.selections)switch(a.kind){case exports.d.FIELD:{if(!br(n,a))continue;let u=Ps(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case exports.d.INLINE_FRAGMENT:{if(!br(n,a)||!_i(e,a,r))continue;_r(e,t,n,r,a.selectionSet,s,o);break}case exports.d.FRAGMENT_SPREAD:{let u=a.name.value;if(o.has(u)||!br(n,a))continue;o.add(u);let c=t[u];if(!c||!_i(e,c,r))continue;_r(e,t,n,r,c.selectionSet,s,o);break}}}function br(e,t){let n=Pt(wt,t,e);if(n?.if===true)return false;let r=Pt(Rt,t,e);return r?.if!==false}function _i(e,t,n){let r=t.typeCondition;if(!r)return true;let i=W(e,r);return i===n?true:ye(i)?e.isSubType(i,n):false}function Ps(e){return e.alias?e.alias.value:e.name.value}function Sr(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,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(let c of o.definitions)c.kind===exports.d.FRAGMENT_DEFINITION&&(a[c.name.value]=c);let u=Si(n,a,s,r,t.selectionSet);if(u.size>1){let d=[...u.values()].slice(1).flat();e.reportError(new m(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}));}for(let c of u.values())c[0].name.value.startsWith("__")&&e.reportError(new m(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}));}}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function lt(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r);}return n}chunkBUNLC3II_cjs.h();function On(e){return {Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=lt(i,o=>o.name.value);for(let[o,a]of s)a.length>1&&e.reportError(new m(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}));}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function bn(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Te;for(let u of r)t[u.name]=!u.isRepeatable;let i=e.getDocument().definitions;for(let u of i)u.kind===exports.d.DIRECTIVE_DEFINITION&&(t[u.name.value]=!u.repeatable);let s=Object.create(null),o=Object.create(null),a=Object.create(null);return {enter(u){if(!("directives"in u)||!u.directives)return;let c;if(u.kind===exports.d.SCHEMA_DEFINITION||u.kind===exports.d.SCHEMA_EXTENSION)c=s;else if(Ce(u)||hn(u)){let f=u.name.value;c=o[f],c===void 0&&(o[f]=c=Object.create(null));}else if(u.kind===exports.d.DIRECTIVE_DEFINITION||u.kind===exports.d.DIRECTIVE_EXTENSION){let f=u.name.value;c=a[f],c===void 0&&(a[f]=c=Object.create(null));}else c=Object.create(null);for(let f of u.directives){let d=f.name.value;t[d]&&(c[d]?e.reportError(new m(`The directive "@${d}" can only be used once at this location.`,{nodes:[c[d],f]})):c[d]=f);}}}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Rr(e){let t=Object.create(null);return {OperationDefinition:()=>false,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new m(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,false}}}chunkBUNLC3II_cjs.h();function _n(e){let t=[],n=Object.create(null);return {ObjectValue:{enter(){t.push(n),n=Object.create(null);},leave(){let r=t.pop();r||z(),n=r;}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new m(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name;}}}chunkBUNLC3II_cjs.h();function wr(e){let t=Object.create(null);return {OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new m(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),false},FragmentDefinition:()=>false}}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Cr(e){return {OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=lt(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new m(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}));}}}chunkBUNLC3II_cjs.h();function $r(e){return {ListValue(t){let n=st(e.getParentInputType());if(!Q(n))return Be(e,t),false},ObjectValue(t){let n=ne(e.getInputType());if(!U(n))return Be(e,t),false;let r=ve(t.fields,i=>i.name.value);for(let i of Object.values(n.getFields()))if(!r[i.name]&&ot(i)){let o=E(i.type);e.reportError(new m(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}));}n.isOneOf&&Bs(e,t,n,r);},ObjectField(t){let n=ne(e.getParentInputType());if(!e.getInputType()&&U(n)){let i=ue(t.name.value,Object.keys(n.getFields()));e.reportError(new m(`Field "${t.name.value}" is not defined by type "${n.name}".`+ie(i),{nodes:t}));}},NullValue(t){let n=e.getInputType();x(n)&&e.reportError(new m(`Expected value of type "${E(n)}", found ${$(t)}.`,{nodes:t}));},EnumValue:t=>Be(e,t),IntValue:t=>Be(e,t),FloatValue:t=>Be(e,t),StringValue:t=>Be(e,t),BooleanValue:t=>Be(e,t)}}function Be(e,t){let n=e.getInputType();if(!n)return;let r=ne(n);if(!ce(r)){let i=E(n);e.reportError(new m(`Expected value of type "${i}", found ${$(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=E(n);e.reportError(new m(`Expected value of type "${s}", found ${$(t)}.`,{nodes:t}));}}catch(i){let s=E(n);i instanceof m?e.reportError(i):e.reportError(new m(`Expected value of type "${s}", found ${$(t)}; `+i.message,{nodes:t,originalError:i}));}}function Bs(e,t,n,r){var i;let s=Object.keys(r);if(s.length!==1){e.reportError(new m(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let a=(i=r[s[0]])===null||i===void 0?void 0:i.value;(!a||a.kind===exports.d.NULL)&&e.reportError(new m(`Field "${n.name}.${s[0]}" must be non-null.`,{nodes:[t]}));}chunkBUNLC3II_cjs.h();function Ur(e){return {VariableDefinition(t){let n=W(e.getSchema(),t.type);if(n!==void 0&&!se(n)){let r=t.variable.name.value,i=$(t.type);e.reportError(new m(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}));}}}}chunkBUNLC3II_cjs.h();function Vr(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:s,defaultValue:o,parentType:a}of r){let u=i.name.value,c=t[u];if(c&&s){let f=e.getSchema(),d=W(f,c.type);if(d&&!qs(f,d,c.defaultValue,s,o)){let h=E(d),g=E(s);e.reportError(new m(`Variable "$${u}" of type "${h}" used in position expecting type "${g}".`,{nodes:[c,i]}));}U(a)&&a.isOneOf&&Ot(d)&&e.reportError(new m(`Variable "$${u}" is of type "${d}" but must be non-nullable to be used for OneOf Input Object "${a}".`,{nodes:[c,i]}));}}}},VariableDefinition(n){t[n.variable.name.value]=n;}}}function qs(e,t,n,r,i){if(x(r)&&!x(t)){if(!(n!=null&&n.kind!==exports.d.NULL)&&!(i!==void 0))return false;let a=r.ofType;return xe(e,t,a)}return xe(e,t,r)}var Mr=Object.freeze([ar]),Sn=Object.freeze([Zn,wr,sr,Sr,Tn,tr,Ur,vr,er,Rr,ir,cr,Tr,ur,Cr,pr,lr,yn,bn,nr,On,$r,Nr,Vr,hr,_n,...Mr]);chunkBUNLC3II_cjs.h();var jr=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===exports.d.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 s of i.selections)s.kind===exports.d.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.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],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){let a=o.name.value;if(r[a]!==true){r[a]=true;let u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet));}}this._recursivelyReferencedFragments.set(t,n);}return n}};var Qt=class extends jr{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 Qe(this._schema);je(t,jt(i,{VariableDefinition:()=>false,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()});}})),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()}};var Ks=Me(ht,e=>e.filter(t=>t!=="description"));function Di(e,t,n=Sn,r,i=new Qe(e)){var s;let o=(s=r?.maxErrors)!==null&&s!==void 0?s:100;t||k(false,"Must provide document."),mn(e);let a=Object.freeze({}),u=[],c=new Qt(e,t,i,d=>{if(u.length>=o)throw u.push(new m("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d);}),f=Vn(n.map(d=>d(c)));try{je(t,jt(i,f),Ks);}catch(d){if(d!==a)throw d}return u}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function Ai(e){return e instanceof Error?e:new Gr(e)}var Gr=class extends Error{constructor(t){super("Unexpected error value: "+E(t)),this.name="NonErrorThrown",this.thrownValue=t;}};function Li(e,t,n){var r;let i=Ai(e);return Js(i)?i:new m(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function Js(e){return Array.isArray(e.path)}chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();chunkBUNLC3II_cjs.h();function xi(e,t){let n=null;for(let i of e.definitions)if(i.kind===exports.d.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}chunkBUNLC3II_cjs.h();function Qr(e){return Io(e,t=>!on(t),vo)}function vo(e){return !sn(e)&&!ct(e)}function Io(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return [Oo(e),...r.map(s=>Ro(s)),...i.map(s=>Br(s))].filter(Boolean).join(`
60
60
 
61
61
  `)}function Oo(e){if(e.description==null&&bo(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}`),ge(e)+`schema {
62
62
  ${t.join(`
63
63
  `)}
64
- }`}function bo(e){let t=e.getQueryType();if(t&&t.name!=="Query")return false;let n=e.getMutationType();if(n&&n.name!=="Mutation")return false;let r=e.getSubscriptionType();return !(r&&r.name!=="Subscription")}function Qr(e){if(me(e))return _o(e);if(F(e))return So(e);if(C(e))return Do(e);if(te(e))return Ao(e);if(J(e))return Lo(e);if(U(e))return xo(e);z(false,"Unexpected type: "+E(e));}function _o(e){return ge(e)+`scalar ${e.name}`+wo(e)}function Ri(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function So(e){return ge(e)+`type ${e.name}`+Ri(e)+wi(e)}function Do(e){return ge(e)+`interface ${e.name}`+Ri(e)+wi(e)}function Ao(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ge(e)+"union "+e.name+n}function Lo(e){let t=e.getValues().map((n,r)=>ge(n," ",!r)+" "+n.name+Dn(n.deprecationReason));return ge(e)+`enum ${e.name}`+Br(t)}function xo(e){let t=Object.values(e.getFields()).map((n,r)=>ge(n," ",!r)+" "+Gr(n));return ge(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Br(t)}function wi(e){let t=Object.values(e.getFields()).map((n,r)=>ge(n," ",!r)+" "+n.name+ki(n.args," ")+": "+String(n.type)+Dn(n.deprecationReason));return Br(t)}function Br(e){return e.length!==0?` {
64
+ }`}function bo(e){let t=e.getQueryType();if(t&&t.name!=="Query")return false;let n=e.getMutationType();if(n&&n.name!=="Mutation")return false;let r=e.getSubscriptionType();return !(r&&r.name!=="Subscription")}function Br(e){if(me(e))return _o(e);if(F(e))return So(e);if(C(e))return Do(e);if(te(e))return Ao(e);if(J(e))return Lo(e);if(U(e))return xo(e);z(false,"Unexpected type: "+E(e));}function _o(e){return ge(e)+`scalar ${e.name}`+wo(e)}function Ri(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function So(e){return ge(e)+`type ${e.name}`+Ri(e)+wi(e)}function Do(e){return ge(e)+`interface ${e.name}`+Ri(e)+wi(e)}function Ao(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ge(e)+"union "+e.name+n}function Lo(e){let t=e.getValues().map((n,r)=>ge(n," ",!r)+" "+n.name+Dn(n.deprecationReason));return ge(e)+`enum ${e.name}`+qr(t)}function xo(e){let t=Object.values(e.getFields()).map((n,r)=>ge(n," ",!r)+" "+Pr(n));return ge(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+qr(t)}function wi(e){let t=Object.values(e.getFields()).map((n,r)=>ge(n," ",!r)+" "+n.name+ki(n.args," ")+": "+String(n.type)+Dn(n.deprecationReason));return qr(t)}function qr(e){return e.length!==0?` {
65
65
  `+e.join(`
66
66
  `)+`
67
- }`:""}function ki(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Gr).join(", ")+")":`(
68
- `+e.map((n,r)=>ge(n," "+t,!r)+" "+t+Gr(n)).join(`
67
+ }`:""}function ki(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Pr).join(", ")+")":`(
68
+ `+e.map((n,r)=>ge(n," "+t,!r)+" "+t+Pr(n)).join(`
69
69
  `)+`
70
- `+t+")"}function Gr(e){let t=Re(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${$(t)}`),n+Dn(e.deprecationReason)}function Ro(e){return ge(e)+"directive @"+e.name+ki(e.args)+Dn(e.deprecationReason)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Dn(e){return e==null?"":e!==kt?` @deprecated(reason: ${$({kind:exports.d.STRING,value:e})})`:" @deprecated"}function wo(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${$({kind:exports.d.STRING,value:e.specifiedByURL})})`}function ge(e,t="",n=true){let{description:r}=e;if(r==null)return "";let i=$({kind:exports.d.STRING,value:r,block:Wr(r)});return (t&&!n?`
70
+ `+t+")"}function Pr(e){let t=Re(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${$(t)}`),n+Dn(e.deprecationReason)}function Ro(e){return ge(e)+"directive @"+e.name+ki(e.args)+Dn(e.deprecationReason)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Dn(e){return e==null?"":e!==kt?` @deprecated(reason: ${$({kind:exports.d.STRING,value:e})})`:" @deprecated"}function wo(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${$({kind:exports.d.STRING,value:e.specifiedByURL})})`}function ge(e,t="",n=true){let{description:r}=e;if(r==null)return "";let i=$({kind:exports.d.STRING,value:r,block:Wr(r)});return (t&&!n?`
71
71
  `+t:t)+i.replace(/\n/g,`
72
72
  `+t)+`
73
- `}var Yr=class{db;tenantId;user;caches=new Map;pending=new Map;waiting=new Map;flushScheduled=false;constructor(t){this.db=t.db,this.tenantId=t.tenantId,this.user=t.user;}getCacheKey(t){return t}async load(t,n){let r=this.getCacheKey(t),i=this.caches.get(r);if(i||(i=new Map,this.caches.set(r,i)),i.has(n))return i.get(n);let s=this.pending.get(r);return s||(s=new Set,this.pending.set(r,s)),s.add(n),i.set(n,void 0),this.flushScheduled||(this.flushScheduled=true,queueMicrotask(()=>{this.flushScheduled=false,this.flushAll();})),new Promise(o=>{let a=this.waiting.get(`${r}:${n}`);a||(a=[],this.waiting.set(`${r}:${n}`,a)),a.push(o);})}async flushAll(){for(let[t,n]of this.pending){if(n.size===0)continue;let r=this.caches.get(t),i=await this.db.find({collection:t,where:{id:{in:Array.from(n)}},limit:n.size,tenantId:this.tenantId,draft:!!this.user});for(let s of i.docs||[])if(s&&s.id){r.set(s.id,s);let o=this.waiting.get(`${t}:${s.id}`);o&&(o.forEach(a=>a(s)),this.waiting.delete(`${t}:${s.id}`));}}for(let[t,n]of this.waiting)n.forEach(r=>r(void 0));this.waiting.clear(),this.pending.clear();}resolveOne(t,n){return this.caches.get(this.getCacheKey(t))?.get(n)}},le=new de({name:"JSON",description:"Arbitrary JSON value",serialize(e){return e},parseValue(e){return e},parseLiteral(e){switch(e.kind){case exports.d.STRING:return e.value;case exports.d.INT:case exports.d.FLOAT:return parseFloat(e.value);case exports.d.BOOLEAN:return e.value;case exports.d.OBJECT:{let t={};for(let n of e.fields)t[n.name.value]=le.parseLiteral(n.value);return t}case exports.d.LIST:return e.values.map(t=>le.parseLiteral(t));case exports.d.NULL:return null;default:return null}}});function Fo(e){return t=>{let n=0;return {Field(){n++,n>e&&t.reportError(new Error(`Query exceeds max depth of ${e}`));},leaveField(){n--;}}}}function j(e){return e.split(/[-_]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function qr(e){let t=j(e);return t.charAt(0).toLowerCase()+t.slice(1)}function Ne(e){return e.endsWith("s")&&e.length>1?e.slice(0,-1):e}async function ft(e,t,n){let r=e.access?.[t];if(n.apiKey){if(n.apiKey.permissions?.length>0){let s=e.slug,a=`${s}:${t==="read"?"read":t==="create"?"create":"update"}`;return !chunkDUO523BH_cjs.h(n.apiKey.permissions,a)&&!chunkDUO523BH_cjs.h(n.apiKey.permissions,`${s}:admin`)?{allowed:false}:{allowed:true}}if(r){let s=await chunkDUO523BH_cjs.a(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof s=="boolean"?{allowed:s}:{allowed:true,extraWhere:s}}return {allowed:true}}if(n.user){let s=e.slug,a=`${s}:${t==="read"?"read":t==="create"?"create":t==="update"?"update":"delete"}`;if(!chunk7WMMKGEO_cjs.a({id:n.user.id,email:n.user.email,role:n.user.role},a)&&!chunk7WMMKGEO_cjs.a({id:n.user.id,email:n.user.email,role:n.user.role},`${s}:admin`)&&!r)return {allowed:false}}if(!r)return n.user?{allowed:true}:{allowed:false};let i=await chunkDUO523BH_cjs.a(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof i=="boolean"?{allowed:i}:{allowed:true,extraWhere:i}}async function Fi(e,t,n){let r=e.access?.[t];if(n.apiKey){if(n.apiKey.permissions?.length>0){let s=e.slug,o=`${s}:${t}`;return !chunkDUO523BH_cjs.h(n.apiKey.permissions,o)&&!chunkDUO523BH_cjs.h(n.apiKey.permissions,`${s}:admin`)&&!chunkDUO523BH_cjs.h(n.apiKey.permissions,`${s}:*`)?{allowed:false}:{allowed:true}}if(r){let s=await chunkDUO523BH_cjs.a(r,{req:n.req,user:n.user,tenantId:n.tenantId});return {allowed:typeof s=="boolean"?s:true}}return {allowed:true}}if(!r){if(!n.user)return {allowed:false};let s=n.user.role;return s==="super_admin"||s==="admin"?{allowed:true}:{allowed:false}}let i=await chunkDUO523BH_cjs.a(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof i=="boolean"?{allowed:i}:{allowed:true}}function Ci(e,t){return e?e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")||e.startsWith("data:")?e:`${(process.env.KYRO_BASE_URL||t||"http://localhost:4321").replace(/\/+$/,"")}${e.startsWith("/")?"":"/"}${e}`:null}function Ue(e,t){return e&&(e.url&&(e.url=Ci(e.url,t)),e.thumbnailUrl&&(e.thumbnailUrl=Ci(e.thumbnailUrl,t)),e)}function qe(e,t,n,r=false,i="Root",s=new Map){switch(e.type){case "text":case "email":case "password":case "textarea":case "color":case "code":case "markdown":case "date":case "select":case "radio":return e.hasMany?new V(_):_;case "list":return new V(_);case "upload":{let o=e;if(r)return o.hasMany?new V(_):_;if(o.relationTo&&n?.[o.relationTo]){let a=n[o.relationTo];return o.hasMany?new V(a):a}return le}case "image":{if(r)return _;let o=e;return o.relationTo&&n?.[o.relationTo]?n[o.relationTo]:le}case "number":{let o=e.integer?Oe:Dt;return e.hasMany?new V(o):o}case "checkbox":return B;case "json":case "richtext":return le;case "blocks":{if(r)return le;let o=e,a=(o.blocks||[]).map(f=>{let d=`Block_${j(f.slug)}`,h=s.get(d);return h||(h=new M({name:d,fields:()=>{let g=Ye(f.fields||[],t,n,d,s);return g.blockType={type:_},g.name={type:_},g}}),s.set(d,h)),h});if(a.length===0)return le;let p=`${i}_${j(o.name)}_Blocks`,c=s.get(p);return c||(c=new we({name:p,types:a,resolveType:f=>`Block_${j(f.blockType||f.type)}`}),s.set(p,c)),new V(c)}case "tabs":{if(r)return le;let o=e,a=`${i}_${j(o.name)}_Tabs`,p=s.get(a);return p||(p=new M({name:a,fields:()=>Ye(o.tabs?.flatMap(c=>c.fields||[])||[],t,n,a,s)}),s.set(a,p)),p}case "relationship":{let o=e.relationTo;if((o==="*"||Array.isArray(o)&&o.includes("*"))&&(o=t.getCollections().map(a=>a.slug)),typeof o=="string"){if(r)return e.hasMany?new V(_):_;if(n?.[o])return e.hasMany?new V(n[o]):n[o];let a=t.getCollection(o);if(a)return new M({name:`${j(o)}Ref`,fields:()=>({id:{type:_},...An(a,t,n,s)})})}else if(Array.isArray(o)){if(r)return e.hasMany?new V(le):le;let a=o.map(h=>{if(n?.[h])return n[h];let g=t.getCollection(h);if(g){let N=s.get(`${j(h)}Ref`);return N||(N=new M({name:`${j(h)}Ref`,fields:()=>({id:{type:_},...An(g,t,n,s)})}),s.set(`${j(h)}Ref`,N)),N}return null}).filter(Boolean);if(a.length===0)return le;let p=`${i}_${j(e.name||"Ref")}_PolyUnion`,c=s.get(p);c||(c=new we({name:p,types:a,resolveType:h=>{if(h.__collection&&h.__collection!=="*")return n?.[h.__collection]?n[h.__collection].name:`${j(h.__collection)}Ref`}}),s.set(p,c));let f=`${i}_${j(e.name||"Ref")}_PolyWrapper`,d=s.get(f);return d||(d=new M({name:f,fields:{relationTo:{type:_},value:{type:c}}}),s.set(f,d)),e.hasMany?new V(d):d}return le}case "array":{if(r)return new V(le);let o=e,a=`${i}_${j(o.name)}_ArrayItem`,p=s.get(a);return p||(p=new M({name:a,fields:()=>{let c=Ye(o.fields||[],t,n,a,s);return c.id={type:_},c}}),s.set(a,p)),new V(p)}case "group":{if(r)return le;let o=e,a=`${i}_${j(o.name)}_Group`,p=s.get(a);return p||(p=new M({name:a,fields:()=>Ye(o.fields||[],t,n,a,s)}),s.set(a,p)),p}default:return _}}function Ye(e,t,n,r,i=new Map){let s={};for(let o of e){if(o.type==="tabs"&&!o.name){for(let a of o.tabs||[]){let p=Ye(a.fields||[],t,n,r,i);Object.assign(s,p);}continue}if(o.type==="row"||o.type==="collapsible"){let a=Ye(o.fields||[],t,n,r,i);Object.assign(s,a);continue}if(o.name&&o.admin?.hidden!==true){let a=Co(o,t,n,r,i);a&&(s[o.name]=a);}}return s}function An(e,t,n,r=new Map){return Ye(e.fields,t,n,j(Ne(e.slug)),r)}function Co(e,t,n,r,i=new Map){if(!e.name)return null;let s=e.deprecated||void 0;if(e.type==="upload"){let a=qe(e,t,n,false,r,i),p=e;return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:async(c,f,d)=>{let h=d?.relationLoader,g=c?.[p.name],N=d?.req?.url?new URL(d.req.url).origin:void 0;if(!g)return null;if(p.hasMany){let R=Array.isArray(g)?g:[];return Promise.all(R.map(async A=>{let G=typeof A=="string"?A:A?.id;if(!G||typeof A=="object"&&A?.url)return Ue(A,N);if(h){let Y=h.resolveOne(p.relationTo,G);if(Y)return Ue(Y,N);let v=await h.load(p.relationTo,G);return v?Ue(v,N):null}return {id:G}}))}let D=typeof g=="string"?g:g?.id;if(!D||typeof g=="object"&&g?.url)return Ue(g,N);if(h){let R=h.resolveOne(p.relationTo,D);if(R)return Ue(R,N);let A=await h.load(p.relationTo,D);return A?Ue(A,N):null}return {id:D}}}}if(e.type==="relationship"&&!e.hasMany){let a=qe(e,t,n,false,r,i);return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:async(p,c,f)=>{let d=f?.relationLoader,h=e,g=p?.[h.name];if(!g)return null;let N=Array.isArray(h.relationTo)||h.relationTo==="*",D=N?g?.relationTo:h.relationTo,R=N?g?.value:g;if(N&&typeof g=="string"&&(D=h.relationTo[0],R=g),N&&D==="*")return null;if(d&&typeof R=="string"&&typeof D=="string"&&D!=="*"){let A=d.resolveOne(D,R);if(A)return N?{relationTo:D,value:{...A,__collection:D}}:A;let G=await d.load(D,R);return G?N?{relationTo:D,value:{...G,__collection:D}}:G:null}return N?{relationTo:D,value:{id:R,__collection:D}}:{id:R}}}}if(e.type==="relationship"&&e.hasMany)return {type:qe(e,t,n,false,r,i),description:e.admin?.description||e.label,deprecationReason:s,resolve:async(p,c,f)=>{let d=f?.relationLoader,h=e,g=p?.[h.name]||[];if(typeof g=="string")try{g=JSON.parse(g);}catch{}if(Array.isArray(g)||(g=[]),!g.length)return [];let N=Array.isArray(h.relationTo)||h.relationTo==="*";if(d){let D=[];for(let R of g){let A=N?R?.relationTo:h.relationTo,G=N?R?.value:R;if(N&&typeof R=="string"&&(A=h.relationTo[0],G=R),!(N&&A==="*")){if(typeof G=="string"&&typeof A=="string"&&A!=="*"){let Y=d.resolveOne(A,G);if(Y){D.push(N?{relationTo:A,value:{...Y,__collection:A}}:Y);continue}let v=await d.load(A,G);if(v){D.push(N?{relationTo:A,value:{...v,__collection:A}}:v);continue}continue}D.push(N?{relationTo:A,value:{id:G,__collection:A}}:{id:G});}}return D}return g.map(D=>{let R=N?D?.relationTo:h.relationTo,A=N?D?.value:D;return N&&typeof D=="string"&&(R=h.relationTo[0],A=D),N?{relationTo:R,value:{id:A}}:{id:A}})}};if(e.type==="blocks"){let a=qe(e,t,n,false,r,i);return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:p=>{let c=p?.[e.name];if(typeof c=="string")try{c=JSON.parse(c);}catch{}return Array.isArray(c)?c.map(f=>f&&f.data&&f.type?{...f.data,id:f.id,type:f.type,blockType:f.type,name:f.name}:f):c}}}let o=qe(e,t,n,false,r,i);return {type:e.required?new S(o):o,description:e.admin?.description||e.label,deprecationReason:s,resolve:a=>{let p=a?.[e.name];if(typeof p=="string"&&["array","group","tabs","blocks","json","richtext","list"].includes(e.type))try{p=JSON.parse(p);}catch{}return p}}}function $i(e){let{registry:t,db:n,user:r,req:i,tenantId:s,apiKey:o,settings:a}=e;if(a?.access?.apiAccess?.graphqlEnabled===false)throw new Error("GraphQL API is disabled");let c=t.getCollections(),f=t.getGlobals(),d={},h={},g=new Map;for(let v of c){d[v.slug]=new M({name:j(Ne(v.slug)),fields:()=>({id:{type:_},...An(v,t,d,g),...v.timestamps?{createdAt:{type:_},updatedAt:{type:_}}:{},...v.tenantScoped?{tenantId:{type:_}}:{}})});let q={};for(let X of v.fields)X.name&&X.name!=="id"&&(q[X.name]={type:qe(X,t,d,true)});h[v.slug]=new Fe({name:`${j(Ne(v.slug))}Input`,fields:()=>q});}let N={},D={};for(let v of f)N[v.slug]=new M({name:`${j(v.slug)}Global`,fields:()=>({id:{type:_},...An({slug:v.slug,fields:v.fields},t,d)})}),D[v.slug]=new Fe({name:`${j(v.slug)}GlobalInput`,fields:()=>{let q={};for(let X of v.fields)X.name&&X.name!=="id"&&(q[X.name]={type:qe(X,t,d,true)});return q}});let R={};for(let v of c){let q=d[v.slug];q&&(R[qr(v.slug)]={type:new M({name:`${j(Ne(v.slug))}FindResult`,fields:{docs:{type:new V(q)},totalDocs:{type:Oe},page:{type:Oe},totalPages:{type:Oe},hasNextPage:{type:B},hasPrevPage:{type:B}}}),args:{where:{type:_},sort:{type:_},limit:{type:Oe},page:{type:Oe},draft:{type:B}},resolve:async(X,P,O)=>{let w=await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey});if(!w.allowed)throw new Error("Access denied");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re={};if(P.where)try{re=JSON.parse(P.where);}catch{}w.extraWhere&&(re={...re,...w.extraWhere});let Se=P.draft??!!O.user;return n.find({collection:v.slug,where:re,sort:P.sort,limit:P.limit||10,page:P.page||1,tenantId:O.tenantId,draft:Se})}},R[qr(Ne(v.slug))]={type:q,args:{id:{type:_},slug:{type:_},draft:{type:B}},resolve:async(X,P,O)=>{if(!P.id&&!P.slug)throw new Error("Either id or slug is required");if(!(await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re=P.draft??!!O.user;return P.id?n.findByID({collection:v.slug,id:P.id,tenantId:O.tenantId,draft:re}):(await n.find({collection:v.slug,where:{slug:{equals:P.slug}},limit:1,page:1,tenantId:O.tenantId,draft:re})).docs?.[0]||null}},R[`count${j(v.slug)}`]={type:new M({name:`${j(Ne(v.slug))}Count`,fields:{totalDocs:{type:Oe}}}),args:{where:{type:_}},resolve:async(X,P,O)=>{if(!(await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)return {totalDocs:0};let re={};if(P.where)try{re=JSON.parse(P.where);}catch{}return {totalDocs:await n.count({collection:v.slug,where:re,tenantId:O.tenantId})}}});}for(let v of f){let q=N[v.slug];q&&(R[qr(Ne(v.slug))]={type:q,resolve:async(X,P,O)=>{if(!(await Fi(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied: cannot read global");return O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"}),n.findOne({collection:`_globals_${v.slug}`,where:{},tenantId:O.tenantId})}});}let A=new M({name:"Query",fields:R}),G={};for(let v of c){let q=d[v.slug],X=h[v.slug];!q||!X||(G[`create${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}CreateResult`,fields:{doc:{type:q},message:{type:_}}}),args:{data:{type:new S(X)}},resolve:async(P,O,w)=>{if(!(await ft(v,"create",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot create");w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"});let Ln=t.getCreateZodSchema(v.slug).parse(O.data);return {doc:await n.create({collection:v.slug,data:Ln,tenantId:w.tenantId}),message:"Created successfully"}}},G[`update${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}UpdateResult`,fields:{doc:{type:q},message:{type:_}}}),args:{id:{type:new S(_)},data:{type:new S(X)},baseUpdatedAt:{type:_}},resolve:async(P,O,w)=>{if(!(await ft(v,"update",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot update");if(w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"}),O.baseUpdatedAt){let Bt=await n.findByID({collection:v.slug,id:O.id,tenantId:w.tenantId,draft:true});if(Bt&&Bt.updatedAt&&O.baseUpdatedAt!==Bt.updatedAt)throw new Error(`Revision conflict: document has changed since ${O.baseUpdatedAt}. Current updatedAt: ${Bt.updatedAt}`)}let Ln=t.getUpdateZodSchema(v.slug).parse(O.data);return {doc:await n.update({collection:v.slug,id:O.id,data:Ln,tenantId:w.tenantId}),message:"Updated successfully"}}},G[`delete${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}DeleteResult`,fields:{doc:{type:q},message:{type:_}}}),args:{id:{type:new S(_)}},resolve:async(P,O,w)=>{if(!(await ft(v,"delete",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot delete");return w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"}),{doc:await n.delete({collection:v.slug,id:O.id,tenantId:w.tenantId}),message:"Deleted successfully"}}});}for(let v of f){let q=D[v.slug];q&&(G[`update${j(v.slug)}`]={type:new M({name:`${j(v.slug)}UpdateResult`,fields:{doc:{type:N[v.slug]||_},message:{type:_}}}),args:{data:{type:new S(q)}},resolve:async(X,P,O)=>{if(!(await Fi(v,"update",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied: cannot update global");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re=await n.findOne({collection:`_globals_${v.slug}`,where:{},tenantId:O.tenantId}),Se;return re?Se=await n.update({collection:`_globals_${v.slug}`,id:re.id,data:P.data,tenantId:O.tenantId}):Se=await n.create({collection:`_globals_${v.slug}`,data:P.data,tenantId:O.tenantId}),{doc:Se,message:"Updated successfully"}}});}let Y=new M({name:"Mutation",fields:G});return new Ge({query:A,mutation:Y})}function $o(e,t,n){return $i({registry:e,db:t,user:n?.user,req:n?.req,tenantId:n?.tenantId,apiKey:n?.apiKey})}
74
- exports.A=$e;exports.B=Pt;exports.C=Sn;exports.D=Di;exports.E=Li;exports.F=xi;exports.G=Pr;exports.H=Yr;exports.I=Fo;exports.J=$i;exports.K=$o;exports.a=Vi;exports.b=m;exports.e=ii;exports.f=$;exports.g=nt;exports.h=F;exports.i=Q;exports.j=x;exports.k=se;exports.l=ce;exports.m=ye;exports.n=S;exports.o=Oe;exports.p=_;exports.q=B;exports.r=De;exports.s=Rt;exports.t=wt;exports.u=Ct;exports.v=$t;exports.w=Ut;exports.x=mn;exports.y=W;exports.z=Ii;
73
+ `}chunkBUNLC3II_cjs.h();var An=class{db;tenantId;user;caches=new Map;pending=new Map;waiting=new Map;flushScheduled=false;constructor(t){this.db=t.db,this.tenantId=t.tenantId,this.user=t.user;}getCacheKey(t){return t}async load(t,n){let r=this.getCacheKey(t),i=this.caches.get(r);if(i||(i=new Map,this.caches.set(r,i)),i.has(n))return i.get(n);let s=this.pending.get(r);return s||(s=new Set,this.pending.set(r,s)),s.add(n),i.set(n,void 0),this.flushScheduled||(this.flushScheduled=true,queueMicrotask(()=>{this.flushScheduled=false,this.flushAll();})),new Promise(o=>{let a=this.waiting.get(`${r}:${n}`);a||(a=[],this.waiting.set(`${r}:${n}`,a)),a.push(o);})}async flushAll(){for(let[t,n]of this.pending){if(n.size===0)continue;let r=t,i=Array.from(n);this.pending.delete(t);try{let s=await this.db.find({collection:r,where:{id:{in:i}},limit:i.length,tenantId:this.tenantId}),o=this.caches.get(t)||new Map,a=new Map;for(let u of s.docs)a.set(u.id,u),o.set(u.id,u);for(let u of i){let c=this.waiting.get(`${t}:${u}`);if(c){let f=a.get(u);for(let d of c)d(f);this.waiting.delete(`${t}:${u}`);}}}catch(s){console.error(`[RelationLoader] Failed to batch load ${r}:`,s);for(let o of i){let a=this.waiting.get(`${t}:${o}`);if(a){for(let u of a)u(void 0);this.waiting.delete(`${t}:${o}`);}}}}}async loadMany(t,n){return Promise.all(n.map(r=>this.load(t,r)))}resolveOne(t,n){return this.caches.get(this.getCacheKey(t))?.get(n)}};var le=new de({name:"JSON",description:"Arbitrary JSON value",serialize(e){return e},parseValue(e){return e},parseLiteral(e){switch(e.kind){case exports.d.STRING:return e.value;case exports.d.INT:case exports.d.FLOAT:return parseFloat(e.value);case exports.d.BOOLEAN:return e.value;case exports.d.OBJECT:{let t={};for(let n of e.fields)t[n.name.value]=le.parseLiteral(n.value);return t}case exports.d.LIST:return e.values.map(t=>le.parseLiteral(t));case exports.d.NULL:return null;default:return null}}});function Fo(e){return t=>{let n=0;return {Field(){n++,n>e&&t.reportError(new Error(`Query exceeds max depth of ${e}`));},leaveField(){n--;}}}}function j(e){return e.split(/[-_]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function Yr(e){let t=j(e);return t.charAt(0).toLowerCase()+t.slice(1)}function Ne(e){return e.endsWith("s")&&e.length>1?e.slice(0,-1):e}async function ft(e,t,n){let r=e.access?.[t];if(n.apiKey){if(n.apiKey.permissions?.length>0){let s=e.slug,a=`${s}:${t==="read"?"read":t==="create"?"create":"update"}`;return !chunkZHA446FA_cjs.e(n.apiKey.permissions,a)&&!chunkZHA446FA_cjs.e(n.apiKey.permissions,`${s}:admin`)?{allowed:false}:{allowed:true}}if(r){let s=await chunkZHA446FA_cjs.h(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof s=="boolean"?{allowed:s}:{allowed:true,extraWhere:s}}return {allowed:true}}if(n.user){let s=e.slug,a=`${s}:${t==="read"?"read":t==="create"?"create":t==="update"?"update":"delete"}`;if(!chunk7WMMKGEO_cjs.a({id:n.user.id,email:n.user.email,role:n.user.role},a)&&!chunk7WMMKGEO_cjs.a({id:n.user.id,email:n.user.email,role:n.user.role},`${s}:admin`)&&!r)return {allowed:false}}if(!r)return n.user?{allowed:true}:{allowed:false};let i=await chunkZHA446FA_cjs.h(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof i=="boolean"?{allowed:i}:{allowed:true,extraWhere:i}}async function Fi(e,t,n){let r=e.access?.[t];if(n.apiKey){if(n.apiKey.permissions?.length>0){let s=e.slug,o=`${s}:${t}`;return !chunkZHA446FA_cjs.e(n.apiKey.permissions,o)&&!chunkZHA446FA_cjs.e(n.apiKey.permissions,`${s}:admin`)&&!chunkZHA446FA_cjs.e(n.apiKey.permissions,`${s}:*`)?{allowed:false}:{allowed:true}}if(r){let s=await chunkZHA446FA_cjs.h(r,{req:n.req,user:n.user,tenantId:n.tenantId});return {allowed:typeof s=="boolean"?s:true}}return {allowed:true}}if(!r){if(!n.user)return {allowed:false};let s=n.user.role;return s==="super_admin"||s==="admin"?{allowed:true}:{allowed:false}}let i=await chunkZHA446FA_cjs.h(r,{req:n.req,user:n.user,tenantId:n.tenantId});return typeof i=="boolean"?{allowed:i}:{allowed:true}}function Ci(e,t){return e?e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")||e.startsWith("data:")?e:`${(process.env.KYRO_BASE_URL||t||"http://localhost:4321").replace(/\/+$/,"")}${e.startsWith("/")?"":"/"}${e}`:null}function Ue(e,t){return e&&(e.url&&(e.url=Ci(e.url,t)),e.thumbnailUrl&&(e.thumbnailUrl=Ci(e.thumbnailUrl,t)),e)}function qe(e,t,n,r=false,i="Root",s=new Map){switch(e.type){case "text":case "email":case "password":case "textarea":case "color":case "code":case "markdown":case "date":case "select":case "radio":return e.hasMany?new V(_):_;case "list":return new V(_);case "upload":{let o=e;if(r)return o.hasMany?new V(_):_;if(o.relationTo&&n?.[o.relationTo]){let a=n[o.relationTo];return o.hasMany?new V(a):a}return le}case "image":{if(r)return _;let o=e;return o.relationTo&&n?.[o.relationTo]?n[o.relationTo]:le}case "number":{let o=e.integer?Oe:Dt;return e.hasMany?new V(o):o}case "checkbox":return B;case "json":case "richtext":return le;case "blocks":{if(r)return le;let o=e,a=(o.blocks||[]).map(f=>{let d=`Block_${j(f.slug)}`,h=s.get(d);return h||(h=new M({name:d,fields:()=>{let g=Ye(f.fields||[],t,n,d,s);return g.blockType={type:_},g.name={type:_},g}}),s.set(d,h)),h});if(a.length===0)return le;let u=`${i}_${j(o.name)}_Blocks`,c=s.get(u);return c||(c=new we({name:u,types:a,resolveType:f=>`Block_${j(f.blockType||f.type)}`}),s.set(u,c)),new V(c)}case "tabs":{if(r)return le;let o=e,a=`${i}_${j(o.name)}_Tabs`,u=s.get(a);return u||(u=new M({name:a,fields:()=>Ye(o.tabs?.flatMap(c=>c.fields||[])||[],t,n,a,s)}),s.set(a,u)),u}case "relationship":{let o=e.relationTo;if((o==="*"||Array.isArray(o)&&o.includes("*"))&&(o=t.getCollections().map(a=>a.slug)),typeof o=="string"){if(r)return e.hasMany?new V(_):_;if(n?.[o])return e.hasMany?new V(n[o]):n[o];let a=t.getCollection(o);if(a)return new M({name:`${j(o)}Ref`,fields:()=>({id:{type:_},...Ln(a,t,n,s)})})}else if(Array.isArray(o)){if(r)return e.hasMany?new V(le):le;let a=o.map(h=>{if(n?.[h])return n[h];let g=t.getCollection(h);if(g){let N=s.get(`${j(h)}Ref`);return N||(N=new M({name:`${j(h)}Ref`,fields:()=>({id:{type:_},...Ln(g,t,n,s)})}),s.set(`${j(h)}Ref`,N)),N}return null}).filter(Boolean);if(a.length===0)return le;let u=`${i}_${j(e.name||"Ref")}_PolyUnion`,c=s.get(u);c||(c=new we({name:u,types:a,resolveType:h=>{if(h.__collection&&h.__collection!=="*")return n?.[h.__collection]?n[h.__collection].name:`${j(h.__collection)}Ref`}}),s.set(u,c));let f=`${i}_${j(e.name||"Ref")}_PolyWrapper`,d=s.get(f);return d||(d=new M({name:f,fields:{relationTo:{type:_},value:{type:c}}}),s.set(f,d)),e.hasMany?new V(d):d}return le}case "array":{if(r)return new V(le);let o=e,a=`${i}_${j(o.name)}_ArrayItem`,u=s.get(a);return u||(u=new M({name:a,fields:()=>{let c=Ye(o.fields||[],t,n,a,s);return c.id={type:_},c}}),s.set(a,u)),new V(u)}case "group":{if(r)return le;let o=e,a=`${i}_${j(o.name)}_Group`,u=s.get(a);return u||(u=new M({name:a,fields:()=>Ye(o.fields||[],t,n,a,s)}),s.set(a,u)),u}default:return _}}function Ye(e,t,n,r,i=new Map){let s={};for(let o of e){if(o.type==="tabs"&&!o.name){for(let a of o.tabs||[]){let u=Ye(a.fields||[],t,n,r,i);Object.assign(s,u);}continue}if(o.type==="row"||o.type==="collapsible"){let a=Ye(o.fields||[],t,n,r,i);Object.assign(s,a);continue}if(o.name&&o.admin?.hidden!==true){let a=Co(o,t,n,r,i);a&&(s[o.name]=a);}}return s}function Ln(e,t,n,r=new Map){return Ye(e.fields,t,n,j(Ne(e.slug)),r)}function Co(e,t,n,r,i=new Map){if(!e.name)return null;let s=e.deprecated||void 0;if(e.type==="upload"){let a=qe(e,t,n,false,r,i),u=e;return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:async(c,f,d)=>{let h=d?.relationLoader,g=c?.[u.name],N=d?.req?.url?new URL(d.req.url).origin:void 0;if(!g)return null;if(u.hasMany){let R=Array.isArray(g)?g:[];return Promise.all(R.map(async A=>{let G=typeof A=="string"?A:A?.id;if(!G||typeof A=="object"&&A?.url)return Ue(A,N);if(h){let Y=h.resolveOne(u.relationTo,G);if(Y)return Ue(Y,N);let v=await h.load(u.relationTo,G);return v?Ue(v,N):null}return {id:G}}))}let D=typeof g=="string"?g:g?.id;if(!D||typeof g=="object"&&g?.url)return Ue(g,N);if(h){let R=h.resolveOne(u.relationTo,D);if(R)return Ue(R,N);let A=await h.load(u.relationTo,D);return A?Ue(A,N):null}return {id:D}}}}if(e.type==="relationship"&&!e.hasMany){let a=qe(e,t,n,false,r,i);return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:async(u,c,f)=>{let d=f?.relationLoader,h=e,g=u?.[h.name];if(!g)return null;let N=Array.isArray(h.relationTo)||h.relationTo==="*",D=N?g?.relationTo:h.relationTo,R=N?g?.value:g;if(N&&typeof g=="string"&&(D=h.relationTo[0],R=g),N&&D==="*")return null;if(d&&typeof R=="string"&&typeof D=="string"&&D!=="*"){let A=d.resolveOne(D,R);if(A)return N?{relationTo:D,value:{...A,__collection:D}}:A;let G=await d.load(D,R);return G?N?{relationTo:D,value:{...G,__collection:D}}:G:null}return N?{relationTo:D,value:{id:R,__collection:D}}:{id:R}}}}if(e.type==="relationship"&&e.hasMany)return {type:qe(e,t,n,false,r,i),description:e.admin?.description||e.label,deprecationReason:s,resolve:async(u,c,f)=>{let d=f?.relationLoader,h=e,g=u?.[h.name]||[];if(typeof g=="string")try{g=JSON.parse(g);}catch{}if(Array.isArray(g)||(g=[]),!g.length)return [];let N=Array.isArray(h.relationTo)||h.relationTo==="*";if(d){let D=[];for(let R of g){let A=N?R?.relationTo:h.relationTo,G=N?R?.value:R;if(N&&typeof R=="string"&&(A=h.relationTo[0],G=R),!(N&&A==="*")){if(typeof G=="string"&&typeof A=="string"&&A!=="*"){let Y=d.resolveOne(A,G);if(Y){D.push(N?{relationTo:A,value:{...Y,__collection:A}}:Y);continue}let v=await d.load(A,G);if(v){D.push(N?{relationTo:A,value:{...v,__collection:A}}:v);continue}continue}D.push(N?{relationTo:A,value:{id:G,__collection:A}}:{id:G});}}return D}return g.map(D=>{let R=N?D?.relationTo:h.relationTo,A=N?D?.value:D;return N&&typeof D=="string"&&(R=h.relationTo[0],A=D),N?{relationTo:R,value:{id:A}}:{id:A}})}};if(e.type==="blocks"){let a=qe(e,t,n,false,r,i);return {type:e.required?new S(a):a,description:e.admin?.description||e.label,deprecationReason:s,resolve:u=>{let c=u?.[e.name];if(typeof c=="string")try{c=JSON.parse(c);}catch{}return Array.isArray(c)?c.map(f=>f&&f.data&&f.type?{...f.data,id:f.id,type:f.type,blockType:f.type,name:f.name}:f):c}}}let o=qe(e,t,n,false,r,i);return {type:e.required?new S(o):o,description:e.admin?.description||e.label,deprecationReason:s,resolve:a=>{let u=a?.[e.name];if(typeof u=="string"&&["array","group","tabs","blocks","json","richtext","list"].includes(e.type))try{u=JSON.parse(u);}catch{}return u}}}function $i(e){let{registry:t,db:n,user:r,req:i,tenantId:s,apiKey:o,settings:a}=e;if(a?.access?.apiAccess?.graphqlEnabled===false)throw new Error("GraphQL API is disabled");let c=t.getCollections(),f=t.getGlobals(),d={},h={},g=new Map;for(let v of c){d[v.slug]=new M({name:j(Ne(v.slug)),fields:()=>({id:{type:_},...Ln(v,t,d,g),...v.timestamps?{createdAt:{type:_},updatedAt:{type:_}}:{},...v.tenantScoped?{tenantId:{type:_}}:{}})});let q={};for(let X of v.fields)X.name&&X.name!=="id"&&(q[X.name]={type:qe(X,t,d,true)});h[v.slug]=new Fe({name:`${j(Ne(v.slug))}Input`,fields:()=>q});}let N={},D={};for(let v of f)N[v.slug]=new M({name:`${j(v.slug)}Global`,fields:()=>({id:{type:_},...Ln({slug:v.slug,fields:v.fields},t,d)})}),D[v.slug]=new Fe({name:`${j(v.slug)}GlobalInput`,fields:()=>{let q={};for(let X of v.fields)X.name&&X.name!=="id"&&(q[X.name]={type:qe(X,t,d,true)});return q}});let R={};for(let v of c){let q=d[v.slug];q&&(R[Yr(v.slug)]={type:new M({name:`${j(Ne(v.slug))}FindResult`,fields:{docs:{type:new V(q)},totalDocs:{type:Oe},page:{type:Oe},totalPages:{type:Oe},hasNextPage:{type:B},hasPrevPage:{type:B}}}),args:{where:{type:_},sort:{type:_},limit:{type:Oe},page:{type:Oe},draft:{type:B}},resolve:async(X,P,O)=>{let w=await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey});if(!w.allowed)throw new Error("Access denied");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re={};if(P.where)try{re=JSON.parse(P.where);}catch{}w.extraWhere&&(re={...re,...w.extraWhere});let Se=P.draft??!!O.user;return n.find({collection:v.slug,where:re,sort:P.sort,limit:P.limit||10,page:P.page||1,tenantId:O.tenantId,draft:Se})}},R[Yr(Ne(v.slug))]={type:q,args:{id:{type:_},slug:{type:_},draft:{type:B}},resolve:async(X,P,O)=>{if(!P.id&&!P.slug)throw new Error("Either id or slug is required");if(!(await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re=P.draft??!!O.user;return P.id?n.findByID({collection:v.slug,id:P.id,tenantId:O.tenantId,draft:re}):(await n.find({collection:v.slug,where:{slug:{equals:P.slug}},limit:1,page:1,tenantId:O.tenantId,draft:re})).docs?.[0]||null}},R[`count${j(v.slug)}`]={type:new M({name:`${j(Ne(v.slug))}Count`,fields:{totalDocs:{type:Oe}}}),args:{where:{type:_}},resolve:async(X,P,O)=>{if(!(await ft(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)return {totalDocs:0};let re={};if(P.where)try{re=JSON.parse(P.where);}catch{}return {totalDocs:await n.count({collection:v.slug,where:re,tenantId:O.tenantId})}}});}for(let v of f){let q=N[v.slug];q&&(R[Yr(Ne(v.slug))]={type:q,resolve:async(X,P,O)=>{if(!(await Fi(v,"read",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied: cannot read global");return O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"}),n.findOne({collection:`_globals_${v.slug}`,where:{},tenantId:O.tenantId})}});}let A=new M({name:"Query",fields:R}),G={};for(let v of c){let q=d[v.slug],X=h[v.slug];!q||!X||(G[`create${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}CreateResult`,fields:{doc:{type:q},message:{type:_}}}),args:{data:{type:new S(X)}},resolve:async(P,O,w)=>{if(!(await ft(v,"create",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot create");w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"});let xn=t.getCreateZodSchema(v.slug).parse(O.data);return {doc:await n.create({collection:v.slug,data:xn,tenantId:w.tenantId}),message:"Created successfully"}}},G[`update${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}UpdateResult`,fields:{doc:{type:q},message:{type:_}}}),args:{id:{type:new S(_)},data:{type:new S(X)},baseUpdatedAt:{type:_}},resolve:async(P,O,w)=>{if(!(await ft(v,"update",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot update");if(w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"}),O.baseUpdatedAt){let Bt=await n.findByID({collection:v.slug,id:O.id,tenantId:w.tenantId,draft:true});if(Bt&&Bt.updatedAt&&O.baseUpdatedAt!==Bt.updatedAt)throw new Error(`Revision conflict: document has changed since ${O.baseUpdatedAt}. Current updatedAt: ${Bt.updatedAt}`)}let xn=t.getUpdateZodSchema(v.slug).parse(O.data);return {doc:await n.update({collection:v.slug,id:O.id,data:xn,tenantId:w.tenantId}),message:"Updated successfully"}}},G[`delete${j(Ne(v.slug))}`]={type:new M({name:`${j(Ne(v.slug))}DeleteResult`,fields:{doc:{type:q},message:{type:_}}}),args:{id:{type:new S(_)}},resolve:async(P,O,w)=>{if(!(await ft(v,"delete",{user:w.user,req:w.req,tenantId:w.tenantId,apiKey:w.apiKey})).allowed)throw new Error("Access denied: cannot delete");return w.tenantId&&n.setTenantContext({tenantId:w.tenantId,userId:w.user?.id??"",role:w.user?.role,isSuperAdmin:w.user?.role==="super_admin"}),{doc:await n.delete({collection:v.slug,id:O.id,tenantId:w.tenantId}),message:"Deleted successfully"}}});}for(let v of f){let q=D[v.slug];q&&(G[`update${j(v.slug)}`]={type:new M({name:`${j(v.slug)}UpdateResult`,fields:{doc:{type:N[v.slug]||_},message:{type:_}}}),args:{data:{type:new S(q)}},resolve:async(X,P,O)=>{if(!(await Fi(v,"update",{user:O.user,req:O.req,tenantId:O.tenantId,apiKey:O.apiKey})).allowed)throw new Error("Access denied: cannot update global");O.tenantId&&n.setTenantContext({tenantId:O.tenantId,userId:O.user?.id??"",role:O.user?.role,isSuperAdmin:O.user?.role==="super_admin"});let re=await n.findOne({collection:`_globals_${v.slug}`,where:{},tenantId:O.tenantId}),Se;return re?Se=await n.update({collection:`_globals_${v.slug}`,id:re.id,data:P.data,tenantId:O.tenantId}):Se=await n.create({collection:`_globals_${v.slug}`,data:P.data,tenantId:O.tenantId}),{doc:Se,message:"Updated successfully"}}});}let Y=new M({name:"Mutation",fields:G});return new Ge({query:A,mutation:Y})}function $o(e,t,n){return $i({registry:e,db:t,user:n?.user,req:n?.req,tenantId:n?.tenantId,apiKey:n?.apiKey})}
74
+ exports.A=$e;exports.B=Pt;exports.C=Sn;exports.D=Di;exports.E=Li;exports.F=xi;exports.G=Qr;exports.H=An;exports.I=Fo;exports.J=$i;exports.K=$o;exports.a=Vi;exports.b=m;exports.e=ii;exports.f=$;exports.g=nt;exports.h=F;exports.i=Q;exports.j=x;exports.k=se;exports.l=ce;exports.m=ye;exports.n=S;exports.o=Oe;exports.p=_;exports.q=B;exports.r=De;exports.s=Rt;exports.t=wt;exports.u=Ct;exports.v=$t;exports.w=Ut;exports.x=mn;exports.y=W;exports.z=Ii;